yatex
changeset 549:1ea3d99132fb
Merged with dev branch
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 31 Jul 2018 08:22:31 +0900 |
parents | 36a64c86ba60 a58a35eac93f |
children | 637d152145d7 |
files | docs/dir |
diffstat | 19 files changed, 994 insertions(+), 251 deletions(-) [+] |
line diff
1.1 --- a/README.md Sun Dec 10 22:03:46 2017 +0900 1.2 +++ b/README.md Tue Jul 31 08:22:31 2018 +0900 1.3 @@ -1,3 +1,5 @@ 1.4 +About YaTeX 1.5 +=========== 1.6 YaTeX is an intelligent, acquisitive and integrated package which reduces your 1.7 efforts of composing LaTeX source on Emacs. 1.8 1.9 @@ -17,3 +19,9 @@ 1.10 yahtmlは野鳥のユーザインタフェースを引き継いだHTML用のメジャーモードパッケージ 1.11 です。LaTeX ソースの入力に野鳥が欠かせないと気づいたあなたは、おそらく yahtml 1.12 にすぐなじみ同じように使いこなせることでしょう。もちろんその逆も。 1.13 + 1.14 +Links 1.15 +---- 1.16 +* [YaTeX](https://www.yatex.org) 1.17 +* [YaTeX - TeX Wiki](https://texwiki.texjp.org/?YaTeX) 1.18 +* [Search yatex with google](https://www.google.com/search?q=yatex)
2.1 --- a/docs/dir Sun Dec 10 22:03:46 2017 +0900 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,20 +0,0 @@ 2.4 - 2.5 --*- Text -*- 2.6 -This is the file .../info/dir, which contains the topmost node of the 2.7 -Info hierarchy. The first time you invoke Info you start off 2.8 -looking at that node, which is (dir)Top. 2.9 - 2.10 -File: dir Node: Top This is the top of the INFO tree 2.11 - This (the Directory node) gives a menu of major topics. 2.12 - Typing "d" returns here, "q" exits, "?" lists all INFO commands, "h" 2.13 - gives a primer for first-timers, "mTexinfo<Return>" visits Texinfo topic, 2.14 - etc. 2.15 - --- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) --- 2.16 - 2.17 -* Menu: The list of major topics begins on the next line. 2.18 - 2.19 -* YaTeX: (yatexj). Yet Another tex-mode for Emacs. (Japanese). 2.20 - 2.21 -* YaTeX-e: (yatexe). Yet Another tex-mode for Emacs. (English). 2.22 - 2.23 -* yahtml: (yahtmlj). Yet Another HTML-mode for Emacs. (Japanese).
3.1 --- a/docs/yatexe Sun Dec 10 22:03:46 2017 +0900 3.2 +++ b/docs/yatexe Tue Jul 31 08:22:31 2018 +0900 3.3 @@ -249,6 +249,7 @@ 3.4 * Changing typesetter:: 3.5 * Splitting input files:: 3.6 * Static region for typesetting:: 3.7 +* Special Filtering Region:: 3.8 * Lpr format:: 3.9 * Controlling which command to invoke:: 3.10 * Editing %# notation:: 3.11 @@ -337,6 +338,30 @@ 3.12 3.13 3.14 3.15 +File: yatexe, Node: Special Filtering Region, Next: Lpr format, Prev: Static region for typesetting, Up: %#notation 3.16 + 3.17 +Special Filtering Region 3.18 +======================== 3.19 + A region like below will be passed to external filter command. 3.20 + %#BEGIN FILTER{foo.pdf}{dot -T %t -o %o} 3.21 + \if0 3.22 + ....blah blah blah... 3.23 + ....blah blah blah... 3.24 + ....blah blah blah... 3.25 + \fi 3.26 + %#END 3.27 + 3.28 +In this case, typing `[prefix] t e' send three `blah' lines 3.29 +to "dot -T pdf -o foo.pdf" as standard-input. It is useful to 3.30 +have source of text-origin graphic generated by such tools as 3.31 +graphviz or blockdiag, in LaTeX source. This special form of region 3.32 +can be inserted via feeding `.dot' into environment completion by 3.33 +`[prefix] t b'. 3.34 + 3.35 + 3.36 + 3.37 + 3.38 + 3.39 File: yatexe, Node: Lpr format, Next: Controlling which command to invoke, Prev: Static region for typesetting, Up: %#notation 3.40 3.41 Lpr format 3.42 @@ -535,7 +560,7 @@ 3.43 3.44 3.45 3.46 -File: yatexe, Node: Section-type completion, Prev: Begin-type completion, Up: Completion 3.47 +File: yatexe, Node: Section-type completion, Next: Label Generation, Prev: Begin-type completion, Up: Completion 3.48 3.49 Section-type completion 3.50 ======================= 3.51 @@ -2314,60 +2339,61 @@ 3.52 Node: Calling previewer8016 3.53 Node: Printing out8377 3.54 Node: %#notation8669 3.55 -Node: Changing typesetter9040 3.56 -Node: Splitting input files9404 3.57 -Node: Static region for typesetting10833 3.58 -Node: Lpr format11962 3.59 -Node: Controlling which command to invoke13035 3.60 -Node: Editing %# notation13992 3.61 -Node: Completion14536 3.62 -Node: Begin-type completion15072 3.63 -Node: Section-type completion17926 3.64 -Node: view-sectioning20318 3.65 -Node: Label Generation21897 3.66 -Node: Large-type completion22797 3.67 -Node: Maketitle-type completion23443 3.68 -Node: Arbitrary completion23995 3.69 -Node: End completion24385 3.70 -Node: Accent completion24855 3.71 -Node: Image completion25472 3.72 -Node: Greek letters completion27727 3.73 -Node: Inserting parentheses28483 3.74 -Node: Local dictionaries28890 3.75 -Node: Commenting out29827 3.76 -Node: Cursor jump31286 3.77 -Node: Jump to corresponding object31577 3.78 -Node: Invoking image processor32977 3.79 -Node: Jump to main file34320 3.80 -Node: Jumping around the environment34686 3.81 -Node: Jumping to last completion position35104 3.82 -Node: Changing and Deleting35613 3.83 -Node: Changing LaTeX commands35994 3.84 -Node: Killing LaTeX commands37171 3.85 -Node: Filling38356 3.86 -Node: Updation of includeonly40211 3.87 -Node: What column41008 3.88 -Node: Intelligent newline42093 3.89 -Node: Usepackage checker43754 3.90 -Node: Online help44345 3.91 -Node: Browsing file hierarchy46020 3.92 -Node: Cooperation with other packages47757 3.93 -Node: Customizations48462 3.94 -Node: Lisp variables48758 3.95 -Node: All customizable variables49717 3.96 -Node: Sample definitions61682 3.97 -Node: Hook variables62195 3.98 -Node: Hook file62899 3.99 -Node: Add-in functions63238 3.100 -Node: How the add-in function works64076 3.101 -Node: Defining option-add-in66262 3.102 -Node: Defining argument-add-in66984 3.103 -Node: Defining enclosing-add-in67865 3.104 -Node: How the function is called68721 3.105 -Node: Useful functions for creating add-in69397 3.106 -Node: Contribution70807 3.107 -Node: Add-in generator71081 3.108 -Node: Etcetera76657 3.109 -Node: Copying77262 3.110 +Node: Changing typesetter9069 3.111 +Node: Splitting input files9433 3.112 +Node: Static region for typesetting10862 3.113 +Node: Special Filtering Region11991 3.114 +Node: Lpr format12723 3.115 +Node: Controlling which command to invoke13796 3.116 +Node: Editing %# notation14753 3.117 +Node: Completion15297 3.118 +Node: Begin-type completion15833 3.119 +Node: Section-type completion18687 3.120 +Node: view-sectioning21103 3.121 +Node: Label Generation22682 3.122 +Node: Large-type completion23582 3.123 +Node: Maketitle-type completion24228 3.124 +Node: Arbitrary completion24780 3.125 +Node: End completion25170 3.126 +Node: Accent completion25640 3.127 +Node: Image completion26257 3.128 +Node: Greek letters completion28512 3.129 +Node: Inserting parentheses29268 3.130 +Node: Local dictionaries29675 3.131 +Node: Commenting out30612 3.132 +Node: Cursor jump32071 3.133 +Node: Jump to corresponding object32362 3.134 +Node: Invoking image processor33762 3.135 +Node: Jump to main file35105 3.136 +Node: Jumping around the environment35471 3.137 +Node: Jumping to last completion position35889 3.138 +Node: Changing and Deleting36398 3.139 +Node: Changing LaTeX commands36779 3.140 +Node: Killing LaTeX commands37956 3.141 +Node: Filling39141 3.142 +Node: Updation of includeonly40996 3.143 +Node: What column41793 3.144 +Node: Intelligent newline42878 3.145 +Node: Usepackage checker44539 3.146 +Node: Online help45130 3.147 +Node: Browsing file hierarchy46805 3.148 +Node: Cooperation with other packages48542 3.149 +Node: Customizations49247 3.150 +Node: Lisp variables49543 3.151 +Node: All customizable variables50502 3.152 +Node: Sample definitions62467 3.153 +Node: Hook variables62980 3.154 +Node: Hook file63684 3.155 +Node: Add-in functions64023 3.156 +Node: How the add-in function works64861 3.157 +Node: Defining option-add-in67047 3.158 +Node: Defining argument-add-in67769 3.159 +Node: Defining enclosing-add-in68650 3.160 +Node: How the function is called69506 3.161 +Node: Useful functions for creating add-in70182 3.162 +Node: Contribution71592 3.163 +Node: Add-in generator71866 3.164 +Node: Etcetera77442 3.165 +Node: Copying78047 3.166 3.167 End tag table
4.1 --- a/docs/yatexe.tex Sun Dec 10 22:03:46 2017 +0900 4.2 +++ b/docs/yatexe.tex Tue Jul 31 08:22:31 2018 +0900 4.3 @@ -8,7 +8,7 @@ 4.4 4.5 @iftex 4.6 @c @syncodeindex fn cp 4.7 -@c Last modified Sat Sep 9 23:41:37 2017 on firestorm 4.8 +@c Last modified Sat Jan 6 23:42:24 2018 on firestorm 4.9 @syncodeindex vr cp 4.10 @end iftex 4.11 4.12 @@ -265,6 +265,7 @@ 4.13 * Changing typesetter:: 4.14 * Splitting input files:: 4.15 * Static region for typesetting:: 4.16 +* Special Filtering Region:: 4.17 * Lpr format:: 4.18 * Controlling which command to invoke:: 4.19 * Editing %# notation:: 4.20 @@ -377,6 +378,28 @@ 4.21 @code{%#BEGIN} alone at the middle of very long text. Do not forget to 4.22 erase @code{%#BEGIN} @code{%#END} pair. 4.23 4.24 +@node Special Filtering Region, Lpr format, Static region for typesetting, %#notation 4.25 +@section Special Filtering Region 4.26 + A region like below will be passed to external filter command. 4.27 +@example 4.28 +%#BEGIN FILTER{foo.pdf}{dot -T %t -o %o} 4.29 +\if0 4.30 +....blah blah blah... 4.31 +....blah blah blah... 4.32 +....blah blah blah... 4.33 +\fi 4.34 +%#END 4.35 +@end example 4.36 + 4.37 +In this case, typing @kbd{[prefix] t e} send three `blah' lines 4.38 +to "dot -T pdf -o foo.pdf" as standard-input. It is useful to 4.39 +have source of text-origin graphic generated by such tools as 4.40 +graphviz or blockdiag, in La@TeX{} source. This special form of region 4.41 +can be inserted via feeding @code{.dot} into environment completion by 4.42 +@kbd{[prefix] t b}. 4.43 + 4.44 + 4.45 + 4.46 @node Lpr format, Controlling which command to invoke, Static region for typesetting, %#notation 4.47 @comment node-name, next, previous, up 4.48 @section Lpr format 4.49 @@ -587,7 +610,7 @@ 4.50 begin-type completion to enclose text into a environment. 4.51 4.52 4.53 -@node Section-type completion, , Begin-type completion, Completion 4.54 +@node Section-type completion, Label Generation, Begin-type completion, Completion 4.55 @comment node-name, next, previous, up 4.56 @section Section-type completion 4.57 @cindex section-type completion
5.1 --- a/docs/yatexj Sun Dec 10 22:03:46 2017 +0900 5.2 +++ b/docs/yatexj Tue Jul 31 08:22:31 2018 +0900 5.3 @@ -21,7 +21,7 @@ 5.4 * Main features:: ȋ@\ 5.5 * Installation:: CXg[ 5.6 * Invocation:: vZXN 5.7 -* %#notation :: %#L@ 5.8 +* %#notation :: 5.9 * Completion:: ⊮ 5.10 * Local dictionary:: [J 5.11 * Commenting out:: RgAEg 5.12 @@ -326,9 +326,10 @@ 5.13 * Changing typesetter:: ^CvZbgpR}h̕ύX 5.14 * Splitting input files:: ̓t@C 5.15 * Fix region for typesetting:: ̈̌Œ 5.16 +* Special Filtering Region:: 5.17 * lpr format:: vgAEgR}hptH[}bg 5.18 * Controlling which command to invoke:: ̑̋NR}h 5.19 -* Editing %# notation:: %#L@̕ҏW 5.20 +* Editing %# notation:: 5.21 5.22 5.23 5.24 @@ -424,6 +425,33 @@ 5.25 Yɂ͏\ӉB 5.26 5.27 5.28 + 5.29 +File: yatexj, Node: Special Filtering Region, Next: lpr format, Prev: Fix region for typesetting, Up: %#notation 5.30 + 5.31 +OtB^ 5.32 +================ 5.33 + 5.34 +ƂAeLXgt@C摜悤ȃc[ɗ^\[X 5.35 +LaTeX\[Xɖߍ݁A̕c[̕W͂ɓnƂ 5.36 +ł܂B̂߂ɂ͈ȉ̂悤ȃ\[Xɏ܂B 5.37 + 5.38 + %#BEGIN FILTER{foo.pdf}{blockdiag -T %t -o %o} 5.39 + \if0 5.40 + --- 5.41 + ....blah blah blah... 5.42 + ....blah blah blah... 5.43 + ....blah blah blah... 5.44 + --- 5.45 + \fi 5.46 + %#END 5.47 + 5.48 +̗̈ `[prefix] t e' ^CvƁA̗łblaĥ3 5.49 +sOR}h `"blockdiag -T pdf -o foo.pdf"' ̕W͂ɓnA 5.50 +ʂƂ foo.pdf ܂B̓ʂȃubN`[prefix] tb' 5.51 +̊⊮ŁA`.blockdiag' ̂悤ȃsIhŎn܂͂ 5.52 +邱ƂŎIɑ}܂B 5.53 + 5.54 + 5.55 5.56 5.57 File: yatexj, Node: lpr format, Next: Controlling which command to invoke, Prev: Fix region for typesetting, Up: %#notation 5.58 @@ -2255,66 +2283,67 @@ 5.59 5.60 Tag table: 5.61 Node: Top257 5.62 -Node: Intro1311 5.63 -Node: Terminology1614 5.64 -Node: Main features2254 5.65 -Node: Installation3376 5.66 -Node: Invocation4636 5.67 -Node: Calling typesetter5512 5.68 -Node: Calling previewer6973 5.69 -Node: Print out7289 5.70 -Node: %#notation7555 5.71 -Node: Changing typesetter7983 5.72 -Node: Splitting input files8241 5.73 -Node: Fix region for typesetting9197 5.74 -Node: lpr format10105 5.75 -Node: Controlling which command to invoke10915 5.76 -Node: Editing %# notation11629 5.77 -Node: Completion12087 5.78 -Node: begin^⊮12498 5.79 -Node: section^⊮15247 5.80 -Node: 2ȏ̈Ƃ section^R}h16340 5.81 -Node: Enclose section-type command17156 5.82 -Node: Recursive completion17480 5.83 -Node: view-sectioning17785 5.84 -Node: label-generation18981 5.85 -Node: large^⊮19655 5.86 -Node: maketitle^⊮20189 5.87 -Node: Arbitrary completion20488 5.88 -Node: end⊮20801 5.89 -Node: Accent mark completion21142 5.90 -Node: Image completion21567 5.91 -Node: Greek letter completion23382 5.92 -Node: Inserting parens23866 5.93 -Node: Local dictionary24214 5.94 -Node: Commenting out24818 5.95 -Node: Cursor jump25978 5.96 -Node: ΉIuWFNgւ̃Wv26195 5.97 -Node: G`c[N27181 5.98 -Node: Ct@Cւ̃Wv28099 5.99 -Node: PʂƂWv28435 5.100 -Node: Ō̕⊮ʒuւ̃Wv28792 5.101 -Node: Modifying/Deleting29029 5.102 -Node: Changing LaTeX command29435 5.103 -Node: Killing LaTeX command29985 5.104 -Node: Filling30857 5.105 -Node: Includeonly32187 5.106 -Node: What column32748 5.107 -Node: Intelligent newline33528 5.108 -Node: Usepackage cheker34560 5.109 -Node: Changing mode of YaTeX34987 5.110 -Node: Online help35563 5.111 -Node: Inclusion hierarchy browser36540 5.112 -Node: Cooperation with other packages37818 5.113 -Node: Customizations38273 5.114 -Node: Lisp variables38570 5.115 -Node: All customizable variables39177 5.116 -Node: Sample definitions48157 5.117 -Node: Hook variables48591 5.118 -Node: Hook file49486 5.119 -Node: Add-in functions49692 5.120 -Node: Etc49919 5.121 -Node: Copying50204 5.122 -Node: Concept Index50828 5.123 +Node: Intro1290 5.124 +Node: Terminology1593 5.125 +Node: Main features2233 5.126 +Node: Installation3355 5.127 +Node: Invocation4615 5.128 +Node: Calling typesetter5491 5.129 +Node: Calling previewer6952 5.130 +Node: Print out7268 5.131 +Node: %#notation7534 5.132 +Node: Changing typesetter7975 5.133 +Node: Splitting input files8233 5.134 +Node: Fix region for typesetting9189 5.135 +Node: Special Filtering Region10096 5.136 +Node: lpr format10732 5.137 +Node: Controlling which command to invoke11542 5.138 +Node: Editing %# notation12256 5.139 +Node: Completion12714 5.140 +Node: begin^⊮13125 5.141 +Node: section^⊮15874 5.142 +Node: 2ȏ̈Ƃ section^R}h16967 5.143 +Node: Enclose section-type command17783 5.144 +Node: Recursive completion18107 5.145 +Node: view-sectioning18412 5.146 +Node: label-generation19608 5.147 +Node: large^⊮20282 5.148 +Node: maketitle^⊮20816 5.149 +Node: Arbitrary completion21115 5.150 +Node: end⊮21428 5.151 +Node: Accent mark completion21769 5.152 +Node: Image completion22194 5.153 +Node: Greek letter completion24009 5.154 +Node: Inserting parens24493 5.155 +Node: Local dictionary24841 5.156 +Node: Commenting out25445 5.157 +Node: Cursor jump26605 5.158 +Node: ΉIuWFNgւ̃Wv26822 5.159 +Node: G`c[N27808 5.160 +Node: Ct@Cւ̃Wv28726 5.161 +Node: PʂƂWv29062 5.162 +Node: Ō̕⊮ʒuւ̃Wv29419 5.163 +Node: Modifying/Deleting29656 5.164 +Node: Changing LaTeX command30062 5.165 +Node: Killing LaTeX command30612 5.166 +Node: Filling31484 5.167 +Node: Includeonly32814 5.168 +Node: What column33375 5.169 +Node: Intelligent newline34155 5.170 +Node: Usepackage cheker35187 5.171 +Node: Changing mode of YaTeX35614 5.172 +Node: Online help36190 5.173 +Node: Inclusion hierarchy browser37167 5.174 +Node: Cooperation with other packages38445 5.175 +Node: Customizations38900 5.176 +Node: Lisp variables39197 5.177 +Node: All customizable variables39804 5.178 +Node: Sample definitions48784 5.179 +Node: Hook variables49218 5.180 +Node: Hook file50113 5.181 +Node: Add-in functions50319 5.182 +Node: Etc50546 5.183 +Node: Copying50831 5.184 +Node: Concept Index51455 5.185 5.186 End tag table
6.1 --- a/docs/yatexj.tex Sun Dec 10 22:03:46 2017 +0900 6.2 +++ b/docs/yatexj.tex Tue Jul 31 08:22:31 2018 +0900 6.3 @@ -13,7 +13,7 @@ 6.4 @c m[h C-l C-u C-n S̃m[hXV C-l C-u C-e 6.5 @c j[₵ C-l C-u C-m S̃j[XV C-l C-u C-a 6.6 @c tH[}bgƂ C-l C-e C-b 6.7 -@c Last modified Sat Sep 9 23:43:04 2017 on firestorm 6.8 +@c Last modified Sat Jan 6 23:49:50 2018 on firestorm 6.9 @syncodeindex vr cp 6.10 @end iftex 6.11 6.12 @@ -35,7 +35,7 @@ 6.13 * Main features:: ȋ@\ 6.14 * Installation:: CXg[ 6.15 * Invocation:: vZXN 6.16 -* %#notation :: %#L@ 6.17 +* %#notation :: 6.18 * Completion:: ⊮ 6.19 * Local dictionary:: [J 6.20 * Commenting out:: RgAEg 6.21 @@ -357,9 +357,10 @@ 6.22 * Changing typesetter:: ^CvZbgpR}h̕ύX 6.23 * Splitting input files:: ̓t@C 6.24 * Fix region for typesetting:: ̈̌Œ 6.25 +* Special Filtering Region:: 6.26 * lpr format:: vgAEgR}hptH[}bg 6.27 * Controlling which command to invoke:: ̑̋NR}h 6.28 -* Editing %# notation:: %#L@̕ҏW 6.29 +* Editing %# notation:: 6.30 @end menu 6.31 6.32 @node Changing typesetter, Splitting input files, %#notation , %#notation 6.33 @@ -479,6 +480,31 @@ 6.34 ̏Yɂ͏\ӉB 6.35 @cindex t@C̕ҏW[Ȃӂ̂ւ䂤] 6.36 6.37 +@node Special Filtering Region, lpr format, Fix region for typesetting, %#notation 6.38 +@section OtB^ 6.39 + 6.40 +ƂAeLXgt@C摜悤ȃc[ɗ^\[X 6.41 +La@TeX{}\[Xɖߍ݁A̕c[̕W͂ɓnƂł 6.42 +܂B̂߂ɂ͈ȉ̂悤ȃ\[Xɏ܂B 6.43 + 6.44 +@example 6.45 +%#BEGIN FILTER{foo.pdf}{blockdiag -T %t -o %o} 6.46 +\if0 6.47 +--- 6.48 +....blah blah blah... 6.49 +....blah blah blah... 6.50 +....blah blah blah... 6.51 +--- 6.52 +\fi 6.53 +%#END 6.54 +@end example 6.55 + 6.56 +̗̈ @kbd{[prefix] t e} ^CvƁA̗łblaĥ3s 6.57 +OR}h @code{"blockdiag -T pdf -o foo.pdf"} ̕W͂ɓnA 6.58 +ʂƂ foo.pdf ܂B̓ʂȃubN 6.59 +@kbd{[prefix] tb} ̊⊮ŁA@code{.blockdiag} ̂悤ȃsIhŎn܂ 6.60 +͂邱ƂŎIɑ}܂B 6.61 + 6.62 @c @node Require, lpr format, Fix region for typesetting, %#notation 6.63 @comment node-name, next, previous, up 6.64 6.65 @@ -778,7 +804,7 @@ 6.66 }As͂J[\͎Iɒʂ̓Ɉړ܂B 6.67 6.68 @menu 6.69 -* 2ȏ̈Ƃ section^R}h:: 6.70 +* 2ȏ̈Ƃ section^R}h:: 6.71 * Enclose section-type command:: ⊮ 6.72 * Recursive completion:: ċA⊮ 6.73 * view-sectioning:: ZNṼAEgC\ 6.74 @@ -1261,11 +1287,11 @@ 6.75 6.76 6.77 @menu 6.78 -* ΉIuWFNgւ̃Wv:: 6.79 -* G`c[N:: 6.80 -* Ct@Cւ̃Wv:: 6.81 -* PʂƂWv:: 6.82 -* Ō̕⊮ʒuւ̃Wv:: 6.83 +* ΉIuWFNgւ̃Wv:: 6.84 +* G`c[N:: 6.85 +* Ct@Cւ̃Wv:: 6.86 +* PʂƂWv:: 6.87 +* Ō̕⊮ʒuւ̃Wv:: 6.88 @end menu 6.89 6.90 @node ΉIuWFNgւ̃Wv, G`c[N, Cursor jump, Cursor jump
7.1 --- a/help/YATEXHLP.jp Sun Dec 10 22:03:46 2017 +0900 7.2 +++ b/help/YATEXHLP.jp Tue Jul 31 08:22:31 2018 +0900 7.3 @@ -1805,6 +1805,95 @@ 7.4 \textbackslash 7.5 obNXbV̂ 7.6 7.7 +FILTER 7.8 +%#BEGIN FILTER{OUTPUT}{COMMANDLINE} ... %#END 7.9 +\if0 \fi ܂łɈ͂܂ꂽ̈A %#SRC{...} Ŏw肳ꂽt@C 7.10 +OvO COMMANDLINE ̕W͂ƂēnAOUTPUTt@C쐬B 7.11 + 7.12 +.blockdiag 7.13 +%#BEGIN FILTER{OUTPUT}{blockdiag -T %t -o %o -} ... %#END 7.14 +<refer FILTER> 7.15 + 7.16 +http://blockdiag.com/ja/ 7.17 +blockdiag ɂeLXgOt摜ϊpB 7.18 +LaTeX\[XɈȉ̂悤ɏĂ 7.19 + 7.20 +%#BEGIN FILTER{graph.png}{blockdiag -T %t -o %o -} 7.21 +\if0 7.22 +=== 7.23 +blockdiag { 7.24 + default_fontsize = 24; 7.25 + A -> B; 7.26 +} 7.27 +=== 7.28 +\fi 7.29 +%#END 7.30 + 7.31 +āABEGIN...END̗̈ [prefix] t e (^CvZbg)ĂԂ 7.32 +2 === ň͂܂ꂽ͂Ƃ 7.33 + 7.34 + blockdiag -T png -o graph.png - 7.35 + 7.36 +ĂA[ A ] -> [ B ] ̂悤ȃOt graph.png ɓB 7.37 +LaTeX{ \includegraphics Ή摜̃\[X{Ɠ 7.38 +t@CňꌳǗłB 7.39 + 7.40 +摜̃\[Xʃt@C(Ƃ src.diag)ɂꍇ͈ȉ̂悤ɂB 7.41 + 7.42 +%#BEGIN FILTER{graph.png}{blockdiag -T %t -o %o -} 7.43 +%#SRC{src.diag} 7.44 +%#END 7.45 + 7.46 + 7.47 +.nwdiag 7.48 +%#BEGIN FILTER{OUTPUT}{nwdiag -T %t -o %o -} ... %#END 7.49 +<refer .blockdiag> 7.50 + 7.51 +.seqdiag 7.52 +%#BEGIN FILTER{OUTPUT}{seqdiag -T %t -o %o -} ... %#END 7.53 +<refer .blockdiag> 7.54 + 7.55 +.actdiag 7.56 +%#BEGIN FILTER{OUTPUT}{actdiag -T %t -o %o -} ... %#END 7.57 +<refer .blockdiag> 7.58 + 7.59 +.rackdiag 7.60 +%#BEGIN FILTER{OUTPUT}{rackdiag -T %t -o %o -} ... %#END 7.61 +<refer .blockdiag> 7.62 + 7.63 +.dot 7.64 +%#BEGIN FILTER{OUTPUT}{dot -T %t -o %o} ... %#END 7.65 +<refer FILTER> 7.66 + 7.67 +http://www.graphviz.org/ 7.68 +https://ja.wikipedia.org/wiki/Graphviz 7.69 +Graphviz ɂeLXgOt摜ϊpB 7.70 +LaTeX\[XɈȉ̂悤ɏĂ 7.71 + 7.72 +%#BEGIN FILTER{graph.png}{dot -T %t -o %o} 7.73 +\if0 7.74 +=== 7.75 +digraph { 7.76 + graph [charset="utf-8"] 7.77 + A -> B 7.78 +} 7.79 +=== 7.80 +\fi 7.81 + 7.82 +āABEGIN...END̗̈ [prefix] t e (^CvZbg)ĂԂ 7.83 +2 === ň͂܂ꂽ͂Ƃ 7.84 + 7.85 + dot -T png -o graph.png 7.86 + 7.87 +ĂA 7.88 + 7.89 + [ A ] 7.90 + 7.91 + [ B ] 7.92 + 7.93 +̂悤ȃOt graph.png ɓB 7.94 + 7.95 + 7.96 LaiTeX 7.97 a Little Assistant Interface for TeX on Vz 7.98 炭Ȃ Vz ŎgĂ邱̃[hB
8.1 --- a/makefile Sun Dec 10 22:03:46 2017 +0900 8.2 +++ b/makefile Tue Jul 31 08:22:31 2018 +0900 8.3 @@ -49,10 +49,10 @@ 8.4 # make tag to add release tags 8.5 LISP = ${LISP18} ${LISP19} ${LISP23} 8.6 YAHTML = yahtml.el 8.7 -COMMON = yatexlib.el yatexprc.el 8.8 +COMMON = yatexlib.el yatexprc.el yatexhlp.el 8.9 LISP18 = yatex.el yatexadd.el yatexgen.el yatexenv.el \ 8.10 ${COMMON} \ 8.11 - yatexmth.el yatexhks.el yatexhlp.el \ 8.12 + yatexmth.el yatexhks.el yatexhlp.el yatexflt.el \ 8.13 yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML} 8.14 LISP19 = yatex19.el 8.15 LISP23 = yatex23.el 8.16 @@ -233,9 +233,8 @@ 8.17 8.18 8.19 RSYNCDIR = ${HOME}/http/yatex/rsync/yatex 8.20 -#sync: 8.21 -# @-mkdir ${PACKDIR} 8.22 -# @tar cf - ${PACK} | (cd ${PACKDIR}; tar xf -) 8.23 -# syncdir -A -x CVS ${PACKDIR} ${RSYNCDIR} 8.24 -# (cd ${RSYNCDIR}; cvs ci -m '') 8.25 -# rm -rf ${PACKDIR} 8.26 +sync: 8.27 + -hg push 8.28 + -hg push git 8.29 + -hg push cvs 8.30 + (cd ${RSYNCDIR} && hg up -Cv dev && cvs ci -m '')
9.1 --- a/manifest Sun Dec 10 22:03:46 2017 +0900 9.2 +++ b/manifest Tue Jul 31 08:22:31 2018 +0900 9.3 @@ -27,6 +27,7 @@ 9.4 yatex23.el Emacs-23ȍ~p̐ݒ 9.5 yatexadd.el t̒` 9.6 yatexenv.el LaTeX ˑ̊ 9.7 +yatexflt.el OtB^R}hƂ̘Ag 9.8 yatexgen.el 쒹pt쐬[h 9.9 yatexhie.el 쒹phLgKw\vO 9.10 yatexhks.el hook lߍނ߂Ɏg([Up)
10.1 --- a/yatex.el Sun Dec 10 22:03:46 2017 +0900 10.2 +++ b/yatex.el Tue Jul 31 08:22:31 2018 +0900 10.3 @@ -1,6 +1,6 @@ 10.4 ;;; yatex.el --- Yet Another tex-mode for emacs //쒹// -*- coding: sjis -*- 10.5 -;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org] 10.6 -;;; Last modified Sun Sep 17 10:22:43 2017 on firestorm 10.7 +;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] 10.8 +;;; Last modified Sat Jun 2 14:13:17 2018 on firestorm 10.9 ;;; $Id$ 10.10 ;;; The latest version of this software is always available at; 10.11 ;;; https://www.yatex.org/ 10.12 @@ -16,7 +16,7 @@ 10.13 10.14 ;;; Code: 10.15 (require 'yatexlib) 10.16 -(defconst YaTeX-revision-number "1.80.1" 10.17 +(defconst YaTeX-revision-number "1.80.3" 10.18 "Revision number of running yatex.el") 10.19 10.20 ;---------- Local variables ---------- 10.21 @@ -49,15 +49,21 @@ 10.22 10.23 (defvar tex-command 10.24 (cond 10.25 - (YaTeX-use-LaTeX2e "platex") 10.26 + (YaTeX-use-LaTeX2e "platex -kanji=%k") 10.27 (YaTeX-japan "jlatex") 10.28 (t "latex")) 10.29 "*Default command for typesetting LaTeX text. 10.30 -Overridden with `%#! CommandLine...' in the buffer.") 10.31 +Overridden with `%#! CommandLine...' in the buffer. 10.32 +`%'s followed by a character are replaced as follows: 10.33 +%f -> Parent(main) document file name 10.34 +%r -> %f without extension 10.35 +%k -> One of Kanji code mnemonic: euc, jis, sjis, utf8 10.36 +") 10.37 10.38 -(defvar bibtex-command (if YaTeX-japan "jbibtex" "bibtex") 10.39 +(defvar bibtex-command (if YaTeX-japan "pbibtex -kanji=%k" "bibtex") 10.40 "*Default command of BibTeX. 10.41 -Overridden with `%#BIBTEX CommandLine...' in the buffer.") 10.42 +Overridden with `%#BIBTEX CommandLine...' in the buffer. 10.43 +Pettern `%k' in a string will be replaced with Kanji-code mnemonic of ptex.") 10.44 10.45 (defvar dvi2-command ;previewer command for your site 10.46 (cond (YaTeX-dos "dviout -wait=0") 10.47 @@ -89,7 +95,14 @@ 10.48 (YaTeX-macos (cond 10.49 ((file-executable-p YaTeX-cmd-displayline) "open -a Skim") 10.50 (t "open"))) 10.51 - (t "evince")) 10.52 + ((YaTeX-executable-find "evince") "evince") 10.53 + ((YaTeX-executable-find "xreader") "xreader") 10.54 + ((YaTeX-executable-find "atril") "atril") 10.55 + ((YaTeX-executable-find "okular") "okular") 10.56 + ((YaTeX-executable-find "kpdf") "kpdf") 10.57 + ((YaTeX-executable-find "xpdf") "xpdf") 10.58 + ((YaTeX-executable-find "mupdf") "mupdf") 10.59 + (t "acroread")) 10.60 "*Default PDF viewer command including its option. 10.61 Overridden with `%#PDFVIEW CommandLine...' in the buffer.") 10.62 10.63 @@ -290,9 +303,10 @@ 10.64 ("author") ("thanks") ("documentstyle") ("pagestyle") ("thispagestyle") 10.65 ("title") ("underline") ("label") ("makebox") 10.66 ("footnote") ("footnotetext") ("index") 10.67 - ("hspace*") ("vspace*") ("bibliography") ("bibitem") ("cite") 10.68 + ("hspace*") ("vspace*") 10.69 + ("bibliography") ("bibliographystyle") ("bibitem") ("cite") 10.70 ("input") ("include") ("includeonly") ("mbox") ("hbox") ("caption") 10.71 - ("arabic") ("cetering") ("uline") 10.72 + ("arabic") ("centering") ("uline") 10.73 ("newcounter") 10.74 ("newlength") ("setlength" 2) ("addtolength" 2) ("settowidth" 2) 10.75 ("setcounter" 2) ("addtocounter" 2) ("stepcounter" 2) 10.76 @@ -323,6 +337,7 @@ 10.77 ("rotatebox" 2) ("resizebox" 3) ("reflectbox") 10.78 ("colorbox" 2) ("fcolorbox" 3) ("textcolor" 2) ("color") ("pagecolor") 10.79 ("includegraphics") ("includegraphics*") 10.80 + ("includesvg") 10.81 ("bou") ;defined in plext 10.82 ("url") ;defined in url 10.83 ("shadowbox") ("doublebox") ("ovalbox") ("Ovalbox") 10.84 @@ -369,6 +384,9 @@ 10.85 (append YaTeX-ams-math-begin-alist YaTeX-ams-math-gathering-alist) 10.86 "*Standard AMS-LaTeX(2e) environment completion table.") 10.87 10.88 +(defvar YaTeX-use-dot-env-extension t 10.89 + "*Use YaTeX's dot-env filter special environment.") 10.90 + 10.91 ; Set tex-environment possible completion 10.92 (defvar env-table 10.93 (append 10.94 @@ -392,7 +410,10 @@ 10.95 ("multicols") ;defined in multicol 10.96 ("breakbox"))) ;defined in eclbkbox 10.97 (if YaTeX-use-AMS-LaTeX YaTeX-ams-env-table) 10.98 - YaTeX-math-other-env-alist) 10.99 + YaTeX-math-other-env-alist 10.100 + (and YaTeX-use-dot-env-extension 10.101 + (require 'yatexflt) 10.102 + YaTeX-filter-special-env-alist)) 10.103 "Default completion table for begin-type completion.") 10.104 10.105 (defvar user-env-table nil) 10.106 @@ -608,7 +629,7 @@ 10.107 (defvar YaTeX-kanji-code nil 10.108 "*File kanji code used by Japanese TeX. 10.109 nil: Do not care (Preserve coding-system) 10.110 -0: no-converion (mule) 10.111 +0: no-conversion (mule) 10.112 1: Shift JIS 10.113 2: JIS 10.114 3: EUC 10.115 @@ -846,6 +867,9 @@ 10.116 ;;autoload from yatexpkg.el 10.117 (autoload 'YaTeX-package-auto-usepackage "yatexpkg" "Auto \\usepackage" t) 10.118 10.119 +;;autoload from yatexflt.el 10.120 +(autoload 'YaTeX-filter-goto-source "yatexflt" "Go to graphic source file" t) 10.121 + 10.122 ;;; 10.123 ;; YaTeX-mode functions 10.124 ;;; 10.125 @@ -913,7 +937,10 @@ 10.126 by completing read. 10.127 If you invoke this command with universal argument, 10.128 \(key binding for universal-argument is \\[universal-argument]\) 10.129 -you can put REGION into that environment between \\begin and \\end." 10.130 +you can put REGION into that environment between \\begin and \\end. 10.131 +If the environment name begins with `.'(dot), 10.132 +that environment will be treated as `special environment', which 10.133 +enables special feature such as text conversion." 10.134 (interactive "P") 10.135 (let* 10.136 ((region-p (or arg (YaTeX-region-active-p))) 10.137 @@ -921,13 +948,17 @@ 10.138 (env 10.139 (save-excursion ;for Emacs24 work-around to avoid point warp 10.140 (YaTeX-read-environment 10.141 - (format "Begin environment%s(default %s): " mode YaTeX-env-name))))) 10.142 + (format "Begin environment%s(default %s): " mode YaTeX-env-name)))) 10.143 + special) 10.144 (if (string= env "") 10.145 (setq env YaTeX-env-name)) 10.146 - (setq YaTeX-env-name env) 10.147 + (setq special (assoc env YaTeX-filter-special-env-alist) 10.148 + YaTeX-env-name env) 10.149 (YaTeX-update-table 10.150 (list YaTeX-env-name) 'env-table 'user-env-table 'tmp-env-table) 10.151 - (YaTeX-insert-begin-end YaTeX-env-name region-p))) 10.152 + (if special 10.153 + (YaTeX-insert-filter-special YaTeX-env-name (cdr special) region-p) 10.154 + (YaTeX-insert-begin-end YaTeX-env-name region-p)))) 10.155 10.156 (defun YaTeX-make-begin-end-region () 10.157 "Call YaTeX-make-begin-end with ARG to specify region mode." 10.158 @@ -1254,6 +1285,17 @@ 10.159 ((YaTeX-literal-p) ?\") 10.160 ((= (preceding-char) ?\\ ) ?\") 10.161 ;((= (preceding-char) ?\( ) ?\") 10.162 + ((save-excursion (beginning-of-line) 10.163 + (skip-chars-forward "\t ") 10.164 + (looking-at "%#")) 10.165 + ?\") 10.166 + ((let ((ovl (overlays-at (point)))) 10.167 + (and ovl 10.168 + (catch 'found 10.169 + (while ovl 10.170 + (if (overlay-get (car ovl) 'filter-input) (throw 'found t)) 10.171 + (setq ovl (cdr ovl)))))) 10.172 + ?\") 10.173 ((or (= (preceding-char) 32) 10.174 (= (preceding-char) 9) 10.175 (= (preceding-char) ?\n) 10.176 @@ -1913,8 +1955,9 @@ 10.177 10.178 (defun YaTeX-goto-corresponding-file (&optional other) 10.179 "Visit or switch buffer of corresponding file, 10.180 -looking at \\input or \\include or \\includeonly on current line." 10.181 - (if (not (YaTeX-on-includes-p)) nil 10.182 +looking at \\input or \\include or \\includeonly or %#SRC{} on current line." 10.183 + (cond 10.184 + ((YaTeX-on-includes-p) 10.185 (let ((parent buffer-file-name) input-file b) 10.186 (save-excursion 10.187 (if (and (re-search-forward "[{%]" (point-end-of-line) t) 10.188 @@ -1933,7 +1976,12 @@ 10.189 (t (YaTeX-switch-to-buffer input-file))) 10.190 (or (YaTeX-get-builtin "!") 10.191 YaTeX-parent-file 10.192 - (setq YaTeX-parent-file parent))))) 10.193 + (setq YaTeX-parent-file parent)))) 10.194 + ;; On %#SRC{somefilters.src} 10.195 + ((YaTeX-on-SRC-p) 10.196 + (let ((src (YaTeX-match-string 1))) 10.197 + (if other (YaTeX-switch-to-buffer-other-window src) 10.198 + (goto-buffer-window (find-file-noselect src))))))) 10.199 10.200 (defun YaTeX-goto-corresponding-BEGIN-END () 10.201 (if (not (YaTeX-on-BEGIN-END-p)) nil 10.202 @@ -1998,6 +2046,9 @@ 10.203 (cons YaTeX-cmd-edit-ai ".ai") 10.204 '("dia" . ".dia") 10.205 (cons YaTeX-cmd-ooo ".odg") 10.206 + (cons 'YaTeX-filter-goto-source ".diag") 10.207 + (cons 'YaTeX-filter-goto-source ".dot") 10.208 + ;; List of target file itself below... 10.209 (cons YaTeX-cmd-edit-images ".jpeg") 10.210 (cons YaTeX-cmd-edit-images ".jpg") 10.211 (cons YaTeX-cmd-edit-images ".png") 10.212 @@ -2228,6 +2279,13 @@ 10.213 (re-search-forward 10.214 "\\(%#BEGIN\\)\\|\\(%#END\\)" (point-end-of-line) t)))) 10.215 10.216 +(defun YaTeX-on-SRC-p () 10.217 + (save-excursion 10.218 + (let ((case-fold-search nil)) 10.219 + (beginning-of-line) 10.220 + (re-search-forward 10.221 + "%#SRC{\\([^}]+\\)}" (point-end-of-line) t)))) 10.222 + 10.223 (defun YaTeX-goto-corresponding-* (arg) 10.224 "Parse current line and call suitable function." 10.225 (interactive "P") 10.226 @@ -2252,12 +2310,7 @@ 10.227 (defun YaTeX-goto-corresponding-*-other-window (arg) 10.228 "Parse current line and call suitable function." 10.229 (interactive "P") 10.230 - (cond 10.231 - ((YaTeX-goto-corresponding-label arg t)) 10.232 - ;;((YaTeX-goto-corresponding-environment)) 10.233 - ((YaTeX-goto-corresponding-file t)) 10.234 - ;;((YaTeX-goto-corresponding-BEGIN-END)) 10.235 - (t (message "I don't know where to go.")))) 10.236 + (YaTeX-goto-corresponding-* t)) 10.237 10.238 (defun YaTeX-comment-region (alt-prefix) 10.239 "Comment out region by '%'.
11.1 --- a/yatex.new Sun Dec 10 22:03:46 2017 +0900 11.2 +++ b/yatex.new Tue Jul 31 08:22:31 2018 +0900 11.3 @@ -1,6 +1,11 @@ 11.4 What's new in YaTeX/yahtml 11.5 쒹/yahtml - eo[W̕ύX_ɂ 11.6 11.7 +1.81 emacs-26 ̎v̎dlύXɑΉB 11.8 + == yatex == 11.9 + ^CvZbgR}h` %k R[hɕϊ(-kanji=%k) 11.10 + hbgŊOtB^N@\ljB 11.11 + 11.12 1.80 string-to-intOƓ emacs-18 T|[gOɁB 11.13 2-Clause BSDłOKƂɏĂ݂B 11.14 RCSǗOB
12.1 --- a/yatexadd.el Sun Dec 10 22:03:46 2017 +0900 12.2 +++ b/yatexadd.el Tue Jul 31 08:22:31 2018 +0900 12.3 @@ -1,6 +1,6 @@ 12.4 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 12.5 -;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org] 12.6 -;;; Last modified Sun Sep 17 10:23:10 2017 on firestorm 12.7 +;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] 12.8 +;;; Last modified Wed May 30 13:35:42 2018 on firestorm 12.9 ;;; $Id$ 12.10 12.11 ;;; Code: 12.12 @@ -1296,7 +1296,7 @@ 12.13 (overlay-put 12.14 (setq ov (make-overlay b e)) 12.15 'face repface))) 12.16 - (switch-to-buffer buf) 12.17 + (set-window-buffer nil buf) ;Emacs26 12.18 (while t 12.19 (message qmsg new) 12.20 (setq ch (read-char)) 12.21 @@ -1519,6 +1519,23 @@ 12.22 12.23 (t nil))) 12.24 12.25 +(defvar YaTeX::bibliographystyle-alist-default 12.26 + '(("unsrt")("junsrt")("plain")("jplain")("alpha")("jalpha") 12.27 + ("abbrv")("jabbrv")("jipsj")("jname")("tieice")("tipsj") 12.28 + ("apalike")("ieeetr")("siam"))) 12.29 +(defvar YaTeX::bibliographystyle-alist-private 12.30 + nil 12.31 + "*Completion table for bibliographystyle") 12.32 + 12.33 +(defun YaTeX::bibliographystyle(argp) 12.34 + (cond 12.35 + ((= argp 1) 12.36 + (YaTeX-completing-read-or-skip 12.37 + "BibStyle: " 12.38 + (append YaTeX::bibliographystyle-alist-private 12.39 + YaTeX::bibliographystyle-alist-default) 12.40 + nil)))) 12.41 + 12.42 (defun YaTeX::bibitem (argp) 12.43 "Add-in function to insert argument of \\bibitem." 12.44 (YaTeX::label argp "label" "cite")) 12.45 @@ -1815,6 +1832,7 @@ 12.46 (setq file (substring file 0 (string-match "\\.tex$" file)))))))) 12.47 12.48 (fset 'YaTeX::input 'YaTeX::include) 12.49 +(fset 'YaTeX::svg 'YaTeX::include) 12.50 12.51 12.52 ;;; -------------------- LaTeX2e stuff --------------------
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/yatexflt.el Tue Jul 31 08:22:31 2018 +0900 13.3 @@ -0,0 +1,420 @@ 13.4 +;;; yatexflt.el --- YaTeX filter command utilizer -*- coding: sjis -*- 13.5 +;;; 13.6 +;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org] 13.7 +;;; Last modified Sat Jun 2 18:12:41 2018 on firestorm 13.8 +;;; $Id$ 13.9 + 13.10 +;;; Commentary: 13.11 +;;; 13.12 +;;; This lisp enables passing inline text to some external filter 13.13 +;;; command to generate files such as graphic files. 13.14 +;;; 13.15 +;;; Typical situation is using blockdiag/dot(graphviz) command to 13.16 +;;; generate png/pdf file. 13.17 +;;; 13.18 +;;; Example: 13.19 +;;; 13.20 +;;; [[LaTeX Source]] 13.21 +;;; %#BEGIN FILTER{foo.pdf}{dot -T %t -o o} 13.22 +;;; \if0 13.23 +;;; === 13.24 +;;; digraph { 13.25 +;;; A -> B; 13.26 +;;; B -> C; 13.27 +;;; } 13.28 +;;; === 13.29 +;;; \fi 13.30 +;;; %#END 13.31 +;;; \includegraphics{foo.pdf} 13.32 +;;; 13.33 +;;; In this case above, when you type `[prefix] t e' between two 13.34 +;;; `===' lines, the content in a region are fed to dot command as 13.35 +;;; follows: 13.36 +;;; 13.37 +;;; echo TEXT | dot -T pdf -o foo.pdf 13.38 +;;; 13.39 +;;; Then foo.pdf file will be generated and the image (as PNG) will 13.40 +;;; be displayed in the next window. 13.41 + 13.42 + 13.43 +;;; Code: 13.44 +(require 'yatexlib) 13.45 +(defvar YaTeX-filter-special-env-alist-default 13.46 + '((".blockdiag" 13.47 + "blockdiag -T %t -o %o -" 13.48 + "blockdiag { 13.49 + default_fontsize = 32; 13.50 + A -> B; 13.51 +}") 13.52 + (".seqdiag" "seqdiag -T %t -o %o -" 13.53 + "seqdiag { 13.54 + client -> server [label = \"SYN\"]; 13.55 + client <- server [label = \"SYN/ACK\"]; 13.56 + client -> server [label = \"ACK\"];}") 13.57 + (".actdiag" "actdiag -T %t -o %o -" 13.58 + "actdiag { 13.59 + sayHo -> ho -> hohoho 13.60 + lane dj { 13.61 + label = \"DJ\" 13.62 + sayHo [label = \"Say Ho\"]; hohoho [label = \"Ho Ho Ho!\"]; } 13.63 + lane mc { label = \"MC\"; ho [label = \"Hooooh!\"]}}") 13.64 + (".nwdiag" "nwdiag -T %t -o %o -" 13.65 + "nwdiag { 13.66 + network ext { 13.67 + address = \"10.1.2.0/24\" 13.68 + router [address = \"10.1.2.1\"] 13.69 + } 13.70 + network int { 13.71 + address = \"192.168.22.0/24\" 13.72 + router [address = \"192.168.22.1\"] 13.73 + websrv [address = \"192.168.22.80\"] 13.74 + cli-1; cli-2 13.75 + } 13.76 +}") 13.77 + (".rackdiag" "rackdiag -T %t -o %o -" 13.78 + "rackdiag { 13.79 + 16U; 13.80 + 1: UPS [4U]; 5: Storage [3U]; 8: PC [2U]; 8: PC [2U]; 13.81 +}") 13.82 + (".dot" 13.83 + "dot -T %t -o %o" 13.84 + "digraph { 13.85 + graph [charset=\"utf-8\"] 13.86 + A -> B 13.87 +}" 13.88 + ))) 13.89 + 13.90 +;;;###autoload 13.91 +(defun YaTeX-filter-goto-source (file other-win) 13.92 + "Go to corresponding text source of the graphic file" 13.93 + (cond 13.94 + ((file-exists-p file) 13.95 + (let ((buf (find-file-noselect file))) 13.96 + (funcall (cond (other-win 'YaTeX-switch-to-buffer-other-window) 13.97 + ((get-buffer-window buf) 'goto-buffer-window) 13.98 + (t 'YaTeX-switch-to-buffer)) 13.99 + buf))))) 13.100 + 13.101 +(defvar YaTeX-filter-special-env-alist-private nil) 13.102 +(defvar YaTeX-filter-special-env-alist 13.103 + (append YaTeX-filter-special-env-alist-private 13.104 + YaTeX-filter-special-env-alist-default)) 13.105 + 13.106 +(defun YaTeX-filter-filter-set-conversion-flag () 13.107 + (let ((ovl (get 'YaTeX-filter-filter-sentinel 'overlay))) 13.108 + (if ovl ;; When successful conversion met, 13.109 + (progn ;; (1)Set conversion complete flag 13.110 + (add-hook ;; (2)Add hook of seim-automatic 13.111 + 'write-file-hooks ;; update of convert to write- 13.112 + 'YaTeX-filter-update-all) ;; file hook. 13.113 + (overlay-put ovl 'converted t))))) 13.114 + 13.115 +(defun YaTeX-filter-filter-unset-conversion-flag 13.116 + (ovl after beg end &optional length) 13.117 + (if after (overlay-put ovl 'converted nil))) 13.118 + 13.119 + 13.120 +(defun YaTeX-filter-pngify-sentinel (proc msg) 13.121 + (save-excursion 13.122 + (let ((b (process-buffer proc)) (selw (selected-window)) 13.123 + img) 13.124 + (set-buffer b) 13.125 + (cond 13.126 + ((eq (process-status proc) 'run) 13.127 + (put-text-property (point-min) (point-max) 'invisible t)) 13.128 + ((eq (process-status proc) 'exit) 13.129 + (set-buffer b) 13.130 + (YaTeX-popup-image 13.131 + (YaTeX-buffer-substring 13.132 + (get 'YaTeX-filter-pngify-sentinel 'start) (point-max)) 13.133 + b) 13.134 + (YaTeX-filter-filter-set-conversion-flag)) 13.135 + (t 13.136 + (set-buffer b) 13.137 + (remove-text-properties (point-min) (point-max) '(invisible t)) 13.138 + (insert "\nProcess aborted %s\n" msg)))))) 13.139 + 13.140 +(defvar YaTeX-filter-pdf2png-stdout 13.141 + (cond 13.142 + ((YaTeX-executable-find "convert") "convert -trim %s PNG:-") 13.143 + (t 13.144 + "gs -dNOPAUSE -sDEVICE=png256 -sOutputFile=- -dBATCH -q -r75 %s")) 13.145 + "Command line syntax to convert PDF file to PNG stream") 13.146 + 13.147 +(defun YaTeX-filter-modified-BEGEND-regions () 13.148 + "Return the list of overlays which contains un-converted text." 13.149 + (save-excursion 13.150 + (save-restriction 13.151 + (widen) 13.152 + (let (r prop dest src pl (list (overlays-in (point-min) (point-max)))) 13.153 + (while list 13.154 + (setq prop (overlay-properties (car list))) 13.155 + (if (setq dest (plist-get prop 'filter-output)) 13.156 + (if (if (setq src (plist-get prop 'filter-source)) 13.157 + (file-newer-than-file-p src dest) 13.158 + (and (setq pl (plist-member prop 'converted)) 13.159 + (not (plist-get pl 'converted)))) 13.160 + (setq r (cons (car list) r)))) 13.161 + (setq list (cdr list))) 13.162 + (nconc r) 13.163 + r)))) 13.164 + 13.165 +(defun YaTeX-filter-update-all () 13.166 + "Update all destination files from built-in source text." 13.167 + (interactive) 13.168 + (let ((timeout 4) 13.169 + ans ovl (update-list (YaTeX-filter-modified-BEGEND-regions))) 13.170 + (if update-list 13.171 + (save-excursion 13.172 + (save-window-excursion 13.173 + (catch 'abort 13.174 + (while update-list 13.175 + (goto-char (overlay-start (setq ovl (car update-list)))) 13.176 + (or (pos-visible-in-window-p) 13.177 + (set-window-start nil (point))) 13.178 + (unwind-protect 13.179 + (progn 13.180 + (overlay-put ovl 'face 'YaTeX-on-the-fly-activated-face) 13.181 + (message "Non-update source found: Update here: %s " 13.182 + "Y)es N)o S)top-watching-Here A)bort") 13.183 + (setq ans (read-char)) 13.184 + (cond 13.185 + ((memq ans '(?Y ?y)) 13.186 + (YaTeX-filter-BEGEND) 13.187 + (while (and (> (setq timeout (1- timeout))) 13.188 + (eq (process-status "Filter") 'run)) 13.189 + (message "Waiting for conversion process to finish") 13.190 + (sit-for 1))) 13.191 + ((memq ans '(?A ?a)) (throw 'abort t)) 13.192 + ((memq ans '(?S ?s)) (delete-overlay ovl)) 13.193 + (t nil))) 13.194 + (overlay-put ovl 'face nil)) 13.195 + (setq update-list (cdr update-list))))))) 13.196 + ;; Write file hook should return nil 13.197 + nil)) 13.198 + 13.199 +(defun YaTeX-filter-filter-sentinel (proc msg) 13.200 + (put 'YaTeX-filter-pngify-sentinel 'start nil) 13.201 + (let ((b (process-buffer proc)) 13.202 + (imagefile (get 'YaTeX-filter-filter-sentinel 'outfile)) 13.203 + ovl 13.204 + (selw (selected-window))) 13.205 + (save-excursion 13.206 + (cond 13.207 + ((eq (process-status proc) 'run)) 13.208 + ((eq (process-status proc) 'exit) 13.209 + (set-buffer b) 13.210 + (remove-images (point-min) (point-max)) 13.211 + (if (and (file-regular-p imagefile) 13.212 + (file-readable-p imagefile)) 13.213 + (save-excursion 13.214 + (setq buffer-read-only nil) 13.215 + (cond 13.216 + ((string-match "\\.\\(jpg\\|png\\)" imagefile) 13.217 + (erase-buffer) 13.218 + (YaTeX-popup-image imagefile b) 13.219 + (YaTeX-filter-filter-set-conversion-flag)) 13.220 + (t ;Convert again to PNG file 13.221 + (goto-char (point-max)) 13.222 + (insert "\nConvert Again to PNG file...\n") 13.223 + (put 'YaTeX-filter-pngify-sentinel 'start (point)) 13.224 + (set-process-sentinel 13.225 + (start-process 13.226 + "Filter" b ;Safe to reuse 13.227 + shell-file-name YaTeX-shell-command-option 13.228 + (format YaTeX-filter-pdf2png-stdout imagefile)) 13.229 + 'YaTeX-filter-pngify-sentinel) 13.230 + (set-buffer-multibyte nil) 13.231 + )) 13.232 + (select-window selw))) 13.233 + (YaTeX-preview-image-mode) 13.234 + ) 13.235 + (t ;Other status might be an error 13.236 + (set-buffer b) 13.237 + (goto-char (point-max)) 13.238 + (insert (format "%s\n" (process-status proc)))))))) 13.239 + 13.240 +(defvar YaTeX-filter-block-marker "===" 13.241 + "Begining and Ending marker for contents for external filter program") 13.242 +(defvar YaTeX-filter-src "#SRC" 13.243 + "Keyword for input filename for external filter program") 13.244 + 13.245 +(defun YaTeX-filter-parse-filter-region (begend-info) 13.246 + "Return the list of SpecialFilter region. If not on, return nil. 13.247 +BEGEND-INFO is a value from the function YaTeX-in-BEGEND-p. 13.248 +Return the alist of: 13.249 +'((outfile $OutPutFileName) 13.250 + (source $InputFileName) ; or nil for embeded data source 13.251 + (cmdline $CommandLine) 13.252 + (begin $TextRegionBeginning) 13.253 + (end TextRegionEnd))" 13.254 + (if begend-info 13.255 + (let ((b (car begend-info)) (e (nth 1 begend-info)) 13.256 + delim (args (nth 2 begend-info)) 13.257 + (p (point)) openb closeb outfile source cmdline point-beg point-end 13.258 + (src-ptn (format "^\\s *%s%s" 13.259 + (regexp-quote comment-start) 13.260 + (regexp-quote YaTeX-filter-src)))) 13.261 + (save-excursion 13.262 + (and 13.263 + (string-match "FILTER" args) ;easy test 13.264 + (goto-char (car begend-info)) 13.265 + (re-search-forward 13.266 + "FILTER\\s *{\\([^}]+\\)}" e t) 13.267 + (setq outfile (YaTeX-match-string 1)) 13.268 + (goto-char (match-end 0)) 13.269 + (prog2 ;Step into the second brace 13.270 + (skip-chars-forward "\t ") 13.271 + (looking-at "{") ;Check if 2nd brace surely exists 13.272 + (skip-chars-forward "{") 13.273 + (skip-chars-forward "\t")) 13.274 + (setq openb (point)) 13.275 + (condition-case nil 13.276 + (progn (up-list 1) t) 13.277 + (error nil)) 13.278 + (setq closeb (1- (point)) 13.279 + cmdline (YaTeX-buffer-substring openb closeb)) 13.280 + (cond 13.281 + ((re-search-forward "^\\\\if0\\>" p t) ;; Embedded source 13.282 + (forward-line 1) 13.283 + (setq point-beg (if (looking-at YaTeX-filter-block-marker) 13.284 + (progn (setq delim (YaTeX-match-string 0)) 13.285 + (forward-line 1) 13.286 + (point)) 13.287 + (point))) 13.288 + (re-search-forward "^\\\\fi\\>" e t) 13.289 + (goto-char (match-beginning 0)) 13.290 + (setq point-end (if delim 13.291 + (progn 13.292 + (re-search-backward 13.293 + (concat "^" (regexp-quote delim)) 13.294 + (1+ point-beg) t) 13.295 + (match-beginning 0)) 13.296 + (point)))) 13.297 + ((re-search-forward 13.298 + (format "%s{\\(.*\\)}" src-ptn) e t) ; external file 13.299 + (setq source (YaTeX-match-string 1) 13.300 + point-beg (match-beginning 0) 13.301 + point-end (match-end 0))) 13.302 + (t ;; If source notation not found, 13.303 + (let ((ovl (overlays-in b e))) ;; clear all remaining overlays 13.304 + (while ovl 13.305 + (delete-overlay (car ovl)) 13.306 + (setq ovl (cdr ovl)))))) ;; Return nil 13.307 + 13.308 + ;; Then return all values 13.309 + (list (cons 'outfile outfile) 13.310 + (cons 'source source) 13.311 + (cons 'cmdline cmdline) 13.312 + (cons 'begin point-beg) 13.313 + (cons 'end point-end))))))) 13.314 + 13.315 +;;debug;; (YaTeX-filter-parse-filter-region (YaTeX-in-BEGEND-p)) 13.316 +(defun YaTeX-filter-pass-to-filter (begend-info) 13.317 + "Pass current BEGIN FILTER environment to external command." 13.318 + (put 'YaTeX-filter-filter-sentinel 'outfile nil) 13.319 + ;; begend-info is from YaTeX-in-BEGEND-p: (BEG END ARGS) 13.320 + (let ((b (car begend-info)) (e (nth 1 begend-info)) 13.321 + (r (YaTeX-filter-parse-filter-region begend-info)) 13.322 + insmark) 13.323 + (save-excursion 13.324 + (if r (let*((case-fold-search t) 13.325 + (outfile (cdr (assq 'outfile r))) 13.326 + (source (cdr (assq 'source r))) 13.327 + (type (cond 13.328 + ((string-match "\\.png$" outfile) "png") 13.329 + ((string-match "\\.svg$" outfile) "svg") 13.330 + ((string-match "\\.tex$" outfile) "tex") 13.331 + (t "pdf"))) 13.332 + (newcmdline (YaTeX-replace-formats 13.333 + (cdr (assq 'cmdline r)) 13.334 + (list (cons "t" type) 13.335 + (cons "o" outfile) 13.336 + (cons "i" source)))) 13.337 + (text-start (cdr (assq 'begin r))) 13.338 + (text-end (cdr (assq 'end r))) 13.339 + (text (and (numberp text-start) 13.340 + (numberp text-end) 13.341 + (YaTeX-buffer-substring text-start text-end))) 13.342 + ;; 13.343 + ;; Now it's time to start filter process 13.344 + ;; 13.345 + (procbuf (YaTeX-system newcmdline "Filter" 'force)) 13.346 + (proc (get-buffer-process procbuf)) 13.347 + ;;(procbuf (get-buffer-create " *Filter*")) 13.348 + (ovl (progn 13.349 + (remove-overlays text-start text-end) 13.350 + (make-overlay text-start text-end))) 13.351 + (ovlmodhook ;hook function to reset conv-success flag 13.352 + 'YaTeX-filter-filter-unset-conversion-flag)) 13.353 + (if proc 13.354 + (progn 13.355 + (overlay-put ovl 'filter-output outfile) 13.356 + (overlay-put ovl 'filter-source source) 13.357 + (overlay-put ovl 'converted nil) 13.358 + (overlay-put ovl 'modification-hooks (list ovlmodhook)) 13.359 + (set-process-coding-system proc 'undecided 'utf-8) 13.360 + (set-process-sentinel proc 'YaTeX-filter-filter-sentinel) 13.361 + (YaTeX-showup-buffer procbuf) 13.362 + (set-buffer procbuf) 13.363 + (setq buffer-read-only nil) 13.364 + (erase-buffer) 13.365 + (insert (format "Starting process `%s'...\n" newcmdline)) 13.366 + (set-marker (process-mark proc) (point-max)) 13.367 + (setq insmark (point-max)) 13.368 + (cond 13.369 + (text 13.370 + (process-send-string 13.371 + proc 13.372 + (if source 13.373 + (progn 13.374 + (insert-file-contents-literally source) 13.375 + (YaTeX-buffer-substring insmark (point-max))) 13.376 + text)) 13.377 + (process-send-string proc "\n") 13.378 + (process-send-eof proc) ;Notify stream chunk end 13.379 + (process-send-eof proc))) ;Notify real EOF 13.380 + (put 'YaTeX-filter-filter-sentinel 'outfile outfile) 13.381 + (put 'YaTeX-filter-filter-sentinel 'overlay ovl)))))))) 13.382 + 13.383 +(defun YaTeX-insert-filter-special (filter list &optional region-p) 13.384 + (let*((f (YaTeX-read-string-or-skip 13.385 + "Output file(Maybe *.(pdf|png|jpg|tex)): ")) 13.386 + (insert-default-directory) 13.387 + (cmdargs (car list)) 13.388 + (template-text (car (cdr list))) 13.389 + (ifile (read-file-name "Data source(Default: in this buffer): " nil)) 13.390 + (in-line (string= "" ifile))) 13.391 + (if region-p 13.392 + (if (< (point) (mark)) (exchange-point-and-mark))) 13.393 + (save-excursion 13.394 + (insert (if in-line "===\n\\fi\n" "") 13.395 + "%#END\n" 13.396 + (cond 13.397 + ((string-match "\\.tex$" f) 13.398 + (format "\\input{%s}\n" (substring f 0 (match-beginning 0)))) 13.399 + ((string-match "\\.\\(pdf\\|png\\|jpe?g\\|tiff?\\)$" f) 13.400 + (format "%%# \\includegraphics{%s}\n" f))))) 13.401 + (and region-p (exchange-point-and-mark)) 13.402 + (insert (format "%%#BEGIN FILTER{%s}{%s}\n%s%s" 13.403 + f (or cmdargs "") 13.404 + (format "%%#%% If you call program in yatex, type `%se'\n" 13.405 + (key-description 13.406 + (car (where-is-internal 'YaTeX-typeset-menu)))) 13.407 + (if in-line "\\if0\n===\n" ""))) 13.408 + (save-excursion 13.409 + (insert 13.410 + (if in-line 13.411 + (cond (template-text 13.412 + (concat template-text 13.413 + (or (string-match "\n$" template-text) "\n"))) 13.414 + (t "\n")) 13.415 + (format "%%#SRC{%s}\n" ifile)))))) 13.416 + 13.417 +(provide 'yatexflt) 13.418 + 13.419 +; Local variables: 13.420 +; fill-prefix: ";;; " 13.421 +; paragraph-start: "^$\\|\\|;;;$" 13.422 +; paragraph-separate: "^$\\|\\|;;;$" 13.423 +; End:
14.1 --- a/yatexhlp.el Sun Dec 10 22:03:46 2017 +0900 14.2 +++ b/yatexhlp.el Tue Jul 31 08:22:31 2018 +0900 14.3 @@ -1,7 +1,7 @@ 14.4 ;;; yatexhlp.el --- YaTeX helper for LaTeX -*- coding: sjis -*- 14.5 ;;; 14.6 -;;; (c)1994,1998,2004,2014,2015 by HIROSE Yuuji.[yuuji@yatex.org] 14.7 -;;; Last modified Sun Sep 17 10:23:19 2017 on firestorm 14.8 +;;; (c)1994,1998,2004,2014,2015,2018 by HIROSE Yuuji.[yuuji@yatex.org] 14.9 +;;; Last modified Sat Jun 2 16:45:45 2018 on firestorm 14.10 ;;; $Id$ 14.11 14.12 ;;; Code: 14.13 @@ -302,9 +302,11 @@ 14.14 (message "No matches found."))) 14.15 14.16 ;;;###autoload 14.17 -(defun YaTeX-help (&optional macro) 14.18 +(defun YaTeX-help (&optional macro ref-only) 14.19 "Show help buffer of LaTeX/TeX commands or macros. 14.20 -Optional argument MACRO, if supplied, is directly selected to keyword." 14.21 +Optional argument MACRO, if supplied, is directly selected to keyword. 14.22 +Non-nil for optional second argument REF-ONLY inhibits call enrich-help 14.23 +for non-interactive use." 14.24 (interactive) 14.25 (let (p beg end command) 14.26 (save-excursion 14.27 @@ -341,4 +343,5 @@ 14.28 (setq YaTeX-help-saved-config (current-window-configuration)) 14.29 (or (YaTeX-refer-help command YaTeX-help-file) 14.30 (YaTeX-refer-help command YaTeX-help-file-private) 14.31 + ref-only 14.32 (YaTeX-enrich-help command))))
15.1 --- a/yatexlib.el Sun Dec 10 22:03:46 2017 +0900 15.2 +++ b/yatexlib.el Tue Jul 31 08:22:31 2018 +0900 15.3 @@ -1,7 +1,7 @@ 15.4 ;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis -*- 15.5 ;;; 15.6 -;;; (c)1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 15.7 -;;; Last modified Sun Sep 17 10:23:31 2017 on firestorm 15.8 +;;; (c)1994-2018 by HIROSE Yuuji.[yuuji@yatex.org] 15.9 +;;; Last modified Wed May 23 07:59:08 2018 on firestorm 15.10 ;;; $Id$ 15.11 15.12 ;;; Code: 15.13 @@ -121,6 +121,25 @@ 15.14 15.15 ;---------- Define default key bindings on YaTeX mode map ---------- 15.16 ;;;###autoload 15.17 +(defun YaTeX-kanji-ptex-mnemonic () 15.18 + "Return the kanji-mnemonic of pTeX from current buffer's coding-system." 15.19 + (if (boundp 'NEMACS) 15.20 + (or (cdr-safe (assq kanji-fileio-code 15.21 + '((1 . "sjis") (2 . "jis") (3 . "euc")))) 15.22 + "") 15.23 + (let ((coding 15.24 + (cond 15.25 + ((boundp 'buffer-file-coding-system) 15.26 + (symbol-name buffer-file-coding-system)) 15.27 + ((boundp 'file-coding-system) (symbol-name file-coding-system)))) 15.28 + (case-fold-search t)) 15.29 + (cond ((string-match "utf-8\\>" coding) "utf8") 15.30 + ((string-match "shift.jis\\|cp932\\>" coding) "sjis") 15.31 + ((string-match "junet\\|iso.2022" coding) "jis") 15.32 + ((string-match "euc.jp\\|ja.*iso.8bit" coding) "euc") 15.33 + (t ""))))) 15.34 + 15.35 +;;;###autoload 15.36 (defun YaTeX-define-key (key binding &optional map) 15.37 "Define key on YaTeX-prefix-map." 15.38 (if YaTeX-inhibit-prefix-letter 15.39 @@ -1205,6 +1224,23 @@ 15.40 ;;(if (eobp) nil (forward-char 1)) ;OUT 2015/1/5 15.41 )))) 15.42 15.43 +(defun YaTeX-in-BEGEND-p (&optional pt) 15.44 + "Check if the point (or PT) is in a %#BEGIN...%#END region. 15.45 +Return the list of beginning and ending point of the region and arg-string 15.46 +if the point is in BEGEND. Otherwise nil." 15.47 + (let ((b "%#BEGIN") bp args (e "%#END") (p (point))) 15.48 + (save-excursion 15.49 + (save-match-data ;emacs-19+ yatex1.80+ 15.50 + (and (re-search-backward b nil t) 15.51 + (progn 15.52 + (setq bp (match-beginning 0)) 15.53 + (goto-char (match-end 0)) ;Start to get args of %#BEGIN 15.54 + (skip-chars-forward " \t") 15.55 + (setq args (YaTeX-buffer-substring (point) (point-end-of-line)))) 15.56 + (re-search-forward e nil t) 15.57 + (> (point) p) 15.58 + (list bp (match-end 0) args)))))) 15.59 + 15.60 (defun YaTeX-kill-buffer (buffer) 15.61 "Make effort to show parent buffer after kill." 15.62 (interactive "bKill buffer: ")
16.1 --- a/yatexmth.el Sun Dec 10 22:03:46 2017 +0900 16.2 +++ b/yatexmth.el Tue Jul 31 08:22:31 2018 +0900 16.3 @@ -1,7 +1,7 @@ 16.4 ;;; yatexmth.el --- YaTeX math-mode-specific functions -*- coding: sjis -*- 16.5 ;;; 16.6 ;;; (c)1993-2017 by HIROSE Yuuji [yuuji@yatex.org] 16.7 -;;; Last modified Sun Sep 17 10:23:45 2017 on firestorm 16.8 +;;; Last modified Sat Feb 24 16:40:22 2018 on firestorm 16.9 ;;; $Id$ 16.10 16.11 ;;; Commentary: 16.12 @@ -985,9 +985,9 @@ 16.13 (t 16.14 (setq size nil lr nil))) 16.15 (while (not newsize) 16.16 - (message (format (concat "Change from %s: " 16.17 + (message (concat "Change from %s: " 16.18 "l(big) L(Big) h(bigg) H(Bigg) " 16.19 - "r(left-right) n(NONE) ( { [") size)) 16.20 + "r(left-right) n(NONE) ( { [") size) 16.21 (setq char (read-char) 16.22 newsize (cond ((char-equal char ?l) "\\big") 16.23 ((char-equal char ?L) "\\Big")
17.1 --- a/yatexpkg.el Sun Dec 10 22:03:46 2017 +0900 17.2 +++ b/yatexpkg.el Tue Jul 31 08:22:31 2018 +0900 17.3 @@ -1,7 +1,7 @@ 17.4 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 17.5 ;;; 17.6 -;;; (c)2003-2017 by HIROSE, Yuuji [yuuji@yatex.org] 17.7 -;;; Last modified Sun Sep 17 10:22:13 2017 on firestorm 17.8 +;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] 17.9 +;;; Last modified Fri Jan 5 00:22:46 2018 on firestorm 17.10 ;;; $Id$ 17.11 17.12 ;;; Code: 17.13 @@ -41,6 +41,7 @@ 17.14 ("graphicx" (section "includegraphics" 17.15 "rotatebox" "scalebox" "resizebox" "reflectbox") 17.16 (option . YaTeX-package-graphics-driver-alist)) 17.17 + ("svg" (section "includesvg")) 17.18 ("color" (section "textcolor" "colorbox" "pagecolor" "color") 17.19 (option . YaTeX-package-graphics-driver-alist) 17.20 (default-option . "usenames,dvipsnames"))
18.1 --- a/yatexprc.el Sun Dec 10 22:03:46 2017 +0900 18.2 +++ b/yatexprc.el Tue Jul 31 08:22:31 2018 +0900 18.3 @@ -1,7 +1,7 @@ 18.4 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 18.5 ;;; 18.6 -;;; (c)1993-2017 by HIROSE Yuuji.[yuuji@yatex.org] 18.7 -;;; Last modified Mon Oct 30 21:00:21 2017 on firestorm 18.8 +;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org] 18.9 +;;; Last modified Wed May 30 08:32:30 2018 on firestorm 18.10 ;;; $Id$ 18.11 18.12 ;;; Code: 18.13 @@ -115,7 +115,7 @@ 18.14 (cons YaTeX-typeset-process bibcmd) 18.15 (delq (assq YaTeX-typeset-process bcprop) bcprop))) 18.16 (put 'YaTeX-typeset-process 'bibcmd bcprop))))) 18.17 - (message (format "Calling `%s'..." command)) 18.18 + (message "Calling `%s'..." command) 18.19 (setq YaTeX-current-TeX-buffer (buffer-name)) 18.20 (use-local-map map) ;map may be localized 18.21 (set-syntax-table YaTeX-typeset-buffer-syntax) 18.22 @@ -353,7 +353,7 @@ 18.23 reg-begin reg-end lineinfo) 18.24 (setq ppcmd (if (stringp pp) (concat pp " " texputroot) pp)) 18.25 (save-excursion 18.26 - (if (search-backward "%#BEGIN" nil t) 18.27 + (if (re-search-backward "%#BEGIN\\s *$" nil t) 18.28 (progn 18.29 (setq typeout "--- Region from BEGIN to " 18.30 end "the end of the buffer ---" 18.31 @@ -445,10 +445,13 @@ 18.32 (list 18.33 "pdfcrop --clip %b.pdf tmp.pdf" 18.34 (if (YaTeX-executable-find "convert") 18.35 - "convert -density %d tmp.pdf %b.%f" 18.36 + "convert -alpha off -density %d tmp.pdf %b.%f" 18.37 ;; If we use sips, specify jpeg as format 18.38 "sips -s format jpeg -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.jpg") 18.39 - "rm -f tmp.pdf"))) 18.40 + "rm -f tmp.pdf")) 18.41 + ((YaTeX-executable-find "convert") 18.42 + (list "convert -trim -alpha off -density %d %b.pdf %b.%f")) 18.43 + ) 18.44 "*Pipe line of command as a list to create image file from PDF. 18.45 See also doc-string of YaTeX-typeset-dvi2image-chain.") 18.46 18.47 @@ -458,6 +461,10 @@ 18.48 (list 18.49 (format "%s -E -o %%b.eps %%b.dvi" YaTeX-cmd-dvips) 18.50 "convert -alpha off -density %d %b.eps %b.%f")) 18.51 + ((YaTeX-executable-find YaTeX-dvipdf-command) 18.52 + (list 18.53 + (format "%s %%b.dvi" YaTeX-dvipdf-command) 18.54 + "convert -trim -alpha off -density %d %b.pdf %b.%f")) 18.55 ((and (equal YaTeX-use-image-preview "png") 18.56 (YaTeX-executable-find "dvipng")) 18.57 (list "dvipng %b.dvi"))) 18.58 @@ -475,6 +482,38 @@ 18.59 The value is generated from YaTeX-typeset-pdf2image-chain and 18.60 YaTeX-typeset-dvi2image-chain.") 18.61 18.62 +(defun YaTeX-popup-image (imagesrc buffer &optional func) 18.63 + (let ((sw (selected-window)) image 18.64 + (data-p (and (> (length imagesrc) 128) 18.65 + (not (file-readable-p imagesrc))))) 18.66 + (save-excursion 18.67 + (cond 18.68 + ((featurep 'image) window-system 18.69 + (YaTeX-showup-buffer ;showup and select 18.70 + (get-buffer-create buffer) 18.71 + (or func 'YaTeX-showup-buffer-bottom-most) 18.72 + t) 18.73 + (remove-images (point-min) (point-max)) 18.74 + (erase-buffer) 18.75 + (if data-p 18.76 + (insert-image 18.77 + (setq image (create-image imagesrc nil data-p))) 18.78 + ;; create-image does not re-create img-object for the same file 18.79 + (insert-image-file (expand-file-name imagesrc)) 18.80 + (setq image (plist-get (text-properties-at (point)) 'intangible))) 18.81 + (YaTeX-preview-image-mode) 18.82 + (let ((height (1+ (cdr (image-size image))))) 18.83 + (enlarge-window 18.84 + (- (ceiling (min height (/ (frame-height) 2))) 18.85 + (window-height)))) 18.86 + (select-window sw)) 18.87 + (t ;; Without direct image, display image with image viewer 18.88 + (YaTeX-system 18.89 + (format "%s %s" YaTeX-cmd-view-images target) 18.90 + "YaTeX-region-image" 18.91 + 'noask))) 18.92 + ))) 18.93 + 18.94 (defvar YaTeX-typeset-conv2image-process nil "Process of conv2image chain") 18.95 (defun YaTeX-typeset-conv2image-chain () 18.96 (let*((proc (or YaTeX-typeset-process YaTeX-typeset-conv2image-process)) 18.97 @@ -528,39 +567,11 @@ 18.98 'YaTeX-typeset-conv2image-chain) 18.99 (get 'YaTeX-typeset-process 'ppcmd)))) 18.100 ;; After all chain executed, display image in current window 18.101 - (cond 18.102 - ((and (featurep 'image) window-system) 18.103 - ;; If direct image displaying available in running Emacs, 18.104 - ;; display target image into the next window in Emacs. 18.105 - (select-window w) 18.106 - ;(setq foo (selected-window)) 18.107 - (YaTeX-showup-buffer 18.108 - (get-buffer-create " *YaTeX-region-image*") 18.109 - 'YaTeX-showup-buffer-bottom-most t) 18.110 - (remove-images (point-min) (point-max)) 18.111 - (erase-buffer) 18.112 - (cd pwd) ;when reuse from other source 18.113 - ;(put-image (create-image (expand-file-name target)) (point)) 18.114 - (insert-image-file target) 18.115 - (setq img (plist-get (text-properties-at (point)) 'intangible)) 18.116 - (YaTeX-preview-image-mode) 18.117 - (if img 18.118 - (let ((height (1+ (cdr (image-size img))))) 18.119 - (enlarge-window 18.120 - (- (ceiling (min height (/ (frame-height) 2))) 18.121 - (window-height))))) 18.122 - ;; Remember elapsed time, which will be threshold in onthefly-preview 18.123 - (put 'YaTeX-typeset-conv2image-chain 'elapse 18.124 - (YaTeX-elapsed-time 18.125 - (get 'YaTeX-typeset-conv2image-chain 'start) (current-time)))) 18.126 - (t 18.127 - ;; Without direct image, display image with image viewer 18.128 - (YaTeX-system 18.129 - (format "%s %s" YaTeX-cmd-view-images target) 18.130 - "YaTeX-region-image" 18.131 - 'noask) 18.132 - ) 18.133 - ))))) 18.134 + (YaTeX-popup-image target " *YaTeX-popup-image*") 18.135 + (put 'YaTeX-typeset-conv2image-chain 'elapse 18.136 + (YaTeX-elapsed-time 18.137 + (get 'YaTeX-typeset-conv2image-chain 'start) (current-time))) 18.138 + )))) 18.139 18.140 18.141 (defvar YaTeX-typeset-environment-timer nil) 18.142 @@ -632,10 +643,12 @@ 18.143 (goto-char (overlay-end YaTeX-on-the-fly-overlay))) 18.144 ((YaTeX-region-active-p) 18.145 nil) ;if region is active, use it 18.146 - (math (setq usetimer t) (YaTeX-mark-environment)) 18.147 + (math (setq usetimer YaTeX-on-the-fly-preview-interval) 18.148 + (YaTeX-mark-environment)) 18.149 ((equal (or (YaTeX-inner-environment t) "document") "document") 18.150 (mark-paragraph)) 18.151 - (t (setq usetimer t) (YaTeX-mark-environment))) 18.152 + (t (setq usetimer YaTeX-on-the-fly-preview-interval) 18.153 + (YaTeX-mark-environment))) 18.154 (if YaTeX-use-image-preview 18.155 (let ((YaTeX-typeset-buffer (concat "*bg:" YaTeX-typeset-buffer)) 18.156 (b (region-beginning)) (e (region-end))) 18.157 @@ -654,6 +667,14 @@ 18.158 (if usetimer (YaTeX-typeset-environment-auto b e))) 18.159 (YaTeX-typeset-region)))) 18.160 18.161 +(defun YaTeX-filter-BEGEND () 18.162 + (let ((begend-info (YaTeX-in-BEGEND-p))) 18.163 + (if begend-info 18.164 + (progn 18.165 + (require 'yatexflt) 18.166 + (YaTeX-filter-pass-to-filter begend-info) 18.167 + )))) 18.168 + 18.169 (defun YaTeX-typeset-environment () 18.170 "Typeset current environment or paragraph. 18.171 If region activated, use it." 18.172 @@ -661,7 +682,8 @@ 18.173 (let ((md (match-data))) 18.174 (unwind-protect 18.175 (save-excursion 18.176 - (YaTeX-typeset-environment-1)) 18.177 + (or (YaTeX-filter-BEGEND) 18.178 + (YaTeX-typeset-environment-1))) 18.179 (store-match-data md)))) 18.180 18.181 18.182 @@ -753,8 +775,10 @@ 18.183 (setq pparg (substring cmd 0 (string-match "[;&]" cmd)) ;rm multistmt 18.184 pparg (substring pparg (rindex pparg ? )) ;get last arg 18.185 pparg (substring pparg 0 (rindex pparg ?.)) ;rm ext 18.186 - bibcmd (or (YaTeX-get-builtin "BIBTEX") bibtex-command)) 18.187 - (or (string-match "\\s " bibcmd) ;if bibcmd has no spaces, 18.188 + bibcmd (YaTeX-replace-format 18.189 + (or (YaTeX-get-builtin "BIBTEX") bibtex-command) 18.190 + "k" (YaTeX-kanji-ptex-mnemonic))) 18.191 + (or (string-match "\\s [^-]" bibcmd) ;if bibcmd has no argument, 18.192 (setq bibcmd (concat bibcmd pparg))) ;append argument(== %#!) 18.193 (and pp 18.194 (stringp pp) 18.195 @@ -775,7 +799,7 @@ 18.196 (if (string-match (concat "[{,/]" me "[,}]") s) 18.197 nil ; Nothing to do when it's already in includeonly. 18.198 (ding) 18.199 - (switch-to-buffer (current-buffer));Display this buffer. 18.200 + (set-window-buffer nil (current-buffer));Display this buffer. 18.201 (setq 18.202 me ;;Rewrite my name(me) to contain sub directory name. 18.203 (concat 18.204 @@ -798,7 +822,7 @@ 18.205 (t nil)) 18.206 (basic-save-buffer)))) 18.207 (exchange-point-and-mark))) 18.208 - (switch-to-buffer cb)) ;for 19 18.209 + (set-window-buffer nil cb)) ;for 19 and 26 18.210 (YaTeX-typeset cmd YaTeX-typeset-buffer nil nil ppcmd) 18.211 (put 'dvi2-command 'region nil))) 18.212 18.213 @@ -857,7 +881,7 @@ 18.214 (key-description (this-command-keys))) 18.215 (sit-for 2))))) 18.216 (YaTeX-typeset 18.217 - command 18.218 + (YaTeX-replace-format command "k" (YaTeX-kanji-ptex-mnemonic)) 18.219 (format " *YaTeX-%s*" (downcase builtin-type)) 18.220 builtin-type builtin-type))) 18.221 18.222 @@ -886,8 +910,8 @@ 18.223 18.224 (defun YaTeX-system (command name &optional noask basedir) 18.225 "Execute some COMMAND with process name `NAME'. Not a official function. 18.226 -Optional second argument NOASK skip query when privious process running. 18.227 -Optional third argument BASEDIR changes default-directory there." 18.228 +Optional third argument NOASK skip query when privious process running. 18.229 +Optional fourth argument BASEDIR changes default-directory there." 18.230 (save-excursion 18.231 (let ((df default-directory) 18.232 (buffer (get-buffer-create (format " *%s*" name))) 18.233 @@ -896,7 +920,7 @@ 18.234 (setq default-directory (cd (or basedir df))) 18.235 (erase-buffer) 18.236 (insert (format "Calling `%s'...\n" command) 18.237 - "==Kill this buffer to STOP process==") 18.238 + "==Kill this buffer to STOP process==\n") 18.239 (YaTeX-showup-buffer buffer 'YaTeX-showup-buffer-bottom-most) 18.240 (if (not (fboundp 'start-process)) 18.241 (call-process 18.242 @@ -1099,7 +1123,7 @@ 18.243 ;;Send patch to the author, please 18.244 previewer bnr cf line)) 18.245 ((string-match "okular" previewer) ;;?? 18.246 - (format "%s '%s.pdf#src:%d' '%s'" 18.247 + (format "%s '%s.pdf#src:%d %s'" 18.248 ;;Send patch to the author, please 18.249 previewer bnr line cf)) 18.250 ))) 18.251 @@ -1296,7 +1320,7 @@ 18.252 (defvar YaTeX-dvi2-command-ext-alist 18.253 '(("[agxk]dvi\\|dviout" . ".dvi") 18.254 ("ghostview\\|gv" . ".ps") 18.255 - ("acroread\\|[xk]pdf\\|pdfopen\\|Preview\\|TeXShop\\|Skim\\|evince\\|mupdf\\|zathura\\|okular" . ".pdf"))) 18.256 + ("acroread\\|[xk]pdf\\|pdfopen\\|Preview\\|TeXShop\\|Skim\\|evince\\|atril\\|xreader\\|mupdf\\|zathura\\|okular" . ".pdf"))) 18.257 18.258 (defun YaTeX-get-preview-file-name (&optional preview-command) 18.259 "Get file name to preview by inquiring YaTeX-get-latex-command" 18.260 @@ -1351,7 +1375,8 @@ 18.261 (t (concat (substring magic 0 (string-match "\\s [^-]\\S *$" magic)) " ")))) 18.262 (t (concat tex-command " " (if switch parent)))) 18.263 (list (cons "f" tparent) 18.264 - (cons "r" (substring tparent 0 (rindex tparent ?.))))))) 18.265 + (cons "r" (substring tparent 0 (rindex tparent ?.))) 18.266 + (cons "k" (YaTeX-kanji-ptex-mnemonic)))))) 18.267 18.268 (defvar YaTeX-lpr-command-history nil 18.269 "Holds command line history of YaTeX-lpr.")
19.1 --- a/yatexsec.el Sun Dec 10 22:03:46 2017 +0900 19.2 +++ b/yatexsec.el Tue Jul 31 08:22:31 2018 +0900 19.3 @@ -1,7 +1,7 @@ 19.4 ;;; yatexsec.el --- YaTeX sectioning browser 19.5 ;;; 19.6 ;;; (c) 1994-2017 by HIROSE Yuuji [yuuji@yatex.org] 19.7 -;;; Last modified Sun Dec 21 14:16:35 2014 on firestorm 19.8 +;;; Last modified Wed May 30 13:29:50 2018 on firestorm 19.9 ;;; $Id$ 19.10 19.11 ;;; Code: 19.12 @@ -192,6 +192,7 @@ 19.13 (other-window 1) 19.14 (setq sb (current-buffer)) 19.15 (switch-to-buffer hb) 19.16 + (setq buffer-read-only nil) ;; Emacs26 19.17 (erase-buffer) 19.18 (insert "===== View sectioning ===== 19.19 C-p Up sectioning level. 0 Show only \\part,