yatex
changeset 49:eb0512bfcb7f
Abolish user-article table.
Use normal read-string instead.
Supply smart add-in function for documentstyle.
Update user dictionary whenever new words entered.
Enhance [prefix] c.
Allow user defined sectioning commands in yatexsec.
author | yuuji |
---|---|
date | Fri, 25 Nov 1994 08:26:13 +0000 |
parents | a0640ff3f72f |
children | b1e036697b20 |
files | docs/yatex.ref docs/yatexadd.doc docs/yatexe.tex docs/yatexj.tex help/YATEXHLP.jp yatex.el yatex.new yatex19.el yatexadd.el yatexenv.el yatexgen.el yatexhlp.el yatexlib.el yatexprc.el yatexsec.el |
diffstat | 15 files changed, 959 insertions(+), 314 deletions(-) [+] |
line diff
1.1 --- a/docs/yatex.ref Mon Oct 31 17:49:43 1994 +0000 1.2 +++ b/docs/yatex.ref Fri Nov 25 08:26:13 1994 +0000 1.3 @@ -8,7 +8,11 @@ 1.4 1.5 野鳥では、prefix キーをカスタマイズできるため(標準ではC-c)これを 1.6 [prefix] と表記します。C-c のまま変更していない場合、[prefix] a は 1.7 - C-c a を表わします。 1.8 + C-c a を表わします。begin型コマンドとは \begin〜\endの形式のコマ 1.9 + ンド、section型コマンドとは \section{題}のように引数を取るコマン 1.10 + ド、large型コマンドとは {\tt } のような中括弧で囲まれたフォント/ 1.11 + サイズ指定子、maketitle型コマンドとは \maketitle のように引数を 1.12 + 伴わないコマンドを指します。 1.13 1.14 1.15 【補完】 1.16 @@ -52,10 +56,10 @@ 1.17 1.18 ※は、MS-DOS では無効です。 1.19 1.20 - [prefix] tr の領域指定は、文書中の、 %#BEGIN と書いてある行から、 1.21 - %#END と書いてある行までです。%#END を省略すると、%#BEGINから文書 1.22 - 末まで、両方省略すると、マークした位置から、ポイントまでが指定領域 1.23 - となります。 1.24 + [prefix] tr の領域指定は、文書中の、 %#BEGIN と書いてある行か 1.25 + ら、%#END と書いてある行までです。%#END を省略すると、%#BEGINか 1.26 + ら文書末まで、両方省略するとマークした位置から、ポイントまでが指 1.27 + 定領域となります。 1.28 1.29 1.30 【カーソルジャンプ】 1.31 @@ -110,7 +114,10 @@ 1.32 ◆itemの桁揃え [prefix] i 1.33 ◆LaTeXコマンド変更 [prefix] c 1.34 1.35 - \begin{}, \end{} の環境名を同時に変更します。 1.36 + \begin{}, \end{} の行で起動すると環境名を同時に変更します。 1.37 + section型コマンドの上で起動するとコマンドを変更し、コマンドの引 1.38 + 数の位置で起動すると引数を変更します。large型コマンドの上で起動 1.39 + するとフォント/サイズ指定子を変更します。 1.40 1.41 ◆コマンド削除 [prefix] k 1.42 1.43 @@ -130,7 +137,7 @@ 1.44 ◆%# 記法の編集 [prefix] % 1.45 ◆tabular/array桁位置表示 [prefix] & 1.46 ◆オンラインヘルプ [prefix] ? 1.47 - ◆オンラインヘルプ [prefix] / 1.48 + ◆オンラインapropos [prefix] / 1.49 ◆おまかせ改行 ESC RET 1.50 1.51 「おまかせ改行」は tabular, array, itemize, enumerate, list,
2.1 --- a/docs/yatexadd.doc Mon Oct 31 17:49:43 1994 +0000 2.2 +++ b/docs/yatexadd.doc Fri Nov 25 08:26:13 1994 +0000 2.3 @@ -5,14 +5,11 @@ 2.4 2.5 【付加関数とは】 2.6 2.7 - begin 型補完で、「tabular 環境を入力している時に、"{|c|c|c|}" と 2.8 - か、また、table 環境の入力時に"[tbp]" とかも一緒に入力すればいいの 2.9 - に」などと思うことはありませんか。もちろんこれを自動入力する関数は 2.10 - 簡単にサポートできるでしょう。 2.11 - 2.12 - しかし、tabular 環境に限らず、LaTeX の環境の引数には、各人お決ま 2.13 - りのフォーマットがあるものです。たとえば凝った表を書く時の tabular 2.14 - 環境の引数は、かなり複雑なので、上のような自動入力関数よりも、 2.15 + begin 型補完で、「tabular 環境を入力している時に、わたしの好み 2.16 + のスタイルが入らないなあ」などと思うことはありませんか。tabular 2.17 + 環境に限らず、LaTeX の環境の引数には、各人お決まりのフォーマット 2.18 + があるものです。たとえば凝った表を書く時の tabular環境の引数は、 2.19 + かなり複雑なので、デフォルトの自動入力関数よりも、 2.20 2.21 "{@{\vrule width 1pt\ }|||@{\ \vrule width 1pt}}" 2.22
3.1 --- a/docs/yatexe.tex Mon Oct 31 17:49:43 1994 +0000 3.2 +++ b/docs/yatexe.tex Fri Nov 25 08:26:13 1994 +0000 3.3 @@ -31,11 +31,11 @@ 3.4 * Typesetting:: 3.5 * %# notation:: 3.6 * Completion:: 3.7 +* Local dictionaries:: 3.8 * Commenting out:: 3.9 * Cursor jump:: 3.10 * Changing and Deleting:: 3.11 * Filling an item:: 3.12 -* Local dictionaries:: 3.13 * Updation of @code{\includeonly}:: 3.14 * What column?:: 3.15 * Intelligent newline:: 3.16 @@ -70,10 +70,16 @@ 3.17 3.18 * view-sectioning:: 3.19 3.20 +Changing and Deleting 3.21 + 3.22 +* Changing La@TeX{} commands:: 3.23 +* Killing La@TeX{} commands:: 3.24 + 3.25 Customizations 3.26 3.27 * Lisp variables:: 3.28 * Add-in functions:: 3.29 +* Add-in generator:: 3.30 3.31 Lisp variables 3.32 3.33 @@ -81,6 +87,18 @@ 3.34 * Sample definitions:: 3.35 * Hook variables:: 3.36 * Hook file:: 3.37 + 3.38 +Procedure 3.39 + 3.40 +* How the add-in function works?:: 3.41 +* How the function is called:: 3.42 +* Useful functions for creating add-in:: 3.43 +* Contribution:: 3.44 + 3.45 +How the add-in function works? 3.46 + 3.47 +* Defining `option add-in':: 3.48 +* Defining `argument add-in':: 3.49 @end menu 3.50 3.51 @node What is YaTeX?, Main features, Top, Top 3.52 @@ -108,6 +126,7 @@ 3.53 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) 3.54 @item Enclosing text into La@TeX{} environments or commands 3.55 (@kbd{C-u} @var{AboveKeyStrokes}) 3.56 +@item Displaying the structure of text at entering sectioning delimiters 3.57 @item Learning unknown/new La@TeX{} commands for the next completion 3.58 @item Argument reading with a guide for complicated La@TeX{} commands 3.59 @item Generating argument-readers for new/unsupported commands(@file{yatexgen}) 3.60 @@ -216,7 +235,7 @@ 3.61 skip this by invoking it with universal-argument as follows: 3.62 3.63 @example 3.64 -C-u [prefix] tl 3.65 + C-u [prefix] tl 3.66 @end example 3.67 3.68 @node %# notation, Completion, Typesetting, Top 3.69 @@ -391,7 +410,7 @@ 3.70 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are 3.71 automatically erased. 3.72 3.73 -@node Completion, Commenting out, %# notation, Top 3.74 +@node Completion, Local dictionaries, %# notation, Top 3.75 @comment node-name, next, previous, up 3.76 @chapter Completion 3.77 @cindex completion 3.78 @@ -583,7 +602,7 @@ 3.79 @cindex number of argument 3.80 3.81 @example 3.82 -C-u 2 [prefix] s (or ESC 2 [prefix] s) 3.83 + C-u 2 [prefix] s (or ESC 2 [prefix] s) 3.84 @end example 3.85 3.86 @noindent 3.87 @@ -603,12 +622,6 @@ 3.88 arguments by calling the completion with different universal argument 3.89 again. 3.90 3.91 - The special number of argument 0 makes YaTeX use read-string to 3.92 -read the first argument instead of completing-read. It is more 3.93 -comfortable to enter first argument without completion when you 3.94 -put section title which contains space character. Normally, such 3.95 -sectioning commands as chapter, section, paragraph..., have 3.96 -argument 0 in the completion table. 3.97 3.98 Invoking section-type completion with @code{[Prefix] S} (Capital `S') 3.99 includes the region as the first argument of section-type command. 3.100 @@ -836,7 +849,36 @@ 3.101 @kbd{;} or @kbd{/} after universal-argument(@kbd{C-u}) which forces 3.102 @kbd{;} and @kbd{/} to work as math-prefix. 3.103 3.104 -@node Commenting out, Cursor jump, Completion, Top 3.105 +@node Local dictionaries, Commenting out, Completion, Top 3.106 +@comment node-name, next, previous, up 3.107 +@chapter Local dictionaries 3.108 +@cindex local dictionaries 3.109 +@cindex nervous users 3.110 + 3.111 + Tables for completion consist of three dictionaries; `standard 3.112 +dictionary' built in @file{yatex.el}, `user dictionary' for your common 3.113 +private commands, and `local dictionary' that is effective in a certain 3.114 +directory. 3.115 + 3.116 + When you input the command unknown to YaTeX at a completion in the 3.117 +minibuffer, YaTeX asks you with the following prompt; 3.118 + 3.119 +@example 3.120 + `foo' is not in table. Register into: U)serTable L)ocal N)one 3.121 +@end example 3.122 + 3.123 +@noindent 3.124 +In this menu, typing `u' updates your `user dictionary', `l' updates your 3.125 +local dictionary, and `n' updates no dictionary and throws the word away. 3.126 + 3.127 + If you find this switching feature meaningless and bothersome, put the 3.128 +next expression into your @file{~/.emacs} 3.129 + 3.130 +@lisp 3.131 + (setq YaTeX-nervous nil) 3.132 +@end lisp 3.133 + 3.134 +@node Commenting out, Cursor jump, Local dictionaries, Top 3.135 @comment node-name, next, previous, up 3.136 @chapter Commenting out 3.137 @cindex commenting out 3.138 @@ -918,18 +960,20 @@ 3.139 La@TeX{} command of last place. YaTeX recognize the followings as pairs 3.140 that have relation each other. 3.141 3.142 -@table 3.143 +@itemize @bullet 3.144 @item @code{\begin@{@}} <-> @code{\end@{@}} 3.145 @item @code{%#BEGIN} <-> @code{%#END} 3.146 @item @code{\label@{@}} <-> @code{\ref@{@}} 3.147 @item @code{\include(\input)} -> included file 3.148 @item @code{\bibitem@{@}} <-> @code{\cite@{@}} 3.149 -@end table 3.150 +@end itemize 3.151 3.152 - On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} 3.153 -moves the cursor to the corresponding @code{\end},@code{\begin} line, if 3.154 -its partner really exists. The movement on the line @code{%#BEGIN} and 3.155 -@code{%#END} are the same. 3.156 + On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} moves the 3.157 +cursor to the corresponding @code{\end},@code{\begin} line, if its partner 3.158 +really exists. The behaviour on the line @code{%#BEGIN} and @code{%#END} 3.159 +are the same. Note that if the correspondent of @code{label/ref} or 3.160 +@code{cite/bibitem} exists in another file, that file have to be opend to 3.161 +make a round trip between references by @kbd{[prefix] g}. 3.162 3.163 If you type @code{[prefix] g} on the line of @code{\include@{chap1@}}, 3.164 typically in the main text, YaTeX switches buffer to @file{chap1.tex}. 3.165 @@ -978,17 +1022,58 @@ 3.166 @cindex prefix c 3.167 @cindex prefix k 3.168 3.169 -@kbd{[prefix] c} can change the name of the corresponding environment 3.170 -declaration. @kbd{[prefix] k} works as follows: 3.171 +@menu 3.172 +* Changing La@TeX{} commands:: 3.173 +* Killing La@TeX{} commands:: 3.174 +@end menu 3.175 + 3.176 +@node Changing La@TeX{} commands, Killing La@TeX{} commands, Changing and Deleting, Changing and Deleting 3.177 +@comment node-name, next, previous, up 3.178 +@section Changing La@TeX{} commands 3.179 + 3.180 +@kbd{[prefix] c} can change the various (La)@TeX{} commands. This can 3.181 +change the followings. 3.182 +@itemize @bullet 3.183 +@item Environment names 3.184 +@item Section-type commands 3.185 +@item Argument of section-type commands 3.186 +@item Optional parameters (enclosed by []) of section-type commands 3.187 +@item Font/size designators 3.188 +@end itemize 3.189 + 3.190 + Typing @kbd{[prefix] c} on one of above objects you want to change 3.191 +brings a suitable reading function sometimes with completion. 3.192 +Note: If you want to change the argument of section-type command that 3.193 +contains other La@TeX{} commands, type @kbd{[prefix] c} either of 3.194 +surrounding braces of the argument in order to make YaTeX ignore the 3.195 +internal La@TeX{} sequences as an object of changing. Anyway, it is 3.196 +very difficult to know which argument position the cursor belongs because 3.197 +the La@TeX{} commands can be nested and braces can freely emerge. So keep 3.198 +it mind to put the cursor on a brace when you are thinking of changing a 3.199 +complicated argument. 3.200 + 3.201 +@node Killing La@TeX{} commands, , Changing La@TeX{} commands, Changing and Deleting 3.202 +@comment node-name, next, previous, up 3.203 +@section Killing La@TeX{} commands 3.204 +@cindex Killing La@TeX{} commands 3.205 + 3.206 + @kbd{[prefix] k} kills the La@TeX{} commands sometimes with their 3.207 +arguments. Following table illustrates the correspondence of the invoking 3.208 +position and what is killed. 3.209 3.210 @example 3.211 [Invoking position] [action] 3.212 -\begin,\end line kill \begin,\end pairs 3.213 -%BEGIN, %END line kill %BEGIN,%END pairs 3.214 +\begin, \end line kill \begin,\end pairs 3.215 +%#BEGIN, %#END line kill %#BEGIN,%#END pairs 3.216 on a Section-type command kill section-type command 3.217 on a parenthesis kill parentheses 3.218 @end example 3.219 3.220 +Note that when killing @code{\begin, \end} or @code{%#BEGIN, %#END} pair, 3.221 +the lines @code{\begin, \end} or @code{%#BEGIN, %#END} exist will be 3.222 +killed entirely. So take care not to create any line that contains more 3.223 +than one @code{\begin} or so. 3.224 + 3.225 While all operations above are to kill `containers' which surround some 3.226 text, universal argument (@kbd{C-u}) for these commands kills not only 3.227 `containers' but also `contents' of them. See below as a sample. 3.228 @@ -999,7 +1084,7 @@ 3.229 ~(cursor) 3.230 @end example 3.231 3.232 -@node Filling an item, Local dictionaries, Changing and Deleting, Top 3.233 +@node Filling an item, Updation of @code{\includeonly}, Changing and Deleting, Top 3.234 @comment node-name, next, previous, up 3.235 @chapter Filling an item 3.236 @cindex filling an item 3.237 @@ -1029,36 +1114,7 @@ 3.238 for Emacs-Lisp, name a newcommand for `itemize' beginning with 3.239 @code{\item} such as @code{\itembf}, not @code{\bfitem}. 3.240 3.241 -@node Local dictionaries, Updation of @code{\includeonly}, Filling an item, Top 3.242 -@comment node-name, next, previous, up 3.243 -@chapter Local dictionaries 3.244 -@cindex local dictionaries 3.245 -@cindex nervous users 3.246 - 3.247 - Tables for completion consist of three dictionaries; `standard 3.248 -dictionary' built in @file{yatex.el}, `user dictionary' for your common 3.249 -private commands, and `local dictionary' that is effective in a certain 3.250 -directory. 3.251 - 3.252 - When you input the command unknown to YaTeX at a completion in the 3.253 -minibuffer, YaTeX asks you with the following prompt; 3.254 - 3.255 -@example 3.256 - `foo' is not in table. Register into: U)serTable L)ocal N)one 3.257 -@end example 3.258 - 3.259 -@noindent 3.260 -In this menu, typing `u' updates your `user dictionary', `l' updates your 3.261 -local dictionary, and `n' updates no dictionary and throws the word away. 3.262 - 3.263 - If you find this switching feature meaningless and bothersome, put the 3.264 -next expression into your @file{~/.emacs} 3.265 - 3.266 -@lisp 3.267 - (setq YaTeX-nervous nil) 3.268 -@end lisp 3.269 - 3.270 -@node Updation of @code{\includeonly}, What column?, Local dictionaries, Top 3.271 +@node Updation of @code{\includeonly}, What column?, Filling an item, Top 3.272 @comment node-name, next, previous, up 3.273 @chapter Updation of @code{\includeonly} 3.274 @cindex includeonly 3.275 @@ -1262,6 +1318,7 @@ 3.276 @menu 3.277 * Lisp variables:: 3.278 * Add-in functions:: 3.279 +* Add-in generator:: 3.280 @end menu 3.281 3.282 @node Lisp variables, Add-in functions, Customizations, Customizations 3.283 @@ -1297,7 +1354,9 @@ 3.284 3.285 Here are the customizable variables of yatex-mode. Each value setq-ed 3.286 in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is 3.287 -neglected. Parenthesized contents stands for the default value. 3.288 +neglected. Parenthesized contents stands for the default value. When you 3.289 +are to change some of these variables, see more detailed documentation of 3.290 +the variable by @kbd{M-x describe-variable}. 3.291 3.292 @defvar YaTeX-prefix 3.293 Prefix key stroke (@kbd{C-c}) 3.294 @@ -1435,6 +1494,18 @@ 3.295 Disable [prefix] b ?? shortcut (@code{nil)} 3.296 @end defvar 3.297 3.298 +@defvar YaTeX-hilit-pattern-adjustment-private 3.299 +List of the list that contain the regular expression and the symbol of 3.300 +logical meaning of the string that matches the pattern. See also the 3.301 +value from @code{(assq 'yatex-mode hilit-patterns-alist)} and the value of 3.302 +@code{YaTeX-hilit-pattern-adjustment-default} (and even the document of 3.303 +hilit19.el). 3.304 +@end defvar 3.305 + 3.306 +@defvar YaTeX-sectioning-level 3.307 +Alist of LaTeX's sectioning command vs its height. 3.308 +@end defvar 3.309 + 3.310 @node Sample definitions, Hook variables, All customizable variables, Lisp variables 3.311 @comment node-name, next, previous, up 3.312 @subsection Sample definitions 3.313 @@ -1482,16 +1553,385 @@ 3.314 this file at the initialization of itself. Using @file{yatexhks.el} 3.315 makes @code{yatex-mode-load-hook} unnecessary. 3.316 3.317 -@node Add-in functions, , Lisp variables, Customizations 3.318 +@node Add-in functions, Add-in generator, Lisp variables, Customizations 3.319 @comment node-name, next, previous, up 3.320 @section Add-in functions 3.321 @cindex add-in functions 3.322 +@cindex yatexadd.el 3.323 3.324 You can easily define a function to input detailed arguments 3.325 -with completion according to La@TeX{} environments or commands. To 3.326 -know the way to define these functions, see also @file{yatexadd.doc} in 3.327 -this package please. 3.328 +with completion according to La@TeX{} environments or commands. 3.329 3.330 +@c @node What is add-in functions?, , Add-in functions, Add-in functions 3.331 +@comment node-name, next, previous, up 3.332 +@subsection What is add-in functions? 3.333 +@cindex tabular 3.334 + 3.335 + When you input @code{tabular} environment, don't you think ``I want 3.336 +YaTeX to complete its argument toward my favorite one such as 3.337 +@code{@{|c|c|c|@}}...''? Yes, you can define the function to complete 3.338 +arguments for any environment and any La@TeX{} commands. 3.339 + 3.340 +@subsection Procedure 3.341 + 3.342 + Here is the procedure to define add-in functions. 3.343 +@enumerate 3.344 +@item 3.345 +Define the function 3.346 +@item 3.347 +Put the function into @file{yatexhks.el} 3.348 +@end enumerate 3.349 + 3.350 +@menu 3.351 +* How the add-in function works?:: 3.352 +* How the function is called:: 3.353 +* Useful functions for creating add-in:: 3.354 +* Contribution:: 3.355 +@end menu 3.356 + 3.357 +@node How the add-in function works?, How the function is called, Add-in functions, Add-in functions 3.358 +@comment node-name, next, previous, up 3.359 +@subsection How the add-in function works? 3.360 + 3.361 + There are two kinds of add-in. @dfn{Option add-in} returns the 3.362 +La@TeX{}'s optional parameters such as optional strings after 3.363 +@code{\begin@{ENV@}}, optional strings between a section-type command 3.364 +and its first argument, and optional strings just after type 3.365 +maketitle-type command. The following illustrates the name of add-in 3.366 +functions, where underlined strings are generated by add-in functions. 3.367 + 3.368 +@display 3.369 +\begin{table}[ht] (Function name: YaTeX:table) 3.370 + ~~~~ 3.371 +\put(100,200){} (Function name: YaTeX:put) 3.372 + ~~~~~~~~~ 3.373 +\sum_{i=0}^{n} (Function name: YaTeX:sum) 3.374 + ~~~~~~~~~~ 3.375 +@end display 3.376 + 3.377 + Obviously, the function name is decided by concatenating the prefix 3.378 +`YaTeX:' and La@TeX{} command's name. 3.379 + 3.380 + Another add-in type is @dfn{argument add-in}, which completes arguments 3.381 +for section-type commands. 3.382 + 3.383 +@display 3.384 +\newcommand{\foo}{bar} (Function name: YaTeX::newcommand) 3.385 + ~~~~ ~~~ 3.386 +@end display 3.387 + 3.388 + When the section-type command is inputted, the function named by 3.389 +concatenating `YaTeX::' and section-type command, is called automatically 3.390 +with an integer argument which indicates which argument of section-type 3.391 +command is being read. Thus the add-in should determine the 3.392 +job refering the value of its argument. 3.393 + 3.394 +@menu 3.395 +* Defining `option add-in':: 3.396 +* Defining `argument add-in':: 3.397 +@end menu 3.398 + 3.399 +@node Defining `option add-in', Defining `argument add-in', How the add-in function works?, How the add-in function works? 3.400 +@comment node-name, next, previous, up 3.401 +@subsubsection Defining `option add-in' 3.402 + 3.403 + If you want @code{@{|c|c|c|@}} for all @code{tabular} environment, 3.404 + 3.405 +@lisp 3.406 + (defun YaTeX:tabular () 3.407 + "{|c|c|c|}") 3.408 +@end lisp 3.409 + 3.410 +@noindent 3.411 +is enough. If you want more complicated format, define as below. 3.412 + 3.413 +@lisp 3.414 + (defun YaTeX:tabular () 3.415 + "@{@@@{\\vrule width 1pt\\ @}|||@@@{\\ \\vrule width 1pt@}@}") 3.416 +@end lisp 3.417 + 3.418 +@noindent 3.419 +Note that the character @code{\} must be described as @code{\\} in 3.420 +Emacs-Lisp. The next example reads the tabular format from keyboard. 3.421 +@lisp 3.422 + (defun YaTeX:tabular () 3.423 + (concat "{" (read-string "Rule: ") "}")) 3.424 +@end lisp 3.425 + 3.426 +@node Defining `argument add-in', , Defining `option add-in', How the add-in function works? 3.427 +@comment node-name, next, previous, up 3.428 +@subsubsection Defining `argument add-in' 3.429 + 3.430 + This section describes how to define the add-in function for 3.431 +@code{\newcommand}. 3.432 + 3.433 + The first argument of @code{\newcommand} begins always with @code{\}. 3.434 +The second argument is usually so complex that we can not edit them in the 3.435 +minibuffer. Here is the created function considering this. 3.436 + 3.437 +@lisp 3.438 + (defun YaTeX::newcommand (n) ;n is argument position 3.439 + (cond 3.440 + ((= n 1) ;1st argument is macro name 3.441 + (read-string "Command: " "\\")) ;initial input `\' 3.442 + ((= n 2) "") ;do nothing when reading arg#2 3.443 + (t nil))) 3.444 +@end lisp 3.445 + 3.446 + Note that when the `argument add-in' function return `nil', normal 3.447 +argument reader will be called. 3.448 + 3.449 +@node How the function is called, Useful functions for creating add-in, How the add-in function works?, Add-in functions 3.450 +@comment node-name, next, previous, up 3.451 +@subsection How the function is called 3.452 + 3.453 + YaTeX calls the add-in functions for specified begin-type, section-type, 3.454 +and maketitle-type command, if any. `Option add-in' functions for 3.455 +begin-type are called when @code{\begin@{ENV@}} has been inserted, 3.456 +functions for section-type are called just before input of the first 3.457 +argument, and functions for maketitle-type is called after maketitle-type 3.458 +command has been inserted. `Argument add-in' functions are called at each 3.459 +entry of arguments for section-type commands. 3.460 + 3.461 +@node Useful functions for creating add-in, Contribution, How the function is called, Add-in functions 3.462 +@comment node-name, next, previous, up 3.463 +@subsection Useful functions for creating add-in 3.464 + 3.465 + Many add-in functions for typical La@TeX{} commands are defined in 3.466 +@file{yatexadd.el}. Those are also useful as references. Here are the 3.467 +short descriptions on useful functions, where [F] means function, [A] 3.468 +means arguments, [D] means description. 3.469 + 3.470 +@itemize 3.471 +@item [F] 3.472 +YaTeX:read-position 3.473 +@itemx [A] 3.474 +Character list which can show up in the brackets 3.475 +@itemx [D] 3.476 + Return the location specifier such as `[htb]'. When 3.477 +nothing is entered, omit [] itself. If the possible characters 3.478 +are "htbp", call this function as 3.479 +@code{(YaTeX:read-position "htbp")} 3.480 + 3.481 +@item [F] 3.482 +YaTeX:read-coordinates 3.483 +@itemx [A] 3.484 +Base prompt, X-axis prompt, Y-axis prompt (each optional) 3.485 +@itemx [D] 3.486 + Read the coodinates with the prompt ``BasePrompt X-axisPrompt:'' for 3.487 +X-axis, ``BasePrompt Y-axisPrompt:'' for Y-axis, and return it in the form 3.488 +of ``(X,Y)''. The default prompts are @code{Dimention}, @code{X}, 3.489 +@code{Y} respectively. 3.490 + 3.491 +@item [F] 3.492 +YaTeX:check-comletion-type 3.493 +@itemx [A] 3.494 +One of the symbols: 'begin, 'section, or 'maketitle 3.495 +@itemx [D] 3.496 + Check the current completion type is specified one and cause error if 3.497 +not. The variable @code{YaTeX-current-completion-type} holds the symbol 3.498 +according to the current completion type. 3.499 +@end itemize 3.500 + 3.501 +@node Contribution, , Useful functions for creating add-in, Add-in functions 3.502 +@comment node-name, next, previous, up 3.503 +@subsection Contribution 3.504 + 3.505 + If you make your own pretty function and you let it be in public, please 3.506 +send me the function. I'm going to include it in the next release. 3.507 + 3.508 +@node Add-in generator, , Add-in functions, Customizations 3.509 +@comment node-name, next, previous, up 3.510 +@section Add-in generator 3.511 + 3.512 + First, don't forget to read the section of add-in functions @ref{Add-in 3.513 +functions}. If you easily understand how to define them, there's no need 3.514 +to read this section. But being not familiar with Emacs-Lisp, when you 3.515 +don't have clear idea what to do, this section describes how to get YaTeX 3.516 +make add-in function. 3.517 + 3.518 + There are two methods of generation. One is for fully interactive 3.519 +generator for beginners and another requires little knowledge of 3.520 +Emacs-Lisp. 3.521 + 3.522 +@subsection Generator for beginners 3.523 + The former generator is called by 3.524 +@center @kbd{M-x YaTeX-generate} 3.525 + 3.526 +@noindent 3.527 +strokes. All you have to do is follow the guidances. Defying them may cases 3.528 +the disaster (I wonder what is it???). So when you make some mistake, it 3.529 +is recommendable to type @kbd{C-g} and start afresh. 3.530 + 3.531 +@subsection Simple generator 3.532 + 3.533 + The latter generator is invoked by the next sequence. 3.534 +@center @kbd{M-x YaTeX-generate-simple} 3.535 +This generator can make both ``option add-in'' and ``argument add-in'' 3.536 +(@emph{refer the section add-in functions} 3.537 +@ref{How the add-in function works?}), whereas @code{YaTeX-generate} 3.538 +cannot make ``argument addin''. 3.539 + 3.540 + For example, assume you have the LaTeX command as follows. 3.541 + 3.542 +@example 3.543 + \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} 3.544 + (A) (B) (1) (2) (3) 3.545 + (A)Optional parameter to specify the position 3.546 + One of t(top), b(bottom), l(left), r(right) 3.547 + (B)Maximum size of frame 3.548 + (1)1st argument is filename of EPS file 3.549 + (2)2nd argument indicates 3.550 + plain do nothing 3.551 + frame make frame around image 3.552 + dframe make double-frame around image 3.553 + for included EPS file. 3.554 + (3)Caption for the picture 3.555 +@end example 3.556 + 3.557 + Now get start with generation. Typing @kbd{M-x YaTeX-generate-simple} 3.558 +brings the prompt: 3.559 +@display 3.560 + (O)ption? (A)rgument? 3.561 +@end display 3.562 + 3.563 +@subsubsection Generating ``option add-in'' 3.564 +@cindex option add-in 3.565 + 3.566 + Since (A), (B) above are optional argument, all we have to do to 3.567 +complete them is define the option add-in for them. Let's generate the 3.568 +function to complete (A). 3.569 + 3.570 +@display 3.571 + M-x YaTeX-generate-simple RET 3.572 + epsinput RET 3.573 + o 3.574 +@end display 3.575 + 3.576 +@noindent 3.577 +Typing as above leads the next prompt. 3.578 + 3.579 +@display 3.580 +Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit 3.581 +@end display 3.582 + 3.583 +@noindent 3.584 + This asks that ``Which type is the completion style of 1st argument?''. 3.585 +Here are the possible completion style. 3.586 + 3.587 +@table @code 3.588 +@item String 3.589 +read plain string 3.590 +@item Complete 3.591 +read with completion 3.592 +@item File 3.593 +read file name 3.594 +@item Option 3.595 +read optional string (if string omitted, omit [] too) 3.596 +@item Position 3.597 +read positional option (like [htbp]) 3.598 +@item Coord. 3.599 +read coodinates 3.600 +@item Quit 3.601 +quit from genarating 3.602 +@end table 3.603 + 3.604 + Since (A) is the optional argument to specify the location of included 3.605 +EPS file, the completion style is @code{Position}, and the possible 3.606 +characters are t, b, l, and r. To tell these information to generator, 3.607 +operate as follows. 3.608 + 3.609 +@display 3.610 + Read type(1).... p 3.611 + Acceptable characters: tblr RET 3.612 +@end display 3.613 + 3.614 + (B) is coordinate. So its completion style is coOrd. We want a prompt 3.615 +meaning ``Maximum size'' when completion. 3.616 + 3.617 +@display 3.618 + Read type(2).... o 3.619 + Prompt for coordinates: Max size RET 3.620 +@end display 3.621 + 3.622 + That's all for optional argument. Select quit. 3.623 + 3.624 +@display 3.625 + Read type(3).... q 3.626 +@end display 3.627 + 3.628 + Then the generated option add-in function for \epsinput will be shown in 3.629 +the next window. 3.630 + 3.631 +@subsubsection Generating ``argument add-in'' 3.632 +@cindex argument add-in 3.633 + 3.634 + Next, create the argument add-in. The arguments for \epsinput are EPS 3.635 +file name, framing style, and caption string in sequence. 3.636 + 3.637 +@display 3.638 + M-x YaTeX-generate-simple RET 3.639 + epsinput RET 3.640 + a 3.641 +@end display 3.642 + 3.643 + Above key strokes bring the prompt that asks the number of argument. 3.644 +Answer it with 3. 3.645 + 3.646 +@display 3.647 + How many arguments?: 3 RET 3.648 +@end display 3.649 + 3.650 + Then the generator asks the completion style and prompt for completion. 3.651 +Answer them. @kbd{f} for FileName and prompt string. 3.652 + 3.653 +@display 3.654 + Read type(1).... f 3.655 + Prompt for argument#1 EPS file name RET 3.656 +@end display 3.657 + 3.658 + The second argument is one of selected symbol. So the completion type 3.659 +is @code{Completion}. 3.660 + 3.661 +@display 3.662 + Read type(2).... c 3.663 + Prompt for argument#2 Include style RET 3.664 +@end display 3.665 + 3.666 + Then all the candidates ready to be read. Type single RET after 3.667 +entering all. 3.668 + 3.669 +@display 3.670 + Item[1](RET to exit): plain RET 3.671 + Item[2](RET to exit): frame RET 3.672 + Item[3](RET to exit): dframe RET 3.673 + Item[4](RET to exit): RET 3.674 +@end display 3.675 + 3.676 + The following prompt asks whether the entered string must belong to 3.677 +candidates or not. In this case, since the argument must be one of 3.678 +@code{plain}, @code{frame}, and @code{dframe}, type @code{y}. 3.679 + 3.680 +@display 3.681 + Require match? (y or n) y 3.682 +@end display 3.683 + 3.684 + The last argument is the caption string for which any completion is 3.685 +needed. 3.686 + 3.687 +@display 3.688 + Read type(3).... s 3.689 + Prompt for argument#3 Caption RET 3.690 + default: Figure of RET 3.691 +@end display 3.692 + 3.693 + Finally we'll get the argument add-in in the next window. 3.694 + 3.695 +@subsection Contribution 3.696 + 3.697 + If you get your own pretty function and you let it be in public, please 3.698 +steel yourself in the happy atomospher and do not send me the function. 3.699 +I do know it is not fine because it is generated by yatexgen:-p. 3.700 3.701 @node Etcetera, Copying, Customizations, Top 3.702 @comment node-name, next, previous, up 3.703 @@ -1514,7 +1954,7 @@ 3.704 as a result of using this software. However, any reports and 3.705 suggestions are welcome as long as I feel interests in this 3.706 software. My possible e-mail address is `yuuji@@ae.keio.ac.jp'. 3.707 -(up to Mar.1993 at least) 3.708 +(up to Mar.1995 at least) 3.709 3.710 The specification of this software will be surely modified 3.711 (depending on my feelings) without notice :-p.
4.1 --- a/docs/yatexj.tex Mon Oct 31 17:49:43 1994 +0000 4.2 +++ b/docs/yatexj.tex Fri Nov 25 08:26:13 1994 +0000 4.3 @@ -25,15 +25,15 @@ 4.4 * Main features:: 主な機能 4.5 * Installation:: インストール 4.6 * Invocation:: 外部コマンドの起動 4.7 -* %#記法:: 4.8 +* %#notation :: %#記法 4.9 * Completion:: 補完入力 4.10 +* Local dictionary:: ローカル辞書 4.11 * Commenting out:: コメントアウト 4.12 * Cursor jump:: カーソルジャンプ 4.13 * Modifying/Deleting:: 変更/削除 4.14 * Filling item:: itemの桁揃え 4.15 -* Local dictionary:: ローカル辞書 4.16 * Includeonly:: 勝手にincludeonly 4.17 -* Where am I?:: 4.18 +* What column:: ここはどこ? 4.19 * Intelligent newline:: おまかせ改行 4.20 * Online help:: オンラインヘルプ 4.21 * Cooperation with other packages:: 他パッケージとの連携 4.22 @@ -57,6 +57,7 @@ 4.23 ストの編集を支援します。さらに La@TeX{} コマンドのオンラインヘルプに 4.24 よりマニュアルを調べる手間を軽減します。 4.25 4.26 + English manual @xref{Top, , , yatexe,YaTeX English info} 4.27 4.28 @node Main features, Installation, Intro, Top 4.29 @comment node-name, next, previous, up 4.30 @@ -71,7 +72,8 @@ 4.31 コマンドの補完入力 4.32 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) 4.33 @item 既に入力したテキストを環境やコマンド引数の中に取り込む括り補完 4.34 -(@kbd{C-u} 通常補完キー) 4.35 +(@kbd{C-u} +通常補完キー) 4.36 +@item セクション区切り入力時の文書構造アウトライン表示 4.37 @item 補完辞書の学習 4.38 @item La@TeX{} の環境やコマンドに応じたガイド付き引数入力 4.39 @item 野鳥にないガイド付き引数入力関数の自動生成(@file{yatexgen.el}) 4.40 @@ -119,7 +121,7 @@ 4.41 に変わります。 4.42 4.43 4.44 -@node Invocation, %#記法, Installation, Top 4.45 +@node Invocation, %#notation , Installation, Top 4.46 @comment node-name, next, previous, up 4.47 @chapter latexコマンド起動 4.48 @cindex prefix key 4.49 @@ -164,9 +166,9 @@ 4.50 タイプセッタを起動すると、編集ウィンドウが2つに分割され、片方のウィンド 4.51 ウにタイプセット画面が表示されます。出力されるメッセージと連動しタイプセッ 4.52 トバッファは自動的にスクロールします。もし、途中でエラーが起こって止まって 4.53 -しまった場合にはタイプセットバッファに移り、(@kbd{^Xo}) タイプセッタの出し 4.54 -ている ? プロンプトに対して、@kbd{x} (処理の中断)などの指示を送ることがで 4.55 -きます。エラーを修正する場合は、 4.56 +しまった場合にはタイプセットバッファに移り、(@kbd{C-x o}) タイプセッタの出 4.57 +している ? プロンプトに対して、@kbd{x} (処理の中断)などの指示を送ることが 4.58 +できます。エラーを修正する場合は、 4.59 4.60 @table @kbd 4.61 @item [prefix] ' 4.62 @@ -207,7 +209,7 @@ 4.63 @end table 4.64 @cindex ページ確認省略lpr起動[へえしかくにんしようりやくlprきとう] 4.65 4.66 -@node %#記法, Completion, Invocation, Top 4.67 +@node %#notation , Completion, Invocation, Top 4.68 @comment node-name, next, previous, up 4.69 @chapter %#記法 4.70 4.71 @@ -222,7 +224,7 @@ 4.72 * Editing %# notation:: %#記法の編集 4.73 @end menu 4.74 4.75 -@node Changing typesetter, Splitting input files, %#記法, %#記法 4.76 +@node Changing typesetter, Splitting input files, %#notation , %#notation 4.77 @comment node-name, next, previous, up 4.78 @section タイプセット用コマンド変更 4.79 4.80 @@ -238,7 +240,7 @@ 4.81 4.82 @cindex タイプセッタの使い分け[たいふせつたのつかいわけ] 4.83 4.84 -@node Splitting input files, Fix region for typesetting, Changing typesetter, %#記法 4.85 +@node Splitting input files, Fix region for typesetting, Changing typesetter, %#notation 4.86 @comment node-name, next, previous, up 4.87 @section 入力ファイル分割 4.88 4.89 @@ -259,7 +261,7 @@ 4.90 @cindex ghostview 4.91 4.92 @example 4.93 - %#!jlatex main ; dvi2ps main.dvi > main 4.94 + %#!jlatex main ; dvi2ps main.dvi > main 4.95 @end example 4.96 4.97 なお、この行の最後の単語のピリオド以前を「メインファイル」のベース 4.98 @@ -284,7 +286,7 @@ 4.99 4.100 4.101 4.102 -@node Fix region for typesetting, lpr format, Splitting input files, %#記法 4.103 +@node Fix region for typesetting, lpr format, Splitting input files, %#notation 4.104 @comment node-name, next, previous, up 4.105 @section 領域の固定 4.106 @cindex 固定領域のタイプセット[こていりよういきのたいふせつと] 4.107 @@ -296,9 +298,9 @@ 4.108 すが、必ず決まった領域をタイプセットしたい場合は、その領域を 4.109 4.110 @example 4.111 - %#BEGIN 4.112 - <渡したい領域> 4.113 - %#END 4.114 + %#BEGIN 4.115 + <渡したい領域> 4.116 + %#END 4.117 @end example 4.118 4.119 @noindent 4.120 @@ -335,10 +337,10 @@ 4.121 の消し忘れには十分ご注意下さい。 4.122 @cindex 長いファイルの編集[なかいふあいるのへんしゆう] 4.123 4.124 -@node Require, lpr format, Fix region for typesetting, %#記法 4.125 +@node Require, lpr format, Fix region for typesetting, %#notation 4.126 @comment node-name, next, previous, up 4.127 4.128 -@node lpr format, Editing %# notation, Fix region for typesetting, %#記法 4.129 +@node lpr format, Editing %# notation, Fix region for typesetting, %#notation 4.130 @comment node-name, next, previous, up 4.131 @section lprフォーマット 4.132 @cindex lprふぉーまっと[lprふおおまつと] 4.133 @@ -383,7 +385,7 @@ 4.134 @noindent 4.135 などとするのも便利かもしれません。 4.136 4.137 -@node Editing %# notation, , lpr format, %#記法 4.138 +@node Editing %# notation, , lpr format, %#notation 4.139 @comment node-name, next, previous, up 4.140 @section %#記法自体の編集 4.141 @cindex %#きほうじたいのへんしゅう[%#きほうしたいのへんしゆう] 4.142 @@ -410,7 +412,7 @@ 4.143 @code{%#BEGIN}, @code{%#END} が自動的に消去されます。 4.144 @cindex lprフォーマットの変更[lprふおおまつとのへんこう] 4.145 4.146 -@node Completion, Commenting out, %#記法, Top 4.147 +@node Completion, Local dictionary, %#notation , Top 4.148 @comment node-name, next, previous, up 4.149 @chapter 補完入力 4.150 4.151 @@ -552,7 +554,7 @@ 4.152 で実行します。@kbd{[prefix] s} を入力するとミニバッファに、 4.153 4.154 @example 4.155 - (C-v for view) \???@{@} (default documentstyle): 4.156 + (C-v for view-section) \???@{@} (default documentstyle): 4.157 @end example 4.158 4.159 @noindent 4.160 @@ -562,7 +564,7 @@ 4.161 る補完機能が有効です。 次に、@{@}の中身の入力を促す、 4.162 4.163 @example 4.164 - \section@{???@}: 4.165 + \section@{???@}: 4.166 @end example 4.167 4.168 @noindent 4.169 @@ -570,30 +572,30 @@ 4.170 たとえば、 4.171 4.172 @example 4.173 - (C-v for view) \???@{@} (default documentstyle): section 4.174 - \section@{???@}: 目的 4.175 + (C-v for view-section) \???@{@} (default documentstyle): section 4.176 + \section@{???@}: 目的 4.177 @end example 4.178 4.179 @noindent 4.180 のように入力した場合は、文章中に 4.181 4.182 @example 4.183 - \section@{目的@} 4.184 + \section@{目的@} 4.185 @end example 4.186 4.187 @noindent 4.188 が挿入され、 4.189 4.190 @example 4.191 - (C-v for view) \???@{@} (default section): vspace* 4.192 - \vspace*@{???@}: 4.193 + (C-v for view-section) \???@{@} (default section): vspace* 4.194 + \vspace*@{???@}: 4.195 @end example 4.196 4.197 @noindent 4.198 のように@{@}の中身を省略したときは、 4.199 4.200 @example 4.201 - \vspace*@{@} 4.202 + \vspace*@{@} 4.203 @end example 4.204 4.205 @noindent 4.206 @@ -601,13 +603,12 @@ 4.207 4.208 @menu 4.209 * 2個以上の引数をとる section型コマンド:: 4.210 -* Input argument without copletion:: 引数入力時に補完しない 4.211 * Enclose region-type command:: 4.212 * Recursive completion:: 再帰補完 4.213 * view-sectioning:: セクション区切りのアウトライン表示 4.214 @end menu 4.215 4.216 -@node 2個以上の引数をとる section型コマンド, Input argument without copletion, section型補完, section型補完 4.217 +@node 2個以上の引数をとる section型コマンド, Enclose region-type command, section型補完, section型補完 4.218 @comment node-name, next, previous, up 4.219 @subsection 2個以上の引数をとる section型コマンド 4.220 @cindex 引数[ひきすう] 4.221 @@ -625,7 +626,7 @@ 4.222 と section 型補完を呼び出した後、 4.223 4.224 @example 4.225 - (Ctrl-v for view) \???@{@} (default vspace*): addtolength 4.226 + (Ctrl-v for view-section) \???@{@} (default vspace*): addtolength 4.227 \addtolength@{???@}: \topmargin 4.228 Argument 2: 8mm 4.229 @end example 4.230 @@ -640,19 +641,8 @@ 4.231 す。 4.232 @cindex 引数の個数を変える[ひきすうのこすうをかえる] 4.233 4.234 -@node Input argument without copletion, Enclose region-type command, 2個以上の引数をとる section型コマンド, section型補完 4.235 -@comment node-name, next, previous, up 4.236 -@subsection 引数入力時に補完しない 4.237 -@cindex 引数入力時に補完しない[ひきすうにゆうりよくしにほかんしない] 4.238 4.239 - なお、特別な例として引数0を指定すると、第一引数の入力時に補完入力ではな 4.240 -く、単純な文字列入力を使用するようになります。段落を指定する@samp{chapter} 4.241 -や @samp{section}などは第一引数の段落タイトル入力時に、スペースを含めるこ 4.242 -とがあるので、補完入力は却ってじゃまになります。標準設定では、これらの段落 4.243 -指定コマンド(chapter, section, paragraph など)に引数0の指定が埋め込まれて 4.244 -います。 4.245 - 4.246 -@node Enclose region-type command, Recursive completion, Input argument without copletion, section型補完 4.247 +@node Enclose region-type command, Recursive completion, 2個以上の引数をとる section型コマンド, section型補完 4.248 @comment node-name, next, previous, up 4.249 @subsection 既に書いたテキストを括る 4.250 @cindex 括る[くくる] 4.251 @@ -705,7 +695,7 @@ 4.252 がlarge型補完の開始です。@kbd{[prefix] l} を押すと、ミニバッファに 4.253 4.254 @example 4.255 - @{\??? @} (default large): 4.256 + @{\??? @} (default large): 4.257 @end example 4.258 4.259 @noindent 4.260 @@ -796,7 +786,7 @@ 4.261 を押すと、ミニバッファに 4.262 4.263 @example 4.264 - 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b 4.265 + 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b 4.266 @end example 4.267 4.268 @noindent 4.269 @@ -804,14 +794,14 @@ 4.270 して下さい。すると編集バッファに、 4.271 4.272 @example 4.273 - \`@{@} 4.274 + \`@{@} 4.275 @end example 4.276 4.277 @noindent 4.278 があらわれ、カーソルが@{@}内に位置するので、さらに一文字入力する事で、 4.279 4.280 @example 4.281 - \`@{o@} 4.282 + \`@{o@} 4.283 @end example 4.284 4.285 @noindent 4.286 @@ -859,15 +849,15 @@ 4.287 に表示されたなら、そこでイメージ入力を止めて次の編集動作に移っても 4.288 構いません。 4.289 4.290 - 数式環境中で@samp{;}自身を入力するには@kbd{};;」のようにします。イメージ 4.291 +@cindex ;自身[;ししん] 4.292 + 数式環境中で@samp{;}自身を入力するには@kbd{;;}のようにします。イメージ 4.293 入力の途中でTABを押すと、それまで入力した文字で始まるもの一覧が表示されま 4.294 す。ここで目的の La@TeX{} コマンドまでカーソルを移動し再度TABを押すことで 4.295 その La@TeX{} コマンドがバッファに挿入されます。 4.296 -@cindex ;自身[;ししん] 4.297 4.298 どのキー入力にどの記号が対応しているか全て知りたい時は、@kbd{;}を押した 4.299 -直後にリターンキーを押してください。以下の例は、@kbd{;<}と押した後にTAB 4.300 -を押したものです。 4.301 +直後にTABを押してください。以下の例は、@kbd{;<}と押した後にTABを押したもの 4.302 +です。 4.303 4.304 @example 4.305 KEY LaTeX sequence sign 4.306 @@ -900,8 +890,8 @@ 4.307 もう一つ、数式環境中で@kbd{/}を押すとギリシャ文字入力モードに入ります。 4.308 @kbd{/}を押した直後に@kbd{a}を押すと@code{\alpha}が、@kbd{g} を押すと 4.309 @code{\gamma}が、などアルファベットに対応したギリシャ文字が挿入されます。 4.310 -操作方法は;の数式記号補完とまったく同じです。まずは@kbd{/}の直後にリターン 4.311 -キーを押してどのアルファベットにどのギリシャ文字が対応しているか調べてみて 4.312 +操作方法は;の数式記号補完とまったく同じです。まずは@kbd{/}の直後に 4.313 +TABを押してどのアルファベットにどのギリシャ文字が対応しているか調べてみて 4.314 ください。 4.315 4.316 @kbd{;}と@kbd{/}を数式環境中で押しているにもかかわらず、イメージ補完が働 4.317 @@ -909,7 +899,42 @@ 4.318 とにより、強制的にイメージ補完に入ることができます。また、この時にどのよう 4.319 な状態で数式環境内判定に失敗したかをご連絡下さい。 4.320 4.321 -@node Commenting out, Cursor jump, Completion, Top 4.322 +@node Local dictionary, Commenting out, Completion, Top 4.323 +@comment node-name, next, previous, up 4.324 +@chapter ローカル辞書 4.325 +@cindex ローカル辞書[ろおかるししよ] 4.326 +@cindex .yatexrc 4.327 +@cindex 変な単語[へんなたんこ] 4.328 + 4.329 + 補完入力用の候補は三種類の辞書から構成されています。一つは 4.330 +@file{yatex.el}に組み込まれた「標準辞書」、もう一つはユーザが個人的に常用 4.331 +するコマンドを保存する「ユーザ辞書」、そしてもうひとつはあるディレクトリで 4.332 +のみ有効なコマンドを保存する「ローカル辞書」です。 4.333 + 4.334 + 補完入力時に新しい単語を入れた場合に、その単語をどの辞書に入れるか聞いて 4.335 +来ます。 4.336 + 4.337 +@example 4.338 + `foo' is not in table. Register into: U)serTable L)ocal N)one 4.339 +@end example 4.340 + 4.341 +@noindent 4.342 +というプロンプトに対し、@kbd{u}と答えると「ユーザ辞書」を、@kbd{l}と答える 4.343 +とローカル辞書を更新することになり、@kbd{n}と答えると新たな単語を学習せず 4.344 +に捨てることになります。 4.345 + 4.346 + もし、ローカル辞書の機能はいらず、全てユーザ辞書の更新のみでよいと言う場 4.347 +合には@file{~/.emacs}などで、 4.348 +@cindex YaTeX-nervous 4.349 + 4.350 +@lisp 4.351 + (setq YaTeX-nervous nil) 4.352 +@end lisp 4.353 + 4.354 +@noindent 4.355 +として下さい。 4.356 + 4.357 +@node Commenting out, Cursor jump, Local dictionary, Top 4.358 @comment node-name, next, previous, up 4.359 @chapter コメントアウト 4.360 @cindex コメントアウト[こめんとあうと] 4.361 @@ -990,18 +1015,20 @@ 4.362 を押すことにより、カーソル位置のLa@TeX{}コマンドに対応する場所にジャンプ 4.363 します。対応関係が存在すると解釈されるコマンドには以下のものがあります。 4.364 4.365 -@table 4.366 +@itemize @bullet 4.367 @item @code{\begin@{@}}←→@code{\end@{@}} 4.368 @item @code{%#BEGIN}←→@code{%#END} 4.369 @item @code{\label@{@}}←→@code{\ref@{@}} 4.370 @item @code{\include(\input)}→対応するファイル 4.371 @item @code{\bibitem@{@}}←→@code{\cite@{@}} 4.372 -@end table 4.373 +@end itemize 4.374 4.375 - @code{\begin@{@}} か @code{\end@{@}} の行で@kbd{[prefix] g} 4.376 -を押すことにより、対応する@code{end/begin}の行にジャンプします。もちろん対 4.377 -応するものがない場合はエラーになります。またこれは、領域固定のための 4.378 -@code{%#BEGIN} と @code{%#END} のペアに対しても同様に動作します。 4.379 + @code{\begin@{@}} か @code{\end@{@}} の行で@kbd{[prefix] g}を押すことに 4.380 +より、対応する@code{end/begin}の行にジャンプします。もちろん対応するものが 4.381 +ない場合はエラーになります。またこれは、領域固定のための @code{%#BEGIN} と 4.382 +@code{%#END} のペアに対しても同様に動作します。なお、@code{label/ref}や 4.383 +@code{cite/bibitem}対応するものが別ファイルにある時は、ジャンプ先となるファ 4.384 +イルがオープンされていなければなりません。 4.385 @xref{%#記法} 4.386 4.387 メインの .tex ファイルの @code{\include{chap1}} などにカーソルを合わせ、 4.388 @@ -1020,6 +1047,12 @@ 4.389 オープンしていない場合は、カレントディレクトリから探して自動的にオープンし 4.390 ます。さらに現在の環境を単位として機能するコマンドに以下のものがあります。 4.391 4.392 +@cindex 環境の先頭へ[かんきようのせんとうへ] 4.393 +@cindex 環境の末尾へ[かんきようのまつひへ] 4.394 +@cindex 環境をマーク[かんきようをまあく] 4.395 +@cindex M-C-a 4.396 +@cindex M-C-e 4.397 +@cindex M-C-@@ 4.398 @table @kbd 4.399 @item M-C-a 4.400 @dots{} 環境の先頭(@code{\begin})へジャンプ 4.401 @@ -1028,12 +1061,6 @@ 4.402 @item M-C-@@ 4.403 @dots{} 環境全体をマーク 4.404 @end table 4.405 -@cindex 環境の先頭へ[かんきようのせんとうへ] 4.406 -@cindex 環境の末尾へ[かんきようのまつひへ] 4.407 -@cindex 環境をマーク[かんきようをまあく] 4.408 -@cindex M-C-a 4.409 -@cindex M-C-e 4.410 -@cindex M-C-@@ 4.411 4.412 上記のコマンドは通常の@kbd{[prefix]}キーではなく@kbd{META}キーをプリフィク 4.413 スとして機能するのでご注意下さい。 4.414 @@ -1061,23 +1088,56 @@ 4.415 これらのコマンドは、コマンドを起動する場所によって動作を決定するので注意し 4.416 て下さい。 4.417 4.418 -@kbd{[prefix] c} は、@code{\begin@{@}} または @code{\end@{@}} のある場所で 4.419 -起動すると、環境名の変更を行います。@kbd{[prefix] k} は起動する位置により 4.420 +@menu 4.421 +* Changing LaTeX command:: La@TeX{} コマンドの変更 4.422 +* Killing LaTeX command:: La@TeX{} コマンドの削除 4.423 +@end menu 4.424 + 4.425 +@node Changing LaTeX command, Killing LaTeX command, Modifying/Deleting, Modifying/Deleting 4.426 +@comment node-name, next, previous, up 4.427 +@section La@TeX{} コマンドの変更 4.428 + 4.429 +変更したい La@TeX{} コマンドにカーソルを合わせて @kbd{[prefix] c} 4.430 +を押すとそのコマンドを補完入力などを用いて手軽に変えることができます。 4.431 +@kbd{[prefix] c} で変更できるコマンドには以下のものがあります。 4.432 + 4.433 +@itemize 4.434 +@item @code{begin/end} の環境名 4.435 +@item section型コマンドのコマンド名 4.436 +@item section型コマンドの引数 4.437 +@item section型コマンドのオプションパラメータ([]で囲まれたもの) 4.438 +@item large型コマンド 4.439 +@end itemize 4.440 + 4.441 + 変えたいsection型コマンドの引数がさらに La@TeX{} コマンドを含む場合は、 4.442 +その引数を囲む中括弧の上で @kbd{[prefix] c} を押すことで中のコマンドを変更 4.443 +対象判定から除外することができます。 4.444 + 4.445 +@cindex 環境名の変更[かんきようめいのへんこう] 4.446 + 4.447 +@node Killing LaTeX command, , Changing LaTeX command, Modifying/Deleting 4.448 +@comment node-name, next, previous, up 4.449 +@section La@TeX{} コマンドの削除 4.450 + 4.451 +@kbd{[prefix] k} は起動する位置により 4.452 次のような動作を行います。 4.453 -@cindex 環境名の変更[かんきようめいのへんこう] 4.454 @cindex 環境の削除[かんきようのさくしよ] 4.455 4.456 4.457 @example 4.458 起動位置 動作 4.459 -\begin\endの行 @code{\begin\end}ペアの削除 4.460 -%BEGIN, %END の行 %BEGIN,%ENDペアの削除 4.461 +\begin, \endの行 @code{\begin\end}ペアの削除 4.462 +%#BEGIN, %#END の行 %#BEGIN,%#ENDペアの削除 4.463 section型コマンドの上(中) section型コマンドの削除 4.464 フォント指定括弧の上 フォント指定の削除 4.465 括弧の上 対をなす括弧の削除 4.466 @end example 4.467 4.468 @noindent 4.469 +@code{\begin, \end} および @code{%#BEGIN, %#END} を削除する場合、 4.470 +@code{\begin, \end} や @code{%#BEGIN, %#END} の存在する行は 4.471 +まるごと削除されるので、それらの一行に @code{\begin} などを二つ以上連ねて 4.472 +書かないように注意してください。 4.473 上記のものはすべて本文を囲う「容器」を削除するように働きますが、 4.474 universal-argument (@kbd{C-u}) を打った後で@kbd{[prefix] k}をタイプすると、 4.475 それぞれの「容器」に含まれる「中身」も一気に削除します。以下の例を参考にし 4.476 @@ -1089,7 +1149,7 @@ 4.477 ↑(カーソル位置) 4.478 @end example 4.479 4.480 -@node Filling item, Local dictionary, Modifying/Deleting, Top 4.481 +@node Filling item, Includeonly, Modifying/Deleting, Top 4.482 @comment node-name, next, previous, up 4.483 @chapter itemの桁揃え 4.484 @cindex itemの桁揃え[itemのけたそろえ] 4.485 @@ -1103,17 +1163,17 @@ 4.486 @dots{} itemの桁揃え 4.487 @end table 4.488 4.489 +@cindex NTT-jTeX[えぬていいていいしえいてつく] 4.490 @noindent 4.491 によって、その item のインデントの深さに応じて fill されます。なお、NTT 4.492 jTeX を使用している場合には、Lisp 変数@code{NTT-jTeX}を@code{t}にセットし 4.493 て下さい。 4.494 -@cindex NTT-jTeX[えぬていいていいしえいてつく] 4.495 4.496 +@cindex YaTeX-item-regexp 4.497 このとき、変数@code{YaTeX-item-regexp}の値(標準では @code{"\\\\item"})を 4.498 項目指定コマンドの正規表現として検索に使用します。itemize 環境で、独自のコ 4.499 マンドを定義して項目を列挙している場合(例えば@code{\underlineitem})は、 4.500 @file{~/.emacs} で次のように指定して下さい。 4.501 -@cindex YaTeX-item-regexp 4.502 4.503 @lisp 4.504 (setq YaTeX-item-regexp 4.505 @@ -1124,42 +1184,7 @@ 4.506 この変数の指定の仕方がよく分からない場合は、独自の項目列挙コマンドの名前を 4.507 @code{@code{"\item"}で始まるものにして下さい(例えば"\itembf"})。 4.508 4.509 -@node Local dictionary, Includeonly, Filling item, Top 4.510 -@comment node-name, next, previous, up 4.511 -@chapter ローカル辞書 4.512 -@cindex ローカル辞書[ろおかるししよ] 4.513 -@cindex .yatexrc 4.514 -@cindex 変な単語[へんなたんこ] 4.515 - 4.516 - 補完入力用の候補は三種類の辞書から構成されています。一つは 4.517 -@file{yatex.el}に組み込まれた「標準辞書」、もう一つはユーザが個人的に常用 4.518 -するコマンドを保存する「ユーザ辞書」、そしてもうひとつはあるディレクトリで 4.519 -のみ有効なコマンドを保存する「ローカル辞書」です。 4.520 - 4.521 - 補完入力時に新しい単語を入れた場合に、その単語をどの辞書に入れるか聞いて 4.522 -来ます。 4.523 - 4.524 -@example 4.525 - `foo' is not in table. Register into: U)serTable L)ocal N)one 4.526 -@end example 4.527 - 4.528 -@noindent 4.529 -というプロンプトに対し、@kbd{u}と答えると「ユーザ辞書」を、@kbd{l}と答える 4.530 -とローカル辞書を更新することになり、@kbd{n}と答えると新たな単語を学習せず 4.531 -に捨てることになります。 4.532 - 4.533 - もし、ローカル辞書の機能はいらず、全てユーザ辞書の更新のみでよいと言う場 4.534 -合には@file{~/.emacs}などで、 4.535 - 4.536 -@lisp 4.537 - (setq YaTeX-nervous nil) 4.538 -@end lisp 4.539 -@cindex YaTeX-nervous 4.540 - 4.541 -@noindent 4.542 -として下さい。 4.543 - 4.544 -@node Includeonly, Where am I?, Local dictionary, Top 4.545 +@node Includeonly, What column, Filling item, Top 4.546 @comment node-name, next, previous, up 4.547 @chapter 勝手にincludeonly 4.548 @cindex 勝手にincludeonly[かつてにincludeonly] 4.549 @@ -1181,9 +1206,9 @@ 4.550 @end example 4.551 4.552 @noindent 4.553 -と書き直さなければなりませんが、野鳥では現在編集しているファイル名がメイン 4.554 -ファイルの@code{\includeonly}にない場合には自動的にこれを検出し、次の指示 4.555 -を仰ぎます。 4.556 +と書き直さなければならず手間がかかります。野鳥では現在編集しているファイル 4.557 +名がメインファイルの@code{\includeonly}にない場合には自動的にこれを検出し、 4.558 +次の指示を仰ぎます。 4.559 4.560 @example 4.561 A)dd R)eplace %)comment? 4.562 @@ -1195,10 +1220,10 @@ 4.563 @code{\includeonly} の行をコメントアウトして無効化したい時には、@kbd{%}を 4.564 それぞれ押して下さい。 4.565 4.566 -@node Where am I?, Intelligent newline, Includeonly, Top 4.567 +@node What column, Intelligent newline, Includeonly, Top 4.568 @comment node-name, next, previous, up 4.569 -@chapter 今はどこ? 4.570 -@cindex 今はどこ?[いまはとこ] 4.571 +@chapter ここはどこ? 4.572 +@cindex ここどこ?[ここはとこ] 4.573 @cindex prefix & 4.574 @cindex 複雑なtabular[ふくさつなtabular] 4.575 4.576 @@ -1228,10 +1253,10 @@ 4.577 4.578 を押すとカーソル位置のカラムがどの項目に該当するかをミニバッファに表示しま 4.579 す。tabular/array環境の第1行目を項目名の並びとみなして対応するものを探しま 4.580 -す。もし項目名として別のものを与えたい場合は、行頭を@code{%}にしてダミーの 4.581 -項目並びを作っておくと良いでしょう。 4.582 +す。もし項目名として別のものを表示して欲しい場合は、行頭を@code{%}にしてダ 4.583 +ミーの項目並びを作っておくと良いでしょう。 4.584 4.585 -@node Intelligent newline, Online help, Where am I?, Top 4.586 +@node Intelligent newline, Online help, What column, Top 4.587 @comment node-name, next, previous, up 4.588 @chapter おまかせ改行 4.589 @cindex おまかせ改行[おまかせかいぎょう] 4.590 @@ -1247,7 +1272,7 @@ 4.591 4.592 @noindent 4.593 を押すと、その環境に応じた行エントリを次の行に挿入します。例えば、tabular 4.594 -環境では、その環境のカラム数に対応した個数の @code{&} にくわえ、行末の 4.595 +環境では、その環境のカラム数に対応した個数の @code{&} に加え、行末の 4.596 @code{\\} を入れます。この時それ以前に @code{\hline} があればそれも付け加 4.597 えます。環境とそれに応じて自動入力するものの対応は以下のようになります。 4.598 4.599 @@ -1298,6 +1323,8 @@ 4.600 @section オンラインヘルプ 4.601 @cindex グローバルヘルプ[くろおはるへるふ] 4.602 @cindex プライベートヘルプ[ふらいへえとへるふ] 4.603 +@cindex YaTeX-help-file 4.604 +@cindex YaTeX-help-file-private 4.605 4.606 「オンラインヘルプ」は、一般的な La@TeX{} コマンド(デフォルトでカーソル 4.607 位置のコマンド)に対する説明を隣のバッファに表示します。この時参照されるヘ 4.608 @@ -1309,8 +1336,6 @@ 4.609 クロ定義に関する説明が書かれているファイルで、変数 4.610 @code{YaTeX-help-file-private}の値で指定されます。こちらはユーザのホームディ 4.611 レクトリの下などに置かれます。 4.612 -@cindex YaTeX-help-file 4.613 -@cindex YaTeX-help-file-private 4.614 4.615 @section オンラインapropos 4.616 4.617 @@ -1387,7 +1412,8 @@ 4.618 4.619 yatex-mode における次の変数がカスタマイズ可能です。@file{~/.emacs} で 4.620 @code{setq} しておけば、そちらの定義が優先されます。括弧の中はデフォルト値 4.621 -です。 4.622 +です。実際に変数の値を変更する場合は @kbd{M-x describe-variable} で 4.623 +変数の詳細な説明を参照してください。 4.624 4.625 @defvar YaTeX-prefix 4.626 yatex-mode 中のプリフィクスキー(@kbd{C-c}) 4.627 @@ -1529,6 +1555,14 @@ 4.628 入力に入る(@kbd{nil}) 4.629 @end defvar 4.630 4.631 +@defvar YaTeX-hilit-pattern-adjustment-private 4.632 +正規表現とそれにマッチするものの論理的意味をシンボルであらわしたものの 4.633 +リスト…のリスト。hilit19 を組み込んでいる時のみ有効。 4.634 +詳しくは @code{(assq 'yatex-mode hilit-patterns-alist)} 4.635 +した結果と、変数 @code{YaTeX-hilit-pattern-adjustment-default} の値(と場合 4.636 +によっては hilit19 のドキュメント)を参照せよ。 4.637 +@end defvar 4.638 + 4.639 @node Sample definitions, Hook variables, All customizable variables, Lisp variables 4.640 @comment node-name, next, previous, up 4.641 @subsection カスタマイズ変数設定例 4.642 @@ -1619,8 +1653,8 @@ 4.643 しません。常識的に扱ってください。また、使用している旨をメイルでお知らせい 4.644 ただくと、作者は喜んでサポートに励むことでしょう(ほんとか)。 4.645 4.646 - 苦情、希望、バグ報告、感想等、作者が本プログラムに興味を持ってい 4.647 -る間に限り受け付けます。連絡は pcs39334@@asciinet.or.jp または、 4.648 + 苦情、希望、バグ報告、感想等は歓迎いたします。 4.649 +連絡は pcs39334@@asciinet.or.jp または、 4.650 yuuji@@ae.keio.ac.jpまで(1995年3月現在)。 4.651 4.652 仕様は、予告なく確実に(気分次第で)変更されます:-p。
5.1 --- a/help/YATEXHLP.jp Mon Oct 31 17:49:43 1994 +0000 5.2 +++ b/help/YATEXHLP.jp Fri Nov 25 08:26:13 1994 +0000 5.3 @@ -1161,9 +1161,25 @@ 5.4 新しいページを開始し、\textwidthのBOXをparboxで作成する。 5.5 二段組みページでぶち抜きタイトルを作成する時に用いるとよい。 5.6 5.7 +LaiTeX 5.8 +a Little Assistant Interface for TeX 5.9 +おそらくあなたが今 Vz 上で使っているこのモード。 5.10 +LaTeXを効率的に使うための多くの機能を盛り込んでいます。 5.11 + 5.12 +【発音について】 5.13 + 5.14 +laitex.defなどプログラムを指す時は「らいてっく」、システムを指す時は「ら 5.15 +いちょう」と読みます。 5.16 + 5.17 +【補足】 5.18 +「雷鳥」の旧仮名遣いは「らいてう」だそうです。 5.19 + 5.20 +laitex 5.21 +<refer LaiTeX> 5.22 + 5.23 YaTeX 5.24 (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) 5.25 -おそらくあなたが今使っているこのモード。 5.26 +おそらくあなたが今 Emacs で使っているこのモード。 5.27 LaTeXを効率的に使うための多くの機能を盛り込んでいます。 5.28 5.29 【発音について】
6.1 Binary file yatex.el has changed
7.1 --- a/yatex.new Mon Oct 31 17:49:43 1994 +0000 7.2 +++ b/yatex.new Fri Nov 25 08:26:13 1994 +0000 7.3 @@ -1,13 +1,31 @@ 7.4 - Yet Another tex-mode for Emacs 7.5 - yatex.el 各バージョンの変更点について。 7.6 + What's new in YaTeX 7.7 + yatex.el 各バージョンの変更点について 7.8 + 7.9 +1.54 section 型コマンドの引数のデフォルトの入力には通常の文字列入力を 7.10 + 行うようにし、変数 user-article-table を廃止した。これにより 7.11 + Emacs-19(Mule2) でのデフォルトのヘルプファイルの格納場所をetcディ 7.12 + レクトリから、site-lisp ディレクトリに変更した(注意!!)。 7.13 + ~/.yatexrc に任意の elisp を入れておいても消えないようになった。 7.14 + documentstyle のアドイン関数を充実させ、スタイルオプションやスタ 7.15 + イルの学習を行うようにした。 7.16 + ユーザ辞書も新単語の入力と同時に更新するようにし、kill-emacs を 7.17 + トラップするのをやめた。 7.18 + [prefix] c で section 型コマンドとその引数/オプション、large型 7.19 + コマンドを変更できるようにした。 7.20 + 数式モード自動判定時にコメントアウトされた $ は数えないようにし 7.21 + た。また、変数 YaTeX-verbatim-environments を用意し、LaTeX コマ 7.22 + ンドが無効となる環境名のリストを列挙できるようにした。 7.23 + YaTeX-hilit-pattern-adjustment-private で独自カラーを定義可能に。 7.24 + YaTeX-sectioning-level で独自に定義したセクション区切りコマンド 7.25 + を登録してもうまく動作するようにした。 7.26 7.27 1.53 Emacs-19で新単語の更新がうまくいかなかったのを今度こそ直した。 7.28 ref/labelジャンプで別のバッファのref/labelに飛べるようにした。 7.29 ref/labelジャンプと同形式でcite/bibitem間で飛べるようにした。 7.30 cite/bibitemのアドイン関数の追加。 7.31 7.32 -1.52 外部プロセス用テンポラリバッファが別frameにある時には現frameにテ 7.33 - ンポラリバッファをpopupしないようにした。 7.34 +1.52 外部プロセス用テンポラリバッファが別 frame にある時には現 frame 7.35 + にテンポラリバッファを popup しないようにした。 7.36 Hilightening に独自のタグを導入し、reverseVideo がON/OFFの時両方 7.37 に対応した。 7.38 Emacs-19で新単語の更新がうまくいかなかったのを直した。
8.1 --- a/yatex19.el Mon Oct 31 17:49:43 1994 +0000 8.2 +++ b/yatex19.el Fri Nov 25 08:26:13 1994 +0000 8.3 @@ -1,13 +1,13 @@ 8.4 ;;; -*- Emacs-Lisp -*- 8.5 ;;; YaTeX facilities for Emacs 19 8.6 ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 8.7 -;;; Last modified Fri Sep 23 04:30:27 1994 on figaro 8.8 +;;; Last modified Mon Nov 21 21:52:16 1994 on figaro 8.9 ;;; $Id$ 8.10 8.11 -;;; $B$H$j$"$($:(B hilit19 $B$r;H$C$F$$$k;~$K?'$,IU$/$h$&$K$7$F(B 8.12 -;;; $B%a%K%e!<%P!<$G$4$K$g$4$K$g$G$-$k$h$&$K$7$?$@$1!#(B 8.13 -;;; $B$$$C$?$$C/$,%a%K%e!<%P!<;H$C$F(BLaTeX$B%=!<%9=q$/$s$@$m$&$+(B? 8.14 -;;; $B$^$"$$$$$dN}=,N}=,!#8e$m$NJ}$K$A$g$C$H%3%a%s%H$"$j!#(B 8.15 +;;; とりあえず hilit19 を使っている時に色が付くようにして 8.16 +;;; メニューバーでごにょごにょできるようにしただけ。 8.17 +;;; いったい誰がメニューバー使ってLaTeXソース書くんだろうか? 8.18 +;;; まあいいや練習練習。後ろの方にちょっとコメントあり。 8.19 8.20 (require 'yatex) 8.21 8.22 @@ -203,17 +203,21 @@ 8.23 '(lambda (x y) (string< (car x) (car y)))))) 8.24 8.25 ;; Highlightening 8.26 -;; $B%m!<%+%k$J%^%/%m$rFI$_9~$s$@8e(B redraw $B$9$k$H(B 8.27 -;; $B%m!<%+%k%^%/%m$r(B keyword $B$H$7$F8w$i$;$k(B(keyword$B$8$c$^$:$$$+$J!D(B)$B!#(B 8.28 +;; ローカルなマクロを読み込んだ後 redraw すると 8.29 +;; ローカルマクロを keyword として光らせる(keywordじゃまずいかな…)。 8.30 (defvar YaTeX-hilit-pattern-adjustment 8.31 (list 8.32 - ;;\def $B$,(B define $B$J$s$@$+$i(B new* $B$b(B define $B$G$7$g$&!#(B 8.33 + ;;\def が define なんだから new* も define でしょう。 8.34 '("\\\\\\(re\\)?new\\(environment\\|command\\){" "}" define) 8.35 '("\\\\new\\(length\\|theorem\\|counter\\){" "}" define) 8.36 - ;;$B%;%/%7%g%s%3%^%s%I$,C1$J$k%-!<%o!<%I$C$F$3$H$O$J$$$G$7$g$&!#(B 8.37 + ;;セクションコマンドが単なるキーワードってことはないでしょう。 8.38 (list 8.39 (concat "\\\\\\(" YaTeX-sectioning-regexp "\\){") "}" 8.40 - 'sectioning)) 8.41 + 'sectioning) 8.42 + ;;eqnarray などの数式環境が入ってないみたい… 8.43 + '("\\\\begin{\\(eqnarray\\*?\\)\\|\\(equation\\*?\\)}" 8.44 + "\\\\end{\\(eqnarray\\*?\\)\\|\\(equation\\*?\\)}" 8.45 + formula)) 8.46 "Adjustment for hilit19's LaTeX hilit pattern.") 8.47 (defvar YaTeX-hilit-sectioning-face 8.48 '(yellow/dodgerblue yellow/cornflowerblue)) 8.49 @@ -269,10 +273,10 @@ 8.50 (define-key YaTeX-mode-map key 'YaTeX-hilit-recenter))) 8.51 (where-is-internal 'hilit-recenter))) 8.52 8.53 -;;; reverseVideo $B$K$7$F(B hilit-background-mode $B$r(B 'dark 8.54 -;;; $B$K$7$F$$$k?M$O?t<0$J$I$,0E$/$J$j$9$.$F8+$E$i$$$+$b$7$l$J$$!#(B 8.55 -;;; $B<!$N%3!<%I$r(B hilit19 $B$r%m!<%I$7$F$$$k>l=j$ND>8e$KCV$/$H$A$g$C(B 8.56 -;;; $B$H$O$^$7!#(B 8.57 +;;; reverseVideo にして hilit-background-mode を 'dark 8.58 +;;; にしている人は数式などが暗くなりすぎて見づらいかもしれない。 8.59 +;;; 次のコードを hilit19 をロードしている場所の直後に置くとちょっ 8.60 +;;; とはまし。 8.61 ;;; (if (eq hilit-background-mode 'dark) 8.62 ;;; (hilit-translate 8.63 ;;; string 'mediumspringgreen
9.1 --- a/yatexadd.el Mon Oct 31 17:49:43 1994 +0000 9.2 +++ b/yatexadd.el Fri Nov 25 08:26:13 1994 +0000 9.3 @@ -2,7 +2,7 @@ 9.4 ;;; YaTeX add-in functions. 9.5 ;;; yatexadd.el rev.9 9.6 ;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 9.7 -;;; Last modified Mon Oct 31 12:55:54 1994 on pajero 9.8 +;;; Last modified Sat Nov 12 07:03:15 1994 on VFR 9.9 ;;; $Id$ 9.10 9.11 ;;; 9.12 @@ -566,17 +566,22 @@ 9.13 "Alist of LaTeX style parameters.") 9.14 (defvar YaTeX:style-parameters-private nil 9.15 "*User definable alist of style parameters.") 9.16 -(defvar YaTeX:style-parameters-private nil 9.17 - "Holds the union of LaTeX style parameters.") 9.18 -(setq YaTeX:style-parameters 9.19 - (append YaTeX:style-parameters-private YaTeX:style-parameters-default)) 9.20 +(defvar YaTeX:style-parameters-local nil 9.21 + "*User definable alist of local style parameters.") 9.22 9.23 (defvar YaTeX:length-history nil "Holds history of length.") 9.24 (defun YaTeX::setlength (&optional argp) 9.25 "YaTeX add-in function for arguments of \\setlength." 9.26 (cond 9.27 ((equal 1 argp) 9.28 - (completing-read "Length variable: " YaTeX:style-parameters nil nil "\\")) 9.29 + ;;(completing-read "Length variable: " YaTeX:style-parameters nil nil "\\") 9.30 + (YaTeX-cplread-with-learning 9.31 + "Length variable: " 9.32 + 'YaTeX:style-parameters-default 9.33 + 'YaTeX:style-parameters-private 9.34 + 'YaTeX:style-parameters-local 9.35 + nil nil "\\") 9.36 + ) 9.37 ((equal 2 argp) 9.38 (let ((minibuffer-history-symbol 'YaTeX:length-history)) 9.39 (read-string "Length: ")))) 9.40 @@ -587,7 +592,12 @@ 9.41 "YaTeX add-in function for arguments of \\settowidth." 9.42 (cond 9.43 ((equal 1 argp) 9.44 - (completing-read "Length variable: " YaTeX:style-parameters nil nil "\\")) 9.45 + (YaTeX-cplread-with-learning 9.46 + "Length variable: " 9.47 + 'YaTeX:style-parameters-default 9.48 + 'YaTeX:style-parameters-private 9.49 + 'YaTeX:style-parameters-local 9.50 + nil nil "\\")) 9.51 ((equal 2 argp) 9.52 (read-string "Text: "))) 9.53 ) 9.54 @@ -596,12 +606,14 @@ 9.55 (cond 9.56 ((equal argp 1) 9.57 (let ((length (read-string "Length variable: " "\\"))) 9.58 - (or (assoc length YaTeX:style-parameters-private) 9.59 - (setq YaTeX:style-parameters-private 9.60 - (cons (list length) YaTeX:style-parameters-private) 9.61 - YaTeX:style-parameters 9.62 - (cons (list length) YaTeX:style-parameters))) 9.63 - length))) 9.64 + (if (string< "" length) 9.65 + (YaTeX-update-table 9.66 + (list length) 9.67 + 'YaTeX:style-parameters-default 9.68 + 'YaTeX:style-parameters-private 9.69 + 'YaTeX:style-parameters-local)) 9.70 + length) 9.71 + )) 9.72 ) 9.73 9.74 ;; \multicolumn's arguments 9.75 @@ -621,5 +633,75 @@ 9.76 (read-string "Item: "))) 9.77 ) 9.78 9.79 +(defvar YaTeX:documentstyles-default 9.80 + '(("article") ("jarticle") ("j-article") 9.81 + ("book") ("jbook") ("j-book") 9.82 + ("report") ("jreport") ("j-report") 9.83 + ("letter") ("ascjletter")) 9.84 + "List of LaTeX documentstyles.") 9.85 +(defvar YaTeX:documentstyles-private nil 9.86 + "*User defined list of LaTeX documentstyles.") 9.87 +(defvar YaTeX:documentstyles-local nil 9.88 + "*User defined list of local LaTeX documentstyles.") 9.89 +(defvar YaTeX:documentstyle-options-default 9.90 + '(("a4j") ("a5j") ("b4j") ("b5j") 9.91 + ("twocolumn") ("jtwocolumn") ("epsf") ("epsfig") ("epsbox") ("nfig")) 9.92 + "List of LaTeX documentstyle options.") 9.93 +(defvar YaTeX:documentstyle-options-private nil 9.94 + "*User defined list of LaTeX documentstyle options.") 9.95 +(defvar YaTeX:documentstyle-options-local nil 9.96 + "List of LaTeX local documentstyle options.") 9.97 + 9.98 +(defvar YaTeX-minibuffer-completion-map nil 9.99 + "Minibuffer completion key map that allows comma completion.") 9.100 +(if YaTeX-minibuffer-completion-map nil 9.101 + (setq YaTeX-minibuffer-completion-map 9.102 + (copy-keymap minibuffer-local-completion-map)) 9.103 + (define-key YaTeX-minibuffer-completion-map " " 9.104 + 'YaTeX-minibuffer-complete) 9.105 + (define-key YaTeX-minibuffer-completion-map "\t" 9.106 + 'YaTeX-minibuffer-complete)) 9.107 + 9.108 +(defun YaTeX:documentstyle () 9.109 + (let*((delim ",") 9.110 + (dt (append YaTeX:documentstyle-options-local 9.111 + YaTeX:documentstyle-options-private 9.112 + YaTeX:documentstyle-options-default)) 9.113 + (minibuffer-completion-table dt) 9.114 + (opt (read-from-minibuffer 9.115 + "Style options ([opt1,opt2,...]): " 9.116 + nil YaTeX-minibuffer-completion-map)) 9.117 + (substr opt) o) 9.118 + (if (string< "" opt) 9.119 + (progn 9.120 + (while substr 9.121 + (setq o (substring substr 0 (string-match delim substr))) 9.122 + (or (assoc o dt) 9.123 + (YaTeX-update-table 9.124 + (list o) 9.125 + 'YaTeX:documentstyle-options-default 9.126 + 'YaTeX:documentstyle-options-private 9.127 + 'YaTeX:documentstyle-options-local)) 9.128 + (setq substr 9.129 + (if (string-match delim substr) 9.130 + (substring substr (1+ (string-match delim substr)))))) 9.131 + (concat "[" opt "]")) 9.132 + ""))) 9.133 + 9.134 +(defun YaTeX::documentstyle (&optional argp) 9.135 + "YaTeX add-in function for arguments of \\socumentstyle." 9.136 + (cond 9.137 + ((equal argp 1) 9.138 + (let ((sname 9.139 + (YaTeX-cplread-with-learning 9.140 + (format "Documentstyle (default %s): " 9.141 + YaTeX-default-document-style) 9.142 + 'YaTeX:documentstyles-default 9.143 + 'YaTeX:documentstyles-private 9.144 + 'YaTeX:documentstyles-local))) 9.145 + (if (string= "" sname) (setq sname YaTeX-default-document-style)) 9.146 + (setq YaTeX-default-document-style sname)))) 9.147 +) 9.148 + 9.149 ;;; -------------------- End of yatexadd -------------------- 9.150 (provide 'yatexadd)
10.1 --- a/yatexenv.el Mon Oct 31 17:49:43 1994 +0000 10.2 +++ b/yatexenv.el Fri Nov 25 08:26:13 1994 +0000 10.3 @@ -2,7 +2,7 @@ 10.4 ;;; YaTeX environment-specific functions. 10.5 ;;; yatexenv.el 10.6 ;;; (c ) 1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 10.7 -;;; Last modified Tue Sep 20 01:35:46 1994 on figaro 10.8 +;;; Last modified Thu Nov 24 04:33:18 1994 on 98fa 10.9 ;;; $Id$ 10.10 10.11 ;;; 10.12 @@ -13,7 +13,8 @@ 10.13 (defun YaTeX-array-what-column () 10.14 "Show matching columne title of array environment. 10.15 When calling from a program, make sure to be in array/tabular environment." 10.16 - (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") (n 0) 10.17 + (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") 10.18 + (n 0) j 10.19 (firsterr "This line might be the first row.")) 10.20 (save-excursion 10.21 (YaTeX-beginning-of-environment) 10.22 @@ -46,24 +47,23 @@ 10.23 -1))))) 10.24 (message "%s" n) 10.25 (goto-char (1- beg)) 10.26 - (cond 10.27 - ((= n 1) (message "Here is the FIRST column!")) 10.28 - (t (while (> n 1) 10.29 - (or (re-search-forward andptn p nil) 10.30 - (error "This column exceeds the limit.")) 10.31 - (setq n (1- n))) 10.32 - (skip-chars-forward "\\s ") 10.33 - (message 10.34 - "Here is the column of: %s" 10.35 - (buffer-substring 10.36 - (point) 10.37 - (progn 10.38 - (re-search-forward (concat andptn "\\|" nlptn) eot) 10.39 - (goto-char (match-beginning 0)) 10.40 - (if (looking-at andptn) 10.41 - (forward-char 1)) 10.42 - (skip-chars-backward "\\s ") 10.43 - (point)))))))) 10.44 + (setq j n) 10.45 + (while (> j 1) 10.46 + (or (re-search-forward andptn p nil) 10.47 + (error "This column exceeds the limit.")) 10.48 + (setq j (1- j))) 10.49 + (skip-chars-forward "\\s ") 10.50 + (message 10.51 + "This is the column(#%d) of: %s" n 10.52 + (buffer-substring 10.53 + (point) 10.54 + (progn 10.55 + (re-search-forward (concat andptn "\\|" nlptn) eot) 10.56 + (goto-char (match-beginning 0)) 10.57 + (if (looking-at andptn) 10.58 + (forward-char 1)) 10.59 + (skip-chars-backward "\\s ") 10.60 + (point)))))) 10.61 ) 10.62 10.63 ;;;###autoload
11.1 --- a/yatexgen.el Mon Oct 31 17:49:43 1994 +0000 11.2 +++ b/yatexgen.el Fri Nov 25 08:26:13 1994 +0000 11.3 @@ -2,7 +2,7 @@ 11.4 ;;; YaTeX add-in function generator. 11.5 ;;; yatexgen.el rev.3 11.6 ;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 11.7 -;;; Last modified Tue Sep 20 01:34:46 1994 on figaro 11.8 +;;; Last modified Thu Nov 17 03:54:56 1994 on VFR 11.9 ;;; $Id$ 11.10 11.11 (require 'yatex) 11.12 @@ -587,7 +587,10 @@ 11.13 singlecmd-table user-singlecmd-table tmp-singlecmd-table) 11.14 nil nil) 11.15 command (if (string= "" command) section-name command))) 11.16 - (message "(o)追加型? (a)引数型? (yatexadd.docを参照のこと) :") 11.17 + (message 11.18 + (cond 11.19 + (YaTeX-japan "(o)追加型? (a)引数型? (yatexadd.docを参照のこと) :") 11.20 + (t "(O)ption? (A)rgument?"))) 11.21 (YaTeX-showup-buffer 11.22 (if (= (read-char) ?o) 11.23 (YaTeX-generate-option-type command)
12.1 --- a/yatexhlp.el Mon Oct 31 17:49:43 1994 +0000 12.2 +++ b/yatexhlp.el Fri Nov 25 08:26:13 1994 +0000 12.3 @@ -2,15 +2,16 @@ 12.4 ;;; YaTeX helper with LaTeX commands and macros. 12.5 ;;; yatexhlp.el 12.6 ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 12.7 -;;; Last modified Tue Sep 20 01:35:12 1994 on figaro 12.8 +;;; Last modified Sat Nov 12 04:20:26 1994 on VFR 12.9 ;;; $Id$ 12.10 12.11 (let ((help-file (concat "YATEXHLP." 12.12 (cond (YaTeX-japan "jp") 12.13 (t "eng")))) 12.14 (help-dir 12.15 - (cond (YaTeX-emacs-19 (expand-file-name "../etc" exec-directory)) 12.16 - (t exec-directory)))) 12.17 + (cond 12.18 + (YaTeX-emacs-19 (expand-file-name "../../site-lisp" exec-directory)) 12.19 + (t exec-directory)))) 12.20 (defvar YaTeX-help-file 12.21 (expand-file-name help-file help-dir) 12.22 "*Help file of LaTeX/TeX commands or macros.")
13.1 --- a/yatexlib.el Mon Oct 31 17:49:43 1994 +0000 13.2 +++ b/yatexlib.el Fri Nov 25 08:26:13 1994 +0000 13.3 @@ -2,7 +2,7 @@ 13.4 ;;; YaTeX library of general functions. 13.5 ;;; yatexlib.el 13.6 ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 13.7 -;;; Last modified Mon Oct 10 22:14:14 1994 on VFR 13.8 +;;; Last modified Thu Nov 24 02:20:45 1994 on VFR 13.9 ;;; $Id$ 13.10 13.11 ;;;###autoload 13.12 @@ -11,7 +11,7 @@ 13.13 Optional arguments after BOUND, ERR, CNT are passed literally to search-forward 13.14 or search-backward. 13.15 Optional sixth argument FUNC changes search-function." 13.16 - (let ((sfunc (if func func 'search-forward)) found md) 13.17 + (let ((sfunc (or func 'search-forward)) found md) 13.18 (while (and (prog1 13.19 (setq found (funcall sfunc string bound err cnt)) 13.20 (setq md (match-data))) 13.21 @@ -122,7 +122,7 @@ 13.22 "Make BUFFER show up in certain window (but current window) 13.23 that gives the maximum value by the FUNC. FUNC should take an argument 13.24 of its window object. Non-nil for optional third argument SELECT selects 13.25 -that window." 13.26 +that window. This function never selects minibuffer window." 13.27 (or (and (if YaTeX-emacs-19 13.28 (get-buffer-window buffer t) 13.29 (get-buffer-window buffer)) 13.30 @@ -158,7 +158,8 @@ 13.31 (switch-to-buffer buffer) 13.32 (or select (select-window window))) 13.33 ((= (length wlist) 2) 13.34 - (other-window 1) 13.35 + ;(other-window 1);This does not work properly on Emacs-19 13.36 + (select-window (get-lru-window)) 13.37 (switch-to-buffer buffer) 13.38 (or select (select-window window))) 13.39 (t ;if one-window 13.40 @@ -208,23 +209,33 @@ 13.41 "Return (buffer-substring (match-beginning n) (match-beginning m))." 13.42 (if (match-beginning n) 13.43 (buffer-substring (match-beginning n) 13.44 - (match-end (if m m n)))) 13.45 + (match-end (or m n)))) 13.46 ) 13.47 13.48 ;;;###autoload 13.49 (defun YaTeX-minibuffer-complete () 13.50 - "Complete in minibuffer" 13.51 + "Complete in minibuffer. 13.52 +If the symbol 'delim is bound and is string, its value is assumed to be 13.53 +the character class of delimiters. Completion will be performed on 13.54 +the last field separated by those delimiters." 13.55 (interactive) 13.56 - (let (beg word compl) 13.57 - (setq beg (if (and (boundp 'delim) delim) 13.58 + (let (beg word compl (md (match-data))) 13.59 + (setq beg (if (and (boundp 'delim) (stringp delim)) 13.60 (save-excursion 13.61 (skip-chars-backward (concat "^" delim)) 13.62 - (1- (point))) 13.63 + (point)) 13.64 (point-min)) 13.65 word (buffer-substring beg (point-max)) 13.66 compl (try-completion word minibuffer-completion-table)) 13.67 (cond 13.68 - ((eq compl t) nil) 13.69 + ((eq compl t) 13.70 + (let ((p (point)) (max (point-max))) 13.71 + (goto-char max) 13.72 + (insert " [Sole completion]") 13.73 + (goto-char p) 13.74 + (sit-for 1) 13.75 + (delete-region max (point-max)) 13.76 + (goto-char p))) 13.77 ((eq compl nil) 13.78 (ding) 13.79 (save-excursion 13.80 @@ -240,7 +251,8 @@ 13.81 (all-completions word minibuffer-completion-table)))) 13.82 (t (delete-region beg (point-max)) 13.83 (insert compl)) 13.84 - )) 13.85 + ) 13.86 + (store-match-data md)) 13.87 ) 13.88 13.89
14.1 --- a/yatexprc.el Mon Oct 31 17:49:43 1994 +0000 14.2 +++ b/yatexprc.el Fri Nov 25 08:26:13 1994 +0000 14.3 @@ -2,7 +2,7 @@ 14.4 ;;; YaTeX process handler. 14.5 ;;; yatexprc.el 14.6 ;;; (c )1993-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 14.7 -;;; Last modified Thu Oct 20 16:48:41 1994 on figaro 14.8 +;;; Last modified Fri Nov 25 03:31:46 1994 on VFR 14.9 ;;; $Id$ 14.10 14.11 (require 'yatex) 14.12 @@ -19,6 +19,11 @@ 14.13 (defvar YaTeX-current-TeX-buffer nil 14.14 "Keeps the buffer on which recently typeset run.") 14.15 14.16 +(defvar YaTeX-shell-command-option 14.17 + (or (and (boundp 'shell-command-option) shell-command-option) 14.18 + (if YaTeX-dos "/c" "-c")) 14.19 + "Shell option for command execution.") 14.20 + 14.21 (if YaTeX-typeset-buffer-syntax nil 14.22 (setq YaTeX-typeset-buffer-syntax 14.23 (make-syntax-table (standard-syntax-table))) 14.24 @@ -50,12 +55,14 @@ 14.25 (cond 14.26 (YaTeX-dos ;if MS-DOS 14.27 (YaTeX-put-nonstopmode) 14.28 - (call-process shell-file-name nil buffer nil "/c" command) 14.29 + (call-process 14.30 + shell-file-name nil buffer nil YaTeX-shell-command-option command) 14.31 (YaTeX-remove-nonstopmode)) 14.32 (t ;if UNIX 14.33 (set-process-buffer 14.34 (setq YaTeX-typeset-process 14.35 - (start-process "LaTeX" buffer shell-file-name "-c" command)) 14.36 + (start-process "LaTeX" buffer shell-file-name 14.37 + YaTeX-shell-command-option command)) 14.38 (get-buffer buffer)) 14.39 (set-process-sentinel YaTeX-typeset-process 'YaTeX-typeset-sentinel))) 14.40 (message (format "Calling `%s'..." command)) 14.41 @@ -302,9 +309,11 @@ 14.42 (set-buffer (get-buffer-create buffer)) 14.43 (erase-buffer) 14.44 (if YaTeX-dos 14.45 - (call-process shell-file-name nil buffer nil "/c " command) 14.46 + (call-process 14.47 + shell-file-name nil buffer nil YaTeX-shell-command-option command) 14.48 (set-process-buffer 14.49 - (start-process "system" buffer shell-file-name "-c" command) 14.50 + (start-process 14.51 + "system" buffer shell-file-name YaTeX-shell-command-option command) 14.52 (get-buffer buffer)))) 14.53 ) 14.54 14.55 @@ -330,21 +339,24 @@ 14.56 (setq dvi2-command preview-command) ;`dvi2command' is buffer local 14.57 (save-excursion 14.58 (YaTeX-visit-main t) 14.59 - (let ((pbuffer "*dvi-preview*")) 14.60 + (let ((pbuffer "*dvi-preview*") (dir default-directory)) 14.61 (YaTeX-showup-buffer 14.62 pbuffer (function (lambda (x) (nth 3 (window-edges x))))) 14.63 (set-buffer (get-buffer-create pbuffer)) 14.64 (erase-buffer) 14.65 + (setq default-directory dir) ;for 18 14.66 + (cd dir) ;for 19 14.67 (cond 14.68 (YaTeX-dos ;if MS-DOS 14.69 (send-string-to-terminal "\e[2J\e[>5h") ;CLS & hide cursor 14.70 (call-process shell-file-name "con" "*dvi-preview*" nil 14.71 - "/c " preview-command preview-file) 14.72 + YaTeX-shell-command-option preview-command preview-file) 14.73 (send-string-to-terminal "\e[>5l") ;show cursor 14.74 (redraw-display)) 14.75 (t ;if UNIX 14.76 (set-process-buffer 14.77 - (start-process "preview" "*dvi-preview*" shell-file-name "-c" 14.78 + (start-process "preview" "*dvi-preview*" shell-file-name 14.79 + YaTeX-shell-command-option 14.80 (concat preview-command " " preview-file)) 14.81 (get-buffer pbuffer)) 14.82 (message 14.83 @@ -594,14 +606,15 @@ 14.84 (erase-buffer) 14.85 (cond 14.86 (YaTeX-dos 14.87 - (call-process shell-file-name "con" "*dvi-printing*" nil "/c " cmd)) 14.88 + (call-process shell-file-name "con" "*dvi-printing*" nil 14.89 + YaTeX-shell-command-option cmd)) 14.90 (t 14.91 (set-process-buffer 14.92 - (start-process "print" "*dvi-printing*" shell-file-name "-c" cmd) 14.93 + (start-process "print" "*dvi-printing*" shell-file-name 14.94 + YaTeX-shell-command-option cmd) 14.95 (get-buffer lbuffer)) 14.96 - (message (concat "Starting " cmd " to printing " 14.97 - (YaTeX-get-preview-file-name))))) 14.98 - )) 14.99 + (message "Starting printing command: %s..." cmd))) 14.100 + )) 14.101 ) 14.102 14.103 (defun YaTeX-main-file-p ()
15.1 --- a/yatexsec.el Mon Oct 31 17:49:43 1994 +0000 15.2 +++ b/yatexsec.el Fri Nov 25 08:26:13 1994 +0000 15.3 @@ -2,13 +2,25 @@ 15.4 ;;; YaTeX sectioning browser. 15.5 ;;; yatexsec.el 15.6 ;;; (c ) 1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] 15.7 -;;; Last modified Tue Sep 20 01:35:32 1994 on figaro 15.8 +;;; Last modified Fri Nov 25 04:46:42 1994 on VFR 15.9 ;;; $Id$ 15.10 15.11 (defvar YaTeX-sectioning-level 15.12 - '(("part" . 0) ("chapter" . 1) ("section" . 2) ("subsection" . 3) 15.13 - ("subsubsection" . 4) ("paragraph" . 5) ("subparagraph" . 6)) 15.14 - "Sectioning level.") 15.15 + '(("part" . 0) 15.16 + ("chapter" . 1) 15.17 + ("section" . 2) 15.18 + ("subsection" . 3) 15.19 + ("subsubsection" . 4) 15.20 + ("paragraph" . 5) 15.21 + ("subparagraph" . 6)) 15.22 + "*Alist of LaTeX's sectioning command and its level. 15.23 +This value must be written in numerically ascending order and consecutive. 15.24 +Needn't define the level of `*' commands such as `section*'.") 15.25 + 15.26 +(defvar YaTeX-sectioning-max-level 15.27 + (cdr (nth (1- (length YaTeX-sectioning-level)) YaTeX-sectioning-level)) 15.28 + "*The heighest(numerically) level of sectioning command. 15.29 +This must be the heighest number in YaTeX-sectioning-level.") 15.30 15.31 (defun YaTeX-sectioning-map-hide (map) 15.32 (let ((ch ?0)) 15.33 @@ -17,40 +29,40 @@ 15.34 (setq ch (1+ ch)))) 15.35 ) 15.36 15.37 -(defvar YaTeX-minibuffer-sectioning-map nil 15.38 +(defvar YaTeX-sectioning-minibuffer-map nil 15.39 "Key map used in minibuffer for sectioning.") 15.40 -(if YaTeX-minibuffer-sectioning-map nil 15.41 - (setq YaTeX-minibuffer-sectioning-map 15.42 +(if YaTeX-sectioning-minibuffer-map nil 15.43 + (setq YaTeX-sectioning-minibuffer-map 15.44 (copy-keymap minibuffer-local-completion-map)) 15.45 - (define-key YaTeX-minibuffer-sectioning-map "\C-p" 15.46 + (define-key YaTeX-sectioning-minibuffer-map "\C-p" 15.47 'YaTeX-sectioning-up) 15.48 - (define-key YaTeX-minibuffer-sectioning-map "\C-e" 15.49 + (define-key YaTeX-sectioning-minibuffer-map "\C-e" 15.50 'YaTeX-sectioning-up) 15.51 - (define-key YaTeX-minibuffer-sectioning-map "\C-i" 15.52 + (define-key YaTeX-sectioning-minibuffer-map "\C-i" 15.53 'YaTeX-minibuffer-complete) 15.54 - (define-key YaTeX-minibuffer-sectioning-map " " 15.55 + (define-key YaTeX-sectioning-minibuffer-map " " 15.56 'YaTeX-minibuffer-complete) 15.57 - (define-key YaTeX-minibuffer-sectioning-map "\C-n" 15.58 + (define-key YaTeX-sectioning-minibuffer-map "\C-n" 15.59 'YaTeX-sectioning-down) 15.60 - (define-key YaTeX-minibuffer-sectioning-map "\C-x" 15.61 + (define-key YaTeX-sectioning-minibuffer-map "\C-x" 15.62 'YaTeX-sectioning-down) 15.63 - (define-key YaTeX-minibuffer-sectioning-map "\C-v" 15.64 + (define-key YaTeX-sectioning-minibuffer-map "\C-v" 15.65 'YaTeX-sectioning-scroll-up) 15.66 - (define-key YaTeX-minibuffer-sectioning-map "\C-c" 15.67 + (define-key YaTeX-sectioning-minibuffer-map "\C-c" 15.68 'YaTeX-sectioning-scroll-up) 15.69 - (define-key YaTeX-minibuffer-sectioning-map "\M-v" 15.70 + (define-key YaTeX-sectioning-minibuffer-map "\M-v" 15.71 'YaTeX-sectioning-scroll-down) 15.72 - (define-key YaTeX-minibuffer-sectioning-map "\C-r" 15.73 + (define-key YaTeX-sectioning-minibuffer-map "\C-r" 15.74 'YaTeX-sectioning-scroll-down) 15.75 - (define-key YaTeX-minibuffer-sectioning-map "\C-w" 15.76 + (define-key YaTeX-sectioning-minibuffer-map "\C-w" 15.77 '(lambda () (interactive) (YaTeX-sectioning-scroll-down 1))) 15.78 - (define-key YaTeX-minibuffer-sectioning-map "\C-z" 15.79 + (define-key YaTeX-sectioning-minibuffer-map "\C-z" 15.80 '(lambda () (interactive) (YaTeX-sectioning-scroll-up 1))) 15.81 - (define-key YaTeX-minibuffer-sectioning-map "\C-l" 15.82 + (define-key YaTeX-sectioning-minibuffer-map "\C-l" 15.83 'YaTeX-sectioning-recenter) 15.84 - (define-key YaTeX-minibuffer-sectioning-map "?" 15.85 + (define-key YaTeX-sectioning-minibuffer-map "?" 15.86 'YaTeX-sectioning-help) 15.87 - (YaTeX-sectioning-map-hide YaTeX-minibuffer-sectioning-map) 15.88 + (YaTeX-sectioning-map-hide YaTeX-sectioning-minibuffer-map) 15.89 ) 15.90 15.91 (defvar YaTeX-sectioning-buffer-map nil 15.92 @@ -85,13 +97,13 @@ 15.93 "Hide sectioning commands under level N." 15.94 (let ((cw (selected-window))) 15.95 (YaTeX-showup-buffer YaTeX-sectioning-buffer nil t) 15.96 - (if (>= n (1- (length YaTeX-sectioning-level))) 15.97 + (if (>= n YaTeX-sectioning-max-level) 15.98 (progn 15.99 (set-selective-display nil) 15.100 (message "Show all.")) 15.101 (set-selective-display (1+ n)) 15.102 - (if (nth n YaTeX-sectioning-level) 15.103 - (message "Hide lower than %s" (car (nth n YaTeX-sectioning-level))) 15.104 + (if (rassq n YaTeX-sectioning-level) 15.105 + (message "Hide lower than %s" (car (rassq n YaTeX-sectioning-level))) 15.106 (message ""))) 15.107 (if (numberp selective-display) 15.108 (setq mode-name (format "level %d" (1- selective-display))) 15.109 @@ -118,9 +130,11 @@ 15.110 C-n Down sectioning level. 1 and \\chapter, 15.111 C-v Scroll up *Sectioning line* buffer. 2 and \\section, 15.112 M-v Scroll down *Sectioning line* buffer. 3 and \\subsection, 15.113 -SPC Complete word. 4 and \\subsubsection, 15.114 -TAB Complete word. 5 and \\paragraph. 15.115 -C-l Recenter recent line. 6 Show all. 15.116 +C-z Scroll up by 1 line. 4 and \\subsubsection, 15.117 +C-w Scroll down by 1 line. 5 and \\paragraph. 15.118 +SPC Complete word. 6 Show all. 15.119 +TAB Complete word. 15.120 +C-l Recenter recent line. 15.121 RET Select. 15.122 ==== End of HELP ===== 15.123 ") 15.124 @@ -138,15 +152,18 @@ 15.125 (interactive "p") 15.126 (if (eq (selected-window) (minibuffer-window)) 15.127 (let*((command (buffer-string)) 15.128 + (aster (equal (substring command -1) "*")) 15.129 + (command (if aster (substring command 0 -1) command)) 15.130 (alist YaTeX-sectioning-level) 15.131 - (level (cdr-safe (assoc command alist)))) 15.132 - (or level (error "No such sectioning command.")) 15.133 + (level 0)) 15.134 + (or (assoc command alist) (error "No such sectioning command.")) 15.135 + (while (not (string= (car (nth level alist)) command)) 15.136 + (setq level (1+ level))) ;I want to use `member'.... 15.137 (setq level (- level n)) 15.138 (if (or (< level 0) (>= level (length alist))) 15.139 (ding) 15.140 (erase-buffer) 15.141 - (insert (car (nth level alist)))) 15.142 - )) 15.143 + (insert (concat (car (nth level alist)) (if aster "*" "")))))) 15.144 ) 15.145 15.146 (defun YaTeX-sectioning-down (n) 15.147 @@ -183,18 +200,19 @@ 15.148 (progn 15.149 (YaTeX-showup-buffer YaTeX-sectioning-buffer nil t) 15.150 (or (search-forward "<<--" nil t) 15.151 - (search-backward "<<--" nil t)) 15.152 + (search-backward "<<--" nil)) 15.153 (recenter (or arg (/ (window-height) 2)))) 15.154 (select-window cw))) 15.155 ) 15.156 15.157 (defvar YaTeX-sectioning-minibuffer " *sectioning*" 15.158 "Miniuffer used for sectioning") 15.159 +;;;###autoload 15.160 (defun YaTeX-read-section-in-minibuffer (prompt table &optional default delim) 15.161 (interactive) 15.162 (let ((minibuffer-completion-table table)) 15.163 (read-from-minibuffer 15.164 - prompt default YaTeX-minibuffer-sectioning-map)) 15.165 + prompt default YaTeX-sectioning-minibuffer-map)) 15.166 ) 15.167 15.168 (defun YaTeX-get-sectioning-level () 15.169 @@ -265,6 +283,7 @@ 15.170 command)) 15.171 ) 15.172 15.173 +;;;###autoload 15.174 (defun YaTeX-make-section-with-overview () 15.175 "Input sectining command with previous overview." 15.176 (interactive) 15.177 @@ -278,4 +297,3 @@ 15.178 ) 15.179 15.180 (provide 'yatexsec) 15.181 -;;(YaTeX-define-key "o" 'YaTeX-make-section-with-overview)