yatex
changeset 68:0eb6997bee16
More adjustment for Emacs20 and XEmacs
[prefix] g for <applet> <!--#include> <!--#exec>
author | yuuji |
---|---|
date | Mon, 26 Oct 1998 12:05:32 +0000 |
parents | ced6eb72f63b |
children | 807c1e7e68b7 |
files | docs/htmlqa docs/yatexe.tex docs/yatexj.tex help/YATEXHLP.eng help/YATEXHLP.jp yahtml.el yatex.el yatex.new yatex19.el yatexadd.el yatexenv.el yatexhie.el yatexhlp.el yatexlib.el yatexmth.el yatexprc.el yatexsec.el |
diffstat | 17 files changed, 549 insertions(+), 228 deletions(-) [+] |
line diff
1.1 --- a/docs/htmlqa Tue Dec 16 13:34:57 1997 +0000 1.2 +++ b/docs/htmlqa Mon Oct 26 12:05:32 1998 +0000 1.3 @@ -36,7 +36,7 @@ 1.4 の機能強化版 auto-insert-tkld を使いましょう。後者は、 1.5 ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/auto-inset-tkld.tar.Z 1.6 で入手できます。 1.7 - http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/elisp-tips.html#yahtml-mode-hook 1.8 + http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/elisp/yahtml-mode.html 1.9 に設定例が書いてあります。 1.10 1.11 ■その他
2.1 --- a/docs/yatexe.tex Tue Dec 16 13:34:57 1997 +0000 2.2 +++ b/docs/yatexe.tex Mon Oct 26 12:05:32 1998 +0000 2.3 @@ -29,7 +29,7 @@ 2.4 * Main features:: What YaTeX can do 2.5 * Installation:: Guide to install 2.6 * Typesetting:: Call typesetting processes 2.7 -* %# notation:: Quick notation of controlling YaTeX 2.8 +* %#notation:: 2.9 * Completion:: Input LaTeX commands with completion 2.10 * Local dictionaries:: Directory dependent completion 2.11 * Commenting out:: Commenting/uncommenting text 2.12 @@ -77,10 +77,18 @@ 2.13 2.14 * view-sectioning:: 2.15 2.16 +Cursor jump 2.17 + 2.18 +* Jump to corresponding object:: 2.19 +* Invoking image processor:: 2.20 +* Jump to main file:: 2.21 +* Jumping around the environment:: 2.22 +* Jumping to last completion position:: 2.23 + 2.24 Changing and Deleting 2.25 2.26 -* Changing La@TeX{} commands:: 2.27 -* Killing La@TeX{} commands:: 2.28 +* Changing LaTeX commands:: 2.29 +* Killing LaTeX commands:: 2.30 2.31 Customizations 2.32 2.33 @@ -104,8 +112,8 @@ 2.34 2.35 How the add-in function works 2.36 2.37 -* Defining `option add-in':: 2.38 -* Defining `argument add-in':: 2.39 +* Defining option-add-in:: 2.40 +* Defining argument-add-in:: 2.41 @end menu 2.42 2.43 @node What is YaTeX?, Main features, Top, Top 2.44 @@ -181,7 +189,7 @@ 2.45 loaded, mode string on mode line will be turned to "YaTeX". 2.46 2.47 2.48 -@node Typesetting, %# notation, Installation, Top 2.49 +@node Typesetting, %#notation, Installation, Top 2.50 @comment node-name, next, previous, up 2.51 @chapter Typesetting 2.52 @cindex typesetting 2.53 @@ -220,7 +228,7 @@ 2.54 2.55 @node Calling typesetter, Calling previewer, Typesetting, Typesetting 2.56 @comment node-name, next, previous, up 2.57 -@section{Calling typesetter} 2.58 +@section Calling typesetter 2.59 2.60 Typing @kbd{[prefix] t j}, the current editing window will be divided 2.61 horizontally when you invoke latex command, and log message of La@TeX{} 2.62 @@ -246,7 +254,7 @@ 2.63 Since @kbd{[prefix] tr} pastes the region into the file 2.64 @file{texput.tex} in the current directory, you should be careful of 2.65 overwriting. The method of specification of the region is shown in the 2.66 -section @xref{%#NOTATION}. 2.67 +section @xref{%#notation}. 2.68 2.69 The documentstyle for typeset-region is the same as that of editing 2.70 file if you edit one file, and is the same as main file's if you 2.71 @@ -254,7 +262,7 @@ 2.72 2.73 @node Calling previewer, Printing out, Calling typesetter, Typesetting 2.74 @comment node-name, next, previous, up 2.75 -@section{Calling previewer} 2.76 +@section Calling previewer 2.77 2.78 @kbd{[prefix] t p} invokes the TeX previewer. And if you are using 2.79 xdvi-remote, which can be controled from other terminals, @kbd{[prefix] t 2.80 @@ -264,7 +272,7 @@ 2.81 2.82 @node Printing out, , Calling previewer, Typesetting 2.83 @comment node-name, next, previous, up 2.84 -@section{Printing out} 2.85 +@section Printing out 2.86 2.87 When you type @code{[preifx] t l}, YaTeX asks you the range of 2.88 dvi-printing by default. You can skip this by invoking it with 2.89 @@ -274,7 +282,7 @@ 2.90 C-u [prefix] tl 2.91 @end example 2.92 2.93 -@node %# notation, Completion, Typesetting, Top 2.94 +@node %#notation, Completion, Typesetting, Top 2.95 @comment node-name, next, previous, up 2.96 @chapter %# notation 2.97 @cindex %# notation 2.98 @@ -289,7 +297,7 @@ 2.99 * Editing %# notation:: 2.100 @end menu 2.101 2.102 -@node Changing typesetter, Static region for typesetting, %# notation, %# notation 2.103 +@node Changing typesetter, Static region for typesetting, %#notation, %#notation 2.104 @comment node-name, next, previous, up 2.105 @section To change the `latex' command or to split a source text. 2.106 @cindex typesetter 2.107 @@ -304,7 +312,7 @@ 2.108 anywhere in the source text. This is useful for changing 2.109 typesetter. 2.110 2.111 -@node Splitting input files, Static region for typesetting, Changing typesetter, %# notation 2.112 +@node Splitting input files, Static region for typesetting, Changing typesetter, %#notation 2.113 @comment node-name, next, previous, up 2.114 2.115 And if you split the source text and 2.116 @@ -341,7 +349,7 @@ 2.117 is in the parent directory(not %#!latex ../main.tex). 2.118 @end itemize 2.119 2.120 -@node Static region for typesetting, Lpr format, Changing typesetter, %# notation 2.121 +@node Static region for typesetting, Lpr format, Changing typesetter, %#notation 2.122 @comment node-name, next, previous, up 2.123 @section Static region 2.124 @cindex static region 2.125 @@ -391,7 +399,7 @@ 2.126 @code{%#BEGIN} alone at the middle of very long text. Do not forget to 2.127 erase @code{%#BEGIN} @code{%#END} pair. 2.128 2.129 -@node Lpr format, Editing %# notation, Static region for typesetting, %# notation 2.130 +@node Lpr format, Editing %# notation, Static region for typesetting, %#notation 2.131 @comment node-name, next, previous, up 2.132 @section Lpr format 2.133 @cindex lpr format 2.134 @@ -429,7 +437,7 @@ 2.135 %#LPR dvi2ps %s | lpr 2.136 @end example 2.137 2.138 -@node Editing %# notation, , Lpr format, %# notation 2.139 +@node Editing %# notation, , Lpr format, %#notation 2.140 @comment node-name, next, previous, up 2.141 @section Editing %# notation 2.142 2.143 @@ -453,7 +461,7 @@ 2.144 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are 2.145 automatically erased. 2.146 2.147 -@node Completion, Local dictionaries, %# notation, Top 2.148 +@node Completion, Local dictionaries, %#notation, Top 2.149 @comment node-name, next, previous, up 2.150 @chapter Completion 2.151 @cindex completion 2.152 @@ -725,7 +733,7 @@ 2.153 @dots{} Shift up sectioning lines in region 2.154 @item D 2.155 @dots{} Shift down sectioning lines in region 2.156 -@item 0$B!A(B6 2.157 +@item 0@dots{}6 2.158 @dots{} Hide sectioning commands whose level is lower than n 2.159 @end table 2.160 2.161 @@ -1029,6 +1037,17 @@ 2.162 @cindex cursor jump 2.163 @cindex prefix g 2.164 2.165 + 2.166 +@menu 2.167 +* Jump to corresponding object:: 2.168 +* Invoking image processor:: 2.169 +* Jump to main file:: 2.170 +* Jumping around the environment:: 2.171 +* Jumping to last completion position:: 2.172 +@end menu 2.173 + 2.174 +@node Jump to corresponding object, Invoking image processor, Cursor jump, Cursor jump 2.175 +@comment node-name, next, previous, up 2.176 @section Jump to corresponding object 2.177 2.178 Typing 2.179 @@ -1072,7 +1091,9 @@ 2.180 Note that this function doesn't work on @code{begin/end}, 2.181 @code{%#BEGIN/%#END} pairs because it is meaningless. 2.182 2.183 -@section{Invoking image processor} 2.184 +@node Invoking image processor, Jump to main file, Jump to corresponding object, Cursor jump 2.185 +@comment node-name, next, previous, up 2.186 +@section Invoking image processor 2.187 @cindex{Drawing tool invocation} 2.188 2.189 `image-including line' described above means such lines as 2.190 @@ -1102,6 +1123,8 @@ 2.191 image viewer or drawing tool. 2.192 @end enumerate 2.193 2.194 +@node Jump to main file, Jumping around the environment, Invoking image processor, Cursor jump 2.195 +@comment node-name, next, previous, up 2.196 @section Jump to main file 2.197 2.198 Typing 2.199 @@ -1118,7 +1141,9 @@ 2.200 in a sub text switch the buffer to the main text specified by 2.201 @code{%#!} notation. 2.202 2.203 -@section Other jumping features 2.204 +@node Jumping around the environment, Jumping to last completion position, Jump to main file, Cursor jump 2.205 +@comment node-name, next, previous, up 2.206 +@section Jumping around the environment 2.207 2.208 And these are the functions which work on the current La@TeX{} 2.209 environment: 2.210 @@ -1135,6 +1160,16 @@ 2.211 @cindex M-C-e 2.212 @cindex M-C-@@ 2.213 2.214 +@node Jumping to last completion position, , Jumping around the environment, Cursor jump 2.215 +@comment node-name, next, previous, up 2.216 +@section Jumping to last completion position 2.217 + 2.218 +YaTeX always memorize the position of completion into register @code{3}. 2.219 +So every time you make a trip to any other part of text other than you are 2.220 +writing, you can return to the editing paragraph by calling 2.221 +register-to-point with argument YaTeX-current-position-register, which is 2.222 +achieved by typing @kbd{C-x j 3}(by default). 2.223 + 2.224 @node Changing and Deleting, Filling, Cursor jump, Top 2.225 @comment node-name, next, previous, up 2.226 @chapter Changing and Deleting 2.227 @@ -1152,11 +1187,11 @@ 2.228 @cindex prefix k 2.229 2.230 @menu 2.231 -* Changing La@TeX{} commands:: 2.232 -* Killing La@TeX{} commands:: 2.233 +* Changing LaTeX commands:: 2.234 +* Killing LaTeX commands:: 2.235 @end menu 2.236 2.237 -@node Changing La@TeX{} commands, Killing La@TeX{} commands, Changing and Deleting, Changing and Deleting 2.238 +@node Changing LaTeX commands, Killing LaTeX commands, Changing and Deleting, Changing and Deleting 2.239 @comment node-name, next, previous, up 2.240 @section Changing La@TeX{} commands 2.241 2.242 @@ -1183,7 +1218,7 @@ 2.243 it mind to put the cursor on a brace when you are thinking of changing a 2.244 complicated argument. 2.245 2.246 -@node Killing La@TeX{} commands, , Changing La@TeX{} commands, Changing and Deleting 2.247 +@node Killing LaTeX commands, , Changing LaTeX commands, Changing and Deleting 2.248 @comment node-name, next, previous, up 2.249 @section Killing La@TeX{} commands 2.250 @cindex Killing La@TeX{} commands 2.251 @@ -1908,11 +1943,11 @@ 2.252 job referring the value of its argument. 2.253 2.254 @menu 2.255 -* Defining `option add-in':: 2.256 -* Defining `argument add-in':: 2.257 +* Defining option-add-in:: 2.258 +* Defining argument-add-in:: 2.259 @end menu 2.260 2.261 -@node Defining `option add-in', Defining `argument add-in', How the add-in function works, How the add-in function works 2.262 +@node Defining option-add-in, Defining argument-add-in, How the add-in function works, How the add-in function works 2.263 @comment node-name, next, previous, up 2.264 @subsubsection Defining `option add-in' 2.265 2.266 @@ -1939,7 +1974,7 @@ 2.267 (concat "{" (read-string "Rule: ") "}")) 2.268 @end lisp 2.269 2.270 -@node Defining `argument add-in', , Defining `option add-in', How the add-in function works 2.271 +@node Defining argument-add-in, , Defining option-add-in, How the add-in function works 2.272 @comment node-name, next, previous, up 2.273 @subsubsection Defining `argument add-in' 2.274 2.275 @@ -2050,7 +2085,7 @@ 2.276 @center @kbd{M-x YaTeX-generate-simple} 2.277 This generator can make both ``option add-in'' and ``argument add-in'' 2.278 (@emph{refer the section add-in functions} 2.279 -@ref{How the add-in function works?}), whereas @code{YaTeX-generate} 2.280 +@ref{How the add-in function works}), whereas @code{YaTeX-generate} 2.281 cannot make ``argument addin''. 2.282 2.283 For example, assume you have the LaTeX command as follows.
3.1 --- a/docs/yatexj.tex Tue Dec 16 13:34:57 1997 +0000 3.2 +++ b/docs/yatexj.tex Mon Oct 26 12:05:32 1998 +0000 3.3 @@ -6,8 +6,9 @@ 3.4 @iftex 3.5 @c @syncodeindex fn cp 3.6 @c いつも忘れるのでここに書いとくか。 3.7 -@c ノードいじったら C-l C-u C-e 3.8 -@c メニュー増やしたら C-l C-u C-m 3.9 +@c ノードいじったら C-l C-u C-n 全部のノード更新 C-l C-u C-e 3.10 +@c メニュー増やしたら C-l C-u C-m 全部のメニュー更新 C-l C-u C-a 3.11 +@c フォーマットするときは C-l C-e C-b 3.12 @syncodeindex vr cp 3.13 @end iftex 3.14 3.15 @@ -83,6 +84,14 @@ 3.16 * Recursive completion:: 再帰補完 3.17 * view-sectioning:: セクション区切りのアウトライン表示 3.18 3.19 +カーソルジャンプ 3.20 + 3.21 +* 対応オブジェクトへのジャンプ:: 3.22 +* お絵描きツール起動:: 3.23 +* メインファイルへのジャンプ:: 3.24 +* 環境を単位としたジャンプ:: 3.25 +* 最後の補完位置へのジャンプ:: 3.26 + 3.27 変更/削除 3.28 3.29 * Changing LaTeX command:: La@TeX{} コマンドの変更 3.30 @@ -288,7 +297,7 @@ 3.31 @node Calling typesetter, Calling previewer, Invocation, Invocation 3.32 @comment node-name, next, previous, up 3.33 @section タイプセッタ起動 3.34 -@cindex タイプセッタ起動 3.35 +@cindex タイプセッタ起動[たいふせつたきとう] 3.36 @cindex タイプセットエラー[たいふせつとえらあ] 3.37 @cindex エラー修正[えらあしゆうせい] 3.38 3.39 @@ -317,7 +326,7 @@ 3.40 @subsection 領域タイプセット 3.41 3.42 ポイントとマークの間、あるいはテキスト中に埋め込んだ @code{%#BEGIN} と 3.43 -@code{%#END}の間の領域(@ref{%#記法})だけを切り取ってタイプセットすることが 3.44 +@code{%#END}の間の領域(@ref{%#notation})だけを切り取ってタイプセットすることが 3.45 できます。この場合の documentstyle は、単一ファイルの La@TeX{} ソースの編 3.46 集時にはそのファイルの documentstyle が、別ファイルから include している場 3.47 合にはメインファイルの documentstyle が自動的に選択されます。指定領域は、 3.48 @@ -534,7 +543,7 @@ 3.49 @node Editing %# notation, , lpr format, %#notation 3.50 @comment node-name, next, previous, up 3.51 @section %#記法自体の編集 3.52 -@cindex %#きほうじたいのへんしゅう[%#きほうしたいのへんしゆう] 3.53 +@cindex %#記法自体の編集[%#きほうしたいのへんしゆう] 3.54 3.55 以上のような@code{%#}で始まる各種制御記法を編集するためには 3.56 3.57 @@ -824,12 +833,14 @@ 3.58 示します(実際にやって見れば分かります)。 3.59 3.60 @code{*Sectioning Lines*}バッファは、 3.61 + 3.62 @table @kbd 3.63 @item M-x YaTeX-section-overview 3.64 @dots{} セクション区切り一覧バッファを生成 3.65 @end table 3.66 -@cindex セクション区切り一覧バッファ[せくしよんくきりいちらんはつは] 3.67 -で作成することができます。このバッファをを選択し任意の行でスペースを押すと、 3.68 + 3.69 +@cindex セクション区切り一覧バッファ[せくしよんくきりいちらんはつふあ] 3.70 +で作成することができます。このバッファを選択し任意の行でスペースを押すと、 3.71 該当するセクション区切りのある本文中の場所にジャンプします。さらに、同バッ 3.72 ファで @kbd{u} を押すと、ソーステキストの対応するセクションコマンドが一階 3.73 層上がり(例: subsection が section に変わる)、@kbd{d}を押すと一階層下がり 3.74 @@ -1185,6 +1196,17 @@ 3.75 @cindex カーソルジャンプ[かあそるしやんふ] 3.76 @cindex prefix g 3.77 3.78 + 3.79 +@menu 3.80 +* 対応オブジェクトへのジャンプ:: 3.81 +* お絵描きツール起動:: 3.82 +* メインファイルへのジャンプ:: 3.83 +* 環境を単位としたジャンプ:: 3.84 +* 最後の補完位置へのジャンプ:: 3.85 +@end menu 3.86 + 3.87 +@node 対応オブジェクトへのジャンプ, お絵描きツール起動, Cursor jump, Cursor jump 3.88 +@comment node-name, next, previous, up 3.89 @section 対応オブジェクトへのジャンプ 3.90 3.91 文書中のいろいろな場所で 3.92 @@ -1212,7 +1234,7 @@ 3.93 ない場合はエラーになります。またこれは、領域固定のための @code{%#BEGIN} と 3.94 @code{%#END} のペアに対しても同様に動作します。なお、@code{label/ref}や 3.95 @code{cite/bibitem}対応するものが別ファイルにある時は、ジャンプ先となるファ 3.96 -イルがオープンされていなければなりません。@xref{%#記法} 3.97 +イルがオープンされていなければなりません。@xref{%#notation} 3.98 メインの .tex ファイルの @code{\include{chap1}} などにカーソルを合わせ、 3.99 @kbd{[prefix] g} を押すと、@file{chap1.tex} にジャンプします。 3.100 3.101 @@ -1228,8 +1250,10 @@ 3.102 この機能は @code{begin/end}, @code{%#BEGIN/%#END} 間のジャンプに対しては 3.103 (意味がないと思われるので)機能しないので注意してください。 3.104 3.105 -@section{お絵描きツール起動} 3.106 -@cindex お絵描きツール起動[おえかきつーるきとう] 3.107 +@node お絵描きツール起動, メインファイルへのジャンプ, 対応オブジェクトへのジャンプ, Cursor jump 3.108 +@comment node-name, next, previous, up 3.109 +@section お絵描きツール起動 3.110 +@cindex お絵描きツール起動[おえかきつうるきとう] 3.111 3.112 上記の「画像ファイルの取り込みマクロ」とは、例えば 3.113 @code{\epsfile@{file=foo@}} のような挿絵取り込みコマンドのことで、この行に 3.114 @@ -1262,6 +1286,8 @@ 3.115 ルにかぎらず、任意の形式のファイルを任意のプロセッサで処理するコマンドを簡 3.116 単に呼び出すことができます。 3.117 3.118 +@node メインファイルへのジャンプ, 環境を単位としたジャンプ, お絵描きツール起動, Cursor jump 3.119 +@comment node-name, next, previous, up 3.120 @section メインファイルへのジャンプ 3.121 3.122 @file{chap1.tex}のようなサブファイルで、 3.123 @@ -1278,6 +1304,8 @@ 3.124 オープンしていない場合は、カレントディレクトリから探して自動的にオープンし 3.125 ます。 3.126 3.127 +@node 環境を単位としたジャンプ, 最後の補完位置へのジャンプ, メインファイルへのジャンプ, Cursor jump 3.128 +@comment node-name, next, previous, up 3.129 @section 環境を単位としたジャンプ 3.130 3.131 さらに現在の環境を単位として機能するコマンドに以下のものがあります。 3.132 @@ -1300,7 +1328,14 @@ 3.133 上記のコマンドは通常の@kbd{[prefix]}キーではなく@kbd{META}キーをプリフィク 3.134 スとして機能するのでご注意下さい。 3.135 3.136 - 3.137 +@node 最後の補完位置へのジャンプ, , 環境を単位としたジャンプ, Cursor jump 3.138 +@comment node-name, next, previous, up 3.139 +@section 最後の補完位置へのジャンプ 3.140 + 3.141 +野鳥は補完入力した位置を常にレジスタ @code{3}に保存しています。 3.142 +入力途中で如何なるファイルの如何なる位置に行ったとしても、 3.143 +@kbd{C-x j 3}(@code{jump-to-register})を使って直ちに最後の補完入力位置に戻 3.144 +ることができます。 3.145 3.146 @node Modifying/Deleting, Filling, Cursor jump, Top 3.147 @comment node-name, next, previous, up 3.148 @@ -1486,14 +1521,14 @@ 3.149 3.150 @noindent 3.151 現在編集中のファイルを @code{\includeonly} のリストに加えたい時には@kbd{a} 3.152 -を、現在編集中のファイルだけを @code{\includeonly} にしたい時は@kbd{R}を、 3.153 +を、現在編集中のファイルだけを @code{\includeonly} にしたい時は@kbd{r}を、 3.154 @code{\includeonly} の行をコメントアウトして無効化したい時には、@kbd{%}を 3.155 それぞれ押して下さい。 3.156 3.157 @node What column, Intelligent newline, Includeonly, Top 3.158 @comment node-name, next, previous, up 3.159 @chapter ここはどこ? 3.160 -@cindex ここどこ?[ここはとこ] 3.161 +@cindex ここはどこ?[ここはとこ?] 3.162 @cindex prefix & 3.163 @cindex 複雑なtabular[ふくさつなtabular] 3.164 3.165 @@ -1531,7 +1566,6 @@ 3.166 @chapter おまかせ改行 3.167 @cindex おまかせ改行[おまかせかいきよう] 3.168 @cindex &入力[&にゆうりよく] 3.169 -@cindex prefix & 3.170 3.171 tabular[*], array, itemize, enumerate, tabbing 環境をbegin型補完で入力し 3.172 た時、または各環境内で 3.173 @@ -1576,7 +1610,7 @@ 3.174 @node Changing mode of YaTeX, Online help, Intelligent newline, Top 3.175 @comment node-name, next, previous, up 3.176 @chapter 野鳥の動作モード切り替え 3.177 -@cindex モード切り替え[もーときりかえ] 3.178 +@cindex モード切り替え[もうときりかえ] 3.179 @cindex prefix w 3.180 3.181 @table @kbd
4.1 --- a/help/YATEXHLP.eng Tue Dec 16 13:34:57 1997 +0000 4.2 +++ b/help/YATEXHLP.eng Mon Oct 26 12:05:32 1998 +0000 4.3 @@ -800,7 +800,8 @@ 4.4 spacing is suppressed. 4.5 *{N}{PRE} : equivalent to writing N copies of PRE in the preamble. PRE 4.6 may contain *{N'}{EXP'} expressions. 4.7 - p{LEN} : makes entry in parbox of width LEN. 4.8 + p{LEN} : makes entry in parbox of width LEN. This is useful when 4.9 + each column contains long sentences. 4.10 4.11 [[Usable commands in array, tabular environment]] 4.12 \multicolumn 4.13 @@ -815,7 +816,7 @@ 4.14 <refer extracolsep> 4.15 4.16 4.17 -See below as sample. 4.18 +See below as an example. 4.19 4.20 \LaTeX Expression Printed image 4.21 \begin{array}{ccr} 4.22 @@ -833,6 +834,18 @@ 4.23 \end{array} 4.24 \right)\] 4.25 4.26 +\begin{tabular}{lp{0.7\textwidth} 4.27 + \hline ---------------------------- 4.28 + \verb|.| & Period matches with . Period matches with any 4.29 + any single character.\\ single character. 4.30 + \verb|*| & Asterisk matches with * Asterisk matches with 0 4.31 + 0 or more repetition or more repetition of 4.32 + of preceding regexp. preceding regexp. 4.33 +\\ \hline ---------------------------- 4.34 +\end{tabular} 4.35 + 4.36 +(End of example) 4.37 + 4.38 \right(, \left) or \right{, left} or \right[, \left] or \right|, \left| 4.39 can enclose whole of array environment by parentheses, braces, brackets, 4.40 norm respectively. The number of `\right's and `\left's should be the
5.1 --- a/help/YATEXHLP.jp Tue Dec 16 13:34:57 1997 +0000 5.2 +++ b/help/YATEXHLP.jp Mon Oct 26 12:05:32 1998 +0000 5.3 @@ -801,6 +801,7 @@ 5.4 \arraycolsep や \tabcolsep のスペーシングは抑制される 5.5 *{N}{PRE} PREを N 回書いたのと同様の作用 5.6 p{LEN} そのカラムをLENの長さのparboxエントリとして作成する 5.7 + 表の項目に長い説明分が含まれる場合に用いると良い。 5.8 5.9 【array, tabular 環境で使えるコマンド】 5.10 \multicolumn 5.11 @@ -833,6 +834,17 @@ 5.12 \end{array} 5.13 \right)\] 5.14 5.15 +\begin{tabular}{lp{0.7\textwidth} 5.16 + \hline ---------------------------- 5.17 + \verb|.| & ピリオドは任意の . ピリオドは任意の一文字 5.18 + 一文字にマッチします。\\ にマッチします。 5.19 + \verb|*| & アスタリスクは直前の * アスタリスクは直前の正規 5.20 + 正規表現が0回以上繰り返し 表現が回以上繰り返し現れ 5.21 + 現れることを意味します。 ることを意味します。 5.22 +\\ \hline ---------------------------- 5.23 +\end{tabular} 5.24 + 5.25 + 5.26 array環境を \right( \left) で囲むと配列自体を大きな括弧で括る。同様に、 5.27 \right\{ \left\} で配列を中括弧で、\right[ \left] で配列を大括弧で、 5.28 \right| \left| で配列をノルム記号(絶対値記号)で括ることができる。 5.29 @@ -1405,6 +1417,17 @@ 5.30 野鳥を使うTipsをまとめた「あなたもわたしも野鳥の…」というWWWペー 5.31 ジを作成して下さいました。 5.32 5.33 +小原功任さん(神戸大学) 5.34 + AMS-LaTeXでの数式環境の不足分定義と、\[ .. \] ではfillしない事を 5.35 + 指摘して頂きました。 5.36 + 5.37 +竹内 奏吾さん(電通大) 5.38 + YaTeX-section-overview の不具合を修正するパッチを送って頂きました。 5.39 + 5.40 +宇佐見 Kousukeさん() 5.41 + 数式モードでのセクション型マクロ対応の要望と足すべきマクロ一覧を 5.42 + 頂きました。 5.43 + 5.44 yatex 5.45 (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) 5.46 <refer YaTeX>
6.1 --- a/yahtml.el Tue Dec 16 13:34:57 1997 +0000 6.2 +++ b/yahtml.el Mon Oct 26 12:05:32 1998 +0000 6.3 @@ -1,7 +1,9 @@ 6.4 ;;; -*- Emacs-Lisp -*- 6.5 ;;; (c ) 1994-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 6.6 -;;; Last modified Tue Dec 16 21:10:05 1997 on crx 6.7 +;;; Last modified Mon Oct 26 19:57:36 1998 on firestorm 6.8 ;;; $Id$ 6.9 +(defconst yahtml-revision-number "1.65.5" 6.10 + "Revision number of running yatex.el") 6.11 6.12 ;;;[Installation] 6.13 ;;; 6.14 @@ -121,8 +123,7 @@ 6.15 ;;; (lisp変数 yahtml-www-browser の設定をお忘れな 6.16 ;;; く。お推めは "netscape" で、ねすけの場合既にねす 6.17 ;;; けが起動されていた場合そのねすけに Reload 命令を 6.18 -;;; 送るという芸当が出来ます。ただし今のところX版の 6.19 -;;; ねすけちゃんだけ) 6.20 +;;; 送るという芸当が出来ます) 6.21 ;;; * [prefix] a YaTeX のアクセント記号補完と同じです。 6.22 ;;; < > 等が入力できます。 6.23 ;;; 6.24 @@ -340,7 +341,7 @@ 6.25 6.26 (defvar yahtml-typeface-table 6.27 (append 6.28 - '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp") 6.29 + '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp") ("strike") 6.30 ("strong") ("var") ("b") ("i") ("tt") ("u") ("address") ("font")) 6.31 yahtml-env-table) 6.32 "Default completion table of typeface designator") 6.33 @@ -380,13 +381,14 @@ 6.34 (interactive) 6.35 (cond 6.36 ((and YaTeX-emacs-20 (fboundp 'coding-system-equal)) 6.37 - (if t (or (coding-system-equal 6.38 - yahtml-coding-system buffer-file-coding-system) 6.39 - (set-buffer-file-coding-system yahtml-coding-system)) 6.40 - ;;^v which is better? 6.41 - (let ((bmp (buffer-modified-p))) 6.42 + (let ((mp (buffer-modified-p)) 6.43 + (ud (memq buffer-file-coding-system 6.44 + '(undecided undecided-unix undecided-dos undecided-mac)))) 6.45 + (if (coding-system-equal 6.46 + yahtml-coding-system buffer-file-coding-system) 6.47 + nil ; if coding-system is the same, do nothing 6.48 (set-buffer-file-coding-system yahtml-coding-system) 6.49 - (set-buffer-modified-p bmp)))) 6.50 + (if ud (set-buffer-modified-p mp))))) 6.51 ((featurep 'mule) 6.52 (set-file-coding-system yahtml-coding-system)) 6.53 ((boundp 'NEMACS) 6.54 @@ -636,7 +638,7 @@ 6.55 6.56 (defvar yahtml-completing-buffer nil) 6.57 (defun yahtml-collect-labels (&optional file) 6.58 - "Collect current buffers label (<a name=...>). 6.59 + "Collect current buffers label (<?? name=...>). 6.60 If optional argument FILE is specified collect labels in FILE." 6.61 (let (list bound) 6.62 (save-excursion 6.63 @@ -645,10 +647,10 @@ 6.64 (set-buffer (find-file-noselect file)))) 6.65 (save-excursion 6.66 (goto-char (point-min)) 6.67 - (while (re-search-forward "<a\\b" nil t) 6.68 + (while (re-search-forward "<\\w+\\b" nil t) 6.69 (setq bound (match-end 0)) 6.70 (search-forward ">" nil t) 6.71 - (if (and (re-search-backward "\\(name\\|id\\)=" bound t) 6.72 + (if (and (re-search-backward "\\(name\\|id\\)\\s *=" bound t) 6.73 (progn 6.74 (goto-char (match-end 0)) 6.75 (skip-chars-forward " \t\n") 6.76 @@ -863,7 +865,9 @@ 6.77 6.78 (defun yahtml:font () 6.79 "Add-in function for `font'" 6.80 - (yahtml-make-optional-argument "color" (read-string "color="))) 6.81 + (concat 6.82 + (yahtml-make-optional-argument "color" (read-string "color=")) 6.83 + (yahtml-make-optional-argument "size" (read-string "size=")))) 6.84 6.85 ;;; ---------- Simple tag ---------- 6.86 (defun yahtml-insert-tag (region-mode &optional tag) 6.87 @@ -920,9 +924,9 @@ 6.88 "Convenient function to insert <p></p>" 6.89 (interactive "P") 6.90 (if arg (yahtml-insert-tag nil "p") 6.91 - (insert "<p>") 6.92 - (save-excursion 6.93 - (insert "</p>")))) 6.94 + (save-excursion ;insert "/p" first to memorize "p" 6.95 + (yahtml-insert-single "/p")) ;in the last-completion variable 6.96 + (yahtml-insert-single "p"))) 6.97 6.98 ;;; ---------- Jump ---------- 6.99 (defun yahtml-on-href-p () 6.100 @@ -1028,7 +1032,7 @@ 6.101 6.102 (defun yahtml-jump-to-name (name) 6.103 "Jump to html's named tag." 6.104 - (setq name (format "name\\s *=\\s *\"?%s\"?" name)) 6.105 + (setq name (format "\\(name\\|id\\)\\s *=\\s *\"?%s\"?" name)) 6.106 (or (and (re-search-forward name nil t) (goto-char (match-beginning 0))) 6.107 (and (re-search-backward name nil t) (goto-char (match-beginning 0))) 6.108 (message "Named tag `%s' not found" (substring href 1)))) 6.109 @@ -1110,6 +1114,61 @@ 6.110 (concat yahtml-image-viewer " " image)) 6.111 (message "Invoking %s %s...Done" yahtml-image-viewer image))))) 6.112 6.113 +(defun yahtml-get-attrvalue (attr) 6.114 + "Extract current tag's attribute value from buffer." 6.115 + (let (e (case-fold-search t)) 6.116 + (save-excursion 6.117 + (or (looking-at "<") 6.118 + (progn (skip-chars-backward "^<") (backward-char 1))) 6.119 + (setq e (save-excursion (forward-list 1) (point))) 6.120 + (if (and 6.121 + (re-search-forward (concat "\\b" attr "\\b") e t) 6.122 + (progn (skip-chars-forward " \t\n=") 6.123 + (looking-at "\"?\\([^\"> \t\n]+\\)\"?"))) 6.124 + (YaTeX-match-string 1))))) 6.125 + 6.126 +(defun yahtml-goto-corresponding-source (&optional other) 6.127 + "Goto applet's source." 6.128 + (let ((env (yahtml-current-tag)) s (p (point))) 6.129 + (cond 6.130 + ((string-match "applet" env) 6.131 + (if (setq s (yahtml-get-attrvalue "code")) 6.132 + (progn 6.133 + (setq s (YaTeX-match-string 1) 6.134 + s (concat 6.135 + (substring s 0 (string-match "\\.[A-Za-z]+$" s)) 6.136 + ".java")) 6.137 + (if other (YaTeX-switch-to-buffer-other-window s) 6.138 + (YaTeX-switch-to-buffer s)) 6.139 + s) ;return source file name 6.140 + (message "No applet source specified") 6.141 + (sit-for 1) 6.142 + nil)) 6.143 + ((string-match "!--#include" env) 6.144 + (cond 6.145 + ((setq s (yahtml-get-attrvalue "file")) ;<!--#include file="foo"--> 6.146 + (if other (YaTeX-switch-to-buffer-other-window s) 6.147 + (YaTeX-switch-to-buffer s)) 6.148 + s) 6.149 + ((setq s (yahtml-get-attrvalue "virtual"));<!--#include virtual="foo"--> 6.150 + (setq s (yahtml-url-to-path s)) 6.151 + (if other (YaTeX-switch-to-buffer-other-window s) 6.152 + (YaTeX-switch-to-buffer s)) 6.153 + s))) 6.154 + ((and (string-match "!--#exec" env) 6.155 + (setq s (yahtml-get-attrvalue "cmd"))) 6.156 + (setq s (substring s 0 (string-match " \t\\?" s))) ;get argv0 6.157 + (let ((b " *yahtmltmp*")) ;peek a little 6.158 + (unwind-protect 6.159 + (progn 6.160 + (set-buffer (get-buffer-create b)) 6.161 + (insert-file-contents s nil 0 100) 6.162 + (if (looking-at "#!") 6.163 + (if other (YaTeX-switch-to-buffer-other-window s) 6.164 + (YaTeX-switch-to-buffer s)))) 6.165 + (kill-buffer (get-buffer b))) 6.166 + (get-file-buffer s)))))) 6.167 + 6.168 (defun yahtml-goto-corresponding-* (&optional other) 6.169 "Go to corresponding object." 6.170 (interactive) 6.171 @@ -1117,6 +1176,7 @@ 6.172 ((yahtml-goto-corresponding-href other)) 6.173 ((yahtml-goto-corresponding-img)) 6.174 ((yahtml-goto-corresponding-begend)) 6.175 + ((yahtml-goto-corresponding-source other)) 6.176 (t (message "I don't know where to go.")) 6.177 )) 6.178 6.179 @@ -1132,7 +1192,7 @@ 6.180 6.181 ;;; ---------- killing ---------- 6.182 (defun yahtml-kill-begend (&optional whole) 6.183 - (let ((tag (yahtml-on-begend-p)) p q r) 6.184 + (let ((tag (yahtml-on-begend-p)) p q r bbolp) 6.185 (if tag 6.186 (save-excursion 6.187 (or (looking-at "<") 6.188 @@ -1147,23 +1207,26 @@ 6.189 (setq q (point))) ;now q has end-line's (point) 6.190 (if (not whole) 6.191 (kill-region 6.192 - (progn (skip-chars-backward " \t") (if (bolp) (point) q)) 6.193 + (progn (skip-chars-backward " \t") 6.194 + (if (setq bbolp (bolp)) (point) q)) 6.195 (progn (forward-list 1) 6.196 (setq r (point)) 6.197 (skip-chars-forward " \t") 6.198 - (if (and (eolp) (not (eobp))) (1+ (point)) r)))) 6.199 + (if (and bbolp (eolp) (not (eobp))) (1+ (point)) r)))) 6.200 (goto-char p) 6.201 (skip-chars-backward " \t") 6.202 (if (not whole) 6.203 (progn 6.204 (kill-append 6.205 (buffer-substring 6.206 - (setq p (if (bolp) (point) p)) 6.207 + (setq p (if (setq bbolp (bolp)) (point) p)) 6.208 (setq q (progn 6.209 (forward-list 1) 6.210 (setq r (point)) 6.211 (skip-chars-forward " \t") 6.212 - (if (and (eolp) (not (eobp))) (1+ (point)) r)))) 6.213 + (if (and bbolp (eolp) (not (eobp))) 6.214 + (1+ (point)) 6.215 + r)))) 6.216 t) 6.217 (delete-region p q)) 6.218 (kill-region 6.219 @@ -1271,6 +1334,7 @@ 6.220 (setq tag (if yahtml-prefer-upcases (upcase tag) (downcase tag))) 6.221 (insert (format "%s%s" tag (yahtml-addin tag))) 6.222 (goto-char q) 6.223 + (set-marker q nil) 6.224 (delete-region (point) (progn (skip-chars-forward "^>") (point))) 6.225 (insert tag)))) 6.226 t)))) 6.227 @@ -1305,6 +1369,8 @@ 6.228 'yahtml-tmp-form-table))) 6.229 (delete-region beg end) 6.230 (goto-char beg) 6.231 + (set-marker beg nil) 6.232 + (set-marker end nil) 6.233 (insert new) 6.234 t) 6.235 (goto-char p) 6.236 @@ -1388,8 +1454,10 @@ 6.237 6.238 (defun yahtml-fill-paragraph (arg) 6.239 (interactive "P") 6.240 - (let*((case-fold-search t) (p (point)) 6.241 + (let*((case-fold-search t) (p (point)) fill-prefix 6.242 (e (or (yahtml-inner-environment-but "^\\(a\\|p\\)\\b" t) "html")) 6.243 + indent 6.244 + (startp (get 'YaTeX-inner-environment 'point)) 6.245 (prep (string-match "^pre$" e)) 6.246 (ps1 (if prep (default-value 'paragraph-start) 6.247 paragraph-start)) 6.248 @@ -1401,6 +1469,12 @@ 6.249 (progn 6.250 (if prep 6.251 (fset 'move-to-column 'yahtml-move-to-column)) 6.252 + (save-excursion 6.253 + (beginning-of-line) 6.254 + (indent-to-column (yahtml-this-indent)) 6.255 + (setq fill-prefix 6.256 + (buffer-substring (point) (point-beginning-of-line))) 6.257 + (delete-region (point) (point-beginning-of-line))) 6.258 (fill-region-as-paragraph 6.259 (progn (re-search-backward paragraph-start nil t) 6.260 (or (save-excursion 6.261 @@ -1414,7 +1488,9 @@ 6.262 (point))) 6.263 (progn (goto-char p) 6.264 (re-search-forward ps2 nil t) 6.265 - (match-beginning 0)))) 6.266 + (match-beginning 0) 6.267 + 6.268 + ))) 6.269 (fset 'move-to-column yahtml-saved-move-to-column))))) 6.270 6.271 ;(defun yahtml-indent-new-commnet-line () 6.272 @@ -1450,9 +1526,8 @@ 6.273 (and (bolp) (skip-chars-forward " \t"))) 6.274 (yahtml-indent-line-real)))) 6.275 6.276 -(defun yahtml-indent-line-real () 6.277 - (interactive) 6.278 - (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir") 6.279 +(defun yahtml-this-indent () 6.280 + (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir\\|font") 6.281 (itemizing-envs "^\\([uod]l\\|menu\\|dir\\)$") 6.282 (itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)\\b") 6.283 inenv p col peol (case-fold-search t)) 6.284 @@ -1471,17 +1546,16 @@ 6.285 (skip-chars-forward " \t") 6.286 (cond ;lookup current line's tag 6.287 ((looking-at (concat "</\\(" envs "\\)>")) 6.288 - (YaTeX-reindent col)) 6.289 + col) 6.290 ((looking-at itms) 6.291 - (YaTeX-reindent (+ col yahtml-environment-indent))) 6.292 + (+ col yahtml-environment-indent)) 6.293 ((and yahtml-hate-too-deep-indentation 6.294 (looking-at (concat "<\\(" envs "\\)"))) 6.295 - (YaTeX-reindent (+ col (* 2 yahtml-environment-indent)))) 6.296 + (+ col (* 2 yahtml-environment-indent))) 6.297 ((and (< p (point)) 6.298 (string-match itemizing-envs inenv) 6.299 (save-excursion 6.300 (and 6.301 - ;;(re-search-backward itms p t) 6.302 (setq op (point)) 6.303 (goto-char p) 6.304 (re-search-forward itms op t) 6.305 @@ -1492,22 +1566,28 @@ 6.306 (setq col (if (looking-at "$") 6.307 (+ col yahtml-environment-indent) 6.308 (current-column))))))) 6.309 - (YaTeX-reindent col)) 6.310 + col) 6.311 (t 6.312 - (YaTeX-reindent (+ col yahtml-environment-indent))))))) 6.313 - (and (bolp) (skip-chars-forward " \t")) 6.314 - (if (and (setq inenv (yahtml-on-begend-p)) 6.315 - (string-match 6.316 - (concat "^\\<\\(" yahtml-struct-name-regexp "\\)") inenv)) 6.317 - (save-excursion 6.318 - (setq peol (point-end-of-line)) 6.319 - (or (= (char-after (point)) ?<) 6.320 - (progn (skip-chars-backward "^<") (forward-char -1))) 6.321 - (setq col (current-column)) 6.322 - (if (and (yahtml-goto-corresponding-begend t) 6.323 - (> (point) peol)) ;if on the different line 6.324 - (YaTeX-reindent col))))) 6.325 - (and (bolp) (skip-chars-forward " \t")))) 6.326 + (+ col yahtml-environment-indent))))) 6.327 + (t col))))) 6.328 + 6.329 +(defun yahtml-indent-line-real () 6.330 + "Indent current line." 6.331 + (interactive) 6.332 + (YaTeX-reindent (yahtml-this-indent)) 6.333 + (if (bolp) (skip-chars-forward " \t")) 6.334 + (let (peol col) 6.335 + (if (and (setq inenv (yahtml-on-begend-p)) 6.336 + (string-match 6.337 + (concat "^\\<\\(" yahtml-struct-name-regexp "\\)") inenv)) 6.338 + (save-excursion 6.339 + (setq peol (point-end-of-line)) 6.340 + (or (= (char-after (point)) ?<) 6.341 + (progn (skip-chars-backward "^<") (forward-char -1))) 6.342 + (setq col (current-column)) 6.343 + (if (and (yahtml-goto-corresponding-begend t) 6.344 + (> (point) peol)) ;if on the different line 6.345 + (YaTeX-reindent col)))))) 6.346 6.347 ;(defun yahtml-fill-item () 6.348 ; "Fill item HTML version" 6.349 @@ -1768,7 +1848,7 @@ 6.350 ;; include&exec 6.351 ("<!--#\\(include\\|exec\\)" "-->" include) 6.352 ;; string 6.353 - (hilit-string-find 39 string) 6.354 + (hilit-string-find ?\\ string) 6.355 (yahtml-hilit-region-tag "\\(em\\|strong\\)" bold) 6.356 ("</?[uod]l>" 0 decl) 6.357 ("<\\(di\\|dt\\|li\\|dd\\)>" 0 label) 6.358 @@ -1799,6 +1879,7 @@ 6.359 (cons (cons 'yahtml-mode yahtml-hilit-patterns-alist) 6.360 hilit-patterns-alist)))) 6.361 6.362 +(run-hooks 'yahtml-load-hook) 6.363 (provide 'yahtml) 6.364 6.365 ; Local variables:
7.1 --- a/yatex.el Tue Dec 16 13:34:57 1997 +0000 7.2 +++ b/yatex.el Mon Oct 26 12:05:32 1998 +0000 7.3 @@ -1,8 +1,8 @@ 7.4 ;;; -*- Emacs-Lisp -*- 7.5 ;;; Yet Another tex-mode for emacs. 7.6 -;;; yatex.el rev. 1.65 7.7 -;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 7.8 -;;; Last modified Tue Dec 16 22:15:26 1997 on crx 7.9 +;;; yatex.el rev. 1.66 7.10 +;;; (c )1991-1998 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 7.11 +;;; Last modified Mon Oct 26 21:05:14 1998 on firestorm 7.12 ;;; $Id$ 7.13 7.14 ;; This program is free software; you can redistribute it and/or modify 7.15 @@ -16,22 +16,16 @@ 7.16 ;; GNU General Public License for more details. 7.17 7.18 ;; You should have received a copy of the GNU General Public License 7.19 -;; along with this program; see the file COPYING. If not, write to 7.20 -;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 7.21 +;; along with this program; see the file COPYING. If not, write to the 7.22 +;; Software Foundation Inc., 59 Temple Place - Suite 330, Boston, MA 7.23 +;; 02111-1307, USA. 7.24 7.25 (require 'comment) 7.26 (require 'yatexlib) 7.27 -(defconst YaTeX-revision-number "1.65" 7.28 +(defconst YaTeX-revision-number "1.66" 7.29 "Revision number of running yatex.el" 7.30 ) 7.31 ;---------- Local variables ---------- 7.32 -;;; 7.33 -;; Initialize local variable for yatex-mode. 7.34 -;; Preserving user preferred definitions. 7.35 -;; ** Check all of these defvar-ed values ** 7.36 -;; ** and setq other values more suitable ** 7.37 -;; ** for your site, if needed. ** 7.38 -;;; 7.39 (defvar YaTeX-prefix "\C-c" 7.40 "*Prefix key to call YaTeX functions. 7.41 You can select favorite prefix key by setq in your ~/.emacs." 7.42 @@ -139,7 +133,7 @@ 7.43 "*Regular expression of item command." 7.44 ) 7.45 (defvar YaTeX-sectioning-regexp 7.46 - "\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b" 7.47 + "part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\(\\*?\\|\\b\\)" 7.48 "*LaTeX sectioning commands regexp." 7.49 ) 7.50 (defvar YaTeX-paragraph-start 7.51 @@ -155,6 +149,7 @@ 7.52 (concat "^[ \t]*%\\|^[ \t]*$\\|^\C-l\\|\\\\\\\\$\\|^[ \t]*\\\\\\(" 7.53 YaTeX-sectioning-regexp ;sectioning commands 7.54 "\\|begin{\\|end{" ;special declaration 7.55 + "\\|\\[\\|\\]" 7.56 "\\|newpage\\b\\|vspace\\b" 7.57 "\\)") 7.58 "*Paragraph delimiter regexp of common LaTeX source. Use this value 7.59 @@ -182,6 +177,7 @@ 7.60 (concat 7.61 "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|" ;LaTeX 7.62 "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|" ;AMS-LaTeX 7.63 + "[bpvV]?matrix\\|smallmatrix\\|cases\\|" ;AMS-LaTeX 7.64 "xalignat\\*?\\|xxalignat\\*?") ;AMS-LaTeX 7.65 "*Regexp of environments where `&' becomes field delimiter.") 7.66 (defvar YaTeX-uncomment-once t 7.67 @@ -241,8 +237,13 @@ 7.68 ("newcommand" 2) ("renewcommand" 2) 7.69 ("setcounter" 2) ("newenvironment" 3) ("newtheorem" 2) 7.70 ("cline") ("framebox") ("savebox" 2) ("sbox" 2) ("newsavebox") ("usebox") 7.71 - ("date") ("put") ("ref") 7.72 - ("frac" 2) ("multicolumn" 3) ("shortstack") 7.73 + ("date") ("put") ("ref") ("pageref") 7.74 + ("multicolumn" 3) ("shortstack") 7.75 + ;; for mathmode accent 7.76 + ("tilde") ("hat") ("check") ("bar") ("dot") ("ddot") ("vec") 7.77 + ("widetilde") ("widehat") ("overline") ("overrightarrow") 7.78 + ;; section types in mathmode 7.79 + ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") 7.80 ) 7.81 "Default completion table for section-type completion." 7.82 ) 7.83 @@ -278,13 +279,14 @@ 7.84 7.85 (defvar singlecmd-table 7.86 (append 7.87 - '(("maketitle") ("sloppy") ("protect") 7.88 + '(("maketitle") ("makeindex") ("sloppy") ("protect") 7.89 ("LaTeX") ("TeX") ("item") ("item[]") ("appendix") ("hline") 7.90 ;;("rightarrow") ("Rightarrow") ("leftarrow") ("Leftarrow") 7.91 - ("pagebreak") ("newpage") ("clearpage") ("cleardoublepage") 7.92 + ("pagebreak") ("nopagebreak") 7.93 + ("newpage") ("clearpage") ("cleardoublepage") 7.94 ("footnotemark") ("verb") ("verb*") 7.95 ("linebreak") ("pagebreak") ("noindent") ("indent") 7.96 - ("left") ("right") 7.97 + ("left") ("right") ("dots") 7.98 ) 7.99 (if YaTeX-greek-by-maketitle-completion 7.100 '(("alpha") ("beta") ("gamma") ("delta") ("epsilon") 7.101 @@ -460,13 +462,14 @@ 7.102 (setq YaTeX-latex-message-code latex-message-kanji-code))) 7.103 7.104 (defvar YaTeX-mode-syntax-table nil 7.105 + 7.106 "*Syntax table for yatex-mode") 7.107 7.108 (if YaTeX-mode-syntax-table nil 7.109 (setq YaTeX-mode-syntax-table (make-syntax-table (standard-syntax-table))) 7.110 - (modify-syntax-entry ?\< "(>" YaTeX-mode-syntax-table) 7.111 - (modify-syntax-entry ?\> ")<" YaTeX-mode-syntax-table) 7.112 (modify-syntax-entry ?\n " " YaTeX-mode-syntax-table) 7.113 + (modify-syntax-entry ?\{ "(}" YaTeX-mode-syntax-table) 7.114 + (modify-syntax-entry ?\} "){" YaTeX-mode-syntax-table) 7.115 ) 7.116 7.117 ;---------- Provide YaTeX-mode ---------- 7.118 @@ -547,9 +550,15 @@ 7.119 (cond ((boundp 'MULE) 7.120 (set-file-coding-system YaTeX-coding-system)) 7.121 ((and YaTeX-emacs-20 (fboundp 'coding-system-equal)) 7.122 - (or (coding-system-equal 7.123 - YaTeX-coding-system buffer-file-coding-system) 7.124 - (set-buffer-file-coding-system YaTeX-coding-system))) 7.125 + (let ((mp (buffer-modified-p)) 7.126 + (ud (memq 7.127 + buffer-file-coding-system 7.128 + '(undecided undecided-unix undecided-dos undecided-mac)))) 7.129 + (if (coding-system-equal 7.130 + YaTeX-coding-system buffer-file-coding-system) 7.131 + nil ; if coding-system is the same, do nothing 7.132 + (set-buffer-file-coding-system YaTeX-coding-system) 7.133 + (if ud (set-buffer-modified-p mp))))) 7.134 ((featurep 'mule) 7.135 (set-file-coding-system YaTeX-coding-system)) 7.136 ((boundp 'NEMACS) 7.137 @@ -744,6 +753,7 @@ 7.138 Optional 4th arg CMD is LaTeX command name, for non-interactive use." 7.139 (interactive "P") 7.140 (setq YaTeX-current-completion-type 'section) 7.141 + (if (equal arg '(4)) (setq beg (region-beginning) end (region-end))) 7.142 (unwind-protect 7.143 (let* 7.144 ((source-window (selected-window)) 7.145 @@ -755,12 +765,12 @@ 7.146 (if (> (minibuffer-depth) 0) 7.147 (format "%s???{} (default %s)%s: " YaTeX-ec section-name 7.148 (format "[level:%d]" (minibuffer-depth))) 7.149 - (format "(C-v for view-section) %s???{} (default %s): " 7.150 - YaTeX-ec section-name))) 7.151 + (format "(C-v for view-section) %s???{%s} (default %s): " 7.152 + YaTeX-ec (if beg "region" "") section-name))) 7.153 nil))) 7.154 (section (if (string= section "") section-name section)) 7.155 (numarg ;; The number of section-type command's argument 7.156 - (or arg 7.157 + (or (and (numberp arg) arg) 7.158 (nth 1 (YaTeX-lookup-table section 'section)) 7.159 1)) 7.160 (arg-reader (intern-soft (concat "YaTeX::" section))) 7.161 @@ -776,7 +786,8 @@ 7.162 (set-marker e (point)) 7.163 (goto-char beg) 7.164 (insert YaTeX-ec section-name "{") 7.165 - (goto-char (marker-position e))) 7.166 + (goto-char e) 7.167 + (set-marker e nil)) 7.168 (use-global-map YaTeX-recursive-map) 7.169 (if (= numarg 0) (YaTeX-make-singlecmd section-name) 7.170 (progn (insert YaTeX-ec section-name) 7.171 @@ -830,6 +841,7 @@ 7.172 nil nil)))) 7.173 (if (string= fontsize "") 7.174 (setq fontsize fontsize-name)) 7.175 + (setq YaTeX-current-completion-type 'large) 7.176 (setq fontsize-name fontsize) 7.177 (YaTeX-update-table 7.178 (list fontsize-name) 7.179 @@ -840,10 +852,11 @@ 7.180 (insert "{\\" fontsize-name " ") 7.181 (exchange-point-and-mark) 7.182 (insert "}")) 7.183 - (insert "{\\" fontsize-name " }") 7.184 + (insert "{\\" fontsize-name " ") 7.185 (if YaTeX-current-position-register 7.186 (point-to-register YaTeX-current-position-register)) 7.187 - (forward-char -1))) 7.188 + (save-excursion 7.189 + (insert (YaTeX-addin fontsize-name) "}")))) 7.190 ) 7.191 7.192 (defun YaTeX-make-fontsize-region () 7.193 @@ -1171,7 +1184,7 @@ 7.194 (interactive "P") 7.195 (message 7.196 (concat "J)latex R)egion B)ibtex mk(I)ndex " 7.197 - (if (not YaTeX-dos) "K)ill-latex ") 7.198 + (if (fboundp 'start-process) "K)ill-latex ") 7.199 "P)review " 7.200 (and (boundp 'window-system) window-system "S)earch ") 7.201 "V)iewerr L)pr")) 7.202 @@ -1227,12 +1240,14 @@ 7.203 (while (re-search-forward "^%#\\(BEGIN\\)\\|\\(END\\)$" nil t) 7.204 (beginning-of-line) 7.205 (delete-region (point) (progn (forward-line 1) (point)))) 7.206 - (goto-char (marker-position b)) 7.207 + (goto-char b) 7.208 (open-line 1) 7.209 (delete-region (point) (progn (beginning-of-line)(point)));for 19 :-< 7.210 (insert "%#BEGIN") 7.211 - (goto-char (marker-position e)) 7.212 - (insert "%#END\n")) 7.213 + (goto-char e) 7.214 + (insert "%#END\n") 7.215 + (set-marker b nil) 7.216 + (set-marker e nil)) 7.217 ))) 7.218 ) 7.219 7.220 @@ -1251,28 +1266,30 @@ 7.221 If optional second argument OTHERWIN is non-nil, move to other window." 7.222 7.223 (let ((scmd "") label direc string blist (p (point)) (cb (current-buffer)) 7.224 - (refcommands "label\\|ref\\|cite\\|bibitem") 7.225 + (refcommands "label\\|\\(page\\)?ref\\|cite\\|bibitem") 7.226 (func (function (lambda (string sfunc) 7.227 (or 7.228 (funcall sfunc string nil t) 7.229 - (funcall (if (eq sfunc 'search-forward) 7.230 - 'search-backward 'search-forward) 7.231 + (funcall (if (eq sfunc 're-search-forward) 7.232 + 're-search-backward 're-search-forward) 7.233 string nil t)))))) 7.234 (cond 7.235 ((YaTeX-on-section-command-p refcommands) 7.236 (setq scmd (cdr (assoc (YaTeX-match-string 1) 7.237 - '(("label" . "ref") ("ref" . "label") 7.238 + '(("label" . "\\(page\\)?ref") ("ref" . "label") 7.239 + ("pageref" . "label") 7.240 ("cite" . "bibitem") ("bibitem" . "cite"))))) 7.241 (goto-char (match-end 0)) 7.242 (let ((label (buffer-substring 7.243 (1- (point)) (progn (backward-list 1) (1+ (point)))))) 7.244 - (setq string (concat "\\" scmd "{" label "}")) 7.245 + ;(setq string (concat "\\" scmd "{" label "}")) 7.246 + (setq string (concat "\\\\" scmd "{" (regexp-quote label) "}")) 7.247 (setq direc (if (string-match "ref\\|cite" scmd) 7.248 - 'search-forward 'search-backward)) 7.249 + 're-search-forward 're-search-backward)) 7.250 (if YaTeX-current-position-register 7.251 (point-to-register YaTeX-current-position-register)) 7.252 - (if reverse (setq direc (if (eq direc 'search-forward) 7.253 - 'search-backward 'search-forward))) 7.254 + (if reverse (setq direc (if (eq direc 're-search-forward) 7.255 + 're-search-backward 're-search-forward))) 7.256 (if (funcall func string direc) ;label/ref found! 7.257 (progn 7.258 (if otherwin 7.259 @@ -1322,8 +1339,9 @@ 7.260 (setq blist (cdr blist))))) 7.261 ) 7.262 (if YaTeX-emacs-19 7.263 - (setq search-ring (cons string search-ring)) 7.264 - (setq search-last-string string))) 7.265 + (setq regexp-search-ring 7.266 + (cons string (delete string regexp-search-ring))) 7.267 + (setq search-last-regexp string))) 7.268 (t nil))) 7.269 ) 7.270 7.271 @@ -1459,6 +1477,7 @@ 7.272 ("\\\\postscriptbox{[^}]*}{[^}]*}{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 1) 7.273 ("\\\\\\(epsfbox\\|includegraphics\\|epsfig\\)\\*?{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 2) ;\epsfbox{hoge.ps} or \includegraphics{hoge.eps} 7.274 ("\\\\\\(psbox\\)\\(\\[[^]]+\\]\\)?{\\(\\([^,} ]*/\\)?[^} ]+\\)\\(\\.e?ps\\)}" 3) ;\psbox[options...]{hoge.eps} (97/1/11) 7.275 + ("\\\\input{\\([^} ]+\\)\\(\\.tps\\)}" 1) ;tgif2tex (1998/9/16) 7.276 ) 7.277 "See the documentation of YaTeX-processed-file-regexp-alist." 7.278 ) 7.279 @@ -1706,7 +1725,7 @@ 7.280 (if (> p (point)) (setq beg (1+ beg)) (forward-char 1)) 7.281 (funcall func YaTeX-comment-prefix beg (point) YaTeX-uncomment-once))) 7.282 (message "%sommented out current environment." 7.283 - (if (eq func 'comment-region) "C" "Un-c")) 7.284 + (if (eq func 'comment-out-region) "C" "Un-c")) 7.285 ) 7.286 7.287 (defun YaTeX-beginning-of-environment (&optional limit-search-bound end) 7.288 @@ -1781,12 +1800,12 @@ 7.289 (interactive) 7.290 (save-excursion 7.291 (if (YaTeX-on-begin-end-p) 7.292 - (let ((p (make-marker))) 7.293 - (set-marker p (point)) 7.294 + (let ((p (point-marker))) 7.295 (YaTeX-goto-corresponding-environment) 7.296 (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once) 7.297 - (goto-char (marker-position p)) 7.298 - (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once)) 7.299 + (goto-char p) 7.300 + (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once) 7.301 + (set-marker p nil)) 7.302 (if (YaTeX-on-comment-p) 7.303 (let*((fill-prefix "") 7.304 ;;append `^%' to head of paragraph delimiter. 7.305 @@ -1835,11 +1854,11 @@ 7.306 (kill-region 7.307 (progn 7.308 (goto-char b2) 7.309 - (skip-chars-backward " \t") 7.310 + (skip-chars-backward " \t%") 7.311 (if (bolp) (point) b2)) 7.312 e2)) 7.313 (goto-char b1) 7.314 - (skip-chars-backward " \t") 7.315 + (skip-chars-backward " \t%") 7.316 (if (not kill-contents) 7.317 (progn 7.318 (kill-append 7.319 @@ -1876,12 +1895,14 @@ 7.320 (skip-chars-forward "^{") 7.321 (forward-list 1) 7.322 (set-marker end (point)) 7.323 - (if kill-all (delete-region beg end) 7.324 + (if kill-all (kill-region beg end) 7.325 (goto-char beg) 7.326 - (delete-region 7.327 + (kill-region 7.328 (point) (progn (skip-chars-forward "^{" end) (1+ (point)))) 7.329 (goto-char end) 7.330 - (backward-delete-char 1)))) 7.331 + (set-marker end nil) 7.332 + (kill-append (buffer-substring (point) (1- (point))) nil) 7.333 + (delete-backward-char 1)))) 7.334 ) 7.335 7.336 (defun YaTeX-kill-paren (kill-contents) 7.337 @@ -1985,10 +2006,10 @@ 7.338 ((string= newenv env) (message "No need to change.")) 7.339 (t 7.340 (search-forward (concat "{" env) (point-end-of-line) t) 7.341 - (replace-match (concat "{" newenv)) 7.342 + (replace-match (concat "{" newenv) t) 7.343 (exchange-point-and-mark) 7.344 (search-forward (concat "{" env) (point-end-of-line) t) 7.345 - (replace-match (concat "{" newenv)))) 7.346 + (replace-match (concat "{" newenv) t))) 7.347 t))) 7.348 ) 7.349 7.350 @@ -2323,6 +2344,7 @@ 7.351 (cond 7.352 ((not (eq major-mode 'yatex-mode)) (fill-paragraph arg)) 7.353 ((YaTeX-quick-in-environment-p YaTeX-fill-inhibit-environments) nil) 7.354 + ((YaTeX-in-math-mode-p) nil) 7.355 (t 7.356 (save-excursion 7.357 (let ((verbrex (concat YaTeX-ec-regexp 7.358 @@ -2362,7 +2384,8 @@ 7.359 ;;(fill-paragraph arg) 7.360 (fill-region-as-paragraph (point-min) (point-max) arg) 7.361 (while spacelist 7.362 - (goto-char (marker-position (car poslist))) 7.363 + (goto-char (car poslist)) 7.364 + (set-marker (car poslist) nil) 7.365 (delete-char 1) 7.366 (insert (car spacelist)) 7.367 (setq spacelist (cdr spacelist) poslist (cdr poslist))) 7.368 @@ -2480,7 +2503,7 @@ 7.369 (+ (YaTeX-current-indentation) 7.370 (or additional 0) 7.371 YaTeX-environment-indent))))) 7.372 - depth iteminfo (p (point)) pp (peol (point-end-of-line)) 7.373 + sect depth iteminfo (p (point)) pp (peol (point-end-of-line)) 7.374 ;;inenv below is sometimes defined in YaTeX-indent-new-comment-line 7.375 (inenv (or (and (boundp 'inenv) inenv) (YaTeX-inner-environment t)))) 7.376 ;;(if NTT-jTeX ;;Do you need this section? 7.377 @@ -2498,11 +2521,9 @@ 7.378 (or inenv (setq inenv "document")) ;is the default environment 7.379 (cond 7.380 ((and (YaTeX-on-begin-end-p) (match-beginning 2)) ;if \end 7.381 - (save-excursion 7.382 - (beginning-of-line) 7.383 - (YaTeX-reindent (YaTeX-current-indentation)))) 7.384 + (YaTeX-reindent (YaTeX-current-indentation))) 7.385 ((string-match YaTeX-equation-env-regexp inenv) 7.386 - (YaTeX-indent-line-equation)) ;autoload-ed from yatex.env 7.387 + (YaTeX-indent-line-equation)) ;autoload-ed from yatexenv 7.388 (;(YaTeX-in-environment-p '("itemize" "enumerate" "description" "list")) 7.389 (string-match YaTeX-itemizing-env-regexp inenv) 7.390 ;;(YaTeX-on-item-p) ?? 7.391 @@ -2510,15 +2531,16 @@ 7.392 (if (save-excursion 7.393 (beginning-of-line) 7.394 (re-search-forward YaTeX-item-regexp peol t)) 7.395 - (save-excursion 7.396 - (goto-char (1+ (match-beginning 0))) 7.397 - (setq depth 7.398 - (* YaTeX-environment-indent 7.399 - (cond 7.400 - ((looking-at "subsubsub") 3) 7.401 - ((looking-at "subsub") 2) 7.402 - ((looking-at "sub") 1) 7.403 - (t 0)))) 7.404 + (progn 7.405 + (save-excursion 7.406 + (goto-char (1+ (match-beginning 0))) 7.407 + (setq depth 7.408 + (* YaTeX-environment-indent 7.409 + (cond 7.410 + ((looking-at "subsubsub") 3) 7.411 + ((looking-at "subsub") 2) 7.412 + ((looking-at "sub") 1) 7.413 + (t 0))))) 7.414 (funcall indent-relative depth)) 7.415 (YaTeX-reindent (or (car (cdr (YaTeX-get-item-info nil inenv))) 7.416 (+ (save-excursion 7.417 @@ -2532,10 +2554,13 @@ 7.418 (funcall indent-relative)) 7.419 ((YaTeX-on-section-command-p YaTeX-sectioning-regexp) 7.420 (require 'yatexsec) ;to know YaTeX-sectioning-level 7.421 + (setq sect (YaTeX-match-string 1)) 7.422 + (if (string-match "\\*$" sect) 7.423 + (setq sect (substring sect 0 -1))) 7.424 (YaTeX-reindent 7.425 (* (max 7.426 (1- ;I want chapter to have indentation 0 7.427 - (or (cdr (assoc (YaTeX-match-string 1) YaTeX-sectioning-level)) 7.428 + (or (cdr (assoc sect YaTeX-sectioning-level)) 7.429 0)) 7.430 0) 7.431 YaTeX-environment-indent)))
8.1 --- a/yatex.new Tue Dec 16 13:34:57 1997 +0000 8.2 +++ b/yatex.new Mon Oct 26 12:05:32 1998 +0000 8.3 @@ -1,6 +1,19 @@ 8.4 What's new in YaTeX 8.5 野鳥/yahtml - 各バージョンの変更点について 8.6 8.7 +1.66 \section*{} などの*つきセクションコマンドでインデントがずれるの 8.8 + を修正。 8.9 + [prefix] g でのlabel/ref検索をre-searchにしpagerefにも飛べるよう 8.10 + にした。またsearch-ringではなくregexp-search-ringを更新するので 8.11 + 継続検索は M-C-s or M-C-r で行うようになった。 8.12 + XEmacsでのラベル補完のバグフィクス。 8.13 + tgif2tex(*.tps) への [prefix] g を追加。 8.14 + Emacs20のsuppress-keymapの仕様が変わったので対処。 8.15 + Emacs20+yahtml でアイテム化タグでのfillがうまく行かなかったのを修正。 8.16 + yahtmlで <applet code=foo.class> という位置で [prefix] g したときに 8.17 + foo.java へ、#include ではそのファイル、#execではCGIスクリプトファ 8.18 + イルへジャンプするようにした。 8.19 + 8.20 1.65 yahtmlのお任せ改行のバグフィクス。 8.21 a, body, img タグのオプション引数入力アドインの強化。 8.22 section型マクロの第一引数が改行によって分断されていても正しく
9.1 --- a/yatex19.el Tue Dec 16 13:34:57 1997 +0000 9.2 +++ b/yatex19.el Mon Oct 26 12:05:32 1998 +0000 9.3 @@ -1,7 +1,7 @@ 9.4 ;;; -*- Emacs-Lisp -*- 9.5 ;;; YaTeX facilities for Emacs 19 9.6 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 9.7 -;;; Last modified Sun Dec 14 21:51:14 1997 on firestorm 9.8 +;;; Last modified Thu Jan 29 10:55:12 1998 on crx 9.9 ;;; $Id$ 9.10 9.11 ;;; とりあえず hilit19 を使っている時に色が付くようにして 9.12 @@ -314,8 +314,8 @@ 9.13 ;; formulas 9.14 ("[^\\]\\\\(" "\\\\)" formula) ; \( \) 9.15 ("[^\\]\\\\\\[" "\\\\\\]" formula) ; \[ \] 9.16 - ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\)" 9.17 - "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\).*}" 9.18 + ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\)" 9.19 + "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\).*}" 9.20 formula) 9.21 ("[^\\$]\\($\\($[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula); '$...$' or '$$...$$' 9.22
10.1 --- a/yatexadd.el Tue Dec 16 13:34:57 1997 +0000 10.2 +++ b/yatexadd.el Mon Oct 26 12:05:32 1998 +0000 10.3 @@ -1,8 +1,8 @@ 10.4 ;;; -*- Emacs-Lisp -*- 10.5 ;;; YaTeX add-in functions. 10.6 -;;; yatexadd.el rev.13 10.7 +;;; yatexadd.el rev.14 10.8 ;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 10.9 -;;; Last modified Wed Jun 25 21:21:13 1997 on domani 10.10 +;;; Last modified Mon Sep 28 13:03:37 1998 on firestorm 10.11 ;;; $Id$ 10.12 10.13 ;;; 10.14 @@ -67,7 +67,9 @@ 10.15 (while (not (string-match 10.16 (setq loc (read-key-sequence 10.17 (format "%s position (`%s') [%s]: " 10.18 - guide oneof pos)));name is in YaTeX-addin 10.19 + guide oneof pos));name is in YaTeX-addin 10.20 + loc (if (fboundp 'events-to-keys) 10.21 + (events-to-keys loc) loc)) 10.22 "\r\^g\n")) 10.23 (cond 10.24 ((string-match loc oneof) 10.25 @@ -91,7 +93,8 @@ 10.26 10.27 (defun YaTeX:table () 10.28 "YaTeX add-in function for table environment." 10.29 - (setq env-name "tabular") 10.30 + (setq env-name "tabular" 10.31 + section-name "caption") 10.32 (YaTeX:read-position "htbp") 10.33 ) 10.34 10.35 @@ -345,7 +348,8 @@ 10.36 (defun YaTeX::label-setup-key-map () 10.37 (if YaTeX-label-select-map nil 10.38 (message "Setting up label selection mode map...") 10.39 - (setq YaTeX-label-select-map (copy-keymap global-map)) 10.40 + ;(setq YaTeX-label-select-map (copy-keymap global-map)) 10.41 + (setq YaTeX-label-select-map (make-keymap)) 10.42 (suppress-keymap YaTeX-label-select-map) 10.43 (substitute-all-key-definition 10.44 'previous-line 'YaTeX::label-previous YaTeX-label-select-map) 10.45 @@ -379,7 +383,8 @@ 10.46 (interactive) (forward-line -1) (message YaTeX-label-guide-msg)) 10.47 (defun YaTeX::label-search-tag () 10.48 (interactive) 10.49 - (let ((case-fold-search t) (tag (regexp-quote (this-command-keys)))) 10.50 + (let ((case-fold-search t) 10.51 + (tag (regexp-quote (char-to-string last-command-char)))) 10.52 (cond 10.53 ((save-excursion 10.54 (forward-char 1) 10.55 @@ -447,6 +452,7 @@ 10.56 (use-local-map YaTeX-label-select-map) 10.57 (message YaTeX-label-guide-msg) 10.58 (goto-line (1+ initl)) ;goto recently defined label line 10.59 + (switch-to-buffer (current-buffer)) 10.60 (unwind-protect 10.61 (progn 10.62 (recursive-edit) 10.63 @@ -834,5 +840,64 @@ 10.64 (if (string= "" sname) (setq sname YaTeX-default-documentclass)) 10.65 (setq YaTeX-default-documentclass sname))))) 10.66 10.67 +(defun YaTeX:caption () 10.68 + (setq section-name "label") 10.69 + nil) 10.70 + 10.71 +;;; -------------------- math-mode stuff -------------------- 10.72 +(defun YaTeX::tilde (&optional pos) 10.73 + "For accent macros in mathmode" 10.74 + (cond 10.75 + ((equal pos 1) 10.76 + (message "Put accent on variable: ") 10.77 + (let ((v (char-to-string (read-char))) (case-fold-search nil)) 10.78 + (message "") 10.79 + (cond 10.80 + ((string-match "i\\|j" v) 10.81 + (concat "\\" v "math")) 10.82 + ((string-match "[\r\n\t ]" v) 10.83 + "") 10.84 + (t v)))) 10.85 + (nil ""))) 10.86 + 10.87 +(fset 'YaTeX::hat 'YaTeX::tilde) 10.88 +(fset 'YaTeX::check 'YaTeX::tilde) 10.89 +(fset 'YaTeX::bar 'YaTeX::tilde) 10.90 +(fset 'YaTeX::dot 'YaTeX::tilde) 10.91 +(fset 'YaTeX::ddot 'YaTeX::tilde) 10.92 +(fset 'YaTeX::vec 'YaTeX::tilde) 10.93 + 10.94 +(defun YaTeX::widetilde (&optional pos) 10.95 + "For multichar accent macros in mathmode" 10.96 + (cond 10.97 + ((equal pos 1) 10.98 + (let ((m "Put over chars[%s ]: ") v v2) 10.99 + (message m " ") 10.100 + (setq v (char-to-string (read-char))) 10.101 + (message "") 10.102 + (if (string-match "[\r\n\t ]" v) 10.103 + "" 10.104 + (message m v) 10.105 + (setq v2 (char-to-string (read-char))) 10.106 + (message "") 10.107 + (if (string-match "[\r\n\t ]" v2) 10.108 + v 10.109 + (concat v v2))))) 10.110 + (nil ""))) 10.111 + 10.112 +(fset 'YaTeX::widehat 'YaTeX::widetilde) 10.113 +(fset 'YaTeX::overline 'YaTeX::widetilde) 10.114 +(fset 'YaTeX::overrightarrow 'YaTeX::widetilde) 10.115 + 10.116 + 10.117 +;;; 10.118 +;; Add-in functions for large-type command. 10.119 +;;; 10.120 +(defun YaTeX:em () 10.121 + (cond 10.122 + ((eq YaTeX-current-completion-type 'large) "\\/") 10.123 + (t nil))) 10.124 +(fset 'YaTeX:it 'YaTeX:em) 10.125 + 10.126 ;;; -------------------- End of yatexadd -------------------- 10.127 (provide 'yatexadd)
11.1 --- a/yatexenv.el Tue Dec 16 13:34:57 1997 +0000 11.2 +++ b/yatexenv.el Mon Oct 26 12:05:32 1998 +0000 11.3 @@ -2,7 +2,7 @@ 11.4 ;;; YaTeX environment-specific functions. 11.5 ;;; yatexenv.el 11.6 ;;; (c ) 1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 11.7 -;;; Last modified Wed Jun 25 21:30:45 1997 on domani 11.8 +;;; Last modified Wed Jan 14 16:44:36 1998 on firestorm 11.9 ;;; $Id$ 11.10 11.11 ;;; 11.12 @@ -230,7 +230,7 @@ 11.13 (looking-at "\\\\right\\b")) 11.14 (progn (YaTeX-reindent 11.15 (save-excursion (YaTeX-goto-corresponding-leftright) 11.16 - (current-column)))) 11.17 + (1- (current-column))))) 11.18 (save-excursion 11.19 (forward-line -1) 11.20 (while (and (not (bobp)) (YaTeX-on-comment-p)) 11.21 @@ -250,7 +250,7 @@ 11.22 (setq depth (+ (YaTeX-current-indentation) mp))) 11.23 ((> l-r 0) 11.24 (beginning-of-line) 11.25 - (search-forward "\\left" peol) 11.26 + (search-forward "\\left" peol nil l-r) 11.27 (goto-char (1+ (match-beginning 0))) 11.28 (setq depth (current-column))) 11.29 ((< l-r 0) 11.30 @@ -258,7 +258,8 @@ 11.31 (YaTeX-goto-corresponding-leftright) 11.32 (beginning-of-line) 11.33 (skip-chars-forward " \t") 11.34 - (setq depth (+ (current-column) mp))) ;+mp is good? 11.35 + ;(setq depth (+ (current-column) mp)) ;+mp is good? 11.36 + (setq depth (current-column))) 11.37 (t ;if \left - \right = 0 11.38 (cond 11.39 ((re-search-forward "\\\\\\\\\\s *$" peol t)
12.1 --- a/yatexhie.el Tue Dec 16 13:34:57 1997 +0000 12.2 +++ b/yatexhie.el Mon Oct 26 12:05:32 1998 +0000 12.3 @@ -2,7 +2,7 @@ 12.4 ;;; YaTeX hierarchy browser. 12.5 ;;; yatexhie.el 12.6 ;;; (c )1995 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 12.7 -;;; Last modified Thu Feb 2 23:55:59 1995 on figaro 12.8 +;;; Last modified Thu Sep 17 21:46:29 1998 on firestorm 12.9 ;;; $Id$ 12.10 12.11 ;; ----- Customizable variables ----- 12.12 @@ -43,7 +43,7 @@ 12.13 (skip-chars-forward 12.14 (concat "^ \t\n\r" YaTeX-ec-regexp "{}")) 12.15 (point))))) 12.16 - ((match-beginning 3) 12.17 + ((and (match-beginning 3) (looking-at "{")) 12.18 (skip-chars-forward "{") 12.19 (setq file (buffer-substring 12.20 (point)
13.1 --- a/yatexhlp.el Tue Dec 16 13:34:57 1997 +0000 13.2 +++ b/yatexhlp.el Mon Oct 26 12:05:32 1998 +0000 13.3 @@ -1,8 +1,8 @@ 13.4 ;;; -*- Emacs-Lisp -*- 13.5 ;;; YaTeX helper with LaTeX commands and macros. 13.6 ;;; yatexhlp.el 13.7 -;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 13.8 -;;; Last modified Mon Apr 1 03:34:23 1996 on NSR 13.9 +;;; (c )1994,1998 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 13.10 +;;; Last modified Thu Mar 12 11:10:07 1998 on crx 13.11 ;;; $Id$ 13.12 13.13 (let ((help-file (concat "YATEXHLP." 13.14 @@ -10,6 +10,7 @@ 13.15 (t "eng")))) 13.16 (help-dir 13.17 (cond 13.18 + ((and (boundp 'site-directory) site-directory) site-directory) 13.19 (YaTeX-emacs-19 (expand-file-name "../../site-lisp" doc-directory)) 13.20 (t exec-directory)))) 13.21 (defvar YaTeX-help-file 13.22 @@ -17,8 +18,8 @@ 13.23 "*Help file of LaTeX/TeX commands or macros.") 13.24 (defvar YaTeX-help-file-private 13.25 (expand-file-name (concat "~/" help-file)) 13.26 - "*Private help file of LaTeX/TeX macros.") 13.27 -) 13.28 + "*Private help file of LaTeX/TeX macros.")) 13.29 + 13.30 (defvar YaTeX-help-delimiter "\C-_" "Delimiter of each help entry.") 13.31 (defvar YaTeX-help-entry-map (copy-keymap YaTeX-mode-map) 13.32 "Key map used in help entry.")
14.1 --- a/yatexlib.el Tue Dec 16 13:34:57 1997 +0000 14.2 +++ b/yatexlib.el Mon Oct 26 12:05:32 1998 +0000 14.3 @@ -2,7 +2,7 @@ 14.4 ;;; YaTeX and yahtml common libraries, general functions and definitions 14.5 ;;; yatexlib.el 14.6 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 14.7 -;;; Last modified Tue Dec 16 14:48:22 1997 on firestorm 14.8 +;;; Last modified Mon Oct 19 13:41:29 1998 on firestorm 14.9 ;;; $Id$ 14.10 14.11 ;; General variables 14.12 @@ -30,8 +30,8 @@ 14.13 1 (cond (YaTeX-dos 'shift_jis-dos) 14.14 ((member 'shift_jis (coding-system-list)) 'shift_jis-unix) 14.15 (t 'sjis))) 14.16 - '(2 . iso-2022-7bit-unix) 14.17 - '(3 . euc-japan)))) 14.18 + '(2 . iso-2022-jp-unix) 14.19 + '(3 . euc-jp-unix)))) 14.20 "Kanji-code expression translation table.") 14.21 (defvar YaTeX-inhibit-prefix-letter nil 14.22 "*T for changing key definitions from [prefix] Letter to [prefix] C-Letter.") 14.23 @@ -190,11 +190,11 @@ 14.24 (message 14.25 (cond 14.26 (YaTeX-japan 14.27 - "`%s'$B$NEPO?@h(B: U)$B%f!<%6<-=q(B L)$B%m!<%+%k<-=q(B N)$B%a%b%j(B D)$B$7$J$$(B") 14.28 + "`%s'の登録先: U)ユーザ辞書 L)ローカル辞書 N)メモリ D)しない") 14.29 (t 14.30 "Register `%s' into: U)serDic L)ocalDic N)one D)iscard")) 14.31 (if (> (length car-v) 23) 14.32 - (concat (substring car-v 0 10) "..." (substring car-v -10)) 14.33 + (concat (substring car-v 0 10) "..." (substring car-v -9)) 14.34 car-v)) 14.35 (setq answer (char-to-string (read-char)))) 14.36 (cond 14.37 @@ -486,10 +486,11 @@ 14.38 "Replace recursively OLDDEF with NEWDEF for any keys in KEYMAP now 14.39 defined as OLDDEF. In other words, OLDDEF is replaced with NEWDEF 14.40 where ever it appears." 14.41 - (mapcar 14.42 - (function (lambda (key) (define-key keymap key newdef))) 14.43 - (where-is-internal olddef keymap)) 14.44 -) 14.45 + (if YaTeX-emacs-19 14.46 + (substitute-key-definition olddef newdef keymap global-map) 14.47 + (mapcar 14.48 + (function (lambda (key) (define-key keymap key newdef))) 14.49 + (where-is-internal olddef keymap)))) 14.50 14.51 ;;;###autoload 14.52 (defun YaTeX-match-string (n &optional m) 14.53 @@ -798,11 +799,17 @@ 14.54 bindlist)))) 14.55 14.56 14.57 +;;; 14.58 +;; Functions for the Installation time 14.59 +;;; 14.60 14.61 (defun bcf-and-exit () 14.62 "Byte compile rest of argument and kill-emacs." 14.63 (if command-line-args-left 14.64 - (progn 14.65 + (let ((load-path (cons "." load-path))) 14.66 + (and (fboundp 'set-language-environment) 14.67 + (featurep 'mule) 14.68 + (set-language-environment "Japanese")) 14.69 (mapcar 'byte-compile-file command-line-args-left) 14.70 (kill-emacs)))) 14.71
15.1 --- a/yatexmth.el Tue Dec 16 13:34:57 1997 +0000 15.2 +++ b/yatexmth.el Mon Oct 26 12:05:32 1998 +0000 15.3 @@ -1,8 +1,8 @@ 15.4 ;;; -*- Emacs-Lisp -*- 15.5 ;;; YaTeX math-mode-specific functions. 15.6 ;;; yatexmth.el 15.7 -;;; (c )1993-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 15.8 -;;; Last modified Tue Nov 25 12:33:05 1997 on firestorm 15.9 +;;; (c )1993-1998 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 15.10 +;;; Last modified Wed Sep 30 21:26:29 1998 on firestorm 15.11 ;;; $Id$ 15.12 15.13 ;;; [Customization guide] 15.14 @@ -124,6 +124,7 @@ 15.15 ("!" "neg" ("--+\n |" YaTeX-image-neg)) 15.16 ("oo" "infty" ("oo" "∞")) 15.17 ("\\" "backslash" ("\\" "\")) 15.18 + ("..." "cdots" ("..." "…")) 15.19 15.20 ;;binary operators 15.21 ("+-" "pm" ("+\n-" "±")) 15.22 @@ -232,12 +233,36 @@ 15.23 ;;left and right 15.24 ("left" "left" "(leftmark)") 15.25 ("right" "right" "(rightmark)") 15.26 - ;other marks 15.27 + ;;accent marks 15.28 + ("tilde" "tilde" "~\n?") 15.29 + ("T" "tilde" "~\n?") 15.30 + ("wtilde" "widetilde" "~\n?") 15.31 + ("hat" "hat" "^\n?") 15.32 + ("what" "widehat" "/\\\n??") 15.33 + ("w^" "widehat" "/\\\n?") 15.34 + ("check" "check" "v\n?") 15.35 + ("bar" "bar" "_\n?") 15.36 + ("overline" "overline" "_\n?") 15.37 + ("wbar" "overline" "--\n??") 15.38 + ("dot" "dot" ".\n?") 15.39 + ("ddot" "ddot" "..\n??") 15.40 + ("vec" "vec" ("->\n??" "→\n??")) 15.41 + ("~>" "overrightarrow" ("-->\nAB" "→\nAB")) 15.42 + ("VEC" "overrightarrow" ("-->\nAB" "→\nAB")) 15.43 + ;;rage-aware stuffs 15.44 + ("prod" "prod" ("-+--+-\n | |" "Π")) 15.45 + ("CUP" "bigcup" "|~~|\n| |\n| |") 15.46 + ("union" "bigcup" "|~~|\n| |\n| |") 15.47 + ("CAP" "bigcap" "| |\n| |\n|__|") 15.48 + ("isc" "bigcap" "| |\n| |\n|__|") 15.49 + ("O+" "bigoplus" "/~~~\\\n| + |\n\\___/") 15.50 + ("Ox" "bigotimes" "/~~~\\\n| X |\n\\___/") 15.51 + ;;other marks 15.52 ("Z" "aleph" "|\\|") 15.53 ("|\\|" "aleph" "|\\|") 15.54 ("h-" "hbar" "_\nh") 15.55 - ("i" "imath" "i") 15.56 - ("j" "jmath" "j") 15.57 + ; ("i" "imath" "i") ;These chars are appeared only 15.58 + ; ("j" "jmath" "j") ;as section-type arguments 15.59 ("l" "ell" "l") 15.60 ("wp" "wp" "???") 15.61 ("R" "Re" ")R") 15.62 @@ -674,31 +699,25 @@ 15.63 ) 15.64 nil) 15.65 ))) 15.66 + (delete-region beg (point)) 15.67 (cond 15.68 - ((eq result t) 15.69 - (setq YaTeX-current-completion-type 'maketitle) 15.70 - 15.71 - ;;;(sit-for 1) 15.72 - (setq unread-command-char last-char) 15.73 - (insert (YaTeX-addin single-command))) 15.74 + ((memq result '(t select)) 15.75 + (if (eq result t) 15.76 + (setq unread-command-char last-char) 15.77 + (message "Done.")) 15.78 + (if (assoc single-command section-table) 15.79 + (YaTeX-make-section nil nil nil single-command) 15.80 + (setq YaTeX-current-completion-type 'maketitle) 15.81 + (YaTeX-make-singlecmd single-command))) 15.82 ((eq result 'abort) 15.83 - (delete-region beg (point)) 15.84 (message "Abort.")) 15.85 ((eq result 'escape) 15.86 - (delete-region beg (point)) 15.87 (call-interactively (global-key-binding this-key))) 15.88 - ((eq result 'select) 15.89 - (message "Done.") 15.90 - (setq YaTeX-current-completion-type 'maketitle) 15.91 - (insert (YaTeX-addin single-command))) 15.92 ((eq result 'exit) 15.93 - (delete-region beg (point)) 15.94 (YaTeX-toggle-math-mode)) 15.95 ((eq result 'menu) 15.96 - (delete-region beg (point)) 15.97 (setq key (concat "^" (regexp-quote (substring key 0 -1)))) 15.98 - (insert (YaTeX-math-show-menu key))))) 15.99 -) 15.100 + (insert (YaTeX-math-show-menu key)))))) 15.101 15.102 ;; ----- Change image completion types ----- 15.103 (defun YaTeX-math-member-p (item)
16.1 --- a/yatexprc.el Tue Dec 16 13:34:57 1997 +0000 16.2 +++ b/yatexprc.el Mon Oct 26 12:05:32 1998 +0000 16.3 @@ -2,7 +2,7 @@ 16.4 ;;; YaTeX process handler. 16.5 ;;; yatexprc.el 16.6 ;;; (c )1993-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 16.7 -;;; Last modified Thu Dec 11 16:16:21 1997 on crx 16.8 +;;; Last modified Mon Mar 9 11:44:29 1998 on crx 16.9 ;;; $Id$ 16.10 16.11 ;(require 'yatex) 16.12 @@ -22,6 +22,7 @@ 16.13 16.14 (defvar YaTeX-shell-command-option 16.15 (or (and (boundp 'shell-command-option) shell-command-option) 16.16 + (and (boundp 'shell-command-switch) shell-command-switch) 16.17 (if YaTeX-dos "/c" "-c")) 16.18 "Shell option for command execution.") 16.19 16.20 @@ -329,8 +330,8 @@ 16.21 "Kill process PROC after sending signal to PROC. 16.22 PROC should be process identifier." 16.23 (cond 16.24 - (YaTeX-dos 16.25 - (error "MS-DOS can't have concurrent process.")) 16.26 + ((not (fboundp 'start-process)) 16.27 + (error "This system can't have concurrent process.")) 16.28 ((or (null proc) (not (eq (process-status proc) 'run))) 16.29 (message "Typesetting process is not running.")) 16.30 (t 16.31 @@ -477,7 +478,7 @@ 16.32 nil t) 16.33 nil 16.34 (select-window cur-win) 16.35 - (error "No more erros on %s" cur-buf)) 16.36 + (error "No more errors on %s" cur-buf)) 16.37 (goto-char (match-beginning 0)) 16.38 (skip-chars-forward "^0-9" (match-end 0)) 16.39 (setq error-line
17.1 --- a/yatexsec.el Tue Dec 16 13:34:57 1997 +0000 17.2 +++ b/yatexsec.el Mon Oct 26 12:05:32 1998 +0000 17.3 @@ -1,8 +1,8 @@ 17.4 ;;; -*- Emacs-Lisp -*- 17.5 ;;; YaTeX sectioning browser. 17.6 ;;; yatexsec.el 17.7 -;;; (c ) 1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 17.8 -;;; Last modified Mon Feb 17 11:26:44 1997 on supra 17.9 +;;; (c ) 1994, 1998 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 17.10 +;;; Last modified Wed Sep 30 20:09:35 1998 on firestorm 17.11 ;;; $Id$ 17.12 17.13 (defvar YaTeX-sectioning-level 17.14 @@ -290,7 +290,7 @@ 17.15 (set-buffer cb) 17.16 (YaTeX-showup-buffer YaTeX-sectioning-buffer) ;show buffer 17.17 (goto-char (point-min)) 17.18 - (with-output-to-temp-buffer YaTeX-sectioning-buffer 17.19 + (let ((standard-output (get-buffer YaTeX-sectioning-buffer))) 17.20 (while (re-search-forward pattern nil t) 17.21 (goto-char (1+ (match-beginning 0))) 17.22 (setq level (YaTeX-get-sectioning-level) 17.23 @@ -373,8 +373,8 @@ 17.24 (if (and YaTeX-sectioning-buffer-parent 17.25 (get-buffer YaTeX-sectioning-buffer-parent) 17.26 (save-excursion 17.27 - (or (= (char-after (point)) ?\\ ) 17.28 - (skip-chars-backward "^\\\\" (point-beginning-of-line))) 17.29 + (beginning-of-line) 17.30 + (skip-chars-forward "^\\\\" (point-end-of-line)) 17.31 (YaTeX-on-section-command-p YaTeX-sectioning-regexp))) 17.32 (save-excursion 17.33 (or (buffer-name (get-buffer YaTeX-sectioning-buffer-parent)) 17.34 @@ -460,10 +460,13 @@ 17.35 nsc (YaTeX-shifted-section (YaTeX-match-string 1) n)) 17.36 (goto-char (match-beginning 0)) 17.37 (let (buffer-read-only) 17.38 - (delete-region (point) (progn (beginning-of-line) (point))) 17.39 + ;(delete-region (point) (progn (beginning-of-line) (point))) 17.40 + (delete-region (progn (beginning-of-line) (point)) 17.41 + (progn (skip-chars-forward " \t") (point))) 17.42 (indent-to-column (cdr (assoc nsc YaTeX-sectioning-level))) 17.43 (delete-region 17.44 - (1+ (point)) (progn (skip-chars-forward "^*{") (point))) 17.45 + (progn (skip-chars-forward "%\\\\") (point)) 17.46 + (progn (skip-chars-forward "^*{") (point))) 17.47 (insert nsc)) 17.48 (YaTeX-on-section-command-p YaTeX-sectioning-regexp) 17.49 (setq to (YaTeX-match-string 0)