yatex
changeset 421:e37af485338a
merged with dev
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 12 Jul 2015 14:21:20 +0900 |
parents | 130c104fe22e 8f804c8339bb |
children | 778525798ef4 |
files | |
diffstat | 34 files changed, 3394 insertions(+), 1986 deletions(-) [+] |
line diff
1.1 --- a/.hgtags Mon May 14 19:59:12 2012 +0900 1.2 +++ b/.hgtags Sun Jul 12 14:21:20 2015 +0900 1.3 @@ -4,3 +4,10 @@ 1.4 6be1692f81cd35d0ea6022840c9f7e28af6c8e66 start-for-1.75 1.5 cb1906082153a03966183a861889f5d96c73d399 start-for-1.76 1.6 33c8875f52f9cc99f1f67cbad4e9145171d2d262 yatex-1.75 1.7 +784b25b062cc2caba6e75f93e3a2fd6d7ed9d3c7 yatex-1.76 1.8 +ef87626ec2f9532850b71eb1609779ec9919b042 yatex-1.77 1.9 +ef87626ec2f9532850b71eb1609779ec9919b042 yatex-1.77 1.10 +0000000000000000000000000000000000000000 yatex-1.77 1.11 +0000000000000000000000000000000000000000 yatex-1.77 1.12 +d0c09133ced7fffa1eb5fa4d114fb12580f812ff yatex-1.77 1.13 +d69fd7b1ac4d06d7f8633e892dc24eab2bfc23db yatex-1.78
2.1 --- a/docs/qanda Mon May 14 19:59:12 2012 +0900 2.2 +++ b/docs/qanda Sun Jul 12 14:21:20 2015 +0900 2.3 @@ -5,9 +5,8 @@ 2.4 %% 2.5 2.6 (新項目:・RefTeXは使えますか? 2.7 + ・bibtexとlatexとかを交互にかけるのが面倒なんですけど 2.8 ・自分で定義したカウンタを\ref補完でのラベル候補対象として認識させたい 2.9 - ・font-lock はどうやって使えばいいんでしょ? 2.10 - ・XEmacsでも色は着きますか? 2.11 ・{\it }内部では斜体に {\bf }では太字になるという噂を聞いたんですが…) 2.12 2.13 ■インストール関連 2.14 @@ -36,38 +35,18 @@ 2.15 2.16 ・まだしたっぱなので Info ディレクトリに書き込む権利がないっすう… 2.17 2.18 - rootにしてもらいましょう。それがだめなときは Mule2 をインストー 2.19 - ルしてもらいましょう。してくれない時は、ホームディレクトリにイン 2.20 - ストールして、ほーらディスクの無駄遣いだよ〜んといって脅せば入れ 2.21 - てくれるはずです。Mule2 なら、~/.emacs に 2.22 + rootにしてもらいましょう。それがだめなときは以下のようにして個人 2.23 + 所有の Info ディレクトリをEmacsに認識させましょう。 2.24 2.25 (setq Info-default-directory-list 2.26 (cons "自分のInfoディレクトリ" 2.27 Info-default-directory-list)) 2.28 2.29 - と書くことで、info を起動した時に個人用のファイルもメニューに加 2.30 - わります。それでもMule2をなかなか入れてくれない時は、新しいinfo 2.31 - ファイルを拾って来るたびに管理者に「入れてくださーい。あ、すみま 2.32 - せーん毎度。でもMule2なら自分のディレクトリを追加できるんですけ 2.33 - どねぇ…」を繰り返しましょう。 2.34 - 2.35 ・LaTeXのヘルプファイルがないといわれる。 2.36 2.37 - Nemacs, Mule1 では $EMACS/etc/, Mule2 では $EMACS/site-lisp/ に 2.38 - 置かれているとみなすようになっています。もし公共の場所に置く権限 2.39 - がない時は、ホームディレクトリの下のどこかに置いて、変数 2.40 - YaTeX-help-file にそのファイル名を設定して下さい。 2.41 - 2.42 -・Nemacsで info が読めない。 2.43 - 2.44 - Muleでformatしているので、内部日本語処理の異なるNemacs(または 2.45 - NemacsベースのDemacs)では(バイト数がずれるため)正しく読むことが 2.46 - できません。Muleで御覧ください。なお、Texinfoファイルのフォーマッ 2.47 - トには texinfo-3.1.tar.gz にある Emacs-Lisp ファイルを用いてくだ 2.48 - さい。 2.49 - 2.50 - また、九州大学の井上さんによると、Info の dir 画面で,M-x 2.51 - Info-tagify とやると info ファイルのコンバートができるそうです。 2.52 + もし公共の場所に置く権限がない時は、ホームディレクトリの下のどこ 2.53 + かに置いて、変数 YaTeX-help-file にそのファイル名を設定して下さ 2.54 + い。 2.55 2.56 ■操作関連 2.57 ・間違って変なLaTeXコマンドを学習させてしまった。 2.58 @@ -174,20 +153,12 @@ 2.59 2.60 ・直前に入れた \foo{引数だよ} の「引数だよ」をもう一回使いたい。 2.61 2.62 - gmhist というパッケージを導入しましょう。野鳥は gmhist に対応し 2.63 - ています。ミニバッファで \foo{???}: と聞かれた時に M-p (ESC p)を 2.64 + ミニバッファで \foo{???}: と聞かれた時に M-p (ESC p)を 2.65 押すと今まで入力した文字の履歴を逆方向にたどって表示します。M-n 2.66 と押すと順方向にたどります。これらの入力履歴は begin 型補完、 2.67 section 型補完、プレヴューア起動、プリントアウトコマンド起動それ 2.68 ぞれに対し独立に設定されます。 2.69 2.70 - gmhist は多くの Emacs-Lisp アーカイブサイトに置いてあります。 2.71 - ftp.ae.keio.ac.jp:pub/emacs-lisp/util/gmhist.tar.gz 2.72 - にもあります。 2.73 - 2.74 - ただし、Mule2 以降を用いている場合は、gmhistを用いなくてもミニバッ 2.75 - ファでのヒストリが使えます。 2.76 - 2.77 ・ref←→label間ジャンプで存在するはずのref/labelにジャンプしない。 2.78 2.79 C-c g とだけ打つと対応するref/labelの前方検索から始めます。 2.80 @@ -216,24 +187,30 @@ 2.81 2.82 ・いつも雛型として使っている template.tex を簡単に入れたい 2.83 2.84 - autoinsert.el (Emacs19/Mule2付属)を使いましょう。もしくは、それ 2.85 - の機能強化版 auto-insert-tkld を使いましょう。後者は、 2.86 - ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/auto-inset-tkld.tar.Z 2.87 - で入手できます。 2.88 + ~/work/template.tex に置きましょう。置き場所を変えたい場合は 2.89 + (setq YaTeX-template-file "~/hogehoge/fugafuga.tex") 2.90 + のようにして変更できます。 2.91 2.92 ・bibtexとlatexとかを交互にかけるのが面倒なんですけど 2.93 2.94 - latexmk というスグレもののツールがあります。これは、.tex, 2.95 - .bib, .idx などのファイル間の依存関係をドキュメントを走査して調 2.96 - べ、自動的に bibtex, makeindex, jlatex などを必要な順序で必要な 2.97 - 回数起動してくれます。これをインストールし、各ドキュメントの先頭 2.98 - に 2.99 - %#!latexmk 2.100 + yatex1.76からラベルやbibtexでの文献番号不整合を自動的に検知して、 2.101 + 再処理が必要なときは自動的に再起動するようになりました(auto rerun)。 2.102 + ほとんどの場合、野鳥の auto rerun で対処できるはずです。ただし、 2.103 + 以下で述べるlatexmkを利用する場合は重複処理になるため野鳥の 2.104 + auto rerun を無効化してください。無効化は 2.105 + (setq YaTeX-typeset-auto-rerun nil) 2.106 + します。 2.107 2.108 - などと書いてタイプセッタとして latexmk を指定すれば複雑な依存関 2.109 - 係に悩んだ日々とはおさらばです。なお、latexmk は CTAN サイトの 2.110 - support/latexmk/ ディレクトリに置いてあります。 2.111 - (例えば ftp.kdd.lab.kdd.co.jp:/CTAN/) 2.112 + 同じ目的のツールに latexmk というツールがあります。これは、.tex, 2.113 + .bib, .idx などのファイル間の依存関係を調べ、自動的に bibtex, 2.114 + makeindex, platex などを必要な順序で必要な回数起動してくれます。 2.115 + これをインストールし、各ドキュメントの先頭に 2.116 + 2.117 + %#!latexmk 2.118 + 2.119 + などと書いてタイプセッタとして latexmk を指定することで利用でき 2.120 + ます。なお、latexmk は CTAN サイトにあります。 2.121 + (http://www.ctan.org/pkg/latexmk/) 2.122 2.123 ・タイプセットとプレヴューでキーが違うのが面倒ですね? 2.124 2.125 @@ -413,13 +390,6 @@ 2.126 ん。光らないだけで実害はないので、気にしないか、あるいは次の 2.127 Meadow が登場するまで hilit19 を利用して下さい。 2.128 2.129 -・メニューバーの YaTeX をクリックした時にハングしたかと思うほど遅い。 2.130 - 2.131 - わかりません、Emacs のせいです。我慢してください。二回目からは遅 2.132 - くありません。ふつ〜メニューなんか使わないでしょ? サルのようにメ 2.133 - ニューバーを使う友達に野鳥を勧めてはいけません。言いすぎでした、 2.134 - ごめんなさいごめんなさい。 2.135 - 2.136 ・\it をイタリック表示できませんか?(Mule2) 2.137 2.138 まず、普段使用しているサイズの斜体フォントを探します。 2.139 @@ -611,7 +581,7 @@ 2.140 境に括り入れます。 2.141 「じゃあpreviewしてみよっか、でもこの部分だけでいいやね」と 2.142 いってもっぺんcenter環境全体をマーク(ESC C-@)して 2.143 - [prefix] % b してcenter環境を %#BEGIN〜%#ENDで括ってから 2.144 + [prefix] % B してcenter環境を %#BEGIN〜%#ENDで括ってから 2.145 領域タイプセットします。[prefix] t r。 2.146 「さてpreviewじゃ」 2.147 といいつつ [prefix] t p します。 2.148 @@ -622,22 +592,23 @@ 2.149 めます。 2.150 「はい、次の行」 2.151 と言いながら ESC RET します。また適当に埋めて 2.152 - 領域タイプセットして xdvi をraiseします。muleに戻りcenter環境 2.153 - の外に『この表は重要ネ〜』と書きます。 2.154 + 今度は [prefix] t e で隣のバッファに on-the-fly preview を出し、 2.155 + 表の中味を書き換えては自動的に隣のpreview画像が書き変わる様を 2.156 + 眺めます。 2.157 + 続いて、center環境の外に『この表は重要ネ〜』と書きます。 2.158 「うむ、『重要』にはアンダーラインを引こう」 2.159 といって『重要』をリジョン指定して [prefix] S(大文字) で 2.160 - underline を補完入力し、またpreviewします。 2.161 + underline を補完入力し、悩んだふりをして 2.162 「やっぱアンダーラインはやめ」と言いながら 2.163 \underline または { か } にカーソルを合わせて [prefix] k して 2.164 - \underline{} を消します。またpreviewして、 2.165 + \underline{} を消します。さらに悩むふりをして 2.166 「やっぱセンタリングは要らんかもしれんなあ…」と言いつつ 2.167 \end{center} にカーソルを合わせて [prefix] . を押します。 2.168 - すると \begin{center}, \end{center} に % がつくのでまた 2.169 - previewします。 2.170 + すると \begin{center}, \end{center} に % がつきます。 2.171 「うむ、やっぱりセンタリングはぽいっ」と言って 2.172 \end{center}の行で [prefix] k をおして begin/end 対を消します。 2.173 「さて、ファイルがでかくなって来たので分割するか」と言って 2.174 - \include{foo} などを補完入力します。 2.175 + \include{foo} などを [prefix] s で補完入力します。 2.176 「じゃあ foo.tex を作らなきゃ…」と言って [prefix] g します。 2.177 foo.tex が勝手に作られるので適当にごちゃごちゃ書いて 2.178 [prefix] t j でタイプセットします。 2.179 @@ -649,7 +620,7 @@ 2.180 2.181 こんな感じですかね。 2.182 あとは、イメージ補完、数式モード自動判定、先回りusepackageなんて 2.183 - のもAUCにはありません。 2.184 + のもアドバンテージでしょう。 2.185 2.186 ・なんで構成ファイルがいまさらSJISなの? だっせー。 2.187
3.1 --- a/docs/qanda.eng Mon May 14 19:59:12 2012 +0900 3.2 +++ b/docs/qanda.eng Sun Jul 12 14:21:20 2015 +0900 3.3 @@ -32,39 +32,25 @@ 3.4 3.5 *I ain't got the privilege to write in the Info directory... 3.6 3.7 - Get yourself made root. If you can't, have them install Mule2 3.8 - and add 3.9 + Get yourself made root. If you can't, write this: 3.10 3.11 (setq Info-default-directory-list 3.12 (cons "YOUR INFO DIRECTORY" 3.13 Info-default-directory-list)) 3.14 3.15 to your ~/.emacs. Now your personal files will be added to the 3.16 - menu when you invoke info. By the way, Mule1 will not release 3.17 - memories, so processes will pile up and be heavier on the system 3.18 - compared to Mule2. Nemacs has already become obsolete by the 3.19 - developers, so no further comments for usage of Nemacs. Get 3.20 - yourself Mule2 with flying colors :-) 3.21 + menu when you invoke info. 3.22 3.23 *Emacs can't find the help file. 3.24 - 3.25 - The help file is set to be placed in $EMACS/etc/ for Nemacs, 3.26 - Mule1 and $EMACS/site-lisp/ for Mule2. If you don't have the 3.27 - privilege to put them in a public location, copy it to your home 3.28 - directory and set YaTeX-help-file to that file name. 3.29 3.30 -*I can't read info on Nemacs 3.31 + If you don't have the privilege to put them in a public 3.32 + location, copy it to your home directory and set YaTeX-help-file 3.33 + to that file name. 3.34 3.35 - The info file was formatted on Mule, so it can't be read 3.36 - correctly on Nemacs (or Demacs based on Nemacs) because the 3.37 - internal Japanese processing is different. Read it on Mule. 3.38 - Use the Emacs-Lisp package in texinfo-3.1.tar.gz to format the 3.39 - Texinfo file. 3.40 - 3.41 3.42 [Operations] 3.43 ============ 3.44 -*I accidentally learned in a wrong LaTeX command. 3.45 +*I accidentally learned in a wrong LaTeX macro in my dictionary. 3.46 3.47 There should be a line with the wrong command in the .yatexrc 3.48 file in your home or current directory. Erase or fix that line, 3.49 @@ -209,19 +195,24 @@ 3.50 3.51 *Is it possible to include personal template file template.tex handily? 3.52 3.53 - Try Emacs-19's standard package `autoinsert.el' please. Or its 3.54 - upper compatible package auto-insert-tkld might also be good. 3.55 - You can get auto-insert-tkld via anonymous ftp 3.56 - ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/ 3.57 - ftp://archive.cis.ohio-state.edu/pub/gnu/elisp-archive/ 3.58 + Put your template.tex into your ~/work directory where YaTeX 3.59 + seeks by default. If you change the location to another place, 3.60 + set the lisp-variable as below. 3.61 + (setq YaTeX-template-file "~/other/location/template.tex") 3.62 3.63 *It is bothering for me to determine I should call bibtex or latex... 3.64 3.65 - Why don't you try `latexmk' perl script, which is a TeX specific 3.66 - tool as `make'? It detects the dependency among the TeX-related 3.67 - files such as .tex, .bib, and so on, and will execute suitable 3.68 - commands in a suitable sequence. You can find `latexmk' script 3.69 - in a directory of supports/latexmk in some CTAN ftp directory. 3.70 + Since version 1.76, YaTeX automatically call bibtex/latex twice 3.71 + if needed. In most case, you don't have to repeat to call 3.72 + typesetter or bibtex. If you use `latexmk' described below, 3.73 + YaTeX's auto rerun functionality should be disabled by setting 3.74 + like this: 3.75 + (setq YaTeX-typeset-auto-rerun nil) 3.76 + 3.77 + The `latexmk' perl script, which is a TeX specific tool to 3.78 + automate generation of LaTeX document. You can find `latexmk' 3.79 + some CTAN ftp directory. 3.80 + (eg. http://www.ctan.org/pkg/latexmk/) 3.81 3.82 *Can I inhibit auto-filling against very long <a href="..."> line? 3.83 3.84 @@ -276,12 +267,6 @@ 3.85 you are thinking of graduating from hilit19, it might be better 3.86 to keep old setting about it... 3.87 3.88 -*It's sooo slow when I click YaTeX on the menu bar. 3.89 - 3.90 - I don't know why. Probably a problem with Emacs-19. You'll 3.91 - just have to bear with it. It won't be so slow the second time. 3.92 - Anyway, you probably won't use the menu at all, do you? 3.93 - 3.94 *Is there any way of displaying `\it' strings in the italic font? 3.95 3.96 First, you should find the available italic font on your
4.1 --- a/docs/yahtmle Mon May 14 19:59:12 2012 +0900 4.2 +++ b/docs/yahtmle Sun Jul 12 14:21:20 2015 +0900 4.3 @@ -507,29 +507,30 @@ 4.4 4.5 4.6 4.7 + 4.8 4.9 Tag table: 4.10 -Node: Top259 4.11 -Node: Intro836 4.12 -Node: Installation1234 4.13 -Node: Setting up yahtml1515 4.14 -Node: Setting environments for weblint browsers and image viewers2306 4.15 -Node: Setting environment variables for WWW pages3002 4.16 -Node: Command Invocation3973 4.17 -Node: Completion4401 4.18 -Node: Jump5917 4.19 -Node: Changing and Deleting6397 4.20 -Node: Changing tags in pairs6681 4.21 -Node: Changing entities7176 4.22 -Node: URLencoding of strings within region7712 4.23 -Node: td-enclosure/tr-enclosure8013 4.24 -Node: CSS Support8979 4.25 -Node: CSS-class completion9205 4.26 -Node: Reread CSS definition10058 4.27 -Node: Customizations10333 4.28 -Node: All customizable variables10609 4.29 -Node: Hook variables14377 4.30 -Node: Copying14503 4.31 -Node: Concept Index15294 4.32 +Node: Top256 4.33 +Node: Intro833 4.34 +Node: Installation1231 4.35 +Node: Setting up yahtml1512 4.36 +Node: Setting environments for weblint browsers and image viewers2303 4.37 +Node: Setting environment variables for WWW pages2999 4.38 +Node: Command Invocation3970 4.39 +Node: Completion4398 4.40 +Node: Jump5914 4.41 +Node: Changing and Deleting6394 4.42 +Node: Changing tags in pairs6678 4.43 +Node: Changing entities7173 4.44 +Node: URLencoding of strings within region7709 4.45 +Node: td-enclosure/tr-enclosure8010 4.46 +Node: CSS Support8976 4.47 +Node: CSS-class completion9202 4.48 +Node: Reread CSS definition10055 4.49 +Node: Customizations10330 4.50 +Node: All customizable variables10606 4.51 +Node: Hook variables14374 4.52 +Node: Copying14500 4.53 +Node: Concept Index15291 4.54 4.55 End tag table
5.1 --- a/docs/yahtmlj Mon May 14 19:59:12 2012 +0900 5.2 +++ b/docs/yahtmlj Sun Jul 12 14:21:20 2015 +0900 5.3 @@ -322,17 +322,17 @@ 5.4 力確定のときにリターンキー(またはC-m)ではなく、C-jを押せばclass補完入力を 5.5 キャンセルできます。たとえば 5.6 5.7 - [prefix] l 行内タグ補完を起動 5.8 - (または[prefix] l SPC) 5.9 + `[prefix] l' 行内タグ補完を起動 5.10 + (または`[prefix] l SPC') 5.11 tt <tt></tt>をいれたいのでttと入力 5.12 - C-m 5.13 + `C-m' 5.14 5.15 とした場合は続いて class= と補完プロンプトが出ますが、 5.16 5.17 - [prefix] l 行内タグ補完を起動 5.18 - (または[prefix] l SPC) 5.19 + `[prefix] l' 行内タグ補完を起動 5.20 + (または`[prefix] l SPC') 5.21 tt <tt></tt>をいれたいのでttと入力 5.22 - C-j 5.23 + `C-j' 5.24 5.25 と最後を `C-j' で入力した場合は class 補完プロンプトは出ません。 5.26 5.27 @@ -511,35 +511,36 @@ 5.28 * カスタマイズ[かすたまいす]: Customizations. 4. 5.29 * キーアサイン[きいあさいん]: Customizations. 4. 5.30 * Demacs: Intro. 4. 5.31 -* HTML屋[HTMLや]: Intro. 4. 5.32 +* HTMLョ[HTMLや]: Intro. 4. 5.33 * LaTeX: Intro. 4. 5.34 * Mule: Intro. 4. 5.35 5.36 5.37 5.38 + 5.39 5.40 Tag table: 5.41 -Node: Top260 5.42 -Node: Intro729 5.43 -Node: Installation1008 5.44 -Node: yahtml起動のための設定1196 5.45 -Node: lintプログラム/ブラウザ/イメージヴューア環境等の設定1850 5.46 -Node: WWWページ環境用変数の設定2350 5.47 -Node: Command Invocation3121 5.48 -Node: Completion3448 5.49 -Node: Jump4432 5.50 -Node: Changing and Deleting4831 5.51 -Node: 対タグの変更5005 5.52 -Node: 文字参照への変更5355 5.53 -Node: リジョン内文字のURLencode5738 5.54 -Node: td括り/tr括り5972 5.55 -Node: CSS Support6601 5.56 -Node: CSS-class completion6799 5.57 -Node: Reread CSS file7783 5.58 -Node: Customizations8005 5.59 -Node: All customizable variables8229 5.60 -Node: Hook variables11227 5.61 -Node: Copying11339 5.62 -Node: Concept Index11842 5.63 +Node: Top257 5.64 +Node: Intro726 5.65 +Node: Installation1005 5.66 +Node: yahtml起動のための設定1193 5.67 +Node: lintプログラム/ブラウザ/イメージヴューア環境等の設定1847 5.68 +Node: WWWページ環境用変数の設定2347 5.69 +Node: Command Invocation3118 5.70 +Node: Completion3445 5.71 +Node: Jump4429 5.72 +Node: Changing and Deleting4828 5.73 +Node: 対タグの変更5002 5.74 +Node: 文字参照への変更5352 5.75 +Node: リジョン内文字のURLencode5735 5.76 +Node: td括り/tr括り5969 5.77 +Node: CSS Support6598 5.78 +Node: CSS-class completion6796 5.79 +Node: Reread CSS file7792 5.80 +Node: Customizations8014 5.81 +Node: All customizable variables8238 5.82 +Node: Hook variables11236 5.83 +Node: Copying11348 5.84 +Node: Concept Index11851 5.85 5.86 End tag table
6.1 --- a/docs/yatex.ref Mon May 14 19:59:12 2012 +0900 6.2 +++ b/docs/yatex.ref Sun Jul 12 14:21:20 2015 +0900 6.3 @@ -44,16 +44,18 @@ 6.4 6.5 【プロセス起動】 6.6 6.7 + ◆latex起動 [prefix] tj 6.8 + ◆latex+dvipdfmx起動 [prefix] td 6.9 + ◆環境の即時プレビュー [prefix] te 6.10 + ◆latex起動(領域指定) [prefix] tr 6.11 ◆jbibtex起動 [prefix] tb 6.12 - ◆jlatex起動 [prefix] tj 6.13 ◆makeindex起動 [prefix] ti 6.14 - ◆jlatexのkill [prefix] tk ※ 6.15 + ◆latexプロセスのkill [prefix] tk ※ 6.16 ◆プリントアウト [prefix] tl 6.17 ◆プリントアウト(全ページ) C-u [prefix] tl 6.18 ◆プレビューア起動 [prefix] tp 6.19 ◆xdvi上で文字列サーチ [prefix] ts ※※ 6.20 ◆lpq起動 [prefix] tq 6.21 - ◆jlatex起動(領域指定) [prefix] tr 6.22 6.23 [prefix] t を押せばメニューが出るので、[prefix] t の次に押すキー 6.24 は覚えなくて構いません。 6.25 @@ -72,7 +74,7 @@ 6.26 ◆タイプセットエラー箇所へ [prefix] ' 6.27 6.28 タイプセットエラー発生箇所へ(末尾から)遡って順次ジャンプします。 6.29 - もちろん jlatex でエラーが生じた場合のみ有効です。 6.30 + タイプセット時にエラーが生じた場合のみ有効です。 6.31 6.32 ◆対応するオブジェクトジャンプ [prefix] g 6.33 ◆別ウィンドウで 〃 [prefix] 4g 6.34 @@ -85,6 +87,7 @@ 6.35 ・\include(only), \input の上 対応するファイルへ 6.36 ・\ref, \label の上 対応する \label, \ref へ 6.37 ・\cite, \bibitem の上 対応する \bibitem, \cite へ 6.38 + ・その他 対応するプレヴューア位置へ 6.39 6.40 ◆メインファイルへジャンプ [prefix] ^ 6.41 ◆別ウィンドウで 〃 [prefix] 4^
7.1 --- a/docs/yatexe Mon May 14 19:59:12 2012 +0900 7.2 +++ b/docs/yatexe Sun Jul 12 14:21:20 2015 +0900 7.3 @@ -1,7 +1,7 @@ 7.4 Info file: yatexe, -*-Text-*- 7.5 produced by `texinfo-format-buffer' 7.6 from file `yatexe.tex' 7.7 -using `texinfmt.el' version 2.38 of 3 July 1998. 7.8 +using `texinfmt.el' version 2.42 of 7 Jul 2006. 7.9 7.10 START-INFO-DIR-ENTRY 7.11 * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs (English). 7.12 @@ -16,7 +16,7 @@ 7.13 7.14 * Menu: 7.15 7.16 -* What is YaTeX?:: 7.17 +* What is YaTeX?:: 7.18 * Main features:: What YaTeX can do 7.19 * Installation:: Guide to install 7.20 * Typesetting:: Call typesetting processes 7.21 @@ -47,7 +47,8 @@ 7.22 ************** 7.23 7.24 YaTeX automates typesetting and previewing of LaTeX and enables 7.25 -completing input of LaTeX mark-up command such as `\begin{}'..`\end{}'. 7.26 +completing input of LaTeX mark-up command such as 7.27 +`\begin{}'..`\end{}'. 7.28 7.29 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi 7.30 Language Enhancement to GNU Emacs), and latex on DOS. 7.31 @@ -65,8 +66,8 @@ 7.32 * Jumping to error line(`C-c '') 7.33 * Completing-read of LaTeX commands such as `\begin{}', `\section' etc. 7.34 (`C-c b', `C-c s', `C-c l', `C-c m') 7.35 - * Enclosing text into LaTeX environments or commands (`C-u' 7.36 - ABOVEKEYSTROKES) 7.37 + * Enclosing text into LaTeX environments or commands (ABOVEKEYSTROKES 7.38 + after region setting) 7.39 * Displaying the structure of text at entering sectioning commands 7.40 * Lump shifting of sectioning commands (*Note view-sectioning::) 7.41 * Learning unknown/new LaTeX commands for the next completion 7.42 @@ -124,14 +125,14 @@ 7.43 execute typeset or preview command. 7.44 7.45 `[prefix] t j' 7.46 - ... invoke latex 7.47 + ... invoke typesetter 7.48 `[prefix] t r' 7.49 - ... invoke latex on region 7.50 + ... invoke typesetter on region 7.51 `[prefix] t e' 7.52 - ... invoke latex on current environment or whole portion of 7.53 - current formulas in math-mode. 7.54 + ... `on-the-fly preview' on current environment or whole 7.55 + portion of current formulas in math-mode 7.56 `[prefix] t d' 7.57 - ... invoke dvipdfmx after successful typesetting 7.58 + ... invoke dvipdfmx after successful typesetting 7.59 `[prefix] t k' 7.60 ... kill current typesetting process 7.61 `[prefix] t b' 7.62 @@ -149,9 +150,9 @@ 7.63 7.64 * Menu: 7.65 7.66 -* Calling typesetter:: 7.67 -* Calling previewer:: 7.68 -* Printing out:: 7.69 +* Calling typesetter:: 7.70 +* Calling previewer:: 7.71 +* Printing out:: 7.72 7.73 7.74 7.75 @@ -192,14 +193,20 @@ 7.76 files. 7.77 7.78 The `[prefix] te' key automatically marks current inner environment or 7.79 -inner math mode and then call typeset-region with marked region. This is 7.80 -convenient to quick view of current tabular environment or current editing 7.81 -formulas. Keeping previewer window for `texput.dvi' is handy for 7.82 -debugging. Since `[prefix] te' selects the inner-most environment as 7.83 -region, it is not suitable for partial typesetting of doubly or more 7.84 -composed environment. If you want to do partial typesetting for a nested 7.85 -environment, use `[prefix] tr' for static-region, which is described in 7.86 -the section *Note %#notation::. 7.87 +inner math mode or paragraph, and then call typeset-region with marked 7.88 +region. This is convenient to quick view of current tabular environment 7.89 +or current editing formulas. If running Emacs has the ability of 7.90 +displaying images, typeset image will be shown in the next window. 7.91 +Further more, if you modify the content within that environment, YaTeX 7.92 +performs `on-the-fly' preview that automatically update preview image as 7.93 +you typed. 7.94 + 7.95 +If your Emacs does not supply on-the-fly preview, keeping previewer window 7.96 +for `texput.dvi' is handy for debugging. Since `[prefix] te' selects the 7.97 +inner-most environment as region, it is not suitable for partial 7.98 +typesetting of doubly or more composed environment. If you want to do 7.99 +partial typesetting for a nested environment, use `[prefix] tr' for 7.100 +static-region, which is described in the section *Note %#notation::. 7.101 7.102 7.103 7.104 @@ -238,12 +245,12 @@ 7.105 7.106 * Menu: 7.107 7.108 -* Changing typesetter:: 7.109 -* Splitting input files:: 7.110 -* Static region for typesetting:: 7.111 -* Lpr format:: 7.112 -* Controlling which command to invoke:: 7.113 -* Editing %# notation:: 7.114 +* Changing typesetter:: 7.115 +* Splitting input files:: 7.116 +* Static region for typesetting:: 7.117 +* Lpr format:: 7.118 +* Controlling which command to invoke:: 7.119 +* Editing %# notation:: 7.120 7.121 7.122 7.123 @@ -329,7 +336,7 @@ 7.124 7.125 7.126 7.127 -File: yatexe, Node: Lpr format, Next: Controlling which command to invoke, Prev: Static region for typesetting, Up: %#notation 7.128 +File: yatexe, Node: Lpr format, Prev: Static region for typesetting, Up: %#notation 7.129 7.130 Lpr format 7.131 ========== 7.132 @@ -370,12 +377,27 @@ 7.133 These %# notation below can control which command to invoke for LaTeX 7.134 related process. 7.135 7.136 + `%#PREVIEW' 7.137 + 7.138 + ... Command line for DVI viewing ([prefix] t p) 7.139 + `%#MAKEINDEX' 7.140 + 7.141 + ... Command line for makeindex ([prefix] t i) 7.142 `%#BIBTEX' 7.143 - 7.144 - ... Command line for makeindex ([prefix] t i) 7.145 - `%#MAKEINDEX' 7.146 - 7.147 - ... Command line for bibtex ([prefix] t b) 7.148 + 7.149 + ... Command line for bibtex ([prefix] t b) 7.150 + `%#DVIPDF' 7.151 + 7.152 + ... Command line for dvipdf(mx) ([prefix] t b) 7.153 + `%#LPR' 7.154 + 7.155 + ... Command line for printing out([prefix] t l) 7.156 + `%#PDFVIEW' 7.157 + 7.158 + ... Command line for PDF viewing 7.159 + `%#IMAGEDPI' 7.160 + 7.161 + ... DPI value for converting to on-the-fly prewview image 7.162 7.163 If you want to invoke "makeidx hogehoge" to update index, put the next 7.164 line some upper place in the source, for example. 7.165 @@ -415,15 +437,16 @@ 7.166 7.167 * Menu: 7.168 7.169 -* Begin-type completion:: 7.170 -* Section-type completion:: 7.171 -* Large-type completion:: 7.172 -* Maketitle-type completion:: 7.173 -* Arbitrary completion:: 7.174 -* End completion:: 7.175 -* Accent completion:: 7.176 -* Image completion:: 7.177 -* Greek letters completion:: 7.178 +* Begin-type completion:: 7.179 +* Section-type completion:: 7.180 +* Large-type completion:: 7.181 +* Maketitle-type completion:: 7.182 +* Arbitrary completion:: 7.183 +* End completion:: 7.184 +* Accent completion:: 7.185 +* Image completion:: 7.186 +* Greek letters completion:: 7.187 +* Inserting parentheses:: 7.188 7.189 7.190 7.191 @@ -485,7 +508,7 @@ 7.192 7.193 The next message will show up in the minibuffer 7.194 7.195 - Begin environment(default document): 7.196 + Begin environment(default document): 7.197 7.198 by typing `[prefix] b'. Put the wishing environment with completion in 7.199 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the 7.200 @@ -498,21 +521,15 @@ 7.201 automatically inserted such as `\item' for `itemize' environment. If you 7.202 don't want the entry, it can be removed by undoing. 7.203 7.204 - If you want to enclose some paragraphs which have already been written, 7.205 -invoke the begin-type completion with changing the case of `b' of key 7.206 -sequence upper(or invoke it with universal argument by `C-u' prefix). 7.207 - 7.208 - The following example encloses a region with `description' environment. 7.209 - 7.210 -`[prefix] B D' 7.211 -`(or ESC 1 [prefix] b D)' 7.212 -`(or C-u [prefix] b D)' 7.213 - 7.214 - ... begin-type completion for region 7.215 - 7.216 - This enclosing holds good for the completing input by `[prefix] b SPC'. 7.217 -`[prefix] B SPC' enclose a region with the environment selected by 7.218 -completing-read. 7.219 + If you want to enclose some paragraphs which have already been written 7.220 +into environment, invoke the begin-type completion right after region 7.221 +marking. 7.222 + 7.223 +If you set `transient-mark-mode' to `nil' in your `~/.emacs', typing 7.224 +`C-space' (`set-mark-command') twice turns `transient-mark-mode' on 7.225 +temporarily. Then, type call begin-type completion to enclose text into a 7.226 +environment. 7.227 + 7.228 7.229 7.230 7.231 @@ -553,7 +570,7 @@ 7.232 in your LaTeX source. When you neglect argument such as 7.233 7.234 (C-v for view) \???{} (default section): vspace* 7.235 - \vspace*{???}: 7.236 + \vspace*{???}: 7.237 7.238 YaTeX puts 7.239 7.240 @@ -592,7 +609,7 @@ 7.241 7.242 * Menu: 7.243 7.244 -* view-sectioning:: 7.245 +* view-sectioning:: 7.246 7.247 7.248 7.249 @@ -615,12 +632,12 @@ 7.250 `M-x YaTeX-section-overview' 7.251 ... Generate *Sectioning Lines* buffer 7.252 7.253 -from the LaTeX source buffer. In this listing buffer, typing `u' on the 7.254 -sectioning command shifts up the corresponding sectioning command in 7.255 +from the LaTeX source buffer. In this listing buffer, typing `u' on 7.256 +the sectioning command shifts up the corresponding sectioning command in 7.257 source text and `d' shifts down. After marking lines in the listing 7.258 -buffer, typing `U' shifts up all sectioning commands in the region, and 7.259 -`U' shifts down. Here are all the key bindings of `*Sectioning Lines*' 7.260 -buffer. 7.261 +buffer, typing `U' shifts up all sectioning commands in the region, 7.262 +and `U' shifts down. Here are all the key bindings of 7.263 +`*Sectioning Lines*' buffer. 7.264 7.265 `SPC' 7.266 ... Jump to corresponding source line 7.267 @@ -653,15 +670,14 @@ 7.268 7.269 the message in the minibuffer 7.270 7.271 - {\??? } (default large): 7.272 + {\??? } (default large): 7.273 7.274 prompts prompts you large-type command with completing-read. There are 7.275 TeX commands to change fonts or sizes, `it', `huge' and so on, in the 7.276 completion table. 7.277 7.278 - Region-based completion is also invoked by changing the letter after 7.279 -prefix key stroke as `[prefix] L'. It encloses the region by braces with 7.280 -large-type command. 7.281 + Region-based completion is also invoked by calling completion after 7.282 +region activated. 7.283 7.284 7.285 7.286 @@ -704,7 +720,7 @@ 7.287 ============== 7.288 7.289 YaTeX automatically detects the opened environment and close it with 7.290 -\`\end{environment}'. Though proficient YaTeX users never fail to make 7.291 +`\end{environment}'. Though proficient YaTeX users never fail to make 7.292 environment with begin-type completion, some may begin an environment 7.293 manually. In that case, type 7.294 7.295 @@ -755,10 +771,11 @@ 7.296 or not, and change the behavior of key strokes `;' and `:'. 7.297 7.298 By the way, we often express the leftarrow mark by `<-' for example. 7.299 -Considering such image, you can write `\leftarrow' by typing `<-' after 7.300 -`;' (semicolon) as a prefix. In the same way, `\longleftarrow' (`<--') is 7.301 -completed by typing `;<--', infinity mark which is imitated by `oo' is 7.302 -completed by typing `;oo'. 7.303 +Considering such image, you can write `\leftarrow' by typing `<-' 7.304 +after `;' (semicolon) as a prefix. In the same way, 7.305 +`\longleftarrow' (`<--') is completed by typing `;<--', 7.306 +infinity mark which is imitated by `oo' is completed by typing 7.307 +`;oo'. 7.308 7.309 Here are the sample operations in YaTeX math-mode. 7.310 7.311 @@ -772,11 +789,11 @@ 7.312 In any case, you can quit from image completion and can move to the next 7.313 editing operation if the LaTeX command you want is shown in the buffer. 7.314 7.315 - `;' itself in math-environment is inserted by `;;'. Typing `TAB' in the 7.316 -midst of image completion shows all of the LaTeX commands that start with 7.317 -the same name as string you previously typed in. In this menu buffer, 7.318 -press `RET' after moving the cursor (by `n', `p', `b', `f') to insert the 7.319 -LaTeX command. 7.320 + `;' itself in math-environment is inserted by `;;'. Typing 7.321 +`TAB' in the midst of image completion shows all of the LaTeX 7.322 +commands that start with the same name as string you previously typed in. 7.323 +In this menu buffer, press `RET' after moving the cursor (by `n', 7.324 +`p', `b', `f') to insert the LaTeX command. 7.325 7.326 To know all of the completion table, type `TAB' just after `;'. And 7.327 here is the sample menu by `TAB' after `;<'. 7.328 @@ -784,7 +801,7 @@ 7.329 KEY LaTeX sequence sign 7.330 < \leq < 7.331 ~ 7.332 - << \ll << 7.333 + << \ll << 7.334 <- \leftarrow <- 7.335 <= \Leftarrow <= 7.336 7.337 @@ -794,7 +811,7 @@ 7.338 7.339 7.340 7.341 -File: yatexe, Node: Greek letters completion, Prev: Image completion, Up: Completion 7.342 +File: yatexe, Node: Greek letters completion, Next: Inserting parentheses, Prev: Image completion, Up: Completion 7.343 7.344 Greek letters completion 7.345 ======================== 7.346 @@ -804,11 +821,23 @@ 7.347 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type 7.348 `:TAB' to know all the correspondence of alphabets vs. Greek letters. 7.349 7.350 - If you will find `;' or `:' doesn't work in correct position of math 7.351 -environment, it may be a bug of YaTeX. Please send me a bug report with 7.352 -the configuration of your text, and avoid it temporarily by typing `;' or 7.353 -`:' after universal-argument(`C-u') which forces `;' and `:' to work as 7.354 -math-prefix. 7.355 + If you will find `;' or `:' doesn't work in correct position of 7.356 +math environment, it may be a bug of YaTeX. Please send me a bug report 7.357 +with the configuration of your text, and avoid it temporarily by typing 7.358 +`;' or `:' after universal-argument(`C-u') which forces 7.359 +`;' and `:' to work as math-prefix. 7.360 + 7.361 + 7.362 + 7.363 +File: yatexe, Node: Inserting parentheses, Prev: Greek letters completion, Up: Completion 7.364 + 7.365 +Inserting parentheses 7.366 +===================== 7.367 + 7.368 + Typing opening parenthesis, one of `(', `{ and `['', automatically 7.369 +inserts the closing one. If a opening bracket is typed after `\', `\]' is 7.370 +automatically inserted with computed indentation. If you stop automatic 7.371 +insertion, type `C-q' before opening parenthesis. 7.372 7.373 7.374 7.375 @@ -862,9 +891,10 @@ 7.376 to `ESC h' by default. It is NOT predictable what will happen when you 7.377 continuously comment out some paragraph many times. 7.378 7.379 - You can also comment out an environment between `\begin' and `\end', or 7.380 -a `\begin'-\`\end' pair themselves, by making the following key strokes on 7.381 -the line where `\begin{}' or `\end{}' exists. 7.382 + You can also comment out an environment between `\begin' and 7.383 +`\end', or a `\begin'-\`\end' pair themselves, by making the 7.384 +following key strokes on the line where `\begin{}' or 7.385 +`\end{}' exists. 7.386 7.387 `[prefix] >' 7.388 ... comment out from \begin to \`end' 7.389 @@ -894,11 +924,11 @@ 7.390 7.391 * Menu: 7.392 7.393 -* Jump to corresponding object:: 7.394 -* Invoking image processor:: 7.395 -* Jump to main file:: 7.396 -* Jumping around the environment:: 7.397 -* Jumping to last completion position:: 7.398 +* Jump to corresponding object:: 7.399 +* Invoking image processor:: 7.400 +* Jump to main file:: 7.401 +* Jumping around the environment:: 7.402 +* Jumping to last completion position:: 7.403 7.404 7.405 7.406 @@ -936,9 +966,9 @@ 7.407 `[prefix] 4 g' 7.408 ... go to corresponding object in other window 7.409 7.410 -do the same job as `[prefix] g' except it's done in other window. Note 7.411 -that this function doesn't work on `begin/end', `%#BEGIN/%#END' pairs 7.412 -because it is meaningless. 7.413 +do the same job as `[prefix] g' except it's done in other window. 7.414 +Note that this function doesn't work on `begin/end', 7.415 +`%#BEGIN/%#END' pairs because it is meaningless. 7.416 7.417 7.418 7.419 @@ -982,8 +1012,8 @@ 7.420 `[prefix] 4^' 7.421 ... visit main file in other buffer 7.422 7.423 -in a sub text switch the buffer to the main text specified by `%#!' 7.424 -notation. 7.425 +in a sub text switch the buffer to the main text specified by 7.426 +`%#!' notation. 7.427 7.428 7.429 7.430 @@ -1031,8 +1061,8 @@ 7.431 7.432 * Menu: 7.433 7.434 -* Changing LaTeX commands:: 7.435 -* Killing LaTeX commands:: 7.436 +* Changing LaTeX commands:: 7.437 +* Killing LaTeX commands:: 7.438 7.439 7.440 7.441 @@ -1115,9 +1145,9 @@ 7.442 (setq YaTeX-item-regexp 7.443 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)") 7.444 7.445 -in your `~/.emacs'. If you are not familiar with regular expression for 7.446 -Emacs-Lisp, name a newcommand for `itemize' beginning with `\item' such as 7.447 -`\itembf', not `\bfitem'. 7.448 +in your `~/.emacs'. If you are not familiar with regular expression 7.449 +for Emacs-Lisp, name a newcommand for `itemize' beginning with 7.450 +`\item' such as `\itembf', not `\bfitem'. 7.451 7.452 This function reformats the `\item' into `hang-indented' style. For 7.453 example: 7.454 @@ -1167,9 +1197,10 @@ 7.455 7.456 A)dd R)eplace %)comment? 7.457 7.458 -in the minibuffer. Type `a' if you want to add the current file name to 7.459 -`\includeonly' list, `r' to replace \`includeonly' list with the current 7.460 -file, and type `%' to comment out the `\includeonly' line. 7.461 +in the minibuffer. Type `a' if you want to add the current file name 7.462 +to `\includeonly' list, `r' to replace \`includeonly' list 7.463 +with the current file, and type `%' to comment out the 7.464 +`\includeonly' line. 7.465 7.466 7.467 7.468 @@ -1240,8 +1271,8 @@ 7.469 7.470 If you want to apply these trick to other environments, `foo' 7.471 environment for example, define the function named 7.472 -`YaTeX-intelligent-newline-foo' to insert corresponding contents. That 7.473 -function will be called at the beginning of the next line after the 7.474 +`YaTeX-intelligent-newline-foo' to insert corresponding contents. 7.475 +That function will be called at the beginning of the next line after the 7.476 newline is inserted to the current line. Since the function 7.477 `YaTeX-indent-line' is designed to indent the current line properly, 7.478 calling this function before your code to insert certain contents must be 7.479 @@ -1414,9 +1445,9 @@ 7.480 7.481 * Menu: 7.482 7.483 -* Lisp variables:: 7.484 -* Add-in functions:: 7.485 -* Add-in generator:: 7.486 +* Lisp variables:: 7.487 +* Add-in functions:: 7.488 +* Add-in generator:: 7.489 7.490 7.491 7.492 @@ -1440,10 +1471,10 @@ 7.493 7.494 * Menu: 7.495 7.496 -* All customizable variables:: 7.497 -* Sample definitions:: 7.498 -* Hook variables:: 7.499 -* Hook file:: 7.500 +* All customizable variables:: 7.501 +* Sample definitions:: 7.502 +* Hook variables:: 7.503 +* Hook file:: 7.504 7.505 7.506 7.507 @@ -1501,6 +1532,51 @@ 7.508 -- Variable: YaTeX-dvipdf-command 7.509 Default command name to convert .dvi to PDF (`"dvipdfmx"') 7.510 7.511 + -- Variable: YaTeX-on-the-fly-preview-interval 7.512 + Interval time in seconds of idle to trigger on-the-fly preview of 7.513 + environment by `[prefix] t e'(0.9). 7.514 + `Nil' disables on-the-fly preview. 7.515 + 7.516 + -- Variable: YaTeX-on-the-fly-math-preview-engine 7.517 + Function symbol to use on-the-fly preview of MATH environment started 7.518 + by `[prefix] t e' (`'YaTeX-typeset-environment-by-lmp' which calls 7.519 + latex-math-preview-expression function if latex-math-preview is 7.520 + available, otherwise `'YaTeX-typeset-environment-by-builtin' which 7.521 + alls built-in function). 7.522 + 7.523 + `Nil' disables on-the-fly preview. 7.524 + 7.525 + -- Variable: YaTeX-cmd-gimp 7.526 + Command name of GIMP (code{"gimp"}) 7.527 + -- Variable: YaTeX-cmd-tgif 7.528 + Command name of tgif (code{"tgif"}) 7.529 + -- Variable: YaTeX-cmd-inkscape 7.530 + Command name of Inkscape (code{"inkscape"}) 7.531 + -- Variable: YaTeX-cmd-dia 7.532 + Command name of Dia (code{"dia"}) 7.533 + -- Variable: YaTeX-cmd-ooo 7.534 + Command name of OpenOffice.org/LibreOffice (code{"soffice"}) 7.535 + -- Variable: YaTeX-cmd-gs 7.536 + Command name of Ghostscript (code{"gs"}) 7.537 + -- Variable: YaTeX-cmd-dvips 7.538 + Command name of dvips (code{"dvips"}) 7.539 + -- Variable: YaTeX-cmd-displayline 7.540 + Command name of displayline 7.541 + (code{"/Applications/Skim.app/Contents/SharedSupport/displayline"}) 7.542 + -- Variable: YaTeX-cmd-edit-ps 7.543 + Command name for editing PostScript files(Value of 7.544 + code{"YaTeX-cmd-gimp"}) 7.545 + -- Variable: YaTeX-cmd-edit-pdf 7.546 + Command name for editing PDF files(Value of code{"YaTeX-cmd-ooo"}) 7.547 + -- Variable: YaTeX-cmd-edit-ai 7.548 + Command name for editing `.ai' files(Value of 7.549 + code{"YaTeX-cmd-inkscape"}) 7.550 + -- Variable: YaTeX-cmd-edit-svg 7.551 + Command name for editing SVG files(Value of 7.552 + code{"YaTeX-cmd-inkscape"}) 7.553 + -- Variable: YaTeX-cmd-edit-images 7.554 + Command name for editing image files(Value of code{"YaTeX-cmd-gimp"}) 7.555 + 7.556 -- Variable: YaTeX-need-nonstop 7.557 Put `\nonstopmode{}' or not (`nil') 7.558 7.559 @@ -1530,8 +1606,8 @@ 7.560 7.561 -- Variable: YaTeX-fill-inhibit-environments 7.562 Inhibit fill in these environments (`'("tabular" "tabular*" "array" 7.563 - "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" 7.564 - "verbatim" "verbatim*")') 7.565 + picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" 7.566 + verbatim" "verbatim*")') 7.567 7.568 -- Variable: YaTeX-uncomment-once 7.569 T for deleting all preceding `%' (`nil') 7.570 @@ -1577,7 +1653,7 @@ 7.571 `YaTeX-display-hierarchy' searches for sectioning command first, and 7.572 comment line secondary as a file headings. In latter case, ignore lines 7.573 that match with regular expression of this variable. Default value of 7.574 - this variable is RCS header expressions and mode specifying line `-*- xxxx 7.575 + this variable is RCS header expressions and mode specifying line `-*- xxxx 7.576 -*'. 7.577 7.578 -- Variable: YaTeX-skip-default-reader 7.579 @@ -1631,8 +1707,8 @@ 7.580 (`(featurep 'hilit19)' 7.581 7.582 -- Variable: YaTeX-singlecmd-suffix 7.583 - Suffix which is always inserted after maketitle-type macros. `"{}"' 7.584 - is recommended. 7.585 + Suffix which is always inserted after maketitle-type macros. 7.586 + `"{}"' is recommended. 7.587 7.588 -- Variable: YaTeX-package-alist-private 7.589 Alist of LaTeX2e-package name vs. lists of macros in it. Set this 7.590 @@ -1656,6 +1732,12 @@ 7.591 Regexp of environment names that should begin with no indentation. 7.592 All verbatime-like environment name should match with. 7.593 7.594 + -- Variable: YaTeX-electric-indent-mode 7.595 + Emacs 24.4 introduces automatic indentation of current and new lines. 7.596 + This might be annoying for some people. Pass this value to the 7.597 + function 'electric-indent-local-mode. If you prefer to stop 7.598 + electric-indent-mode in yatex-mode, set `-1' to this variable. 7.599 + 7.600 -- Variable: YaTeX-ref-default-label-string 7.601 Default \\ref time string format. This format is like strftime(3) 7.602 but allowed conversion char are as follows; %y -> Last 2 digit of 7.603 @@ -1761,10 +1843,10 @@ 7.604 7.605 * Menu: 7.606 7.607 -* How the add-in function works:: 7.608 -* How the function is called:: 7.609 -* Useful functions for creating add-in:: 7.610 -* Contribution:: 7.611 +* How the add-in function works:: 7.612 +* How the function is called:: 7.613 +* Useful functions for creating add-in:: 7.614 +* Contribution:: 7.615 7.616 7.617 7.618 @@ -1822,14 +1904,15 @@ 7.619 7.620 \frac{a/c} 7.621 7.622 -Normally, the expression `a/c' is translated to `\frac{a}{c}'. An 7.623 -enclosing add-in is useful for modifying `/' to `}{'. 7.624 +Normally, the expression `a/c' is translated to 7.625 +`\frac{a}{c}'. An enclosing add-in is useful for modifying 7.626 +`/' to `}{'. 7.627 7.628 * Menu: 7.629 7.630 -* Defining option-add-in:: 7.631 -* Defining argument-add-in:: 7.632 -* Defining enclosing-add-in:: 7.633 +* Defining option-add-in:: 7.634 +* Defining argument-add-in:: 7.635 +* Defining enclosing-add-in:: 7.636 7.637 7.638 7.639 @@ -1870,7 +1953,7 @@ 7.640 (defun YaTeX::newcommand (n) ;n is argument position 7.641 (cond 7.642 ((= n 1) ;1st argument is macro name 7.643 - (read-string "Command: " "\\")) ;initial input `\' 7.644 + (read-string "Command: " "\\")) ;initial input `\' 7.645 ((= n 2) "") ;do nothing when reading arg#2 7.646 (t nil))) 7.647 7.648 @@ -1898,7 +1981,7 @@ 7.649 (while (search-forward "/" end t) 7.650 (goto-char (match-beginning 0)) 7.651 (if (y-or-n-p "Replace this slash(/) with `}{'") 7.652 - (throw 'done (replace-match "}{"))) 7.653 + (throw 'done (replace-match "}{"))) 7.654 (goto-char (match-end 0))))) 7.655 7.656 7.657 @@ -1933,9 +2016,10 @@ 7.658 `[A]' 7.659 Character list which can show up in the brackets 7.660 `[D]' 7.661 - Return the location specifier such as `[htb]'. When nothing is 7.662 - entered, omit [] itself. If the possible characters are "htbp", call 7.663 - this function as `(YaTeX:read-position "htbp")' 7.664 + Return the location specifier such as `[htb]'. When 7.665 + nothing is entered, omit [] itself. If the possible characters 7.666 + are "htbp", call this function as 7.667 + `(YaTeX:read-position "htbp")' 7.668 7.669 `[F]' 7.670 YaTeX:read-coordinates 7.671 @@ -1943,9 +2027,9 @@ 7.672 Base prompt, X-axis prompt, Y-axis prompt (each optional) 7.673 `[D]' 7.674 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for 7.675 - X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the 7.676 - form of "(X,Y)". The default prompts are `Dimension', `X', `Y' 7.677 - respectively. 7.678 + X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the form 7.679 + of "(X,Y)". The default prompts are `Dimension', `X', 7.680 + `Y' respectively. 7.681 7.682 `[F]' 7.683 YaTeX:check-completion-type 7.684 @@ -1999,24 +2083,24 @@ 7.685 7.686 The latter generator is invoked by the next sequence. `M-x 7.687 YaTeX-generate-simple' This generator can make both "option add-in" and 7.688 -"argument add-in" (*refer the section add-in functions* *Note How the 7.689 +argument add-in" (*refer the section add-in functions* *Note How the 7.690 add-in function works::), whereas `YaTeX-generate' cannot make "argument 7.691 addin". 7.692 7.693 For example, assume you have the LaTeX command as follows. 7.694 7.695 - \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} 7.696 - (A) (B) (1) (2) (3) 7.697 - (A)Optional parameter to specify the position 7.698 - One of t(top), b(bottom), l(left), r(right) 7.699 - (B)Maximum size of frame 7.700 - (1)1st argument is filename of EPS file 7.701 - (2)2nd argument indicates 7.702 - plain do nothing 7.703 - frame make frame around image 7.704 - dframe make double-frame around image 7.705 - for included EPS file. 7.706 - (3)Caption for the picture 7.707 + \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} 7.708 + (A) (B) (1) (2) (3) 7.709 + (A)Optional parameter to specify the position 7.710 + One of t(top), b(bottom), l(left), r(right) 7.711 + (B)Maximum size of frame 7.712 + (1)1st argument is filename of EPS file 7.713 + (2)2nd argument indicates 7.714 + plain do nothing 7.715 + frame make frame around image 7.716 + dframe make double-frame around image 7.717 + for included EPS file. 7.718 + (3)Caption for the picture 7.719 7.720 Now get start with generation. Typing `M-x YaTeX-generate-simple' 7.721 brings the prompt: 7.722 @@ -2061,7 +2145,7 @@ 7.723 are t, b, l, and r. To tell these information to generator, operate as 7.724 follows. 7.725 7.726 - Read type(1).... p 7.727 + Read type(1).... p 7.728 Acceptable characters: tblr RET 7.729 7.730 (B) is coordinate. So its completion style is coOrd. We want a prompt 7.731 @@ -2108,10 +2192,10 @@ 7.732 Then all the candidates ready to be read. Type single RET after 7.733 entering all. 7.734 7.735 - Item[1](RET to exit): plain RET 7.736 - Item[2](RET to exit): frame RET 7.737 - Item[3](RET to exit): dframe RET 7.738 - Item[4](RET to exit): RET 7.739 + Item[1](RET to exit): plain RET 7.740 + Item[2](RET to exit): frame RET 7.741 + Item[3](RET to exit): dframe RET 7.742 + Item[4](RET to exit): RET 7.743 7.744 The following prompt asks whether the entered string must belong to 7.745 candidates or not. In this case, since the argument must be one of 7.746 @@ -2181,66 +2265,67 @@ 7.747 7.748 Tag table: 7.749 Node: Top256 7.750 -Node: What is YaTeX?1597 7.751 -Node: Main features1970 7.752 -Node: Installation3499 7.753 -Node: Typesetting4276 7.754 -Node: Calling typesetter5406 7.755 -Node: Calling previewer7610 7.756 -Node: Printing out7971 7.757 -Node: %#notation8263 7.758 -Node: Changing typesetter8681 7.759 -Node: Splitting input files9045 7.760 -Node: Static region for typesetting10470 7.761 -Node: Lpr format11599 7.762 -Node: Controlling which command to invoke12672 7.763 -Node: Editing %# notation13265 7.764 -Node: Completion13809 7.765 -Node: Begin-type completion14369 7.766 -Node: Section-type completion17412 7.767 -Node: view-sectioning19847 7.768 -Node: Large-type completion21427 7.769 -Node: Maketitle-type completion22158 7.770 -Node: Arbitrary completion22710 7.771 -Node: End completion23100 7.772 -Node: Accent completion23570 7.773 -Node: Image completion24187 7.774 -Node: Greek letters completion26444 7.775 -Node: Local dictionaries27171 7.776 -Node: Commenting out28108 7.777 -Node: Cursor jump29567 7.778 -Node: Jump to corresponding object29879 7.779 -Node: Invoking image processor31280 7.780 -Node: Jump to main file32623 7.781 -Node: Jumping around the environment32988 7.782 -Node: Jumping to last completion position33406 7.783 -Node: Changing and Deleting33915 7.784 -Node: Changing LaTeX commands34307 7.785 -Node: Killing LaTeX commands35484 7.786 -Node: Filling36669 7.787 -Node: Updation of includeonly38520 7.788 -Node: What column39317 7.789 -Node: Intelligent newline40402 7.790 -Node: Usepackage checker42056 7.791 -Node: Online help42647 7.792 -Node: Browsing file hierarchy44322 7.793 -Node: Cooperation with other packages46059 7.794 -Node: Customizations46764 7.795 -Node: Lisp variables47098 7.796 -Node: All customizable variables48102 7.797 -Node: Sample definitions57901 7.798 -Node: Hook variables58414 7.799 -Node: Hook file59118 7.800 -Node: Add-in functions59457 7.801 -Node: How the add-in function works60317 7.802 -Node: Defining option-add-in62516 7.803 -Node: Defining argument-add-in63238 7.804 -Node: Defining enclosing-add-in64120 7.805 -Node: How the function is called64974 7.806 -Node: Useful functions for creating add-in65650 7.807 -Node: Contribution67055 7.808 -Node: Add-in generator67329 7.809 -Node: Etcetera72701 7.810 -Node: Copying73306 7.811 +Node: What is YaTeX?1583 7.812 +Node: Main features1956 7.813 +Node: Installation3500 7.814 +Node: Typesetting4277 7.815 +Node: Calling typesetter5389 7.816 +Node: Calling previewer7916 7.817 +Node: Printing out8277 7.818 +Node: %#notation8569 7.819 +Node: Changing typesetter8940 7.820 +Node: Splitting input files9304 7.821 +Node: Static region for typesetting10729 7.822 +Node: Lpr format11858 7.823 +Node: Controlling which command to invoke12888 7.824 +Node: Editing %# notation13845 7.825 +Node: Completion14389 7.826 +Node: Begin-type completion14904 7.827 +Node: Section-type completion17758 7.828 +Node: view-sectioning20179 7.829 +Node: Large-type completion21759 7.830 +Node: Maketitle-type completion22412 7.831 +Node: Arbitrary completion22964 7.832 +Node: End completion23354 7.833 +Node: Accent completion23823 7.834 +Node: Image completion24440 7.835 +Node: Greek letters completion26695 7.836 +Node: Inserting parentheses27451 7.837 +Node: Local dictionaries27858 7.838 +Node: Commenting out28795 7.839 +Node: Cursor jump30254 7.840 +Node: Jump to corresponding object30545 7.841 +Node: Invoking image processor31945 7.842 +Node: Jump to main file33288 7.843 +Node: Jumping around the environment33654 7.844 +Node: Jumping to last completion position34072 7.845 +Node: Changing and Deleting34581 7.846 +Node: Changing LaTeX commands34962 7.847 +Node: Killing LaTeX commands36139 7.848 +Node: Filling37324 7.849 +Node: Updation of includeonly39179 7.850 +Node: What column39976 7.851 +Node: Intelligent newline41061 7.852 +Node: Usepackage checker42714 7.853 +Node: Online help43305 7.854 +Node: Browsing file hierarchy44980 7.855 +Node: Cooperation with other packages46717 7.856 +Node: Customizations47422 7.857 +Node: Lisp variables47718 7.858 +Node: All customizable variables48677 7.859 +Node: Sample definitions60640 7.860 +Node: Hook variables61153 7.861 +Node: Hook file61857 7.862 +Node: Add-in functions62196 7.863 +Node: How the add-in function works63034 7.864 +Node: Defining option-add-in65220 7.865 +Node: Defining argument-add-in65942 7.866 +Node: Defining enclosing-add-in66823 7.867 +Node: How the function is called67679 7.868 +Node: Useful functions for creating add-in68355 7.869 +Node: Contribution69765 7.870 +Node: Add-in generator70039 7.871 +Node: Etcetera75499 7.872 +Node: Copying76104 7.873 7.874 End tag table
8.1 --- a/docs/yatexe.tex Mon May 14 19:59:12 2012 +0900 8.2 +++ b/docs/yatexe.tex Sun Jul 12 14:21:20 2015 +0900 8.3 @@ -8,7 +8,7 @@ 8.4 8.5 @iftex 8.6 @c @syncodeindex fn cp 8.7 -@c Last modified Fri May 11 15:40:49 2012 on firestorm 8.8 +@c Last modified Fri Feb 13 08:15:26 2015 on firestorm 8.9 @syncodeindex vr cp 8.10 @end iftex 8.11 8.12 @@ -77,7 +77,7 @@ 8.13 @code{\section} etc. 8.14 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) 8.15 @item Enclosing text into La@TeX{} environments or commands 8.16 - (@kbd{C-u} @var{AboveKeyStrokes}) 8.17 + (@var{AboveKeyStrokes} after region setting) 8.18 @item Displaying the structure of text at entering sectioning commands 8.19 @item Lump shifting of sectioning commands (@ref{view-sectioning}) 8.20 @item Learning unknown/new La@TeX{} commands for the next completion 8.21 @@ -146,12 +146,12 @@ 8.22 8.23 @table @kbd 8.24 @item [prefix] t j 8.25 - @dots{} invoke latex 8.26 + @dots{} invoke typesetter 8.27 @item [prefix] t r 8.28 - @dots{} invoke latex on region 8.29 + @dots{} invoke typesetter on region 8.30 @item [prefix] t e 8.31 - @dots{} invoke latex on current environment or whole 8.32 - portion of current formulas in math-mode. 8.33 + @dots{} `on-the-fly preview' on current environment or whole 8.34 + portion of current formulas in math-mode 8.35 @item [prefix] t d 8.36 @dots{} invoke dvipdfmx after successful typesetting 8.37 @item [prefix] t k 8.38 @@ -215,9 +215,16 @@ 8.39 edit splitting files. 8.40 8.41 The @kbd{[prefix] te} key automatically marks current inner environment 8.42 -or inner math mode and then call typeset-region with marked region. This 8.43 +or inner math mode or paragraph, and then call typeset-region with marked 8.44 +region. This 8.45 is convenient to quick view of current tabular environment or current 8.46 -editing formulas. Keeping previewer window for @file{texput.dvi} is handy 8.47 +editing formulas. If running Emacs has the ability of displaying images, 8.48 +typeset image will be shown in the next window. Further more, 8.49 +if you modify the content within that environment, YaTeX performs 8.50 +`on-the-fly' preview that automatically update preview image as you typed. 8.51 + 8.52 +If your Emacs does not supply on-the-fly preview, 8.53 +keeping previewer window for @file{texput.dvi} is handy 8.54 for debugging. Since @kbd{[prefix] te} selects the inner-most environment 8.55 as region, it is not suitable for partial typesetting of doubly or more 8.56 composed environment. If you want to do partial typesetting for a nested 8.57 @@ -369,7 +376,7 @@ 8.58 @code{%#BEGIN} alone at the middle of very long text. Do not forget to 8.59 erase @code{%#BEGIN} @code{%#END} pair. 8.60 8.61 -@node Lpr format, Controlling which command to invoke, Static region for typesetting, %#notation 8.62 +@node Lpr format, , Static region for typesetting, %#notation 8.63 @comment node-name, next, previous, up 8.64 @section Lpr format 8.65 @cindex lpr format 8.66 @@ -415,10 +422,20 @@ 8.67 La@TeX{} related process. 8.68 8.69 @table @code 8.70 + @item %#PREVIEW 8.71 + @dots{} Command line for DVI viewing ([prefix] t p) 8.72 + @item %#MAKEINDEX 8.73 + @dots{} Command line for makeindex ([prefix] t i) 8.74 @item %#BIBTEX 8.75 - @dots{} Command line for makeindex ([prefix] t i) 8.76 - @item %#MAKEINDEX 8.77 @dots{} Command line for bibtex ([prefix] t b) 8.78 + @item %#DVIPDF 8.79 + @dots{} Command line for dvipdf(mx) ([prefix] t b) 8.80 + @item %#LPR 8.81 + @dots{} Command line for printing out([prefix] t l) 8.82 + @item %#PDFVIEW 8.83 + @dots{} Command line for PDF viewing 8.84 + @item %#IMAGEDPI 8.85 + @dots{} DPI value for converting to on-the-fly prewview image 8.86 @end table 8.87 8.88 If you want to invoke ``makeidx hogehoge'' to update index, 8.89 @@ -462,15 +479,16 @@ 8.90 kinds of completion type, begin-type, section-type, large-type, etc... 8.91 8.92 @menu 8.93 -* Begin-type completion:: 8.94 -* Section-type completion:: 8.95 -* Large-type completion:: 8.96 -* Maketitle-type completion:: 8.97 -* Arbitrary completion:: 8.98 -* End completion:: 8.99 -* Accent completion:: 8.100 -* Image completion:: 8.101 -* Greek letters completion:: 8.102 +* Begin-type completion:: 8.103 +* Section-type completion:: 8.104 +* Large-type completion:: 8.105 +* Maketitle-type completion:: 8.106 +* Arbitrary completion:: 8.107 +* End completion:: 8.108 +* Accent completion:: 8.109 +* Image completion:: 8.110 +* Greek letters completion:: 8.111 +* Inserting parentheses:: 8.112 @end menu 8.113 8.114 @node Begin-type completion, Section-type completion, Completion, Completion 8.115 @@ -557,26 +575,15 @@ 8.116 automatically inserted such as @code{\item} for @code{itemize} 8.117 environment. If you don't want the entry, it can be removed by undoing. 8.118 8.119 - If you want to enclose some paragraphs which have already been 8.120 -written, invoke the begin-type completion with changing the case 8.121 -of @kbd{b} of key sequence upper(or invoke it with universal argument 8.122 -by @kbd{C-u} prefix). 8.123 + If you want to enclose some paragraphs which have already been written 8.124 +into environment, invoke the begin-type completion right after region marking. 8.125 @cindex enclose region into environment 8.126 8.127 - The following example encloses a region with `description' 8.128 -environment. 8.129 - 8.130 -@table @kbd 8.131 -@item [prefix] B D 8.132 -@itemx (or ESC 1 [prefix] b D) 8.133 -@itemx (or C-u [prefix] b D) 8.134 - 8.135 - @dots{} begin-type completion for region 8.136 -@end table 8.137 - 8.138 - This enclosing holds good for the completing input by @kbd{[prefix] b 8.139 -SPC}. @kbd{[prefix] B SPC} enclose a region with the environment selected 8.140 -by completing-read. 8.141 +If you set @code{transient-mark-mode} to @code{nil} in your 8.142 +@file{~/.emacs}, typing @kbd{C-space} (@code{set-mark-command}) twice 8.143 +turns @code{transient-mark-mode} on temporarily. Then, type call 8.144 +begin-type completion to enclose text into a environment. 8.145 + 8.146 8.147 @node Section-type completion, Large-type completion, Begin-type completion, Completion 8.148 @comment node-name, next, previous, up 8.149 @@ -753,9 +760,8 @@ 8.150 TeX commands to change fonts or sizes, @code{it}, @code{huge} and so on, 8.151 in the completion table. 8.152 8.153 - Region-based completion is also invoked by changing the letter after 8.154 -prefix key stroke as @kbd{[prefix] L}. It encloses the region by braces 8.155 -with large-type command. 8.156 + Region-based completion is also invoked by calling completion 8.157 +after region activated. 8.158 8.159 @node Maketitle-type completion, Arbitrary completion, Large-type completion, Completion 8.160 @comment node-name, next, previous, up 8.161 @@ -910,7 +916,7 @@ 8.162 Emacs-Lisp variable @code{YaTeX-math-sign-alist-private}. See also 8.163 @file{yatexmth.el} for the information of the structure of this variable. 8.164 8.165 -@node Greek letters completion, , Image completion, Completion 8.166 +@node Greek letters completion, Inserting parentheses, Image completion, Completion 8.167 @comment node-name, next, previous, up 8.168 @section Greek letters completion 8.169 @cindex Greek letters completion 8.170 @@ -928,6 +934,15 @@ 8.171 @kbd{;} or @kbd{:} after universal-argument(@kbd{C-u}) which forces 8.172 @kbd{;} and @kbd{:} to work as math-prefix. 8.173 8.174 +@node Inserting parentheses, , Greek letters completion, Completion 8.175 +@section Inserting parentheses 8.176 + 8.177 + Typing opening parenthesis, one of @code{(}, @code{@{ and @code{[}}, 8.178 +automatically inserts the closing one. If a opening bracket is typed 8.179 +after @code{\}, @code{\]} is automatically inserted with computed 8.180 +indentation. If you stop automatic insertion, type @kbd{C-q} before 8.181 +opening parenthesis. 8.182 + 8.183 @node Local dictionaries, Commenting out, Completion, Top 8.184 @comment node-name, next, previous, up 8.185 @chapter Local dictionaries 8.186 @@ -1692,6 +1707,63 @@ 8.187 Default command name to convert .dvi to PDF (@code{"dvipdfmx"}) 8.188 @end defvar 8.189 8.190 +@defvar YaTeX-on-the-fly-preview-interval 8.191 +Interval time in seconds of idle to trigger on-the-fly preview of 8.192 +environment by @kbd{[prefix] t e}(0.9). 8.193 +@code{Nil} disables on-the-fly preview. 8.194 +@end defvar 8.195 + 8.196 +@defvar YaTeX-on-the-fly-math-preview-engine 8.197 +Function symbol to use on-the-fly preview of MATH environment 8.198 +started by @kbd{[prefix] t e} (@code{'YaTeX-typeset-environment-by-lmp} 8.199 +which calls latex-math-preview-expression function if latex-math-preview 8.200 +is available, otherwise @code{'YaTeX-typeset-environment-by-builtin} which 8.201 +alls built-in function). 8.202 + 8.203 +@code{Nil} disables on-the-fly preview. 8.204 +@end defvar 8.205 + 8.206 +@defvar YaTeX-cmd-gimp 8.207 +Command name of GIMP (code{"gimp"}) 8.208 +@end defvar 8.209 +@defvar YaTeX-cmd-tgif 8.210 +Command name of tgif (code{"tgif"}) 8.211 +@end defvar 8.212 +@defvar YaTeX-cmd-inkscape 8.213 +Command name of Inkscape (code{"inkscape"}) 8.214 +@end defvar 8.215 +@defvar YaTeX-cmd-dia 8.216 +Command name of Dia (code{"dia"}) 8.217 +@end defvar 8.218 +@defvar YaTeX-cmd-ooo 8.219 +Command name of OpenOffice.org/LibreOffice (code{"soffice"}) 8.220 +@end defvar 8.221 +@defvar YaTeX-cmd-gs 8.222 +Command name of Ghostscript (code{"gs"}) 8.223 +@end defvar 8.224 +@defvar YaTeX-cmd-dvips 8.225 +Command name of dvips (code{"dvips"}) 8.226 +@end defvar 8.227 +@defvar YaTeX-cmd-displayline 8.228 +Command name of displayline 8.229 +(code{"/Applications/Skim.app/Contents/SharedSupport/displayline"}) 8.230 +@end defvar 8.231 +@defvar YaTeX-cmd-edit-ps 8.232 +Command name for editing PostScript files(Value of code{"YaTeX-cmd-gimp"}) 8.233 +@end defvar 8.234 +@defvar YaTeX-cmd-edit-pdf 8.235 +Command name for editing PDF files(Value of code{"YaTeX-cmd-ooo"}) 8.236 +@end defvar 8.237 +@defvar YaTeX-cmd-edit-ai 8.238 +Command name for editing `.ai' files(Value of code{"YaTeX-cmd-inkscape"}) 8.239 +@end defvar 8.240 +@defvar YaTeX-cmd-edit-svg 8.241 +Command name for editing SVG files(Value of code{"YaTeX-cmd-inkscape"}) 8.242 +@end defvar 8.243 +@defvar YaTeX-cmd-edit-images 8.244 +Command name for editing image files(Value of code{"YaTeX-cmd-gimp"}) 8.245 +@end defvar 8.246 + 8.247 @defvar YaTeX-need-nonstop 8.248 Put @code{\nonstopmode@{@}} or not (@code{nil}) 8.249 @end defvar 8.250 @@ -1886,6 +1958,13 @@ 8.251 All verbatime-like environment name should match with. 8.252 @end defvar 8.253 8.254 +@defvar YaTeX-electric-indent-mode 8.255 +Emacs 24.4 introduces automatic indentation of current and new lines. 8.256 +This might be annoying for some people. Pass this value to the function 8.257 +'electric-indent-local-mode. If you prefer to stop electric-indent-mode 8.258 +in yatex-mode, set `-1' to this variable. 8.259 +@end defvar 8.260 + 8.261 @defvar YaTeX-ref-default-label-string 8.262 Default \\ref time string format. 8.263 This format is like strftime(3) but allowed conversion char are as follows;
9.1 --- a/docs/yatexj Mon May 14 19:59:12 2012 +0900 9.2 +++ b/docs/yatexj Sun Jul 12 14:21:20 2015 +0900 9.3 @@ -1,7 +1,7 @@ 9.4 Info file: yatexj, -*-Text-*- 9.5 produced by `texinfo-format-buffer' 9.6 from file `yatexj.tex' 9.7 -using `texinfmt.el' version 2.38 of 3 July 1998. 9.8 +using `texinfmt.el' version 2.42 of 7 Jul 2006. 9.9 9.10 START-INFO-DIR-ENTRY 9.11 * YaTeX: (yatexj). Yet Another tex-mode for Emacs (Japanese). 9.12 @@ -49,11 +49,11 @@ 9.13 はじめに 9.14 ******** 9.15 9.16 - 野鳥は、GNU Emacs で LaTeX 用の文書を作成する時に pLaTeX などのタイプセッ 9.17 -トコマンドや、プレヴューアの起動を Emacs 編集画面中から行えるようにすると 9.18 -共に、拡張性の高い種々の補完機能によりソーステキストの編集を支援します。さ 9.19 -らに LaTeX コマンドのオンラインヘルプによりマニュアルを調べる手間を軽減し 9.20 -ます。 9.21 + 野鳥は、GNU Emacs で LaTeX 用の文書を作成する時に pLaTeX などのタイプ 9.22 +セットコマンドや、プレヴューアの起動を Emacs 編集画面中から行えるように 9.23 +すると共に、拡張性の高い種々の補完機能によりソーステキストの編集を支援 9.24 +します。さらに LaTeX コマンドのオンラインヘルプによりマニュアルを調べる 9.25 +手間を軽減します。 9.26 9.27 English manual *Note Top: (yatexe)Top. 9.28 9.29 @@ -73,23 +73,24 @@ 9.30 9.31 * section型コマンド 9.32 9.33 - `\section{タイトル}'や`\mbox{内容}'のように引数を取るLaTeXコマンドを 9.34 - 指します。 9.35 + `\section{タイトル}'や`\mbox{内容}'のように引数を取るLaTeXコマンド 9.36 + を指します。 9.37 9.38 * maketitle型コマンド 9.39 9.40 - `\maketitle'や`\tableofcontents'のように引数を取らないLaTeXコマンドを 9.41 - 指します。 9.42 + `\maketitle'や`\tableofcontents'のように引数を取らないLaTeXコマン 9.43 + ドを指します。 9.44 9.45 * large型コマンド 9.46 9.47 - `{\large ...}' や `{\tt ...}' のようなフォント/サイズ指定子を指します。 9.48 + `{\large ...}' や `{\tt ...}' のようなフォント/サイズ指定子を指し 9.49 + ます。 9.50 9.51 * `[prefix]' 9.52 9.53 - 野鳥の機能を呼び出すためのプリフィクスキー。デフォルトでは`C-c'に割り 9.54 - 当てられているので、特に変更していない場合本マニュアルの `[prefix]' 9.55 - という表記は、`C-c' と読み換えてください。 9.56 + 野鳥の機能を呼び出すためのプリフィクスキー。デフォルトでは`C-c'に 9.57 + 割り当てられているので、特に変更していない場合本マニュアルの 9.58 + `[prefix]' という表記は、`C-c' と読み換えてください。 9.59 9.60 9.61 9.62 @@ -102,25 +103,27 @@ 9.63 * カーソル位置によらない固定リジョンの部分タイプセット 9.64 * \includeonlyのワンタッチ更新 9.65 * エラー箇所への自動ジャンプ(`C-c '') 9.66 - * `\begin{}, \end{}, \section...' などの LaTeX コマンドの補完入力(`C-c 9.67 - b', `C-c s', `C-c l', `C-c m') 9.68 - * 既に入力したテキストを環境やコマンド引数の中に取り込む括り補完(`C-u' 9.69 - +通常補完キー) 9.70 + * `\begin{}, \end{}, \section...' などの LaTeXコマンドの補完入力 9.71 + (`C-c b', `C-c s', `C-c l', `C-c m') 9.72 + * 既に入力したテキストを環境やコマンド引数の中に取り込む括り補完(リ 9.73 + ジョン指定後に通常補完キー) 9.74 * セクション区切り入力時の文書構造アウトライン表示 9.75 * セクションコマンドの一括シフト (*Note view-sectioning::) 9.76 * 補完辞書の学習 9.77 * LaTeX の環境やコマンドに応じたガイド付き引数入力 9.78 * 野鳥にないガイド付き引数入力関数の自動生成(`yatexgen.el') 9.79 * LaTeX コマンドの削除/変更(`C-c k', `C-c c') 9.80 - * ファイル間、`\begin'<->`\end'間、`\ref'<->`\label'間、 9.81 - `\cite'<->`\bibitem'ジャンプ(`C-c g') 9.82 - * 一括コメントアウト/アンコメントアウト(`C-c >', `C-c <', `C-c ,', `C-c 9.83 - .') 9.84 + * ファイル間、`\begin'<->`\end'間、 9.85 + `\ref'<->`\label'間、 9.86 + `\cite'<->`\bibitem'ジャンプ(`C-c g') 9.87 + * 一括コメントアウト/アンコメントアウト(`C-c >', `C-c <', `C-c ,', 9.88 + `C-c .') 9.89 * アクセント記号/数式環境用コマンド/ギリシャ文字の入力支援(`C-c a', 9.90 `;', `/') 9.91 * tabular/array環境のカラム位置ガイド 9.92 * 標準的 LaTeX コマンドのオンラインヘルプ(`C-c ?', `C-c /') 9.93 - * ドキュメントのインクルード構造の視覚的表示とバッファ切り替え(`C-c d') 9.94 + * ドキュメントのインクルード構造の視覚的表示とバッファ切り替え(`C-c 9.95 + d') 9.96 * 補完入力したマクロに応じて必要な \userpackage を入れてくれる先回り 9.97 userpackage 9.98 * \labelを打つことはもう忘れよう! refやcite補完入力で自動生成します 9.99 @@ -141,41 +144,42 @@ 9.100 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) 9.101 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) 9.102 9.103 -次に野鳥の emacs-lisp ファイル群を置くディレクトリを load-path に加えます。 9.104 -たとえば、 `~/src/emacs/yatex'に置くのであれば、 9.105 +次に野鳥の emacs-lisp ファイル群を置くディレクトリを load-path に加えま 9.106 +す。たとえば、 `~/src/emacs/yatex'に置くのであれば、 9.107 9.108 (setq load-path (cons (expand-file-name "~/src/emacs/yatex") load-path)) 9.109 9.110 などとします。 9.111 9.112 - 以上の設定により、拡張子が .tex であるファイルを編集すると自動的に野鳥が 9.113 -ロードされます。野鳥が正常に起動できたときはモードラインの表示が「やてふ」 9.114 -に変わります。 9.115 + 以上の設定により、拡張子が .tex であるファイルを編集すると自動的に野 9.116 +鳥がロードされます。野鳥が正常に起動できたときはモードラインの表示が 9.117 +「やてふ」に変わります。 9.118 9.119 9.120 タイプセッタ/プレヴューア環境の設定 9.121 =================================== 9.122 9.123 - 利用する外部プログラムに関する以下の変数を確認し、必要なら正しい値に変更 9.124 -します。 9.125 + 利用する外部プログラムに関する以下の変数を確認し、必要なら正しい値に 9.126 +変更します。 9.127 `tex-command' 9.128 ... 起動するタイプセッタのコマンド名 9.129 `dvi2-command' 9.130 ... 起動するプレヴューアのコマンド名 9.131 `NTT-jTeX' 9.132 - ... 改行+インデントによって、タイプセット後の字間が空いてしま 9.133 - うのを抑制する場合にtにする(古いNTT-jTeXで顕著に現れる)。具体的には、 9.134 - fillするときに各行の終わりに%を付加するようになる。 9.135 + ... 改行+インデントによって、タイプセット後の字間が空いて 9.136 + しまうのを抑制する場合にtにする(古いNTT-jTeXで顕著に現れる)。具体 9.137 + 的には、fillするときに各行の終わりに%を付加するようになる。 9.138 `YaTeX-kanji-code' 9.139 ... 文書を作成する時の漢字コード 9.140 `dviprint-command-format' 9.141 ... ファイルの印刷に使われるコマンド列の書式 9.142 -`makeindex-command' 9.143 - ... makeindexコマンド 9.144 - 9.145 -これらを変更する場合は、やはり`~/.emacs'にて、たとえば(setq tex-command 9.146 -"pdflatex") のようにしてください。どのような値をセットすれば良いかについて 9.147 -は、*Note All customizable variables::を参照してください。 9.148 +`YaTeX-dvipdf-command' 9.149 + ... DVIをPDFに変換するコマンド 9.150 + 9.151 +これらを変更する場合は、やはり`~/.emacs'にて、たとえば 9.152 + (setq tex-command "pdflatex") 9.153 +のようにしてください。どのような値をセットすれば良いかについては、 9.154 +*Note All customizable variables::を参照してください。 9.155 9.156 9.157 9.158 @@ -185,16 +189,17 @@ 9.159 latexコマンド起動 9.160 ***************** 9.161 9.162 -LaTeXソースの編集中、次のキー入力により、platex などのタイプセットプログラ 9.163 -ム(以後タイプセッタと呼ぶ)、プレヴューアなどの起動ができます。 9.164 +LaTeXソースの編集中、次のキー入力により、platex などのタイプセットプロ 9.165 +グラム(以後タイプセッタと呼ぶ)、プレヴューアなどの起動ができます。 9.166 9.167 `[prefix] t j' 9.168 ... タイプセッタ(platex)起動 9.169 `[prefix] t r' 9.170 ... タイプセッタ起動(領域指定) 9.171 `[prefix] t e' 9.172 - ... タイプセッタ起動(ポイント位置の環境または数式モードのみ対 9.173 - 象) 9.174 + ... 部分タイプセット&プレヴュー(ポイント位置の段落、環境ま 9.175 + たは数式モードのみをタイプセットして隣のバッファに組版結果の画像を 9.176 + 出す) 9.177 `[prefix] t k' 9.178 ... 動作中のタイプセッタの停止 9.179 `[prefix] t b' 9.180 @@ -202,7 +207,7 @@ 9.181 `[prefix] t i' 9.182 ... makeindex起動 9.183 `[prefix] t d' 9.184 - ... タイプセット完了後dvipdfmx起動 9.185 + ... タイプセット完了後dvipdfmx起動 9.186 `[prefix] t p' 9.187 ... プレヴューア起動 9.188 `[prefix] t l' 9.189 @@ -223,49 +228,56 @@ 9.190 タイプセッタ起動 9.191 ================ 9.192 9.193 - タイプセッタを起動すると、編集ウィンドウが2つに分割され、片方のウィンド 9.194 -ウにタイプセット画面が表示されます。出力されるメッセージと連動しタイプセッ 9.195 -トバッファは自動的にスクロールします。もし、途中でエラーが起こって止まって 9.196 -しまった場合にはタイプセットバッファに移り、(`C-x o') タイプセッタの出して 9.197 -いる ? プロンプトに対して、`x' (処理の中断)などの指示を送ることができます。 9.198 -エラーを修正する場合は、 9.199 + タイプセッタを起動すると、編集ウィンドウが2つに分割され、片方のウィン 9.200 +ドウにタイプセット画面が表示されます。出力されるメッセージと連動しタイ 9.201 +プセットバッファは自動的にスクロールします。もし、途中でエラーが起こっ 9.202 +て止まってしまった場合にはタイプセットバッファに移り、(`C-x o') タイプ 9.203 +セッタの出している ? プロンプトに対して、`x' (処理の中断)などの指示を送 9.204 +ることができます。エラーを修正する場合は、 9.205 9.206 `[prefix] '' 9.207 `(prefix+アポストロフィ)' 9.208 ... 直前のエラー発生行へジャンプ 9.209 9.210 -を入力することにより、タイプセッタがエラーを発生した行に移ることができます。 9.211 -また、タイプセッタの出力する overfull hbox などのウォーニング行にも対応し 9.212 -ていますので、順次 `[prefix] '' を押すことにより、一つ前のウォーニング発生 9.213 -行にジャンプしていきます。 9.214 - 9.215 - もし、気になるエラー行があった場合は、タイプセットバッファで、エラーの表 9.216 -示されている行にカーソルを合わせスペースキーを押すと LaTeX ソースの対応す 9.217 -る行にジャンプします。 9.218 +を入力することにより、タイプセッタがエラーを発生した行に移ることができ 9.219 +ます。また、タイプセッタの出力する overfull hbox などのウォーニング行に 9.220 +も対応していますので、順次 `[prefix] '' を押すことにより、一つ前のウォー 9.221 +ニング発生行にジャンプしていきます。 9.222 + 9.223 + もし、気になるエラー行があった場合は、タイプセットバッファで、エラー 9.224 +の表示されている行にカーソルを合わせスペースキーを押すと LaTeX ソースの 9.225 +対応する行にジャンプします。 9.226 9.227 9.228 領域タイプセット 9.229 ---------------- 9.230 9.231 - ポイントとマークの間、あるいはテキスト中に埋め込んだ `%#BEGIN' と`%#END' 9.232 -の間の領域(*Note %#notation::)だけを切り取ってタイプセットすることができま 9.233 -す。この場合メインファイルのプリアンブルが一時ファイルのプリアンブルとして 9.234 -使われます。したがってプリアンブルにないマクロ定義が領域内にあるとエラーに 9.235 -なります。領域タイプセットを使う場合、必ずマクロ定義はプリアンブル 9.236 -(`\begin{document}'より前)に置くようにして下さい。一時ファイルはメインファ 9.237 -イルのあるディレクトリの`texput.tex'という名前で出力されるので、上書きには 9.238 -注意してください。 9.239 + ポイントとマークの間、あるいはテキスト中に埋め込んだ `%#BEGIN' と 9.240 +`%#END'の間の領域(*Note %#notation::)だけを切り取ってタイプセットするこ 9.241 +とができます。この場合メインファイルのプリアンブルが一時ファイルのプリ 9.242 +アンブルとして使われます。したがってプリアンブルにないマクロ定義が領域 9.243 +内にあるとエラーになります。領域タイプセットを使う場合、必ずマクロ定義 9.244 +はプリアンブル(`\begin{document}'より前)に置くようにして下さい。一時ファ 9.245 +イルはメインファイルのあるディレクトリの`texput.tex'という名前で出力さ 9.246 +れるので、上書きには注意してください。 9.247 9.248 9.249 環境タイプセット 9.250 ---------------- 9.251 9.252 - `[prefix] te' を押すと、ポイント位置の最も内側の環境、または数式モード内 9.253 -の場合はその数式モード全体が自動的に領域選択されて、領域タイプセットを呼び 9.254 -出します。tabular環境や数式モードで複雑なものを作っている場合は確かめたい 9.255 -部分だけを確認できるので便利です。これも `texput.tex' に該当部分を書き出し 9.256 -ます。プレヴューアで `texput.dvi' を開いたままにしておけば修正と確認が素早 9.257 -くできるでしょう。 9.258 + `[prefix] te' を押すと、ポイント位置の最も内側の環境、または数式モー 9.259 +ド内の場合はその数式モード全体、あるいは環境がなければその段落が自動的 9.260 +に領域選択されて、領域タイプセットを呼び出します。tabular環境や数式モー 9.261 +ドで複雑なものを作っている場合は確かめたい部分だけを確認できるので便利 9.262 +です。Emacsが画像表示可能な場合は、部分タイプセットの結果を画像化して隣 9.263 +のウィンドウに表示します。また、特定の環境で呼び出した場合は、環境内の 9.264 +文字を書き換える度に自動的にプレビュー画像を更新します(on-the-flyプレ 9.265 +ヴュー)。自動表示されない場合はプレヴューアで `texput.dvi'を開いたまま 9.266 +にしておけば修正と確認が素早くできるでしょう。 9.267 + 9.268 + 画像プレヴューの場合の大きさ(解像度)はデフォルトで200dpi(数式は 9.269 +300dpi)です。dpiを変えたい場合はLaTeXソースのどこかに`%#PREVIEWDPI 9.270 +150'のようにdpi値を書いてください。 9.271 9.272 9.273 9.274 @@ -273,11 +285,11 @@ 9.275 9.276 プレヴューア起動 9.277 ================ 9.278 - `[prefix] t p' によりプレヴューアの起動ができます。さらに、もしあなたが、- 9.279 -remote 機能つきのxdviを利用している場合は `[prefix] t s' を押すことにより 9.280 -カーソル位置の文字列を検索してそのページを表示するようにすでに起動中のxdvi 9.281 -に命令を送ります。これにより、現在編集中の箇所のタイプセット結果を即座に見 9.282 -ることができます。 9.283 + `[prefix] t p' によりプレヴューアの起動ができます。さらに、もしあなた 9.284 +が、-remote 機能つきのxdviを利用している場合は `[prefix] t s' を押すこ 9.285 +とによりカーソル位置の文字列を検索してそのページを表示するようにすでに 9.286 +起動中のxdviに命令を送ります。これにより、現在編集中の箇所のタイプセッ 9.287 +ト結果を即座に見ることができます。 9.288 9.289 9.290 9.291 @@ -287,8 +299,8 @@ 9.292 プリントアウト 9.293 ============== 9.294 9.295 - `[prefix] t l'を押してプリントアウトを指示すると、出力開始/終了ページを 9.296 -聞いてくるので、それぞれに答えます。これを省略したい時は、 9.297 + `[prefix] t l'を押してプリントアウトを指示すると、出力開始/終了ページ 9.298 +を聞いてくるので、それぞれに答えます。これを省略したい時は、 9.299 universal-argument をつけ、 9.300 9.301 9.302 @@ -304,8 +316,8 @@ 9.303 %#記法 9.304 ****** 9.305 9.306 - 本文中に`%#'ではじまるキーワードを埋め込むことでタイプセッタ起動等の制御 9.307 -をすることができます。 9.308 + 本文中に`%#'ではじまるキーワードを埋め込むことでタイプセッタ起動等の 9.309 +制御をすることができます。 9.310 9.311 * Menu: 9.312 9.313 @@ -338,33 +350,34 @@ 9.314 入力ファイル分割 9.315 ================ 9.316 9.317 -また、章毎に別ファイルの .tex を作成している場合で、`main.tex'から 9.318 -`sub.tex' を `\include'しているような時は、`sub.tex'の任意の位置に次のよう 9.319 -な行を埋め込みます。 9.320 +また、章毎に別ファイルの .tex を作成している場合で、`main.tex'から 9.321 +`sub.tex' を `\include'しているような時は、`sub.tex'の任意の位置に次の 9.322 +ような行を埋め込みます。 9.323 9.324 %#!platex main.tex 9.325 9.326 9.327 -上の例のようにコマンド名だけでなく引数も書いた場合には、全てをそのまま 9.328 -shell に渡すので次のように書けば、ghostview などをプレヴューアに使う時に便 9.329 -利です。 9.330 +上の例のようにコマンド名だけでなく引数も書いた場合には、全てをそのまま 9.331 +shell に渡すので次のように書けば、ghostview などをプレヴューアに使う時 9.332 +に便利です。 9.333 9.334 9.335 %#!platex main && dvi2ps main.dvi > main 9.336 9.337 -なお、この行の最後の単語のピリオド以前を「メインファイル」のベースネームで 9.338 -あると仮定します(上の2つの場合どちらも`main')。この行に記述した、`%f'はメ 9.339 -インファイル名に、 `%r' はメインファイルの拡張子を取り除いた部分に置換され 9.340 -ます。ただし、`%f,%r'を利用した場合、初回タイプセット時に必ずメインファイ 9.341 -ル名の入力を促されます。 9.342 - 9.343 - `[prefix] g' (*Note Cursor jump::参照) でのファイル間ジャンプを有効に機 9.344 -能させるため、入力ファイル分割時には次のことに注意して下さい。 9.345 - 9.346 - 1. サブディレクトリを作って、その中にサブファイルを置くことはできるがサ 9.347 - ブディレクトリのサブディレクトリには置けない。 9.348 +なお、この行の最後の単語のピリオド以前を「メインファイル」のベースネー 9.349 +ムであると仮定します(上の2つの場合どちらも`main')。この行に記述した、 9.350 +`%f'はメインファイル名に、 `%r' はメインファイルの拡張子を取り除いた部 9.351 +分に置換されます。ただし、`%f,%r'を利用した場合、初回タイプセット時に必 9.352 +ずメインファイル名の入力を促されます。 9.353 + 9.354 + `[prefix] g' (*Note Cursor jump::参照) でのファイル間ジャンプを有効に 9.355 +機能させるため、入力ファイル分割時には次のことに注意して下さい。 9.356 + 9.357 + 1. サブディレクトリを作って、その中にサブファイルを置くことはできるが 9.358 + サブディレクトリのサブディレクトリには置けない。 9.359 2. メインファイルからサブディレクトリ内のファイルを include する時には、 9.360 - 相対パス指定を用いて、`\include{chap1/sub}'のように記述。 9.361 + 相対パス指定を用いて、 9.362 + `\include{chap1/sub}'のように記述。 9.363 3. メインファイルが一つ上のディレクトリにある場合も、サブファイルには 9.364 %#!platex main.tex のように記述する(../mainではない)。 9.365 9.366 @@ -377,35 +390,36 @@ 9.367 領域の固定 9.368 ========== 9.369 9.370 - `[prefix] tr' の領域指定のタイプセットでは、とくに指定のないかぎり、 9.371 -`C-SPC'でマークした位置と、ポイント(カーソル位置)の間を領域とみなしますが、 9.372 -必ず決まった領域をタイプセットしたい場合は、その領域を 9.373 + `[prefix] tr' の領域指定のタイプセットでは、とくに指定のないかぎり、 9.374 +`C-SPC'でマークした位置と、ポイント(カーソル位置)の間を領域とみなします 9.375 +が、必ず決まった領域をタイプセットしたい場合は、その領域を 9.376 9.377 %#BEGIN 9.378 <渡したい領域> 9.379 %#END 9.380 9.381 -のように`%#BEGIN'と`%#END'で囲み、カーソルを「`%#BEGIN'以降」に置いてくだ 9.382 -さい。この時の領域決定規則をまとめると次のようになります。 9.383 - 9.384 - 9.385 - 1. カーソル位置よりバッファの先頭方向に`%#BEGIN'というキーワードがある場 9.386 - 合 9.387 +のように`%#BEGIN'と`%#END'で囲み、カーソルを「`%#BEGIN'以降」に置いてく 9.388 +ださい。この時の領域決定規則をまとめると次のようになります。 9.389 + 9.390 + 9.391 + 1. カーソル位置よりバッファの先頭方向に`%#BEGIN'というキーワードがあ 9.392 + る場合 9.393 9.394 1. `%#BEGIN'よりバッファの末尾方向に`%#END'というキーワードが見つかっ 9.395 た場合。 9.396 =>`%#BEGIN' から、その `%#END' のある位置まで。 9.397 - 2. `%#END' が見つからなかった場合。=>バッファの最後尾まで。 9.398 + 2. `%#END' が見つからなかった場合。 9.399 + =>バッファの最後尾まで。 9.400 9.401 2. カーソル位置よりバッファの先頭方向に `%#BEGIN' というキーワードが 9.402 見つからなかった場合。 9.403 =>マーク(`C-SPC'位置)とポイント(カーソル位置)の間の領域。 9.404 9.405 - tabular 環境を何度も試行錯誤しているような場合は、`\begin'の前の行に 9.406 -`%#BEGIN' と書き、`\end' の次の行に `%#END' と書いておくと簡単に作表結果を 9.407 -テストすることができます。また、長い .tex ファイルの後半に `%#BEGIN' を書 9.408 -いておけば、前半の部分は無視できます。このBEGINとEND の消し忘れには十分ご 9.409 -注意下さい。 9.410 + tabular 環境を何度も試行錯誤しているような場合は、`\begin'の前の行に 9.411 +`%#BEGIN' と書き、`\end' の次の行に `%#END' と書いておくと簡単に作表結 9.412 +果をテストすることができます。また、長い .tex ファイルの後半に 9.413 +`%#BEGIN' を書いておけば、前半の部分は無視できます。このBEGINとENDの消 9.414 +し忘れには十分ご注意下さい。 9.415 9.416 9.417 9.418 @@ -415,9 +429,9 @@ 9.419 lprフォーマット 9.420 =============== 9.421 9.422 - まず、プリントアウト用コマンド列のフォーマットについて説明します。コマン 9.423 -ド列フォーマットは、3つの Lisp 変数によって表現されます。デフォルトの 9.424 -dvi2ps 用のフォーマットを例に説明します。 9.425 + まず、プリントアウト用コマンド列のフォーマットについて説明します。コ 9.426 +マンド列フォーマットは、3つの Lisp 変数によって表現されます。デフォルト 9.427 +の dvi2ps 用のフォーマットを例に説明します。 9.428 9.429 `(1)dviprint-command-format' 9.430 `"dvi2ps %f %t %s | lpr"' 9.431 @@ -428,18 +442,19 @@ 9.432 `(3)dviprint-to-format' 9.433 `"-t %e"' 9.434 9.435 -実際にプリントアウトする時は、(1)中の %s がファイル名に置き換えられ、%f が 9.436 -(2)の内容、%t が(3)の内容に置き換えられます。その際に(2)の文字列中の %b は 9.437 -「出力開始ページ」、(3)の文字列中の %e は「出力終了ページ」に置き換えられ 9.438 -ます。もし、ページを指定しない時には、%f, %t 両方とも無視されます。 9.439 - 9.440 - この、dviprint-command-format を臨時に変えたい時は、LaTeX のソーステキス 9.441 -ト中の任意の場所に、 9.442 +実際にプリントアウトする時は、(1)中の %s がファイル名に置き換えられ、 9.443 +%f が(2)の内容、%t が(3)の内容に置き換えられます。その際に(2)の文字列中 9.444 +の %b は「出力開始ページ」、(3)の文字列中の %e は「出力終了ページ」に置 9.445 +き換えられます。もし、ページを指定しない時には、%f, %t 両方とも無視され 9.446 +ます。 9.447 + 9.448 + この、dviprint-command-format を臨時に変えたい時は、LaTeX のソーステ 9.449 +キスト中の任意の場所に、 9.450 9.451 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2 9.452 9.453 -のように書いて下さい。プリントアウトするページ範囲をいちいち聞かせないよう 9.454 -にする時に 9.455 +のように書いて下さい。プリントアウトするページ範囲をいちいち聞かせない 9.456 +ようにする時に 9.457 9.458 %#LPR dvi2ps %s | lpr 9.459 9.460 @@ -454,15 +469,30 @@ 9.461 9.462 LaTeX 文書に関連するコマンドは以下の %# 記法で指定することができます。 9.463 9.464 + `%#PREVIEW' 9.465 + 9.466 + ... Command line for DVI viewing ([prefix] t p) 9.467 `%#BIBTEX' 9.468 - 9.469 - ... makeindexを行なうコマンドライン([prefix] t b) 9.470 + 9.471 + ... makeindexを行なうコマンドライン([prefix] t b) 9.472 `%#MAKEINDEX' 9.473 - 9.474 - ... bibtexを行なうコマンドライン([prefix] t i) 9.475 - 9.476 -行頭がこれらのキーワードで始まる行をLaTeX文書の先頭付近に書いておけば、そ 9.477 -れで指定したコマンドを起動できます。 9.478 + 9.479 + ... bibtexを行なうコマンドライン([prefix] t i) 9.480 + `%#DVIPDF' 9.481 + 9.482 + ... DVIからPDF変換を行なうコマンドライン([prefix] t d) 9.483 + `%#LPR' 9.484 + 9.485 + ... 印刷用のコマンドライン([prefix] t l) 9.486 + `%#PDFVIEW' 9.487 + 9.488 + ... PDFファイルを見るためのコマンドライン 9.489 + `%#IMAGEDPI' 9.490 + 9.491 + ... 即時プレヴュー(on-the-fly preview)用の画像のDPI 9.492 + 9.493 +行頭がこれらのキーワードで始まる行をLaTeX文書の先頭付近に書いておけば、 9.494 +それで指定したコマンドを起動できます。 9.495 9.496 9.497 9.498 @@ -480,10 +510,11 @@ 9.499 9.500 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR 9.501 9.502 -というメニューが出て来るので、`%#!'に続くコマンドを変更したい時には`!'を、 9.503 -`%#LPR'で lpr フォーマットを変えたい時は`l'を、あらかじめ設定したリジョン 9.504 -を `%#BEGIN' 〜 `%#END' で括りたい時は、`b'を押します。`b'を選んだ時には、 9.505 -それまでバッファ中に置かれていた`%#BEGIN', `%#END' が自動的に消去されます。 9.506 +というメニューが出て来るので、`%#!'に続くコマンドを変更したい時には 9.507 +`!'を、`%#LPR'で lpr フォーマットを変えたい時は`l'を、あらか 9.508 +じめ設定したリジョンを `%#BEGIN' 〜 `%#END' で括りたい時は、 9.509 +`b'を押します。`b'を選んだ時には、それまでバッファ中に置かれていた 9.510 +`%#BEGIN', `%#END' が自動的に消去されます。 9.511 9.512 9.513 9.514 @@ -492,20 +523,21 @@ 9.515 補完入力 9.516 ******** 9.517 9.518 - LaTeX での環境名などは、野鳥の補完機能を利用して能率的に入力することがで 9.519 -きます。 9.520 + LaTeX での環境名などは、野鳥の補完機能を利用して能率的に入力すること 9.521 +ができます。 9.522 9.523 * Menu: 9.524 9.525 -* begin型補完:: 9.526 -* section型補完:: 9.527 -* large型補完:: 9.528 -* maketitle型補完:: 9.529 +* begin型補完:: 9.530 +* section型補完:: 9.531 +* large型補完:: 9.532 +* maketitle型補完:: 9.533 * Arbitrary completion:: 随時補完 9.534 -* end補完:: 9.535 +* end補完:: 9.536 * Accent mark completion:: アクセント記号補完 9.537 * Image completion:: 数式記号イメージ補完 9.538 * Greek letter completion:: ギリシャ文字補完 9.539 +* Inserting parens:: 9.540 9.541 9.542 9.543 @@ -514,14 +546,14 @@ 9.544 begin型補完 9.545 =========== 9.546 9.547 - `\begin{env}...\end{env}'の様な形式の入力の補完をbegin型補完と呼ぶことに 9.548 -します。begin 型補完は、 9.549 + `\begin{env}...\end{env}'の様な形式の入力の補完をbegin型補完と呼ぶこ 9.550 +とにします。begin 型補完は、 9.551 9.552 `[prefix] b' 9.553 ... begin 型補完開始(標準では `C-c b') 9.554 9.555 -で始まります。頻繁に用いられる次の LaTeX 環境の補完は、[prefix] `b' に続く 9.556 -次の1文字を入力するだけで、`\begin{xxx}...\end{xxx}'を完成させます。 9.557 +で始まります。頻繁に用いられる次の LaTeX 環境の補完は、[prefix] `b'に続 9.558 +く次の1文字を入力するだけで、`\begin{xxx}...\end{xxx}'を完成させます。 9.559 9.560 `[prefix] b c' 9.561 ... `\begin{center}...\end{center}' 9.562 @@ -558,8 +590,8 @@ 9.563 `[prefix] b V' 9.564 ... `\begin{verse}...\end{verse}' 9.565 9.566 - 上記のもの以外の環境名は Emacs の持つインクリメンタルな補完機能を用いて 9.567 -入力します(上記の環境名も以下の補完入力可能)。 9.568 + 上記のもの以外の環境名は Emacs の持つインクリメンタルな補完機能を用い 9.569 +て入力します(上記の環境名も以下の補完入力可能)。 9.570 9.571 `[prefix] b SPC' 9.572 ... begin 型補完入力 9.573 @@ -568,39 +600,43 @@ 9.574 9.575 Begin environment(default document): 9.576 9.577 -と表示されます。ここで、何も入れずにリターンキーのみ押すと、括弧内に出てい 9.578 -るデフォルトの環境名が入力されますが、適当な環境名を入力すると、`\begin{環 9.579 -境名} … \end{環境名}'が文書中に挿入されます。ミニバッファで環境名を入力す 9.580 -るときに、環境名の頭文字を入力し「スペース」をたたくと、一致する環境名が内 9.581 -部テーブルに存在した場合、正しい環境名に補完されるので、入力の手間が省けま 9.582 -す。内部テーブルに存在しない環境名を入力した時はユーザ専用のテーブルに登録 9.583 -され、さらにそのテーブルを自動的に、ユーザ辞書(デフォルトでは 9.584 -`~/.yatexrc')に保存します。 9.585 - 9.586 -さらに、特定の環境を補完入力した時にはその環境で必ず用いられるエントリを自 9.587 -動挿入します(例: `itemize'環境における`\item'など)。挿入されたエントリが不 9.588 -要な場合にはundoによって消去して下さい。 9.589 +と表示されます。ここで、何も入れずにリターンキーのみ押すと、括弧内に出 9.590 +ているデフォルトの環境名が入力されますが、適当な環境名を入力すると、 9.591 +`\begin{環境名} … \end{環境名}'が文書中に挿入されます。ミニバッファで 9.592 +環境名を入力するときに、環境名の頭文字を入力し「スペース」をたたくと、 9.593 +一致する環境名が内部テーブルに存在した場合、正しい環境名に補完されるの 9.594 +で、入力の手間が省けます。内部テーブルに存在しない環境名を入力した時は 9.595 +ユーザ専用のテーブルに登録され、さらにそのテーブルを自動的に、ユーザ辞 9.596 +書(デフォルトでは `~/.yatexrc')に保存します。 9.597 + 9.598 +さらに、特定の環境を補完入力した時にはその環境で必ず用いられるエントリ 9.599 +を自動挿入します(例: `itemize'環境における`\item'など)。挿入されたエン 9.600 +トリが不要な場合にはundoによって消去して下さい。 9.601 9.602 9.603 既に書いたテキストを環境で括る 9.604 ------------------------------ 9.605 9.606 - ところで、最初に書いてしまったブロックを後から、itemize 環境の中に閉じこ 9.607 -めたいと思うことがありますが、そのようなときは、あらかじめ閉じこめたい段落 9.608 -をマークして、begin 型補完の各コマンドの `[prefix]' の次の『小文字の 'b'』 9.609 -を『大文字』に変えて起動して下さい。(または、`C-u' を先に打ち、universal 9.610 -argument をつけても可能です) 9.611 - 9.612 - 例えばあるパラグラフを description 環境の中に入れたいときは、そのパラグ 9.613 -ラフをマークしてから、 9.614 - 9.615 -`[prefix] B D' 9.616 -`(または ESC 1 [prefix] b D)' 9.617 -`(または C-u [prefix] b D など)' 9.618 - 9.619 -とタイプしてください。これは、`[prefix] b SPC'の補完入力にもあてはまり、 9.620 -`b' を大文字に変えて、`[prefix] B SPC' とタイプすれば、あらかじめマークし 9.621 -ておいたリジョンを、begin と end の環境で括ります。 9.622 + ところで、最初に書いてしまったブロックを後から、itemize 環境の中 9.623 +に閉じこめたいと思うことがありますが、そのようなときは、あらかじめ 9.624 +閉じこめたい段落をマークして、begin 型補完の各コマンドの `[prefix]' 9.625 +の次の『小文字の 'b'』 を『大文字』に変えて起動して下さい。(または、 9.626 +`C-u' を先に打ち、universal argument をつけても可能です) 9.627 + 9.628 + 例えばあるパラグラフを description 環境の中に入れたいときは、そのパラ 9.629 +グラフをマークしてから、補完機能を呼び出してください(description環境の 9.630 +場合は `[prefix] b D')。 9.631 + 9.632 +選択された領域を括ります。ただしこれは `transient-mark-mode' が t 9.633 +(Emacsの標準)になっている場合のみで、普段 9.634 +`transient-mark-mode' を `nil' にしている場合は、 9.635 +補完キー前に `universal-argument' 指定(`C-u') 9.636 +をタイプしてから `[prefix] b D' など、補完キーを 9.637 +タイプすれば括り補完になります。 9.638 +なおEmacs22以降であれば `transient-mark-mode' 無効時も 9.639 +`set-mark-command' (`C-space')の連打で一時的に 9.640 +`transient-mark-mode' が有効になります。 9.641 + 9.642 9.643 9.644 9.645 @@ -609,8 +645,8 @@ 9.646 section型補完 9.647 ============= 9.648 9.649 - `\section{目的}' のような形式の入力の補完を section 型補完と呼ぶことにし 9.650 -ます。section 型補完は、 9.651 + `\section{目的}' のような形式の入力の補完を section 型補完と呼ぶこと 9.652 +にします。section 型補完は、 9.653 9.654 `[prefix] s' 9.655 ... section 型補完 9.656 @@ -620,15 +656,15 @@ 9.657 9.658 (C-v for view-section) \???{} (default documentclass): 9.659 9.660 -というプロンプトが現れるので、そこで `section' のような LaTeX コマンド名を 9.661 -入力します。ここでもリターンキーのみで括弧内のデフォルト値が選択されるほか、 9.662 -`chapter'などのような頻度の高い名称入力にはスペースキーによる補完機能が有 9.663 -効です。 次に、{}の中身の入力を促す、 9.664 +というプロンプトが現れるので、そこで `section' のような LaTeX コマンド 9.665 +名を入力します。ここでもリターンキーのみで括弧内のデフォルト値が選択さ 9.666 +れるほか、`chapter'などのような頻度の高い名称入力にはスペースキーによる 9.667 +補完機能が有効です。 次に、{}の中身の入力を促す、 9.668 9.669 \section{???}: 9.670 9.671 -というプロンプトが現れるので、セクションのタイトルなどを入力します。たとえ 9.672 -ば、 9.673 +というプロンプトが現れるので、セクションのタイトルなどを入力します。た 9.674 +とえば、 9.675 9.676 (C-v for view-section) \???{} (default documentclass): section 9.677 \section{???}: 目的 9.678 @@ -650,7 +686,7 @@ 9.679 9.680 * Menu: 9.681 9.682 -* 2個以上の引数をとる section型コマンド:: 9.683 +* 2個以上の引数をとる section型コマンド:: 9.684 * Enclose section-type command:: 括り補完 9.685 * Recursive completion:: 再帰補完 9.686 * view-sectioning:: セクション区切りのアウトライン表示 9.687 @@ -663,10 +699,10 @@ 9.688 2個以上の引数をとる section型コマンド 9.689 ------------------------------------- 9.690 9.691 - ところで、`\addtolength{\topmargin}{8mm}' などのように、引数を二つ以上取 9.692 -る LaTeX コマンドがあります。このようなコマンドの補完入力には、 section 型 9.693 -補完呼び出しに引数を付けてください。例えば上の`addtolength' の例であれば、 9.694 -引数2を指定します。つまり、 9.695 + ところで、`\addtolength{\topmargin}{8mm}' などのように、引数を二つ以 9.696 +上取る LaTeX コマンドがあります。このようなコマンドの補完入力には、 9.697 +section 型補完呼び出しに引数を付けてください。例えば上の`addtolength'の 9.698 +例であれば、引数2を指定します。つまり、 9.699 9.700 C-u 2 [prefix] s (または、ESC 2 [prefix] s) 9.701 9.702 @@ -676,12 +712,13 @@ 9.703 \addtolength{???}: \topmargin 9.704 Argument 2: 8mm 9.705 9.706 -のように入力してください。最初の addtolength の部分と、第一引数である 9.707 -\topmargin の入力は当然スペースによる補完入力が可能です。ユーザ辞書に登録 9.708 -される LaTeX コマンドには、この引数の数も学習されるので、最初の補完の時引 9.709 -数の数を指定して起動しておけば、以後の補完時には、記憶された個数だけ引数を 9.710 -聞いて来るようになります。あとで引数の個数を変えたい時は、再び `C-u' を用 9.711 -いて個数を指定し直すことで、自動的に辞書中の引数の個数の部分を更新します。 9.712 +のように入力してください。最初の addtolength の部分と、第一引数である 9.713 +topmargin の入力は当然スペースによる補完入力が可能です。ユーザ辞書に登 9.714 +録される LaTeX コマンドには、この引数の数も学習されるので、最初の補完の 9.715 +時引数の数を指定して起動しておけば、以後の補完時には、記憶された個数だ 9.716 +け引数を聞いて来るようになります。あとで引数の個数を変えたい時は、再び 9.717 +`C-u' を用いて個数を指定し直すことで、自動的に辞書中の引数の個数の部分 9.718 +を更新します。 9.719 9.720 9.721 9.722 @@ -691,8 +728,11 @@ 9.723 既に書いたテキストを括る 9.724 ------------------------ 9.725 9.726 - また、起動コマンドの`s'を大文字に変えて起動すると、あらかじめ書いた文章 9.727 -を section 型コマンドの第一引数として括ります。 9.728 + また、section型補完機能の呼び出し時に領域選択状態にしておくと 9.729 +領域内のテキストを section 型コマンドの第一引数として括ります。 9.730 +これも普段 `transient-mark-mode' を `nil' にしている場合は 9.731 +`C-u' のあとに補完キーをタイプすれば強制的に括り補完になります。 9.732 + 9.733 9.734 9.735 9.736 @@ -701,10 +741,10 @@ 9.737 再帰補完 9.738 -------- 9.739 9.740 - 高度な使い方になるかもしれませんが、section型補完の引数の入力時にさらに 9.741 -補完入力を利用することができます(section/large/maketitle型に限る)。section 9.742 -型コマンドの引数に更に LaTeX コマンドが来る場合にはミニバッファで野鳥の補 9.743 -完キーを再帰的に入力することで引数の入力も効率的に行なえます。 9.744 + 高度な使い方になるかもしれませんが、section型補完の引数の入力時にさら 9.745 +に補完入力を利用することができます(section/large/maketitle型に限る)。 9.746 +section型コマンドの引数に更に LaTeX コマンドが来る場合にはミニバッファ 9.747 +で野鳥の補完キーを再帰的に入力することで引数の入力も効率的に行なえます。 9.748 9.749 9.750 9.751 @@ -713,27 +753,28 @@ 9.752 セクション区切りのアウトライン表示 9.753 ---------------------------------- 9.754 9.755 - 通常のsection型補完の時にミニバッファで`C-v'を押すと現在存在するセクショ 9.756 -ン区切りコマンド全てを `*Sectioning Lines*'というバッファに一覧表示します 9.757 -(「<<--」のついている行がもっとも近いセクション区切り)。この時ミニバッファ 9.758 -で`C-p', `C-n' を押すと`part', `chapter', ..., `subparagraph' のコマンドが 9.759 -論理階層の高さにしたがって上下します。また、`C-v', `M-v' を押すとセクショ 9.760 -ン区切り一覧バッファがスクロールし、数字の`0'〜`7'を押すとある高さ以上のセ 9.761 -クション区切りだけを選んで表示します(実際にやって見れば分かります)。 9.762 + 通常のsection型補完の時にミニバッファで`C-v'を押すと現在存在するセク 9.763 +ション区切りコマンド全てを `*Sectioning Lines*'というバッファに一覧表示 9.764 +します(「<<--」のついている行がもっとも近いセクション区切り)。この時ミ 9.765 +ニバッファで`C-p', `C-n' を押すと`part', `chapter', ..., 9.766 +`subparagraph' のコマンドが論理階層の高さにしたがって上下します。また、 9.767 +`C-v', `M-v' を押すとセクション区切り一覧バッファがスクロールし、数字の 9.768 +`0'〜`7'を押すとある高さ以上のセクション区切りだけを選んで表示します(実 9.769 +際にやって見れば分かります)。 9.770 9.771 `*Sectioning Lines*'バッファは、 9.772 9.773 `M-x YaTeX-section-overview' 9.774 ... セクション区切り一覧バッファを生成 9.775 9.776 -で作成することができます。このバッファを選択し任意の行でスペースを押すと、 9.777 -該当するセクション区切りのある本文中の場所にジャンプします。さらに、同バッ 9.778 -ファで `u' を押すと、ソーステキストの対応するセクションコマンドが一階層上 9.779 -がり(例: subsection が section に変わる)、`d'を押すと一階層下がります。 9.780 -`*Sectioning Lines*'バッファにあるセクション区切りの行をマークしておいて 9.781 -`U'を押すとリジョン内のものに対応するソーステキストのセクションコマンドす 9.782 -べてが一階層上がり、`D'を押すと下がります。セクション区切り一覧バッファで 9.783 -利用できるキーコマンドには以下のものがあります。 9.784 +で作成することができます。このバッファを選択し任意の行でスペースを押す 9.785 +と、該当するセクション区切りのある本文中の場所にジャンプします。さらに、 9.786 +同バッファで `u' を押すと、ソーステキストの対応するセクションコマンドが 9.787 +一階層上がり(例: subsection が section に変わる)、`d'を押すと一階層下が 9.788 +ります。`*Sectioning Lines*'バッファにあるセクション区切りの行をマーク 9.789 +しておいて`U'を押すとリジョン内のものに対応するソーステキストのセクショ 9.790 +ンコマンドすべてが一階層上がり、`D'を押すと下がります。セクション区切り 9.791 +一覧バッファで利用できるキーコマンドには以下のものがあります。 9.792 9.793 `SPC' 9.794 ... 対応するソース行へジャンプ 9.795 @@ -758,12 +799,13 @@ 9.796 ラベル自動生成 9.797 -------------- 9.798 9.799 - `\ref{}' や `\cite{}' マクロをsection型補完で入れた場合参照先となり得る 9.800 -ものを全て探してメニューにして選択できます。参照先には`\label{}'をつけてお 9.801 -く必要はありません。もしあれば、そのラベルを使い、なければその場で参照先に 9.802 -`\label{}'を作らせてくれます。ラベル名を考えるのは苦痛に感じるものです。全 9.803 -てのカウンタにラベルをつけるのもたいへんです。もうラベル名に何をつけるか、 9.804 -ラベルをつけるかつけまいか、などということは忘れましょう! 9.805 + `\ref{}' や `\cite{}' マクロをsection型補完で入れた場合参照先となり得 9.806 +るものを全て探してメニューにして選択できます。参照先には`\label{}'をつ 9.807 +けておく必要はありません。もしあれば、そのラベルを使い、なければその場 9.808 +で参照先に`\label{}'を作らせてくれます。ラベル名を考えるのは苦痛に感じ 9.809 +るものです。全てのカウンタにラベルをつけるのもたいへんです。もうラベル 9.810 +名に何をつけるか、ラベルをつけるかつけまいか、などということは忘れましょ 9.811 +う! 9.812 9.813 9.814 9.815 @@ -782,18 +824,17 @@ 9.816 {\??? } (default large): 9.817 9.818 9.819 -と表示されるので、上記のものと同じ要領で補完入力して下さい。補完候補に用意 9.820 -されているのは、`footnotesize' や `huge' のような文字サイズ指定子と、`bf' 9.821 -や`dg'のようなフォント指定子です。 9.822 +と表示されるので、上記のものと同じ要領で補完入力して下さい。補完候補に 9.823 +用意されているのは、`footnotesize' や `huge' のような文字サイズ指定子と、 9.824 +`bf'や`dg'のようなフォント指定子です。 9.825 9.826 9.827 既に書いた文字を括る 9.828 -------------------- 9.829 9.830 - また、begin型補完の時と同様、先に書いてしまった一連の文章の文字のサイズ 9.831 -を変えたいと思う時がありますが、そのような時は、サイズや大きさを変えたい文 9.832 -字の範囲をマークしてから、呼び出しキーを `[prefix] L' と、大文字の L に変 9.833 -えて呼び出せば、そのリジョン全体が、ブレースで囲まれます。 9.834 + また、begin型補完の時と同様、先に書いてしまった一連の文章の文字のサイ 9.835 +ズを変えたいと思う時がありますが、そのような時は、サイズや大きさを変え 9.836 +たい文字の範囲をマークしてからlarge型補完を呼んでください。 9.837 9.838 9.839 9.840 @@ -807,8 +848,8 @@ 9.841 `[prefix] m' 9.842 ... maketitle 型補完開始 9.843 9.844 -で、maketitle 型補完を開始します。補完の要領は今までのものとまったく同じで 9.845 -す。LaTeX 用のコマンド名が補完候補として用意されています。 9.846 +で、maketitle 型補完を開始します。補完の要領は今までのものとまったく同 9.847 +じです。LaTeX 用のコマンド名が補完候補として用意されています。 9.848 9.849 9.850 9.851 @@ -817,15 +858,15 @@ 9.852 随時補完 9.853 ======== 9.854 9.855 - さて、今まで述べた典型的な LaTeX コマンド形式の補完入力を用いずに、今入 9.856 -力しようとしている LaTeX コマンドを文書中の任意の位置で随時補完することも 9.857 -できます。LaTeX コマンド(先頭が\で始まる)を入力している途中で、 9.858 + さて、今まで述べた典型的な LaTeX コマンド形式の補完入力を用いずに、今 9.859 +入力しようとしている LaTeX コマンドを文書中の任意の位置で随時補完するこ 9.860 +ともできます。LaTeX コマンド(先頭が\で始まる)を入力している途中で、 9.861 9.862 `[prefix] SPC' 9.863 ... 随時補完 9.864 9.865 -を入力すれば、全ての補完候補の中から一致するものが選ばれカーソル位置に挿入 9.866 -されます。 9.867 +を入力すれば、全ての補完候補の中から一致するものが選ばれカーソル位置に 9.868 +挿入されます。 9.869 9.870 9.871 9.872 @@ -835,9 +876,9 @@ 9.873 ======= 9.874 9.875 現在開いたままの環境名を自動的に検出し、`\end{環境名}'を挿入します。 9.876 -begin 型補完を用いれば環境の閉じ忘れはないのですが、時にはついつい手で 9.877 -`\begin{環境名}' を入れてしまい、悲しい思いをすることがあります。そのよう 9.878 -な時には気にせず続けて文章を入力し、しかるのちに 9.879 +begin 型補完を用いれば環境の閉じ忘れはないのですが、時にはついつい手で 9.880 +`\begin{環境名}' を入れてしまい、悲しい思いをすることがあります。そのよ 9.881 +うな時には気にせず続けて文章を入力し、しかるのちに 9.882 9.883 `[prefix] e' 9.884 ... end 補完 9.885 @@ -860,8 +901,8 @@ 9.886 9.887 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b 9.888 9.889 -というメニューが出て来るので、数字、または対応する記号/英字を入力して下さ 9.890 -い。すると編集バッファに、 9.891 +というメニューが出て来るので、数字、または対応する記号/英字を入力して下 9.892 +さい。すると編集バッファに、 9.893 9.894 \`{} 9.895 9.896 @@ -879,17 +920,17 @@ 9.897 ==================== 9.898 9.899 主に数式モードで使用される、矢印やΣなどの記号を擬似的に表現するキー入力 9.900 -で、LaTeX コマンドを入力できます。これは野鳥自身の「数式モード」でのみ動作 9.901 -します。野鳥はカーソルがTeXの数式環境の中にある時に`;'や、`:'に特殊な機能 9.902 -を持たせます。 9.903 - 9.904 - さて、例えば、←(leftarrow)をASCII文字だけで表現する場合、一般的には「<-」 9.905 -のようにしますが、これを利用して、数式記号イメージ入力モードで`\leftarrow' 9.906 -を入力するには、`;'(セミコロン)を打ってから`<-'と入力します。同様に、長い 9.907 -矢印←-(long-leftarrow) をASCII文字だけで表現する場合「<--」とするので、 9.908 -`\longleftarrow'を入力するためには、`;<--' と入力します。あるいは無限大記 9.909 -号をASCII文字だけで表現する時は「oo」のようにすることから、`\infty' を入力 9.910 -する時は、`;oo'とキー入力します。 9.911 +で、LaTeX コマンドを入力できます。これは野鳥自身の「数式モード」でのみ 9.912 +動作します。野鳥はカーソルがTeXの数式環境の中にある時に`;'や、 9.913 +`:'に特殊な機能を持たせます。 9.914 + 9.915 + さて、例えば、←(leftarrow)をASCII文字だけで表現する場合、一般的には 9.916 +「<-」のようにしますが、これを利用して、数式記号イメージ入力モードで 9.917 +`\leftarrow'を入力するには、`;'(セミコロン)を打ってから`<-'と入力します。 9.918 +同様に、長い矢印←-(long-leftarrow) をASCII文字だけで表現する場合「<--」 9.919 +とするので、`\longleftarrow'を入力するためには、`;<--'と入力します。あ 9.920 +るいは無限大記号をASCII文字だけで表現する時は「oo」のようにすることから、 9.921 +`\infty' を入力する時は、`;oo'とキー入力します。 9.922 9.923 これらの操作をまとめると次のようになります。 9.924 9.925 @@ -902,16 +943,18 @@ 9.926 9.927 9.928 9.929 - いずれの場合も、イメージ入力を行っている途中で望みのものがバッファに表示 9.930 -されたなら、そこでイメージ入力を止めて次の編集動作に移っても構いません。 9.931 - 9.932 - 数式環境中で`;'自身を入力するには`;;'のようにします。イメージ入力の途中 9.933 -でTABを押すと、それまで入力した文字で始まるもの一覧が表示されます。ここで 9.934 -目的の LaTeX コマンドまでカーソルを移動し再度TABを押すことでその LaTeX コ 9.935 -マンドがバッファに挿入されます。 9.936 - 9.937 - どのキー入力にどの記号が対応しているか全て知りたい時は、`;'を押した直後 9.938 -にTABを押してください。以下の例は、`;<'と押した後にTABを押したものです。 9.939 + いずれの場合も、イメージ入力を行っている途中で望みのものがバッファに 9.940 +表示されたなら、そこでイメージ入力を止めて次の編集動作に移っても構いま 9.941 +せん。 9.942 + 9.943 + 数式環境中で`;'自身を入力するには`;;'のようにします。イメージ入力の途 9.944 +中でTABを押すと、それまで入力した文字で始まるもの一覧が表示されます。こ 9.945 +こで目的の LaTeX コマンドまでカーソルを移動し再度TABを押すことでその 9.946 +LaTeX コマンドがバッファに挿入されます。 9.947 + 9.948 + どのキー入力にどの記号が対応しているか全て知りたい時は、`;'を押した直 9.949 +後にTABを押してください。以下の例は、`;<'と押した後にTABを押したもので 9.950 +す。 9.951 9.952 KEY LaTeX sequence sign 9.953 < \leq ≦ 9.954 @@ -919,35 +962,51 @@ 9.955 <- \leftarrow ← 9.956 <= \Leftarrow <= 9.957 9.958 -左から[入力キー]、[対応する LaTeX コマンド]、[(擬似)記号図示]、という順で 9.959 -メニューが出て来るので、よく使うものを覚えておくと良いでしょう。ものによっ 9.960 -てはASCII文字で表現することが困難なので、あまり覚えやすいキー並びではない 9.961 -ものがあるでしょうから、そのような場合は \maketitle 型補完で入力するか、以 9.962 -下に述べる対応表の設定を行って単純なキー並びのものを設定すると良いでしょう。 9.963 - 9.964 - 入力キーと LaTeX コマンド、記号の対応表を個人的に設定したい場合は 9.965 -Emacs-Lisp 変数 `YaTeX-math-sign-alist-private' に定義してください。その内 9.966 -容とデフォルトのものを合わせたものが対応表として使用されます(private の方 9.967 -が優先される)。なお、この変数の構造については `yatexmth.el' を参照してくだ 9.968 -さい。 9.969 +左から[入力キー]、[対応する LaTeX コマンド]、[(擬似)記号図示]、という順 9.970 +でメニューが出て来るので、よく使うものを覚えておくと良いでしょう。もの 9.971 +によってはASCII文字で表現することが困難なので、あまり覚えやすいキー並び 9.972 +ではないものがあるでしょうから、そのような場合は \maketitle 型補完で入 9.973 +力するか、以下に述べる対応表の設定を行って単純なキー並びのものを設定す 9.974 +ると良いでしょう。 9.975 + 9.976 + 入力キーと LaTeX コマンド、記号の対応表を個人的に設定したい場合は 9.977 +Emacs-Lisp 変数 `YaTeX-math-sign-alist-private' に定義してください。そ 9.978 +の内容とデフォルトのものを合わせたものが対応表として使用されます 9.979 +(privateの方が優先される)。なお、この変数の構造については 9.980 +`yatexmth.el' を参照してください。 9.981 9.982 9.983 9.984 -File: yatexj, Node: Greek letter completion, Prev: Image completion, Up: Completion 9.985 +File: yatexj, Node: Greek letter completion, Next: Inserting parens, Prev: Image completion, Up: Completion 9.986 9.987 ギリシャ文字補完 9.988 ================ 9.989 9.990 - もう一つ、数式環境中で`:'を押すとギリシャ文字入力モードに入ります。`:'を 9.991 -押した直後に`a'を押すと`\alpha'が、`g' を押すと `\gamma'が、などアルファベッ 9.992 -トに対応したギリシャ文字が挿入されます。操作方法は;の数式記号補完とまった 9.993 -く同じです。まずは`:'の直後にTABを押してどのアルファベットにどのギリシャ文 9.994 -字が対応しているか調べてみてください。 9.995 - 9.996 - `;'と`:'を数式環境中で押しているにもかかわらず、イメージ補完が働かない場 9.997 -合は、`C-u ;'のように universal-argument をつけてキーを押すことにより、強 9.998 -制的にイメージ補完に入ることができます。また、この時にどのような状態で数式 9.999 -環境内判定に失敗したかをご連絡下さい。 9.1000 + もう一つ、数式環境中で`:'を押すとギリシャ文字入力モードに入ります。 9.1001 +`:'を押した直後に`a'を押すと`\alpha'が、`g' を押すと `\gamma'が、などア 9.1002 +ルファベットに対応したギリシャ文字が挿入されます。操作方法は;の数式記号 9.1003 +補完とまったく同じです。まずは`:'の直後にTABを押してどのアルファベット 9.1004 +にどのギリシャ文字が対応しているか調べてみてください。 9.1005 + 9.1006 + `;'と`:'を数式環境中で押しているにもかかわらず、イメージ補完が働かな 9.1007 +い場合は、`C-u ;'のように universal-argument をつけてキーを押すことによ 9.1008 +り、強制的にイメージ補完に入ることができます。また、この時にどのような 9.1009 +状態で数式環境内判定に失敗したかをご連絡下さい。 9.1010 + 9.1011 + 9.1012 + 9.1013 +File: yatexj, Node: Inserting parens, Prev: Greek letter completion, Up: Completion 9.1014 + 9.1015 +括弧入力補助 9.1016 +============ 9.1017 + 9.1018 + 3種類ある括弧 () {} [] の開き括弧を入れたときに閉じ括弧を自動的に入れ 9.1019 +ます。`\' の直後にの `[' を入れると行を分けてインデントを揃え、数式入力 9.1020 +に備えます。その他 LaTeX のマクロに応じて括弧の釣合の取れた状態に導きま 9.1021 +す。開き括弧そのものを1つだけ入れたいときは `C-q' でクォート入力するか、 9.1022 +`[prefix] w m' で修正モードをOFFにしてください。 9.1023 + 9.1024 + 領域選択してから開き括弧を入れるとその領域をその種類の括弧で括ります。 9.1025 9.1026 9.1027 9.1028 @@ -956,23 +1015,23 @@ 9.1029 ローカル辞書 9.1030 ************ 9.1031 9.1032 - 補完入力用の候補は三種類の辞書から構成されています。一つは`yatex.el'に組 9.1033 -み込まれた「標準辞書」、もう一つはユーザが個人的に常用するコマンドを保存す 9.1034 -る「ユーザ辞書」、そしてもうひとつはあるディレクトリでのみ有効なコマンドを 9.1035 -保存する「ローカル辞書」です。 9.1036 - 9.1037 - 補完入力時に新しい単語を入れた場合に、その単語をどの辞書に入れるか聞いて 9.1038 -来ます。 9.1039 + 補完入力用の候補は三種類の辞書から構成されています。一つは`yatex.el' 9.1040 +に組み込まれた「標準辞書」、もう一つはユーザが個人的に常用するコマンド 9.1041 +を保存する「ユーザ辞書」、そしてもうひとつはあるディレクトリでのみ有効 9.1042 +なコマンドを保存する「ローカル辞書」です。 9.1043 + 9.1044 + 補完入力時に新しい単語を入れた場合に、その単語をどの辞書に入れるか聞 9.1045 +いて来ます。 9.1046 9.1047 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard 9.1048 9.1049 -というプロンプトに対し、`u'と答えると「ユーザ辞書」を、`l'と答えるとローカ 9.1050 -ル辞書を更新し、`n'と答えると辞書ファイルは更新せず現在のEmacs セッション 9.1051 -のみ有効な単語とし、`d'と答えると新たな単語を学習せずに捨てることになりま 9.1052 -す。 9.1053 - 9.1054 - もし、ローカル辞書の機能はいらず、全てユーザ辞書の更新のみでよいと言う場 9.1055 -合には`~/.emacs'などで、 9.1056 +というプロンプトに対し、`u'と答えると「ユーザ辞書」を、`l'と答えるとロー 9.1057 +カル辞書を更新し、`n'と答えると辞書ファイルは更新せず現在のEmacsセッショ 9.1058 +ンのみ有効な単語とし、`d'と答えると新たな単語を学習せずに捨てることにな 9.1059 +ります。 9.1060 + 9.1061 + もし、ローカル辞書の機能はいらず、全てユーザ辞書の更新のみでよいと言 9.1062 +う場合には`~/.emacs'などで、 9.1063 9.1064 (setq YaTeX-nervous nil) 9.1065 9.1066 @@ -986,8 +1045,8 @@ 9.1067 ************** 9.1068 9.1069 9.1070 - LaTeXの編集には試行錯誤がつきものです。ある部分を一括でコメントアウトし 9.1071 -たり、コメントを外したりしたいことがあります。 9.1072 + LaTeXの編集には試行錯誤がつきものです。ある部分を一括でコメントアウト 9.1073 +したり、コメントを外したりしたいことがあります。 9.1074 9.1075 `[prefix] >' 9.1076 ... リジョンを % でコメントアウト 9.1077 @@ -1001,15 +1060,15 @@ 9.1078 `[prefix] ,' 9.1079 ... 現在のパラグラフのコメントを外す 9.1080 9.1081 -は、カーソルの位置するパラグラフ全体に対しての操作です。なお、ここでいう 9.1082 -「パラグラフ」は (`mark-paragraph') 関数によりマークされる範囲を指します 9.1083 -(標準設定で`ESC h'にバインドされている)。なお、既に`%'でコメントアウトされ 9.1084 -ているパラグラフに対して繰り返しパラグラフのコメントを使用した場合の動作は 9.1085 -保証しませんので御注意ください。 9.1086 - 9.1087 - さて、文章に対してだけでなく、時には`\begin', `\end' 自体に対してもコメ 9.1088 -ントアウトの操作をしたいときがあります。このようなときは、`\begin{}' ある 9.1089 -いは `\end{}' の行にカーソルを合わせ、 9.1090 +は、カーソルの位置するパラグラフ全体に対しての操作です。なお、ここでい 9.1091 +う「パラグラフ」は (`mark-paragraph') 関数によりマークされる範囲を指し 9.1092 +ます(標準設定で`ESC h'にバインドされている)。なお、既に`%'でコメントア 9.1093 +ウトされているパラグラフに対して繰り返しパラグラフのコメントを使用した 9.1094 +場合の動作は保証しませんので御注意ください。 9.1095 + 9.1096 + さて、文章に対してだけでなく、時には`\begin', `\end' 自体に対 9.1097 +してもコメントアウトの操作をしたいときがあります。このようなときは、 9.1098 +`\begin{}' あるいは `\end{}' の行にカーソルを合わせ、 9.1099 9.1100 `[prefix] >' 9.1101 ... `\begin{}'〜`\end{}' 全てコメントアウト 9.1102 @@ -1023,10 +1082,11 @@ 9.1103 `[prefix] ,' 9.1104 ... `\begin{}' と `\end{}' のコメントを外す 9.1105 9.1106 -は、対応する `\begin' と `\end' 2行だけを、コメント操作の対象とします。リ 9.1107 -ジョンをコメントアウトしようとして、マークを設定したのちにカーソルを移動し 9.1108 -`[preifx] >' を押してもカーソルが `\begin{}' の上にあると`\begin{}'〜 9.1109 -`\end{}'モードでコメント機能が働いてしまうので注意して下さい。 9.1110 +は、対応する `\begin' と `\end' 2行だけを、コメント操作の対象とします。 9.1111 +リジョンをコメントアウトしようとして、マークを設定したのちにカーソルを 9.1112 +移動し`[preifx] >' を押してもカーソルが `\begin{}' の上にあると 9.1113 +`\begin{}'〜`\end{}'モードでコメント機能が働いてしまうので注意して下さ 9.1114 +い。 9.1115 9.1116 9.1117 9.1118 @@ -1038,11 +1098,11 @@ 9.1119 9.1120 * Menu: 9.1121 9.1122 -* 対応オブジェクトへのジャンプ:: 9.1123 -* お絵描きツール起動:: 9.1124 -* メインファイルへのジャンプ:: 9.1125 -* 環境を単位としたジャンプ:: 9.1126 -* 最後の補完位置へのジャンプ:: 9.1127 +* 対応オブジェクトへのジャンプ:: 9.1128 +* お絵描きツール起動:: 9.1129 +* メインファイルへのジャンプ:: 9.1130 +* 環境を単位としたジャンプ:: 9.1131 +* 最後の補完位置へのジャンプ:: 9.1132 9.1133 9.1134 9.1135 @@ -1056,8 +1116,8 @@ 9.1136 `[prefix] g' 9.1137 ... 対応するオブジェクトにジャンプ 9.1138 9.1139 -を押すことにより、カーソル位置のLaTeXコマンドに対応する場所にジャンプしま 9.1140 -す。対応関係が存在すると解釈されるコマンドには以下のものがあります。 9.1141 +を押すことにより、カーソル位置のLaTeXコマンドに対応する場所にジャンプし 9.1142 +ます。対応関係が存在すると解釈されるコマンドには以下のものがあります。 9.1143 9.1144 * `\begin{}' ←→ `\end{}' 9.1145 * `%#BEGIN' ←→ `%#END' 9.1146 @@ -1066,22 +1126,23 @@ 9.1147 * `\include(\input)' → 対応するファイル 9.1148 * `\bibitem{}' ←→ `\cite{}' 9.1149 9.1150 - `\begin{}' か `\end{}' の行で`[prefix] g'を押すことにより、対応する 9.1151 -`end/begin'の行にジャンプします。もちろん対応するものがない場合はエラーに 9.1152 -なります。またこれは、領域固定のための `%#BEGIN' と `%#END' のペアに対して 9.1153 -も同様に動作します。なお、`label/ref'や`cite/bibitem'対応するものが別ファ 9.1154 -イルにある時は、ジャンプ先となるファイルがオープンされていなければなりませ 9.1155 -ん。*Note %#notation::. メインの .tex ファイルの `\include{chap1}' などに 9.1156 -カーソルを合わせ、`[prefix] g' を押すと、`chap1.tex' にジャンプします。 9.1157 + `\begin{}' か `\end{}' の行で`[prefix] g'を押すことに 9.1158 +より、対応する`end/begin'の行にジャンプします。もちろん対応するものが 9.1159 +ない場合はエラーになります。またこれは、領域固定のための `%#BEGIN' と 9.1160 +`%#END' のペアに対しても同様に動作します。なお、`label/ref'や 9.1161 +`cite/bibitem'対応するものが別ファイルにある時は、ジャンプ先となるファ 9.1162 +イルがオープンされていなければなりません。*Note %#notation::. 9.1163 +メインの .tex ファイルの `\include{chap1}' などにカーソルを合わせ、 9.1164 +`[prefix] g' を押すと、`chap1.tex' にジャンプします。 9.1165 9.1166 また、 9.1167 9.1168 `[prefix] 4 g' 9.1169 ... 別ウィンドウで対応オブジェクトにジャンプ 9.1170 9.1171 -を押すと、対応するオブジェクトへのジャンプを別ウィンドウで行います。ただし、 9.1172 -この機能は `begin/end', `%#BEGIN/%#END' 間のジャンプに対しては(意味がない 9.1173 -と思われるので)機能しないので注意してください。 9.1174 +を押すと、対応するオブジェクトへのジャンプを別ウィンドウで行います。た 9.1175 +だし、この機能は `begin/end', `%#BEGIN/%#END' 間のジャンプに対しては(意 9.1176 +味がないと思われるので)機能しないので注意してください。 9.1177 9.1178 9.1179 9.1180 @@ -1090,28 +1151,29 @@ 9.1181 お絵描きツール起動 9.1182 ================== 9.1183 9.1184 -上記の「画像ファイルの取り込みマクロ」とは、例えば `\epsfile{file=foo}' の 9.1185 -ような挿絵取り込みコマンドのことで、この行にカーソルを合わせて`[prefix] g' 9.1186 -を押すとその画像ファイルの元となったファイルを対応するお絵描きツールを起動 9.1187 -してオープンします。起動するツールの判定は以下のようになされます。 9.1188 - 9.1189 - 1. カレント行が変数 `YaTeX-processed-file-regexp-alist' に定義されている 9.1190 - 正規表現のいずれかとマッチしたら、ファイル名に相当する部分を \\(\\)か 9.1191 - ら抜き出して覚えておく(何番目の\\(\\)かは変数の各リストの cdr 部に入 9.1192 - れておく)。マッチしなければ何もしない。 9.1193 - 2. 行末に、変数 `YaTeX-file-processor-alist' に登録されているコマンドが 9.1194 - 「%コマンド」 のように書いてあれば強制的に「コマンド ファイル名.拡張 9.1195 - 子」を起動。 9.1196 - 3. なければ、変数 `YaTeX-file-processor-alist' の各リストのcdr部に入って 9.1197 - いる拡張子を「ファイル名」の後ろに足したファイルが存在するか順次調べ 9.1198 - て、存在した場合car部に入っているコマンドを起動する。 9.1199 +上記の「画像ファイルの取り込みマクロ」とは、例えば 9.1200 +`\epsfile{file=foo}' のような挿絵取り込みコマンドのことで、この行にカー 9.1201 +ソルを合わせて`[prefix] g'を押すとその画像ファイルの元となったファイル 9.1202 +を対応するお絵描きツールを起動してオープンします。起動するツールの判定 9.1203 +は以下のようになされます。 9.1204 + 9.1205 + 1. カレント行が変数 `YaTeX-processed-file-regexp-alist' に定義されて 9.1206 + いる正規表現のいずれかとマッチしたら、ファイル名に相当する部分を 9.1207 + (\\)から抜き出して覚えておく(何番目の\\(\\)かは変数の各リストの 9.1208 + cdr 部に入れておく)。マッチしなければ何もしない。 9.1209 + 2. 行末に、変数 `YaTeX-file-processor-alist' に登録されているコマンド 9.1210 + が「%コマンド」 のように書いてあれば強制的に「コマンド ファイル 9.1211 + 名.拡張子」を起動。 9.1212 + 3. なければ、変数 `YaTeX-file-processor-alist' の各リストのcdr部に入っ 9.1213 + ている拡張子を「ファイル名」の後ろに足したファイルが存在するか順次 9.1214 + 調べて、存在した場合car部に入っているコマンドを起動する。 9.1215 4. 以上どれかにマッチしなければあきらめる。 9.1216 9.1217 9.1218 -変数 `YaTeX-file-processor-alist' と変数 `YaTeX-file-processor-alist' の設 9.1219 -定方法についてはそれぞれの変数について describe-variable して説明を読んで 9.1220 -下さい。うまく設定すると、画像ファイルにかぎらず、任意の形式のファイルを任 9.1221 -意のプロセッサで処理するコマンドを簡単に呼び出すことができます。 9.1222 +変数 `YaTeX-file-processor-alist' と変数 `YaTeX-file-processor-alist' 9.1223 +の設定方法についてはそれぞれの変数について describe-variable して説明を 9.1224 +読んで下さい。うまく設定すると、画像ファイルにかぎらず、任意の形式のファ 9.1225 +イルを任意のプロセッサで処理するコマンドを簡単に呼び出すことができます。 9.1226 9.1227 9.1228 9.1229 @@ -1127,9 +1189,9 @@ 9.1230 `[prefix] 4 ^' 9.1231 ... 別ウィンドウでメインファイルにジャンプ 9.1232 9.1233 -を押すと、メインファイルの編集バッファに切替えます。もし、メインファイルを 9.1234 -オープンしていない場合は、カレントディレクトリから探して自動的にオープンし 9.1235 -ます。 9.1236 +を押すと、メインファイルの編集バッファに切替えます。もし、メインファイ 9.1237 +ルをオープンしていない場合は、カレントディレクトリから探して自動的にオー 9.1238 +プンします。 9.1239 9.1240 9.1241 9.1242 @@ -1147,8 +1209,8 @@ 9.1243 `M-C-@' 9.1244 ... 環境全体をマーク 9.1245 9.1246 -上記のコマンドは通常の`[prefix]'キーではなく`META'キーをプリフィクスとして 9.1247 -機能するのでご注意下さい。 9.1248 +上記のコマンドは通常の`[prefix]'キーではなく`META'キーをプリフィクスと 9.1249 +して機能するのでご注意下さい。 9.1250 9.1251 9.1252 9.1253 @@ -1157,9 +1219,10 @@ 9.1254 最後の補完位置へのジャンプ 9.1255 ========================== 9.1256 9.1257 -野鳥は補完入力した位置を常にレジスタ `3'に保存しています。入力途中で如何な 9.1258 -るファイルの如何なる位置に行ったとしても、`C-x j 3'(`jump-to-register')を 9.1259 -使って直ちに最後の補完入力位置に戻ることができます。 9.1260 +野鳥は補完入力した位置を常にレジスタ `3'に保存しています。入力途中で如 9.1261 +何なるファイルの如何なる位置に行ったとしても、`C-x j 9.1262 +3'(`jump-to-register')を使って直ちに最後の補完入力位置に戻ることができ 9.1263 +ます。 9.1264 9.1265 9.1266 9.1267 @@ -1168,8 +1231,8 @@ 9.1268 変更/削除 9.1269 ********* 9.1270 9.1271 - 既に入力されている LaTeX コマンドの変更/削除のために以下の機能が用意され 9.1272 -ています。 9.1273 + 既に入力されている LaTeX コマンドの変更/削除のために以下の機能が用意 9.1274 +されています。 9.1275 9.1276 `[prefix] c' 9.1277 ... カーソル位置の LaTeX コマンドの変更 9.1278 @@ -1177,8 +1240,8 @@ 9.1279 ... カーソル位置の LaTeX コマンドの削除 9.1280 9.1281 9.1282 -これらのコマンドは、コマンドを起動する場所によって動作を決定するので注意し 9.1283 -て下さい。 9.1284 +これらのコマンドは、コマンドを起動する場所によって動作を決定するので注 9.1285 +意して下さい。 9.1286 9.1287 * Menu: 9.1288 9.1289 @@ -1192,9 +1255,9 @@ 9.1290 LaTeX コマンドの変更 9.1291 ==================== 9.1292 9.1293 -変更したい LaTeX コマンドにカーソルを合わせて `[prefix] c' を押すとそのコ 9.1294 -マンドを補完入力などを用いて手軽に変えることができます。`[prefix] c' で変 9.1295 -更できるコマンドには以下のものがあります。 9.1296 +変更したい LaTeX コマンドにカーソルを合わせて `[prefix] c' 9.1297 +を押すとそのコマンドを補完入力などを用いて手軽に変えることができます。 9.1298 +`[prefix] c' で変更できるコマンドには以下のものがあります。 9.1299 9.1300 * `begin/end' の環境名 9.1301 * section型コマンドのコマンド名 9.1302 @@ -1203,9 +1266,9 @@ 9.1303 * large型コマンド 9.1304 * (イメージ補完で入力可能な)数式モード専用のmaketitle型コマンド 9.1305 9.1306 - 変えたいsection型コマンドの引数がさらに LaTeX コマンドを含む場合は、その 9.1307 -引数を囲む中括弧の上で `[prefix] c' を押すことで中のコマンドを変更対象判定 9.1308 -から除外することができます。 9.1309 + 変えたいsection型コマンドの引数がさらに LaTeX コマンドを含む場合は、 9.1310 +その引数を囲む中括弧の上で `[prefix] c' を押すことで中のコマンドを変更 9.1311 +対象判定から除外することができます。 9.1312 9.1313 9.1314 9.1315 @@ -1226,12 +1289,13 @@ 9.1316 括弧の上 対をなす括弧の削除 9.1317 9.1318 9.1319 -`\begin, \end' および `%#BEGIN, %#END' を削除する場合、`\begin, \end' や 9.1320 -`%#BEGIN, %#END' の存在する行はまるごと削除されるので、それらの一行に 9.1321 -`\begin' などを二つ以上連ねて書かないように注意してください。上記のものは 9.1322 -すべて本文を囲う「容器」を削除するように働きますが、universal-argument 9.1323 -(`C-u') を打った後で`[prefix] k'をタイプすると、それぞれの「容器」に含まれ 9.1324 -る「中身」も一気に削除します。以下の例を参考にして下さい。 9.1325 +`\begin, \end' および `%#BEGIN, %#END' を削除する場合、`\begin, \end' 9.1326 +や `%#BEGIN, %#END' の存在する行はまるごと削除されるので、それらの一行 9.1327 +に `\begin' などを二つ以上連ねて書かないように注意してください。上記の 9.1328 +ものはすべて本文を囲う「容器」を削除するように働きますが、 9.1329 +universal-argument (`C-u') を打った後で`[prefix] k'をタイプすると、それ 9.1330 +ぞれの「容器」に含まれる「中身」も一気に削除します。以下の例を参考にし 9.1331 +て下さい。 9.1332 9.1333 元のテキスト: [prefix] k C-u [prefix] k 9.1334 本文\footnote{脚注}です。 本文脚注です。 本文です。 9.1335 @@ -1248,21 +1312,21 @@ 9.1336 itemの桁揃え 9.1337 ============ 9.1338 9.1339 - itemize 環境中にある`\item'の項目(文章)が複数行に渡る場合に、項目の先頭 9.1340 -を桁揃えしたい場合には、 9.1341 + itemize 環境中にある`\item'の項目(文章)が複数行に渡る場合に、項目の先 9.1342 +頭を桁揃えしたい場合には、 9.1343 9.1344 9.1345 `M-q' 9.1346 ... 桁揃え 9.1347 9.1348 -によって、その item のインデントの深さに応じて fill されます。なお、古い 9.1349 -NTT jTeX を使用している場合には、Lisp 変数`NTT-jTeX'を`t'にセットして下さ 9.1350 -い。 9.1351 - 9.1352 - このとき、変数`YaTeX-item-regexp'の値(標準では `"\\\\item"')を項目指定コ 9.1353 -マンドの正規表現として検索に使用します。itemize 環境で、独自のコマンドを定 9.1354 -義して項目を列挙している場合(例えば`\underlineitem')は、`~/.emacs' で次の 9.1355 -ように指定して下さい。 9.1356 +によって、その item のインデントの深さに応じて fill されます。なお、古 9.1357 +いNTT jTeX を使用している場合には、Lisp 変数`NTT-jTeX'を`t'にセットして 9.1358 +下さい。 9.1359 + 9.1360 + このとき、変数`YaTeX-item-regexp'の値(標準では `"\\\\item"')を 9.1361 +項目指定コマンドの正規表現として検索に使用します。itemize 環境で、独自のコ 9.1362 +マンドを定義して項目を列挙している場合(例えば`\underlineitem')は、 9.1363 +`~/.emacs' で次のように指定して下さい。 9.1364 9.1365 (setq YaTeX-item-regexp 9.1366 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)") 9.1367 @@ -1271,8 +1335,8 @@ 9.1368 この変数の指定の仕方がよく分からない場合は、独自の項目列挙コマンドの名前を 9.1369 ``"\item"'で始まるものにして下さい(例えば"\itembf"')。 9.1370 9.1371 -野鳥の `M-q' では `\item' を環境に応じて以下のように「ハングインデント」し 9.1372 -ます。 9.1373 +野鳥の `M-q' では `\item' を環境に応じて以下のように「ハングインデント」 9.1374 +します。 9.1375 9.1376 itemize, enumerate環境: 9.1377 >\item[ほげほげ] 英語では、特に意味のない単語を `foo' であらわしま 9.1378 @@ -1287,12 +1351,13 @@ 9.1379 パラグラフの桁揃え 9.1380 ================== 9.1381 9.1382 - itemize環境以外でのパラグラフの桁揃え(fill)は、基本的に他のモードと同じ 9.1383 -ように機能しますが、verbatim環境や、tabular環境など桁揃えをすると悲惨な状 9.1384 -況になるような環境中では機能しません。また、\verb で括ってあるものは決して 9.1385 -行分割されません(変数 `YaTeX-verb-regexp' で制御) )。さらに、一時的にイン 9.1386 -デントの深さを変えてある箇所では、そのインデントの先頭で`M-q'を押すことに 9.1387 -より fill-prefix をいちいち変更しなくて桁揃えができます。 9.1388 + itemize環境以外でのパラグラフの桁揃え(fill)は、基本的に他のモードと同 9.1389 +じように機能しますが、verbatim環境や、tabular環境など桁揃えをすると悲惨 9.1390 +な状況になるような環境中では機能しません。また、\verb で括ってあるもの 9.1391 +は決して行分割されません(変数 `YaTeX-verb-regexp' で制御) )。さらに、一 9.1392 +時的にインデントの深さを変えてある箇所では、そのインデントの先頭で 9.1393 +`M-q'を押すことにより fill-prefix をいちいち変更しなくて桁揃えができま 9.1394 +す。 9.1395 9.1396 9.1397 9.1398 @@ -1306,22 +1371,23 @@ 9.1399 9.1400 \includeonly{現在編集中のファイル名} 9.1401 9.1402 -のように書いておくことで、タイプセットの時間を節約できますが、ちょっと他の 9.1403 -ファイルを手直ししたい時には 9.1404 +のように書いておくことで、タイプセットの時間を節約できますが、ちょっと 9.1405 +他のファイルを手直ししたい時には 9.1406 9.1407 \includeonly{ちょっと手直ししたいファイル名} 9.1408 9.1409 9.1410 -と書き直さなければならず手間がかかります。野鳥では現在編集しているファイル 9.1411 -名がメインファイルの`\includeonly'にない場合には自動的にこれを検出し、次の 9.1412 -指示を仰ぎます。 9.1413 +と書き直さなければならず手間がかかります。野鳥では現在編集しているファ 9.1414 +イル名がメインファイルの`\includeonly'にない場合には自動的にこれを検出 9.1415 +し、次の指示を仰ぎます。 9.1416 9.1417 A)dd R)eplace %)comment? 9.1418 9.1419 9.1420 -現在編集中のファイルを `\includeonly' のリストに加えたい時には`a' を、現在 9.1421 -編集中のファイルだけを `\includeonly' にしたい時は`r'を、`\includeonly' の 9.1422 -行をコメントアウトして無効化したい時には、`%'をそれぞれ押して下さい。 9.1423 +現在編集中のファイルを `\includeonly' のリストに加えたい時には`a'を、現 9.1424 +在編集中のファイルだけを `\includeonly' にしたい時は`r'を、 9.1425 +`\includeonly' の行をコメントアウトして無効化したい時には、`%'をそれぞ 9.1426 +れ押して下さい。 9.1427 9.1428 9.1429 9.1430 @@ -1330,9 +1396,9 @@ 9.1431 ここはどこ? 9.1432 *********** 9.1433 9.1434 - 項目数の多い tabular などをたくさん書いていると下の方の行で、いま書いて 9.1435 -いる桁がどこに対応するのかわからなくなってしまうことがあります。例えば、以 9.1436 -下のような tabular において、 9.1437 + 項目数の多い tabular などをたくさん書いていると下の方の行で、いま書い 9.1438 +ている桁がどこに対応するのかわからなくなってしまうことがあります。例え 9.1439 +ば、以下のような tabular において、 9.1440 9.1441 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline 9.1442 氏名&所属&〒&住所&電話&FAX&帰省先&帰省先電話\\ \hline 9.1443 @@ -1349,10 +1415,10 @@ 9.1444 `[prefix] &' 9.1445 ... 現在のカラム表示 9.1446 9.1447 -を押すとカーソル位置のカラムがどの項目に該当するかをミニバッファに表示しま 9.1448 -す。tabular/array環境の第1行目を項目名の並びとみなして対応するものを探しま 9.1449 -す。もし項目名として別のものを表示して欲しい場合は、行頭を`%'にしてダミー 9.1450 -の項目並びを作っておくと良いでしょう。 9.1451 +を押すとカーソル位置のカラムがどの項目に該当するかをミニバッファに表示 9.1452 +します。tabular/array環境の第1行目を項目名の並びとみなして対応するもの 9.1453 +を探します。もし項目名として別のものを表示して欲しい場合は、行頭を`%'に 9.1454 +してダミーの項目並びを作っておくと良いでしょう。 9.1455 9.1456 9.1457 9.1458 @@ -1361,18 +1427,18 @@ 9.1459 おまかせ改行 9.1460 ************ 9.1461 9.1462 - tabular[*], array, itemize, enumerate, tabbing 環境をbegin型補完で入力し 9.1463 -た時、または各環境内で 9.1464 + tabular[*], array, itemize, enumerate, tabbing 環境をbegin型補完で入 9.1465 +力した時、または各環境内で 9.1466 9.1467 `ESC RET' 9.1468 ... おまかせ改行 9.1469 9.1470 9.1471 -を押すと、その環境に応じた行エントリを次の行に挿入します(begin型補完時に自 9.1472 -動挿入されたエントリが不要な場合は undo によって消去できます)。例えば、 9.1473 -tabular環境では、その環境のカラム数に対応した個数の `&' に加え、行末の 9.1474 -`\\' を入れます。この時それ以前に `\hline' があればそれも付け加えます。環 9.1475 -境とそれに応じて自動入力するものの対応は以下のようになります。 9.1476 +を押すと、その環境に応じた行エントリを次の行に挿入します(begin型補完時 9.1477 +に自動挿入されたエントリが不要な場合は undo によって消去できます)。例え 9.1478 +ば、tabular環境では、その環境のカラム数に対応した個数の `&' に加え、行 9.1479 +末の `\\' を入れます。この時それ以前に `\hline' があればそれも付け加え 9.1480 +ます。環境とそれに応じて自動入力するものの対応は以下のようになります。 9.1481 9.1482 * `tabular', `tabular*', `array' 9.1483 9.1484 @@ -1386,16 +1452,16 @@ 9.1485 9.1486 `\item' または `item[]' 9.1487 9.1488 - tabular 環境の例のように、本機能は各環境の一行目の内容を参考にして動作す 9.1489 -るので、なるべく二行目以降で呼び出すようにしてください。 9.1490 - 9.1491 - もし、その他の環境、例えば `foo'、に対して`おまかせ改行'を動作させたい時 9.1492 -は、`YaTeX-intelligent-newline-foo' という名前の関数を定義します。定義した 9.1493 -関数は、現在の行に改行を挿入した直後の行頭の位置で呼ばれます。関数 9.1494 -`YaTeX-indent-line' を呼ぶと現在の環境のネストに応じた深さにインデントされ 9.1495 -るので、これを呼んでから何かを挿入するようなコードを書くとよいでしょう。 9.1496 -`yatexenv.el'内の関数 `YaTeX-intelligent-newline-itemize' の定義などを参考 9.1497 -にしてください。 9.1498 + tabular 環境の例のように、本機能は各環境の一行目の内容を参考にして動 9.1499 +作するので、なるべく二行目以降で呼び出すようにしてください。 9.1500 + 9.1501 + もし、その他の環境、例えば `foo'、に対して`おまかせ改行'を動作 9.1502 +させたい時は、`YaTeX-intelligent-newline-foo' という名前の関数を定義 9.1503 +します。定義した関数は、現在の行に改行を挿入した直後の行頭の位置で呼ばれま 9.1504 +す。関数 `YaTeX-indent-line' を呼ぶと現在の環境のネストに応じた深さに 9.1505 +インデントされるので、これを呼んでから何かを挿入するようなコードを書くとよ 9.1506 +いでしょう。`yatexenv.el'内の関数 9.1507 +`YaTeX-intelligent-newline-itemize' の定義などを参考にしてください。 9.1508 9.1509 9.1510 9.1511 @@ -1405,14 +1471,15 @@ 9.1512 先回りusepackage 9.1513 **************** 9.1514 9.1515 - begin型、section型、maketitle型、いずれかのLaTeX2eマクロを補完入力すると、 9.1516 -そのマクロの利用に外部パッケージを必要とする場合、そのパッケージを本文中で 9.1517 -`\usepackage{}' しているかどうかを調査し、もししていなければプリアンブルに 9.1518 -対応するパッケージを引数にした `\usepackage' 文を(確認後に)挿入します。 9.1519 - 9.1520 - ただしこの機能が働くためには、パッケージ名とその中で定義されているマクロ 9.1521 -群をalistの形式で変数 `YaTeX-package-alist-private' に設定しておく必要があ 9.1522 -ります。 9.1523 + begin型、section型、maketitle型、いずれかのLaTeX2eマクロを補完入力す 9.1524 +ると、そのマクロの利用に外部パッケージを必要とする場合、そのパッケージ 9.1525 +を本文中で `\usepackage{}' しているかどうかを調査し、もししていなければ 9.1526 +プリアンブルに対応するパッケージを引数にした `\usepackage' 文を(確認後 9.1527 +に)挿入します。 9.1528 + 9.1529 + ただしこの機能が働くためには、パッケージ名とその中で定義されているマ 9.1530 +クロ群をalistの形式で変数 `YaTeX-package-alist-private' に設定しておく 9.1531 +必要があります。 9.1532 9.1533 9.1534 9.1535 @@ -1429,15 +1496,15 @@ 9.1536 * 修正モード 9.1537 * 野鳥数式モード 9.1538 9.1539 -修正モードは、開き括弧入力時の処理をコントロールし、修正モードONの時は開き 9.1540 -括弧の入力は開き括弧のみの入力になり、修正モードOFFの時は開き括弧の入力だ 9.1541 -けで閉じ括弧まで入力します。デフォルト(起動時)の設定は*OFF*です。 9.1542 - 9.1543 - 野鳥数式モードは、変数 `YaTeX-auto-math-mode' が `nil' の時のみ有効で、 9.1544 -このとき`;'や`:'を押した時(*Note Image completion::参照)に、どのようなイメー 9.1545 -ジ補完を機能させるか、通常のキーとして機能させるかを手動で切り替えます。自 9.1546 -動判定が遅いマシンでは`YaTeX-auto-math-mode' `nil'にセットし、野鳥数式モー 9.1547 -ドを手動で切り替えると良いでしょう。 9.1548 +修正モードは、開き括弧入力時の処理をコントロールし、修正モードONの時は 9.1549 +開き括弧の入力は開き括弧のみの入力になり、修正モードOFFの時は開き括弧の 9.1550 +入力だけで閉じ括弧まで入力します。デフォルト(起動時)の設定は*OFF*です。 9.1551 + 9.1552 + 野鳥数式モードは、変数 `YaTeX-auto-math-mode' が `nil' の時の 9.1553 +み有効で、このとき`;'や`:'を押した時(*Note Image completion::参照)に、 9.1554 +どのようなイメージ補完を機能させるか、通常のキーとして機能させるかを手動で 9.1555 +切り替えます。自動判定が遅いマシンでは`YaTeX-auto-math-mode' 9.1556 +`nil'にセットし、野鳥数式モードを手動で切り替えると良いでしょう。 9.1557 9.1558 9.1559 9.1560 @@ -1447,8 +1514,8 @@ 9.1561 オンラインヘルプ 9.1562 **************** 9.1563 9.1564 - 使おうとする LaTeX コマンドの用法がよく分からない時は、オンラインヘルプ 9.1565 -をひきましょう。ヘルプに関するキーには以下のものがあります。 9.1566 + 使おうとする LaTeX コマンドの用法がよく分からない時は、オンラインヘル 9.1567 +プをひきましょう。ヘルプに関するキーには以下のものがあります。 9.1568 9.1569 `[prefix] ?' 9.1570 ... オンラインヘルプ 9.1571 @@ -1459,28 +1526,29 @@ 9.1572 オンラインヘルプ 9.1573 ================ 9.1574 9.1575 - 「オンラインヘルプ」は、一般的な LaTeX コマンド(デフォルトでカーソル位置 9.1576 -のコマンド)に対する説明を隣のバッファに表示します。この時参照されるヘルプ 9.1577 -用ファイルには「グローバルヘルプ」と「プライベートヘルプ」の二種類があり、 9.1578 -前者は LaTeX の標準コマンドの主なものの説明を含むファイルで、変数 9.1579 -`YaTeX-help-file'の値で指定されます。このファイルは通常公共の場所(デフォル 9.1580 -トで`$EMACSEXECPATH')に置かれ、誰もがその内容を更新できるように全員に書き 9.1581 -込み権が与えられるべきものです。後者は、非標準もしくは個人的なマクロ定義に 9.1582 -関する説明が書かれているファイルで、変数`YaTeX-help-file-private'の値で指 9.1583 -定されます。こちらはユーザのホームディレクトリの下などに置かれます。 9.1584 + 「オンラインヘルプ」は、一般的な LaTeX コマンド(デフォルトでカーソル 9.1585 +位置のコマンド)に対する説明を隣のバッファに表示します。この時参照される 9.1586 +ヘルプ用ファイルには「グローバルヘルプ」と「プライベートヘルプ」の二種 9.1587 +類があり、前者は LaTeX の標準コマンドの主なものの説明を含むファイルで、 9.1588 +変数`YaTeX-help-file'の値で指定されます。このファイルは通常公共の場所 9.1589 +(デフォルトで`$EMACSEXECPATH')に置かれ、誰もがその内容を更新できるよう 9.1590 +に全員に書き込み権が与えられるべきものです。後者は、非標準もしくは個人 9.1591 +的なマクロ定義に関する説明が書かれているファイルで、変数 9.1592 +`YaTeX-help-file-private'の値で指定されます。こちらはユーザのホームディ 9.1593 +レクトリの下などに置かれます。 9.1594 9.1595 9.1596 オンラインapropos 9.1597 ================= 9.1598 9.1599 - 「オンラインapropos」は GNU Emacs の apropos と同様、ユーザが指定したキー 9.1600 -ワードを説明文に含む項目すべてを隣のバッファに表示します。 9.1601 - 9.1602 - もし、調べようとしたLaTeXコマンドに対する説明がヘルプファイル中に見つか 9.1603 -らなかった場合は、説明文の入力を求めてくるので、可能であれば参考書などを調 9.1604 -べてそのコマンドの説明を入力してください。もし、なにか標準的なコマンドに対 9.1605 -する説明を書いたならばぜひ私までその説明をお送り下さい。次回の配布に含めた 9.1606 -いと思います。 9.1607 + 「オンラインapropos」は GNU Emacs の apropos と同様、ユーザが指定した 9.1608 +キーワードを説明文に含む項目すべてを隣のバッファに表示します。 9.1609 + 9.1610 + もし、調べようとしたLaTeXコマンドに対する説明がヘルプファイル中に見つ 9.1611 +からなかった場合は、説明文の入力を求めてくるので、可能であれば参考書な 9.1612 +どを調べてそのコマンドの説明を入力してください。もし、なにか標準的なコ 9.1613 +マンドに対する説明を書いたならばぜひ私までその説明をお送り下さい。次回 9.1614 +の配布に含めたいと思います。 9.1615 9.1616 9.1617 9.1618 @@ -1494,10 +1562,10 @@ 9.1619 `[prefix] d' 9.1620 ... インクルード構造ブラウズ 9.1621 9.1622 -を押すと、そのドキュメントの親ファイルを聞いて来ます。ここで全てのファイル 9.1623 -の親となるファイル(デフォルトが示されているので大抵はRETのみ)を入力すると 9.1624 -インクルードしている全てのファイルを解析し、インクルード状況を視覚的に表示 9.1625 -します。このバッファでは以下のキー操作が有効です。 9.1626 +を押すと、そのドキュメントの親ファイルを聞いて来ます。ここで全てのファ 9.1627 +イルの親となるファイル(デフォルトが示されているので大抵はRETのみ)を入力 9.1628 +するとインクルードしている全てのファイルを解析し、インクルード状況を視 9.1629 +覚的に表示します。このバッファでは以下のキー操作が有効です。 9.1630 9.1631 `n' 9.1632 ... 次の行に移動し対応するファイルを隣のバッファに表示 9.1633 @@ -1542,8 +1610,8 @@ 9.1634 `q' 9.1635 ... 表示前の状態に戻る 9.1636 9.1637 - ただし、隣のウィンドウのファイルの内容を表示する機能に関しては、対応する 9.1638 -ファイルをクローズしてしまうとうまく働きませんのでご注意ください。 9.1639 + ただし、隣のウィンドウのファイルの内容を表示する機能に関しては、対応 9.1640 +するファイルをクローズしてしまうとうまく働きませんのでご注意ください。 9.1641 9.1642 9.1643 9.1644 @@ -1556,17 +1624,17 @@ 9.1645 gmhist 9.1646 ====== 9.1647 9.1648 - `gmhist.el'と`gmhist-mh.el' をロードしている場合、プレヴューコマンドの入 9.1649 -力(`[prefix] tp]')、印刷コマンドの入力(`[prefix] tl')の時に独立したヒスト 9.1650 -リを利用できます。それぞれのプロンプトで、`M-p' を押すと直前に利用したコマ 9.1651 -ンド文字列をくり返し呼び出すことができます。 9.1652 + `gmhist.el'と`gmhist-mh.el' をロードしている場合、プレヴューコマンド 9.1653 +の入力(`[prefix] tp]')、印刷コマンドの入力(`[prefix] tl')の時に独立した 9.1654 +ヒストリを利用できます。それぞれのプロンプトで、`M-p' を押すと直前に利 9.1655 +用したコマンド文字列をくり返し呼び出すことができます。 9.1656 9.1657 9.1658 min-out 9.1659 ======= 9.1660 9.1661 - `min-out.el' (`outline-minor-mode') と野鳥を組み合わせて使うことももちろ 9.1662 -ん可能です。設定の方法に関しては`yatexm-o.el'をご覧ください。 9.1663 + `min-out.el' (`outline-minor-mode') と野鳥を組み合わせて使うこともも 9.1664 +ちろん可能です。設定の方法に関しては`yatexm-o.el'をご覧ください。 9.1665 9.1666 9.1667 9.1668 @@ -1575,9 +1643,9 @@ 9.1669 カスタマイズ 9.1670 ************ 9.1671 9.1672 - 野鳥の動作を制御する種々の変数を独自に設定することにより、補完入力を起動 9.1673 -するキーアサインを変えたり、環境名の補完候補をさらに充実させることなどがで 9.1674 -きます。 9.1675 + 野鳥の動作を制御する種々の変数を独自に設定することにより、補完入力を 9.1676 +起動するキーアサインを変えたり、環境名の補完候補をさらに充実させること 9.1677 +などができます。 9.1678 9.1679 * Menu: 9.1680 9.1681 @@ -1591,13 +1659,13 @@ 9.1682 lisp 変数 9.1683 ========= 9.1684 9.1685 - 例えば prefix キーを `C-c' 以外のキーにしたい場合は、`YaTeX-prefix'に 9.1686 -prefix キーにしたいシンボルを定義してください。さらに、「`C-c 英字'」とい 9.1687 -うキーバインドは独自の関数が割り当ててあるので使いたくない。このような時は、 9.1688 -`YaTeX-inhibit-prefix-letter' を `t' に設定することにより、`C-c 英字…'の 9.1689 -バインドが全て、対応する`C-c C-英字…'に変わります(ただし、begin型 large型 9.1690 -補完の大文字起動によるリジョン指定は可能なままです。これも無効にしたい場合 9.1691 -は`t'ではなく 1 にセットして下さい。)。 9.1692 + 例えば prefix キーを `C-c' 以外のキーにしたい場合は、`YaTeX-prefix'に 9.1693 +prefix キーにしたいシンボルを定義してください。さらに、「`C-c 英字'」と 9.1694 +いうキーバインドは独自の関数が割り当ててあるので使いたくない。このよう 9.1695 +な時は、`YaTeX-inhibit-prefix-letter' を `t' に設定することにより、 9.1696 +`C-c 英字…'のバインドが全て、対応する`C-c C-英字…'に変わります(ただし、 9.1697 +begin型 large型補完の大文字起動によるリジョン指定は可能なままです。これ 9.1698 +も無効にしたい場合は`t'ではなく 1 にセットして下さい。)。 9.1699 9.1700 * Menu: 9.1701 9.1702 @@ -1613,31 +1681,32 @@ 9.1703 カスタマイズ変数一覧 9.1704 -------------------- 9.1705 9.1706 - yatex-mode における次の変数がカスタマイズ可能です。`~/.emacs' で `setq' 9.1707 -しておけば、そちらの定義が優先されます。括弧の中はデフォルト値です。実際に 9.1708 -変数の値を変更する場合は `M-x describe-variable' で変数の詳細な説明を参照 9.1709 -してください。 9.1710 + yatex-mode における次の変数がカスタマイズ可能です。`~/.emacs' で 9.1711 +`setq' しておけば、そちらの定義が優先されます。括弧の中はデフォルト値で 9.1712 +す。実際に変数の値を変更する場合は `M-x describe-variable' で変数の詳細 9.1713 +な説明を参照してください。 9.1714 9.1715 -- Variable: YaTeX-prefix 9.1716 yatex-mode 中のプリフィクスキー (`\C-c') 9.1717 9.1718 -- Variable: YaTeX-inhibit-prefix-letter 9.1719 - prefix キーの直後のキーバインドで `英字' のものを `C-英字' に変更 9.1720 + prefix キーの直後のキーバインドで `英字' のものを `C-英字' に変更 9.1721 (`nil') 9.1722 9.1723 -- Variable: YaTeX-fill-prefix 9.1724 - 本文を書く時の行頭に挿入する接頭辞すなわち fill-prefix (`""(nil)') 9.1725 + 本文を書く時の行頭に挿入する接頭辞すなわち fill-prefix 9.1726 + (`""(nil)') 9.1727 9.1728 -- Variable: YaTeX-user-completion-table 9.1729 学習したLaTeXコマンド保存ファイル名 (`"~/.yatexrc"') 9.1730 9.1731 -- Variable: YaTeX-kanji-code 9.1732 - 文書を作成する時の漢字コードnil=既存のコードのまま 0=no-conversion 9.1733 - 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (2 (MS-DOSでは1)) 9.1734 + 文書を作成する時の漢字コードnil=既存のコードのまま 9.1735 + 0=no-conversion 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (2 (MS-DOSでは 9.1736 + 1)) 9.1737 9.1738 -- Variable: tex-command 9.1739 - LaTeXタイプセッタコマンド名 (`"platex"') 9.1740 - 9.1741 + LaTeXタイプセッタコマンド名 (`"platex"') 9.1742 9.1743 9.1744 -- Variable: dvi2-command 9.1745 プレヴューアコマンド名 (`"xdvi -geo +0+0 -s 4"') 9.1746 @@ -1646,12 +1715,12 @@ 9.1747 dviファイルの印刷に使われるコマンド式 (`"dvi2ps %f %t %s | lpr"') 9.1748 9.1749 -- Variable: dviprint-from-format 9.1750 - 上の`%f'に相当する開始ページ指定書式、`%b' が開始ページ番号に変わる 9.1751 - (`"-f %b"') 9.1752 + 上の`%f'に相当する開始ページ指定書式、`%b' が開始ページ番号に変わ 9.1753 + る (`"-f %b"') 9.1754 9.1755 -- Variable: dviprint-to-format 9.1756 - `%t' に相当する終了ページ指定書式、`%e'が終了ページ番号に変わる (`"-t 9.1757 - %e"') 9.1758 + `%t' に相当する終了ページ指定書式、`%e'が終了ページ番号に変わる 9.1759 + (`"-t %e"') 9.1760 9.1761 -- Variable: makeindex-command 9.1762 makeindexコマンド (`"makeindex"' (MS-DOSでは`"makeind"')) 9.1763 @@ -1659,44 +1728,89 @@ 9.1764 -- Variable: YaTeX-dvipdf-command 9.1765 dviをPDFに変換するコマンド (`"dvipdfmx"') 9.1766 9.1767 + -- Variable: YaTeX-on-the-fly-preview-interval 9.1768 + `[prefix] t e'で環境即時previewをする場合の変換処理までの 9.1769 + 無操作時間(秒) (0.9) 9.1770 + `nil' の場合は即時プレヴューをしない。 9.1771 + 9.1772 + -- Variable: YaTeX-on-the-fly-math-preview-engine 9.1773 + `[prefix] t e'で数式環境を即時previewする時に用いるエンジン 9.1774 + (latex-math-previewが利用可能なときは 9.1775 + latex-math-preview-expression を呼ぶ 9.1776 + `'YaTeX-typeset-environment-by-lmp'そうでないときは内蔵関数を呼ぶ 9.1777 + `'YaTeX-typeset-environment-by-builtin') 9.1778 + 9.1779 + -- Variable: YaTeX-cmd-gimp 9.1780 + GIMPを起動するコマンド (code{"gimp"}) 9.1781 + -- Variable: YaTeX-cmd-tgif 9.1782 + tgifを起動するコマンド (code{"tgif"}) 9.1783 + -- Variable: YaTeX-cmd-inkscape 9.1784 + Inkscapeを起動するコマンド (code{"inkscape"}) 9.1785 + -- Variable: YaTeX-cmd-dia 9.1786 + Diaを起動するコマンド (code{"dia"}) 9.1787 + -- Variable: YaTeX-cmd-ooo 9.1788 + OpenOffice.orgまたはLibreOfficeを起動するコマンド 9.1789 + (code{"soffice"}) 9.1790 + -- Variable: YaTeX-cmd-gs 9.1791 + Ghostscriptを起動するコマンド (code{"gs"}) 9.1792 + -- Variable: YaTeX-cmd-dvips 9.1793 + dvipsを起動するコマンド(環境によってはpdvipsなど) (code{"dvips"}) 9.1794 + -- Variable: YaTeX-cmd-displayline 9.1795 + displaylineを起動するコマンド 9.1796 + (code{"/Applications/Skim.app/Contents/SharedSupport/displayline"}) 9.1797 + -- Variable: YaTeX-cmd-edit-ps 9.1798 + PostScriptファイルを編集するコマンド (変数code{"YaTeX-cmd-gimp"}の 9.1799 + 値) 9.1800 + -- Variable: YaTeX-cmd-edit-pdf 9.1801 + PDFファイルを編集するコマンド (変数code{"YaTeX-cmd-ooo"}の値) 9.1802 + -- Variable: YaTeX-cmd-edit-ai 9.1803 + .aiファイルを編集するコマンド (変数code{"YaTeX-cmd-inkscape"}の値) 9.1804 + -- Variable: YaTeX-cmd-edit-svg 9.1805 + SVGファイルを編集するコマンド (変数code{"YaTeX-cmd-inkscape"}の値) 9.1806 + -- Variable: YaTeX-cmd-edit-images 9.1807 + その他画像ファイルを編集するコマンド (変数code{"YaTeX-cmd-gimp"}の 9.1808 + 値) 9.1809 + 9.1810 -- Variable: YaTeX-need-nonstop 9.1811 `\nonstopmode{}'を自動的に付加するか (`nil') 9.1812 9.1813 -- Variable: latex-warning-regexp 9.1814 - latexコマンドの出力するウォーニング行の正規表現 (`"line.* [0-9]*"') 9.1815 + latexコマンドの出力するウォーニング行の正規表現 (`"line.* 9.1816 + [0-9]*"') 9.1817 9.1818 -- Variable: latex-error-regexp 9.1819 同じくエラー行の正規表現 (`"l\\.[1-9][0-9]*"') 9.1820 9.1821 -- Variable: latex-dos-emergency-message 9.1822 - MS-DOS上で動作する latex コマンドが、エラーにより停止するとき出力する 9.1823 - メッセージ (`"Emergency stop"') 9.1824 + MS-DOS上で動作する latex コマンドが、エラーにより停止するとき出力 9.1825 + するメッセージ (`"Emergency stop"') 9.1826 9.1827 -- Variable: latex-message-kanji-code 9.1828 - タイプセッタの出力するメッセージの漢字コード.タイプセットバッファの出 9.1829 - 力が化ける時は、これを設定する (2, Nemacsでのみ有効) 9.1830 + タイプセッタの出力するメッセージの漢字コード.タイプセットバッファ 9.1831 + の出力が化ける時は、これを設定する (2, Nemacsでのみ有効) 9.1832 9.1833 -- Variable: NTT-jTeX 9.1834 - 古いNTT-jTeX使用時のようにインデントした行の先頭と前の行の(タイプセッ 9.1835 - ト後の)字間が空いてしまうのを嫌う場合は`t'にする(`nil') 9.1836 + 古いNTT-jTeX使用時のようにインデントした行の先頭と前の行の(タイプ 9.1837 + セット後の)字間が空いてしまうのを嫌う場合は`t'にする(`nil') 9.1838 9.1839 -- Variable: YaTeX-item-regexp 9.1840 itemの桁揃えの時に用いる、itemの正規表現 (`"\\\\(sub\\)*item"') 9.1841 9.1842 -- Variable: YaTeX-verb-regexp 9.1843 - verbコマンドの正規表現。先頭の\\\\はつけない (`"verb\\*?\\|path"') 9.1844 + verbコマンドの正規表現。先頭の\\\\はつけない 9.1845 + (`"verb\\*?\\|path"') 9.1846 9.1847 -- Variable: YaTeX-nervous 9.1848 ローカル辞書を用いる時 `t' (`t') 9.1849 9.1850 -- Variable: YaTeX-sectioning-regexp 9.1851 - セクション区切り設定コマンドの正規表現 9.1852 + セクション区切り設定コマンドの正規表現 9.1853 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"') 9.1854 9.1855 -- Variable: YaTeX-fill-inhibit-environments 9.1856 fill を抑止する環境名のリスト (`'("tabular" "tabular*" "array" 9.1857 - "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" 9.1858 - "verbatim" "verbatim*")') 9.1859 + picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" 9.1860 + verbatim" "verbatim*")') 9.1861 9.1862 -- Variable: YaTeX-uncomment-once 9.1863 領域uncommentで行頭の複数の`%'を全て削除するか (`nil') 9.1864 @@ -1712,8 +1826,8 @@ 9.1865 alist (`nil')。補完テーブルの書き方については`yatexmth.el'を参照。 9.1866 9.1867 -- Variable: YaTeX-default-pop-window-height 9.1868 - 1画面の時にタイプセットバッファを初めて作成する時の高さ。数値で行数、 9.1869 - 数字文字列でEmacsウィンドウに対する百分率 (10) 9.1870 + 1画面の時にタイプセットバッファを初めて作成する時の高さ。数値で行 9.1871 + 数、数字文字列でEmacsウィンドウに対する百分率 (10) 9.1872 9.1873 -- Variable: YaTeX-help-file 9.1874 共用ヘルプファイル (`$doc-directory/../../site-lisp/YATEXHLP.jp') 9.1875 @@ -1722,45 +1836,46 @@ 9.1876 個人用ヘルプファイル (`"~/YATEXHLP.jp"') 9.1877 9.1878 -- Variable: YaTeX-no-begend-shortcut 9.1879 - `[prefix] b ??' のショートカットを使わず、`[prefix] b' だけで補完入力 9.1880 - に入る (`nil') 9.1881 + `[prefix] b ??' のショートカットを使わず、`[prefix] b' だけで補完 9.1882 + 入力に入る (`nil') 9.1883 9.1884 -- Variable: YaTeX-hilit-pattern-adjustment-private 9.1885 - 正規表現とそれにマッチするものの論理的意味をシンボルであらわしたもの 9.1886 - のリスト…のリスト。hilit19 を組み込んでいる時のみ有効。詳しくは 9.1887 - `(assq 'yatex-mode hilit-patterns-alist)' した結果と、変数 9.1888 - `YaTeX-hilit-pattern-adjustment-default' の値(と場合によっては 9.1889 + 正規表現とそれにマッチするものの論理的意味をシンボルであらわしたも 9.1890 + ののリスト…のリスト。hilit19 を組み込んでいる時のみ有効。詳しくは 9.1891 + `(assq 'yatex-mode hilit-patterns-alist)' した結果と、変数 9.1892 + `YaTeX-hilit-pattern-adjustment-default' の値(と場合によっては 9.1893 hilit19 のドキュメント)を参照せよ。 9.1894 9.1895 -- Variable: YaTeX-sectioning-level 9.1896 LaTeXのセクション単位宣言コマンドとその論理的高さのalist。 9.1897 9.1898 -- Variable: YaTeX-hierarchy-ignore-heading-regexp 9.1899 - Hierarchy バッファは通常ファイルヘッダとして、LaTeXのセクション宣言コ 9.1900 - マンドの引数を検索し、それがなければコメント行を探すが、その際にヘッ 9.1901 - ダとしては意味を持たないパターンをこの変数に設定する。デフォルトでは 9.1902 - RCS ヘッダとモード指定行(-*- xxx -*-)が設定されている。 9.1903 + Hierarchy バッファは通常ファイルヘッダとして、LaTeXのセクション宣 9.1904 + 言コマンドの引数を検索し、それがなければコメント行を探すが、その際 9.1905 + にヘッダとしては意味を持たないパターンをこの変数に設定する。デフォ 9.1906 + ルトでは RCS ヘッダとモード指定行(-*- xxx -*-)が設定されている。 9.1907 9.1908 -- Variable: YaTeX-skip-default-reader 9.1909 - Non-nil に設定するとsection型コマンドの引数入力時、アドイン関数がなけ 9.1910 - ればミニバッファでの読み込みをせずに入力を完了させる (`nil') 9.1911 + Non-nil に設定するとsection型コマンドの引数入力時、アドイン関数が 9.1912 + なければミニバッファでの読み込みをせずに入力を完了させる (`nil') 9.1913 9.1914 -- Variable: YaTeX-create-file-prefix-g 9.1915 - `\include'などで `prefix g'した時に、ジャンプ先が存在しないファイルで 9.1916 - あってもオープンする (`nil') 9.1917 + `\include'などで `prefix g'した時に、ジャンプ先が存在しないファイ 9.1918 + ルであってもオープンする (`nil') 9.1919 9.1920 -- Variable: YaTeX-simple-messages 9.1921 各種補完時のメッセージ出力を簡素化する (`nil') 9.1922 9.1923 -- Variable: YaTeX-hilit-sectioning-face 9.1924 色付けが有効な時の `\part' の色 (`'(yellow/dodgerblue 9.1925 - yellow/slateblue)')。リストの第一要素は `hilit-background-mode' が 9.1926 - `'light' の時の、第二要素は `'dark' の時の `\chapter' の色で、文字色/ 9.1927 - 背景色 のように指定する。 9.1928 + yellow/slateblue)')。リストの第一要素は `hilit-background-mode' が 9.1929 + `'light' の時の、第二要素は `'dark' の時の `\chapter' の色で、文字 9.1930 + 色/背景色 のように指定する。 9.1931 9.1932 -- Variable: YaTeX-hilit-sectioning-attenuation-rate 9.1933 - 色付けが有効な時の、`\subparagraph' の色を `\chapter' の濃度の何%薄く 9.1934 - したものにするか (`'(15 40)') `YaTeX-hilit-sectioning-face' の項参照。 9.1935 + 色付けが有効な時の、`\subparagraph' の色を `\chapter' の濃度の何% 9.1936 + 薄くしたものにするか (`'(15 40)') `YaTeX-hilit-sectioning-face'の 9.1937 + 項参照。 9.1938 9.1939 -- Variable: YaTeX-use-AMS-LaTeX 9.1940 AMS-LaTeX を使用する場合は `t' に設定する (`nil') 9.1941 @@ -1769,59 +1884,66 @@ 9.1942 LaTeX2e を使用する場合は `t' に設定する (`t') 9.1943 9.1944 -- Variable: YaTeX-template-file 9.1945 - 新規ファイル作成時に自動挿入するファイル名 (`~/work/template.tex') 9.1946 + 新規ファイル作成時に自動挿入するファイル名 9.1947 + (`~/work/template.tex') 9.1948 9.1949 -- Variable: YaTeX-search-file-from-top-directory 9.1950 - inputするファイルを探すときの基準ディレクトリをmainファイルのあるディ 9.1951 - レクトリにするか (`t') 9.1952 + inputするファイルを探すときの基準ディレクトリをmainファイルのある 9.1953 + ディレクトリにするか (`t') 9.1954 -- Variable: YaTeX-use-font-lock 9.1955 ソースの色づけパッケージとして font-lock を利用するかどうか 9.1956 (`(featurep 'font-lock)') 9.1957 9.1958 -- Variable: YaTeX-use-hilit19 9.1959 - ソースの色づけパッケージとして hilit19 を利用するかどうか(`(featurep 9.1960 - 'hilit19)') 9.1961 + ソースの色づけパッケージとして hilit19 を利用するかどうか 9.1962 + (`(featurep 'hilit19)') 9.1963 9.1964 -- Variable: YaTeX-use-italic-bold 9.1965 italic, boldフォントを野鳥が探すかどうか (Emacs20以降なら`t') 9.1966 font-lock利用時のみ有効。(`(featurep 'hilit19)' 9.1967 9.1968 -- Variable: YaTeX-singlecmd-suffix 9.1969 - 全てのmaketitle型コマンドの補完入力直後に挿入する文字列。`"{}"' など 9.1970 - がお勧め。 9.1971 + 全てのmaketitle型コマンドの補完入力直後に挿入する文字列。 9.1972 + `"{}"' などがお勧め。 9.1973 9.1974 -- Variable: YaTeX-package-alist-private 9.1975 - LaTeX2eのパッケージ名とその中に含まれるマクロのリスト。適切に設定して 9.1976 - おくと本文入力時にマクロを補完入力するとそのマクロに必要なパッケージ 9.1977 - を usepackage するか自動的に検査してくれる。していなければ 9.1978 - \usepackage を自動追加することもできる。リストは'((パッケージ名1 (補 9.1979 - 完タイプ マクロのリスト……) (補完タイプ マクロのリスト……)) (パッケー 9.1980 - ジ名2 (補完タイプ マクロのリスト……) (補完タイプ マクロのリス 9.1981 - ト……))………) という形式にする。補完タイプは `env, section, 9.1982 - maketitle' のどれか。具体例は変数 `YaTeX-package-alist-default' の値 9.1983 - 参照。 9.1984 + LaTeX2eのパッケージ名とその中に含まれるマクロのリスト。適切に設定 9.1985 + しておくと本文入力時にマクロを補完入力するとそのマクロに必要なパッ 9.1986 + ケージを usepackage するか自動的に検査してくれる。していなければ 9.1987 + usepackage を自動追加することもできる。リストは'((パッケージ名1 9.1988 + (補完タイプ マクロのリスト……) (補完タイプ マクロのリスト……)) 9.1989 + (パッケージ名2 (補完タイプ マクロのリスト……) (補完タイプ マクロ 9.1990 + のリスト……))………)という形式にする。補完タイプは `env, 9.1991 + section, maketitle' のどれか。具体例は変数 9.1992 + `YaTeX-package-alist-default'の値参照。 9.1993 9.1994 -- Variable: YaTeX-tabular-indentation 9.1995 - tabular/array 環境で現在行の先頭位置が表の第Nカラムのときは標準インデ 9.1996 - ント位置から N*YaTeX-tabular-indentation 桁下げたインデントにする。 9.1997 + tabular/array 環境で現在行の先頭位置が表の第Nカラムのときは標準イ 9.1998 + ンデント位置から N*YaTeX-tabular-indentation 桁下げたインデントに 9.1999 + する。 9.2000 9.2001 -- Variable: YaTeX-noindent-env-regexp 9.2002 別の環境内にあっても \begin{} が行頭から始まるべき環境名の正規表現。 9.2003 verbatim環境などを指定する。 9.2004 9.2005 + -- Variable: YaTeX-electric-indent-mode 9.2006 + Emacs 24.4 で導入された改行時の、自動インデントをどうするか。 9.2007 + この値がそのまま electric-indent-local-mode に渡される。 9.2008 + -1でoff。 9.2009 + 9.2010 -- Variable: YaTeX-ref-default-label-string 9.2011 - \ref{} のラベル補完でラベル未設定のものに自動的に生成するラベル名の書 9.2012 - 式。strftime(3)関数に似た日付ベースで指定する。利用できる書式は以下の 9.2013 - とおり。%y -> 西暦下二桁, %b -> 月の英名, %m -> 月(1〜12) %d -> 日, 9.2014 - %H -> 時, %M -> 分, %S -> 秒, %qx -> アルファベットで26進数化した 9.2015 - yymmdd. %qX -> アルファベットで26進数化した HHMMSS. デフォルトは 9.2016 - "%H%M%S_%d%b%y" 9.2017 + \ref{} のラベル補完でラベル未設定のものに自動的に生成するラベル名 9.2018 + の書式。strftime(3)関数に似た日付ベースで指定する。利用できる書式 9.2019 + は以下のとおり。%y -> 西暦下二桁, %b -> 月の英名, %m -> 月(1〜12) 9.2020 + %d -> 日, %H -> 時, %M -> 分, %S -> 秒, %qx -> アルファベットで26 9.2021 + 進数化した yymmdd. %qX -> アルファベットで26進数化した HHMMSS. デ 9.2022 + フォルトは "%H%M%S_%d%b%y" 9.2023 9.2024 -- Variable: YaTeX-ref-generate-label-function 9.2025 - \ref{}のラベル名自動生成のときに使う関数のシンボル。デフォルトは標準 9.2026 - の YaTeX::ref-generate-label 関数が割り当ててある。引数を2つ取る関数 9.2027 - を定義して、この変数にセットするとその関数を呼んだ結果をデフォルトの 9.2028 - ラベル名候補とする。設定例: 9.2029 + \ref{}のラベル名自動生成のときに使う関数のシンボル。デフォルトは標 9.2030 + 準の YaTeX::ref-generate-label 関数が割り当ててある。引数を2つ取る 9.2031 + 関数を定義して、この変数にセットするとその関数を呼んだ結果をデフォ 9.2032 + ルトのラベル名候補とする。設定例: 9.2033 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label) 9.2034 (defun my-yatex-generate-label (command value) 9.2035 (and (string= command "caption") 9.2036 @@ -1843,9 +1965,9 @@ 9.2037 カスタマイズ変数設定例 9.2038 ---------------------- 9.2039 9.2040 - たとえば、prefix キーとして`ESC'を使用し、新たな補完候補を格納するファイ 9.2041 -ルを、`~/src/emacs/yatexrc' にし、行頭の prefix をタブ文字一つに変えたいと 9.2042 -きは、 9.2043 + たとえば、prefix キーとして`ESC'を使用し、新たな補完候補を格納するファ 9.2044 +イルを、`~/src/emacs/yatexrc' にし、行頭の prefix をタブ文字一つに変え 9.2045 +たいときは、 9.2046 9.2047 (setq YaTeX-prefix "\e" 9.2048 YaTeX-user-completion-table "~/src/emacs/yatexrc" 9.2049 @@ -1860,21 +1982,22 @@ 9.2050 hook変数 9.2051 -------- 9.2052 9.2053 - また、hook 変数 `yatex-mode-hook', `yatex-mode-load-hook' を用意していま 9.2054 -す。すべての yatex-mode のバッファで作用させたいものは、`yatex-mode-hook' 9.2055 -に記述し、`yatex.el' をロードする時だけ作用させたいものは 9.2056 -`yatex-mode-load-hook' に記述します。例えば、`outline-minor-mode' を利用す 9.2057 -る場合、それぞれのバッファで `outline-minor-mode' を有効にしたいので、 9.2058 -`yatex-mode-hook' を次のように設定します。 9.2059 + また、hook 変数 `yatex-mode-hook', `yatex-mode-load-hook' を用意して 9.2060 +います。すべての yatex-mode のバッファで作用させたいものは、 9.2061 +`yatex-mode-hook' に記述し、`yatex.el' をロードする時だけ作用させたいも 9.2062 +のは`yatex-mode-load-hook' に記述します。例えば、`outline-minor-mode' 9.2063 +を利用する場合、それぞれのバッファで `outline-minor-mode' を有効にした 9.2064 +いので、`yatex-mode-hook' を次のように設定します。 9.2065 9.2066 (setq yatex-mode-hook 9.2067 '(lambda () (outline-minor-mode t))) 9.2068 9.2069 9.2070 -逆に、独自のキー定義を行いたい時などは、`yatex-mode-load-hook' を利用しま 9.2071 -す。例えば、begin 型補完において、 document や、enumerate 以外の環境名も 9.2072 -ショートカットキーで入れたいなどという時は、次のようにします。以下の例は、 9.2073 -`[prefix] ba' で `\begin{abstract}', `\end{abstract}' を挿入します。 9.2074 +逆に、独自のキー定義を行いたい時などは、`yatex-mode-load-hook' を利用し 9.2075 +ます。例えば、begin 型補完において、 document や、enumerate 以外の環境 9.2076 +名もショートカットキーで入れたいなどという時は、次のようにします。以下 9.2077 +の例は、`[prefix] ba' で `\begin{abstract}', `\end{abstract}' を挿入し 9.2078 +ます。 9.2079 9.2080 (setq yatex-mode-load-hook 9.2081 '(lambda() (YaTeX-define-begend-key "ba" "abstract"))) 9.2082 @@ -1889,9 +2012,9 @@ 9.2083 hook用ファイル 9.2084 -------------- 9.2085 9.2086 - 変数 `yatex-mode-load-hook' で定義する内容が多い時は、`yatexhks.el'とい 9.2087 -うファイルを作り、その中に野鳥関連の設定を書く事で、初期化の時に自動的にロー 9.2088 -ドします。 9.2089 + 変数 `yatex-mode-load-hook' で定義する内容が多い時は、`yatexhks.el'と 9.2090 +いうファイルを作り、その中に野鳥関連の設定を書く事で、初期化の時に自動 9.2091 +的にロードします。 9.2092 9.2093 9.2094 9.2095 @@ -1901,9 +2024,9 @@ 9.2096 付加関数(アドイン関数) 9.2097 ====================== 9.2098 9.2099 - 各種補完時に、環境名やコマンド名に応じたきめ細やかな補完入力機能を実現す 9.2100 -るための関数を作成することができます。この関数の作成方法や、組み込み方法に 9.2101 -関しては、`yatexadd.doc' をご覧ください。 9.2102 + 各種補完時に、環境名やコマンド名に応じたきめ細やかな補完入力機能を実 9.2103 +現するための関数を作成することができます。この関数の作成方法や、組み込 9.2104 +み方法に関しては、`yatexadd.doc' をご覧ください。 9.2105 9.2106 9.2107 9.2108 @@ -1912,11 +2035,12 @@ 9.2109 その他 9.2110 ****** 9.2111 9.2112 - 野鳥の標準の LaTeX コマンドの辞書には、作者が頻繁に使うものしか登録され 9.2113 -ていません。これは、補完候補に使いそうもないコマンドが存在して、補完したい 9.2114 -コマンドを出すまでのストローク数を増やしてしまう事を防止するためです。標準 9.2115 -辞書にないコマンドも、できるだけ補完入力方式を利用し、ユーザ辞書を充実させ 9.2116 -ることで、あなたの LaTeX スタイルにあった野鳥へと育っていくことでしょう。 9.2117 + 野鳥の標準の LaTeX コマンドの辞書には、作者が頻繁に使うものしか登録さ 9.2118 +れていません。これは、補完候補に使いそうもないコマンドが存在して、補完 9.2119 +したいコマンドを出すまでのストローク数を増やしてしまう事を防止するため 9.2120 +です。標準辞書にないコマンドも、できるだけ補完入力方式を利用し、ユーザ 9.2121 +辞書を充実させることで、あなたの LaTeX スタイルにあった野鳥へと育ってい 9.2122 +くことでしょう。 9.2123 9.2124 9.2125 9.2126 @@ -1925,23 +2049,23 @@ 9.2127 取り扱い 9.2128 ******** 9.2129 9.2130 - 本プログラムはフリーソフトウェアです。本プログラムを使用して生じたいかな 9.2131 -る結果に対しても作者は責任を負わないこととします。転載等に関しては制限いた 9.2132 -しません。常識的に扱ってください。また、本プログラムに含まれるコードを利用 9.2133 -すること、改造することも自由に行なって構いませんが、流用することにより契約 9.2134 -締結の必要が生じる場合、私はいかなる契約も締結しません。具体的にはGPLへの 9.2135 -サインはしませんので、GNUに寄贈するものを作っている場合私の作品から取り込 9.2136 -んだコードを流用すると苦労するかもしれません。いかなるコード流用も拒否しま 9.2137 -せんが契約締結は辞退します。 9.2138 - 9.2139 - 苦情、希望、バグ報告、感想等は歓迎いたします。連絡は yuuji@yatex.org ま 9.2140 -で(2004年1月現在)。継続的に使用してくださる方はメイリングリスト「fj野鳥の 9.2141 -会」に是非加入してください。加入方法については本パッケージの `docs/qanda' 9.2142 -ファイルの「その他」の章を御覧ください。 9.2143 + 本プログラムはフリーソフトウェアです。本プログラムを使用して生じたい 9.2144 +かなる結果に対しても作者は責任を負わないこととします。転載等に関しては 9.2145 +制限いたしません。常識的に扱ってください。また、本プログラムに含まれる 9.2146 +コードを利用すること、改造することも自由に行なって構いませんが、流用す 9.2147 +ることにより契約締結の必要が生じる場合、私はいかなる契約も締結しません。 9.2148 +具体的にはGPLへのサインはしませんので、GNUに寄贈するものを作っている場 9.2149 +合私の作品から取り込んだコードを流用すると苦労するかもしれません。いか 9.2150 +なるコード流用も拒否しませんが契約締結は辞退します。 9.2151 + 9.2152 + 苦情、希望、バグ報告、感想等は歓迎いたします。連絡は yuuji@yatex.org 9.2153 +まで(2004年1月現在)。継続的に使用してくださる方はメイリングリスト「fj野 9.2154 +鳥の会」に是非加入してください。加入方法については本パッケージの 9.2155 +`docs/qanda'ファイルの「その他」の章を御覧ください。 9.2156 9.2157 仕様は、予告なく確実に(気分次第で)変更されます:-p。 9.2158 9.2159 - 広瀬雄二 9.2160 + 広瀬雄二 9.2161 9.2162 9.2163 9.2164 @@ -1952,217 +2076,216 @@ 9.2165 9.2166 * Menu: 9.2167 9.2168 -* :: Greek letter completion. 4. 9.2169 -* ;: Image completion. 4. 9.2170 -* Σ[しくま]: Image completion. 4. 9.2171 -* 括る[くくる]: Enclose section-type command. 4. 9.2172 -* 括る[くくる]: large型補完. 22. 9.2173 -* 引数[ひきすう]: 2個以上の引数をとる section型コマンド. 4. 9.2174 -* 欧文[おうふん]: Accent mark completion. 4. 9.2175 -* ;自身[;ししん]: Image completion. 32. 9.2176 -* ∞[むけんたい]: Image completion. 4. 9.2177 -* 矢印[やしるし]: Image completion. 4. 9.2178 -* ブロック[ふろつく]: begin型補完. 81. 9.2179 -* ヒストリ[ひすとり]: Cooperation with other packages. 8. 9.2180 -* 桁揃え[けたそろえ]: Filling. 4. 9.2181 -* やちょう[やちよう]: Intro. 4. 9.2182 -* ジャンプ[しやんふ]: view-sectioning. 42. 9.2183 -* &入力[&にゆうりよく]: Intelligent newline. 4. 9.2184 -* 設定例[せつていれい]: Sample definitions. 4. 9.2185 -* 随時補完[すいしほかん]: Arbitrary completion. 4. 9.2186 -* 閉じ込める[としこめる]: begin型補完. 81. 9.2187 -* 再帰補完[さいきほかん]: Recursive completion. 4. 9.2188 -* ユーザ辞書[ゆうさししよ]: begin型補完. 71. 9.2189 -* 論理階層[ろんりかいそう]: view-sectioning. 42. 9.2190 -* ここはどこ?[ここはとこ?]: What column. 4. 9.2191 -* お絵描きツール起動[おえかきつうるきとう]: お絵描きツール起動. 4. 9.2192 -* 環境の先頭へ[かんきようのせんとうへ]: 環境を単位としたジャンプ. 7. 9.2193 -* 環境の末尾へ[かんきようのまつひへ]: 環境を単位としたジャンプ. 7. 9.2194 -* 環境をマーク[かんきようをまあく]: 環境を単位としたジャンプ. 7. 9.2195 -* カスタマイズ[かすたまいす]: Customizations. 4. 9.2196 -* キーアサイン[きいあさいん]: Customizations. 4. 9.2197 -* 数式モード[すうしきもおと]: Image completion. 4. 9.2198 -* インストール[いんすとおる]: Installation. 4. 9.2199 -* タイプセッタ[たいふせつた]: Invocation. 4. 9.2200 -* プレヴューア[ふれひゆうあ]: Invocation. 4. 9.2201 -* アウトライン[あうとらいん]: view-sectioning. 4. 9.2202 -* 引数の個数を変える[ひきすうのこすうをかえる]: 2個以上の引数をとる section型コマンド. 24. 9.2203 -* アクセント記号補完[あくせんときこうほかん]: Accent mark completion. 4. 9.2204 -* カスタマイズ変数一覧[かすたまいすへんすういちらん]: All customizable variables. 4. 9.2205 -* 環境名の補完[かんきようめいのほかん]: begin型補完. 4. 9.2206 -* エラー修正[えらあしゆうせい]: Calling typesetter. 4. 9.2207 -* タイプセッタ起動[たいふせつたきとう]: Calling typesetter. 4. 9.2208 -* タイプセットエラー[たいふせつとえらあ]: Calling typesetter. 4. 9.2209 -* 環境名の変更[かんきようめいのへんこう]: Changing LaTeX command. 20. 9.2210 -* モード切り替え[もうときりかえ]: Changing mode of YaTeX. 4. 9.2211 -* タイプセッタの使い分け[たいふせつたのつかいわけ]: Changing typesetter. 12. 9.2212 -* 起動するコマンドを変える[きとうするこまんとをかえる]: Changing typesetter. 7. 9.2213 -* コメントアウト[こめんとあうと]: Commenting out. 4. 9.2214 -* その他のコマンド制御[そのたのこまんとせいきよ]: Controlling which command to invoke. 4. 9.2215 -* 他パッケージとの連携[たはつけえしとのれんけい]: Cooperation with other packages. 4. 9.2216 -* コマンドヒストリ[こまんとひすとり]: Cooperation with other packages. 8. 9.2217 -* カーソルジャンプ[かあそるしやんふ]: Cursor jump. 4. 9.2218 -* %#記法自体の編集[%#きほうしたいのへんしゆう]: Editing %# notation. 4. 9.2219 -* パラグラフの桁揃え[はらくらふのけたそろえ]: Filling. 47. 9.2220 -* 領域決定規則[りよういきけつていきそく]: Fix region for typesetting. 25. 9.2221 -* 長いファイルの編集[なかいふあいるのへんしゆう]: Fix region for typesetting. 34. 9.2222 -* 固定領域のタイプセット[こていりよういきのたいふせつと]: Fix region for typesetting. 4. 9.2223 -* ギリシャ文字補完[きりしやもしほかん]: Greek letter completion. 4. 9.2224 -* イメージ補完[いめえしほかん]: Image completion. 4. 9.2225 -* 数式記号イメージ補完[すうしききこういめえしほかん]: Image completion. 4. 9.2226 -* 他のファイルの手直し[ほかのふあいるのてなおし]: Includeonly. 11. 9.2227 -* インクルード構造[いんくるうとこうそう]: Inclusion hierarchy browser. 4. 9.2228 -* おまかせ改行[おまかせかいきよう]: Intelligent newline. 4. 9.2229 -* プリントアウト[ふりんとあうと]: Invocation. 4. 9.2230 -* 環境の削除[かんきようのさくしよ]: Killing LaTeX command. 6. 9.2231 -* ラベル自動生成[らへるしとうせいせい]: label-generation. 4. 9.2232 -* フォント指定子[ふおんとしていし]: large型補完. 18. 9.2233 -* 文字サイズ指定子[もしさいすしていし]: large型補完. 18. 9.2234 -* ローカル辞書[ろおかるししよ]: Local dictionary. 4. 9.2235 -* 変更/削除[へんこう/さくしよ]: Modifying/Deleting. 4. 9.2236 -* グローバルヘルプ[くろおはるへるふ]: Online help. 16. 9.2237 -* オンラインヘルプ[おんらいんへるふ]: Online help. 4. 9.2238 -* キーワード検索[きいわあとけんさく]: Online help. 4. 9.2239 -* プライベートヘルプ[ふらいへえとへるふ]: Online help. 16. 9.2240 -* 入力ファイル分割[にゆうりよくふあいるふんかつ]: Splitting input files. 11. 9.2241 -* セクション区切り一覧バッファ[せくしよんくきりいちらんはつふあ]: view-sectioning. 18. 9.2242 -* セクション区切り[せくしよんくきり]: view-sectioning. 42. 9.2243 -* 現在のカラム表示[けんさいのからむひようし]: What column. 23. 9.2244 -* apropos: Online help. 4. 9.2245 -* autoload: Installation. 4. 9.2246 -* auto-mode-alist: Installation. 4. 9.2247 -* %#BEGIN: Fix region for typesetting. 4. 9.2248 -* begin型補完[beginかたほかん]: begin型補完. 4. 9.2249 -* C-c: Invocation. 4. 9.2250 -* Demacs: Intro. 4. 9.2251 -* .emacs: Installation. 4. 9.2252 -* %#END: Fix region for typesetting. 4. 9.2253 -* end補完[endほかん]: end補完. 4. 9.2254 -* ghostview: Splitting input files. 16. 9.2255 -* gmhist: Cooperation with other packages. 8. 9.2256 -* hook変数[hookへんすう]: Hook variables. 4. 9.2257 -* 出力終了ページ[しゆつりよくしゆうりようへえし]: Print out. 9. 9.2258 -* includeonly: Includeonly. 4. 9.2259 -* Install: Installation. 4. 9.2260 -* itemなどの桁揃え[itemなとのけたそろえ]: Filling. 8. 9.2261 -* 出力開始ページ[しゆつりよくかいしへえし]: Print out. 9. 9.2262 -* jlatex: Invocation. 4. 9.2263 -* large型補完[largeかたほかん]: large型補完. 4. 9.2264 -* LaTeX: Intro. 4. 9.2265 -* leftarrow: Image completion. 4. 9.2266 -* lpr format: lpr format. 4. 9.2267 -* lprフォーマットの変更[lprふおおまつとのへんこう]: Editing %# notation. 18. 9.2268 -* lprふぉーまっと[lprふおおまつと]: lpr format. 4. 9.2269 -* lprフォーマット[lprふおおまつと]: lpr format. 4. 9.2270 -* maketitle型補完[maketitleかたほかん]: maketitle型補完. 4. 9.2271 -* M-C-@: 環境を単位としたジャンプ. 7. 9.2272 -* M-C-a: 環境を単位としたジャンプ. 7. 9.2273 -* M-C-e: 環境を単位としたジャンプ. 7. 9.2274 -* min-out: Cooperation with other packages. 17. 9.2275 -* M-q: Filling. 47. 9.2276 -* Mule: Intro. 4. 9.2277 -* 勝手にincludeonly[かつてにincludeonly]: Includeonly. 4. 9.2278 -* NTT-jTeX[えぬていいていいしえいてつく]: Filling. 15. 9.2279 -* platex: Invocation. 4. 9.2280 -* prefix ,: Commenting out. 4. 9.2281 -* prefix .: Commenting out. 4. 9.2282 -* prefix <: Commenting out. 4. 9.2283 -* prefix >: Commenting out. 4. 9.2284 -* prefix /: Online help. 4. 9.2285 -* prefix ?: Online help. 4. 9.2286 -* prefix &: What column. 4. 9.2287 -* prefix a: Accent mark completion. 4. 9.2288 -* prefix b: begin型補完. 4. 9.2289 -* prefix c: Modifying/Deleting. 4. 9.2290 -* prefix d: Inclusion hierarchy browser. 4. 9.2291 -* prefix e: end補完. 4. 9.2292 -* prefix g: Cursor jump. 4. 9.2293 -* prefix i: Filling. 8. 9.2294 -* prefix k: Modifying/Deleting. 4. 9.2295 -* prefix key: Invocation. 4. 9.2296 -* prefix l: large型補完. 4. 9.2297 -* prefix m: maketitle型補完. 4. 9.2298 -* prefix s: section型補完. 4. 9.2299 -* prefix SPC: Arbitrary completion. 4. 9.2300 -* prefix w: Changing mode of YaTeX. 4. 9.2301 -* prefixキー変更[prefixきいへんこう]: Lisp variables. 4. 9.2302 -* ページ確認省略lpr起動[へえしかくにんしようりやくlprきとう]: Print out. 12. 9.2303 -* section型補完[sectionかたほかん]: section型補完. 4. 9.2304 -* 複雑なtabular[ふくさつなtabular]: What column. 4. 9.2305 -* 先回りusepackage[さきまわり]: Usepackage cheker. 4. 9.2306 -* YaTeX-help-file: Online help. 16. 9.2307 -* YaTeX-help-file-private: Online help. 16. 9.2308 -* YaTeX-item-regexp: Filling. 20. 9.2309 -* YaTeX-math-sign-alist-private: Image completion. 57. 9.2310 -* yatex-mode-hook: Hook variables. 4. 9.2311 -* yatex-mode-load-hook: Hook variables. 4. 9.2312 -* YaTeX-nervous: Local dictionary. 22. 9.2313 -* .yatexrc: Local dictionary. 4. 9.2314 - 9.2315 - 9.2316 - 9.2317 +* :: Greek letter completion. (line 5) 9.2318 +* ;: Image completion. (line 5) 9.2319 +* Σ[しくま]: Image completion. (line 5) 9.2320 +* 括る[くくる]: Enclose section-type command. (line 5) 9.2321 +* 括る[くくる]: large伍補完. (line 23) 9.2322 +* 引数[ひきすう]: 2個以上の引数をとるsection伍υン. (line 5) 9.2323 +* 欧文[おうふん]: Accent mark completion. (line 5) 9.2324 +* ∞[むけんたい]: Image completion. (line 5) 9.2325 +* 矢印[やしるし]: Image completion. (line 5) 9.2326 +* ;ゥ千[;ししん]: Image completion. (line 34) 9.2327 +* ロ窿ホ[ふろつく]: begin伍補完. (line 82) 9.2328 +* リ辜骸ひすとり]: Cooperation with other packages. (line 9) 9.2329 +* 桁揃え[けたそろえ]: Filling. (line 5) 9.2330 +* やちょう[やちよう]: Intro. (line 5) 9.2331 +* ラャン[しやんふ]: view-sectioning. (line 44) 9.2332 +* &入力[&にゆうりよく]: Intelligent newline. (line 5) 9.2333 +* 設定例[せつていれい]: Sample definitions. (line 5) 9.2334 +* 随時補完[すいしほかん]: Arbitrary completion. (line 5) 9.2335 +* 閉じ込める[としこめる]: begin伍補完. (line 82) 9.2336 +* 再驚補完[さいきほかん]: Recursive completion. (line 5) 9.2337 +* ユ⊥ψォ書ロゆうさししよ]: begin伍補完. (line 72) 9.2338 +* 倚理翰濁[ろんりかいそう]: view-sectioning. (line 44) 9.2339 +* ここはどこ?[ここはとこ?]: What column. (line 5) 9.2340 +* μリ゙εル[かすたまいす]: Customizations. (line 5) 9.2341 +* ξ⊥γχεン[きいあさいん]: Customizations. (line 5) 9.2342 +* 数ョモ⊥鐚すうしきもおと]: Image completion. (line 5) 9.2343 +* εンリ轣ロル[いんすとおる]: Installation. (line 5) 9.2344 +* ゙εレ窿゙[たいふせつた]: Invocation. (line 5) 9.2345 +* レヴュ⊥γ[ふれひゆうあ]: Invocation. (line 5) 9.2346 +* お管歩き縺ロル勤動[おえかきつうるきとう]: お管歩き縺ロル勤動. (line 5) 9.2347 +* 環境の先頭へ[かんきようのせんとうへ]: 環境を漬位としたラャン. (line 8) 9.2348 +* 環境の末尾へ[かんきようのまつひへ]: 環境を漬位としたラャン. (line 8) 9.2349 +* 環境を⊥π[かんきようをまあく]: 環境を漬位としたラャン. (line 8) 9.2350 +* γη辜宴テン[あうとらいん]: view-sectioning. (line 5) 9.2351 +* 引数の個数を変える[ひきすうのこすうをかえる]: 2個以上の引数をとるsection伍υン. (line 26) 9.2352 +* γπレン迢フ号補完[あくせんときこうほかん]: Accent mark completion. (line 5) 9.2353 +* μリ゙εル変数一覧[かすたまいすへんすういちらん]: All customizable variables. (line 5) 9.2354 +* 環境名の補完[かんきようめいのほかん]: begin伍補完. (line 5) 9.2355 +* ιラ⊥湘衰zえらあしゆうせい]: Calling typesetter. (line 5) 9.2356 +* ゙εレ窿゙勤動[たいふせつたきとう]: Calling typesetter. (line 5) 9.2357 +* ゙εレ窿辜ヌラ⊥[たいふせつとえらあ]: Calling typesetter. (line 5) 9.2358 +* 環境名の変菜[かんきようめいのへんこう]: Changing LaTeX command. (line 21) 9.2359 +* モ⊥關リり替え[もうときりかえ]: Changing mode of YaTeX. (line 5) 9.2360 +* 勤動するυン閧変える[きとうするこまんとをかえる]: Changing typesetter. (line 8) 9.2361 +* ゙εレ窿゙の守い分け[たいふせつたのつかいわけ]: Changing typesetter. (line 13) 9.2362 +* υメン辜チη躰こめんとあうと]: Commenting out. (line 5) 9.2363 +* その他のυン關ァ御[そのたのこまんとせいきよ]: Controlling which command to invoke. (line 5) 9.2364 +* 他窿ミ⊥ラとの价檎[たはつけえしとのれんけい]: Cooperation with other packages. (line 5) 9.2365 +* υン閭リ辜骸こまんとひすとり]: Cooperation with other packages. (line 9) 9.2366 +* μ⊥ワルラャン[かあそるしやんふ]: Cursor jump. (line 5) 9.2367 +* %#粁迷ゥ体の編 %#きほうしたいのへんしゆう]: Editing %# notation. (line 5) 9.2368 +* ラρラの桁揃え[はらくらふのけたそろえ]: Filling. (line 48) 9.2369 +* 固定領域の゙εレ窿躰こていりよういきのたいふせつと]: Fix region for typesetting. (line 5) 9.2370 +* 領域決定桐則[りよういきけつていきそく]: Fix region for typesetting. (line 27) 9.2371 +* 長いβεルの編 なかいふあいるのへんしゆう]: Fix region for typesetting. (line 36) 9.2372 +* οリωャ文字補完[きりしやもしほかん]: Greek letter completion. (line 5) 9.2373 +* εメ⊥ラ補完[いめえしほかん]: Image completion. (line 5) 9.2374 +* 数ョ粁号εメ⊥ラ補完[すうしききこういめえしほかん]: Image completion. (line 5) 9.2375 +* 他のβεルの手直し[ほかのふあいるのてなおし]: Includeonly. (line 12) 9.2376 +* εンπル⊥闕ワ造[いんくるうとこうそう]: Inclusion hierarchy browser. (line 5) 9.2377 +* 括弧入力補助ロかつこにゆうりよくほしよ]: Inserting parens. (line 5) 9.2378 +* おまかせ改窄[おまかせかいきよう]: Intelligent newline. (line 5) 9.2379 +* リン辜チη躰ふりんとあうと]: Invocation. (line 5) 9.2380 +* 環境の削除ロかんきようのさくしよ]: Killing LaTeX command. (line 7) 9.2381 +* ラルゥ動生成[らへるしとうせいせい]: label-generation. (line 5) 9.2382 +* κン邇定首[ふおんとしていし]: large伍補完. (line 19) 9.2383 +* 文字χεル樹定首[もしさいすしていし]: large伍補完. (line 19) 9.2384 +* ロ⊥μルォ書ロろおかるししよ]: Local dictionary. (line 5) 9.2385 +* 変菜/削除ロへんこう/さくしよ]: Modifying/Deleting. (line 5) 9.2386 +* λンラεンル[おんらいんへるふ]: Online help. (line 5) 9.2387 +* ξ⊥ワ⊥闌沚[きいわあとけんさく]: Online help. (line 5) 9.2388 +* ρロ⊥ルル[くろおはるへるふ]: Online help. (line 17) 9.2389 +* ラε⊥辜ル[ふらいへえとへるふ]: Online help. (line 17) 9.2390 +* 入力βεル分割[にゆうりよくふあいるふんかつ]: Splitting input files. (line 12) 9.2391 +* レπωョン区切り一覧窿β[せくしよんくきりいちらんはつふあ]: view-sectioning. (line 20) 9.2392 +* レπωョン区切り[せくしよんくきり]: view-sectioning. (line 44) 9.2393 +* 現在のμラム舗ヲ[けんさいのからむひようし]: What column. (line 24) 9.2394 +* apropos: Online help. (line 5) 9.2395 +* autoload: Installation. (line 5) 9.2396 +* auto-mode-alist: Installation. (line 5) 9.2397 +* %#BEGIN: Fix region for typesetting. (line 5) 9.2398 +* begin伍補完[beginかたほかん]: begin伍補完. (line 5) 9.2399 +* C-c: Invocation. (line 5) 9.2400 +* Demacs: Intro. (line 5) 9.2401 +* .emacs: Installation. (line 5) 9.2402 +* %#END: Fix region for typesetting. (line 5) 9.2403 +* end補完[endほかん]: end補完. (line 5) 9.2404 +* ghostview: Splitting input files. (line 17) 9.2405 +* gmhist: Cooperation with other packages. (line 9) 9.2406 +* hook変数[hookへんすう]: Hook variables. (line 5) 9.2407 +* 擾力終了⊥ラ[しゆつりよくしゆうりようへえし]: Print out. (line 10) 9.2408 +* includeonly: Includeonly. (line 5) 9.2409 +* Install: Installation. (line 5) 9.2410 +* itemなどの桁揃え[itemなとのけたそろえ]: Filling. (line 9) 9.2411 +* 擾力開腫⊥ラ[しゆつりよくかいしへえし]: Print out. (line 10) 9.2412 +* jlatex: Invocation. (line 5) 9.2413 +* large伍補完[largeかたほかん]: large伍補完. (line 5) 9.2414 +* LaTeX: Intro. (line 5) 9.2415 +* leftarrow: Image completion. (line 5) 9.2416 +* lpr format: lpr format. (line 5) 9.2417 +* lprκ⊥窿轤フ変菜[lprふおおまつとのへんこう]: Editing %# notation. (line 20) 9.2418 +* lprふぉ⊥まっと[lprふおおまつと]: lpr format. (line 5) 9.2419 +* lprκ⊥窿躰lprふおおまつと]: lpr format. (line 5) 9.2420 +* maketitle伍補完[maketitleかたほかん]: maketitle伍補完. (line 5) 9.2421 +* M-C-@: 環境を漬位としたラャン. (line 8) 9.2422 +* M-C-a: 環境を漬位としたラャン. (line 8) 9.2423 +* M-C-e: 環境を漬位としたラャン. (line 8) 9.2424 +* min-out: Cooperation with other packages. (line 18) 9.2425 +* M-q: Filling. (line 48) 9.2426 +* Mule: Intro. (line 5) 9.2427 +* 勝手u穎cludeonly[かつてにincludeonly]: Includeonly. (line 5) 9.2428 +* NTT-jTeX[えぬていいていいしえいてつく]: Filling. (line 16) 9.2429 +* platex: Invocation. (line 5) 9.2430 +* prefix ,: Commenting out. (line 5) 9.2431 +* prefix .: Commenting out. (line 5) 9.2432 +* prefix <: Commenting out. (line 5) 9.2433 +* prefix >: Commenting out. (line 5) 9.2434 +* prefix /: Online help. (line 5) 9.2435 +* prefix ?: Online help. (line 5) 9.2436 +* prefix &: What column. (line 5) 9.2437 +* prefix a: Accent mark completion. (line 5) 9.2438 +* prefix b: begin伍補完. (line 5) 9.2439 +* prefix c: Modifying/Deleting. (line 5) 9.2440 +* prefix d: Inclusion hierarchy browser. (line 5) 9.2441 +* prefix e: end補完. (line 5) 9.2442 +* prefix g: Cursor jump. (line 5) 9.2443 +* prefix i: Filling. (line 9) 9.2444 +* prefix k: Modifying/Deleting. (line 5) 9.2445 +* prefix key: Invocation. (line 5) 9.2446 +* prefix l: large伍補完. (line 5) 9.2447 +* prefix m: maketitle伍補完. (line 5) 9.2448 +* prefix s: section伍補完. (line 5) 9.2449 +* prefix SPC: Arbitrary completion. (line 5) 9.2450 +* prefix w: Changing mode of YaTeX. (line 5) 9.2451 +* prefixξ⊥変菜[prefixきいへんこう]: Lisp variables. (line 5) 9.2452 +* ⊥ラ器犯省羅麪r勤動[へえしかくにんしようりやくlprきとう]: Print out. (line 13) 9.2453 +* section伍補完[sectionかたほかん]: section伍補完. (line 5) 9.2454 +* 複ヌなtabular[ふくさつなtabular]: What column. (line 5) 9.2455 +* 先回りusepackage[さきまわり]: Usepackage cheker. (line 5) 9.2456 +* YaTeX-help-file: Online help. (line 17) 9.2457 +* YaTeX-help-file-private: Online help. (line 17) 9.2458 +* YaTeX-item-regexp: Filling. (line 21) 9.2459 +* YaTeX-math-sign-alist-private: Image completion. (line 61) 9.2460 +* yatex-mode-hook: Hook variables. (line 5) 9.2461 +* yatex-mode-load-hook: Hook variables. (line 5) 9.2462 +* YaTeX-nervous: Local dictionary. (line 23) 9.2463 +* .yatexrc: Local dictionary. (line 5) 9.2464 9.2465 Tag table: 9.2466 Node: Top257 9.2467 Node: Intro1311 9.2468 Node: Terminology1614 9.2469 -Node: Main features2249 9.2470 -Node: Installation3282 9.2471 -Node: Invocation4500 9.2472 -Node: Calling typesetter5319 9.2473 -Node: Calling previewer6556 9.2474 -Node: Print out6872 9.2475 -Node: %#notation7138 9.2476 -Node: Changing typesetter7566 9.2477 -Node: Splitting input files7824 9.2478 -Node: Fix region for typesetting8776 9.2479 -Node: lpr format9677 9.2480 -Node: Controlling which command to invoke10486 9.2481 -Node: Editing %# notation10887 9.2482 -Node: Completion11344 9.2483 -Node: begin型補完11817 9.2484 -Node: section型補完14401 9.2485 -Node: 2個以上の引数をとる section型コマンド15496 9.2486 -Node: Enclose section-type command16314 9.2487 -Node: Recursive completion16551 9.2488 -Node: view-sectioning16857 9.2489 -Node: label-generation18053 9.2490 -Node: large型補完18402 9.2491 -Node: maketitle型補完18982 9.2492 -Node: Arbitrary completion19281 9.2493 -Node: end補完19594 9.2494 -Node: Accent mark completion19936 9.2495 -Node: Image completion20361 9.2496 -Node: Greek letter completion22178 9.2497 -Node: Local dictionary22638 9.2498 -Node: Commenting out23243 9.2499 -Node: Cursor jump24402 9.2500 -Node: 対応オブジェクトへのジャンプ24639 9.2501 -Node: お絵描きツール起動25627 9.2502 -Node: メインファイルへのジャンプ26547 9.2503 -Node: 環境を単位としたジャンプ26883 9.2504 -Node: 最後の補完位置へのジャンプ27240 9.2505 -Node: Modifying/Deleting27477 9.2506 -Node: Changing LaTeX command27883 9.2507 -Node: Killing LaTeX command28434 9.2508 -Node: Filling29305 9.2509 -Node: Includeonly30634 9.2510 -Node: What column31195 9.2511 -Node: Intelligent newline31974 9.2512 -Node: Usepackage cheker33007 9.2513 -Node: Changing mode of YaTeX33433 9.2514 -Node: Online help34009 9.2515 -Node: Inclusion hierarchy browser34985 9.2516 -Node: Cooperation with other packages36263 9.2517 -Node: Customizations36718 9.2518 -Node: Lisp variables37015 9.2519 -Node: All customizable variables37622 9.2520 -Node: Sample definitions44923 9.2521 -Node: Hook variables45357 9.2522 -Node: Hook file46251 9.2523 -Node: Add-in functions46457 9.2524 -Node: Etc46684 9.2525 -Node: Copying46968 9.2526 -Node: Concept Index47599 9.2527 +Node: Main features2254 9.2528 +Node: Installation3316 9.2529 +Node: Invocation4546 9.2530 +Node: Calling typesetter5406 9.2531 +Node: Calling previewer6867 9.2532 +Node: Print out7183 9.2533 +Node: %#notation7449 9.2534 +Node: Changing typesetter7877 9.2535 +Node: Splitting input files8135 9.2536 +Node: Fix region for typesetting9091 9.2537 +Node: lpr format9999 9.2538 +Node: Controlling which command to invoke10809 9.2539 +Node: Editing %# notation11523 9.2540 +Node: Completion11981 9.2541 +Node: begin型補完12392 9.2542 +Node: section型補完15141 9.2543 +Node: 2個以上の引数をとる section型コマンド16234 9.2544 +Node: Enclose section-type command17048 9.2545 +Node: Recursive completion17372 9.2546 +Node: view-sectioning17677 9.2547 +Node: label-generation18873 9.2548 +Node: large型補完19223 9.2549 +Node: maketitle型補完19757 9.2550 +Node: Arbitrary completion20056 9.2551 +Node: end補完20369 9.2552 +Node: Accent mark completion20710 9.2553 +Node: Image completion21135 9.2554 +Node: Greek letter completion22950 9.2555 +Node: Inserting parens23434 9.2556 +Node: Local dictionary23782 9.2557 +Node: Commenting out24386 9.2558 +Node: Cursor jump25546 9.2559 +Node: 対応オブジェクトへのジャンプ25763 9.2560 +Node: お絵描きツール起動26749 9.2561 +Node: メインファイルへのジャンプ27664 9.2562 +Node: 環境を単位としたジャンプ28000 9.2563 +Node: 最後の補完位置へのジャンプ28357 9.2564 +Node: Modifying/Deleting28594 9.2565 +Node: Changing LaTeX command29000 9.2566 +Node: Killing LaTeX command29550 9.2567 +Node: Filling30422 9.2568 +Node: Includeonly31752 9.2569 +Node: What column32313 9.2570 +Node: Intelligent newline33092 9.2571 +Node: Usepackage cheker34124 9.2572 +Node: Changing mode of YaTeX34551 9.2573 +Node: Online help35126 9.2574 +Node: Inclusion hierarchy browser36103 9.2575 +Node: Cooperation with other packages37381 9.2576 +Node: Customizations37836 9.2577 +Node: Lisp variables38133 9.2578 +Node: All customizable variables38739 9.2579 +Node: Sample definitions47710 9.2580 +Node: Hook variables48144 9.2581 +Node: Hook file49038 9.2582 +Node: Add-in functions49244 9.2583 +Node: Etc49471 9.2584 +Node: Copying49756 9.2585 +Node: Concept Index50380 9.2586 9.2587 End tag table
10.1 --- a/docs/yatexj.tex Mon May 14 19:59:12 2012 +0900 10.2 +++ b/docs/yatexj.tex Sun Jul 12 14:21:20 2015 +0900 10.3 @@ -13,7 +13,7 @@ 10.4 @c ノードいじったら C-l C-u C-n 全部のノード更新 C-l C-u C-e 10.5 @c メニュー増やしたら C-l C-u C-m 全部のメニュー更新 C-l C-u C-a 10.6 @c フォーマットするときは C-l C-e C-b 10.7 -@c Last modified Fri May 11 15:40:21 2012 on firestorm 10.8 +@c Last modified Fri Feb 13 08:17:31 2015 on firestorm 10.9 @syncodeindex vr cp 10.10 @end iftex 10.11 10.12 @@ -124,7 +124,7 @@ 10.13 コマンドの補完入力 10.14 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) 10.15 @item 既に入力したテキストを環境やコマンド引数の中に取り込む括り補完 10.16 -(@kbd{C-u} +通常補完キー) 10.17 +(リジョン指定後に通常補完キー) 10.18 @item セクション区切り入力時の文書構造アウトライン表示 10.19 @item セクションコマンドの一括シフト (@ref{view-sectioning}) 10.20 @item 補完辞書の学習 10.21 @@ -196,8 +196,8 @@ 10.22 @dots{} 文書を作成する時の漢字コード 10.23 @item dviprint-command-format 10.24 @dots{} ファイルの印刷に使われるコマンド列の書式 10.25 -@item makeindex-command 10.26 - @dots{} makeindexコマンド 10.27 +@item YaTeX-dvipdf-command 10.28 + @dots{} DVIをPDFに変換するコマンド 10.29 @end table 10.30 10.31 これらを変更する場合は、やはり@file{~/.emacs}にて、たとえば 10.32 @@ -228,8 +228,9 @@ 10.33 @item [prefix] t r 10.34 @dots{} タイプセッタ起動(領域指定) 10.35 @item [prefix] t e 10.36 - @dots{} タイプセッタ起動 10.37 - (ポイント位置の環境または数式モードのみ対象) 10.38 + @dots{} 部分タイプセット&プレヴュー 10.39 + (ポイント位置の段落、環境または数式モードのみをタイプセットして 10.40 + 隣のバッファに組版結果の画像を出す) 10.41 @item [prefix] t k 10.42 @dots{} 動作中のタイプセッタの停止 10.43 @item [prefix] t b 10.44 @@ -296,11 +297,20 @@ 10.45 @subsection 環境タイプセット 10.46 10.47 @kbd{[prefix] te} を押すと、ポイント位置の最も内側の環境、または数式モー 10.48 -ド内の場合はその数式モード全体が自動的に領域選択されて、領域タイプセットを 10.49 -呼び出します。tabular環境や数式モードで複雑なものを作っている場合は確かめた 10.50 -い部分だけを確認できるので便利です。これも @file{texput.tex} に該当部分を 10.51 -書き出します。プレヴューアで @file{texput.dvi} を開いたままにしておけば 10.52 -修正と確認が素早くできるでしょう。 10.53 +ド内の場合はその数式モード全体、あるいは環境がなければその段落が自動的に 10.54 +領域選択されて、領域タイプセットを呼び出します。 10.55 +tabular環境や数式モードで複雑なものを作っている場合は確かめたい部分だけを 10.56 +確認できるので便利です。Emacsが画像表示可能な場合は、 10.57 +部分タイプセットの結果を画像化して隣のウィンドウに表示します。また、 10.58 +特定の環境で呼び出した場合は、環境内の文字を書き換える度に自動的に 10.59 +プレビュー画像を更新します(on-the-flyプレヴュー)。 10.60 +自動表示されない場合はプレヴューアで @file{texput.dvi} 10.61 +を開いたままにしておけば修正と確認が素早くできるでしょう。 10.62 + 10.63 + 画像プレヴューの場合の大きさ(解像度)はデフォルトで200dpi(数式は300dpi)です。 10.64 +dpiを変えたい場合はLaTeXソースのどこかに 10.65 +@code{%#PREVIEWDPI 150} 10.66 +のようにdpi値を書いてください。 10.67 10.68 @node Calling previewer, Print out, Calling typesetter, Invocation 10.69 @comment node-name, next, previous, up 10.70 @@ -524,10 +534,20 @@ 10.71 La@TeX{} 文書に関連するコマンドは以下の %# 記法で指定することができます。 10.72 10.73 @table @code 10.74 + @item %#PREVIEW 10.75 + @dots{} Command line for DVI viewing ([prefix] t p) 10.76 @item %#BIBTEX 10.77 @dots{} makeindexを行なうコマンドライン([prefix] t b) 10.78 @item %#MAKEINDEX 10.79 @dots{} bibtexを行なうコマンドライン([prefix] t i) 10.80 + @item %#DVIPDF 10.81 + @dots{} DVIからPDF変換を行なうコマンドライン([prefix] t d) 10.82 + @item %#LPR 10.83 + @dots{} 印刷用のコマンドライン([prefix] t l) 10.84 + @item %#PDFVIEW 10.85 + @dots{} PDFファイルを見るためのコマンドライン 10.86 + @item %#IMAGEDPI 10.87 + @dots{} 即時プレヴュー(on-the-fly preview)用の画像のDPI 10.88 @end table 10.89 10.90 行頭がこれらのキーワードで始まる行をLa@TeX{}文書の先頭付近に書いておけば、 10.91 @@ -568,15 +588,16 @@ 10.92 ができます。 10.93 10.94 @menu 10.95 -* begin型補完:: 10.96 -* section型補完:: 10.97 -* large型補完:: 10.98 -* maketitle型補完:: 10.99 +* begin型補完:: 10.100 +* section型補完:: 10.101 +* large型補完:: 10.102 +* maketitle型補完:: 10.103 * Arbitrary completion:: 随時補完 10.104 -* end補完:: 10.105 +* end補完:: 10.106 * Accent mark completion:: アクセント記号補完 10.107 * Image completion:: 数式記号イメージ補完 10.108 * Greek letter completion:: ギリシャ文字補完 10.109 +* Inserting parens:: 10.110 @end menu 10.111 10.112 @node begin型補完, section型補完, Completion, Completion 10.113 @@ -676,17 +697,19 @@ 10.114 @cindex 閉じ込める[としこめる] 10.115 10.116 例えばあるパラグラフを description 環境の中に入れたいときは、 10.117 -そのパラグラフをマークしてから、 10.118 - 10.119 -@table @kbd 10.120 -@item [prefix] B D 10.121 -@itemx (または ESC 1 [prefix] b D) 10.122 -@itemx (または C-u [prefix] b D など) 10.123 -@end table 10.124 - 10.125 -とタイプしてください。これは、@kbd{[prefix] b SPC}の補完入力にもあてはまり、 10.126 -@kbd{b} を大文字に変えて、@kbd{[prefix] B SPC} とタイプすれば、あらかじめ 10.127 -マークしておいたリジョンを、begin と end の環境で括ります。 10.128 +そのパラグラフをマークしてから、補完機能を呼び出してください(description 10.129 +環境の場合は @kbd{[prefix] b D})。 10.130 + 10.131 +選択された領域を括ります。ただしこれは @code{transient-mark-mode} が t 10.132 +(Emacsの標準)になっている場合のみで、普段 10.133 +@code{transient-mark-mode} を @code{nil} にしている場合は、 10.134 +補完キー前に @code{universal-argument} 指定(@kbd{C-u}) 10.135 +をタイプしてから @kbd{[prefix] b D} など、補完キーを 10.136 +タイプすれば括り補完になります。 10.137 +なおEmacs22以降であれば @code{transient-mark-mode} 無効時も 10.138 +@code{set-mark-command} (@kbd{C-space})の連打で一時的に 10.139 +@code{transient-mark-mode} が有効になります。 10.140 + 10.141 10.142 @node section型補完, large型補完, begin型補完, Completion 10.143 @comment node-name, next, previous, up 10.144 @@ -799,8 +822,11 @@ 10.145 @subsection 既に書いたテキストを括る 10.146 @cindex 括る[くくる] 10.147 10.148 - また、起動コマンドの@kbd{s}を大文字に変えて起動すると、あらかじめ書 10.149 -いた文章を section 型コマンドの第一引数として括ります。 10.150 + また、section型補完機能の呼び出し時に領域選択状態にしておくと 10.151 +領域内のテキストを section 型コマンドの第一引数として括ります。 10.152 +これも普段 @code{transient-mark-mode} を @code{nil} にしている場合は 10.153 +@kbd{C-u} のあとに補完キーをタイプすれば強制的に括り補完になります。 10.154 + 10.155 10.156 @node Recursive completion, view-sectioning, Enclose section-type command, section型補完 10.157 @comment node-name, next, previous, up 10.158 @@ -909,8 +935,7 @@ 10.159 10.160 また、begin型補完の時と同様、先に書いてしまった一連の文章の文字のサイズ 10.161 を変えたいと思う時がありますが、そのような時は、サイズや大きさを変えたい文 10.162 -字の範囲をマークしてから、呼び出しキーを @kbd{[prefix] L} と、大文字の L 10.163 -に変えて呼び出せば、そのリジョン全体が、ブレースで囲まれます。 10.164 +字の範囲をマークしてからlarge型補完を呼んでください。 10.165 10.166 @node maketitle型補完, Arbitrary completion, large型補完, Completion 10.167 @comment node-name, next, previous, up 10.168 @@ -1080,7 +1105,7 @@ 10.169 照してください。 10.170 @cindex YaTeX-math-sign-alist-private 10.171 10.172 -@node Greek letter completion, , Image completion, Completion 10.173 +@node Greek letter completion, Inserting parens, Image completion, Completion 10.174 @comment node-name, next, previous, up 10.175 @section ギリシャ文字補完 10.176 @cindex ギリシャ文字補完[きりしやもしほかん] 10.177 @@ -1098,6 +1123,18 @@ 10.178 とにより、強制的にイメージ補完に入ることができます。また、この時にどのよう 10.179 な状態で数式環境内判定に失敗したかをご連絡下さい。 10.180 10.181 +@node Inserting parens, , Greek letter completion, Completion 10.182 +@section 括弧入力補助 10.183 +@cindex 括弧入力補助[かつこにゆうりよくほしよ] 10.184 + 10.185 + 3種類ある括弧 () {} [] の開き括弧を入れたときに閉じ括弧を自動的に入れます。 10.186 +@code{\} の直後にの @code{[} を入れると行を分けてインデントを揃え、 10.187 +数式入力に備えます。その他 La@TeX{} のマクロに応じて括弧の釣合の取れた 10.188 +状態に導きます。開き括弧そのものを1つだけ入れたいときは @kbd{C-q} で 10.189 +クォート入力するか、@kbd{[prefix] w m} で修正モードをOFFにしてください。 10.190 + 10.191 + 領域選択してから開き括弧を入れるとその領域をその種類の括弧で括ります。 10.192 + 10.193 @node Local dictionary, Commenting out, Completion, Top 10.194 @comment node-name, next, previous, up 10.195 @chapter ローカル辞書 10.196 @@ -1895,6 +1932,60 @@ 10.197 dviをPDFに変換するコマンド (@code{"dvipdfmx"}) 10.198 @end defvar 10.199 10.200 +@defvar YaTeX-on-the-fly-preview-interval 10.201 +@kbd{[prefix] t e}で環境即時previewをする場合の変換処理までの 10.202 +無操作時間(秒) (0.9) 10.203 +@code{nil} の場合は即時プレヴューをしない。 10.204 +@end defvar 10.205 + 10.206 +@defvar YaTeX-on-the-fly-math-preview-engine 10.207 +@kbd{[prefix] t e}で数式環境を即時previewする時に用いるエンジン 10.208 +(latex-math-previewが利用可能なときは latex-math-preview-expression を呼ぶ 10.209 +@code{'YaTeX-typeset-environment-by-lmp} 10.210 +そうでないときは内蔵関数を呼ぶ @code{'YaTeX-typeset-environment-by-builtin}) 10.211 +@end defvar 10.212 + 10.213 +@defvar YaTeX-cmd-gimp 10.214 +GIMPを起動するコマンド (code{"gimp"}) 10.215 +@end defvar 10.216 +@defvar YaTeX-cmd-tgif 10.217 +tgifを起動するコマンド (code{"tgif"}) 10.218 +@end defvar 10.219 +@defvar YaTeX-cmd-inkscape 10.220 +Inkscapeを起動するコマンド (code{"inkscape"}) 10.221 +@end defvar 10.222 +@defvar YaTeX-cmd-dia 10.223 +Diaを起動するコマンド (code{"dia"}) 10.224 +@end defvar 10.225 +@defvar YaTeX-cmd-ooo 10.226 +OpenOffice.orgまたはLibreOfficeを起動するコマンド (code{"soffice"}) 10.227 +@end defvar 10.228 +@defvar YaTeX-cmd-gs 10.229 +Ghostscriptを起動するコマンド (code{"gs"}) 10.230 +@end defvar 10.231 +@defvar YaTeX-cmd-dvips 10.232 +dvipsを起動するコマンド(環境によってはpdvipsなど) (code{"dvips"}) 10.233 +@end defvar 10.234 +@defvar YaTeX-cmd-displayline 10.235 +displaylineを起動するコマンド 10.236 +(code{"/Applications/Skim.app/Contents/SharedSupport/displayline"}) 10.237 +@end defvar 10.238 +@defvar YaTeX-cmd-edit-ps 10.239 +PostScriptファイルを編集するコマンド (変数code{"YaTeX-cmd-gimp"}の値) 10.240 +@end defvar 10.241 +@defvar YaTeX-cmd-edit-pdf 10.242 +PDFファイルを編集するコマンド (変数code{"YaTeX-cmd-ooo"}の値) 10.243 +@end defvar 10.244 +@defvar YaTeX-cmd-edit-ai 10.245 +.aiファイルを編集するコマンド (変数code{"YaTeX-cmd-inkscape"}の値) 10.246 +@end defvar 10.247 +@defvar YaTeX-cmd-edit-svg 10.248 +SVGファイルを編集するコマンド (変数code{"YaTeX-cmd-inkscape"}の値) 10.249 +@end defvar 10.250 +@defvar YaTeX-cmd-edit-images 10.251 +その他画像ファイルを編集するコマンド (変数code{"YaTeX-cmd-gimp"}の値) 10.252 +@end defvar 10.253 + 10.254 @defvar YaTeX-need-nonstop 10.255 @code{\nonstopmode@{@}}を自動的に付加するか (@code{nil}) 10.256 @end defvar 10.257 @@ -2094,6 +2185,12 @@ 10.258 verbatim環境などを指定する。 10.259 @end defvar 10.260 10.261 +@defvar YaTeX-electric-indent-mode 10.262 +Emacs 24.4 で導入された改行時の、自動インデントをどうするか。 10.263 +この値がそのまま electric-indent-local-mode に渡される。 10.264 +-1でoff。 10.265 +@end defvar 10.266 + 10.267 @defvar YaTeX-ref-default-label-string 10.268 \ref@{@} のラベル補完でラベル未設定のものに自動的に生成する 10.269 ラベル名の書式。strftime(3)関数に似た日付ベースで指定する。
11.1 --- a/docs/yatexref.eng Mon May 14 19:59:12 2012 +0900 11.2 +++ b/docs/yatexref.eng Sun Jul 12 14:21:20 2015 +0900 11.3 @@ -47,15 +47,16 @@ 11.4 11.5 [Process invoking] 11.6 11.7 + *invoke latex [prefix] tj 11.8 + *invoke latex (on region) [prefix] tr 11.9 + *on-the-fly preview environment [prefix] te 11.10 *invoke bibtex [prefix] tb 11.11 - *invoke latex [prefix] tj 11.12 *invoke makeindex [prefix] ti 11.13 *kill current typesetting process [prefix] tk ** 11.14 *lpr dvi-file [prefix] tl 11.15 *lpr dvi-file (all pages) C-u [prefix] tl 11.16 *invoke previewer [prefix] tp 11.17 *invoke lpq [prefix] tq 11.18 - *invoke jlatex (on region) [prefix] tr 11.19 11.20 Hitting [prefix] t will get you the menu, so there is no need to 11.21 remember the key after [prefix] t. 11.22 @@ -71,7 +72,7 @@ 11.23 *To the typeset error [prefix] ' 11.24 11.25 Will jump to the position where the typeset error occurred from the 11.26 - end. Only effective when there was a error returned from latex. 11.27 + end. Only effective when there was a error returned from typesetter. 11.28 11.29 *Jump to corresponding object [prefix] g 11.30 *Jump to corresponding object (in another her window) [prefix] 4g 11.31 @@ -84,6 +85,7 @@ 11.32 -on a \include(only) or \input to the matching file 11.33 -on a \ref or \label to the matching \label or \ref 11.34 -on a \cite or \bibitem to the matching \bibitem or \cite 11.35 + -other to the matching line in previewer 11.36 11.37 *Jump to the main file [prefix] ^ 11.38 *Jump to the main file in another window [prefix] 4^ 11.39 @@ -153,6 +155,7 @@ 11.40 enumerate, list and description environments. 11.41 11.42 *Browse included structure [prefix] d 11.43 + *Force re-highlight font-lock [prefix] u 11.44 11.45 HIROSE Yuuji 11.46 yuuji@yatex.org
12.1 --- a/help/YATEXHLP.eng Mon May 14 19:59:12 2012 +0900 12.2 +++ b/help/YATEXHLP.eng Sun Jul 12 14:21:20 2015 +0900 12.3 @@ -1722,8 +1722,9 @@ 12.4 \end{figure*} 12.5 12.6 includegraphics 12.7 -\usepackage{graphicx} ... \includegraphics[Options]{graphicfile.eps} 12.8 +\usepackage[DRIVER]{graphicx} ... \includegraphics[Options]{graphicfile.eps} 12.9 Include graphics$B!#(BRequires `graphicx' package. 12.10 +Typical [DRIVER] is [dvipdfmx]. 12.11 Possible [Options] are as follows. 12.12 scale=X 12.13 width=W 12.14 @@ -1735,6 +1736,36 @@ 12.15 viewport=llx lly urx ury (Rerative to BoundingBox) 12.16 trim=left bottom right top 12.17 12.18 +[Example] 12.19 +% Preamble 12.20 +\usepackage[dvipdfmx]{graphicx} 12.21 +% document body 12.22 +\begin{figure}[h]\centering 12.23 + \includegraphics[width=0.4\columnwidth,bb=0 0 400 300]{foo.jpg} 12.24 + \caption{foo image}\label{foo-fig} 12.25 +\end{figure} 12.26 +Figure \ref{foo-fig} says that foo is foo. 12.27 +% YaTeX automatically inserts `bb=' line when you input \includegraphics{} 12.28 +% with completion. 12.29 + 12.30 +wrapfigure 12.31 +\begin{wrapfigure}[LINES]{POS}[OVH]{WIDTH} ...Images... \end{wrapfigure} 12.32 +LINES(Optional) Number of narrow lines 12.33 +POS One of `r l i o' (Right, Left, Inside, Outside) 12.34 + R L I O for float 12.35 +OVH(Optional) Overhangs for margin 12.36 +WIDTH Width of figure 12.37 + 12.38 +[Example] 12.39 +% Preamble 12.40 +\usepackage{wrapfig} 12.41 +% body of document 12.42 +\begin{wrapfigure}{r}{4cm} 12.43 + \includegraphics[width=3cm,bb=0 0 640 480,clip]{foo.jpg} 12.44 + \caption{foo image}\label{foo-jpg} 12.45 +\end{wrapfigure} 12.46 + 12.47 + 12.48 abstract 12.49 \begin{abstract} ... \end{abstract} 12.50 Output abstract
13.1 --- a/help/YATEXHLP.jp Mon May 14 19:59:12 2012 +0900 13.2 +++ b/help/YATEXHLP.jp Sun Jul 12 14:21:20 2015 +0900 13.3 @@ -1738,8 +1738,9 @@ 13.4 \end{figure*} 13.5 13.6 includegraphics 13.7 -\usepackage{graphicx} ... \includegraphics[オプション]{graphicfile.eps} 13.8 +\usepackage[ドライバ]{graphicx} ... \includegraphics[オプション]{IMG.eps} 13.9 画像を取り込む。要 graphicx パッケージ。 13.10 +「ドライバ」は dvipdfmx 等。 13.11 「オプション」は以下のものが指定可能。 13.12 scale=拡大率 13.13 width=幅 13.14 @@ -1751,6 +1752,34 @@ 13.15 viewport=llx lly urx ury (BoundingBox内の相対的座標で切り取る) 13.16 trim=left bottom right top (指定した幅を切り取る) 13.17 13.18 +【使用例】 13.19 +% プリアンブル 13.20 +\usepackage[dvipdfmx]{graphicx} 13.21 +% 本文 13.22 +\begin{figure}[h]\centering 13.23 + \includegraphics[width=0.4\columnwidth,bb=0 0 400 300]{hoge.jpg} 13.24 + \caption{hogeの仕組}\label{hoge-fig} 13.25 +\end{figure} 13.26 +図\ref{hoge-fig}にあるとおり、ほげはほげなのだ。 13.27 +% \includegraphics{} を補完入力するとbb=行はyatexが勝手に調べて入れる。 13.28 + 13.29 +wrapfigure 13.30 +\begin{wrapfigure}[LINES]{POS}[OVH]{WIDTH} ...画像... \end{wrapfigure} 13.31 +LINES(省略可) 回り込みする行数(デフォルトは画像の高さ分) 13.32 +POS r l i o のどれか(右、左、見開き内側、外側) 13.33 + 大文字 R L I O は画像フロート 13.34 +OVH(省略可) 画像の張り出しマージン(\wrapoverhang 通常0) 13.35 +WIDTH 回り込みする(画像込みの)幅 13.36 + 13.37 +【使用例】 13.38 +% プリアンブル 13.39 +\usepackage{wrapfig} 13.40 +% 本文 13.41 +\begin{wrapfigure}{r}{4cm} 13.42 + \includegraphics[width=3cm,bb=0 0 640 480,clip]{hoge.jpg} 13.43 + \caption{ほげほげ}\label{hoge-jpg} 13.44 +\end{wrapfigure} 13.45 + 13.46 abstract 13.47 \begin{abstract} ... \end{abstract} 13.48 抄録(アブストラクト)を出力する。
14.1 --- a/install Mon May 14 19:59:12 2012 +0900 14.2 +++ b/install Sun Jul 12 14:21:20 2015 +0900 14.3 @@ -3,59 +3,32 @@ 14.4 Installation of YaTeX / 野鳥のインストール 14.5 ****************************************** 14.6 14.7 -Put these expressions into your ~/.emacs 14.8 -まず ~/.emacsに下の2項目を加えます。 14.9 - 14.10 - (setq auto-mode-alist 14.11 - (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) 14.12 - (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) 14.13 - 14.14 -Then, add certain path name where you put files of YaTeX to your 14.15 -load-path. If you want to put them in `~/src/emacs', write 14.16 -次に野鳥の emacs-lisp ファイル群を置くディレクトリを load-path に加えます。 14.17 -たとえば、`~/src/emacs/yatex'に置くのであれば、 14.18 - 14.19 - (setq load-path (cons (expand-file-name "~/src/emacs/yatex") load-path)) 14.20 - 14.21 -in your ~/.emacs. 14.22 -などとします。 14.23 - 14.24 -Then edit makefile and set your environment variable `DISPLAY' correctly, 14.25 -exec the next. 14.26 -続いて makefile を編集し、環境変数 DISPLAY の値を正しくセットしてから 14.27 +First, take a look at makefile to confirm or modify EMACS= and PREFIX= 14.28 +lines and exec the next command. 14.29 +このディレクトリにある makefile の EMACS= と PREFIX= の行を確認し、 14.30 +必要なら修正した後に以下のコマンドを起動してください。 14.31 14.32 % make install 14.33 + (or "sudo make install") 14.34 14.35 -でインストールを行ってください。 14.36 +Then, type `make show-init' on the shell in this directory as below 14.37 +and ou will get elisp expressions. Add the expressions to your ~/.emacs. 14.38 +続いて以下のようにコマンドを起動し、得られた結果出力を ~/.emacs 14.39 +に足してください。 14.40 14.41 - If `make install' fails, do as follows; 14.42 - もし `make install' でうまく行かない時は下記のように手動でインストール 14.43 -を行ってください。 14.44 + % make show-init 14.45 14.46 -First, copy `*.el' to suitable directory. 14.47 -最初に、野鳥の emacs-lisp ファイル群を適当なディレクトリにコピーします。 14.48 +After copying output from make command to your ~/.emacs, you will be able to 14.49 +use yatex-mode for *.tex files. 14.50 +以上で、初期設定は終わりです。 14.51 14.52 -Then copy `help/YATEXHLP.eng' to $EMACS/etc directory, which is 14.53 -displayed by typin `exec-directory C-j' in the *scratch* buffer 14.54 -(on Emacs19, $exec-directory/../../site-lisp). 14.55 -つぎに、help/YATEXHLP.jp を Emacs の etc ディレクトリに入れます。 14.56 -(*scratch* バッファで「exec-directory C-j」とうって示されるところです 14.57 - Emacs19以降の場合 doc-directory の ../../site-lisp) 14.58 14.59 +Without installing to default-dir, you can use yatex by adding the elisp 14.60 +obtained by below to ~/.emacs. 14.61 +インストールしなくても以下のコマンド出力を ~/.emacs に追加すれば 14.62 +普通に使えます。 14.63 14.64 -Finally, copy `docs/yatexe' and `docs/yahtmle' to Info directory and 14.65 -append the contents of `dir' in this directory to `dir' of Info directory. 14.66 -最後に、info ディレクトリに docs/yatexj, docs/yatexe, docs/yahtmlj, 14.67 -docs/yahtmle をコピーし、info ディレクトリの dir というファイルにこのディ 14.68 -レクトリの dir ファイルの中身を追加します。 14.69 - 14.70 -Note that when you byte-compile yatex19.el, do it on window system. 14.71 -This file cannot be compiled on terminal Emacs because it requires 14.72 -hilit19.el, which cannot be loaded on terminal Emacs. But you don't 14.73 -have to byte-compile it. 14.74 -注意: yatex19.el をバイトコンパイルする時はウィンドウシステム上の emacs 14.75 -で行って下さい。emacs -nw では、hilit19.el がロードできず、正常にコンパ 14.76 -イルできません。うまくいかない場合はバイトコンパイルしなくて構いません。 14.77 + % make show-init2 14.78 14.79 14.80 About yahtml / yahtmlについて
15.1 --- a/makefile Mon May 14 19:59:12 2012 +0900 15.2 +++ b/makefile Sun Jul 12 14:21:20 2015 +0900 15.3 @@ -3,13 +3,13 @@ 15.4 # 15.5 15.6 # Edit these variables to be suitable for your site 15.7 -PREFIX = /usr/local 15.8 +EMACS = emacs 15.9 +#EMACS = mule 15.10 +PREFIX = `${EMACS} -batch --eval '(princ (expand-file-name "../../../.." data-directory))'` 15.11 +# PREFIX = /usr/local 15.12 15.13 -## mule2 15.14 -#EMACS = mule 15.15 #EMACSDIR= ${PREFIX}/lib/${EMACS} 15.16 ## emacs20 or later 15.17 -EMACS = emacs 15.18 EMACSDIR= ${PREFIX}/share/${EMACS} 15.19 ## XEmacs 15.20 #EMACS = xemacs 15.21 @@ -17,7 +17,7 @@ 15.22 ## Meadow (Sample) 15.23 #EMACS = meadow 15.24 #EMACSDIR = c:/usr/local/meadow 15.25 -## CarbonEmacs on Darwin (Sample) 15.26 +## Cocoa(or Carbon)Emacs on Darwin (Sample) 15.27 #EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs 15.28 #PREFIX = /Applications/Emacs.app/Contents/Resources 15.29 #EMACSDIR = ${PREFIX} 15.30 @@ -25,8 +25,8 @@ 15.31 LISPDIR = ${EMACSDIR}/site-lisp/yatex 15.32 # LISPDIR = ${EMACSDIR}/site-packages/lisp/yatex 15.33 DOCDIR = ${LISPDIR}/docs 15.34 -HELPDIR = ${EMACSDIR}/site-lisp 15.35 -INFODIR = ${PREFIX}/info 15.36 +HELPDIR = ${LISPDIR}/help 15.37 +INFODIR = ${PREFIX}/share/info 15.38 15.39 TAR = tar 15.40 INSTALL = install -c -m 444 15.41 @@ -41,7 +41,6 @@ 15.42 # Do not edit below 15.43 ################### 15.44 # make install to install YaTeX into public space 15.45 -# make install-nw same as above, but -nw mode, or Emacs18(Nemacs) 15.46 # make ajimi to feel taste 15.47 # make ajimi-nw same as above, but -nw mode 15.48 # make package to create package for relase 15.49 @@ -49,8 +48,8 @@ 15.50 # make clean to delete all producted files 15.51 # make ci to check in all 15.52 # make co to check out all 15.53 -MVER = 1.76 15.54 -LISP = ${LISP18} ${LISP19} 15.55 +MVER = 1.78 15.56 +LISP = ${LISP18} ${LISP19} ${LISP23} 15.57 YAHTML = yahtml.el 15.58 COMMON = yatexlib.el yatexprc.el 15.59 LISP18 = comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \ 15.60 @@ -58,6 +57,7 @@ 15.61 yatexmth.el yatexhks.el yatexhlp.el \ 15.62 yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML} 15.63 LISP19 = yatex19.el 15.64 +LISP23 = yatex23.el 15.65 DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS} 15.66 NEWS = yatex.new 15.67 DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex 15.68 @@ -75,18 +75,18 @@ 15.69 YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb 15.70 PACK = `ls ${DISTRIB}` 15.71 TMPDIR = /tmp 15.72 -VERSION = `head yatex.el|awk '/rev\./{print $$4}'` 15.73 +VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'` 15.74 PACKDIR = ${TMPDIR}/yatex${VERSION} 15.75 15.76 all: 15.77 @echo "Edit this makefile first." 15.78 - @echo 'Type "make install" to install YaTeX.' 15.79 - @echo 'Type "make install-yahtml" to install yahtml.' 15.80 - @echo 'If you cling to elc files. type "make elc" before make install' 15.81 + @echo 'Type "${MAKE} install" to install YaTeX.' 15.82 + @echo 'Type "${MAKE} install-yahtml" to install yahtml.' 15.83 + @echo 'If you love elc files, type "${MAKE} elc" before ${MAKE} install' 15.84 # @echo "If you don't use X-clinet of Emacs," 15.85 # @echo 'type "make install-nw" instead.' 15.86 15.87 -install: install-real 15.88 +install: install-real install-message 15.89 #install-yahtml: bytecompile-yahtml 15.90 install-yahtml: 15.91 [ -d ${LISPDIR} ] || mkdir ${LISPDIR} 15.92 @@ -97,9 +97,10 @@ 15.93 ${INSTALL} *.el* ${LISPDIR} 15.94 15.95 install-real: 15.96 - if [ ! -d ${LISPDIR} ]; then ${MKDIR} ${LISPDIR}; fi 15.97 - if [ ! -d ${DOCDIR} ]; then ${MKDIR} ${DOCDIR}; fi 15.98 - if [ ! -d ${INFODIR} ]; then ${MKDIR} ${INFODIR}; fi 15.99 + [ -d ${LISPDIR} ] || ${MKDIR} ${LISPDIR} 15.100 + [ -d ${HELPDIR} ] || ${MKDIR} ${HELPDIR} 15.101 + [ -d ${DOCDIR} ] || ${MKDIR} ${DOCDIR} 15.102 + [ -d ${INFODIR} ] || ${MKDIR} ${INFODIR} 15.103 for f in *.el; do \ 15.104 rm -f ${LISPDIR}/$${f}c; \ 15.105 done 15.106 @@ -107,10 +108,24 @@ 15.107 ${INSTALL} ${DOCSRC} ${DOCDIR} 15.108 ${INSTALL} ${DOCOBJ} ${INFODIR} 15.109 ${INSTALL} ${HELP} ${HELPDIR} 15.110 + 15.111 +install-message: 15.112 @echo "--------------------------------" 15.113 - @echo "If you have install-info command, type 'make install-info'." 15.114 + @echo "If you have install-info command, type '${MAKE} install-info'." 15.115 @echo "If not, add next lines into your site's info dir manually." 15.116 @cat dir 15.117 + @echo "--------------------------------" 15.118 + @echo "=== INSTALLATION DONE ===" 15.119 + @echo " You might need to add these expression below to your ~/.emacs" 15.120 + @echo " エーホサ. ~/.emacs ナ、ヒーハイシ、トノイテ、ケ、ノャヘラ、ャ、「、、ォ、筅キ、、゙、サ、." 15.121 + @echo 15.122 + @echo ";;; ------ Startup definitions for YaTeX ------ ;;;" 15.123 + @${MAKE} show-init 15.124 + @echo ";;; ------------------------------------------- ;;;" 15.125 + @echo 15.126 + @echo " To get elisp above again, call ${MAKE} command as below." 15.127 + @echo " セ蠏ュelisp、コニナルニタ、、ヒ、マーハイシ、ホ、隍ヲ、ヒ${MAKE}、オッニー、キ、ニ、ッ、タ、オ、、." 15.128 + @echo " % ${MAKE} $${PREFIX:+PREFIX=$$PREFIX }show-init" 15.129 15.130 install-info: 15.131 for f in ${DOCOBJ}; do \ 15.132 @@ -119,6 +134,31 @@ 15.133 --section=Emacs $${f} ${INFODIR}/dir; \ 15.134 done 15.135 15.136 +show-init: 15.137 + @printf '%s\n' \ 15.138 + '(setq auto-mode-alist' \ 15.139 + " (cons (cons \"\\.tex$$\" 'yatex-mode) auto-mode-alist))" \ 15.140 + "(autoload 'yatex-mode \"yatex\" \"Yet Another LaTeX mode\" t)" \ 15.141 + "(add-to-list 'load-path \"${LISPDIR}\")" \ 15.142 + "(setq YaTeX-help-file \"${LISPDIR}/help/YATEXHLP.eng\")" 15.143 + @printf '(setq tex-command "%s")\n' \ 15.144 + `CMDS='platex pdflatex ptex2pdf lualatex' DFLT=latex \ 15.145 + ${MAKE} -s search-cmd` 15.146 + @printf '(setq dvi2-command "%s")\n' \ 15.147 + `CMDS='pxdvi xdvik kxdvi dviout texworks' DFLT=xdvi \ 15.148 + ${MAKE} -s search-cmd` 15.149 + @printf '(setq tex-pdfview-command "%s")\n' \ 15.150 + `CMDS='evince mupdf xpdf kpdf texworks sumatrapdf' \ 15.151 + DFLT=acroread \ 15.152 + ${MAKE} -s search-cmd` 15.153 + 15.154 +show-init2: 15.155 + @${MAKE} LISPDIR=$$PWD show-init 15.156 + 15.157 +search-cmd: 15.158 + @for f in $$CMDS; do \ 15.159 + type $$f >/dev/null 2>&1 && echo $$f && exit 0; done; echo $$DFLT 15.160 + 15.161 install-nw: bytecompile-nw install-real 15.162 15.163 elc: bytecompile
16.1 --- a/manifest Mon May 14 19:59:12 2012 +0900 16.2 +++ b/manifest Sun Jul 12 14:21:20 2015 +0900 16.3 @@ -25,6 +25,7 @@ 16.4 yatex.el 野鳥・主 Emacs-Lisp ファイル 16.5 yatex.new 各バージョンの変更履歴 16.6 yatex19.el Emacs-19(Mule2)用の設定 16.7 +yatex23.el Emacs-23以降用の設定 16.8 yatexadd.el 付加関数の定義例 16.9 yatexenv.el LaTeX 環境依存の関数 16.10 yatexgen.el 野鳥用付加関数自動作成モード
17.1 --- a/yahtml.el Mon May 14 19:59:12 2012 +0900 17.2 +++ b/yahtml.el Sun Jul 12 14:21:20 2015 +0900 17.3 @@ -1,11 +1,13 @@ 17.4 -;;; -*- Emacs-Lisp -*- 17.5 -;;; (c) 1994-2012 by HIROSE Yuuji [yuuji(@)yatex.org] 17.6 -;;; Last modified Thu May 10 11:06:39 2012 on firestorm 17.7 +;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- 17.8 +;;; (c) 1994-2015 by HIROSE Yuuji [yuuji(@)yatex.org] 17.9 +;;; Last modified Wed Feb 11 12:17:03 2015 on firestorm 17.10 ;;; $Id$ 17.11 17.12 -(defconst yahtml-revision-number "1.76" 17.13 +(defconst yahtml-revision-number "1.78.1" 17.14 "Revision number of running yahtml.el") 17.15 17.16 +;;; Commentary: 17.17 + 17.18 ;;;[Installation] 17.19 ;;; 17.20 ;;; First, you have to install YaTeX and make sure it works fine. Then 17.21 @@ -176,6 +178,7 @@ 17.22 ;;; (というかほとんどやってもらった ^^;) 17.23 ;;; 17.24 17.25 +;;; Code: 17.26 17.27 (require 'yatexlib) 17.28 ;;; --- customizable variable starts here --- 17.29 @@ -283,6 +286,10 @@ 17.30 "*Non-nil means editing HTML 4.01 Strict. 17.31 Completing read for obsoleted attributes disabled.") 17.32 17.33 +(defvar yahtml-electric-indent-mode -1 17.34 + "*(Emacs 24.4+) Pass this value to electric-indent-local-mode. 17.35 +-1 means `off'.") 17.36 + 17.37 ;;; --- customizable variable ends here --- 17.38 (defvar yahtml-prefix-map nil) 17.39 (defvar yahtml-mode-map nil "Keymap used in yahtml-mode.") 17.40 @@ -341,8 +348,8 @@ 17.41 (YaTeX-define-key "l" 'yahtml-insert-tag map) 17.42 (YaTeX-define-key "L" 'yahtml-insert-tag-region map) 17.43 (YaTeX-define-key "m" 'yahtml-insert-single map) 17.44 - (YaTeX-define-key "n" '(lambda () (interactive) (insert (if yahtml-prefer-upcases "<BR>" "<br>"))) map) 17.45 - (YaTeX-define-key "-" '(lambda () (interactive) (insert (if yahtml-prefer-upcases "<HR>" "<hr>") "\n")) map) 17.46 + (YaTeX-define-key "n" (function(lambda () (interactive) (insert (if yahtml-prefer-upcases "<BR>" "<br>")))) map) 17.47 + (YaTeX-define-key "-" (function(lambda () (interactive) (insert (if yahtml-prefer-upcases "<HR>" "<hr>") "\n"))) map) 17.48 (YaTeX-define-key "p" 'yahtml-insert-p map) 17.49 (if YaTeX-no-begend-shortcut 17.50 (progn 17.51 @@ -434,6 +441,7 @@ 17.52 ("h1") ("h2") ("h3") ("h4") ("h5") ("h6") 17.53 ;; ("p") ;This makes indentation screwed up! 17.54 ("style") ("script") ("noscript") ("div") ("object") ("ins") ("del") 17.55 + ("option") 17.56 )) 17.57 17.58 (if yahtml-html4-strict 17.59 @@ -657,14 +665,22 @@ 17.60 (font-lock-mode 1) ;;Why should I fontify again??? 17.61 ;; in yatex-mode, there's no need to refontify... 17.62 (font-lock-fontify-buffer))))) 17.63 + ;; +dnd for X11 w/ emacs23+ 17.64 + (and window-system (featurep 'dnd) 17.65 + (set (make-local-variable 'dnd-protocol-alist) 17.66 + (cons (cons "^\\(file\\|https?\\):" 'yahtml-dnd-handler) 17.67 + dnd-protocol-alist))) 17.68 + 17.69 (set-syntax-table yahtml-syntax-table) 17.70 (use-local-map yahtml-mode-map) 17.71 (YaTeX-read-user-completion-table) 17.72 (yahtml-css-scan-styles) 17.73 - (turn-on-auto-fill) ;Sorry, this is prerequisite 17.74 + ;(turn-on-auto-fill) ;Sorry, this is prerequisite 17.75 (and (= 0 (buffer-size)) (file-exists-p yahtml-template-file) 17.76 (y-or-n-p (format "Insert %s?" yahtml-template-file)) 17.77 (insert-file-contents (expand-file-name yahtml-template-file))) 17.78 + (if (fboundp 'electric-indent-local-mode) 17.79 + (electric-indent-local-mode yahtml-electric-indent-mode)) 17.80 (run-hooks 'text-mode-hook 'yahtml-mode-hook) 17.81 17.82 ;; This warning should be removed after a while(2000/12/2) 17.83 @@ -808,18 +824,20 @@ 17.84 (cons "typeface" yahtml-menu-map-typeface))))) 17.85 (if (featurep 'xemacs) 17.86 (add-hook 'yahtml-mode-hook 17.87 - '(lambda () 17.88 + (function 17.89 + (lambda () 17.90 (or (assoc "yahtml" current-menubar) 17.91 (progn 17.92 (set-buffer-menubar (copy-sequence current-menubar)) 17.93 - (add-submenu nil yahtml-menu-map)))))))) 17.94 + (add-submenu nil yahtml-menu-map))))))))) 17.95 17.96 ;;; ----------- Completion ---------- 17.97 (defvar yahtml-last-begend "html") 17.98 (defun yahtml-insert-begend (&optional region env) 17.99 "Insert <cmd> ... </cmd>." 17.100 (interactive "P") 17.101 - (setq yahtml-current-completion-type 'multiline) 17.102 + (setq yahtml-current-completion-type 'multiline 17.103 + region (or region (YaTeX-region-active-p))) 17.104 (let*((completion-ignore-case t) 17.105 (cmd 17.106 (or env 17.107 @@ -883,14 +901,16 @@ 17.108 (save-excursion (insert (format "</%s>" form)))) 17.109 (if (search-backward "\"\"" p t) (forward-char 1)))) 17.110 17.111 -(defun yahtml-read-css (alist) 17.112 +(defun yahtml-read-css (alist &optional element) 17.113 (let ((completion-ignore-case t) (delim " ") 17.114 - (minibuffer-completion-table alist)) 17.115 - (read-from-minibuffer 17.116 - (substitute-command-keys 17.117 - (if YaTeX-japan 17.118 - "クラス(複数指定は\\[quoted-insert] SPCで区切る): " 17.119 - "class(or class list delimited by \\[quoted-insert] SPC): ")) 17.120 + (minibuffer-completion-table alist) 17.121 + (quotekey (substitute-command-keys "\\[quoted-insert]"))) 17.122 + (read-from-minibuffer-with-history 17.123 + (if YaTeX-japan 17.124 + (format "%sクラス(複数指定は%s SPCで区切る): " 17.125 + (if element (concat element "の") "") quotekey) 17.126 + (format "class%s(multiple class can be delimited by %s SPC): " 17.127 + (if element (concat " for " element) "") quotekey)) 17.128 nil YaTeX-minibuffer-completion-map nil))) 17.129 17.130 (defvar yahtml-newpage-command "newpage.rb" 17.131 @@ -918,11 +938,11 @@ 17.132 (let ((addin (concat "yahtml:" (downcase form))) s a) 17.133 (concat 17.134 (and (setq a (yahtml-css-get-element-completion-alist form)) 17.135 - (not (equal last-command-char ?\C-j)) 17.136 + (not (equal (YaTeX-last-key) ?\C-j)) 17.137 (memq yahtml-current-completion-type '(multiline inline)) 17.138 (not (string-match "#" form)) 17.139 (yahtml-make-optional-argument ;should be made generic? 17.140 - "class" (yahtml-read-css a))) 17.141 + "class" (yahtml-read-css a form))) 17.142 (if (and (intern-soft addin) (fboundp (intern-soft addin)) 17.143 (stringp (setq s (funcall (intern addin)))) 17.144 (string< "" s)) 17.145 @@ -1007,7 +1027,7 @@ 17.146 (with-output-to-temp-buffer "*Completions*" 17.147 (princ "Possible completinos are:\n") 17.148 (princ 17.149 - (mapconcat '(lambda (x) x) (funcall listfunc) "\n"))) 17.150 + (mapconcat (function(lambda (x) x)) (funcall listfunc) "\n"))) 17.151 (delete-region (point) beg) 17.152 (insert cmpl))) 17.153 ((null cmpl) 17.154 @@ -1113,12 +1133,13 @@ 17.155 (setq yahtml-completing-buffer (current-buffer) 17.156 yahtml-urls (append yahtml-urls-private yahtml-urls-local) 17.157 href (yahtml-escape-chars-string 17.158 - (read-from-minibuffer "href: " "" yahtml-url-completion-map))) 17.159 + (read-from-minibuffer-with-history 17.160 + "href: " "" yahtml-url-completion-map))) 17.161 (prog1 17.162 (concat (yahtml-make-optional-argument 17.163 "href" href) 17.164 (yahtml-make-optional-argument 17.165 - "name" (read-string "name: "))) 17.166 + "name" (read-string-with-history "name: "))) 17.167 (if (and (string-match "^http://" href) 17.168 (null (assoc href yahtml-urls-private)) 17.169 (null (assoc href yahtml-urls-local))) 17.170 @@ -1167,13 +1188,14 @@ 17.171 ((eq alist 'command) 17.172 (if (fboundp 'read-shell-command) 17.173 (read-shell-command prompt) 17.174 - (read-string prompt))) 17.175 + (read-string-with-history prompt))) 17.176 ((and alist (symbolp alist)) 17.177 - (completing-read prompt (symbol-value alist) nil nil default)) 17.178 + (completing-read-with-history 17.179 + prompt (symbol-value alist) nil nil default)) 17.180 (alist 17.181 - (completing-read prompt alist nil nil default)) 17.182 + (completing-read-with-history prompt alist nil nil default)) 17.183 (t 17.184 - (read-string prompt default))))) 17.185 + (read-string-with-history prompt default))))) 17.186 17.187 (defun yahtml-make-optional-argument (opt arg) 17.188 "Make optional argument string." 17.189 @@ -1199,11 +1221,11 @@ 17.190 (cond 17.191 (yahtml-html4-strict nil) 17.192 (t 17.193 - (let ((b (read-string "bgcolor=")) 17.194 + (let ((b (read-string-with-history "bgcolor=")) 17.195 (bg (yahtml-read-parameter "background" "")) 17.196 - (x (read-string "text color=")) 17.197 - (l (read-string "link color=")) 17.198 - (v (read-string "vlink color="))) 17.199 + (x (read-string-with-history "text color=")) 17.200 + (l (read-string-with-history "link color=")) 17.201 + (v (read-string-with-history "vlink color="))) 17.202 (concat 17.203 (yahtml-make-optional-argument "bgcolor" b) 17.204 (yahtml-make-optional-argument "background" bg) 17.205 @@ -1214,8 +1236,8 @@ 17.206 (defun yahtml-make-style-parameter (proplist) 17.207 "Make CSS property definitions in style attribute." 17.208 (mapconcat 17.209 - '(lambda (x) (if (and (cdr x) (string< "" (cdr x))) 17.210 - (format "%s: %s;" (car x) (cdr x)))) 17.211 + (function (lambda (x) (if (and (cdr x) (string< "" (cdr x))) 17.212 + (format "%s: %s;" (car x) (cdr x))))) 17.213 (delq nil proplist) 17.214 " ")) 17.215 17.216 @@ -1224,7 +1246,7 @@ 17.217 (let ((src (yahtml-read-parameter "src")) 17.218 (alg (yahtml-read-parameter "align")) 17.219 alt 17.220 - (brd (read-string "border=")) 17.221 + (brd (read-string-with-history "border=")) 17.222 (l yahtml-prefer-upcase-attributes) 17.223 info width height bytes comments) 17.224 (and (stringp src) (string< "" src) (file-exists-p src) 17.225 @@ -1382,21 +1404,21 @@ 17.226 "Add-in function `form' input format" 17.227 (concat 17.228 " " (if yahtml-prefer-upcase-attributes "METHOD" "method") "=\"" 17.229 - (completing-read "Method: " '(("POST") ("GET")) nil t) 17.230 + (completing-read-with-history "Method: " '(("POST") ("GET")) nil t) 17.231 "\"" 17.232 (yahtml-make-optional-argument 17.233 (if yahtml-prefer-upcase-attributes "ENCTYPE" "enctype") 17.234 - (completing-read 17.235 + (completing-read-with-history 17.236 "Enctype: " 17.237 '(("application/x-www-form-urlencoded") ("multipart/form-data")))) 17.238 " " (if yahtml-prefer-upcase-attributes "ACTION" "action") "=\"" 17.239 - (read-string "Action: ") "\"")) 17.240 + (read-string-with-history "Action: ") "\"")) 17.241 17.242 (defun yahtml:select () 17.243 "Add-in function for `select' input format" 17.244 (setq yahtml-last-single-cmd "option") 17.245 (concat " " (if yahtml-prefer-upcase-attributes "NAME" "name") "=\"" 17.246 - (read-string "name: ") "\"")) 17.247 + (read-string-with-history "name: ") "\"")) 17.248 17.249 (defun yahtml:ol () 17.250 "Add-in function for <ol>" 17.251 @@ -1427,7 +1449,7 @@ 17.252 "Add-in function for `input' form" 17.253 (let ((size "") name type value checked (maxlength "") 17.254 (l yahtml-prefer-upcase-attributes)) 17.255 - (setq name (read-string "name: ") 17.256 + (setq name (read-string-with-history "name: ") 17.257 type (YaTeX-completing-read-or-skip "type (default=text): " 17.258 yahtml-input-types nil t) 17.259 value (YaTeX-read-string-or-skip "value: ")) 17.260 @@ -1445,9 +1467,9 @@ 17.261 "Add-in function for `textarea'" 17.262 (interactive) 17.263 (let (name rows cols) 17.264 - (setq name (read-string "Name: ") 17.265 - cols (read-string "Columns: ") 17.266 - rows (read-string "Rows: ")) 17.267 + (setq name (read-string-with-history "Name: ") 17.268 + cols (read-string-with-history "Columns: ") 17.269 + rows (read-string-with-history "Rows: ")) 17.270 (concat 17.271 (concat (if yahtml-prefer-upcase-attributes "NAME=" "name=") 17.272 "\"" name "\"") 17.273 @@ -1456,7 +1478,7 @@ 17.274 17.275 (defun yahtml:table () 17.276 "Add-in function for `table'" 17.277 - (let ((b (read-string "border=")) 17.278 + (let ((b (read-string-with-history "border=")) 17.279 (a (yahtml-read-parameter 17.280 "align" nil '(("align" ("right")("center")))))) 17.281 (if yahtml-html4-strict 17.282 @@ -1494,13 +1516,13 @@ 17.283 (defun yahtml:font () 17.284 "Add-in function for `font'" 17.285 (concat 17.286 - (yahtml-make-optional-argument "color" (read-string "color=")) 17.287 - (yahtml-make-optional-argument "size" (read-string "size=")))) 17.288 + (yahtml-make-optional-argument "color" (read-string-with-history "color=")) 17.289 + (yahtml-make-optional-argument "size" (read-string-with-history "size=")))) 17.290 17.291 (defun yahtml:style () 17.292 "Add-in function for `style'" 17.293 (yahtml-make-optional-argument 17.294 - "type" (read-string "type=" "text/css"))) 17.295 + "type" (read-string-with-history "type=" "text/css"))) 17.296 17.297 (defun yahtml:script () 17.298 "Add-in function for `script'" 17.299 @@ -1535,7 +1557,8 @@ 17.300 "type" (yahtml-read-parameter "type" "text/css")) 17.301 (progn 17.302 (setq href 17.303 - (read-from-minibuffer "href: " "" yahtml-url-completion-map)) 17.304 + (read-from-minibuffer-with-history 17.305 + "href: " "" yahtml-url-completion-map)) 17.306 (if (string< "" href) 17.307 (progn 17.308 (if (and (file-exists-p (yahtml-url-to-path href)) 17.309 @@ -1552,7 +1575,8 @@ 17.310 "type" (yahtml-read-parameter "type" "text/css")) 17.311 (yahtml-make-optional-argument 17.312 "href" 17.313 - (read-from-minibuffer "href: " "" yahtml-url-completion-map))))))) 17.314 + (read-from-minibuffer-with-history 17.315 + "href: " "" yahtml-url-completion-map))))))) 17.316 17.317 (defvar yahtml:meta-names 17.318 '(("name" ("keywords")("author")("copyright")("date")("GENERATOR")))) 17.319 @@ -1579,18 +1603,19 @@ 17.320 "content" 17.321 (cond 17.322 ((string-match "date" name) 17.323 - (read-string "Date: " (current-time-string))) 17.324 + (read-string-with-history "Date: " (current-time-string))) 17.325 ((string-match "author" name) 17.326 - (read-string "Author: " 17.327 + (read-string-with-history "Author: " 17.328 (if (and (user-full-name) (string< "" (user-full-name))) 17.329 (user-full-name) 17.330 (user-login-name)))) 17.331 ((string-match "GENERATOR" name) 17.332 - (setq content (read-string "Generator: " "User-agent: ")) 17.333 + (setq content (read-string-with-history 17.334 + "Generator: " "User-agent: ")) 17.335 (if (string-match "yahtml" content) 17.336 (message "Thank you!")) 17.337 content) 17.338 - (t (read-string (concat name ": "))))))))) 17.339 + (t (read-string-with-history (concat name ": "))))))))) 17.340 17.341 (defun yahtml:br () 17.342 (yahtml-make-optional-argument "clear" (yahtml-read-parameter "clear"))) 17.343 @@ -1635,7 +1660,8 @@ 17.344 (defun yahtml-insert-tag (region-mode &optional tag) 17.345 "Insert <TAG> </TAG> and put cursor inside of them." 17.346 (interactive "P") 17.347 - (setq yahtml-current-completion-type 'inline) 17.348 + (setq yahtml-current-completion-type 'inline 17.349 + region-mode (or region-mode (YaTeX-region-active-p))) 17.350 (or tag 17.351 (let ((completion-ignore-case t)) 17.352 (setq tag 17.353 @@ -1707,7 +1733,8 @@ 17.354 (while l 17.355 (setq mess (format "%s %c" mess (car (car l)) (cdr (car l))) 17.356 l (cdr l))) 17.357 - (message "Char-entity reference: %s SPC=& RET=&; Other=&#..;" mess) 17.358 + (message "Char-entity reference: %s SPC=& RET=&; BS=%s Other=&#..;" 17.359 + mess (if YaTeX-japan "直前の文字" "Preceding-Char")) 17.360 (setq c (read-char)) 17.361 (cond 17.362 ((equal c (car-safe (assoc c list))) 17.363 @@ -1717,7 +1744,11 @@ 17.364 (forward-char -1)) 17.365 ((equal c ? ) 17.366 (insert ?&)) 17.367 - (t (insert (format "&#%d;" c)))))) 17.368 + ((and (memq c '(127 8)) 17.369 + (setq c (preceding-char)) 17.370 + (delete-backward-char 1) 17.371 + nil)) ;Fall through to the next 't block 17.372 + (t (insert (format "&#x%x;" c)))))) 17.373 17.374 (defun yahtml:!--\#include () 17.375 (let ((file (yahtml-read-parameter "file" ""))) 17.376 @@ -2121,7 +2152,7 @@ 17.377 (if (and (equal attr "class") ;treat "class" attribute specially 17.378 (setq css (yahtml-css-get-element-completion-alist tag))) 17.379 17.380 - (setq new (yahtml-read-css css)) 17.381 + (setq new (yahtml-read-css css tag)) 17.382 ;;other than "class", read parameter normally 17.383 (setq new (yahtml-read-parameter attr))) 17.384 (goto-char (car (get 'yahtml-on-assignment-p 'region))) 17.385 @@ -2358,7 +2389,8 @@ 17.386 (let ((e (cond 17.387 ((null e) "td") 17.388 ((stringp e) e) 17.389 - (t (read-string "Enclose with(`thd' means th td td..): " "th")))) 17.390 + (t (read-string-with-history 17.391 + "Enclose with(`thd' means th td td..): " "th")))) 17.392 (ws "[ \t]") 17.393 elm p i) 17.394 (if (string= delim "") (setq delim " \t\n")) 17.395 @@ -2390,8 +2422,8 @@ 17.396 "Enclose lines in a form tab-sv/csv with <tr><td>..</td></tr>." 17.397 (interactive "P\nsDelimiter(s): \nr") 17.398 (setq e (if (and e (listp e)) 17.399 - (read-string "Enclose with(td or th, `thd' -> th td td td...: " 17.400 - "th"))) 17.401 + (read-string-with-history 17.402 + "Enclose with(td or th, `thd' -> th td td td...: " "th"))) 17.403 (save-excursion 17.404 (save-restriction 17.405 (narrow-to-region (point) (mark)) 17.406 @@ -2477,17 +2509,62 @@ 17.407 (match-beginning 0)))) 17.408 (fset 'move-to-column yahtml-saved-move-to-column))))) 17.409 17.410 -;(defun yahtml-indent-new-commnet-line () 17.411 -; (unwind-protect 17.412 -; (progn 17.413 -; (fset 'move-to-column 'yahtml-move-to-column) 17.414 -; (apply 'YaTeX-saved-indent-new-comment-line (if soft (list soft)))) 17.415 -; (fset 'move-to-column yahtml-saved-move-to-column))) 17.416 +;;; 17.417 +;;; ---------- move forward/backward field ---------- 17.418 +;;; 17.419 +(defun yahtml-element-path () 17.420 + "Return the element path from <body> at point as a list" 17.421 + (let (path elm) 17.422 + (save-excursion 17.423 + (while (and (YaTeX-beginning-of-environment) 17.424 + (looking-at (concat "<\\(" yahtml-command-regexp "\\)\\>")) 17.425 + (not (string= (setq elm (downcase (YaTeX-match-string 1))) 17.426 + "body"))) 17.427 + (setq path (cons elm path) 17.428 + elm nil)) 17.429 + (and elm (setq path (cons elm path))) 17.430 + path))) 17.431 + 17.432 +(defun yahtml-forward-field (arg) 17.433 + "Move ARGth forward cell to table element. 17.434 +ENVINFO is a cons of target element name and its beginning point." 17.435 + (interactive "p") 17.436 + (let (inenv elm path sibs) 17.437 + (cond 17.438 + ((< arg 0) (yahtml-backward-field (- arg))) 17.439 + ((= arg 0) nil) 17.440 + ((and (setq path (nreverse (yahtml-element-path))) 17.441 + (catch 'sibling 17.442 + (while path 17.443 + (if (setq elm (car-safe 17.444 + (member (car path) '("td" "th" "li" "dt" "dd")))) 17.445 + (throw 'sibling elm)) 17.446 + (setq path (cdr path))))) 17.447 + (setq inenv (YaTeX-in-environment-p elm) 17.448 + sibs (cdr (assoc elm '(("td" . "td\\|th") 17.449 + ("th" . "td\\|th") 17.450 + ("li" . "li") 17.451 + ("dt" . "dt\\|dd") 17.452 + ("dd" . "dt\\|dd"))))) 17.453 + (goto-char (cdr inenv)) 17.454 + (while (>= (setq arg (1- arg)) 0) 17.455 + (yahtml-goto-corresponding-begend) 17.456 + (if (looking-at "<") (forward-list 1)) 17.457 + (skip-chars-forward "^<")) 17.458 + (while (looking-at "\\s \\|\\(</\\)") 17.459 + (if (match-beginning 1) (forward-list 1) 17.460 + (skip-chars-forward "\n\t "))) 17.461 + (forward-list 1) ;; step into environment 17.462 + (skip-chars-forward " \t\n") 17.463 + (if (looking-at (concat "<\\(" sibs "\\)\\>")) 17.464 + (forward-list 1)) 17.465 + )))) 17.466 + 17.467 17.468 ;;; 17.469 ;;; ---------- indentation ---------- 17.470 ;;; 17.471 -(defun yahtml-indent-line () 17.472 +(defun yahtml-indent-line-1 () 17.473 "Indent a line (faster wrapper)" 17.474 (interactive) 17.475 (let (indent) 17.476 @@ -2510,6 +2587,18 @@ 17.477 (and (bolp) (skip-chars-forward " \t"))) 17.478 (yahtml-indent-line-real)))) 17.479 17.480 +(defun yahtml-indent-line () 17.481 + "Indent a line (Second level wrapper). 17.482 +See also yahtml-indent-line-1 and yahtml-indent-line-real." 17.483 + (interactive) 17.484 + (let ((cc (current-column)) (p (point))) 17.485 + (yahtml-indent-line-1) 17.486 + (and (= cc (current-column)) 17.487 + (= p (point)) 17.488 + (equal last-command 'yahtml-indent-line) 17.489 + (yahtml-forward-field 1)))) 17.490 + 17.491 + 17.492 (defun yahtml-this-indent () 17.493 (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir\\|d[td]\\|li") 17.494 (itemizing-envs "^\\([uod]l\\|menu\\|dir\\|li\\|d[td]\\)$") 17.495 @@ -2772,7 +2861,7 @@ 17.496 17.497 (defun yahtml-intelligent-newline-select () 17.498 (interactive) 17.499 - (insert "<" (if yahtml-prefer-upcases "OPTION" "option") "> ") 17.500 + (yahtml-insert-single (if yahtml-prefer-upcases "OPTION" "option")) 17.501 (yahtml-indent-line)) 17.502 17.503 (defun yahtml-intelligent-newline-style () 17.504 @@ -2792,7 +2881,7 @@ 17.505 (YaTeX-reindent c)))) 17.506 17.507 (defun yahtml-intelligent-newline-head () 17.508 - (let ((title (read-string "Document title: ")) 17.509 + (let ((title (read-string-with-history "Document title: ")) 17.510 (b "<title>") (e "</title>") p) 17.511 (yahtml-indent-line) 17.512 (insert (format "%s" (if yahtml-prefer-upcases (upcase b) b))) 17.513 @@ -2853,7 +2942,8 @@ 17.514 (setq line (concat line (if (and (= i 0) th) "<th></th>" 17.515 "<td></td>")) 17.516 th nil i (1+ i))) 17.517 - (setq fmt (read-string "`th' or `td' format: " "th td td")) 17.518 + (setq fmt (read-string-with-history 17.519 + "`th' or `td' format: " "th td td")) 17.520 (while (string-match "t\\(h\\)\\|td" fmt i) 17.521 (setq line (concat line (if (match-beginning 1) "<th></th>" 17.522 "<td></td>")) 17.523 @@ -2943,7 +3033,8 @@ 17.524 (skip-chars-forward "^\"")(point))))) 17.525 (if (file-exists-p f) 17.526 (setq alist 17.527 - (append alist (yahtml-css-collect-classes-file f))))) 17.528 + (append alist (yahtml-css-collect-classes-file 17.529 + f initial))))) 17.530 (setq e (point)) 17.531 (goto-char b) 17.532 (while (re-search-forward ;ちょといい加減なREGEXP 17.533 @@ -3118,6 +3209,33 @@ 17.534 (font-lock-mode -1) ;is stupid, but sure. 17.535 (font-lock-mode 1)) 17.536 17.537 +;;; 17.538 +;; Drag-n-Drop 17.539 +;;; 17.540 +(defun yahtml-dnd-handler (uri action) 17.541 + "DnD handler for yahtml mode 17.542 +Convert image URI to img-src and others to a-href." 17.543 + (let*((file (dnd-get-local-file-name uri)) 17.544 + (path (if file (file-relative-name file) uri)) 17.545 + (case-fold-search t) 17.546 + (geom "")) 17.547 + (cond 17.548 + ((memq action '(copy link move private)) 17.549 + (cond 17.550 + ((string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|tiff?\\)$" path) 17.551 + (if file 17.552 + (setq geom (yahtml-get-image-info path) 17.553 + geom (if (car geom) 17.554 + (apply 'format " width=\"%s\" height=\"%s\"" geom) 17.555 + ""))) 17.556 + (insert (format "<img src=\"%s\" alt=\"%s\"%s>" 17.557 + path (file-name-nondirectory path) geom))) 17.558 + 17.559 + (t (insert (format "<a href=\"%s\"></a>" path)) 17.560 + (forward-char -4)))) 17.561 + (t (message "No handler for action `%s'" action)))) 17.562 + action) 17.563 + 17.564 (run-hooks 'yahtml-load-hook) 17.565 (provide 'yahtml) 17.566
18.1 --- a/yatex.el Mon May 14 19:59:12 2012 +0900 18.2 +++ b/yatex.el Sun Jul 12 14:21:20 2015 +0900 18.3 @@ -1,15 +1,14 @@ 18.4 -;;; -*- Emacs-Lisp -*- 18.5 -;;; Yet Another tex-mode for emacs - //野鳥// 18.6 -;;; yatex.el rev. 1.76 18.7 -;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] 18.8 -;;; Last modified Sat May 12 14:53:03 2012 on firestorm 18.9 +;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*- 18.10 +;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 18.11 +;;; Last modified Wed Jul 8 13:41:17 2015 on duke 18.12 ;;; $Id$ 18.13 ;;; The latest version of this software is always available at; 18.14 ;;; http://www.yatex.org/ 18.15 18.16 +;;; Code: 18.17 (require 'comment) 18.18 (require 'yatexlib) 18.19 -(defconst YaTeX-revision-number "1.76" 18.20 +(defconst YaTeX-revision-number "1.78.9" 18.21 "Revision number of running yatex.el") 18.22 18.23 ;---------- Local variables ---------- 18.24 @@ -38,37 +37,62 @@ 18.25 return to the editing paragraph by calling register-to-point with argument 18.26 YaTeX-current-position-register.") 18.27 18.28 -;;(defvar YaTeX-tmp-dic-unit 'main-file 18.29 -;; "*Default switching unit of temporary dictionary. 18.30 -;;There are two switching unit: 18.31 -;;'main-file : switch tmp-dic according to main-file directory. 18.32 -;;'directory : switch tmp-dic dir by dir." 18.33 -;;) 18.34 -(defvar YaTeX-use-LaTeX2e t "*Use LaTeX2e or not. Nil meas latex 2.09") 18.35 +(defvar YaTeX-use-LaTeX2e t "*Use LaTeX2e or not. Nil means latex 2.09") 18.36 18.37 (defvar tex-command 18.38 (cond 18.39 (YaTeX-use-LaTeX2e "platex") 18.40 (YaTeX-japan "jlatex") 18.41 (t "latex")) 18.42 - "*Default command for typesetting LaTeX text.") 18.43 + "*Default command for typesetting LaTeX text. 18.44 +Overridden with `%#! CommandLine...' in the buffer.") 18.45 18.46 (defvar bibtex-command (if YaTeX-japan "jbibtex" "bibtex") 18.47 - "*Default command of BibTeX.") 18.48 + "*Default command of BibTeX. 18.49 +Overridden with `%#BIBTEX CommandLine...' in the buffer.") 18.50 18.51 (defvar dvi2-command ;previewer command for your site 18.52 (if YaTeX-dos "dviout -wait=0" 18.53 "xdvi -geo +0+0 -s 4") 18.54 "*Default previewer command including its option. 18.55 -This default value is for X window system.") 18.56 +Overridden with `%#PREVIEW CommandLine...' in the buffer.") 18.57 + 18.58 +(defvar YaTeX-cmd-gimp "gimp") 18.59 +(defvar YaTeX-cmd-tgif "tgif") 18.60 +(defvar YaTeX-cmd-inkscape "inkscape") 18.61 +(defvar YaTeX-cmd-dia "dia") 18.62 +(defvar YaTeX-cmd-ooo "soffice") 18.63 +(defvar YaTeX-cmd-gs "gs") 18.64 +(defvar YaTeX-cmd-dvips 18.65 + (if (YaTeX-executable-find "pdvips") "pdvips" "dvips")) 18.66 +(defvar YaTeX-cmd-displayline 18.67 + "/Applications/Skim.app/Contents/SharedSupport/displayline") 18.68 +(defvar YaTeX-cmd-edit-ps YaTeX-cmd-gimp) 18.69 +(defvar YaTeX-cmd-edit-pdf YaTeX-cmd-ooo) 18.70 +(defvar YaTeX-cmd-edit-ai YaTeX-cmd-inkscape) 18.71 +(defvar YaTeX-cmd-edit-svg YaTeX-cmd-inkscape) 18.72 +(defvar YaTeX-cmd-edit-images YaTeX-cmd-gimp) 18.73 +(defvar YaTeX-cmd-view-images "display -geometry +0+0") 18.74 + 18.75 +(defvar tex-pdfview-command ;previewer command for your site 18.76 + (cond 18.77 + (YaTeX-dos "acroread") 18.78 + (YaTeX-macos (cond 18.79 + ((file-executable-p YaTeX-cmd-displayline) "open -a Skim") 18.80 + (t "open"))) 18.81 + (t "evince")) 18.82 + "*Default PDF viewer command including its option. 18.83 +Overridden with `%#PDFVIEW CommandLine...' in the buffer.") 18.84 18.85 (defvar makeindex-command (if YaTeX-dos "makeind" "makeindex") 18.86 - "*Default makeindex command.") 18.87 + "*Default makeindex command. 18.88 +Overridden with `%#MAKEINDEX CommandLine...' in the buffer.") 18.89 18.90 (defvar dviprint-command-format 18.91 (if YaTeX-dos "dviprt %s %f%t" 18.92 "dvi2ps %f %t %s | lpr") 18.93 "*Command line string to print out current file. 18.94 +Overridden with `%#LPR CommandLine...' in the buffer. 18.95 Format string %s will be replaced by the filename. Do not forget to 18.96 specify the `from usage' and `to usage' with their option by format string 18.97 %f and %t. 18.98 @@ -84,10 +108,11 @@ 18.99 18.100 (defvar YaTeX-dvipdf-command 18.101 "dvipdfmx" 18.102 - "*Command name to convert dvi file to PDF.") 18.103 + "*Command name to convert dvi file to PDF. 18.104 +Overridden with `%#DVIPDF CommandLine...' in the buffer.") 18.105 18.106 (defvar YaTeX-default-document-style 18.107 - (concat (if YaTeX-japan "j") "article") 18.108 + (concat (if YaTeX-japan "js") "article") 18.109 "*Default LaTeX Documentstyle for YaTeX-typeset-region.") 18.110 18.111 (defvar YaTeX-need-nonstop nil 18.112 @@ -157,6 +182,7 @@ 18.113 "*Regexp of verb family. Do not contain preceding \\\\ nor \\(\\).") 18.114 (defvar YaTeX-fill-inhibit-environments 18.115 (append '("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" 18.116 + "longtable" 18.117 "equation" "equation*" "math" "displaymath") 18.118 YaTeX-verbatim-environments) 18.119 "*In these environments, YaTeX inhibits fill-paragraph from formatting. 18.120 @@ -171,6 +197,7 @@ 18.121 (defvar YaTeX-array-env-regexp 18.122 (concat 18.123 "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|" ;LaTeX 18.124 + "longtable\\|" ;LaTeX2e 18.125 "matrix\\|pmatrix\\|bmatrix\\|vmatrix\\|Vmatrix\\|" ;AMS-LaTeX 18.126 "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|" ;AMS-LaTeX 18.127 "[bpvV]?matrix\\|smallmatrix\\|cases\\|" ;AMS-LaTeX 18.128 @@ -188,7 +215,7 @@ 18.129 18.130 (defvar YaTeX-auto-math-mode t 18.131 "*T for changing YaTeX-math mode automatically.") 18.132 -(defvar YaTeX-use-AMS-LaTeX nil 18.133 +(defvar YaTeX-use-AMS-LaTeX t 18.134 "*T for using AMS-LaTeX") 18.135 18.136 (defvar yatex-mode-hook nil 18.137 @@ -210,6 +237,10 @@ 18.138 (defvar YaTeX-tabular-indentation 4 18.139 "*Indentation column-depth of continueing line in tabular environment.") 18.140 18.141 +(defvar YaTeX-electric-indent-mode -1 18.142 + "*(for Emacs 24.4+) Pass this value to electric-indent-local-mode. 18.143 +-1 means `off'.") 18.144 + 18.145 ;;-- Math mode values -- 18.146 18.147 (defvar YaTeX-math-key-list-default 18.148 @@ -266,7 +297,8 @@ 18.149 ("widetilde") ("widehat") ("overline") ("overrightarrow") 18.150 ;; section types in mathmode 18.151 ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") 18.152 - 18.153 + ;;cleveref 18.154 + ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref") 18.155 ) 18.156 (if YaTeX-use-LaTeX2e 18.157 '(("documentclass") ("usepackage") 18.158 @@ -326,6 +358,7 @@ 18.159 ("thebibliography") ("theindex") ("flushleft") ("flushright") 18.160 ("minipage") 18.161 ("supertabular") 18.162 + ("wrapfigure") ("wraptable") 18.163 ) 18.164 (if YaTeX-use-LaTeX2e 18.165 '(("comment") ;defined in version 18.166 @@ -368,7 +401,7 @@ 18.167 18.168 (defvar singlecmd-table 18.169 (append 18.170 - '(("maketitle") ("makeindex") ("sloppy") ("protect") ("par") 18.171 + '(("maketitle") ("makeindex") ("sloppy") ("protect") ("par") ("and") 18.172 ("LaTeX") ("TeX") ("item") ("item[]") ("appendix") ("hline") ("kill") 18.173 ;;("rightarrow") ("Rightarrow") ("leftarrow") ("Leftarrow") 18.174 ("pagebreak") ("nopagebreak") ("tableofcontents") 18.175 @@ -461,8 +494,8 @@ 18.176 (YaTeX-define-key "$" 'YaTeX-insert-dollars-region) 18.177 (YaTeX-define-key "i" 'YaTeX-fill-item) 18.178 (YaTeX-define-key "\\" 18.179 - '(lambda () (interactive) 18.180 - (insert (if (YaTeX-in-math-mode-p) "\\backslash" "\\textbackslash")))) 18.181 + (function(lambda () (interactive) 18.182 + (insert (if (YaTeX-in-math-mode-p) "\\backslash" "\\textbackslash"))))) 18.183 (if YaTeX-no-begend-shortcut 18.184 (progn 18.185 (YaTeX-define-key "B" 'YaTeX-make-begin-end-region) 18.186 @@ -506,12 +539,12 @@ 18.187 (YaTeX-define-key "d" 'YaTeX-display-hierarchy) 18.188 (YaTeX-define-key "x" YaTeX-user-extensional-map) 18.189 (YaTeX-define-key "n" 18.190 - '(lambda () (interactive) 18.191 - (insert "\\" (if (YaTeX-on-section-command-p "o?oalign") "crcr" "\\")))) 18.192 + (function(lambda () (interactive) 18.193 + (insert "\\" (if (YaTeX-on-section-command-p "o?oalign") "crcr" "\\"))))) 18.194 (if YaTeX-dos 18.195 (define-key YaTeX-prefix-map "\C-r" 18.196 - '(lambda () (interactive) 18.197 - (YaTeX-set-screen-height YaTeX-saved-screen-height) (recenter))))) 18.198 + (function(lambda () (interactive) 18.199 + (YaTeX-set-screen-height YaTeX-saved-screen-height) (recenter)))))) 18.200 18.201 (defvar YaTeX-section-completion-map nil 18.202 "*Key map used at YaTeX completion in the minibuffer.") 18.203 @@ -579,6 +612,18 @@ 18.204 (modify-syntax-entry ?\\ "/" YaTeX-mode-syntax-table) 18.205 (modify-syntax-entry ?~ " " YaTeX-mode-syntax-table)) 18.206 18.207 +(defvar YaTeX-mode-syntax-table-nonparen nil 18.208 + "Syntax table for yatex-mode with normal parentheses treated white spaces") 18.209 +(if YaTeX-mode-syntax-table-nonparen nil 18.210 + (setq YaTeX-mode-syntax-table-nonparen 18.211 + (make-syntax-table YaTeX-mode-syntax-table)) 18.212 + (let ((zenparens "()()「」『』【】[]{}《》〈〉〔〕") (i 0) s) 18.213 + (while (string-match "." zenparens i) 18.214 + (setq s (substring zenparens (match-beginning 0) (match-end 0)) 18.215 + i (1+ i)) 18.216 + (modify-syntax-entry 18.217 + (string-to-char s) " " YaTeX-mode-syntax-table-nonparen)))) 18.218 + 18.219 ;---------- Provide YaTeX-mode ---------- 18.220 ;;; 18.221 ;; Major mode definition 18.222 @@ -654,22 +699,7 @@ 18.223 YaTeX-math-mode indent-line-function comment-line-break-function 18.224 comment-start comment-start-skip 18.225 )) 18.226 - (cond ((null YaTeX-kanji-code) 18.227 - nil) 18.228 - ((boundp 'MULE) 18.229 - (set-file-coding-system YaTeX-coding-system)) 18.230 - ((and YaTeX-emacs-20 (boundp 'buffer-file-coding-system)) 18.231 - (setq buffer-file-coding-system 18.232 - (or (and (fboundp 'set-auto-coding) buffer-file-name 18.233 - (save-excursion 18.234 - (goto-char (point-min)) 18.235 - (set-auto-coding buffer-file-name (buffer-size)))) 18.236 - YaTeX-coding-system))) 18.237 - ((featurep 'mule) 18.238 - (set-file-coding-system YaTeX-coding-system)) 18.239 - ((boundp 'NEMACS) 18.240 - (make-local-variable 'kanji-fileio-code) 18.241 - (setq kanji-fileio-code YaTeX-kanji-code))) 18.242 + (YaTeX-set-file-coding-system YaTeX-kanji-code YaTeX-coding-system) 18.243 (setq fill-column YaTeX-fill-column 18.244 fill-prefix YaTeX-fill-prefix 18.245 paragraph-start YaTeX-paragraph-start 18.246 @@ -681,6 +711,10 @@ 18.247 local-abbrev-table yatex-mode-abbrev-table) 18.248 (if (fboundp 'comment-indent-new-line) ;for Emacs21 18.249 (setq comment-line-break-function 'YaTeX-comment-line-break)) 18.250 + ;; +dnd for X11 w/ emacs23+ 18.251 + (and window-system (featurep 'dnd) (require 'yatex23 nil t) 18.252 + (set (make-local-variable 'dnd-protocol-alist) 18.253 + (cons (cons "^file:" 'YaTeX-dnd-handler) dnd-protocol-alist))) 18.254 18.255 (if (and YaTeX-use-font-lock (featurep 'font-lock)) 18.256 (progn 18.257 @@ -697,7 +731,9 @@ 18.258 (YaTeX-read-user-completion-table) 18.259 (and (fboundp 'YaTeX-hilit-setup-alist) (YaTeX-hilit-setup-alist)) 18.260 (makunbound 'inenv) 18.261 - (turn-on-auto-fill) ;1.63 18.262 + ;(turn-on-auto-fill) ;1.63 -> 1.79off 18.263 + (if (fboundp 'electric-indent-local-mode) 18.264 + (electric-indent-local-mode YaTeX-electric-indent-mode)) 18.265 (and (= 0 (buffer-size)) (file-exists-p YaTeX-template-file) 18.266 (y-or-n-p (format "Insert %s?" YaTeX-template-file)) 18.267 (insert-file-contents (expand-file-name YaTeX-template-file))) 18.268 @@ -739,6 +775,7 @@ 18.269 (autoload 'YaTeX-get-builtin "yatexprc" "Get %# built-in." t) 18.270 (autoload 'YaTeX-system "yatexprc" "Call system command" t) 18.271 (autoload 'YaTeX-save-buffers "yatexprc" "Save buffers of same major mode" t) 18.272 +(autoload 'YaTeX-goto-corresponding-viewer "yatexprc" "Viewer jump line" t) 18.273 18.274 ;;autoload from yatexmth.el 18.275 (autoload 'YaTeX-math-insert-sequence "yatexmth" "Image input." t) 18.276 @@ -852,16 +889,18 @@ 18.277 you can put REGION into that environment between \\begin and \\end." 18.278 (interactive "P") 18.279 (let* 18.280 - ((mode (if arg " region" "")) 18.281 + ((region-p (or arg (YaTeX-region-active-p))) 18.282 + (mode (if region-p " region" "")) 18.283 (env 18.284 - (YaTeX-read-environment 18.285 - (format "Begin environment%s(default %s): " mode YaTeX-env-name)))) 18.286 + (save-excursion ;for Emacs24 work-around to avoid point warp 18.287 + (YaTeX-read-environment 18.288 + (format "Begin environment%s(default %s): " mode YaTeX-env-name))))) 18.289 (if (string= env "") 18.290 (setq env YaTeX-env-name)) 18.291 (setq YaTeX-env-name env) 18.292 (YaTeX-update-table 18.293 (list YaTeX-env-name) 'env-table 'user-env-table 'tmp-env-table) 18.294 - (YaTeX-insert-begin-end YaTeX-env-name arg))) 18.295 + (YaTeX-insert-begin-end YaTeX-env-name region-p))) 18.296 18.297 (defun YaTeX-make-begin-end-region () 18.298 "Call YaTeX-make-begin-end with ARG to specify region mode." 18.299 @@ -880,7 +919,7 @@ 18.300 "ref") 18.301 ((and (looking-at "[a-z \t]") 18.302 (progn (skip-chars-backward "a-z \t") 18.303 - (looking-at "table\\|figure\\|formula"))) 18.304 + (looking-at "table\\|figure\\|formula\\|eq\\(\\.\\|uation\\)"))) 18.305 "ref") 18.306 ((save-excursion 18.307 (skip-chars-backward "[^ア-ン]") 18.308 @@ -916,7 +955,8 @@ 18.309 Optional 4th arg CMD is LaTeX command name, for non-interactive use." 18.310 (interactive "P") 18.311 (setq YaTeX-current-completion-type 'section) 18.312 - (if (equal arg '(4)) (setq beg (region-beginning) end (region-end))) 18.313 + (if (or (equal arg '(4)) (YaTeX-region-active-p)) 18.314 + (setq beg (region-beginning) end (region-end))) 18.315 (unwind-protect 18.316 (let* 18.317 ((source-window (selected-window)) 18.318 @@ -957,7 +997,7 @@ 18.319 (addin-args (funcall arg-reader j)) 18.320 (YaTeX-skip-default-reader "") 18.321 (t 18.322 - (read-string 18.323 + (read-string-with-history 18.324 (format "Argument %d of %s: " j section))))) 18.325 (insert 18.326 (concat ;to allow nil return value 18.327 @@ -1016,7 +1056,9 @@ 18.328 \(key binding for universal-argument is \\[universal-argument]\)" 18.329 (interactive "P") 18.330 (YaTeX-sync-local-table 'tmp-fontsize-table) 18.331 - (let* ((mode (if arg "region" "")) 18.332 + (let* ((region-p (if (or arg (YaTeX-region-active-p)) 18.333 + (cons (region-beginning) (region-end)))) 18.334 + (mode (if region-p "region" "")) 18.335 (fontsize 18.336 (or fontsize 18.337 (YaTeX-read-fontsize 18.338 @@ -1038,12 +1080,14 @@ 18.339 (setq fontsize 18.340 (cdr (assoc YaTeX-fontsize-name LaTeX2e-fontstyle-alist))) 18.341 (setq YaTeX-fontsize-name fontsize)) 18.342 - (if arg 18.343 - (save-excursion 18.344 - (if (> (point) (mark)) (exchange-point-and-mark)) 18.345 + (if region-p 18.346 + (let ((b (car region-p)) 18.347 + (e (set-marker (make-marker) (cdr region-p)))) 18.348 + (goto-char b) 18.349 (insert "{\\" YaTeX-fontsize-name " ") 18.350 - (exchange-point-and-mark) 18.351 - (insert "}")) 18.352 + (goto-char e) 18.353 + (insert "}") 18.354 + (set-marker e nil)) 18.355 (insert (concat "{\\" YaTeX-fontsize-name " }")) 18.356 (forward-char -1) 18.357 (if YaTeX-current-position-register 18.358 @@ -1255,6 +1299,8 @@ 18.359 (get 'YaTeX-insert-braces 'begend-guide))))))))) 18.360 env macro not-literal b e) 18.361 (cond 18.362 + ((YaTeX-region-active-p) 18.363 + (YaTeX-insert-braces-region (region-beginning) (region-end))) 18.364 ((YaTeX-jmode) (YaTeX-self-insert arg)) 18.365 ((not (YaTeX-closable-p)) (YaTeX-self-insert arg)) 18.366 ((save-excursion 18.367 @@ -1364,7 +1410,7 @@ 18.368 (setplist 'YaTeX-jmode nil)) 18.369 18.370 (defun YaTeX-self-insert (arg) 18.371 - (call-interactively (global-key-binding (char-to-string last-command-char)))) 18.372 + (call-interactively (global-key-binding (char-to-string (YaTeX-last-key))))) 18.373 (defun YaTeX-insert-inherit (&rest args) 18.374 (apply (if (fboundp 'insert-and-inherit) 'insert-and-inherit 'insert) 18.375 args)) 18.376 @@ -1374,6 +1420,8 @@ 18.377 (interactive "p") 18.378 (let ((col (1- (current-column)))) 18.379 (cond 18.380 + ((YaTeX-region-active-p) 18.381 + (YaTeX-insert-brackets-region (region-beginning) (region-end))) 18.382 ((YaTeX-jmode) (YaTeX-self-insert arg)) 18.383 ((not (YaTeX-closable-p)) 18.384 (YaTeX-self-insert arg)) 18.385 @@ -1399,7 +1447,7 @@ 18.386 ((and (= (preceding-char) ?\\ ) 18.387 (/= (char-after (- (point) 2)) ?\\ ) 18.388 (not (YaTeX-in-math-mode-p))) 18.389 - (YaTeX-insert-inherit last-command-char "\n") 18.390 + (YaTeX-insert-inherit (YaTeX-last-key) "\n") 18.391 (indent-to (max 0 col)) 18.392 (YaTeX-insert-inherit "\\]") 18.393 (beginning-of-line) 18.394 @@ -1420,6 +1468,8 @@ 18.395 "Insert parenthesis pair." 18.396 (interactive "p") 18.397 (cond 18.398 + ((YaTeX-region-active-p) 18.399 + (YaTeX-insert-parens-region (region-beginning) (region-end))) 18.400 ((YaTeX-jmode) (YaTeX-self-insert arg)) 18.401 ((not (YaTeX-closable-p)) (YaTeX-self-insert arg)) 18.402 ((save-excursion 18.403 @@ -1507,7 +1557,9 @@ 18.404 ; (backward-char 1)) 18.405 (t (YaTeX-self-insert arg)))) 18.406 18.407 -(defvar YaTeX-use-jmode-hook (not (and (fboundp 'skk-mode) (boundp 'skk-mode))) 18.408 +(defvar YaTeX-use-jmode-hook 18.409 + (and (featurep 'canna) (boundp 'canna:*initialized*) canna:*initialized*) 18.410 + ;; (not (and (fboundp 'skk-mode) (boundp 'skk-mode))) 18.411 "*Non-nil means activate automatic jmode switcher within/out math mode. 18.412 Hopefully, change default to t in the next version of 1.75.") 18.413 (defun YaTeX-jmode-hook (old new) 18.414 @@ -1615,7 +1667,8 @@ 18.415 (require 'yatexprc) ;for Nemacs's bug 18.416 (select-window sw) 18.417 (cond 18.418 - ((= c ?j) (YaTeX-typeset-buffer)) 18.419 + ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer) ; memq for usability test 18.420 + (put 'dvi2-command 'format 'dvi)) 18.421 ((= c ?r) (YaTeX-typeset-region)) 18.422 ((= c ?e) (YaTeX-typeset-environment)) 18.423 ((= c ?b) (YaTeX-call-builtin-on-file 18.424 @@ -1624,12 +1677,13 @@ 18.425 "MAKEINDEX" makeindex-command arg)) 18.426 ((= c ?k) (YaTeX-kill-typeset-process YaTeX-typeset-process)) 18.427 ((= c ?p) (call-interactively 'YaTeX-preview)) 18.428 - ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) 18.429 - ((= c ?d) (YaTeX-typeset-buffer YaTeX-dvipdf-command)) 18.430 + ((= c ?q) (YaTeX-system "lpq" "Printer queue")) 18.431 + ((= c ?d) (YaTeX-typeset-buffer 18.432 + (or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command)) 18.433 + (put 'dvi2-command 'format 'pdf)) 18.434 ((= c ?v) (YaTeX-view-error)) 18.435 ((= c ?l) (YaTeX-lpr arg)) 18.436 ((= c ?m) (YaTeX-switch-mode-menu arg)) 18.437 - ((= c ?b) (YaTeX-insert-string "\\")) 18.438 ((= c ?s) (YaTeX-xdvi-remote-search arg))))) 18.439 18.440 (if (fboundp 'wrap-function-to-control-ime) 18.441 @@ -1640,20 +1694,23 @@ 18.442 "Operate %# notation." 18.443 ;;Do not use interactive"r" for the functions which require no mark 18.444 (interactive) 18.445 - (message "!)Edit-%%#! B)EGIN-END-region P)review L)Edit-%%#LPR make(I)ndex B)ibtex") 18.446 + (message "!)Edit-%%#! D)VIPDF B)EGIN-END P)review pdf(V)iew L)PR M)akeidx b)ibtex dp(I)") 18.447 (let ((c (or char (read-char))) (string "") key 18.448 (b (make-marker)) (e (make-marker))) 18.449 (save-excursion 18.450 (cond 18.451 - ((rindex "!plib" c) ;Edit %#xxx 18.452 + ((rindex "!plmibdv" c) ;Edit %#xxx 18.453 (setq key (cdr (assq c '((?! . "!") 18.454 (?p . "PREVIEW") 18.455 (?l . "LPR") 18.456 - (?i . "MAKEINDEX") 18.457 + (?m . "MAKEINDEX") 18.458 + (?d . "DVIPDF") 18.459 + (?v . "PDFVIEW") 18.460 + (?i . "IMAGEDPI") 18.461 (?b . "BIBTEX"))))) 18.462 (YaTeX-getset-builtin key t)) 18.463 18.464 - ((= c ?b) ;%#BEGIN %#END region 18.465 + ((= c ?B) ;%#BEGIN %#END region 18.466 (or end (setq beg (min (point) (mark)) end (max (point) (mark)))) 18.467 (set-marker b beg) 18.468 (set-marker e end) 18.469 @@ -1668,8 +1725,7 @@ 18.470 (goto-char e) 18.471 (insert "%#END\n") 18.472 (set-marker b nil) 18.473 - (set-marker e nil)) 18.474 - )))) 18.475 + (set-marker e nil)))))) 18.476 18.477 (defvar YaTeX-refcommand-def-regexp-default 18.478 "label\\|bibitem") 18.479 @@ -1681,9 +1737,13 @@ 18.480 YaTeX-refcommand-def-regexp-default)) 18.481 18.482 (defvar YaTeX-refcommand-ref-regexp-default 18.483 - "\\(page\\|eq\\|fig\\)?ref\\|cite") 18.484 + "\\(page\\|eq\\|fig\\)?ref\\|cite" 18.485 + "Regexp of LaTeX's label-referring macros. 18.486 +Searching for this will be done without `\\\\'. 18.487 +So you need not add patterns if new referring macro ends with \"ref\".") 18.488 (defvar YaTeX-refcommand-ref-regexp-private nil 18.489 - "*Regexp of referring label commands") 18.490 + "*Regexp of referring label commands. 18.491 +See documentation of `YaTeX-refcommand-ref-regexp-default'.") 18.492 (defvar YaTeX-refcommand-ref-regexp 18.493 (concat (if YaTeX-refcommand-ref-regexp-private 18.494 (concat YaTeX-refcommand-ref-regexp-private "\\|")) 18.495 @@ -1902,17 +1962,24 @@ 18.496 See also the documentation of YaTeX-processed-file-regexp-alist.") 18.497 18.498 (defvar YaTeX-file-processor-alist-default 18.499 - '(("tgif" . ".obj") 18.500 - ("gimp" . ".xcf") ("gimp" . ".xcf.gz") ("gimp" . ".xcf.bz2") 18.501 - ("inkscape" . ".svg") ("inkscape" . ".svgz") ("inkscape" . ".ai") 18.502 - ("soffice" . ".odg") 18.503 - ("gimp" . ".jpeg") ("gimp" . ".jpg") ("gimp" . ".png") 18.504 - ("evince" . ".ps") 18.505 - ("evince" . ".eps") 18.506 - ("soffice" . ".pdf") 18.507 - (t . ".tex") 18.508 - (t . ".sty") 18.509 - (t . "")) 18.510 + (list (cons YaTeX-cmd-tgif ".obj") 18.511 + (cons YaTeX-cmd-gimp ".xcf") 18.512 + (cons YaTeX-cmd-gimp ".xcf.gz") 18.513 + (cons YaTeX-cmd-gimp ".xcf.bz2") 18.514 + (cons YaTeX-cmd-edit-svg ".svg") 18.515 + (cons YaTeX-cmd-edit-svg ".svgz") 18.516 + (cons YaTeX-cmd-edit-ai ".ai") 18.517 + '("dia" . ".dia") 18.518 + (cons YaTeX-cmd-ooo ".odg") 18.519 + (cons YaTeX-cmd-edit-images ".jpeg") 18.520 + (cons YaTeX-cmd-edit-images ".jpg") 18.521 + (cons YaTeX-cmd-edit-images ".png") 18.522 + (cons YaTeX-cmd-edit-ps ".ps") 18.523 + (cons YaTeX-cmd-edit-ps ".eps") 18.524 + (cons YaTeX-cmd-edit-pdf ".pdf") 18.525 + '(t . ".tex") 18.526 + '(t . ".sty") 18.527 + '(t . "")) 18.528 "See the documentation of YaTeX-file-processor-alist.") 18.529 18.530 (defun YaTeX-goto-corresponding-file-processor (&optional other) 18.531 @@ -1964,9 +2031,8 @@ 18.532 (let ((default-directory basedir)) 18.533 (cond 18.534 ((stringp cmd) 18.535 - (let ((buf (concat "* " cmd " " src " *"))) 18.536 - (YaTeX-system (concat cmd " " src) buf) 18.537 - t)) 18.538 + (YaTeX-system (concat cmd " " src) cmd) 18.539 + t) 18.540 ((eq t cmd) 18.541 (let ((parent buffer-file-name)) 18.542 (funcall 18.543 @@ -2010,9 +2076,14 @@ 18.544 (goto-char (match-beginning 0)) 18.545 (throw 'found t)) 18.546 ;;If inside of parentheses, try to escape. 18.547 - (while (condition-case err 18.548 - (progn (up-list -1) t) 18.549 - (error nil))) 18.550 + (unwind-protect 18.551 + (progn 18.552 + (set-syntax-table YaTeX-mode-syntax-table-nonparen) 18.553 + (while (and (not (= (preceding-char) ?\])) ;skip optional arg 18.554 + (condition-case err 18.555 + (progn (up-list -1) t) 18.556 + (error nil))))) 18.557 + (set-syntax-table YaTeX-mode-syntax-table)) 18.558 (while (equal (preceding-char) ?\]) (backward-list)) 18.559 ;;(2) search command directly 18.560 (skip-chars-forward "^{}[]") 18.561 @@ -2104,7 +2175,7 @@ 18.562 (concat "\\(" YaTeX-struct-name-regexp "\\)") "" "" "") 18.563 "\\|\\(" 18.564 YaTeX-ec-regexp ;;"[][()]\\)" 18.565 - "[][]\\)" 18.566 + "[\\]\\[]\\)" 18.567 ) 18.568 (point-end-of-line) t))) 18.569 18.570 @@ -2148,6 +2219,7 @@ 18.571 ;; YaTeX-equation-env-regexp ;to delay loading 18.572 ;; (or (YaTeX-inner-environment t) "document")) 18.573 ;; (YaTeX-goto-corresponding-leftright))) 18.574 + ((YaTeX-goto-corresponding-viewer)) 18.575 (t (message "I don't know where to go."))))) 18.576 18.577 (defun YaTeX-goto-corresponding-*-other-window (arg) 18.578 @@ -2168,7 +2240,7 @@ 18.579 (if (not (YaTeX-on-begin-end-p)) 18.580 (comment-out-region 18.581 (if alt-prefix 18.582 - (read-string "Insert prefix: ") 18.583 + (read-string-with-history "Insert prefix: ") 18.584 YaTeX-comment-prefix)) 18.585 (YaTeX-comment-uncomment-env 'comment-out-region))) 18.586 18.587 @@ -2177,7 +2249,7 @@ 18.588 (interactive "P") 18.589 (if (not (YaTeX-on-begin-end-p)) 18.590 (uncomment-out-region 18.591 - (if alt-prefix (read-string "Remove prefix: ") 18.592 + (if alt-prefix (read-string-with-history "Remove prefix: ") 18.593 YaTeX-comment-prefix) 18.594 (region-beginning) (region-end) YaTeX-uncomment-once) 18.595 (YaTeX-comment-uncomment-env 'uncomment-out-region))) 18.596 @@ -2544,7 +2616,8 @@ 18.597 (progn 18.598 (setq maketitle (substring (YaTeX-match-string 0) 1)) 18.599 (setq memberp (YaTeX-math-member-p maketitle)))) 18.600 - (let ((last-command-char (string-to-char (car memberp)))) 18.601 + (let*((last-command-char (string-to-char (car memberp))) 18.602 + (last-command-event last-command-char)) 18.603 (setq beg (match-beginning 0) end (match-end 0)) 18.604 (delete-region beg end) 18.605 (YaTeX-math-insert-sequence t (cdr memberp)))))) 18.606 @@ -2561,6 +2634,9 @@ 18.607 ((YaTeX-on-section-command-p YaTeX-command-token-regexp);on any command 18.608 (YaTeX-kill-section-command (match-beginning 0) arg)) 18.609 ((YaTeX-kill-paren arg)) 18.610 + ((and (fboundp 'overlays-at) 18.611 + (member YaTeX-on-the-fly-overlay (overlays-at (point)))) 18.612 + (YaTeX-on-the-fly-cancel)) 18.613 (t (message "I don't know what to kill.")))) 18.614 18.615 (defun YaTeX-change-* () 18.616 @@ -2637,64 +2713,6 @@ 18.617 YaTeX-verbatim-environments)))))) 18.618 (store-match-data md)))) 18.619 18.620 -(defun YaTeX-in-environment-p (env) 18.621 - "Return if current LaTeX environment is ENV. 18.622 -ENV is given in the form of environment's name or its list." 18.623 - (let ((md (match-data)) (nest 0) p envrx) 18.624 - (cond 18.625 - ((atom env) 18.626 - (setq envrx 18.627 - (concat "\\(" 18.628 - (regexp-quote 18.629 - (YaTeX-replace-format-args 18.630 - YaTeX-struct-begin env "" "")) 18.631 - "\\)\\|\\(" 18.632 - (regexp-quote 18.633 - (YaTeX-replace-format-args 18.634 - YaTeX-struct-end env "" "")) 18.635 - "\\)")) 18.636 - (save-excursion 18.637 - (setq p (catch 'open 18.638 - (while (YaTeX-re-search-active-backward 18.639 - envrx YaTeX-comment-prefix nil t) 18.640 - (if (match-beginning 2) 18.641 - (setq nest (1+ nest)) 18.642 - (setq nest (1- nest))) 18.643 - (if (< nest 0) 18.644 - (throw 'open (cons env (match-beginning 0))))))))) 18.645 - ((listp env) 18.646 - (setq p 18.647 - (or (YaTeX-in-environment-p (car env)) 18.648 - (and (cdr env) (YaTeX-in-environment-p (cdr env))))))) 18.649 - (store-match-data md) 18.650 - p;(or p (YaTeX-in-verb-p (match-beginning 0))) 18.651 - )) 18.652 - 18.653 -(defun YaTeX-quick-in-environment-p (env) 18.654 - "Check quickly but unsure if current environment is ENV. 18.655 -ENV is given in the form of environment's name or its list. 18.656 -This function returns correct result only if ENV is NOT nested." 18.657 - (save-excursion 18.658 - (let ((md (match-data)) m0 (p (point)) rc clfound) 18.659 - (cond 18.660 - ((listp env) 18.661 - (or (YaTeX-quick-in-environment-p (car env)) 18.662 - (and (cdr env) (YaTeX-quick-in-environment-p (cdr env))))) 18.663 - (t 18.664 - (unwind-protect 18.665 - (if (prog1 18.666 - (YaTeX-search-active-backward 18.667 - (YaTeX-replace-format-args YaTeX-struct-begin env "" "") 18.668 - YaTeX-comment-prefix nil t) 18.669 - (setq m0 (match-beginning 0))) 18.670 - (if (YaTeX-search-active-forward 18.671 - (YaTeX-replace-format-args 18.672 - YaTeX-struct-end env) 18.673 - YaTeX-comment-prefix p t nil) 18.674 - nil ;if \end{env} found, return nil 18.675 - (cons env m0))) ;else, return meaningful values 18.676 - (store-match-data md))))))) 18.677 - 18.678 ;; Filling \item 18.679 (defun YaTeX-remove-trailing-comment (start end) 18.680 "Remove trailing comment from START to end." 18.681 @@ -2984,6 +3002,44 @@ 18.682 (if (string= c "t") (insert (YaTeX-read-accent-char c))) 18.683 (forward-char 1)))) 18.684 18.685 +;; Field skip in tabular 18.686 +(defun YaTeX-forward-field (arg) 18.687 + "Move forward to the ARGth next column field of table." 18.688 + (interactive "p") 18.689 + (if (< arg 0) 18.690 + (YaTeX-backward-field (- arg)) 18.691 + (let ((ep (save-excursion (YaTeX-end-of-environment) (point))) 18.692 + (wc (car (YaTeX-array-what-column-internal)))) 18.693 + (while (>= (setq arg (1- arg)) 0) 18.694 + (skip-chars-forward "^&\\\\") 18.695 + (while (and (not (eobp)) 18.696 + (> ep (point)) 18.697 + (looking-at "\\&\\|\\\\") 18.698 + (= wc (car (YaTeX-array-what-column-internal)))) 18.699 + (skip-chars-forward "&" ep) 18.700 + (while (looking-at "[\n\t ]+\\|\\\\\\\\\\|\\\\.line\\>") 18.701 + (goto-char (match-end 0)) 18.702 + )))))) 18.703 + 18.704 +(defun YaTeX-backward-field (arg) 18.705 + "Move backward to the ARGth next column field of table." 18.706 + (interactive "p") 18.707 + (if (< arg 0) 18.708 + (YaTeX-forward-field (- arg)) 18.709 + (let ((bp (save-excursion 18.710 + (YaTeX-beginning-of-environment) 18.711 + (point-end-of-line))) 18.712 + (wc (car (YaTeX-array-what-column-internal)))) 18.713 + (while (>= (setq arg (1- arg)) 0) 18.714 + (skip-chars-backward "^&\\\\" bp) 18.715 + (while (and (not (bobp)) 18.716 + (< bp (point)) 18.717 + (memq (preceding-char) '(?& ?\\)) 18.718 + (= wc (car (YaTeX-array-what-column-internal)))) 18.719 + (skip-chars-backward "&\\\\" bp) 18.720 + (skip-chars-backward "\n\t " bp)) 18.721 + (if (eolp) (skip-chars-forward "^&\\\\")))))) 18.722 + 18.723 ;; Indentation 18.724 (defun YaTeX-current-indentation () 18.725 "Return the indentation of current environment." 18.726 @@ -3087,7 +3143,7 @@ 18.727 ((YaTeX-literal-p) ;verbatims 18.728 (tab-to-tab-stop)) 18.729 ((string-match "\\(tabular\\|array\\)" inenv) ;1.73 18.730 - (let ((n 1)) 18.731 + (let ((n 1) (cc (current-column)) (p (point))) 18.732 (condition-case err 18.733 (save-excursion 18.734 (beginning-of-line) 18.735 @@ -3099,7 +3155,12 @@ 18.736 (YaTeX-reindent 18.737 (+ (YaTeX-current-indentation) 18.738 YaTeX-environment-indent 18.739 - (* (1- n) YaTeX-tabular-indentation))))) 18.740 + (* (1- n) YaTeX-tabular-indentation))) 18.741 + (and (= cc (current-column)) 18.742 + (= p (point)) 18.743 + (equal last-command 'YaTeX-indent-line) 18.744 + ;; if NO indent action occured, move to the next column 18.745 + (YaTeX-forward-field 1)))) 18.746 ((and inenv (not (equal "document" inenv))) 18.747 (funcall indent-relative)) 18.748 ((YaTeX-on-section-command-p YaTeX-sectioning-regexp)
19.1 --- a/yatex.new Mon May 14 19:59:12 2012 +0900 19.2 +++ b/yatex.new Sun Jul 12 14:21:20 2015 +0900 19.3 @@ -1,6 +1,38 @@ 19.4 What's new in YaTeX/yahtml 19.5 野鳥/yahtml - 各バージョンの変更点について 19.6 19.7 +1.79 別フレームに同一バッファがあるときのミニバッファ入力で、 19.8 + ポイント位置がずれるEmacsの問題への対策を入れた。 19.9 + === yatex === 19.10 + 数式環境など特定環境内の [prefix] t e で On-the-fly preview 発動。 19.11 + 環境に対する On-the-fly preview は編集中持続する。 19.12 + 持続中の On-the-fly preview の無効化は何もない場所で [prefix] k。 19.13 + YaTeX-help-file のデフォルト位置を site-lisp/yatex/help/ に変更。 19.14 + 領域活性時に呼び出す補完は領域括りになるようにした。 19.15 + タイプセットでPDF出力がありそうなときは次回previewをPDFヴューアに。 19.16 + === yahtml === 19.17 + 領域活性時に呼び出す補完は領域括りになるようにした。 19.18 + ... 19.19 + 19.20 + 19.21 +1.78 Drag&Dropサポートを追加。 19.22 + tabular環境内で2連続以上Tabで、1カラム進む機能を追加。 19.23 + === yatex === 19.24 + 主な外部コマンド名を変数化。 19.25 + [prefix] t d の直後のデフォルトヴューアはPDF用のものに。 19.26 + 「%#!コマンド -オプション」のときは親ファイル指定なしと判定。 19.27 + 地の段落での [prefix] t g でヴューアの forward-search を試みる。 19.28 + [prefix] t e の環境タイプセットの結果を可能なら画像に。 19.29 + [prefix] t e を環境外で呼んだ場合はパラグラフをタイプセット。 19.30 + [prefix] t e を領域活性状態で呼んだらその領域をタイプセット。 19.31 + === yahtml === 19.32 + table, ul, ol, dl 内で2連続以上Tabで、1カラム進む機能を追加。 19.33 + 19.34 +1.77 last-command-char 廃止対策を追加。 19.35 + === yatex === 19.36 + %#DVIPDF でdviからpdfへの変換コマンドを指定可能に。 19.37 + PDFヴューアに xpdf, pdfopen, mupdf, zathura, okular を追加。 19.38 + 19.39 1.76 === yatex === 19.40 タイプセットでラベル未定義があったら自動的にrerunする。 19.41 自動rerun無効化は YaTeX-typeset-auto-rerun を nil に。 19.42 @@ -18,7 +50,7 @@ 19.43 M-C-SPC で環境だけでなく数式環境もマークする。 19.44 [prefix] t d でタイプセッタ起動成功のあと dvipdfmx を起動。 19.45 \label{}でラベル名を入れたときは \ref{NAME} を自動的にkill-ringに追加。 19.46 - [prefix] t c で\label{NAME} の NAME を変えたら \ref のNAMEも変える。 19.47 + [prefix] c で\label{NAME} の NAME を変えたら \ref のNAMEも変える。 19.48 同上のことを \cite/\bibitem にも。 19.49 \bibitem{}を入れたときは \cite{TAG} を自動的にkill-ringに追加。 19.50 \end 補完のお節介検査の精度を少し上げた。
20.1 --- a/yatex19.el Mon May 14 19:59:12 2012 +0900 20.2 +++ b/yatex19.el Sun Jul 12 14:21:20 2015 +0900 20.3 @@ -1,9 +1,9 @@ 20.4 -;;; -*- Emacs-Lisp -*- 20.5 -;;; YaTeX facilities for Emacs 19 or later 20.6 -;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] 20.7 -;;; Last modified Sun Jan 29 23:00:52 2012 on firestorm 20.8 +;;; yatex19.el -- YaTeX facilities for Emacs 19 or later -*- coding: sjis -*- 20.9 +;;; (c)1994-2015 by HIROSE Yuuji.[yuuji@yatex.org] 20.10 +;;; Last modified Fri Jan 16 15:03:58 2015 on firestorm 20.11 ;;; $Id$ 20.12 20.13 +;;; Code: 20.14 ;(require 'yatex) 20.15 20.16 (and (boundp 'YaTeX-use-hilit19) 20.17 @@ -15,10 +15,10 @@ 20.18 (defvar YaTeX-background-mode 20.19 (or (if (fboundp 'get-frame-background-mode) 20.20 (get-frame-background-mode (selected-frame))) 20.21 + (if (boundp 'frame-background-mode) 20.22 + frame-background-mode) 20.23 (if (fboundp 'frame-parameters) 20.24 (cdr (assq 'background-mode (frame-parameters)))) 20.25 - (if (boundp 'frame-background-mode) 20.26 - frame-background-mode) 20.27 (if (boundp 'hilit-background-mode) 20.28 hilit-background-mode) 20.29 (if (face-background 'default) 20.30 @@ -54,11 +54,11 @@ 20.31 (list 20.32 (if YaTeX-auto-math-mode nil 20.33 (cons 'math (cons "Toggle math-mode" 20.34 - '(lambda () (interactive) 20.35 - (YaTeX-switch-mode-menu nil ?t))))) 20.36 + (function(lambda () (interactive) 20.37 + (YaTeX-switch-mode-menu nil ?t)))))) 20.38 (cons 'mod (cons "Toggle Modify Mode" 20.39 - '(lambda () (interactive) 20.40 - (YaTeX-switch-mode-menu nil ?m)))))))) 20.41 + (function(lambda () (interactive) 20.42 + (YaTeX-switch-mode-menu nil ?m))))))))) 20.43 (defvar YaTeX-mode-menu-map-percent (make-sparse-keymap "percent")) 20.44 (YaTeX-define-menu 20.45 'YaTeX-mode-menu-map-percent 20.46 @@ -227,11 +227,12 @@ 20.47 20.48 (and (featurep 'xemacs) 20.49 (add-hook 'yatex-mode-hook 20.50 - '(lambda () 20.51 + (function 20.52 + (lambda () 20.53 (or (assoc "YaTeX" current-menubar) 20.54 (progn 20.55 (set-buffer-menubar (copy-sequence current-menubar)) 20.56 - (add-submenu nil YaTeX-mode-menu-map)))))) 20.57 + (add-submenu nil YaTeX-mode-menu-map))))))) 20.58 20.59 ;; Other key bindings for window-system 20.60 ;(YaTeX-define-key [?\C- ] 'YaTeX-do-completion) 20.61 @@ -483,6 +484,14 @@ 20.62 20.63 (defun YaTeX-19-create-face (sym fgcolor &optional bgcolor) 20.64 "Create face named SYM with face of FGCOLOR/BGCOLOR." 20.65 + (if (consp fgcolor) 20.66 + (setq fgcolor (if (eq YaTeX-background-mode 'light) 20.67 + (car fgcolor) 20.68 + (cdr fgcolor)))) 20.69 + (if (consp bgcolor) 20.70 + (setq bgcolor (if (eq YaTeX-background-mode 'light) 20.71 + (car bgcolor) 20.72 + (cdr bgcolor)))) 20.73 (cond 20.74 ((and YaTeX-use-font-lock (fboundp 'defface)) 20.75 (custom-declare-face 20.76 @@ -631,7 +640,8 @@ 20.77 (if single (list single 0 'macro)))))))))) 20.78 20.79 ;;2006/6/23 new face, `delimiter' introduced 20.80 -(YaTeX-19-create-face 'delimiter "saddlebrown" "ivory") 20.81 +(YaTeX-19-create-face 20.82 + 'delimiter '("saddlebrown" . "lightyellow") '("ivory". "navy")) 20.83 20.84 ;;(YaTeX-19-collect-macros) ;causes an error 20.85 (defun YaTeX-hilit-setup-alist ()
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 21.2 +++ b/yatex23.el Sun Jul 12 14:21:20 2015 +0900 21.3 @@ -0,0 +1,113 @@ 21.4 +;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*- 21.5 +;;; (c)2014-2015 by HIROSE Yuuji.[yuuji@yatex.org] 21.6 +;;; Last modified Sun Jan 18 21:12:27 2015 on firestorm 21.7 +;;; $Id$ 21.8 + 21.9 +;;; Code: 21.10 +(defvar YaTeX-dnd-auto-figure "figure" 21.11 + "*If set, include dropped \\includegraphcs{} into that environment. 21.12 +The value should be string. Set this `nil' to disable enclosing.") 21.13 +(defvar YaTeX-dnd-auto-figure-package 21.14 + (cons "graphicx" 21.15 + (cond ((string-match "pdflatex" tex-command) "pdftex") 21.16 + (t "dvipdfmx"))) 21.17 + "*Default LaTeX package and its option for \\includegraphics") 21.18 + 21.19 +(defun YaTeX-dnd-handler (uri action) 21.20 + "DnD handler for yatex-mode 21.21 +Convert local image URI to \\includegraphcis{} and 21.22 +.tex file names to \\include{}." 21.23 + (let*((file (dnd-get-local-file-name uri t)) 21.24 + (path (save-excursion 21.25 + (YaTeX-visit-main t) 21.26 + (file-relative-name file))) 21.27 + (insert-file-directory nil) 21.28 + (case-fold-search t) 21.29 + (b nil) p1 p2 (cc (current-column)) envstart) 21.30 + (cond 21.31 + ((memq action '(copy link move private)) 21.32 + (cond 21.33 + ((string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|tiff?\\|e?ps\\|pdf\\)$" path) 21.34 + (if (and (stringp YaTeX-dnd-auto-figure) 21.35 + (not (YaTeX-in-environment-p YaTeX-dnd-auto-figure)) 21.36 + (not (string-match "figure" 21.37 + (or (YaTeX-inner-environment t) "body"))) 21.38 + YaTeX-dnd-auto-figure) 21.39 + (setq b (format "\\begin{%s}[htbp] %%\\centering\n" 21.40 + YaTeX-dnd-auto-figure))) 21.41 + (unwind-protect 21.42 + (progn 21.43 + (setq envstart (point-marker)) 21.44 + (insert "\\includegraphics") 21.45 + (insert "{" (YaTeX::includegraphics 1 path t) "}") 21.46 + (save-excursion 21.47 + (YaTeX-package-auto-usepackage 21.48 + "includegraphics" 'section 21.49 + (car YaTeX-dnd-auto-figure-package) 21.50 + (cdr YaTeX-dnd-auto-figure-package))) 21.51 + (cond 21.52 + (b 21.53 + (undo-boundary) 21.54 + (save-excursion 21.55 + (goto-char envstart) 21.56 + (insert b)) 21.57 + (YaTeX-indent-line) 21.58 + (insert "\n") 21.59 + (indent-to (1+ cc)) 21.60 + (setq p1 (point)) 21.61 + (insert "\\caption{") 21.62 + (setq p2 (point)) 21.63 + (insert (format "}\\label{%s}\n" path)) 21.64 + (indent-to cc) 21.65 + (insert (format "\\end{%s}\n" YaTeX-dnd-auto-figure)) 21.66 + (goto-char p2) 21.67 + (undo-boundary) 21.68 + (insert (file-name-nondirectory path)) 21.69 + (undo-boundary) 21.70 + (goto-char p1) 21.71 + (insert "%") 21.72 + (end-of-line) 21.73 + (or (get 'YaTeX-dnd-auto-figure 'guide) 21.74 + (progn 21.75 + (newline 1) 21.76 + (indent-to (1+ cc)) 21.77 + (insert (format 21.78 + (if YaTeX-japan 21.79 + "%% Undo(%s)するとcaptionが活きます。2度押しで空欄 3度押しで無環境" 21.80 + "%% TYPE undo(%s) to ACTIVATE caption. Twice to clear caption. 3 to no-env") 21.81 + (key-description 21.82 + (car (where-is-internal 'undo))))) 21.83 + (put 'YaTeX-dnd-auto-figure 'guide t))))) 21.84 + (YaTeX-help "includegraphics")) 21.85 + (set-marker envstart nil) ;;sure to reset marker 21.86 + action)) 21.87 + ((string-match "\\(.*\\)\\.tex$" path) 21.88 + (insert "\\include{" (match-string 1 path) "}")) 21.89 + ((string-match "\\(.*\\)\\.bib$" path) 21.90 + (insert "\\bibliography{" (match-string 1 path) "}")) 21.91 + ((string-match "\\.ind$" path) 21.92 + (insert "\\input{" path "}")))) 21.93 + (t (message "%s" action))))) 21.94 + 21.95 +(defvar YaTeX-on-the-fly-bg-face '("#f0f0c0" . "#706868") 21.96 + "Background color of on-the-fly preview image activated environment.") 21.97 +(defvar YaTeX-on-the-fly-overlay nil 21.98 + "Overlay of on-the-fly preview image") 21.99 +(defface YaTeX-on-the-fly-activated-face 21.100 + (list 21.101 + (list (list '(class color) '(min-colors 65536)) 21.102 + (list ':background 21.103 + (if (eq YaTeX-background-mode 'light) 21.104 + (car YaTeX-on-the-fly-bg-face) 21.105 + (cdr YaTeX-on-the-fly-bg-face)))) 21.106 + (list t (list ':bold t))) 21.107 + "Face of on-the-fly preview image mode") 21.108 + 21.109 +(provide 'yatex23) 21.110 + 21.111 +; Local variables: 21.112 +; fill-prefix: ";;; " 21.113 +; paragraph-start: "^$\\|\\|;;;$" 21.114 +; paragraph-separate: "^$\\|\\|;;;$" 21.115 +; coding: sjis 21.116 +; End:
22.1 --- a/yatexadd.el Mon May 14 19:59:12 2012 +0900 22.2 +++ b/yatexadd.el Sun Jul 12 14:21:20 2015 +0900 22.3 @@ -1,10 +1,9 @@ 22.4 -;;; -*- Emacs-Lisp -*- 22.5 -;;; YaTeX add-in functions. 22.6 -;;; yatexadd.el rev.20 22.7 -;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] 22.8 -;;; Last modified Fri Mar 9 21:19:09 2012 on firestorm 22.9 +;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 22.10 +;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 22.11 +;;; Last modified Wed Jul 8 09:15:15 2015 on firestorm 22.12 ;;; $Id$ 22.13 22.14 +;;; Code: 22.15 ;;; 22.16 ;;Sample functions for LaTeX environment. 22.17 ;;; 22.18 @@ -24,10 +23,11 @@ 22.19 YaTeX-make-begin-end." 22.20 (let ((width "") bars (rule "") (and "") (j 1) loc ans (hline "\\hline")) 22.21 (if (string= YaTeX-env-name "tabular*") 22.22 - (setq width (concat "{" (read-string "Width: ") "}"))) 22.23 + (setq width (concat "{" (YaTeX:read-length "Width: ") "}"))) 22.24 (setq loc (YaTeX:read-position "tb") 22.25 bars (string-to-int 22.26 - (read-string "Number of columns(0 for default format): " "3"))) 22.27 + (YaTeX-read-string-or-skip 22.28 + "Number of columns(0 for default format): " "3"))) 22.29 (if (<= bars 0) 22.30 (setq ;if 0, simple format 22.31 rule YaTeX:tabular-default-rule 22.32 @@ -41,7 +41,7 @@ 22.33 (setq ans (read-char)) 22.34 (cond 22.35 ((or (equal ans ?t) (equal ans ?T)) 22.36 - (setq ans (read-string "Rule width: " "1pt") 22.37 + (setq ans (read-string-with-history "Rule width: " "1pt") 22.38 rule (concat 22.39 "@{" (format YaTeX:tabular-thick-vrule ans) "}" 22.40 rule 22.41 @@ -50,7 +50,7 @@ 22.42 (t (setq rule (concat "|" rule "|") 22.43 hline "\\hline")))) 22.44 22.45 - (setq rule (read-string "rule format: " rule)) 22.46 + (setq rule (YaTeX-read-string-or-skip "rule format: " rule)) 22.47 (setq YaTeX-single-command "hline") 22.48 22.49 (format "%s%s{%s}" width loc rule))) 22.50 @@ -58,10 +58,10 @@ 22.51 (fset 'YaTeX:tabular* 'YaTeX:tabular) 22.52 (fset 'YaTeX:supertabular 'YaTeX:tabular) 22.53 (defun YaTeX:alignat () 22.54 - (concat "{" (read-string "Number of columns: ") "}")) 22.55 + (concat "{" (read-string-with-history "Number of columns: ") "}")) 22.56 (defun YaTeX:array () 22.57 (concat (YaTeX:read-position "tb") 22.58 - "{" (read-string "Column format: ") "}")) 22.59 + "{" (read-string-with-history "Column format: ") "}")) 22.60 (defun YaTeX:subequations () 22.61 (message (if YaTeX-japan "分かりやすいコメントに変えるとref補完が楽よ" 22.62 "Changing comment string reduces effort at `ref' completion")) 22.63 @@ -99,6 +99,15 @@ 22.64 (let ((pos (YaTeX:read-oneof oneof))) 22.65 (if (string= pos "") "" (concat "[" pos "]")))) 22.66 22.67 +(defun YaTeX:read-length (prompt) 22.68 + "Read a LaTeX dimensional parameter with magnifying numerics prepend." 22.69 + (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 22.70 + (delim "-0-9*+/.") 22.71 + (tbl (append YaTeX:style-parameters-local 22.72 + YaTeX:style-parameters-private 22.73 + YaTeX:style-parameters-default))) 22.74 + (YaTeX-completing-read-or-skip prompt tbl nil))) 22.75 + 22.76 ;;; 22.77 ;; Functions for figure environemnt 22.78 ;;; 22.79 @@ -160,32 +169,38 @@ 22.80 (if (fboundp 'YaTeX-toggle-math-mode) 22.81 (YaTeX-toggle-math-mode t))) ;force math-mode ON. 22.82 22.83 -(mapcar '(lambda (f) (fset f 'YaTeX:equation)) 22.84 +(mapcar (function (lambda (f) (fset f 'YaTeX:equation))) 22.85 '(YaTeX:eqnarray YaTeX:eqnarray* YaTeX:align YaTeX:align* 22.86 YaTeX:split YaTeX:multline YaTeX:multline* YaTeX:gather YaTeX:gather* 22.87 YaTeX:aligned* YaTeX:gathered YaTeX:gathered* 22.88 YaTeX:alignat YaTeX:alignat* YaTeX:xalignat YaTeX:xalignat* 22.89 YaTeX:xxalignat YaTeX:xxalignat*)) 22.90 22.91 -(defun YaTeX:alignat () 22.92 - (YaTeX:equation) 22.93 - (concat "{" (read-string "Number of cols: ") "}")) 22.94 - 22.95 - 22.96 - 22.97 (defun YaTeX:list () 22.98 "%\n{} %default label\n{} %formatting parameter") 22.99 22.100 (defun YaTeX:minipage () 22.101 (concat (YaTeX:read-position "cbt") 22.102 - "{" (read-string "Width: ") "}")) 22.103 + "{" (YaTeX:read-length "Width: ") "}")) 22.104 22.105 (defun YaTeX:thebibliography () 22.106 (setq YaTeX-section-name "bibitem") 22.107 - (concat "{" (read-string "Longest label: ") "}")) 22.108 + (concat "{" (read-string-with-history "Longest label: ") "}")) 22.109 22.110 (defun YaTeX:multicols () 22.111 - (concat "{" (read-string "Number of columns: ") "}")) 22.112 + (concat "{" (read-string-with-history "Number of columns: ") "}")) 22.113 + 22.114 + 22.115 +;; wrapfig.sty 22.116 +(defun YaTeX:wrapfigure () 22.117 + (YaTeX-help "wrapfigure") 22.118 + (concat 22.119 + (let ((lines (YaTeX-read-string-or-skip "Wrap Lines(Optional): "))) 22.120 + (if (string< "" lines) 22.121 + (concat "[" lines "]"))) 22.122 + "{" (YaTeX:read-oneof "rlioRLIO" t) "}" 22.123 + "{" (YaTeX:read-length "Image width: ") "}")) 22.124 + 22.125 22.126 ;;; 22.127 ;;Sample functions for section-type command. 22.128 @@ -193,7 +208,7 @@ 22.129 (defun YaTeX:multiput () 22.130 (concat (YaTeX:read-coordinates "Pos") 22.131 (YaTeX:read-coordinates "Step") 22.132 - "{" (read-string "How many times: ") "}")) 22.133 + "{" (read-string-with-history "How many times: ") "}")) 22.134 22.135 (defun YaTeX:put () 22.136 (YaTeX:read-coordinates "Pos")) 22.137 @@ -204,7 +219,7 @@ 22.138 (concat (YaTeX:read-coordinates "Dimension") 22.139 (YaTeX:read-position "lsrtb"))) 22.140 (t 22.141 - (let ((width (read-string "Width: "))) 22.142 + (let ((width (YaTeX:read-length "Width: "))) 22.143 (if (string< "" width) 22.144 (progn 22.145 (or (equal (aref width 0) ?\[) 22.146 @@ -221,17 +236,17 @@ 22.147 (YaTeX:read-position "tbc")) 22.148 (defun YaTeX::parbox (argp) 22.149 (cond 22.150 - ((= argp 1) (read-string "Width: ")) 22.151 - ((= argp 2) (read-string "Text: ")))) 22.152 + ((= argp 1) (YaTeX:read-length "Width: ")) 22.153 + ((= argp 2) (YaTeX-read-string-or-skip "Text: ")))) 22.154 22.155 (defun YaTeX::dashbox () 22.156 - (concat "{" (read-string "Dash dimension: ") "}" 22.157 + (concat "{" (read-string-with-history "Dash dimension: ") "}" 22.158 (YaTeX:read-coordinates "Dimension"))) 22.159 22.160 (defun YaTeX::savebox (argp) 22.161 (cond 22.162 - ((= argp 1) (read-string "Saved into name: " "\\")) 22.163 - ((= argp 2) (read-string "Text: ")))) 22.164 + ((= argp 1) (read-string-with-history "Saved into name: " "\\")) 22.165 + ((= argp 2) (YaTeX-read-string-or-skip "Text: ")))) 22.166 22.167 (defvar YaTeX-minibuffer-quick-map nil) 22.168 (if YaTeX-minibuffer-quick-map nil 22.169 @@ -280,13 +295,15 @@ 22.170 (defun YaTeX:read-coordinates (&optional mes varX varY) 22.171 (concat 22.172 "(" 22.173 - (read-string (format "%s %s: " (or mes "Dimension") (or varX "X"))) 22.174 + (read-string-with-history 22.175 + (format "%s %s: " (or mes "Dimension") (or varX "X"))) 22.176 "," 22.177 - (read-string (format "%s %s: " (or mes "Dimension") (or varY "Y"))) 22.178 + (read-string-with-history 22.179 + (format "%s %s: " (or mes "Dimension") (or varY "Y"))) 22.180 ")")) 22.181 22.182 (defun YaTeX:itembox () 22.183 - (concat "{" (read-string "Item heading string: ") "}")) 22.184 + (concat "{" (YaTeX-read-string-or-skip "Item heading string: ") "}")) 22.185 22.186 ;;; 22.187 ;;Sample functions for maketitle-type command. 22.188 @@ -301,9 +318,9 @@ 22.189 (defun YaTeX:lim () 22.190 "Insert limit notation of \\lim." 22.191 (YaTeX:check-completion-type 'maketitle) 22.192 - (let ((var (read-string "Variable: ")) limit) 22.193 + (let ((var (read-string-with-history "Variable: ")) limit) 22.194 (if (string= "" var) "" 22.195 - (setq limit (read-string "Limit ($ means infinity): ")) 22.196 + (setq limit (read-string-with-history "Limit ($ means infinity): ")) 22.197 (if (string= "$" limit) (setq limit "\\infty")) 22.198 (concat "_{" var " \\rightarrow " limit "}")))) 22.199 22.200 @@ -314,15 +331,16 @@ 22.201 22.202 (defun YaTeX:read-boundary (ULchar) 22.203 "Read boundary usage by _ or ^. _ or ^ is indicated by argument ULchar." 22.204 - (let ((bndry (read-string (concat ULchar "{???} ($ for infinity): ")))) 22.205 + (let ((bndry (read-string-with-history 22.206 + (concat ULchar "{???} ($ for infinity): ")))) 22.207 (if (string= bndry "") "" 22.208 (if (string= bndry "$") (setq bndry "\\infty")) 22.209 (concat ULchar "{" bndry "}")))) 22.210 22.211 (defun YaTeX:verb () 22.212 "Enclose \\verb's contents with the same characters." 22.213 - (let ((quote-char (read-string "Quoting char: " "|")) 22.214 - (contents (read-string "Quoted contents: "))) 22.215 + (let ((quote-char (read-string-with-history "Quoting char: " "|")) 22.216 + (contents (YaTeX-read-string-or-skip "Quoted contents: "))) 22.217 (concat quote-char contents quote-char))) 22.218 22.219 (fset 'YaTeX:verb* 'YaTeX:verb) 22.220 @@ -332,12 +350,12 @@ 22.221 nil) 22.222 22.223 (defun YaTeX:cite () 22.224 - (let ((comment (read-string "Comment for citation: "))) 22.225 + (let ((comment (YaTeX-read-string-or-skip "Comment for citation: "))) 22.226 (if (string= comment "") "" 22.227 (concat "[" comment "]")))) 22.228 22.229 (defun YaTeX:bibitem () 22.230 - (let ((label (read-string "Citation label for bibitem: "))) 22.231 + (let ((label (YaTeX-read-string-or-skip "Citation label for bibitem: "))) 22.232 (if (string= label "") "" 22.233 (concat "[" label "]")))) 22.234 22.235 @@ -432,7 +450,7 @@ 22.236 (defun YaTeX::label-search-tag () 22.237 (interactive) 22.238 (let ((case-fold-search t) 22.239 - (tag (regexp-quote (char-to-string last-command-char)))) 22.240 + (tag (regexp-quote (char-to-string (YaTeX-last-key))))) 22.241 (cond 22.242 ((save-excursion 22.243 (forward-char 1) 22.244 @@ -588,7 +606,7 @@ 22.245 (let ((default (condition-case nil 22.246 (YaTeX::ref-default-label) 22.247 (error (substring (current-time-string) 4))))) 22.248 - (read-string "Give a label for this line: " 22.249 + (YaTeX-read-string-or-skip "Give a label for this line: " 22.250 (if YaTeX-emacs-19 (cons default 1) default)))) 22.251 22.252 (defun YaTeX::ref-getset-label (buffer point &optional noset) 22.253 @@ -1235,7 +1253,7 @@ 22.254 (let*((chmode (boundp (intern-soft "old"))) 22.255 (dlab (if chmode old ;if called via YaTeX-change-section (tricky...) 22.256 (YaTeX::ref-default-label))) 22.257 - (label (read-string 22.258 + (label (read-string-with-history 22.259 (format "New %s name: " (or labname "label")) 22.260 (cons dlab 1)))) 22.261 (if (string< "" label) 22.262 @@ -1248,6 +1266,7 @@ 22.263 22.264 22.265 (fset 'YaTeX::pageref 'YaTeX::ref) 22.266 +(fset 'YaTeX::cref 'YaTeX::ref) 22.267 (defun YaTeX::tabref (argp) ; For the style file of IPSJ journal 22.268 (YaTeX::ref 22.269 argp nil nil 22.270 @@ -1378,7 +1397,7 @@ 22.271 (hilit-auto-highlight nil) 22.272 (pcnt (regexp-quote YaTeX-comment-prefix)) 22.273 (bibrx (concat YaTeX-ec-regexp "bibliography{\\([^}]+\\)}")) 22.274 - (bibptn (read-string "Pattern: ")) 22.275 + (bibptn (YaTeX-read-string-or-skip "Pattern: ")) 22.276 (bbuf (get-buffer-create " *bibitems*")) 22.277 (standard-output bbuf) 22.278 (me 'YaTeX::cite) ;shuld set this for using YaTeX::ref 22.279 @@ -1485,13 +1504,14 @@ 22.280 (defun YaTeX::newcommand (&optional argp) 22.281 (cond 22.282 ((= argp 1) 22.283 - (let ((command (read-string "Define newcommand: " "\\"))) 22.284 + (let ((command (read-string-with-history "Define newcommand: " "\\"))) 22.285 (put 'YaTeX::newcommand 'command (substring command 1)) 22.286 command)) 22.287 ((= argp 2) 22.288 (let ((argc 22.289 - (string-to-int (read-string "Number of arguments(Default 0): "))) 22.290 - (def (read-string "Definition: ")) 22.291 + (string-to-int 22.292 + (read-string-with-history "Number of arguments(Default 0): "))) 22.293 + (def (YaTeX-read-string-or-skip "Definition: ")) 22.294 (command (get 'YaTeX::newcommand 'command))) 22.295 ;;!!! It's illegal to insert string in the add-in function !!! 22.296 (if (> argc 0) (insert (format "[%d]" argc))) 22.297 @@ -1518,7 +1538,7 @@ 22.298 (defun YaTeX::newcounter (&optional argp) 22.299 (cond 22.300 ((= argp 1) 22.301 - (read-string "New counter name: ")) 22.302 + (read-string-with-history "New counter name: ")) 22.303 (t ""))) 22.304 22.305 ;; 22.306 @@ -1575,6 +1595,7 @@ 22.307 ("\\tabcolsep") 22.308 ("\\textheight") 22.309 ("\\textwidth") 22.310 + ("\\columnwidth") 22.311 ("\\topmargin") 22.312 ("\\topsep") 22.313 ("\\topskip") 22.314 @@ -1600,7 +1621,7 @@ 22.315 nil nil "\\") 22.316 ) 22.317 ((equal 2 argp) 22.318 - (read-string-with-history "Length: " nil 'YaTeX:length-history)))) 22.319 + (YaTeX-read-string-or-skip "Length: " nil 'YaTeX:length-history)))) 22.320 22.321 (fset 'YaTeX::addtolength 'YaTeX::setlength) 22.322 22.323 @@ -1615,13 +1636,13 @@ 22.324 'YaTeX:style-parameters-local 22.325 nil nil "\\")) 22.326 ((equal 2 argp) 22.327 - (read-string "Text: ")))) 22.328 + (YaTeX-read-string-or-skip "Text: ")))) 22.329 22.330 (defun YaTeX::newlength (&optional argp) 22.331 "YaTeX add-in function for arguments of \\newlength" 22.332 (cond 22.333 ((equal argp 1) 22.334 - (let ((length (read-string "Length variable: " "\\"))) 22.335 + (let ((length (read-string-with-history "Length variable: " "\\"))) 22.336 (if (string< "" length) 22.337 (YaTeX-update-table 22.338 (list length) 22.339 @@ -1635,11 +1656,11 @@ 22.340 "YaTeX add-in function for arguments of \\multicolumn." 22.341 (cond 22.342 ((equal 1 argp) 22.343 - (read-string "Number of columns: ")) 22.344 + (read-string-with-history "Number of columns: ")) 22.345 ((equal 2 argp) 22.346 (YaTeX:read-oneof "|lrc" nil t)) 22.347 ((equal 3 argp) 22.348 - (read-string "Item: ")))) 22.349 + (YaTeX-read-string-or-skip "Item: ")))) 22.350 22.351 (defvar YaTeX:documentstyles-default 22.352 '(("article") ("jarticle") ("j-article") 22.353 @@ -1708,7 +1729,9 @@ 22.354 (save-excursion 22.355 (YaTeX-visit-main t) 22.356 (let*((insert-default-directory) 22.357 - (file (read-file-name (or prompt "Input file: ") ""))) 22.358 + (default (and (boundp 'old) (stringp old) old)) 22.359 + (file (read-file-name (or prompt "Input file: ") "" 22.360 + default nil default))) 22.361 (setq file (substring file 0 (string-match "\\.tex$" file)))))))) 22.362 22.363 (fset 'YaTeX::input 'YaTeX::include) 22.364 @@ -1784,12 +1807,12 @@ 22.365 YaTeX-default-documentclass sname))))) 22.366 22.367 (defun YaTeX::title (&optional argp) 22.368 - (prog1 (read-string "Document Title: ") 22.369 + (prog1 (YaTeX-read-string-or-skip "Document Title: ") 22.370 (setq YaTeX-section-name "author" 22.371 YaTeX-single-command "maketitle"))) 22.372 22.373 (defun YaTeX::author (&optional argp) 22.374 - (prog1 (read-string "Document Author: ") 22.375 + (prog1 (YaTeX-read-string-or-skip "Document Author: ") 22.376 (setq YaTeX-section-name "date" 22.377 YaTeX-single-command "maketitle"))) 22.378 22.379 @@ -1843,7 +1866,7 @@ 22.380 "Add-in for \\color's argument" 22.381 (cond 22.382 ((= argp 1) (YaTeX::color-completing-read "Color: ")) 22.383 - ((= argp 2) (read-string "Colored string: ")))) 22.384 + ((= argp 2) (YaTeX-read-string-or-skip "Colored string: ")))) 22.385 22.386 (fset 'YaTeX:color 'YaTeX:textcolor) 22.387 (fset 'YaTeX::color 'YaTeX::textcolor) 22.388 @@ -1857,14 +1880,13 @@ 22.389 (cond 22.390 ((= argp 1) (YaTeX::color-completing-read "Frame color: ")) 22.391 ((= argp 2) (YaTeX::color-completing-read "Inner color: ")) 22.392 - ((= argp 3) (read-string "Colored string: ")))) 22.393 + ((= argp 3) (YaTeX-read-string-or-skip "Colored string: ")))) 22.394 22.395 (defun YaTeX:scalebox () 22.396 "Add-in for \\scalebox" 22.397 - (let ((vmag (read-string 22.398 - (if YaTeX-japan "倍率(負で反転): " 22.399 + (let ((vmag (YaTeX-read-string-or-skip (if YaTeX-japan "倍率(負で反転): " 22.400 "Magnification(Negative for flipped): "))) 22.401 - (hmag (read-string (if YaTeX-japan "縦倍率(省略可): " 22.402 + (hmag (YaTeX-read-string-or-skip (if YaTeX-japan "縦倍率(省略可): " 22.403 "Vertical magnification(Optional): ")))) 22.404 (if (and hmag (string< "" hmag)) 22.405 (format "{%s}[%s]" vmag hmag) 22.406 @@ -1879,9 +1901,11 @@ 22.407 (if (string< "" (setq r (YaTeX:read-oneof "htbpB"))) 22.408 (concat "[origin=" r "]"))) 22.409 ((memq c '(?X ?x ?Y ?y)) 22.410 - (setq r (read-string "" (if YaTeX-emacs-19 (cons defx 3) defx)) 22.411 + (setq r (read-string-with-history 22.412 + "" (if YaTeX-emacs-19 (cons defx 3) defx)) 22.413 x (if (string< "x=" r) r) 22.414 - r (read-string "" (if YaTeX-emacs-19 (cons defy 3) defy)) 22.415 + r (read-string-with-history 22.416 + "" (if YaTeX-emacs-19 (cons defy 3) defy)) 22.417 y (if (string< "y=" r) r) 22.418 something (or x y)) 22.419 (format "%s%s%s%s%s" 22.420 @@ -1895,16 +1919,16 @@ 22.421 "Argument add-in for \\rotatebox" 22.422 (cond 22.423 ((= argp 1) 22.424 - (read-string (if YaTeX-japan "回転角(度; 左回り): " 22.425 + (read-string-with-history (if YaTeX-japan "回転角(度; 左回り): " 22.426 "Angle in degree(unclockwise): "))) 22.427 ((= argp 2) 22.428 - (read-string (if YaTeX-japan "テキスト: " "Text: "))))) 22.429 + (YaTeX-read-string-or-skip (if YaTeX-japan "テキスト: " "Text: "))))) 22.430 22.431 (defun YaTeX:includegraphics () 22.432 "Add-in for \\includegraphics's option" 22.433 (let (width height (scale "") angle str) 22.434 - (setq width (YaTeX-read-string-or-skip "Width: ") 22.435 - height (YaTeX-read-string-or-skip "Height: ")) 22.436 + (setq width (YaTeX:read-length "Width: ") 22.437 + height (YaTeX:read-length "Height: ")) 22.438 (or (string< "" width) (string< "" height) 22.439 (setq scale (YaTeX-read-string-or-skip "Scale: "))) 22.440 (setq angle (YaTeX-read-string-or-skip "Angle(0-359): ")) 22.441 @@ -1912,28 +1936,59 @@ 22.442 (mapconcat 22.443 'concat 22.444 (delq nil 22.445 - (mapcar '(lambda (s) 22.446 + (mapcar (function (lambda (s) 22.447 (and (stringp (symbol-value s)) 22.448 (string< "" (symbol-value s)) 22.449 - (format "%s=%s" s (symbol-value s)))) 22.450 + (format "%s=%s" s (symbol-value s))))) 22.451 '(width height scale angle))) 22.452 ",")) 22.453 (if (string= "" str) "" 22.454 (concat "[" str "]")))) 22.455 22.456 -(defun YaTeX::includegraphics (argp) 22.457 +(defvar YaTeX::get-boundingbox-cmd YaTeX-cmd-gs 22.458 + "Command to get bounding box from PDF files. 22.459 +Possible values are `gs' and `extractbb'.") 22.460 + 22.461 +(defun YaTeX::get-boundingbox (file) 22.462 + "Return the bound box as a string 22.463 +This function relies on gs(ghostscript) command installed." 22.464 + (let ((str (YaTeX-command-to-string 22.465 + (format 22.466 + (cond 22.467 + ((string-match "extractbb" YaTeX::get-boundingbox-cmd) 22.468 + "%s -O %s") 22.469 + ((string-match "gs" YaTeX::get-boundingbox-cmd) 22.470 + "%s -sDEVICE=bbox -dBATCH -dNOPAUSE %s") 22.471 + (t "echo %s %s")) 22.472 + YaTeX::get-boundingbox-cmd file)))) 22.473 + (if (string-match 22.474 + "%%BoundingBox:\\s \\([0-9]+\\s [0-9]+\\s [0-9]+\\s [0-9]+\\)" 22.475 + str) 22.476 + (substring str (match-beginning 1) (match-end 1))))) 22.477 + 22.478 +(defun YaTeX::includegraphics (argp &optional file doclip) 22.479 "Add-in for \\includegraphics" 22.480 - (let ((imgfile (YaTeX::include argp "Image File: ")) 22.481 + (let*((imgfile (or file (YaTeX::include argp "Image File: "))) 22.482 + (imgfilepath 22.483 + (save-excursion 22.484 + (YaTeX-visit-main t) 22.485 + (expand-file-name imgfile default-directory))) 22.486 (case-fold-search t) info bb noupdate needclose c) 22.487 - (and (string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\)$" imgfile) 22.488 - (file-exists-p imgfile) 22.489 + (and (string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|pdf\\)$" imgfile) 22.490 + (file-exists-p imgfilepath) 22.491 (or (fboundp 'yahtml-get-image-info) 22.492 (progn 22.493 (load "yahtml" t) (featurep 'yahtml))) ;(require 'yahtml nil t) 22.494 - (setq info (yahtml-get-image-info imgfile)) 22.495 - (car info) ;if has width value 22.496 - (car (cdr info)) ;if has height value 22.497 - (setq bb (format "bb=%d %d %d %d" 0 0 (car info) (car (cdr info)))) 22.498 + (if (string-match "\\.pdf" imgfile) 22.499 + (and 22.500 + (setq info (YaTeX::get-boundingbox imgfilepath)) 22.501 + (stringp info) 22.502 + (string< "" info) 22.503 + (setq bb (format "bb=%s" info))) 22.504 + (setq info (yahtml-get-image-info imgfilepath)) 22.505 + (car info) ;if has width value 22.506 + (car (cdr info)) ;if has height value 22.507 + (setq bb (format "bb=%d %d %d %d" 0 0 (car info) (car (cdr info))))) 22.508 (save-excursion 22.509 (cond 22.510 ((and (save-excursion 22.511 @@ -1947,17 +2002,25 @@ 22.512 (replace-match bb)) 22.513 (noupdate nil) 22.514 ((and (match-beginning 1) 22.515 - (prog2 22.516 - (message "Insert `%s'? Y)es N)o C)yes+`clip': " bb) 22.517 - (memq (setq c (read-char)) '(?y ?Y ?\ ?c ?C)) 22.518 - (message ""))) 22.519 + (or doclip 22.520 + (prog2 22.521 + (message "Insert `%s'? Y)es N)o C)yes+`clip': " bb) 22.522 + (memq (setq c (read-char)) '(?y ?Y ?\ ?c ?C)) 22.523 + (setq doclip (memq c '(?c ?C))) 22.524 + (message "")))) 22.525 (goto-char (match-end 0)) 22.526 - (message "") 22.527 + (message "`bb=' %s" 22.528 + (format 22.529 + (if YaTeX-japan 22.530 + "の値はファイル名の上で `%s' を押してファイル名を再入力して更新できます。" 22.531 + "values can be update by typing `%s' on file name.") 22.532 + (key-description 22.533 + (car (where-is-internal 'YaTeX-change-*))))) 22.534 (if (looking-at "\\[") (forward-char 1) 22.535 (insert-before-markers "[") 22.536 (setq needclose t)) 22.537 (insert-before-markers bb) 22.538 - (if (memq c '(?c ?C)) (insert-before-markers ",clip")) 22.539 + (if doclip (insert-before-markers ",clip")) 22.540 (if needclose (insert-before-markers "]") 22.541 (or (looking-at "\\]") (insert-before-markers ",")))) 22.542 (t (YaTeX-push-to-kill-ring bb))))) 22.543 @@ -1977,9 +2040,9 @@ 22.544 '(("version") ("plext") ("url") ("fancybox") ("pifont") ("longtable") 22.545 ("ascmac") ("bm") ("graphics") ("graphicx") ("alltt") ("misc") ("eclbkbox") 22.546 ("amsmath") ("amssymb") ("xymtex") ("chemist") 22.547 - ("a4j") ("array") ("epsf") ("color") ("epsfig") ("floatfig") 22.548 + ("a4j") ("array") ("epsf") ("color") ("xcolor") ("epsfig") ("floatfig") 22.549 ("landscape") ("path") ("supertabular") ("twocolumn") 22.550 - ("latexsym") ("times") ("makeidx")) 22.551 + ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm")) 22.552 "Default completion table for arguments of \\usepackage") 22.553 22.554 (defvar YaTeX::usepackage-alist-private nil 22.555 @@ -2004,7 +2067,7 @@ 22.556 (defun YaTeX::mask (argp) 22.557 (cond 22.558 ((equal argp 1) 22.559 - (read-string "String: ")) 22.560 + (YaTeX-read-string-or-skip "String: ")) 22.561 ((equal argp 2) 22.562 (let (c) 22.563 (while (not (memq c '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K))) 22.564 @@ -2015,9 +2078,9 @@ 22.565 (defun YaTeX::maskbox (argp) 22.566 (cond 22.567 ((equal argp 1) 22.568 - (read-string "Width: ")) 22.569 + (YaTeX:read-length "Width: ")) 22.570 ((equal argp 2) 22.571 - (read-string "Height: ")) 22.572 + (YaTeX:read-length "Height: ")) 22.573 ((equal argp 3) 22.574 (let (c) 22.575 (while (not (memq c '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K))) 22.576 @@ -2027,12 +2090,12 @@ 22.577 ((equal argp 4) 22.578 (YaTeX:read-oneof "lcr" 'quick)) 22.579 ((equal argp 5) 22.580 - (read-string "String: ")))) 22.581 + (YaTeX-read-string-or-skip "String: ")))) 22.582 22.583 (defun YaTeX::textcircled (argp) 22.584 (cond 22.585 ((equal argp 1) 22.586 - (let ((char (read-string "Circled char: ")) 22.587 + (let ((char (read-string-with-history "Circled char: ")) 22.588 (left "") (right "") c) 22.589 (setq c (read-char 22.590 "Enclose also with (s)mall (t)iny s(C)riptsize (N)one:")) 22.591 @@ -2129,7 +2192,7 @@ 22.592 (defun YaTeX::DeclareMathOperator (argp) 22.593 (cond 22.594 ((equal argp 1) 22.595 - (read-string "Operator: " "\\")))) 22.596 + (YaTeX-read-string-or-skip "Operator: " "\\")))) 22.597 22.598 ;;; 22.599 ;; Add-in functions for large-type command.
23.1 --- a/yatexenv.el Mon May 14 19:59:12 2012 +0900 23.2 +++ b/yatexenv.el Sun Jul 12 14:21:20 2015 +0900 23.3 @@ -1,10 +1,9 @@ 23.4 -;;; -*- Emacs-Lisp -*- 23.5 -;;; YaTeX environment-specific functions. 23.6 -;;; yatexenv.el 23.7 -;;; (c) 1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] 23.8 -;;; Last modified Sun Feb 12 11:15:33 2012 on firestorm 23.9 +;;; yatexenv.el --- YaTeX environment-specific functions 23.10 +;;; (c) 1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] 23.11 +;;; Last modified Mon Dec 22 12:49:03 2014 on firestorm 23.12 ;;; $Id$ 23.13 23.14 +;;; Code: 23.15 ;;; 23.16 ;; Functions for tabular environment 23.17 ;;; 23.18 @@ -13,24 +12,27 @@ 23.19 (defun YaTeX-array-what-column-internal () 23.20 "Return the cons of matching column and its title of array environment. 23.21 When calling from a program, make sure to be in array/tabular environment." 23.22 - (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") 23.23 + (let ((p (point)) bot beg eot bor eoll (nlptn "\\\\\\\\") (andptn "[^\\]&") 23.24 (n 0) j 23.25 (firsterr "This line might be the first row.")) 23.26 (save-excursion 23.27 (YaTeX-beginning-of-environment) 23.28 + (setq eoll (save-excursion ;end of logical line 23.29 + (YaTeX-goto-corresponding-environment) (point))) 23.30 (search-forward "{" p) (up-list 1) 23.31 (search-forward "{" p) (up-list 1) 23.32 ;;(re-search-forward andptn p) 23.33 - (while (progn (search-forward "&" p) 23.34 + (setq bot (point)) ;beginning of tabular 23.35 + (while (progn (search-forward "&" eoll) 23.36 (equal (char-after (1- (match-beginning 0))) ?\\ ))) 23.37 (setq beg (1- (point))) ;beg is the point of the first & 23.38 - (or (re-search-forward nlptn p t) 23.39 + (or (re-search-forward nlptn eoll t) 23.40 (error firsterr)) 23.41 (setq eot (point)) ;eot is the point of the first \\ 23.42 (goto-char p) 23.43 - (or (re-search-backward nlptn beg t) 23.44 - (error firsterr)) 23.45 - (setq bor (point)) ;bor is the beginning of this row. 23.46 + (setq bor (if (re-search-backward nlptn bot 1) 23.47 + (point) ;bor is the beginning of this row. 23.48 + bot)) 23.49 (while (< (1- (point)) p) 23.50 (if (equal (following-char) ?&) 23.51 (forward-char 1) 23.52 @@ -55,8 +57,8 @@ 23.53 (setq j (1- j))) 23.54 (skip-chars-forward "\\s ") 23.55 (list n 23.56 - (buffer-substring 23.57 - (point) 23.58 + (YaTeX-buffer-substring 23.59 + (progn (skip-chars-forward "\n \t") (point)) 23.60 (progn 23.61 (re-search-forward (concat andptn "\\|" nlptn) eot) 23.62 (goto-char (match-beginning 0)) 23.63 @@ -171,6 +173,7 @@ 23.64 23.65 (fset 'YaTeX-intelligent-newline-array 'YaTeX-intelligent-newline-tabular) 23.66 (fset 'YaTeX-intelligent-newline-supertabular 'YaTeX-intelligent-newline-tabular) 23.67 +(fset 'YaTeX-intelligent-newline-longtable 'YaTeX-intelligent-newline-tabular) 23.68 23.69 (defun YaTeX-intelligent-newline-align () 23.70 "Intelligent newline function for align. 23.71 @@ -198,10 +201,11 @@ 23.72 (YaTeX-indent-line))) 23.73 23.74 (mapcar 23.75 - '(lambda (s) 23.76 + (function 23.77 + (lambda (s) 23.78 (fset (intern (concat "YaTeX-intelligent-newline-" 23.79 (symbol-name s))) 23.80 - 'YaTeX-intelligent-newline-align)) 23.81 + 'YaTeX-intelligent-newline-align))) 23.82 '(align* flalign flalign* matrix pmatrix bmatrix Bmatrix vmatrix Vmatrix 23.83 cases eqnarray eqnarray* alignat alignat*)) 23.84
24.1 --- a/yatexgen.el Mon May 14 19:59:12 2012 +0900 24.2 +++ b/yatexgen.el Sun Jul 12 14:21:20 2015 +0900 24.3 @@ -1,16 +1,15 @@ 24.4 -;;; -*- Emacs-Lisp -*- 24.5 -;;; YaTeX add-in function generator. 24.6 -;;; yatexgen.el rev.5 24.7 +;;; yatexgen.el --- YaTeX add-in function generator(rev.5) 24.8 + 24.9 ;;; (c)1991-1995,1999,2000 by HIROSE Yuuji.[yuuji@yatex.org] 24.10 -;;; Last modified Fri Jun 27 12:09:37 2003 on firestorm 24.11 +;;; Last modified Sun Dec 21 14:04:49 2014 on firestorm 24.12 ;;; $Id$ 24.13 24.14 +;;; Code: 24.15 (require 'yatex) 24.16 24.17 (defmacro YaTeX-setq (var japanese english) 24.18 (list 'setq var 24.19 - (if YaTeX-japan japanese english)) 24.20 -) 24.21 + (if YaTeX-japan japanese english))) 24.22 24.23 (put 'YaTeX-setq 'lisp-indent-hook 1) 24.24 24.25 @@ -29,8 +28,7 @@ 24.26 reading my messages *carefully*, or you'll fail to generate appropriate 24.27 function. 24.28 24.29 - Hit return key!" 24.30 -) 24.31 + Hit return key!") 24.32 24.33 (YaTeX-setq YaTeX-generate-start-message 24.34 "さぁはじめるよ.\n1.登録したい補完をやってみて. 24.35 @@ -40,33 +38,27 @@ 24.36 "Let's begin completion for which you want to make add-in function. 24.37 If you want to make add-in function for \\documentstyle input only 24.38 `\\documentstyle{}' *with* completion of yatex-mode. 24.39 -If you finish this, please press RET." 24.40 -) 24.41 +If you finish this, please press RET.") 24.42 24.43 (YaTeX-setq YaTeX-generate-abort-message 24.44 "やめた、やめた〜いめんどくせ〜" 24.45 - "Aborted." 24.46 -) 24.47 + "Aborted.") 24.48 24.49 (YaTeX-setq YaTeX-generate-same-message 24.50 "それじゃ、なにも変わってねぇだろーが! やめた。" 24.51 - "I found no difference between them. So I'm quitting." 24.52 -) 24.53 + "I found no difference between them. So I'm quitting.") 24.54 24.55 (YaTeX-setq YaTeX-generate-invalid-message 24.56 "それは、ちと無理というものじゃ." 24.57 - "It's impossible." 24.58 -) 24.59 + "It's impossible.") 24.60 24.61 (YaTeX-setq YaTeX-generate-idontknow-message 24.62 "う〜ん、難しくてよくわからないなぁ。ばかでごめんねェ〜" 24.63 - "Sorry I can't tell your adding method." 24.64 -) 24.65 + "Sorry I can't tell your adding method.") 24.66 24.67 (YaTeX-setq YaTeX-generate-confirm-message 24.68 "ということは、付け足したい部分はこれでいいのね" 24.69 - "Is it additional string of add-in function?" 24.70 -) 24.71 + "Is it additional string of add-in function?") 24.72 24.73 (YaTeX-setq YaTeX-generate-output-message 24.74 "2.じゃ、それにくっつけたいものを *カーソルの位置に* 足してみて. 24.75 @@ -75,8 +67,7 @@ 24.76 で、またおわったらりたーん!!" 24.77 "2.Then input additional string *at CURSOR POSITION* 24.78 According to last example \\documentstyle{}, 24.79 -modify it \\documentstyle[12pt]{}. RET to finish." 24.80 -) 24.81 +modify it \\documentstyle[12pt]{}. RET to finish.") 24.82 24.83 (YaTeX-setq YaTeX-generate-put-arg-message 24.84 "3.このうち、キーボードから読み込んで欲しい文字列を順に入れて。 24.85 @@ -86,8 +77,7 @@ 24.86 "3.In this string, extract string which you want to input from key 24.87 board with quiry afterwards. For example, though additional string is 24.88 \\documentstyle[12pt]{}, but you want enter only `12pt' by hand. 24.89 -RET to finish!" 24.90 -) 24.91 +RET to finish!") 24.92 24.93 (YaTeX-setq YaTeX-generate-read-prompt-message 24.94 "4.では、あとでこれらの文字列を読み込む時に、どういうプロンプトを 24.95 @@ -95,8 +85,7 @@ 24.96 さっきの 12pt の部分だったら、『サイズは』とかがおすすめ。" 24.97 "4.When you use this add-in function afterwards, what message 24.98 do you like to be prompted with to enter these values. In last 24.99 -example `12pt', typical prompt string may be `Size?: '." 24.100 -) 24.101 +example `12pt', typical prompt string may be `Size?: '.") 24.102 24.103 (YaTeX-setq YaTeX-generate-done-message 24.104 "よし! これが、君の作りたかった関数だ。~/.emacs にでも入れてせいぜい 24.105 @@ -109,34 +98,29 @@ 24.106 for testing of this function please. 24.107 But you can see this function quite easy, can't you? You had better 24.108 write your most favorite add-in function yourself! 24.109 -" 24.110 -) 24.111 +") 24.112 24.113 (YaTeX-setq YaTeX-generate-nomatch-message 24.114 "こらこら、そんな文字列どこにもねーぞ!!" 24.115 - "No such string in additional string." 24.116 -) 24.117 + "No such string in additional string.") 24.118 + 24.119 (YaTeX-setq YaTeX-generate-buffer 24.120 "*付加関数生成バッファ*" 24.121 - "*Generate-add-in-function*" 24.122 -) 24.123 + "*Generate-add-in-function*") 24.124 24.125 (YaTeX-setq YaTeX-generate-message-buffer 24.126 "*ご案内*" 24.127 - "*Guide*" 24.128 -) 24.129 + "*Guide*") 24.130 24.131 (YaTeX-setq YaTeX-generate-bug-message 24.132 "ごめ〜ん!! ちょっと、このアドイン関数つくるの失敗しちゃったみたい!! 24.133 作者まで連絡してくださ〜〜〜い!" 24.134 "Sorry I failed to make add-in function for you... 24.135 -Send bug report to me." 24.136 -) 24.137 +Send bug report to me.") 24.138 24.139 (YaTeX-setq YaTeX-generate-narrow-message 24.140 "画面がせますぎるような気がします。" 24.141 - "Too narrow screen height." 24.142 -) 24.143 + "Too narrow screen height.") 24.144 24.145 (defvar YaTeX-generate-message-height 24.146 10 "Window height of YaTeX-generate-message-buffer") 24.147 @@ -249,8 +233,7 @@ 24.148 (condition-case error 24.149 (eval-current-buffer) 24.150 (error (insert YaTeX-generate-bug-message))) 24.151 - (pop-to-buffer YaTeX-generate-message-buffer) 24.152 -) 24.153 + (pop-to-buffer YaTeX-generate-message-buffer)) 24.154 24.155 (defun YaTeX-generate-parse-add-in (args add-in) 24.156 "Parse add-in string and extract argument for it. 24.157 @@ -261,7 +244,8 @@ 24.158 func-name (string "")) 24.159 ;;Phase 1. extract argument from add-in string. 24.160 (mapcar 24.161 - '(lambda (arg) 24.162 + (function 24.163 + (lambda (arg) 24.164 (let ((index 0) (match 0) beg end (carg (car arg))) 24.165 (YaTeX-generate-display-message 24.166 YaTeX-generate-read-prompt-message) 24.167 @@ -282,7 +266,7 @@ 24.168 ((YaTeX-generate-ask-match-position) 24.169 (YaTeX-generate-register-match)))) 24.170 (setq index end)) 24.171 - (setq i (1+ i)))) 24.172 + (setq i (1+ i))))) 24.173 args) 24.174 ;;Phase 2. Generate function!! 24.175 (setq i 0) 24.176 @@ -304,17 +288,17 @@ 24.177 "(defun " func-name " ()\n" 24.178 " (let (") 24.179 (mapcar 24.180 - '(lambda (arg) 24.181 + (function 24.182 + (lambda (arg) 24.183 (insert (format "(arg%d (read-string \"%s: \"))\n" 24.184 i (aref prompt (1- i)))) 24.185 - (setq i (1+ i))) 24.186 + (setq i (1+ i)))) 24.187 args) 24.188 (delete-region (point) (progn (forward-line -1) (end-of-line) (point))) 24.189 (insert ")\n(concat " (YaTeX-generate-lisp-quote string) 24.190 ")))\n") 24.191 (indent-region (point-min) (point) nil) 24.192 - used) 24.193 -) 24.194 + used)) 24.195 24.196 (defun YaTeX-generate-ask-match-position () 24.197 "Ask user whether match-position is in his expectation, 24.198 @@ -331,14 +315,12 @@ 24.199 (insert "\n" (if YaTeX-japan "ここにも対応してるの?" 24.200 "this underlined part too?")) 24.201 (other-window -1) 24.202 - (y-or-n-p (if YaTeX-japan "下線部はあってますか" "Is underline right")) 24.203 -) 24.204 + (y-or-n-p (if YaTeX-japan "下線部はあってますか" "Is underline right"))) 24.205 24.206 (defun YaTeX-generate-register-match () 24.207 (nconc arg (list (list beg end))) 24.208 (let ((x beg)) 24.209 - (while (< x end) (aset used x i)(setq x (1+ x)))) 24.210 -) 24.211 + (while (< x end) (aset used x i)(setq x (1+ x))))) 24.212 24.213 (defun YaTeX-generate-display-message (mes &optional bottom) 24.214 "Display message to generation buffer." 24.215 @@ -347,8 +329,7 @@ 24.216 (insert "\n\n") 24.217 (if bottom (recenter (1- bottom)) (recenter 0)) 24.218 (insert mes) 24.219 - (other-window -1) 24.220 -) 24.221 + (other-window -1)) 24.222 24.223 (defun YaTeX-generate-move-to-add-in-position () 24.224 "Move cursor where add-in function should insert string." 24.225 @@ -366,9 +347,7 @@ 24.226 ((eq YaTeX-current-completion-type 'maketitle) 24.227 (goto-char (point-max)) 24.228 (if (= (preceding-char) ? ) 24.229 - (forward-char -1))) 24.230 - ) 24.231 -) 24.232 + (forward-char -1))))) 24.233 24.234 (defun YaTeX-generate-function-name () 24.235 (concat 24.236 @@ -376,8 +355,7 @@ 24.237 (cond 24.238 ((eq YaTeX-current-completion-type 'begin) YaTeX-env-name) 24.239 ((eq YaTeX-current-completion-type 'section) YaTeX-section-name) 24.240 - ((eq YaTeX-current-completion-type 'maketitle) YaTeX-single-command))) 24.241 -) 24.242 + ((eq YaTeX-current-completion-type 'maketitle) YaTeX-single-command)))) 24.243 24.244 (defun YaTeX-generate-lisp-quote (str) 24.245 (let ((len (length str))(i 0) (quote "")) 24.246 @@ -388,8 +366,7 @@ 24.247 (setq quote (concat quote "\"")) 24.248 (setq quote (concat quote (substring str i (1+ i))))) 24.249 (setq i (1+ i))) 24.250 - quote) 24.251 -) 24.252 + quote)) 24.253 24.254 (defun YaTeX-generate-quote-quote (str) 24.255 (let ((len (length str))(i 0) (quote "")) 24.256 @@ -398,15 +375,13 @@ 24.257 (setq quote (concat quote (char-to-string 127)))) 24.258 (setq quote (concat quote (substring str i (1+ i)))) 24.259 (setq i (1+ i))) 24.260 - quote) 24.261 -) 24.262 + quote)) 24.263 24.264 (defun YaTeX-suppress-sparse-keymap (map) 24.265 (let ((i ? )) 24.266 (while (< i 127) 24.267 (define-key map (char-to-string i) 'undefined) 24.268 - (setq i (1+ i)))) 24.269 -) 24.270 + (setq i (1+ i))))) 24.271 24.272 ;;; 24.273 ;; Auto-generate Function for Lispers. 24.274 @@ -423,8 +398,8 @@ 24.275 ((= c ?p) 'oneof) 24.276 ((= c ?o) 'coord) 24.277 ;;((= c ?m) 'macro) 24.278 - (t 'quit))) 24.279 - ) 24.280 + (t 'quit)))) 24.281 + 24.282 (defun YaTeX-generate-read-completion-table () 24.283 (let ((i 1) cand (cands "(") (cb (current-buffer)) 24.284 (buf (get-buffer-create " *Candidates*"))) 24.285 @@ -441,8 +416,8 @@ 24.286 (insert cand "\n")) 24.287 (kill-buffer buf))) 24.288 ;;(set-buffer cb) 24.289 - (setq YaTeX-generate-current-completion-table (concat cands ")"))) 24.290 -) 24.291 + (setq YaTeX-generate-current-completion-table (concat cands ")")))) 24.292 + 24.293 (defun YaTeX-generate-corresponding-paren (left) 24.294 (cond 24.295 ((equal left "{") "}") 24.296 @@ -450,16 +425,16 @@ 24.297 ((equal left "(") ")") 24.298 ((equal left "<") ">") 24.299 ((equal left "\\begin{") "}") 24.300 - (t left)) 24.301 -) 24.302 + (t left))) 24.303 + 24.304 (defun YaTeX-generate-create-read-string (&optional nth) 24.305 (concat 24.306 "(read-string \"" 24.307 (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) 24.308 ": \"\n" 24.309 "\"" (read-string "Default: ") "\"" 24.310 - ")\n") 24.311 -) 24.312 + ")\n")) 24.313 + 24.314 (defun YaTeX-generate-create-completing-read (&optional nth) 24.315 (prog1 24.316 (concat 24.317 @@ -475,21 +450,21 @@ 24.318 (cons 24.319 (cons (format "YaTeX-%s-%d" command (or nth 0)) 24.320 YaTeX-generate-current-completion-table) 24.321 - YaTeX-generate-variables-for-learning)))) 24.322 -) 24.323 + YaTeX-generate-variables-for-learning))))) 24.324 + 24.325 (defun YaTeX-generate-create-read-file-name (&optional nth) 24.326 (concat 24.327 "(read-file-name \"" 24.328 (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) 24.329 - ": \" "" \"\" t \"\")\n") 24.330 -) 24.331 + ": \" "" \"\" t \"\")\n")) 24.332 + 24.333 (defun YaTeX-generate-create-read-oneof (&optional nth readpos) 24.334 (concat 24.335 (if readpos 24.336 "(YaTeX:read-position \"" 24.337 "(YaTeX:read-oneof \"") 24.338 - (read-string "Acceptable characters: " "lcr") "\")\n") 24.339 -) 24.340 + (read-string "Acceptable characters: " "lcr") "\")\n")) 24.341 + 24.342 (defun YaTeX-generate-option-type (command) 24.343 (let ((func (format "YaTeX:%s" command)) leftp 24.344 (buf (get-buffer-create YaTeX-generate-buffer)) type (n 1)) 24.345 @@ -546,8 +521,8 @@ 24.346 (goto-char (point-min)) 24.347 (while (not (eobp)) (lisp-indent-line) (forward-line 1)) 24.348 (eval-current-buffer) 24.349 - buf) 24.350 -) 24.351 + buf)) 24.352 + 24.353 (defun YaTeX-generate-argument-type (command argc) 24.354 "Create an argument-type add-in function." 24.355 (interactive) 24.356 @@ -581,8 +556,8 @@ 24.357 (YaTeX-update-table 24.358 (if (> argc 1) (list command argc) (list command)) 24.359 'section-table 'user-section-table 'tmp-section-table) 24.360 - buf) 24.361 -) 24.362 + buf)) 24.363 + 24.364 (defun YaTeX-generate-simple (&optional command) 24.365 "Simple but requiring some elisp knowledge add-in generator." 24.366 (interactive) 24.367 @@ -607,6 +582,6 @@ 24.368 (YaTeX-generate-option-type command) 24.369 (YaTeX-generate-argument-type 24.370 command 24.371 - (string-to-int (read-string "How many arguments?: ")))) nil) 24.372 -) 24.373 + (string-to-int (read-string "How many arguments?: ")))) nil)) 24.374 + 24.375 (provide 'yatexgen)
25.1 --- a/yatexhie.el Mon May 14 19:59:12 2012 +0900 25.2 +++ b/yatexhie.el Sun Jul 12 14:21:20 2015 +0900 25.3 @@ -1,10 +1,10 @@ 25.4 -;;; -*- Emacs-Lisp -*- 25.5 -;;; YaTeX hierarchy browser. 25.6 -;;; yatexhie.el 25.7 -;;; (c)1995-2012 by HIROSE Yuuji [yuuji@yatex.org] 25.8 -;;; Last modified Mon Jan 9 20:19:06 2012 on firestorm 25.9 +;;; yatexhie.el --- YaTeX hierarchy browser 25.10 +;;; 25.11 +;;; (c)1995-2013 by HIROSE Yuuji [yuuji@yatex.org] 25.12 +;;; Last modified Sun Dec 21 14:05:20 2014 on firestorm 25.13 ;;; $Id$ 25.14 25.15 +;;; Code: 25.16 ;; ----- Customizable variables ----- 25.17 (defvar YaTeX-hierarchy-ignore-heading-regexp 25.18 "\\$[A-Z][a-z]+: .* \\$\\|-\\*- .* -\\*-" 25.19 @@ -75,8 +75,9 @@ 25.20 (YaTeX-get-builtin "!") 25.21 (setq YaTeX-parent-file parent)))) 25.22 (cons (buffer-file-name (current-buffer)) 25.23 - (mapcar '(lambda (f) ;return value 25.24 - (YaTeX-document-hierarchy f basedir)) 25.25 + (mapcar (function ;return value 25.26 + (lambda (f) 25.27 + (YaTeX-document-hierarchy f basedir))) 25.28 (YaTeX-all-included-files)))))) 25.29 (message "Parsing [%s]...done" (file-name-nondirectory file)))) 25.30
26.1 --- a/yatexhks.el Mon May 14 19:59:12 2012 +0900 26.2 +++ b/yatexhks.el Sun Jul 12 14:21:20 2015 +0900 26.3 @@ -13,41 +13,56 @@ 26.4 ;;97/1/27 26.5 (define-key YaTeX-user-extensional-map "v" 'YaTeX-section-overview) 26.6 ;;initial version 26.7 -(define-key YaTeX-user-extensional-map "0" 26.8 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "part"))) 26.9 -(define-key YaTeX-user-extensional-map "1" 26.10 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "chapter"))) 26.11 -(define-key YaTeX-user-extensional-map "2" 26.12 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "section"))) 26.13 -(define-key YaTeX-user-extensional-map "3" 26.14 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "subsection"))) 26.15 -(define-key YaTeX-user-extensional-map "4" 26.16 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "subsubsection"))) 26.17 -(define-key YaTeX-user-extensional-map "5" 26.18 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "paragraph"))) 26.19 -(define-key YaTeX-user-extensional-map "6" 26.20 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "subparagraph"))) 26.21 -(define-key YaTeX-user-extensional-map "r" 26.22 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "ref"))) 26.23 -(define-key YaTeX-user-extensional-map "i" 26.24 - '(lambda () (interactive) (YaTeX-make-singlecmd "item"))) 26.25 -(define-key YaTeX-user-extensional-map "\C-b" 26.26 - '(lambda () (interactive) (YaTeX-make-singlecmd "leftarrow"))) 26.27 -(define-key YaTeX-user-extensional-map "l" 26.28 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "label"))) 26.29 -(define-key YaTeX-user-extensional-map "f" 26.30 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "frac"))) 26.31 -(define-key YaTeX-user-extensional-map "S" 26.32 - '(lambda () (interactive) (YaTeX-make-section nil nil nil "setlength"))) 26.33 -(define-key YaTeX-user-extensional-map "b" 26.34 - '(lambda () (interactive) (YaTeX-make-fontsize nil "bf"))) 26.35 -(define-key YaTeX-user-extensional-map "I" 'YaTeX-browse-info) 26.36 +(let ((map YaTeX-user-extensional-map)) 26.37 + (define-key map "0" 26.38 + (function (lambda () (interactive) 26.39 + (YaTeX-make-section nil nil nil "part")))) 26.40 + (define-key map "1" 26.41 + (function (lambda () (interactive) 26.42 + (YaTeX-make-section nil nil nil "chapter")))) 26.43 + (define-key map "2" 26.44 + (function (lambda () (interactive) 26.45 + (YaTeX-make-section nil nil nil "section")))) 26.46 + (define-key map "3" 26.47 + (function (lambda () (interactive) 26.48 + (YaTeX-make-section nil nil nil "subsection")))) 26.49 + (define-key map "4" 26.50 + (function (lambda () (interactive) 26.51 + (YaTeX-make-section nil nil nil "subsubsection")))) 26.52 + (define-key map "5" 26.53 + (function (lambda () (interactive) 26.54 + (YaTeX-make-section nil nil nil "paragraph")))) 26.55 + (define-key map "6" 26.56 + (function (lambda () (interactive) 26.57 + (YaTeX-make-section nil nil nil "subparagraph")))) 26.58 + (define-key map "r" 26.59 + (function (lambda () (interactive) 26.60 + (YaTeX-make-section nil nil nil "ref")))) 26.61 + (define-key map "i" 26.62 + (function (lambda () (interactive) 26.63 + (YaTeX-make-singlecmd "item")))) 26.64 + (define-key map "\C-b" 26.65 + (function (lambda () (interactive) 26.66 + (YaTeX-make-singlecmd "leftarrow")))) 26.67 + (define-key map "l" 26.68 + (function (lambda () (interactive) 26.69 + (YaTeX-make-section nil nil nil "label")))) 26.70 + (define-key map "f" 26.71 + (function (lambda () (interactive) 26.72 + (YaTeX-make-section nil nil nil "frac")))) 26.73 + (define-key map "S" 26.74 + (function (lambda () (interactive) 26.75 + (YaTeX-make-section nil nil nil "setlength")))) 26.76 + (define-key map "b" 26.77 + (function (lambda () (interactive) 26.78 + (YaTeX-make-fontsize nil "bf")))) 26.79 + (define-key map "I" 'YaTeX-browse-info)) 26.80 26.81 (defun YaTeX-browse-info () 26.82 - "Browse YaTeX's info" 26.83 - (interactive) 26.84 - (require 'info) 26.85 - (Info-goto-node (if YaTeX-japan "(yatexj)Top" "(yatexe)Top"))) 26.86 + "Browse YaTeX's info" 26.87 + (interactive) 26.88 + (require 'info) 26.89 + (Info-goto-node (if YaTeX-japan "(yatexj)Top" "(yatexe)Top"))) 26.90 26.91 26.92 ;
27.1 --- a/yatexhlp.el Mon May 14 19:59:12 2012 +0900 27.2 +++ b/yatexhlp.el Sun Jul 12 14:21:20 2015 +0900 27.3 @@ -1,10 +1,10 @@ 27.4 -;;; -*- Emacs-Lisp -*- 27.5 -;;; YaTeX helper with LaTeX commands and macros. 27.6 -;;; yatexhlp.el 27.7 -;;; (c)1994,1998,2004 by HIROSE Yuuji.[yuuji@yatex.org] 27.8 -;;; Last modified Tue Oct 19 01:13:21 2004 on firestorm 27.9 +;;; yatexhlp.el --- YaTeX helper for LaTeX -*- coding: sjis -*- 27.10 +;;; 27.11 +;;; (c)1994,1998,2004,2014,2015 by HIROSE Yuuji.[yuuji@yatex.org] 27.12 +;;; Last modified Fri Jan 16 10:31:49 2015 on firestorm 27.13 ;;; $Id$ 27.14 27.15 +;;; Code: 27.16 (let ((help-file (concat "YATEXHLP." 27.17 (cond (YaTeX-japan "jp") 27.18 (t "eng")))) 27.19 @@ -12,8 +12,9 @@ 27.20 (cond 27.21 ((and (boundp 'site-directory) site-directory) site-directory) 27.22 ((string-match "\\.app/" doc-directory) ;For Emacs.app(Darwin) 27.23 - (expand-file-name "../site-lisp" doc-directory)) 27.24 - (YaTeX-emacs-19 (expand-file-name "../../site-lisp" doc-directory)) 27.25 + (expand-file-name "../site-lisp/yatex" doc-directory)) 27.26 + (YaTeX-emacs-19 27.27 + (expand-file-name "../../site-lisp/yatex" doc-directory)) 27.28 (t exec-directory)))) 27.29 (defvar YaTeX-help-file 27.30 (expand-file-name help-file help-dir) 27.31 @@ -45,8 +46,8 @@ 27.32 (setq YaTeX-help-mode-map (make-sparse-keymap)) 27.33 (let ((map YaTeX-help-mode-map)) 27.34 (suppress-keymap map) 27.35 - (define-key map "j" '(lambda () (interactive) (scroll-up 1))) 27.36 - (define-key map "k" '(lambda () (interactive) (scroll-up -1))) 27.37 + (define-key map "j" (function (lambda () (interactive) (scroll-up 1)))) 27.38 + (define-key map "k" (function (lambda () (interactive) (scroll-up -1)))) 27.39 (define-key map "n" 'next-line) 27.40 (define-key map "p" 'previous-line) 27.41 (define-key map " " 'scroll-up) 27.42 @@ -159,7 +160,7 @@ 27.43 (concat "^" (regexp-quote YaTeX-help-delimiter)) nil 1) 27.44 (- (point) (length YaTeX-help-delimiter)))) 27.45 (YaTeX-showup-buffer 27.46 - hbuf (function (lambda (x) (nth 3 (window-edges x)))) t) 27.47 + hbuf 'YaTeX-showup-buffer-bottom-most t) 27.48 (set-buffer hbuf) 27.49 (setq buffer-read-only nil) 27.50 (if append (goto-char (point-max)) (erase-buffer)) 27.51 @@ -226,7 +227,7 @@ 27.52 (let ((buf (get-buffer-create "**Description**")) 27.53 (conf (current-window-configuration))) 27.54 (YaTeX-showup-buffer 27.55 - buf (function (lambda (x) (nth 3 (window-edges x)))) t) 27.56 + buf 'YaTeX-showup-buffer-bottom-most t) 27.57 (make-local-variable 'YaTeX-help-file-current) 27.58 (make-local-variable 'YaTeX-help-command-current) 27.59 (make-local-variable 'YaTeX-help-saved-config) 27.60 @@ -266,8 +267,7 @@ 27.61 (sw (selected-window)) 27.62 (head (concat "^" (regexp-quote YaTeX-help-delimiter))) 27.63 pt command) 27.64 - (YaTeX-showup-buffer 27.65 - ab (function (lambda (x) (nth 3 (window-edges x))))) 27.66 + (YaTeX-showup-buffer ab 'YaTeX-showup-buffer-bottom-most) 27.67 (select-window (get-buffer-window ab)) 27.68 (set-buffer ab) ;assertion 27.69 (setq buffer-read-only nil) 27.70 @@ -302,8 +302,9 @@ 27.71 (message "No matches found."))) 27.72 27.73 ;;;###autoload 27.74 -(defun YaTeX-help () 27.75 - "Show help buffer of LaTeX/TeX commands or macros." 27.76 +(defun YaTeX-help (&optional macro) 27.77 + "Show help buffer of LaTeX/TeX commands or macros. 27.78 +Optional argument MACRO, if supplied, is directly selected to keyword." 27.79 (interactive) 27.80 (let (p beg end command) 27.81 (save-excursion 27.82 @@ -311,6 +312,7 @@ 27.83 (goto-char (match-end 0))) 27.84 (setq p (point)) ;remember current position. 27.85 (cond 27.86 + (macro nil) 27.87 ((YaTeX-on-begin-end-p) 27.88 ;;if on \begin or \end, extract its environment. 27.89 (setq command 27.90 @@ -331,10 +333,11 @@ 27.91 (search-forward "}" (point-end-of-line)) 27.92 (setq command (buffer-substring beg (match-beginning 0))))) 27.93 (setq command 27.94 - (completing-read 27.95 - "Describe (La)TeX command: " 27.96 - YaTeX-help-entries nil nil command)) 27.97 - );end excursion 27.98 + (or macro 27.99 + (completing-read 27.100 + "Describe (La)TeX command: " 27.101 + YaTeX-help-entries nil nil command))));end excursion 27.102 + 27.103 (setq YaTeX-help-saved-config (current-window-configuration)) 27.104 (or (YaTeX-refer-help command YaTeX-help-file) 27.105 (YaTeX-refer-help command YaTeX-help-file-private)
28.1 --- a/yatexinf.el Mon May 14 19:59:12 2012 +0900 28.2 +++ b/yatexinf.el Sun Jul 12 14:21:20 2015 +0900 28.3 @@ -1,8 +1,8 @@ 28.4 -;;; -*- Emacs-Lisp -*- 28.5 -;;; YaTeX interfaces for Texinfo mode. 28.6 -;;; (c)1994-2012 by HIROSE, Yuuji [yuuji@yatex.org] 28.7 -;;; Last modified Mon Jan 9 20:19:55 2012 on firestorm 28.8 +;;; yatexinf.el -- YaTeX interfaces for Texinfo mode 28.9 +;;; (c)1994-2013 by HIROSE, Yuuji [yuuji@yatex.org] 28.10 +;;; Last modified Mon Apr 1 22:43:58 2013 on firestorm 28.11 28.12 +;;; Code: 28.13 (require 'yatex) 28.14 (or (boundp 'texinfo-mode-map) 28.15 (load "texinfo"))
29.1 --- a/yatexlib.el Mon May 14 19:59:12 2012 +0900 29.2 +++ b/yatexlib.el Sun Jul 12 14:21:20 2015 +0900 29.3 @@ -1,10 +1,10 @@ 29.4 -;;; -*- Emacs-Lisp -*- 29.5 -;;; YaTeX and yahtml common libraries, general functions and definitions 29.6 -;;; yatexlib.el 29.7 -;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] 29.8 -;;; Last modified Wed Feb 29 09:49:30 2012 on firestorm 29.9 +;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis -*- 29.10 +;;; 29.11 +;;; (c)1994-2015 by HIROSE Yuuji.[yuuji@yatex.org] 29.12 +;;; Last modified Fri Jan 16 10:32:31 2015 on firestorm 29.13 ;;; $Id$ 29.14 29.15 +;;; Code: 29.16 ;; General variables 29.17 (defvar YaTeX-dos (memq system-type '(ms-dos windows-nt OS/2))) 29.18 (defvar YaTeX-macos (memq system-type '(darwin))) 29.19 @@ -287,8 +287,8 @@ 29.20 (delete-region (point) (progn (forward-sexp) (point))) 29.21 (delete-blank-lines) 29.22 (insert "(setq " name " '(\n") 29.23 - (mapcar '(lambda (s) 29.24 - (insert (format "%s\n" (prin1-to-string s)))) 29.25 + (mapcar (function (lambda (s) 29.26 + (insert (format "%s\n" (prin1-to-string s))))) 29.27 value) 29.28 (insert "))\n\n") 29.29 (delete-blank-lines) 29.30 @@ -481,7 +481,7 @@ 29.31 (defun point-end-of-line () 29.32 (save-excursion (end-of-line)(point))) 29.33 29.34 - 29.35 +(defun YaTeX-showup-buffer-bottom-most (x) (nth 3 (window-edges x))) 29.36 ;;;###autoload 29.37 (defun YaTeX-showup-buffer (buffer &optional func select) 29.38 "Make BUFFER show up in certain window (but current window) 29.39 @@ -514,6 +514,9 @@ 29.40 ;(other-window 1);This does not work properly on Emacs-19 29.41 (select-window (get-lru-window)) 29.42 (switch-to-buffer buffer) 29.43 + (if (< (window-height) (/ YaTeX-default-pop-window-height 2)) 29.44 + (enlarge-window (- YaTeX-default-pop-window-height 29.45 + (window-height)))) 29.46 (or select (select-window window))) 29.47 (t ;if one-window 29.48 (cond 29.49 @@ -729,7 +732,8 @@ 29.50 (if (fboundp 'completing-read-with-history-in) 29.51 (completing-read-with-history-in 29.52 minibuffer-history-symbol prompt table predicate must-match initial) 29.53 - (completing-read prompt table predicate must-match initial)) 29.54 + (save-excursion ;work around to avoid cursor warp 29.55 + (completing-read prompt table predicate must-match initial))) 29.56 (if (and YaTeX-emacs-19 hsym) (set hsym minibuffer-history))))) 29.57 29.58 ;;;###autoload 29.59 @@ -737,7 +741,8 @@ 29.60 "Read from minibuffer with general history: gmhist, Emacs-19." 29.61 (cond 29.62 (YaTeX-emacs-19 29.63 - (read-from-minibuffer prompt init map read hsym)) 29.64 + (save-excursion ;work around to avoid cursor warp 29.65 + (read-from-minibuffer prompt init map read hsym))) 29.66 (t 29.67 (let ((minibuffer-history-symbol hsym)) 29.68 (read-from-minibuffer prompt init map read))))) 29.69 @@ -747,7 +752,8 @@ 29.70 "Read string with history: gmhist(Emacs-18) and Emacs-19." 29.71 (cond 29.72 (YaTeX-emacs-19 29.73 - (read-from-minibuffer prompt init minibuffer-local-map nil hsym)) 29.74 + (save-excursion ;work around to avoid cursor warp 29.75 + (read-from-minibuffer prompt init minibuffer-local-map nil hsym))) 29.76 ((featurep 'gmhist-mh) 29.77 (read-with-history-in hsym prompt init)) 29.78 (t (read-string prompt init)))) 29.79 @@ -755,15 +761,19 @@ 29.80 (defvar YaTeX-skip-next-reader-char ?\C-j) 29.81 (defun YaTeX-read-string-or-skip (&rest args) 29.82 "Read string, or skip if last input char is \C-j." 29.83 - (if (equal last-input-char YaTeX-skip-next-reader-char) 29.84 + (if (equal (if (boundp 'last-input-event) last-input-event last-input-char) 29.85 + YaTeX-skip-next-reader-char) 29.86 "" 29.87 - (apply 'read-string args))) 29.88 + (save-excursion ;work around to avoid cursor warp 29.89 + (apply 'read-string args)))) 29.90 29.91 (defun YaTeX-completing-read-or-skip (&rest args) 29.92 "Do completing-read, or skip if last input char is \C-j." 29.93 - (if (equal last-input-char YaTeX-skip-next-reader-char) 29.94 + (if (equal (if (boundp 'last-input-event) last-input-event last-input-char) 29.95 + YaTeX-skip-next-reader-char) 29.96 "" 29.97 - (apply 'completing-read args))) 29.98 + (save-excursion ;work around to avoid cursor warp 29.99 + (apply 'completing-read args)))) 29.100 29.101 ;;;###autoload 29.102 (fset 'YaTeX-rassoc 29.103 @@ -778,6 +788,25 @@ 29.104 (throw 'found (car l))) 29.105 (setq l (cdr l))))))))) 29.106 29.107 +(defun YaTeX-set-file-coding-system (code coding) 29.108 + "Set current buffer's coding system according to symbol." 29.109 + (cond ((null code) 29.110 + nil) 29.111 + ((boundp 'MULE) 29.112 + (set-file-coding-system coding)) 29.113 + ((and YaTeX-emacs-20 (boundp 'buffer-file-coding-system)) 29.114 + (setq buffer-file-coding-system 29.115 + (or (and (fboundp 'set-auto-coding) buffer-file-name 29.116 + (save-excursion 29.117 + (goto-char (point-min)) 29.118 + (set-auto-coding buffer-file-name (buffer-size)))) 29.119 + coding))) 29.120 + ((featurep 'mule) 29.121 + (set-file-coding-system coding)) 29.122 + ((boundp 'NEMACS) 29.123 + (make-local-variable 'kanji-fileio-code) 29.124 + (setq kanji-fileio-code code)))) 29.125 + 29.126 (defun YaTeX-insert-file-contents (file visit &optional beg end) 29.127 (cond 29.128 ((and (string< "19" emacs-version) (not (featurep 'xemacs))) 29.129 @@ -839,11 +868,18 @@ 29.130 ;; Interface function for windows.el 29.131 ;;; 29.132 ;;;###autoload 29.133 +(fset 'YaTeX-last-key 29.134 + (if (fboundp 'win:last-key) 29.135 + 'win:last-key 29.136 + (function (lambda () (if (boundp 'last-command-char) 29.137 + last-command-char 29.138 + last-command-event))))) 29.139 (defun YaTeX-switch-to-window () 29.140 "Switch to windows.el's window decided by last pressed key." 29.141 (interactive) 29.142 (or (featurep 'windows) (error "Why don't you use `windows.el'?")) 29.143 - (win-switch-to-window 1 (- last-command-char win:base-key))) 29.144 + (win-switch-to-window 1 (- (YaTeX-last-key) win:base-key))) 29.145 + 29.146 29.147 ;;;###autoload 29.148 (defun YaTeX-command-to-string (cmd) 29.149 @@ -860,6 +896,19 @@ 29.150 (buffer-string)) 29.151 (kill-buffer tbuf)))))) 29.152 29.153 +;;; (defun YaTeX-executable-find(cmd)...) 29.154 +(fset 'YaTeX-executable-find 29.155 + (if (fboundp 'executable-find) 29.156 + 'executable-find 29.157 + (function (lambda (cmd) 29.158 + (let ((list exec-path) path) 29.159 + (catch 'exec 29.160 + (while list 29.161 + (if (file-executable-p 29.162 + (setq path (expand-file-name cmd (car list)))) 29.163 + (throw 'exec path)) 29.164 + (setq list (cdr list))))))))) 29.165 + 29.166 ;;;###autoload 29.167 (defun YaTeX-reindent (col) 29.168 "Remove current indentation and reindento to COL column." 29.169 @@ -930,6 +979,64 @@ 29.170 (progn (skip-chars-forward open) (1+ (point))) 29.171 (progn (skip-chars-forward close) (point))))))) 29.172 29.173 +(defun YaTeX-in-environment-p (env) 29.174 + "Return if current LaTeX environment is ENV. 29.175 +ENV is given in the form of environment's name or its list." 29.176 + (let ((md (match-data)) (nest 0) p envrx) 29.177 + (cond 29.178 + ((atom env) 29.179 + (setq envrx 29.180 + (concat "\\(" 29.181 + (regexp-quote 29.182 + (YaTeX-replace-format-args 29.183 + YaTeX-struct-begin env "" "")) 29.184 + "\\>\\)\\|\\(" 29.185 + (regexp-quote 29.186 + (YaTeX-replace-format-args 29.187 + YaTeX-struct-end env "" "")) 29.188 + "\\)")) 29.189 + (save-excursion 29.190 + (setq p (catch 'open 29.191 + (while (YaTeX-re-search-active-backward 29.192 + envrx YaTeX-comment-prefix nil t) 29.193 + (if (match-beginning 2) 29.194 + (setq nest (1+ nest)) 29.195 + (setq nest (1- nest))) 29.196 + (if (< nest 0) 29.197 + (throw 'open (cons env (match-beginning 0))))))))) 29.198 + ((listp env) 29.199 + (setq p 29.200 + (or (YaTeX-in-environment-p (car env)) 29.201 + (and (cdr env) (YaTeX-in-environment-p (cdr env))))))) 29.202 + (store-match-data md) 29.203 + p;(or p (YaTeX-in-verb-p (match-beginning 0))) 29.204 + )) 29.205 + 29.206 +(defun YaTeX-quick-in-environment-p (env) 29.207 + "Check quickly but unsure if current environment is ENV. 29.208 +ENV is given in the form of environment's name or its list. 29.209 +This function returns correct result only if ENV is NOT nested." 29.210 + (save-excursion 29.211 + (let ((md (match-data)) m0 (p (point)) rc clfound) 29.212 + (cond 29.213 + ((listp env) 29.214 + (or (YaTeX-quick-in-environment-p (car env)) 29.215 + (and (cdr env) (YaTeX-quick-in-environment-p (cdr env))))) 29.216 + (t 29.217 + (unwind-protect 29.218 + (if (prog1 29.219 + (YaTeX-search-active-backward 29.220 + (YaTeX-replace-format-args YaTeX-struct-begin env "" "") 29.221 + YaTeX-comment-prefix nil t) 29.222 + (setq m0 (match-beginning 0))) 29.223 + (if (YaTeX-search-active-forward 29.224 + (YaTeX-replace-format-args 29.225 + YaTeX-struct-end env) 29.226 + YaTeX-comment-prefix p t nil) 29.227 + nil ;if \end{env} found, return nil 29.228 + (cons env m0))) ;else, return meaningful values 29.229 + (store-match-data md))))))) 29.230 + 29.231 (defun YaTeX-goto-corresponding-environment (&optional allow-mismatch noerr) 29.232 "Go to corresponding begin/end enclosure. 29.233 Optional argument ALLOW-MISMATCH allows mismatch open/clese. Use this 29.234 @@ -1075,7 +1182,7 @@ 29.235 (goto-char curp) 29.236 (error "Cannot found the end of current environment.")) 29.237 (YaTeX-goto-corresponding-environment) 29.238 - (beginning-of-line) ;for confirmation 29.239 + ;;(beginning-of-line) ;for confirmation ;OUT 2015/1/4 29.240 (if (< curp (point)) 29.241 (progn 29.242 (message "Mark this environment?(y or n): ") 29.243 @@ -1084,8 +1191,10 @@ 29.244 (error "Abort. Please call again at more proper position.")))) 29.245 (set-mark-command nil) 29.246 (YaTeX-goto-corresponding-environment) 29.247 - (end-of-line) 29.248 - (if (eobp) nil (forward-char 1)))))) 29.249 + (goto-char (match-end 0)) 29.250 + ;;(end-of-line) ;OUT 2015/1/5 29.251 + ;;(if (eobp) nil (forward-char 1)) ;OUT 2015/1/5 29.252 + )))) 29.253 29.254 (defun YaTeX-kill-buffer (buffer) 29.255 "Make effort to show parent buffer after kill." 29.256 @@ -1253,6 +1362,9 @@ 29.257 'buffer-substring-no-properties 29.258 'buffer-substring)) 29.259 29.260 +(defun YaTeX-region-active-p () 29.261 + (and (fboundp 'region-active-p) (region-active-p))) 29.262 + 29.263 ;;; 29.264 ;; hilit19 vs. font-lock 29.265 ;;; 29.266 @@ -1384,7 +1496,7 @@ 29.267 '((((class static-color)) (:bold t)) 29.268 (((type tty)) (:bold t)) 29.269 (((class color) (background dark)) (:foreground "khaki" :bold t)) 29.270 - (((class color) (background light)) (:foreground "Goldenrod")) 29.271 + (((class color) (background light)) (:foreground "DarkGoldenrod4")) 29.272 (t (:bold t :underline t))) 29.273 "Font Lock mode face used to highlight formula." 29.274 :group 'font-lock-faces) 29.275 @@ -1394,7 +1506,7 @@ 29.276 '((((class static-color)) (:bold t)) 29.277 (((type tty)) (:bold t)) 29.278 (((class color) (background dark)) 29.279 - (:foreground "saddlebrown" :background "ivory" :bold t)) 29.280 + (:foreground "lightyellow3" :background "navy" :bold t)) 29.281 (((class color) (background light)) (:foreground "red")) 29.282 (t (:bold t :underline t))) 29.283 "Font Lock mode face used to highlight delimiters." 29.284 @@ -1407,7 +1519,7 @@ 29.285 (((class color) (background dark)) 29.286 (:foreground "khaki" :bold t :underline t)) 29.287 (((class color) (background light)) 29.288 - (:foreground "Goldenrod" :underline t)) 29.289 + (:foreground "DarkGoldenrod4" :underline t)) 29.290 (t (:bold t :underline t))) 29.291 "Font Lock mode face used to highlight subscripts in formula." 29.292 :group 'font-lock-faces) 29.293 @@ -1419,7 +1531,7 @@ 29.294 (((class color) (background dark)) 29.295 (:bold nil :foreground "ivory" :background "lightyellow4")) 29.296 (((class color) (background light)) 29.297 - (:underline t :foreground "gold")) 29.298 + (:underline t :foreground "DarkGoldenrod3")) 29.299 (t (:bold t :underline t))) 29.300 "Font Lock mode face used to highlight superscripts in formula." 29.301 :group 'font-lock-faces) 29.302 @@ -1455,9 +1567,10 @@ 29.303 (face-font 'bold) 29.304 "giveup!")) 29.305 sz medium-i bold-r) 29.306 - (string-match 29.307 - "^-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\(\\([0-9]+\\)\\)" df) 29.308 - (setq sz (or (match-string 1 df) "16")) 29.309 + (if (string-match 29.310 + "^-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-[^-]*-\\(\\([0-9]+\\)\\)" df) 29.311 + (setq sz (or (match-string 1 df) "16")) 29.312 + (setq sz "16")) 29.313 (setq medium-i (format "-medium-i-[^-]+--%s" sz) 29.314 bold-r (format "-bold-r-[^-]+--%s" sz)) 29.315 (while flist
30.1 --- a/yatexm-o.el Mon May 14 19:59:12 2012 +0900 30.2 +++ b/yatexm-o.el Sun Jul 12 14:21:20 2015 +0900 30.3 @@ -1,8 +1,9 @@ 30.4 -;;; -*- Emacs-Lisp -*- 30.5 -;;; Sample startup file to invoke yatex-mode with outline-minor mode. 30.6 +;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode 30.7 + 30.8 ;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org] 30.9 -;;; Last modified Fri Jun 27 12:10:15 2003 on firestorm 30.10 +;;; Last modified Sun Dec 21 14:15:47 2014 on firestorm 30.11 30.12 +;;; Code: 30.13 ;;; 30.14 ;; outline-minor-mode(使用しない場合は不要です) 30.15 ;;; 30.16 @@ -25,12 +26,14 @@ 30.17 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) 30.18 ;;↓min-outを使用しない場合、;;@ の行は不要です。 30.19 (defvar yatex-mode-hook 30.20 - '(lambda () 30.21 + (function 30.22 + (lambda () 30.23 (setq outline-regexp LaTeX-outline-regexp) ;;@ 30.24 (outline-minor-mode 1) ;;@ 30.25 - )) 30.26 + ))) 30.27 (defvar yatex-mode-load-hook 30.28 - '(lambda () 30.29 + (function 30.30 + (lambda () 30.31 (setq-default outline-prefix-char (concat YaTeX-prefix "\C-o"));;@ 30.32 (require 'min-out) ;;@ 30.33 ;;auctex 付属の min-out.el の場合これ↓ 30.34 @@ -38,4 +41,4 @@ 30.35 ;;Emacs 付属の outline.el の場合これ↓ 30.36 (define-key outline-mode-prefix-map "\C-?" 'hide-subtree) 30.37 (YaTeX-define-begend-key "ba" "abstract") 30.38 - )) 30.39 + )))
31.1 --- a/yatexmth.el Mon May 14 19:59:12 2012 +0900 31.2 +++ b/yatexmth.el Sun Jul 12 14:21:20 2015 +0900 31.3 @@ -1,10 +1,10 @@ 31.4 -;;; -*- Emacs-Lisp -*- 31.5 -;;; YaTeX math-mode-specific functions. 31.6 -;;; yatexmth.el 31.7 -;;; (c)1993-2012 by HIROSE Yuuji [yuuji@yatex.org] 31.8 -;;; Last modified Tue Jan 24 08:58:56 2012 on firestorm 31.9 +;;; yatexmth.el --- YaTeX math-mode-specific functions -*- coding: sjis -*- 31.10 +;;; 31.11 +;;; (c)1993-2015 by HIROSE Yuuji [yuuji@yatex.org] 31.12 +;;; Last modified Sun Jul 12 10:02:36 2015 on firestorm 31.13 ;;; $Id$ 31.14 31.15 +;;; Commentary: 31.16 ;;; [Customization guide] 31.17 ;;; 31.18 ;;; By default, you can use two completion groups in YaTeX math 31.19 @@ -84,6 +84,7 @@ 31.20 ;;; これらを ~/.emacs に書いておけば、math-mode で自分専用のイメージ 31.21 ;;; 補完が利用できます。 31.22 31.23 +;;; Code: 31.24 (defvar YaTeX-jisold 31.25 (and (boundp 'dos-machine-type) 31.26 (eq dos-machine-type 'pc98))) 31.27 @@ -309,6 +310,8 @@ 31.28 ("[]" "Box" "[]") 31.29 ("no" "notag" "\\notag") 31.30 (":" "colon" ":") 31.31 + (".'." "therefore" (".'." "∴")) 31.32 + ("'.'" "because" ("'.'" "∵")) 31.33 ("Diamond" "Diamond" "/\\\n\\/") 31.34 ("3" "triangle" "/\\\n~~") 31.35 ("C" "clubsuit" " o\no+o\n |") 31.36 @@ -450,7 +453,7 @@ 31.37 ;;; 31.38 ;;YaTeX math-mode functions 31.39 ;;; 31.40 -;;;###autoload from yatex.el 31.41 +;;;###autoload 31.42 (defun YaTeX-toggle-math-mode (&optional arg) 31.43 (interactive "P") 31.44 (or (memq 'YaTeX-math-mode mode-line-format) nil 31.45 @@ -657,7 +660,6 @@ 31.46 (kill-buffer YaTeX-math-menu-buffer)) 31.47 command))) 31.48 31.49 -; 31.50 (defun YaTeX-math-show-image (image &optional exit-char) 31.51 "Momentarily display IMAGE at the beginning of the next line; 31.52 erase it on the next keystroke. The window is recentered if necessary 31.53 @@ -687,7 +689,9 @@ 31.54 2)))) 31.55 (let ((char (read-char))) 31.56 (or (eq char exit-char) 31.57 - (setq unread-command-char char)))) 31.58 + (if (boundp 'unread-command-events) 31.59 + (setq unread-command-events (list char)) 31.60 + (setq unread-command-char char))))) 31.61 (if insert-end 31.62 (save-excursion 31.63 (delete-region insert-start insert-end))) 31.64 @@ -699,7 +703,7 @@ 31.65 (interactive "P") 31.66 (let*((key (or initial "")) regkey str last-char list i 31.67 (case-fold-search nil) match sign 31.68 - (this-key (char-to-string last-command-char)) 31.69 + (this-key (char-to-string (YaTeX-last-key))) 31.70 (alistsym (cdr (assoc this-key YaTeX-math-key-list))) 31.71 (alistname (symbol-name alistsym)) 31.72 (alist (symbol-value alistsym)) 31.73 @@ -779,7 +783,9 @@ 31.74 (cond 31.75 ((memq result '(t select)) 31.76 (if (eq result t) 31.77 - (setq unread-command-char last-char) 31.78 + (if (boundp 'unread-command-events) 31.79 + (setq unread-command-events (list last-char)) 31.80 + (setq unread-command-char last-char)) 31.81 (message "Done.")) 31.82 (if (assoc YaTeX-single-command section-table) 31.83 (YaTeX-make-section nil nil nil YaTeX-single-command)
32.1 --- a/yatexpkg.el Mon May 14 19:59:12 2012 +0900 32.2 +++ b/yatexpkg.el Sun Jul 12 14:21:20 2015 +0900 32.3 @@ -1,10 +1,10 @@ 32.4 -;;; -*- Emacs-Lisp -*- 32.5 -;;; YaTeX package manager 32.6 -;;; yatexpkg.el 32.7 -;;; (c)2003-2012 by HIROSE, Yuuji [yuuji@yatex.org] 32.8 -;;; Last modified Mon Jan 9 20:13:53 2012 on firestorm 32.9 +;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 32.10 +;;; 32.11 +;;; (c)2003-2015 by HIROSE, Yuuji [yuuji@yatex.org] 32.12 +;;; Last modified Fri Feb 13 22:45:46 2015 on firestorm 32.13 ;;; $Id$ 32.14 32.15 +;;; Code: 32.16 (defvar YaTeX-package-ams-envs 32.17 (mapcar 'car YaTeX-ams-env-table)) 32.18 32.19 @@ -32,16 +32,26 @@ 32.20 ("amsmath" (env . YaTeX-package-ams-envs) 32.21 (section "tag" "tag*")) 32.22 ("amssymb" (maketitle "leqq" "geqq" "mathbb" "mathfrak" 32.23 - "fallingdotseq" 32.24 + "fallingdotseq" "therefore" "because" 32.25 "lll" "ggg")) ;very few. Please tell us! 32.26 ("graphicx" (section "includegraphics" 32.27 "rotatebox" "scalebox" "resizebox" "reflectbox") 32.28 (option . YaTeX-package-graphics-driver-alist)) 32.29 ("color" (section "textcolor" "colorbox" "pagecolor" "color") 32.30 - (option . YaTeX-package-graphics-driver-alist)) 32.31 + (option . YaTeX-package-graphics-driver-alist) 32.32 + (default-option . "usenames,dvipsnames")) 32.33 + ("xcolor" (same-as . "color")) 32.34 ("ulem" (section "uline" "uuline" "uwave") 32.35 (option ("normalem"))) 32.36 - ("multicol" (env "multicols"))) 32.37 + ("multicol" (env "multicols")) 32.38 + ("cref" (section "cleveref")) 32.39 + ("crefrange" (same-as . "cref")) 32.40 + ("cpageref" (same-as . "cref")) 32.41 + ("labelcref" (same-as . "cref")) 32.42 + ("labelcpageref" (same-as . "cref")) 32.43 + ("wrapfig" (env "wrapfigure" "wraptable")) 32.44 + ("setspace" (env "spacing") (section "setstretch")) 32.45 + ) 32.46 "Default package vs. macro list. 32.47 Alists contains '(PACKAGENAME . MACROLIST) 32.48 PACKAGENAME Basename of package(String). 32.49 @@ -55,7 +65,8 @@ 32.50 An good example is the value of YaTeX-package-alist-default.") 32.51 32.52 (defvar YaTeX-package-graphics-driver-alist 32.53 - '(("dvips") ("xdvi") ("dvipdf") ("pdftex") ("dvipsone") ("dviwindo") 32.54 + '(("dvips") ("dvipsnames") ("usenames") 32.55 + ("xdvi") ("dvipdfmx") ("pdftex") ("dvipsone") ("dviwindo") 32.56 ("emtex") ("dviwin") ("oztex") ("textures") ("pctexps") ("pctexwin") 32.57 ("pctexhp") ("pctex32") ("truetex") ("tcidvi") ("vtex")) 32.58 "Drivers alist of graphics/color stylefile's supporting deveces. 32.59 @@ -72,11 +83,14 @@ 32.60 Optional second argument TYPE limits the macro type. 32.61 TYPE is a symbol, one of 'env, 'section, 'maketitle." 32.62 (let ((list (append YaTeX-package-alist-private YaTeX-package-alist-default)) 32.63 - element x val pkg pkglist r) 32.64 + origlist element x sameas val pkg pkglist r) 32.65 + (setq origlist list) 32.66 (while list 32.67 (setq element (car list) 32.68 pkg (car element) 32.69 element (cdr element)) 32.70 + (if (setq sameas (assq 'same-as element)) ;non-recursive retrieval 32.71 + (setq element (cdr (assoc (cdr sameas) origlist)))) 32.72 (if (setq r (catch 'found 32.73 (while element 32.74 (setq x (car element) 32.75 @@ -91,20 +105,26 @@ 32.76 (setq list (cdr list))) 32.77 pkglist)) 32.78 32.79 -(defun YaTeX-package-option-lookup (pkg) 32.80 +(defun YaTeX-package-option-lookup (pkg &optional key) 32.81 "Look up options for specified pkg and returne them in alist form. 32.82 -Just only accocing against the alist of YaTeX-package-alist-*" 32.83 - (let ((l (cdr (assq 'option 32.84 - (assoc pkg (append YaTeX-package-alist-private 32.85 - YaTeX-package-alist-default)))))) 32.86 - (if (symbolp l) (symbol-value l) l))) 32.87 +Just only associng against the alist of YaTeX-package-alist-*" 32.88 + (let*((list (append YaTeX-package-alist-private YaTeX-package-alist-default)) 32.89 + (l (cdr (assq (or key 'option) (assoc pkg list)))) 32.90 + (recur (cdr (assq 'same-as (assoc pkg list))))) 32.91 + (cond 32.92 + (recur (YaTeX-package-option-lookup recur key)) 32.93 + ((symbolp l) (symbol-value l)) 32.94 + (t l)))) 32.95 32.96 (defvar YaTeX-package-resolved-list nil 32.97 "List of macros whose package is confirmed to be loaded.") 32.98 32.99 -(defun YaTeX-package-auto-usepackage (macro type) 32.100 +(defun YaTeX-package-auto-usepackage (macro type &optional autopkg autoopt) 32.101 "(Semi)Automatically add the \\usepackage line to main-file. 32.102 -Search the usepackage for MACRO of the TYPE." 32.103 +Search the usepackage for MACRO of the TYPE. 32.104 +Optional second and third argument AUTOPKG, AUTOOPT are selected 32.105 +without query. Thus those two argument (Full)automatically add 32.106 +a \\usepackage line." 32.107 (let ((cb (current-buffer)) 32.108 (wc (current-window-configuration)) 32.109 (usepackage (concat YaTeX-ec "usepackage")) 32.110 @@ -112,9 +132,10 @@ 32.111 (usepkgrx (concat 32.112 YaTeX-ec-regexp 32.113 "\\(usepackage\\|include\\)\\b")) 32.114 - (register '(lambda () (set-buffer cb) 32.115 + (register (function 32.116 + (lambda () (set-buffer cb) 32.117 (set (make-local-variable 'YaTeX-package-resolved-list) 32.118 - (cons macro YaTeX-package-resolved-list)))) 32.119 + (cons macro YaTeX-package-resolved-list))))) 32.120 (begdoc (concat YaTeX-ec "begin{document}")) 32.121 pb pkg optlist (option "") mb0 uspkgargs) 32.122 (if (or (YaTeX-member macro YaTeX-package-resolved-list) 32.123 @@ -154,29 +175,38 @@ 32.124 ;;corresponding \usepackage found 32.125 (funcall register) 32.126 ;; not found, insert it. 32.127 - (if (y-or-n-p 32.128 - (format "`%s' requires package. Put \\usepackage now?" macro)) 32.129 + (if (or 32.130 + autopkg 32.131 + (y-or-n-p 32.132 + (format "`%s' requires package. Put \\usepackage now?" 32.133 + macro))) 32.134 (progn 32.135 (require 'yatexadd) 32.136 (setq pkg 32.137 - (completing-read 32.138 - "Load which package?(TAB for list): " 32.139 - pkglist nil nil 32.140 - ;;initial input 32.141 - (if (= (length pkglist) 1) 32.142 - (let ((w (car (car pkglist)))) 32.143 - (if YaTeX-emacs-19 (cons w 0) w)))) 32.144 + (or autopkg 32.145 + (completing-read 32.146 + "Load which package?(TAB for list): " 32.147 + pkglist nil nil 32.148 + ;;initial input 32.149 + (if (= (length pkglist) 1) 32.150 + (let ((w (car (car pkglist)))) 32.151 + (if YaTeX-emacs-19 (cons w 0) w))))) 32.152 optlist 32.153 (YaTeX-package-option-lookup pkg)) 32.154 (if optlist 32.155 (let ((minibuffer-completion-table optlist) 32.156 - (delim ",") (w (car (car optlist)))) 32.157 + (delim ",") (w (car (car optlist))) 32.158 + (dflt (YaTeX-package-option-lookup 32.159 + pkg 'default-option))) 32.160 (setq option 32.161 - (read-from-minibuffer 32.162 - (format "Any option for {%s}?: " pkg) 32.163 - (if (= (length optlist) 1) 32.164 - (if YaTeX-emacs-19 (cons w 0) w)) 32.165 - YaTeX-minibuffer-completion-map) 32.166 + (or 32.167 + autoopt 32.168 + (read-from-minibuffer 32.169 + (format "Any option for {%s}?: " pkg) 32.170 + (let ((v (or dflt 32.171 + (and (= (length optlist) 1) w)))) 32.172 + (and v (if YaTeX-emacs-19 (cons v 0) v))) 32.173 + YaTeX-minibuffer-completion-map)) 32.174 option (if (string< "" option) 32.175 (concat "[" option "]") 32.176 ""))))
33.1 --- a/yatexprc.el Mon May 14 19:59:12 2012 +0900 33.2 +++ b/yatexprc.el Sun Jul 12 14:21:20 2015 +0900 33.3 @@ -1,18 +1,18 @@ 33.4 -;;; -*- Emacs-Lisp -*- 33.5 -;;; YaTeX process handler. 33.6 -;;; yatexprc.el 33.7 -;;; (c)1993-2012 by HIROSE Yuuji.[yuuji@yatex.org] 33.8 -;;; Last modified Fri Feb 17 22:35:38 2012 on firestorm 33.9 +;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 33.10 +;;; 33.11 +;;; (c)1993-2015 by HIROSE Yuuji.[yuuji@yatex.org] 33.12 +;;; Last modified Fri Feb 13 08:07:20 2015 on firestorm 33.13 ;;; $Id$ 33.14 33.15 +;;; Code: 33.16 ;(require 'yatex) 33.17 (require 'yatexlib) 33.18 33.19 (defvar YaTeX-typeset-process nil 33.20 - "Process identifier for jlatex") 33.21 + "Process identifier for latex") 33.22 33.23 (defvar YaTeX-typeset-buffer "*YaTeX-typesetting*" 33.24 - "Process buffer for jlatex") 33.25 + "Process buffer for latex") 33.26 33.27 (defvar YaTeX-typeset-buffer-syntax nil 33.28 "*Syntax table for typesetting buffer") 33.29 @@ -59,11 +59,12 @@ 33.30 (defvar YaTeX-typeset-consumption nil) 33.31 (make-variable-buffer-local 'YaTeX-typeset-consumption) 33.32 (defun YaTeX-typeset (command buffer &optional prcname modename ppcmd) 33.33 - "Execute jlatex (or other) to LaTeX typeset." 33.34 + "Execute latex command (or other) to LaTeX typeset." 33.35 (interactive) 33.36 (save-excursion 33.37 (let ((p (point)) (window (selected-window)) execdir (cb (current-buffer)) 33.38 (map YaTeX-typesetting-mode-map) 33.39 + (background (string-match "\\*bg:" buffer)) 33.40 (outcode 33.41 (cond ((eq major-mode 'yatex-mode) YaTeX-coding-system) 33.42 ((eq major-mode 'yahtml-mode) yahtml-kanji-code)))) 33.43 @@ -78,8 +79,10 @@ 33.44 (setq execdir default-directory) 33.45 ;;Select lower-most window if there are more than 2 windows and 33.46 ;;typeset buffer not seen. 33.47 - (YaTeX-showup-buffer 33.48 - buffer (function (lambda (x) (nth 3 (window-edges x))))) 33.49 + (if background 33.50 + nil ;do not showup 33.51 + (YaTeX-showup-buffer 33.52 + buffer 'YaTeX-showup-buffer-bottom-most)) 33.53 (set-buffer (get-buffer-create buffer)) 33.54 (setq default-directory execdir) 33.55 (cd execdir) 33.56 @@ -133,21 +136,25 @@ 33.57 (setq YaTeX-typeset-marker (make-marker))) 33.58 (point)) 33.59 (insert (format "Call `%s'\n" command)) 33.60 - (if YaTeX-dos (message "Done.") 33.61 + (cond 33.62 + ((fboundp 'start-process) 33.63 (insert " ") 33.64 (set-marker (process-mark YaTeX-typeset-process) (1- (point)))) 33.65 + (t (message "Done."))) 33.66 (if (bolp) (forward-line -1)) ;what for? 33.67 - (if (and YaTeX-emacs-19 window-system) 33.68 - (let ((win (get-buffer-window buffer t)) owin) 33.69 - (select-frame (window-frame win)) 33.70 - (setq owin (selected-window)) 33.71 - (select-window win) 33.72 - (goto-char (point-max)) 33.73 - (recenter -1) 33.74 - (select-window owin)) 33.75 - (select-window (get-buffer-window buffer)) 33.76 - (goto-char (point-max)) 33.77 - (recenter -1)) 33.78 + (cond 33.79 + (background nil) 33.80 + ((and YaTeX-emacs-19 window-system) 33.81 + (let ((win (get-buffer-window buffer t)) owin) 33.82 + (select-frame (window-frame win)) 33.83 + (setq owin (selected-window)) 33.84 + (select-window win) 33.85 + (goto-char (point-max)) 33.86 + (recenter -1) 33.87 + (select-window owin))) 33.88 + (t (select-window (get-buffer-window buffer)) 33.89 + (goto-char (point-max)) 33.90 + (recenter -1))) 33.91 (select-window window) 33.92 (switch-to-buffer cb) 33.93 (YaTeX-remove-nonstopmode)))) 33.94 @@ -250,7 +257,7 @@ 33.95 (setq tobecalled thiscmd shortname "+typeset")) 33.96 (t 33.97 nil)) ;no need to call any process 33.98 - (progn 33.99 + (progn ;;Something occurs to call next command 33.100 (insert 33.101 (format 33.102 "===!!! %s !!!===\n" 33.103 @@ -272,6 +279,10 @@ 33.104 (put 'YaTeX-typeset-process 'thiscmd thiscmd))) 33.105 ;; If ppcmd is active, call it. 33.106 (cond 33.107 + ((and ppcmd (symbolp ppcmd) (fboundp ppcmd)) 33.108 + ;; If ppcmd is set and it is a function symbol, 33.109 + ;; call it whenever command succeeded or not 33.110 + (funcall ppcmd)) 33.111 ((and ppcmd (string-match "finish" mes)) 33.112 (insert (format "=======> Success! Calling %s\n" ppcmd)) 33.113 (setq mode-name ; set process name 33.114 @@ -286,7 +297,23 @@ 33.115 shell-file-name YaTeX-shell-command-option 33.116 ppcmd) 33.117 'YaTeX-typeset-sentinel)) 33.118 - (t ;pull back original mode-name 33.119 + (t 33.120 + (if (equal 0 (process-exit-status proc)) 33.121 + ;; Successful typesetting done 33.122 + (if (save-excursion 33.123 + (re-search-backward 33.124 + (concat 33.125 + "^Output written on .*\\.pdf (.*page," 33.126 + "\\|\\.dvi -> .*\\.pdf$") 33.127 + nil t)) 33.128 + ;; If PDF output log found in buffer, 33.129 + ;; set next default previewer to 'pdf viewer 33.130 + (put 'dvi2-command 'format 'pdf)) 33.131 + ;;Confirm process buffer to be shown when error 33.132 + (YaTeX-showup-buffer 33.133 + pbuf 'YaTeX-showup-buffer-bottom-most) 33.134 + (message "Command FAILED!")) 33.135 + ;;pull back original mode-name 33.136 (setq mode-name "typeset")))) 33.137 (forward-char 1)) 33.138 (setq YaTeX-typeset-process nil) 33.139 @@ -299,7 +326,7 @@ 33.140 (defvar YaTeX-texput-file "texput.tex" 33.141 "*File name for temporary file of typeset-region.") 33.142 33.143 -(defun YaTeX-typeset-region () 33.144 +(defun YaTeX-typeset-region (&optional pp) 33.145 "Paste the region to the file `texput.tex' and execute typesetter. 33.146 The region is specified by the rule: 33.147 (1)If keyword `%#BEGIN' is found in the upper direction from (point). 33.148 @@ -310,17 +337,21 @@ 33.149 (2)If no `%#BEGIN' usage is found before the (point), 33.150 ->Assume the text between current (point) and (mark) as region. 33.151 DON'T forget to eliminate the `%#BEGIN/%#END' notation after editing 33.152 -operation to the region." 33.153 +operation to the region. 33.154 +Optional second argument PP specifies post-processor command which will be 33.155 +called with one argument of current file name whitout extension." 33.156 (interactive) 33.157 (save-excursion 33.158 (let* 33.159 ((end "") typeout ;Type out message that tells the method of cutting. 33.160 (texput YaTeX-texput-file) 33.161 + (texputroot (substring texput 0 (string-match "\\.tex$" texput))) 33.162 (cmd (concat (YaTeX-get-latex-command nil) " " texput)) 33.163 (buffer (current-buffer)) opoint preamble (subpreamble "") main 33.164 (hilit-auto-highlight nil) ;for Emacs19 with hilit19 33.165 + ppcmd 33.166 reg-begin reg-end lineinfo) 33.167 - 33.168 + (setq ppcmd (if (stringp pp) (concat pp " " texputroot) pp)) 33.169 (save-excursion 33.170 (if (search-backward "%#BEGIN" nil t) 33.171 (progn 33.172 @@ -368,9 +399,11 @@ 33.173 (set-buffer (find-file-noselect texput))) 33.174 ;;(find-file YaTeX-texput-file) 33.175 (erase-buffer) 33.176 + (YaTeX-set-file-coding-system YaTeX-kanji-code YaTeX-coding-system) 33.177 (if (and (eq major-mode 'yatex-mode) YaTeX-need-nonstop) 33.178 (insert "\\nonstopmode{}\n")) 33.179 - (insert preamble "\n" subpreamble "\n") 33.180 + (insert preamble "\n" subpreamble "\n" 33.181 + "\\pagestyle{empty}\n\\thispagestyle{empty}\n") 33.182 (setq lineinfo (list (count-lines 1 (point-end-of-line)) lineinfo)) 33.183 (insert-buffer-substring buffer reg-begin reg-end) 33.184 (insert "\\typeout{" typeout end "}\n") ;Notice the selected method. 33.185 @@ -378,18 +411,324 @@ 33.186 (basic-save-buffer) 33.187 (kill-buffer (current-buffer)) 33.188 (set-buffer main) ;return to parent file or itself. 33.189 - (YaTeX-typeset cmd YaTeX-typeset-buffer) 33.190 + (YaTeX-typeset cmd YaTeX-typeset-buffer nil nil ppcmd) 33.191 (switch-to-buffer buffer) ;for Emacs-19 33.192 (put 'dvi2-command 'region t) 33.193 (put 'dvi2-command 'file buffer) 33.194 (put 'dvi2-command 'offset lineinfo)))) 33.195 33.196 +(defvar YaTeX-use-image-preview "png" 33.197 + "*Nil means not using image preview by [prefix] t e. 33.198 +Acceptable value is one of \"jpg\" or \"png\", which specifies 33.199 +format of preview image. NOTE that if your system has /usr/bin/sips 33.200 +while not having convert(ImageMagick), jpeg format is automatically taken 33.201 +for conversion.") 33.202 +(defvar YaTeX-preview-image-mode-map nil 33.203 + "Keymap used in YaTeX-preview-image-mode") 33.204 +(defun YaTeX-preview-image-mode () 33.205 + (interactive) 33.206 + (if YaTeX-preview-image-mode-map 33.207 + nil 33.208 + (let ((map (setq YaTeX-preview-image-mode-map (make-sparse-keymap)))) 33.209 + (define-key map "q" (lambda()(interactive) 33.210 + (kill-buffer) 33.211 + (select-window 33.212 + (or (get 'YaTeX-typeset-process 'win) 33.213 + (selected-window))))) 33.214 + (define-key map "j" (lambda()(interactive) (scroll-up 1))) 33.215 + (define-key map "k" (lambda()(interactive) (scroll-up -1))))) 33.216 + (use-local-map YaTeX-preview-image-mode-map)) 33.217 + 33.218 +(defvar YaTeX-typeset-pdf2image-chain 33.219 + (cond 33.220 + ((YaTeX-executable-find "pdfcrop") ;Mac OS X 33.221 + (list 33.222 + "pdfcrop --clip %b.pdf tmp.pdf" 33.223 + (if (YaTeX-executable-find "convert") 33.224 + "convert -density %d tmp.pdf %b.%f" 33.225 + ;; If we use sips, specify jpeg as format 33.226 + "sips -s format jpeg -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.jpg") 33.227 + "rm -f tmp.pdf"))) 33.228 + "*Pipe line of command as a list to create image file from PDF. 33.229 +See also doc-string of YaTeX-typeset-dvi2image-chain.") 33.230 + 33.231 +(defvar YaTeX-typeset-dvi2image-chain 33.232 + (cond 33.233 + ((YaTeX-executable-find YaTeX-cmd-dvips) 33.234 + (list 33.235 + (format "%s -E -o %%b.eps %%b.dvi" YaTeX-cmd-dvips) 33.236 + "convert -alpha off -density %d %b.eps %b.%f")) 33.237 + ((and (equal YaTeX-use-image-preview "png") 33.238 + (YaTeX-executable-find "dvipng")) 33.239 + (list "dvipng %b.dvi"))) 33.240 + "*Pipe line of command as a list to create png file from DVI or PDF. 33.241 +%-notation rewritten list: 33.242 + %b basename of target file(\"texput\") 33.243 + %f Output format(\"png\") 33.244 + %d DPI 33.245 +") 33.246 + 33.247 +(defvar YaTeX-typeset-conv2image-chain-alist 33.248 + (list (cons 'pdf YaTeX-typeset-pdf2image-chain) 33.249 + (cons 'dvi YaTeX-typeset-dvi2image-chain)) 33.250 + "Default alist for creating image files from DVI/PDF. 33.251 +The value is generated from YaTeX-typeset-pdf2image-chain and 33.252 +YaTeX-typeset-dvi2image-chain.") 33.253 + 33.254 +(defvar YaTeX-typeset-conv2image-process nil "Process of conv2image chain") 33.255 +(defun YaTeX-typeset-conv2image-chain () 33.256 + (let*((proc (or YaTeX-typeset-process YaTeX-typeset-conv2image-process)) 33.257 + (prevname (process-name proc)) 33.258 + (texput "texput") 33.259 + (format YaTeX-use-image-preview) 33.260 + (target (concat texput "." format)) 33.261 + (math (get 'YaTeX-typeset-conv2image-chain 'math)) 33.262 + (dpi (get 'YaTeX-typeset-conv2image-chain 'dpi)) 33.263 + (srctype (or (get 'YaTeX-typeset-conv2image-chain 'srctype) 33.264 + (if (file-newer-than-file-p 33.265 + (concat texput ".pdf") 33.266 + (concat texput ".dvi")) 33.267 + 'pdf 'dvi))) 33.268 + (chain (cdr (assq srctype YaTeX-typeset-conv2image-chain-alist))) 33.269 + ;; This function is the first evaluation code. 33.270 + ;; If you find these command line does not work 33.271 + ;; on your system, please tell the author 33.272 + ;; which commands should be taken to achieve 33.273 + ;; one-shot png previewing on your system 33.274 + ;; before publishing patch on the Web. 33.275 + ;; Please please please please please. 33.276 + (curproc (member prevname chain)) 33.277 + (w (get 'YaTeX-typeset-conv2image-chain 'win)) 33.278 + (pwd default-directory) 33.279 + img) 33.280 + (if (not (= (process-exit-status proc) 0)) 33.281 + (progn 33.282 + (YaTeX-showup-buffer ;never comes here(?) 33.283 + (current-buffer) 'YaTeX-showup-buffer-bottom-most) 33.284 + (message "Region typesetting FAILED")) 33.285 + (setq command 33.286 + (if curproc (car (cdr-safe curproc)) (car chain))) 33.287 + (if command 33.288 + (let ((cmdline (YaTeX-replace-formats 33.289 + command 33.290 + (list (cons "b" "texput") 33.291 + (cons "f" format) 33.292 + (cons "d" dpi))))) 33.293 + (insert (format "Calling `%s'...\n" cmdline)) 33.294 + (set-process-sentinel 33.295 + (setq YaTeX-typeset-conv2image-process 33.296 + (start-process 33.297 + command 33.298 + (current-buffer) 33.299 + shell-file-name YaTeX-shell-command-option 33.300 + cmdline)) 33.301 + 'YaTeX-typeset-sentinel) 33.302 + (put 'YaTeX-typeset-process 'ppcmd 33.303 + (cons (cons (get-buffer-process (current-buffer)) 33.304 + 'YaTeX-typeset-conv2image-chain) 33.305 + (get 'YaTeX-typeset-process 'ppcmd)))) 33.306 + ;; After all chain executed, display image in current window 33.307 + (cond 33.308 + ((and (featurep 'image) window-system) 33.309 + ;; If direct image displaying available in running Emacs, 33.310 + ;; display target image into the next window in Emacs. 33.311 + (select-window w) 33.312 + ;(setq foo (selected-window)) 33.313 + (YaTeX-showup-buffer 33.314 + (get-buffer-create " *YaTeX-region-image*") 33.315 + 'YaTeX-showup-buffer-bottom-most t) 33.316 + (remove-images (point-min) (point-max)) 33.317 + (erase-buffer) 33.318 + (cd pwd) ;when reuse from other source 33.319 + ;(put-image (create-image (expand-file-name target)) (point)) 33.320 + (insert-image-file target) 33.321 + (setq img (plist-get (text-properties-at (point)) 'intangible)) 33.322 + (YaTeX-preview-image-mode) 33.323 + (if img 33.324 + (let ((height (1+ (cdr (image-size img))))) 33.325 + (enlarge-window 33.326 + (- (ceiling (min height (/ (frame-height) 2))) 33.327 + (window-height))))) 33.328 + ;; Remember elapsed time, which will be threshold in onthefly-preview 33.329 + (put 'YaTeX-typeset-conv2image-chain 'elapse 33.330 + (YaTeX-elapsed-time 33.331 + (get 'YaTeX-typeset-conv2image-chain 'start) (current-time)))) 33.332 + (t 33.333 + ;; Without direct image, display image with image viewer 33.334 + (YaTeX-system 33.335 + (format "%s %s" YaTeX-cmd-view-images target) 33.336 + "YaTeX-region-image" 33.337 + 'noask) 33.338 + ) 33.339 + ))))) 33.340 + 33.341 + 33.342 +(defvar YaTeX-typeset-environment-timer nil) 33.343 +(defun YaTeX-typeset-environment-timer () 33.344 + "Update preview image in the 33.345 +Plist: '(buf begPoint endPoint precedingChar 2precedingChar Substring time)" 33.346 + (let*((plist (get 'YaTeX-typeset-environment-timer 'laststate)) 33.347 + (b (nth 0 plist)) 33.348 + (s (nth 1 plist)) 33.349 + (e (nth 2 plist)) 33.350 + (p (nth 3 plist)) 33.351 + (q (nth 4 plist)) 33.352 + (st (nth 5 plist)) 33.353 + (tm (nth 6 plist)) 33.354 + (overlay YaTeX-on-the-fly-overlay) 33.355 + (thresh (* 2 (or (get 'YaTeX-typeset-conv2image-chain 'elapse) 1)))) 33.356 + (cond 33.357 + ;; In minibuffer, do nothing 33.358 + ((minibuffer-window-active-p (selected-window)) nil) 33.359 + ;; If point went out from last environment, cancel timer 33.360 + ;;;((and (message "s=%d, e=%d, p=%d" s e (point)) nil)) 33.361 + ((null (buffer-file-name)) nil) ;;At momentary-string-display, it's nil. 33.362 + ((or (not (eq b (window-buffer (selected-window)))) 33.363 + (< (point) s) 33.364 + (not (overlayp overlay)) 33.365 + (not (eq (overlay-buffer overlay) (current-buffer))) 33.366 + (> (point) (overlay-end overlay))) 33.367 + (YaTeX-typeset-environment-cancel-auto)) 33.368 + ;;;((and (message "e=%d, p=%d t=%s" e (point) (current-time)) nil)) 33.369 + ;; If recently called, hold 33.370 + ;;; ((< (YaTeX-elapsed-time tm (current-time)) thresh) nil) 33.371 + ;; If condition changed from last call, do it 33.372 + ((not (string= st (YaTeX-buffer-substring s (overlay-end overlay)))) 33.373 + (YaTeX-typeset-environment))))) 33.374 + 33.375 + 33.376 +(defun YaTeX-typeset-environment-by-lmp () 33.377 + (save-excursion 33.378 + (let ((sw (selected-window))) 33.379 + (goto-char opoint) 33.380 + (latex-math-preview-expression) 33.381 + (select-window sw)))) 33.382 + 33.383 +(defun YaTeX-typeset-environment-by-builtin () 33.384 + (save-excursion 33.385 + (YaTeX-typeset-region 'YaTeX-typeset-conv2image-chain))) 33.386 + 33.387 +(defvar YaTeX-on-the-fly-math-preview-engine 33.388 + (if (fboundp 'latex-math-preview-expression) 33.389 + 'YaTeX-typeset-environment-by-lmp 33.390 + 'YaTeX-typeset-environment-by-builtin) 33.391 + "Function symbol to use math-preview. 33.392 +'YaTeX-typeset-environment-by-lmp for using latex-math-preview, 33.393 +'YaTeX-typeset-environment-by-builtin for using yatex-builtin.") 33.394 + 33.395 +(defun YaTeX-typeset-environment-1 () 33.396 + (let*((math (YaTeX-in-math-mode-p)) 33.397 + (dpi (or (YaTeX-get-builtin "IMAGEDPI") (if math "300" "200"))) 33.398 + (opoint (point)) 33.399 + usetimer) 33.400 + (cond 33.401 + ((and YaTeX-on-the-fly-overlay (overlayp YaTeX-on-the-fly-overlay) 33.402 + (member YaTeX-on-the-fly-overlay (overlays-at (point)))) 33.403 + ;; If current position is in on-the-fly overlay, 33.404 + ;; use that region again 33.405 + (setq math (get 'YaTeX-typeset-conv2image-chain 'math)) 33.406 + (push-mark (overlay-start YaTeX-on-the-fly-overlay)) 33.407 + (goto-char (overlay-end YaTeX-on-the-fly-overlay))) 33.408 + ((YaTeX-region-active-p) 33.409 + nil) ;if region is active, use it 33.410 + (math (setq usetimer t) (YaTeX-mark-environment)) 33.411 + ((equal (or (YaTeX-inner-environment t) "document") "document") 33.412 + (mark-paragraph)) 33.413 + (t (setq usetimer t) (YaTeX-mark-environment))) 33.414 + (if YaTeX-use-image-preview 33.415 + (let ((YaTeX-typeset-buffer (concat "*bg:" YaTeX-typeset-buffer)) 33.416 + (b (region-beginning)) (e (region-end))) 33.417 + (put 'YaTeX-typeset-conv2image-chain 'math math) 33.418 + (put 'YaTeX-typeset-conv2image-chain 'dpi dpi) 33.419 + (put 'YaTeX-typeset-conv2image-chain 'srctype nil) 33.420 + (put 'YaTeX-typeset-conv2image-chain 'win (selected-window)) 33.421 + (put 'YaTeX-typeset-conv2image-chain 'start (current-time)) 33.422 + (put 'YaTeX-typeset-environment-timer 'laststate 33.423 + (list (current-buffer) b e (preceding-char) 33.424 + (char-after (- (point) 2)) 33.425 + (YaTeX-buffer-substring b e) 33.426 + (current-time))) 33.427 + (if math (funcall YaTeX-on-the-fly-math-preview-engine) 33.428 + (YaTeX-typeset-region 'YaTeX-typeset-conv2image-chain)) 33.429 + (if usetimer (YaTeX-typeset-environment-auto b e))) 33.430 + (YaTeX-typeset-region)))) 33.431 + 33.432 (defun YaTeX-typeset-environment () 33.433 - "Typeset current math environment" 33.434 + "Typeset current environment or paragraph. 33.435 +If region activated, use it." 33.436 (interactive) 33.437 - (save-excursion 33.438 - (YaTeX-mark-environment) 33.439 - (YaTeX-typeset-region))) 33.440 + (let ((md (match-data))) 33.441 + (unwind-protect 33.442 + (save-excursion 33.443 + (YaTeX-typeset-environment-1)) 33.444 + (store-match-data md)))) 33.445 + 33.446 + 33.447 +(defvar YaTeX-on-the-fly-preview-interval (string-to-number "0.9") 33.448 + "*Control the on-the-fly update of preview environment by an image. 33.449 +Nil disables on-the-fly update. Otherwise on-the-fly update is enabled 33.450 +with update interval specified by this value.") 33.451 + 33.452 +(defun YaTeX-typeset-environment-auto (beg end) 33.453 + "Turn on on-the-fly preview-image" 33.454 + (if YaTeX-typeset-environment-timer 33.455 + (cancel-timer YaTeX-typeset-environment-timer)) 33.456 + (if YaTeX-on-the-fly-overlay 33.457 + (move-overlay YaTeX-on-the-fly-overlay beg end) 33.458 + (overlay-put 33.459 + (setq YaTeX-on-the-fly-overlay (make-overlay beg end)) 33.460 + 'face 'YaTeX-on-the-fly-activated-face)) 33.461 + (setq YaTeX-typeset-environment-timer 33.462 + (run-with-idle-timer 33.463 + (max (string-to-number "0.1") 33.464 + (cond 33.465 + ((numberp YaTeX-on-the-fly-preview-interval) 33.466 + YaTeX-on-the-fly-preview-interval) 33.467 + ((stringp YaTeX-on-the-fly-preview-interval) 33.468 + (string-to-number YaTeX-on-the-fly-preview-interval)) 33.469 + (t 1))) 33.470 + t 'YaTeX-typeset-environment-timer))) 33.471 + 33.472 +(defun YaTeX-typeset-environment-activate-onthefly () 33.473 + (if (get-text-property (point) 'onthefly) 33.474 + (save-excursion 33.475 + (if YaTeX-typeset-environment-timer 33.476 + (progn 33.477 + (cancel-timer YaTeX-typeset-environment-timer) 33.478 + (setq YaTeX-typeset-environment-timer nil))) 33.479 + (if (YaTeX-on-begin-end-p) 33.480 + (if (or (match-beginning 1) (match-beginning 3)) ;on beginning 33.481 + (goto-char (match-end 0)) 33.482 + (goto-char (match-beginning 0)))) 33.483 + (YaTeX-typeset-environment)))) 33.484 + 33.485 +(defun YaTeX-on-the-fly-cancel () 33.486 + "Reset on-the-fly stickiness" 33.487 + (interactive) 33.488 + (YaTeX-typeset-environment-cancel-auto 'stripoff) 33.489 + t) ;t for kill-* 33.490 + 33.491 +(defun YaTeX-typeset-environment-cancel-auto (&optional stripoff) 33.492 + "Cancel typeset-environment timer." 33.493 + (interactive) 33.494 + (if YaTeX-typeset-environment-timer 33.495 + (cancel-timer YaTeX-typeset-environment-timer)) 33.496 + (setq YaTeX-typeset-environment-timer 33.497 + (run-with-idle-timer 33.498 + (string-to-number "0.1") 33.499 + t 33.500 + 'YaTeX-typeset-environment-activate-onthefly)) 33.501 + (let ((ov YaTeX-on-the-fly-overlay)) 33.502 + (if stripoff 33.503 + (remove-text-properties (overlay-start ov) 33.504 + (1- (overlay-end ov)) 33.505 + '(onthefly)) 33.506 + (put-text-property (overlay-start YaTeX-on-the-fly-overlay) 33.507 + (1- (overlay-end YaTeX-on-the-fly-overlay)) 33.508 + 'onthefly 33.509 + t)) 33.510 + (delete-overlay ov) 33.511 + (message "On-the-fly preview deactivated"))) 33.512 33.513 (defun YaTeX-typeset-buffer (&optional pp) 33.514 "Typeset whole buffer. 33.515 @@ -505,14 +844,21 @@ 33.516 (format "%s %s" default mainroot)) 33.517 'YaTeX-call-command-history)) 33.518 (if (or update (null b-in)) 33.519 - (if (y-or-n-p "Use this command line in the future? ") 33.520 + (if (y-or-n-p "Memorize this command line in this file? ") 33.521 (YaTeX-getset-builtin builtin-type command) ;keep in a file 33.522 (setq YaTeX-call-builtin-on-file ;keep in memory 33.523 (cons (cons builtin-type command) 33.524 - (delete (assoc builtin-type alist) alist))))))) 33.525 + (delete (assoc builtin-type alist) alist))) 33.526 + (message "`%s' kept in memory. Type `%s %s' to override." 33.527 + command 33.528 + (key-description 33.529 + (car (where-is-internal 'universal-argument))) 33.530 + (key-description (this-command-keys))) 33.531 + (sit-for 2))))) 33.532 (YaTeX-typeset 33.533 command 33.534 - (format " *YaTeX-%s*" (downcase builtin-type))))) 33.535 + (format " *YaTeX-%s*" (downcase builtin-type)) 33.536 + builtin-type builtin-type))) 33.537 33.538 (defun YaTeX-kill-typeset-process (proc) 33.539 "Kill process PROC after sending signal to PROC. 33.540 @@ -537,28 +883,36 @@ 33.541 (interrupt-process proc) 33.542 (delete-process proc)))))) 33.543 33.544 -(defun YaTeX-system (command buffer) 33.545 - "Execute some command on buffer. Not a official function." 33.546 +(defun YaTeX-system (command name &optional noask basedir) 33.547 + "Execute some COMMAND with process name `NAME'. Not a official function. 33.548 +Optional second argument NOASK skip query when privious process running. 33.549 +Optional third argument BASEDIR changes default-directory there." 33.550 (save-excursion 33.551 - (YaTeX-showup-buffer 33.552 - buffer (function (lambda (x) (nth 3 (window-edges x))))) 33.553 - (let ((df default-directory)) ;preserve current buf's pwd 33.554 - (set-buffer (get-buffer-create buffer)) ;1.61.3 33.555 - (setq default-directory df) 33.556 - (cd df)) 33.557 - (erase-buffer) 33.558 - (if (not (fboundp 'start-process)) 33.559 - (call-process 33.560 - shell-file-name nil buffer nil YaTeX-shell-command-option command) 33.561 - (if (and (get-buffer-process buffer) 33.562 - (eq (process-status (get-buffer-process buffer)) 'run) 33.563 - (not 33.564 - (y-or-n-p (format "Process %s is running. Continue?" buffer)))) 33.565 - nil 33.566 - (set-process-buffer 33.567 - (start-process 33.568 - "system" buffer shell-file-name YaTeX-shell-command-option command) 33.569 - (get-buffer buffer)))))) 33.570 + (let ((df default-directory) 33.571 + (buffer (get-buffer-create (format " *%s*" name))) 33.572 + proc status) 33.573 + (set-buffer buffer) 33.574 + (setq default-directory (cd (or basedir df))) 33.575 + (erase-buffer) 33.576 + (insert (format "Calling `%s'...\n" command) 33.577 + "==Kill this buffer to STOP process==") 33.578 + (YaTeX-showup-buffer buffer 'YaTeX-showup-buffer-bottom-most) 33.579 + (if (not (fboundp 'start-process)) 33.580 + (call-process 33.581 + shell-file-name nil buffer nil YaTeX-shell-command-option command) 33.582 + (if (and (setq proc (get-buffer-process buffer)) 33.583 + (setq status (process-status proc)) 33.584 + (eq status 'run) 33.585 + (not noask) 33.586 + (not 33.587 + (y-or-n-p (format "Process %s is running. Continue?" buffer)))) 33.588 + nil 33.589 + (if (eq status 'run) 33.590 + (progn (interrupt-process proc) (delete-process proc))) 33.591 + (set-process-buffer 33.592 + (start-process 33.593 + name buffer shell-file-name YaTeX-shell-command-option command) 33.594 + (get-buffer buffer))))))) 33.595 33.596 (defvar YaTeX-default-paper-type "a4" 33.597 "*Default paper type.") 33.598 @@ -602,33 +956,50 @@ 33.599 (defvar YaTeX-preview-file-history nil 33.600 "Holds minibuffer history of file to preview.") 33.601 (put 'YaTeX-preview-file-history 'no-default t) 33.602 -(defun YaTeX-preview (preview-command preview-file) 33.603 +(defun YaTeX-preview-default-previewer () 33.604 + "Return default previewer for this document" 33.605 + (YaTeX-replace-format 33.606 + (if (eq (get 'dvi2-command 'format) 'pdf) 33.607 + (or (YaTeX-get-builtin "PDFVIEW") 33.608 + tex-pdfview-command) 33.609 + (or (YaTeX-get-builtin "PREVIEW") 33.610 + dvi2-command)) 33.611 + "p" (format (cond 33.612 + (YaTeX-dos "-y:%s") 33.613 + (t "-paper %s")) 33.614 + (YaTeX-get-paper-type)))) 33.615 +(defun YaTeX-preview-default-main (command) 33.616 + "Return default preview target file" 33.617 + (if (get 'dvi2-command 'region) 33.618 + (substring YaTeX-texput-file 33.619 + 0 (rindex YaTeX-texput-file ?.)) 33.620 + (YaTeX-get-preview-file-name command))) 33.621 +(defun YaTeX-preview (preview-command preview-file &optional as-default) 33.622 "Execute xdvi (or other) to tex-preview." 33.623 (interactive 33.624 - (let* ((command (read-string-with-history 33.625 - "Preview command: " 33.626 - (YaTeX-replace-format 33.627 - (or (YaTeX-get-builtin "PREVIEW") dvi2-command) 33.628 - "p" (format (cond 33.629 - (YaTeX-dos "-y:%s") 33.630 - (t "-paper %s")) 33.631 - (YaTeX-get-paper-type))) 33.632 - 'YaTeX-preview-command-history)) 33.633 - (file (read-string-with-history 33.634 - "Preview file: " 33.635 - (if (get 'dvi2-command 'region) 33.636 - (substring YaTeX-texput-file 33.637 - 0 (rindex YaTeX-texput-file ?.)) 33.638 - (YaTeX-get-preview-file-name command)) 33.639 - 'YaTeX-preview-file-history))) 33.640 + (let* ((previewer (YaTeX-preview-default-previewer)) 33.641 + (as-default current-prefix-arg) 33.642 + (command (if as-default 33.643 + previewer 33.644 + (read-string-with-history 33.645 + "Preview command: " 33.646 + previewer 33.647 + 'YaTeX-preview-command-history))) 33.648 + (target (YaTeX-preview-default-main command)) 33.649 + (file (if as-default 33.650 + target 33.651 + (read-string-with-history 33.652 + "Preview file: " 33.653 + target 33.654 + 'YaTeX-preview-file-history)))) 33.655 (list command file))) 33.656 - (setq dvi2-command preview-command) ;`dvi2command' is buffer local 33.657 + (setq dvi2-command preview-command) ;`dvi2-command' is buffer local 33.658 (save-excursion 33.659 (YaTeX-visit-main t) 33.660 (if YaTeX-dos (setq preview-file (expand-file-name preview-file))) 33.661 (let ((pbuffer "*dvi-preview*") (dir default-directory)) 33.662 (YaTeX-showup-buffer 33.663 - pbuffer (function (lambda (x) (nth 3 (window-edges x))))) 33.664 + pbuffer 'YaTeX-showup-buffer-bottom-most) 33.665 (set-buffer (get-buffer-create pbuffer)) 33.666 (erase-buffer) 33.667 (setq default-directory dir) ;for 18 33.668 @@ -683,7 +1054,64 @@ 33.669 (concat (YaTeX-get-preview-file-name) ".dvi"))) 33.670 (message "Searching `%s'...Done" str)))) 33.671 33.672 -(defun YaTeX-set-virtual-error-position (file-sym line-sym) 33.673 +(defun YaTeX-preview-jlfmt-xdvi () 33.674 + "Call xdvi -sourceposition to DVI corresponding to current main file" 33.675 + (interactive)) 33.676 + 33.677 +(defun YaTeX-preview-jump-line () 33.678 + "Call jump-line function of various previewer on current main file" 33.679 + (interactive) 33.680 + (save-excursion 33.681 + (save-restriction 33.682 + (widen) 33.683 + (let*((pf (or YaTeX-parent-file 33.684 + (save-excursion (YaTeX-visit-main t) (buffer-file-name)))) 33.685 + (pdir (file-name-directory pf)) 33.686 + (bnr (substring pf 0 (string-match "\\....$" pf))) 33.687 + (cf (file-relative-name (buffer-file-name) pdir)) 33.688 + (buffer (get-buffer-create " *preview-jump-line*")) 33.689 + (line (count-lines (point-min) (point-end-of-line))) 33.690 + (previewer (YaTeX-preview-default-previewer)) 33.691 + (cmd (cond 33.692 + ((string-match "xdvi" previewer) 33.693 + (format "%s -nofork -sourceposition '%d %s' %s.dvi" 33.694 + YaTeX-xdvi-remote-program 33.695 + line cf bnr)) 33.696 + ((string-match "Skim" previewer) 33.697 + (format "%s %d '%s.pdf' '%s'" 33.698 + YaTeX-cmd-displayline line bnr cf)) 33.699 + ((string-match "evince" previewer) 33.700 + (format "%s '%s.pdf' %d '%s'" 33.701 + "fwdevince" bnr line cf)) 33.702 + ;; 33.703 + ;; These lines below for other PDF viewer is not confirmed 33.704 + ;; yet. If you find correct command line, PLEASE TELL 33.705 + ;; IT TO THE AUTHOR before publishing patch on the web. 33.706 + ;; ..PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE.. 33.707 + ((string-match "sumatra" previewer) ;;?? 33.708 + (format "%s \"%s.pdf\" -forward-search \"%s\" %d" 33.709 + ;;Send patch to the author, please 33.710 + previewer bnr cf line)) 33.711 + ((string-match "qpdfview" previewer) ;;?? 33.712 + (format "%s '%s.pdf#src:%s:%d:0'" 33.713 + ;;Send patch to the author, please 33.714 + previewer bnr cf line)) 33.715 + ((string-match "okular" previewer) ;;?? 33.716 + (format "%s '%s.pdf#src:%d' '%s'" 33.717 + ;;Send patch to the author, please 33.718 + previewer bnr line cf)) 33.719 + ))) 33.720 + (YaTeX-system cmd "jump-line" 'noask pdir))))) 33.721 + 33.722 +(defun YaTeX-goto-corresponding-viewer () 33.723 + (let ((cmd (or (YaTeX-get-builtin "!") tex-command))) 33.724 + (if (string-match "-src\\|synctex=" cmd) 33.725 + (progn 33.726 + (YaTeX-preview-jump-line) 33.727 + t) ;for YaTeX-goto-corresponding-* 33.728 + nil))) 33.729 + 33.730 + (defun YaTeX-set-virtual-error-position (file-sym line-sym) 33.731 "Replace the value of FILE-SYM, LINE-SYM by virtual error position." 33.732 (cond 33.733 ((and (get 'dvi2-command 'region) 33.734 @@ -847,9 +1275,9 @@ 33.735 (widen)))) 33.736 33.737 (defvar YaTeX-dvi2-command-ext-alist 33.738 - '(("[agx]dvi\\|dviout" . ".dvi") 33.739 + '(("[agxk]dvi\\|dviout" . ".dvi") 33.740 ("ghostview\\|gv" . ".ps") 33.741 - ("acroread\\|pdf\\|Preview\\|TeXShop\\|Skim\\|evince" . ".pdf"))) 33.742 + ("acroread\\|[xk]pdf\\|pdfopen\\|Preview\\|TeXShop\\|Skim\\|evince\\|mupdf\\|zathura\\|okular" . ".pdf"))) 33.743 33.744 (defun YaTeX-get-preview-file-name (&optional preview-command) 33.745 "Get file name to preview by inquiring YaTeX-get-latex-command" 33.746 @@ -859,6 +1287,9 @@ 33.747 (fname (if rin (substring latex-cmd (1+ rin)) "")) 33.748 (r (YaTeX-assoc-regexp preview-command YaTeX-dvi2-command-ext-alist)) 33.749 (ext (if r (cdr r) ""))) 33.750 + (and (null r) 33.751 + (eq (get 'dvi2-command 'format) 'pdf) 33.752 + (setq ext "pdf")) 33.753 (concat 33.754 (if (string= fname "") 33.755 (setq fname (substring (file-name-nondirectory 33.756 @@ -873,12 +1304,12 @@ 33.757 strings are assumed to be the latex-command and arguments. The 33.758 default value of latex-command is: 33.759 tex-command FileName 33.760 -and if you write \"%#!jlatex\" in the beginning of certain line. 33.761 - \"jlatex \" FileName 33.762 +and if you write \"%#!platex\" in the beginning of certain line. 33.763 + \"platex \" FileName 33.764 will be the latex-command, 33.765 -and you write \"%#!jlatex main.tex\" on some line and argument SWITCH 33.766 +and you write \"%#!platex main.tex\" on some line and argument SWITCH 33.767 is non-nil, then 33.768 - \"jlatex main.tex\" 33.769 + \"platex main.tex\" 33.770 33.771 will be given to the shell." 33.772 (let (parent tparent magic) 33.773 @@ -896,9 +1327,9 @@ 33.774 (cond 33.775 (magic 33.776 (cond 33.777 - (switch (if (string-match "\\s " magic) magic 33.778 + (switch (if (string-match "\\s [^-]\\S *$" magic) magic 33.779 (concat magic " " parent))) 33.780 - (t (concat (substring magic 0 (string-match "\\s " magic)) " ")))) 33.781 + (t (concat (substring magic 0 (string-match "\\s [^-]\\S *$" magic)) " ")))) 33.782 (t (concat tex-command " " (if switch parent)))) 33.783 (list (cons "f" tparent) 33.784 (cons "r" (substring tparent 0 (rindex tparent ?.))))))) 33.785 @@ -956,7 +1387,7 @@ 33.786 (YaTeX-visit-main t) ;;change execution directory 33.787 (setq dir default-directory) 33.788 (YaTeX-showup-buffer 33.789 - lbuffer (function (lambda (x) (nth 3 (window-edges x))))) 33.790 + lbuffer 'YaTeX-showup-buffer-bottom-most) 33.791 (set-buffer (get-buffer-create lbuffer)) 33.792 (erase-buffer) 33.793 (cd dir) ;for 19 33.794 @@ -997,7 +1428,7 @@ 33.795 (let ((ff (function (lambda (f) 33.796 (if setbuf (set-buffer (find-file-noselect f)) 33.797 (find-file f))))) 33.798 - b-in main-file YaTeX-create-file-prefix-g 33.799 + b-in main-file mfa YaTeX-create-file-prefix-g 33.800 (hilit-auto-highlight (not setbuf))) 33.801 (if (setq b-in (YaTeX-get-builtin "!")) 33.802 (setq main-file (YaTeX-guess-parent b-in))) 33.803 @@ -1022,14 +1453,14 @@ 33.804 ((and main-file 33.805 (file-exists-p (setq main-file (concat "../" main-file))) 33.806 (or b-in 33.807 - (y-or-n-p (concat (expand-file-name main-file) 33.808 + (y-or-n-p (concat (setq mfa (expand-file-name main-file)) 33.809 " is main file?:")))) 33.810 - (setq YaTeX-parent-file main-file) 33.811 + (setq YaTeX-parent-file mfa) 33.812 ;(YaTeX-switch-to-buffer main-file setbuf) 33.813 (funcall ff main-file) 33.814 ) 33.815 (t (setq main-file (read-file-name "Enter your main text: " nil nil 1)) 33.816 - (setq YaTeX-parent-file main-file) 33.817 + (setq YaTeX-parent-file (expand-file-name main-file)) 33.818 ; (YaTeX-switch-to-buffer main-file setbuf)) 33.819 (funcall ff main-file)) 33.820 ))) 33.821 @@ -1037,8 +1468,8 @@ 33.822 33.823 (defun YaTeX-guess-parent (command-line) 33.824 (setq command-line 33.825 - (if (string-match ".*\\s " command-line) 33.826 - (substring command-line (match-end 0)) 33.827 + (if (string-match "\\s \\([^-]\\S *\\)$" command-line) 33.828 + (substring command-line (match-beginning 1)) 33.829 (file-name-nondirectory (buffer-file-name))) 33.830 command-line 33.831 (concat (if (string-match "\\(.*\\)\\." command-line) 33.832 @@ -1058,13 +1489,14 @@ 33.833 (basic-save-buffer) 33.834 (let ((cmm major-mode)) 33.835 (save-excursion 33.836 - (mapcar '(lambda (buf) 33.837 + (mapcar (function 33.838 + (lambda (buf) 33.839 (set-buffer buf) 33.840 (if (and (buffer-file-name buf) 33.841 (eq major-mode cmm) 33.842 (buffer-modified-p buf) 33.843 (y-or-n-p (format "Save %s" (buffer-name buf)))) 33.844 - (save-buffer buf))) 33.845 + (save-buffer buf)))) 33.846 (buffer-list))))) 33.847 33.848 (provide 'yatexprc)
34.1 --- a/yatexsec.el Mon May 14 19:59:12 2012 +0900 34.2 +++ b/yatexsec.el Sun Jul 12 14:21:20 2015 +0900 34.3 @@ -1,10 +1,10 @@ 34.4 -;;; -*- Emacs-Lisp -*- 34.5 -;;; YaTeX sectioning browser. 34.6 -;;; yatexsec.el 34.7 -;;; (c) 1994-2012 by HIROSE Yuuji [yuuji@yatex.org] 34.8 -;;; Last modified Mon Jan 9 20:20:32 2012 on firestorm 34.9 +;;; yatexsec.el --- YaTeX sectioning browser 34.10 +;;; 34.11 +;;; (c) 1994-2013 by HIROSE Yuuji [yuuji@yatex.org] 34.12 +;;; Last modified Sun Dec 21 14:16:35 2014 on firestorm 34.13 ;;; $Id$ 34.14 34.15 +;;; Code: 34.16 (defvar YaTeX-sectioning-level 34.17 '(("part" . 0) 34.18 ("chapter" . 1) 34.19 @@ -55,9 +55,9 @@ 34.20 (define-key YaTeX-sectioning-minibuffer-map "\C-r" 34.21 'YaTeX-sectioning-scroll-down) 34.22 (define-key YaTeX-sectioning-minibuffer-map "\C-w" 34.23 - '(lambda () (interactive) (YaTeX-sectioning-scroll-down 1))) 34.24 + (function (lambda () (interactive) (YaTeX-sectioning-scroll-down 1)))) 34.25 (define-key YaTeX-sectioning-minibuffer-map "\C-z" 34.26 - '(lambda () (interactive) (YaTeX-sectioning-scroll-up 1))) 34.27 + (function (lambda () (interactive) (YaTeX-sectioning-scroll-up 1)))) 34.28 (define-key YaTeX-sectioning-minibuffer-map "\C-l" 34.29 'YaTeX-sectioning-recenter) 34.30 (define-key YaTeX-sectioning-minibuffer-map "?" 34.31 @@ -181,7 +181,7 @@ 34.32 (defun YaTeX-sectioning-hide () 34.33 "Call YaTeX-sectioning-hide-under with argument according to pressed key." 34.34 (interactive) 34.35 - (YaTeX-sectioning-hide-under (- last-command-char ?0))) 34.36 + (YaTeX-sectioning-hide-under (- (YaTeX-last-key) ?0))) 34.37 34.38 (defun YaTeX-sectioning-help () 34.39 "Show help of sectioning."