yatex
diff docs/yatexe.tex @ 20:b6127058e365
Change the YaTeX-math-mode's prefix from `,' to `;'.
Add YaTeX-apropos, YaTeX-what-column, YaTeX-beginning-of-environment,
YaTeX-end-of-environment.
Add variables YaTeX-default-pop-window-height, YaTeX-close-paren-always,
YaTeX-no-begend-shortcut, YaTeX-auto-math-mode.
Remove Greek letters from maketitle-type.
Make YaTeX-inner-environment two times faster and more reliable.
C-u for [prefix] k kills contents too.
Fix the detection of the range of section-type commands when nested.
Add \end{ completion.
Add YaTeX-generate-simple.
Refine documents(using Texinfo).
%#REQUIRE for sub-preambles.
author | yuuji |
---|---|
date | Thu, 07 Jul 1994 16:37:05 +0000 |
parents | |
children | 0f8b77d22c8a |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docs/yatexe.tex Thu Jul 07 16:37:05 1994 +0000 1.3 @@ -0,0 +1,1473 @@ 1.4 +\input texinfo.tex 1.5 +@setfilename yatexe 1.6 +@settitle Yet Another tex-mode for Emacs 1.7 + 1.8 +@iftex 1.9 +@syncodeindex fn cp 1.10 +@syncodeindex vr cp 1.11 +@end iftex 1.12 + 1.13 +@titlepage 1.14 +@sp 10 1.15 +@center 1.16 +@subtitle Yet Another tex-mode for emacs 1.17 +@title Wild Bird 1.18 +@subtitle // YaTeX // 1.19 +@author @copyright{} 1991-1994 by HIROSE, Yuuji [yuuji@@ae.keio.ac.jp] 1.20 +@end titlepage 1.21 + 1.22 +@node Top, What is YaTeX?, (dir), (dir) 1.23 +@comment node-name, next, previous, up 1.24 +@cindex Demacs 1.25 +@cindex Mule 1.26 +@cindex LaTeX 1.27 +@cindex YaTeX 1.28 + 1.29 +@menu 1.30 +* What is YaTeX?:: 1.31 +* Main features:: 1.32 +* Installation:: 1.33 +* Typesetting:: 1.34 +* %# notation:: 1.35 +* Completion:: 1.36 +* Commenting out:: 1.37 +* Cursor jump:: 1.38 +* Changing and Deleting:: 1.39 +* Filling an item:: 1.40 +* Local dictionaries:: 1.41 +* Updation of @code{\includeonly}:: 1.42 +* What column?:: 1.43 +* Online help:: 1.44 +* Cooperation with other packages:: 1.45 +* Customizations:: 1.46 +* Etcetera:: 1.47 +* Copying:: 1.48 + 1.49 + --- The Detailed Node Listing --- 1.50 + 1.51 +%# notation 1.52 + 1.53 +* Changing typesetter:: 1.54 +* Static region for typesetting:: 1.55 +* Lpr format:: 1.56 +* Editing %# notation:: 1.57 + 1.58 +Completion 1.59 + 1.60 +* Begin-type completion:: 1.61 +* Section-type completion:: 1.62 +* Large-type completion:: 1.63 +* Maketitle-type completion:: 1.64 +* Arbitrary completion:: 1.65 +* End completion:: 1.66 +* Accent completion:: 1.67 +* Image completion:: 1.68 +* Greek letters completion:: 1.69 + 1.70 +Section-type completion 1.71 + 1.72 +* view-sectioning:: 1.73 + 1.74 +Customizations 1.75 + 1.76 +* Lisp variables:: 1.77 +* Add-in functions:: 1.78 + 1.79 +Lisp variables 1.80 + 1.81 +* All customizable variables:: 1.82 +* Sample definitions:: 1.83 +* Hook variables:: 1.84 +* Hook file:: 1.85 +@end menu 1.86 + 1.87 +@node What is YaTeX?, Main features, Top, Top 1.88 +@comment node-name, next, previous, up 1.89 +@chapter What is YaTeX? 1.90 + 1.91 + YaTeX automates typesetting and previewing of LaTeX and enables 1.92 +completing input of LaTeX mark-up command such as 1.93 +@code{\begin@{@}}..@code{\end@{@}}. 1.94 + 1.95 + YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi 1.96 +Language Enhancement to GNU Emacs), and latex on DOS. 1.97 + 1.98 +@node Main features, Installation, What is YaTeX?, Top 1.99 +@comment node-name, next, previous, up 1.100 +@chapter Main features 1.101 + 1.102 +@itemize 1.103 +@item Invocation of typesetter, previewer and related programs(C-c t) 1.104 +@item Typesetting on static region which is independent from point 1.105 +@item Semiautomatic replacing of @code{\include only} 1.106 +@item Jumping to error line(@kbd{C-c '}) 1.107 +@item Completing-read of La@TeX{} commands such as @code{\begin@{@}}, 1.108 + @code{\section} etc. 1.109 + (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) 1.110 +@item Enclosing text into La@TeX{} environments or commands 1.111 + (@kbd{C-u} @var{AboveKeyStrokes}) 1.112 +@item Learning unknown/new La@TeX{} commands for the next completion 1.113 +@item Argument reading with a guide for complicated La@TeX{} commands 1.114 +@item Generating argument-readers for new/unsupported commands(@file{yatexgen}) 1.115 +@item Quick changing or deleting of La@TeX{} commands(@kbd{C-c c}, @kbd{C-c k}) 1.116 +@item Jumping from and to inter-file, begin<->end, ref<->label(@kbd{C-c g}) 1.117 +@item Blanket commenting out or uncommenting 1.118 + (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .}) 1.119 +@item Easy input of accent mark, math-mode's commands and Greek letters 1.120 + (@kbd{C-c a}, @kbd{;}, @kbd{/}) 1.121 +@item Online help for the popular La@TeX{} commands 1.122 + (@kbd{C-c ?}, @kbd{C-c /})(English help is not yet supported) 1.123 +@end itemize 1.124 + 1.125 +@node Installation, Typesetting, Main features, Top 1.126 +@comment node-name, next, previous, up 1.127 +@chapter Installation 1.128 +@cindex installation 1.129 +@cindex .emacs 1.130 +@cindex auto-mode-alist 1.131 +@cindex autoload 1.132 + 1.133 + Put next two expressions into your @file{~/.emacs}. 1.134 + 1.135 +@lisp 1.136 + (setq auto-mode-alist 1.137 + (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) 1.138 + (autoload 'yatex-mode "yatex" "Yet Another La@TeX{} mode" t) 1.139 +@end lisp 1.140 + 1.141 +Next, add certain path name where you put files of YaTeX to your 1.142 +load-path. If you want to put them in @file{~/src/emacs}, write 1.143 + 1.144 +@lisp 1.145 + (setq load-path 1.146 + (cons (expand-file-name "~/src/emacs") load-path)) 1.147 +@end lisp 1.148 + 1.149 +@noindent 1.150 +in your @file{~/.emacs} 1.151 + 1.152 + Then, yatex-mode will be automatically loaded when you visit a 1.153 +file which has extension @file{.tex}. If yatex-mode is successfully 1.154 +loaded, mode string on mode line will be turned to "YaTeX". 1.155 + 1.156 + 1.157 +@node Typesetting, %# notation, Installation, Top 1.158 +@comment node-name, next, previous, up 1.159 +@chapter Typesetting 1.160 +@cindex typesetting 1.161 +@cindex previewer 1.162 +@cindex typesetter 1.163 +@cindex latex 1.164 +@cindex printing out 1.165 + 1.166 + The prefix key stroke of yatex-mode is @kbd{C-c} (Press 'C' with Control 1.167 +key) by default. If you don't intend to change the prefix key stroke, 1.168 +assume all @kbd{[prefix]} as @kbd{C-c} in this document. These key 1.169 +strokes execute typeset or preview command. 1.170 + 1.171 +@table @kbd 1.172 +@item [prefix] tj 1.173 + @dots{} invoke latex 1.174 +@item [prefix] tr 1.175 + @dots{} invoke latex on region 1.176 +@item [prefix] tk 1.177 + @dots{} kill current typesetting process 1.178 +@item [prefix] tb 1.179 + @dots{} invoke bibtex 1.180 +@item [prefix] tp 1.181 + @dots{} preview 1.182 +@item [prefix] tl 1.183 + @dots{} lpr dvi-file 1.184 +@end table 1.185 + 1.186 + The current editing window will be divided horizontally when you 1.187 +invoke latex command, and log message of La@TeX{} typesetting will be 1.188 +displayed in the other window; called typesetting buffer. The 1.189 +typesetting buffer automatically scrolls up and traces La@TeX{} 1.190 +warnings and error messages. If you see latex stopping by an 1.191 +error, you can send string to latex in the typesetting buffer. 1.192 + 1.193 + If an error stops the La@TeX{} typesetting, this key stroke will 1.194 +move the cursor to the line where La@TeX{} error is detected. 1.195 + 1.196 +@table @kbd 1.197 +@item [prefix] ' 1.198 +@itemx ([prefix]+single quotation) 1.199 + 1.200 + @dots{} jump to the previous error or warning 1.201 +@end table 1.202 + 1.203 + If you find a noticeable error, move to the typesetting buffer and move 1.204 +the cursor on the line of error message and type @kbd{SPACE} key. This 1.205 +makes the cursor move to corresponding source line. 1.206 + 1.207 + Since @kbd{[prefix] tr} pastes the region into the file 1.208 +@file{texput.tex} in the current directory, you should be careful of 1.209 +overwriting. The method of specification of the region is shown in the 1.210 +section @xref{%#NOTATION}. 1.211 + 1.212 + The documentstyle for typeset-region is the same as that of editing 1.213 +file if you edit one file, and is the same as main file's if you 1.214 +edit splitting files. 1.215 + 1.216 + YaTeX asks you the range of dvi-printing by default. You can 1.217 +skip this by invoking it with universal-argument as follows: 1.218 + 1.219 +@example 1.220 +C-u [prefix] tl 1.221 +@end example 1.222 + 1.223 +@node %# notation, Completion, Typesetting, Top 1.224 +@comment node-name, next, previous, up 1.225 +@chapter %# notation 1.226 +@cindex %# notation 1.227 + 1.228 + You can control the typesetting process by describing @code{%#} 1.229 +notations in the source text. 1.230 + 1.231 +@menu 1.232 +* Changing typesetter:: 1.233 +* Static region for typesetting:: 1.234 +* Lpr format:: 1.235 +* Editing %# notation:: 1.236 +@end menu 1.237 + 1.238 +@node Changing typesetter, Static region for typesetting, %# notation, %# notation 1.239 +@comment node-name, next, previous, up 1.240 +@section To change the `latex' command or to split a source text. 1.241 +@cindex typesetter 1.242 + 1.243 + To change the typesetting command, write 1.244 + 1.245 +@example 1.246 + %#!latex-big 1.247 +@end example 1.248 + 1.249 +@noindent 1.250 +anywhere in the source text. And if you split the source text and 1.251 +edit subfile that should be included from main text. 1.252 + 1.253 +@example 1.254 + %#!latex main.tex 1.255 +@end example 1.256 + 1.257 +@noindent 1.258 +will be helpful to execute latex on main file from sub text buffer. Since 1.259 +this command line after @kbd{%#!} will be sent to shell literally, next 1.260 +description makes it convenient to use ghostview as dvi-previewer. 1.261 + 1.262 +@example 1.263 + %#!latex main ; dvi2ps main.dvi > main 1.264 +@end example 1.265 + 1.266 +@noindent 1.267 +Note that YaTeX assumes the component before the last period of 1.268 +the last word in this line as base name of the main La@TeX{} source. 1.269 + 1.270 + Here are the restrictions on splitting sources. 1.271 + 1.272 +@itemize 1.273 +@item All the file name should be different. 1.274 +@item You can put split texts in sub directory, but not in 1.275 + sub directory of sub directory. 1.276 +@item In the main text,specify the file with relative path name 1.277 + such as \include{chap1/sub}, when you include the file in 1.278 + a sub-directory. 1.279 +@item In a sub-text, write @code{%#!latex main.tex} even if @file{main.tex} 1.280 + is in the parent directory(not %#!latex ../main.tex). 1.281 +@end itemize 1.282 + 1.283 +@node Static region for typesetting, Lpr format, Changing typesetter, %# notation 1.284 +@comment node-name, next, previous, up 1.285 +@section Static region 1.286 +@cindex static region 1.287 +@cindex Fixed region 1.288 + 1.289 + Typeset-region by @kbd{[prefix] tr} passes the region between point and 1.290 +mark to typesetting command by default. But when you want to typeset 1.291 +static region, enclose the region by @code{%#BEGIN} and @code{%#END} as 1.292 +follows. 1.293 + 1.294 +@example 1.295 + %#BEGIN 1.296 + TheRegionYouWantToTypesetManyTimes 1.297 + %#END 1.298 +@end example 1.299 + 1.300 +This is the rule of deciding the region. 1.301 + 1.302 +@enumerate 1.303 +@item 1.304 +If there exists %#BEGIN before point, 1.305 + 1.306 +@enumerate 1.307 +@item 1.308 +If there exists %#END after %#BEGIN, 1.309 +@itemize 1.310 +@item From %#BEGIN to %#END. 1.311 +@end itemize 1.312 + 1.313 +@item 1.314 +If %#END does not exist after %#BEGIN, 1.315 +@itemize 1.316 +@item From %#BEGIN to the end of buffer. 1.317 +@end itemize 1.318 +@end enumerate 1.319 + 1.320 +@item 1.321 +If there does not exist %#BEGIN before point, 1.322 +@itemize 1.323 +@item Between point and mark(standard method of Emacs). 1.324 +@end itemize 1.325 +@end enumerate 1.326 + 1.327 + It is useful to write @code{%#BEGIN} in the previous line of \begin and 1.328 +@code{%#END} in the next line of \@code{end} when you try complex 1.329 +environment such as `tabular' many times. It is also useful to put only 1.330 +@code{%#BEGIN} alone at the middle of very long text. Do not forget to 1.331 +erase @code{%#BEGIN} @code{%#END} pair. 1.332 + 1.333 +@node Lpr format, Editing %# notation, Static region for typesetting, %# notation 1.334 +@comment node-name, next, previous, up 1.335 +@section Lpr format 1.336 +@cindex lpr format 1.337 + 1.338 + Lpr format is specified by three Lisp variables. Here are the 1.339 +default values of them. 1.340 + 1.341 +@table @code 1.342 +@item (1)dviprint-command-format 1.343 + @code{"dvi2ps %f %t %s | lpr"} 1.344 +@item (2)dviprint-from-format 1.345 + @code{"-f %b"} 1.346 +@item (3)dviprint-to-format 1.347 + @code{"-t %e"} 1.348 +@end table 1.349 + 1.350 + On YaTeX-lpr, @code{%s} in (1) is replaced by the file name of main 1.351 +text, @code{%f} by contents of (2), %t by contents of (3). At these 1.352 +replacements, @code{%b} in (2) is also replaced by the number of beginning 1.353 +page, @code{%e} in (3) is replaced by the number of ending page. But 1.354 +@code{%f} and @code{%t} are ignored when you omit the range of print-out 1.355 +by @kbd{C-u [prefix] tl}. 1.356 + 1.357 + If you want to change this lpr format temporarily, put a command 1.358 +such as follows somewhere in the text: 1.359 + 1.360 +@example 1.361 + %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2 1.362 +@end example 1.363 + 1.364 + And if you want YaTeX not to ask you the range of printing 1.365 +out, the next example may be helpful. 1.366 + 1.367 +@example 1.368 + %#LPR dvi2ps %s | lpr 1.369 +@end example 1.370 + 1.371 +@node Editing %# notation, , Lpr format, %# notation 1.372 +@comment node-name, next, previous, up 1.373 +@section Editing %# notation 1.374 + 1.375 + To edit @code{%#} notation described above, type 1.376 + 1.377 +@table @kbd 1.378 +@item [prefix] % 1.379 + @dots{} editing %# notation menu 1.380 +@end table 1.381 + 1.382 +@noindent 1.383 +and select one of the entry of the menu as follows. 1.384 + 1.385 +@example 1.386 + !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR 1.387 +@end example 1.388 + 1.389 +@noindent 1.390 +Type @kbd{!} to edit @code{%#!} entry, @code{b} to enclose the region with 1.391 +@code{%#BEGIN} and @code{%#END}, and @code{l} to edit @code{%#LPR} entry. 1.392 +When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are 1.393 +automatically erased. 1.394 + 1.395 +@node Completion, Commenting out, %# notation, Top 1.396 +@comment node-name, next, previous, up 1.397 +@chapter Completion 1.398 +@cindex completion 1.399 + 1.400 + YaTeX makes it easy to input the La@TeX{} commands. There are several 1.401 +kinds of completion type, begin-type, section-type, large-type, etc... 1.402 + 1.403 +@menu 1.404 +* Begin-type completion:: 1.405 +* Section-type completion:: 1.406 +* Large-type completion:: 1.407 +* Maketitle-type completion:: 1.408 +* Arbitrary completion:: 1.409 +* End completion:: 1.410 +* Accent completion:: 1.411 +* Image completion:: 1.412 +* Greek letters completion:: 1.413 +@end menu 1.414 + 1.415 +@node Begin-type completion, Section-type completion, Completion, Completion 1.416 +@comment node-name, next, previous, up 1.417 +@section Begin-type completion 1.418 +@cindex begin-type completion 1.419 +@cindex environment 1.420 +@cindex prefix b 1.421 + 1.422 + "Begin-type completion" completes commands of @code{\begin@{env@}} ... 1.423 +@code{\end@{env@}}. All of the begin-type completions begin with this key 1.424 +sequence. 1.425 + 1.426 +@table @kbd 1.427 +@item [prefix] b 1.428 + @dots{} start begin-type completion 1.429 +@end table 1.430 + 1.431 +@noindent 1.432 +An additional key stroke immediately completes a frequently used 1.433 +La@TeX{} @code{\begin@{@}}...@code{\@code{end}@{@}} environment. 1.434 + 1.435 +@table @kbd 1.436 +@item [prefix] b c 1.437 + @dots{} @code{\begin@{center@}...\end@{center@}} 1.438 +@item [prefix] b d 1.439 + @dots{} @code{\begin@{document@}...\end@{document@}} 1.440 +@item [prefix] b D 1.441 + @dots{} @code{\begin@{description@}...\end@{description@}} 1.442 +@item [prefix] b e 1.443 + @dots{} @code{\begin@{enumerate@}...\end@{enumerate@}} 1.444 +@item [prefix] b E 1.445 + @dots{} @code{\begin@{equation@}...\end@{equation@}} 1.446 +@item [prefix] b i 1.447 + @dots{} @code{\begin@{itemize@}...\end@{itemize@}} 1.448 +@item [prefix] b l 1.449 + @dots{} @code{\begin@{flushleft@}...\end@{flushleft@}} 1.450 +@item [prefix] b m 1.451 + @dots{} @code{\begin@{minipage@}...\end@{minipage@}} 1.452 +@item [prefix] b t 1.453 + @dots{} @code{\begin@{tabbing@}...\end@{tabbing@}} 1.454 +@item [prefix] b T 1.455 + @dots{} @code{\begin@{tabular@}...\end@{tabular@}} 1.456 +@item [prefix] b^T 1.457 + @dots{} @code{\begin@{table@}...\end@{table@}} 1.458 +@item [prefix] b p 1.459 + @dots{} @code{\begin@{picture@}...\end@{picture@}} 1.460 +@item [prefix] b q 1.461 + @dots{} @code{\begin@{quote@}...\end@{quote@}} 1.462 +@item [prefix] b Q 1.463 + @dots{} @code{\begin@{quotation@}...\end@{quotation@}} 1.464 +@item [prefix] b r 1.465 + @dots{} @code{\begin@{flushright@}...\end@{flushright@}} 1.466 +@item [prefix] b v 1.467 + @dots{} @code{\begin@{verbatim@}...\end@{verbatim@}} 1.468 +@item [prefix] b V 1.469 + @dots{} @code{\begin@{verse@}...\end@{verse@}} 1.470 +@end table 1.471 + 1.472 + Any other La@TeX{} environments are made by completing-read of the 1.473 +Emacs function. 1.474 + 1.475 +@table @kbd 1.476 +@item [prefix] b SPACE 1.477 + @dots{} begin-type completion 1.478 +@end table 1.479 + 1.480 +@noindent 1.481 +The next message will show up in the minibuffer 1.482 + 1.483 +@example 1.484 + Begin environment(default document): 1.485 +@end example 1.486 + 1.487 +@noindent 1.488 +by typing @kbd{[prefix] b}. Put the wishing environment with completion 1.489 +in the minibuffer, and @code{\begin@{env@}}...\@code{\end@{env@}} will be 1.490 +inserted in the La@TeX{} source text. If the environment you want to put 1.491 +does not exist in the YaTeX completion table, it will be registered in the 1.492 +user completion table. YaTeX automatically saves the user completion 1.493 +table in the user dictionary file at exiting of emacs. 1.494 + 1.495 + If you want to enclose some paragraphs which have already been 1.496 +written, invoke the begin-type completion with changing the case 1.497 +of @kbd{b} of key sequence upper(or invoke it with universal argument 1.498 +by @kbd{C-u} prefix). 1.499 +@cindex enclose region into environment 1.500 + 1.501 + The following example encloses a region with `description' 1.502 +environment. 1.503 + 1.504 +@table @kbd 1.505 +@item [prefix] B D 1.506 +@itemx (or ESC 1 [prefix] b D) 1.507 +@itemx (or C-u [prefix] b D) 1.508 + 1.509 + @dots{} begin-type completion for region 1.510 +@end table 1.511 + 1.512 + This enclosing holds good for the completing input by @kbd{[prefix] b 1.513 +SPC}. @kbd{[prefix] B SPC} enclose a region with the environment selected 1.514 +by completing-read. 1.515 + 1.516 +@node Section-type completion, Large-type completion, Begin-type completion, Completion 1.517 +@comment node-name, next, previous, up 1.518 +@section Section-type completion 1.519 +@cindex section-type completion 1.520 +@cindex prefix s 1.521 + 1.522 + "Section-type completion" completes section-type commands which take an 1.523 +argument or more such as @code{\section@{foo@}}. To invoke section-type 1.524 +completion, type 1.525 + 1.526 +@table @kbd 1.527 +@item [prefix] s 1.528 + @dots{} section-type completion 1.529 +@end table 1.530 + 1.531 +@noindent 1.532 +then the prompt 1.533 + 1.534 +@example 1.535 + (C-v for view) \???@{@} (default documentstyle): 1.536 +@end example 1.537 + 1.538 +@noindent 1.539 +will show up in the minibuffer. Section-type La@TeX{} commands are 1.540 +completed by space key, and the default value is selected when you 1.541 +type nothing in the minibuffer. 1.542 + 1.543 + Next, 1.544 + 1.545 +@example 1.546 + \section@{???@}: 1.547 +@end example 1.548 + 1.549 +@noindent 1.550 +prompts you the argument of section-type La@TeX{} command. For 1.551 +example, the following inputs 1.552 + 1.553 +@example 1.554 + \???@{@} (default documentstyle): section 1.555 + \section{???}: Hello world. 1.556 +@end example 1.557 + 1.558 +@noindent 1.559 +will insert the string 1.560 + 1.561 +@example 1.562 + \section@{Hello world.@} 1.563 +@end example 1.564 + 1.565 +in your La@TeX{} source. When you neglect argument such as 1.566 + 1.567 +@example 1.568 + (C-v for view) \???@{@} (default section): vspace* 1.569 + \vspace*@{???@}: 1.570 +@end example 1.571 + 1.572 +YaTeX puts 1.573 + 1.574 +@example 1.575 + \vspace*@{@} 1.576 +@end example 1.577 + 1.578 +@noindent 1.579 +and move the cursor in the braces. 1.580 + 1.581 + In La@TeX{} command, there are commands which take more than one 1.582 +arguments such as @code{\addtolength{\topmargin}{8mm}}. To complete these 1.583 +commands, invoke section-type completion with universal argument as, 1.584 +@cindex number of argument 1.585 + 1.586 +@example 1.587 +C-u 2 [prefix] s (or ESC 2 [prefix] s) 1.588 +@end example 1.589 + 1.590 +@noindent 1.591 +and make answers in minibuffer like this. 1.592 + 1.593 +@example 1.594 + (C-v for view) \???@{@} (default vspace*): addtolength 1.595 + \addtolength@{???@}: \topmargin 1.596 + Argument 2: 8mm 1.597 +@end example 1.598 + 1.599 +@code{\addtolength} and the first argument @code{\topmargin} can be typed 1.600 +easily by completing read. Since YaTeX also learns the number of 1.601 +arguments of section-type command and will ask that many arguments in 1.602 +future completion, you had better tell the number of arguments to YaTeX at 1.603 +the first completion of the new word. But you can change the number of 1.604 +arguments by calling the completion with different universal argument 1.605 +again. 1.606 + 1.607 + The special number of argument 0 makes YaTeX use read-string to 1.608 +read the first argument instead of completing-read. It is more 1.609 +comfortable to enter first argument without completion when you 1.610 +put section title which contains space character. Normally, such 1.611 +sectioning commands as chapter, section, paragraph..., have 1.612 +argument 0 in the completion table. 1.613 + 1.614 + Invoking section-type completion with @code{[Prefix] S} (Capital `S') 1.615 +includes the region as the first argument of section-type command. 1.616 + 1.617 + The section/large/maketitle type completion can work at the 1.618 +prompt for the argument of other section-type completion. 1.619 +Nested La@TeX{} commands are efficiently read with the recursive 1.620 +completion by typing YaTeX's completion key sequence in the 1.621 +minibuffer. 1.622 + 1.623 +@menu 1.624 +* view-sectioning:: 1.625 +@end menu 1.626 + 1.627 +@node view-sectioning, , Section-type completion, Section-type completion 1.628 +@comment node-name, next, previous, up 1.629 +@subsection view-sectioning 1.630 +@cindex view sectioning 1.631 +@cindex outline 1.632 + 1.633 + In the minibuffer at the prompt of section-type command completion, 1.634 +typing @kbd{C-v} shows a list of sectioning commands in source text(The 1.635 +line with @code{<<--} mark is the nearest sectioning command). Then, 1.636 +default sectioning command appears in the minibuffer. You can go up/down 1.637 +sectioning command by typing @kbd{C-p}/@kbd{C-n}, can scrolls up/down the 1.638 +listing buffer by @kbd{C-v}/@kbd{M-v}, and can hide sectioning commands 1.639 +under certain level by 0 through 6. Type @kbd{?} in the minibuffer of 1.640 +sectioning prompt for more information. 1.641 + 1.642 +@node Large-type completion, Maketitle-type completion, Section-type completion, Completion 1.643 +@comment node-name, next, previous, up 1.644 +@section Large-type completion 1.645 + 1.646 + "Large-type completion" inputs the font or size changing 1.647 +descriptions such as @code{@{\large @}}. When you type 1.648 + 1.649 +@table @kbd 1.650 +@item [prefix] l 1.651 + @dots{} large-type completion 1.652 +@end table 1.653 + 1.654 +@noindent 1.655 +the message in the minibuffer 1.656 + 1.657 +@example 1.658 + @{\??? @} (default large): 1.659 +@end example 1.660 + 1.661 +prompts prompts you large-type command with completing-read. There are 1.662 +TeX commands to change fonts or sizes, @code{it}, @code{huge} and so on, 1.663 +in the completion table. 1.664 + 1.665 + Region-based completion is also invoked by changing the letter after 1.666 +prefix key stroke as @kbd{[prefix] L}. It encloses the region by braces 1.667 +with large-type command. 1.668 + 1.669 +@node Maketitle-type completion, Arbitrary completion, Large-type completion, Completion 1.670 +@comment node-name, next, previous, up 1.671 +@section Maketitle-type completion 1.672 +@cindex maketitle-type completion 1.673 + 1.674 + We call it "maketitle-type completion" which completes commands such as 1.675 +@code{\maketitle}. Take notice that maketitle-type commands take no 1.676 +arguments. Then, typing 1.677 + 1.678 +@table @kbd 1.679 +@item [prefix] m 1.680 + @dots{} maketitle-type completion 1.681 +@end table 1.682 + 1.683 +@noindent 1.684 +begins maketitle-completion. Above mentioned method is true for 1.685 +maketitle-completion, and there are La@TeX{} commands with no 1.686 +arguments in completion table. 1.687 + 1.688 +@node Arbitrary completion, End completion, Maketitle-type completion, Completion 1.689 +@comment node-name, next, previous, up 1.690 +@section Arbitrary completion 1.691 +@cindex arbitrary completion 1.692 + 1.693 +@noindent 1.694 + You can complete certain La@TeX{} command anywhere without typical 1.695 +completing method as described, by typing 1.696 + 1.697 +@table @kbd 1.698 +@item [prefix] SPC 1.699 + @dots{} arbitrary completion 1.700 +@end table 1.701 + 1.702 +@noindent 1.703 +after the initial string of La@TeX{} command that is preceded by @code{\}. 1.704 + 1.705 +@node End completion, Accent completion, Arbitrary completion, Completion 1.706 +@comment node-name, next, previous, up 1.707 +@section End completion 1.708 +@cindex end completion 1.709 + 1.710 +@noindent 1.711 + YaTeX automatically detects the opened environment and close it with 1.712 +\@code{\end@{environment@}}. Though proficient YaTeX users never fail to 1.713 +make environment with begin-type completion, some may begin an environment 1.714 +manually. In that case, type 1.715 + 1.716 +@table @kbd 1.717 +@item [prefix] e 1.718 + @dots{} @code{end} completion 1.719 +@end table 1.720 + 1.721 +@noindent 1.722 +at the end of the opened environment. 1.723 + 1.724 +@node Accent completion, Image completion, End completion, Completion 1.725 +@comment node-name, next, previous, up 1.726 +@section Accent completion 1.727 +@cindex accent completion 1.728 + 1.729 + When you want to write the European accent marks(like @code{\`@{o@}}), 1.730 + 1.731 +@table @kbd 1.732 +@item [prefix] a 1.733 + @dots{} accent completion 1.734 +@end table 1.735 + 1.736 +@noindent 1.737 +shows the menu 1.738 + 1.739 +@example 1.740 + 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b 1.741 +@end example 1.742 + 1.743 +@noindent 1.744 +in the minibuffer. Chose one character or corresponding numeric, 1.745 +and you will see 1.746 + 1.747 +@example 1.748 + \`{} 1.749 +@end example 1.750 + 1.751 +@noindent 1.752 +in the editing buffer with the cursor positioned in braces. Type 1.753 +one more character `o' for example, then 1.754 + 1.755 +@example 1.756 + \`{o} 1.757 +@end example 1.758 + 1.759 +@noindent 1.760 +will be completed, and the cursor gets out from braces. 1.761 + 1.762 +@node Image completion, Greek letters completion, Accent completion, Completion 1.763 +@comment node-name, next, previous, up 1.764 +@section Image completion of mathematical sign 1.765 +@cindex image completion 1.766 +@cindex math-mode 1.767 +@cindex sigma 1.768 +@cindex leftarrow 1.769 +@cindex ; 1.770 + 1.771 + Arrow marks, sigma mark and those signs mainly used in the 1.772 +TeX's math environment are completed by key sequences which 1.773 +imitate the corresponding symbols graphically. This completion 1.774 +only works in the math environment. YaTeX automatically detects 1.775 +whether the cursor located in math environment or not, and 1.776 +change the behavior of key strokes @kbd{;} and @kbd{/}. 1.777 + 1.778 + By the way, we often express the leftarrow mark by `<-' for example. 1.779 +Considering such image, you can write @code{\leftarrow} by typing @kbd{<-} 1.780 +after @kbd{;} (semicolon) as a prefix. In the same way, 1.781 +@code{\longleftarrow} (@code{<--}) is completed by typing @kbd{;<--}, 1.782 +infinity mark which is imitated by @code{oo} is completed by typing 1.783 +@kbd{;oo}. 1.784 + 1.785 + Here are the sample operations in YaTeX math-mode. 1.786 + 1.787 +@example 1.788 +INPUT Completed La@TeX{} commands 1.789 +; < - @code{\leftarrow} 1.790 +; < - - @code{\longleftarrow} 1.791 +; < - - > @code{\longleftrightarrow} 1.792 +; o @code{\circ} 1.793 +; o o @code{\infty} 1.794 +@end example 1.795 + 1.796 + In any case, you can quit from image completion and can move 1.797 +to the next editing operation if the La@TeX{} command you want is 1.798 +shown in the buffer. 1.799 + 1.800 + @code{;} itself in math-environment is inserted by @kbd{;;}. Typing 1.801 +@kbd{TAB} in the midst of image completion shows all of the La@TeX{} 1.802 +commands that start with the same name as string you previously typed in. 1.803 +In this menu buffer, press @kbd{RET} after moving the cursor (by @kbd{n}, 1.804 +@kbd{p}, @kbd{b}, @kbd{f}) to insert the La@TeX{} command. 1.805 + 1.806 + To know all of the completion table, type @kbd{TAB} just after @kbd{;}. 1.807 +And here is the sample menu by @kbd{TAB} after @kbd{;<}. 1.808 + 1.809 +@example 1.810 +KEY LaTeX sequence sign 1.811 +< \leq < 1.812 + ~ 1.813 +<< \ll << 1.814 +<- \leftarrow <- 1.815 +<= \Leftarrow <= 1.816 +@end example 1.817 + 1.818 + You can define your favorite key-vs-sequence completion table in the 1.819 +Emacs-Lisp variable @code{YaTeX-math-sign-alist-private}. See also 1.820 +@file{yatexmth.el} for the information of the structure of this variable. 1.821 + 1.822 +@node Greek letters completion, , Image completion, Completion 1.823 +@comment node-name, next, previous, up 1.824 +@section Greek letters completion 1.825 +@cindex Greek letters completion 1.826 +@cindex / 1.827 + 1.828 + Math-mode of YaTeX provides another image completion, Greek letters 1.829 +completion in the same method. After prefix @kbd{/}, typing @kbd{a} makes 1.830 +@code{\alpha}, @kbd{b} makes @code{\beta} and @kbd{g} makes @code{\gamma} 1.831 +and so on. First, type @kbd{/TAB} to know all the correspondence of 1.832 +alphabets v.s. Greek letters. 1.833 + 1.834 + If you will find @kbd{;} or @kbd{/} doesn't work in correct position of 1.835 +math environment, it may be a bug of YaTeX. Please send me a bug report 1.836 +with the configuration of your text, and avoid it temporarily by typing 1.837 +@kbd{;} or @kbd{/} after universal-argument(@kbd{C-u}) which forces 1.838 +@kbd{;} and @kbd{/} to work as math-prefix. 1.839 + 1.840 +@node Commenting out, Cursor jump, Completion, Top 1.841 +@comment node-name, next, previous, up 1.842 +@chapter Commenting out 1.843 +@cindex commenting out 1.844 +@cindex prefix > 1.845 +@cindex prefix < 1.846 +@cindex prefix , 1.847 +@cindex prefix . 1.848 + 1.849 + You may want to comment out some region. 1.850 + 1.851 +@table @kbd 1.852 +@item [prefix] > 1.853 + @dots{} comment out region by % 1.854 +@item [prefix] < 1.855 + @dots{} uncomment region 1.856 +@end table 1.857 + 1.858 +@noindent 1.859 +cause an operation to the region between point and mark. 1.860 + 1.861 +@table @kbd 1.862 +@item [prefix] . 1.863 + @dots{} comment out current paragraph 1.864 +@item [prefix] , 1.865 + @dots{} uncomment current paragraph 1.866 +@end table 1.867 + 1.868 +@noindent 1.869 +comments or uncomments the paragraph where the cursor belongs. 1.870 +This `paragraph' means the region marked by the function 1.871 +mark-paragraph, bound to @kbd{ESC h} by default. It is NOT 1.872 +predictable what will happen when you continuously comment out 1.873 +some paragraph many times. 1.874 + 1.875 + You can also comment out an environment between @code{\begin} and 1.876 +@code{\end}, or a @code{\begin}-\@code{\end} pair themselves, by making the 1.877 +following key strokes on the line where @code{\begin@{@}} or 1.878 +@code{\end@{@}} exists. 1.879 + 1.880 +@table @kbd 1.881 +@item [prefix] > 1.882 + @dots{} comment out from \begin to \@code{end} 1.883 +@item [prefix] < 1.884 + @dots{} uncomment from \begin to \@code{end} 1.885 +@end table 1.886 + 1.887 +@noindent 1.888 +comment whole the contents of environment. Moreover, 1.889 + 1.890 +@table @kbd 1.891 +@item [prefix] . 1.892 + @dots{} comment out \begin and \@code{end} 1.893 +@item [prefix] , 1.894 + @dots{} uncomment \begin and \@code{end} 1.895 +@end table 1.896 + 1.897 +@noindent 1.898 +(un)comments out only environment declaration: @code{\begin@{@}} and 1.899 +@code{\end@{@}}. NOTE that even if you intend to comment out some region, 1.900 +invoking @kbd{[prefix] >} on the @code{\begin},@code{\end} line decides to 1.901 +work in `commenting out from @code{\begin} to @code{\end}' mode. 1.902 + 1.903 + 1.904 +@node Cursor jump, Changing and Deleting, Commenting out, Top 1.905 +@comment node-name, next, previous, up 1.906 +@chapter Cursor jump 1.907 +@cindex cursor jump 1.908 +@cindex prefix g 1.909 + 1.910 + On a @code{\begin},@code{\end} line, the key stroke 1.911 + 1.912 +@table @kbd 1.913 +@item [prefix] g 1.914 + @dots{} go to corresponding object 1.915 +@end table 1.916 + 1.917 +@noindent 1.918 +moves the cursor to the corresponding @code{\end},@code{\begin} line, if 1.919 +its partner really exists. It is also applicable to A @code{%#BEGIN} and 1.920 +@code{%#END} pair. 1.921 + 1.922 + If you type @code{[prefix] g} on the line of @code{\include@{chap1@}}, 1.923 +maybe in main text, YaTeX switches buffer to @file{chap1.tex}. On the 1.924 +contrary, the key strokes 1.925 + 1.926 +@table @kbd 1.927 +@item [prefix] ^ 1.928 + @dots{} visit main file 1.929 +@item [prefix] 4^ 1.930 + @dots{} visit main file in other buffer 1.931 +@end table 1.932 +@cindex prefix ^ 1.933 +@cindex prefix 4 ^ 1.934 + 1.935 +in a sub text switch the buffer to the main text specified by 1.936 +@code{%#!} notation. 1.937 + 1.938 + And these are the functions which work on the current La@TeX{} 1.939 +environment: 1.940 + 1.941 +@table @kbd 1.942 +@item M-C-a 1.943 + @dots{} beginning of environment 1.944 +@item M-C-e 1.945 + @dots{} @code{end} of environment 1.946 +@item M-C-@@ 1.947 + @dots{} mark environment 1.948 +@end table 1.949 +@cindex M-C-a 1.950 +@cindex M-C-e 1.951 +@cindex M-C-@@ 1.952 + 1.953 +@node Changing and Deleting, Filling an item, Cursor jump, Top 1.954 +@comment node-name, next, previous, up 1.955 +@chapter Changing and Deleting 1.956 + 1.957 + These functions are for change or deletion of La@TeX{} commands 1.958 +already entered. 1.959 + 1.960 +@table @kbd 1.961 +@item [prefix] c 1.962 + @dots{} change La@TeX{} command 1.963 +@item [prefix] k 1.964 + @dots{} kill La@TeX{} command 1.965 +@end table 1.966 +@cindex prefix c 1.967 +@cindex prefix k 1.968 + 1.969 +@kbd{[prefix] c} can change the name of the corresponding environment 1.970 +declaration. @kbd{[prefix] k} works as follows: 1.971 + 1.972 +@example 1.973 +[Invoking position] [action] 1.974 +\begin,\end line kill \begin,\end pairs 1.975 +%BEGIN, %END line kill %BEGIN,%END pairs 1.976 +on a Section-type command kill section-type command 1.977 +on a parenthesis kill parentheses 1.978 +@end example 1.979 + 1.980 +While all operations above are to kill `containers' which surround some 1.981 +text, universal argument (@kbd{C-u}) for these commands kills not only 1.982 +`containers' but also `contents' of them. See below as a sample. 1.983 + 1.984 +@example 1.985 +Original text: [prefix] k C-u [prefix] k 1.986 +Main \footnote@{note@} here. Main note here. Main here. 1.987 + ~(cursor) 1.988 +@end example 1.989 + 1.990 +@node Filling an item, Local dictionaries, Changing and Deleting, Top 1.991 +@comment node-name, next, previous, up 1.992 +@chapter Filling an item 1.993 +@cindex filling an item 1.994 +@cindex prefix i 1.995 + 1.996 + To fill a term (sentence) of @code{\item}, type 1.997 + 1.998 +@table @kbd 1.999 +@item [prefix] i 1.1000 + @dots{} fill item 1.1001 +@end table 1.1002 + 1.1003 +@noindent 1.1004 +on that item. 1.1005 + 1.1006 + YaTeX uses the value of the variable @code{YaTeX-item-regexp} as the 1.1007 +regular expression to search item header in itemize environment. 1.1008 +If you make a newcommand to itemize terms(eg. @code{\underlineitem}), put 1.1009 + 1.1010 +@lisp 1.1011 + (setq YaTeX-item-regexp 1.1012 + "\\(\\\\item\\)\\|\\(\\\\underlineitem\\)") 1.1013 +@end lisp 1.1014 +@cindex YaTeX-item-regexp 1.1015 + 1.1016 +in your @file{~/.emacs}. If you are not familiar with regular expression 1.1017 +for Emacs-Lisp, name a newcommand for `itemize' beginning with 1.1018 +@code{\item} such as @code{\itembf}, not @code{\bfitem}. 1.1019 + 1.1020 +@node Local dictionaries, Updation of @code{\includeonly}, Filling an item, Top 1.1021 +@comment node-name, next, previous, up 1.1022 +@chapter Local dictionaries: For nervous users 1.1023 +@cindex local dictionaries 1.1024 +@cindex nervous users 1.1025 + 1.1026 + If you have had the experience that you couldn't concentrate on editing 1.1027 +because you typed miss-spelled word on completion and the registration of 1.1028 +the wrong word to @file{.yatexrc} weighed on your mind. Or if you have 1.1029 +thought that you want YaTeX not to register a local newcommand which goes 1.1030 +only in current text, into the standard user completion dictionary; 1.1031 +@file{.yatexrc}. Write this in your @file{~/.emacs}. 1.1032 + 1.1033 +@lisp 1.1034 + (setq YaTeX-nervous t) 1.1035 +@end lisp 1.1036 + 1.1037 + In addition to `standard table' built in yatex.el and `user table' which 1.1038 +is always saved into @file{~/.yatexrc}, the statement above allows you to 1.1039 +use `temporary table' for completion. When you enter a word which is 1.1040 +never seen in these tables, you can select the table in which you want to 1.1041 +save the word; `user table'(UserTable), `temporary table'(TempTable) or 1.1042 +discard it(None). 1.1043 + 1.1044 + But you may want to complete newcommand semi-permanently that is defined 1.1045 +in rather large text as graduation thesis, even if the newcommand is a 1.1046 +local declaration. After setting @code{YaTeX-nervous} to @code{t}, make 1.1047 +an empty file named @file{.yatexrc} (the same name as your user 1.1048 +dictionary). YaTeX will use it as the local dictionary to keep the 1.1049 +contents of temporary completion table. This local dictionary will be 1.1050 +loaded only when you edit the file which exists in the same directory. 1.1051 + 1.1052 +@node Updation of @code{\includeonly}, What column?, Local dictionaries, Top 1.1053 +@comment node-name, next, previous, up 1.1054 +@chapter Updation of @code{\includeonly} 1.1055 +@cindex includeonly 1.1056 + 1.1057 + When you edit splitting source texts, the notation 1.1058 + 1.1059 +@example 1.1060 + \includeonly@{CurrentEditingFileName@} 1.1061 +@end example 1.1062 + 1.1063 +@noindent 1.1064 +in the main file reduces the time of typesetting. If you want 1.1065 +to hack other file a little however, you have to rewrite it to 1.1066 + 1.1067 +@example 1.1068 + \includeonly@{OtherFileNameYouWantToFix@} 1.1069 +@end example 1.1070 + 1.1071 +@noindent 1.1072 +in the main file. YaTeX automatically detects that the current 1.1073 +edited text is not in includeonly list and prompts you 1.1074 + 1.1075 +@example 1.1076 + A)dd R)eplace %)comment? 1.1077 +@end example 1.1078 + 1.1079 +in the minibuffer. Type @kbd{a} if you want to add the current file name 1.1080 +to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list 1.1081 +by the current file, and type @kbd{%} to comment out the 1.1082 +@code{\includeonly} line. 1.1083 + 1.1084 +@node What column?, Online help, Updation of @code{\includeonly}, Top 1.1085 +@comment node-name, next, previous, up 1.1086 +@chapter What column? 1.1087 +@cindex what column 1.1088 +@cindex complex tabular 1.1089 +@cindex prefix & 1.1090 + 1.1091 + We are often get tired of finding the corresponding column in 1.1092 +large tabulars. For example, 1.1093 + 1.1094 +@example 1.1095 + \begin@{tabular@}@{|c|c|c|c|c|c|c|c|@}\hline 1.1096 + Name&Position&Post No.&Addr.&Phone No.&FAX No.& 1.1097 + Home Addr.&Home Phone\\ \hline 1.1098 + Thunder Bird & 6 & 223 & LA & xxx-yyy & 1.1099 + zzz-www & Japan & 9876-54321 \\ 1.1100 + & 2 & \multicolumn@{2@}@{c|@}@{Unknown@} 1.1101 + &&&(???) 1.1102 + \\ \hline 1.1103 + \end@{tabular@} 1.1104 +@end example 1.1105 + 1.1106 +Suppose you have the cursor located at @code{(???)} mark, can you tell 1.1107 +which column it is belonging at once? Maybe no. In such case, 1.1108 +type 1.1109 + 1.1110 +@table @kbd 1.1111 +@item [prefix] & 1.1112 + @dots{} What column 1.1113 +@end table 1.1114 + 1.1115 +@noindent 1.1116 +in that position. YaTeX tells you the column header of the 1.1117 +current field. Since YaTeX assumes the first line of tabular 1.1118 +environment as a row of column headers, you can create a row of 1.1119 +virtual column headers by putting them in the first line and 1.1120 +commenting that line with @code{%}. 1.1121 + 1.1122 +@node Online help, Cooperation with other packages, What column?, Top 1.1123 +@comment node-name, next, previous, up 1.1124 +@chapter Online help 1.1125 +@cindex online help 1.1126 +@cindex prefix ? 1.1127 +@cindex prefix / 1.1128 +@cindex apropos 1.1129 +@cindex keyword search 1.1130 + 1.1131 + YaTeX provides you the online help with popular La@TeX{} commands. 1.1132 + 1.1133 + Here are the key strokes for the online help. 1.1134 + 1.1135 +@table @kbd 1.1136 +@item [prefix] ? 1.1137 + @dots{} Online help 1.1138 +@item [prefix] / 1.1139 + @dots{} Online apropos 1.1140 +@end table 1.1141 + 1.1142 +@section Online help 1.1143 + 1.1144 + `Online help' shows the documentation for the popular La@TeX{} 1.1145 +commands(defaults to the commands on the cursor) in the next buffer. 1.1146 +There are two help file, `global help' and `private help'. The former 1.1147 +file contains the descriptions on the standard La@TeX{} command and is 1.1148 +specified its name by variable @code{YaTeX-help-file}. Usually, the 1.1149 +global help file should be located in public space (@code{$EMACSEXECPATH} 1.1150 +by default) and should be world writable so that anyone can update it to 1.1151 +enrich its contents. The latter file contains descriptions on 1.1152 +non-standard or personal command definitions and is specified by 1.1153 +@code{YaTeX-help-file-private}. This file should be put into private 1.1154 +directory. 1.1155 + 1.1156 +@section Online apropos 1.1157 + 1.1158 + `Online apropos' is an equivalent of GNU Emacs's apropos. It 1.1159 +shows all the documentations that contains the keyword entered by 1.1160 +the user. 1.1161 + 1.1162 +@section When no descriptions are found... 1.1163 + 1.1164 + If there is no description on a command in help files, YaTeX 1.1165 +requires you to write a description on that command. If you are 1.1166 +willing to do, determine which help file to add and write the 1.1167 +description on it referring your manual of (La)TeX. Please send 1.1168 +me your additional descriptions if you describe the help on some 1.1169 +standard commands. I might want to include it in the next 1.1170 +distribution. 1.1171 + 1.1172 +@node Cooperation with other packages, Customizations, Online help, Top 1.1173 +@comment node-name, next, previous, up 1.1174 +@chapter Cooperation with other packages 1.1175 + 1.1176 + YaTeX works better with other brilliant packages. 1.1177 + 1.1178 +@section gmhist 1.1179 +@cindex gmhist 1.1180 +@cindex command history 1.1181 +@cindex minibuffer history 1.1182 + 1.1183 + When you are loading @file{gmhist.el} and @file{gmhist-mh.el}, you can 1.1184 +use independent command history list at the prompt of preview command 1.1185 +(@kbd{[prefix] tp}) and print command (@kbd{[prefix] tl}). On each 1.1186 +prompt, you can enter the previous command line string repeatedly by 1.1187 +typing @kbd{M-p}. 1.1188 + 1.1189 +@section min-out 1.1190 +@cindex min-out 1.1191 + 1.1192 + @file{min-out}, the outline minor mode, can be used in yatex-mode 1.1193 +buffers. If you want to use it with YaTeX, please refer the 1.1194 +file @file{yatexm-o.el} as an example. 1.1195 + 1.1196 +@node Customizations, Etcetera, Cooperation with other packages, Top 1.1197 +@comment node-name, next, previous, up 1.1198 +@chapter Customizations 1.1199 +@cindex customizations 1.1200 + 1.1201 + You can customize YaTeX by setting Emacs-Lisp variables and by making 1.1202 +add-in functions. 1.1203 + 1.1204 +@menu 1.1205 +* Lisp variables:: 1.1206 +* Add-in functions:: 1.1207 +@end menu 1.1208 + 1.1209 +@node Lisp variables, Add-in functions, Customizations, Customizations 1.1210 +@comment node-name, next, previous, up 1.1211 +@section Lisp variables 1.1212 +@cindex customizable variables 1.1213 + 1.1214 + You can change the key assignments or make completion more 1.1215 +comfortable by setting the values of various variables which 1.1216 +control the movement of yatex-mode. 1.1217 + 1.1218 + For example, if you want to change the prefix key stroke from @kbd{C-c} 1.1219 +to any other sequence, set YaTeX-prefix to whatever you want to use. If 1.1220 +you don't want to use the key sequence @kbd{C-c letter} which is assumed 1.1221 +to be the user reserved sequence in Emacs world, set 1.1222 +@code{YaTeX-inhibit-prefix-letter} to @code{t}, and all of the default key 1.1223 +bind of @kbd{C-c letter} will turn to the corresponding @kbd{C-c C-letter} 1.1224 +(but the region based completions that is invoked with @kbd{C-c 1.1225 +Capital-letter} remain valid, if you want to disable those bindings, set 1.1226 +that variable to 1 instead of @code{t}). 1.1227 + 1.1228 +@menu 1.1229 +* All customizable variables:: 1.1230 +* Sample definitions:: 1.1231 +* Hook variables:: 1.1232 +* Hook file:: 1.1233 +@end menu 1.1234 + 1.1235 +@node All customizable variables, Sample definitions, Lisp variables, Lisp variables 1.1236 +@comment node-name, next, previous, up 1.1237 +@subsection All customizable variables 1.1238 +@cindex all customizable variables 1.1239 + 1.1240 + Here are the customizable variables of yatex-mode. Each value setq-ed 1.1241 +in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is 1.1242 +neglected. Parenthesized contents stands for the default value. 1.1243 + 1.1244 +@table @samp 1.1245 +@item YaTeX-prefix 1.1246 + 1.1247 + Prefix key stroke (@kbd{C-c}) 1.1248 + 1.1249 +@item YaTeX-inhibit-prefix-letter 1.1250 + 1.1251 + Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter} 1.1252 + (@code{nil}) 1.1253 + 1.1254 +@item YaTeX-fill-prefix 1.1255 + 1.1256 + Fill-prefix used in yatex-mode (@code{nil}) 1.1257 + 1.1258 +@item YaTeX-open-lines 1.1259 + 1.1260 + Number of blank lines between cursor and @code{\begin@{@}}, 1.1261 + @code{\@code{end}@{@}} (0) 1.1262 + 1.1263 +@item YaTeX-user-completion-table 1.1264 + 1.1265 + Name of user dictionary where learned completion table will be stored. 1.1266 + (@code{"~/.yatexrc"}) 1.1267 + 1.1268 +@item YaTeX-item-regexp 1.1269 + 1.1270 + Regular expression of item command(@code{"\\\\item"}) 1.1271 + 1.1272 +@item tex-command 1.1273 + 1.1274 + La@TeX{} typesetter command (@code{"latex"}) 1.1275 + 1.1276 +@item dvi2-command 1.1277 + 1.1278 + Preview command 1.1279 + (@code{"xdvi -geo +0+0 -s 4 -display (getenv"DISPLAY")"}) 1.1280 + 1.1281 +@item dviprint-command-format 1.1282 + 1.1283 + Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"}) 1.1284 + 1.1285 +@item dviprint-from-format 1.1286 + 1.1287 + Start page format of above %f. %b will turn to start page 1.1288 + (@code{"-f %b"}) 1.1289 + 1.1290 +@item dviprint-to-format 1.1291 + 1.1292 + End page format of above %t. %e will turn to @code{end} page 1.1293 + (@code{"-t %e"}) 1.1294 + 1.1295 +@item section-name 1.1296 + 1.1297 + Initial default value at the first section-type completion 1.1298 + (@code{"documentstyle"}) 1.1299 + 1.1300 +@item env-name 1.1301 + 1.1302 + Initial default value at the first begin-type completion 1.1303 + (@code{"document"}) 1.1304 + 1.1305 +@item fontsize-name 1.1306 + 1.1307 + Ditto of large-type (@code{"large"}) 1.1308 + 1.1309 +@item single-command 1.1310 + 1.1311 + Ditto of maketitle-type (@code{"maketitle"}) 1.1312 + 1.1313 +@item YaTeX-need-nonstop 1.1314 + 1.1315 + Put @code{\nonstopmode@{@}} or not (@code{nil}) 1.1316 + 1.1317 +@item latex-warning-regexp 1.1318 + 1.1319 + Regular expression of warning message latex command puts out 1.1320 + (@code{"line.* [0-9]*"}) 1.1321 + 1.1322 +@item latex-error-regexp 1.1323 + 1.1324 + Regular expression of error message (@code{"l\\.[1-9][0-9]*"}) 1.1325 + 1.1326 +@item latex-dos-emergency-message 1.1327 + 1.1328 + Message latex command running on DOS puts at abort 1.1329 + (@code{"Emergency stop"}) 1.1330 + 1.1331 +@item YaTeX-item-regexp 1.1332 + 1.1333 + Regexp of La@TeX{} itemization command (@code{"\\\\(sub\\)*item"}) 1.1334 + 1.1335 +@item YaTeX-nervous 1.1336 + 1.1337 + T for using local dictionary (@code{t}) 1.1338 + 1.1339 +@item YaTeX-sectioning-regexp 1.1340 + 1.1341 + Regexp of La@TeX{} sectioning command 1.1342 + 1.1343 + (@code{"part\\|chapter\\|\\(sub\\)*\\(section\\|paragraph\\)"}) 1.1344 + 1.1345 +@item YaTeX-fill-inhibit-environments 1.1346 + 1.1347 + Inhibit fill in these environments (@code{'("verbatim" "tabular")}) 1.1348 + 1.1349 +@item YaTeX-uncomment-once 1.1350 + 1.1351 + @code{T} for deleting all preceding @code{%} (@code{nil}) 1.1352 + 1.1353 +@item YaTeX-close-paren-always 1.1354 + 1.1355 + @code{T} for always close all parenthesis automatically, 1.1356 + @code{nil} for only eol(@code{t}) 1.1357 + 1.1358 +@item YaTeX-auto-math-mode 1.1359 + 1.1360 + Switch math-mode automatically(@code{t}) 1.1361 + 1.1362 +@item YaTeX-default-pop-window-height 1.1363 + 1.1364 + Initial height of typesetting buffer when one-window. 1.1365 + Number for the lines of the buffer, numerical string for 1.1366 + the percentage of the screen-height. 1.1367 + @code{nil} for half height(10) 1.1368 + 1.1369 +@item YaTeX-help-file 1.1370 + 1.1371 + Global online help file name (@file{$EMACS/etc/YATEXHLP.jp}) 1.1372 + 1.1373 +@item YaTeX-help-file-private 1.1374 + 1.1375 + Private online help file name (@file{"~/YATEXHLP.jp"}) 1.1376 + 1.1377 +@item YaTeX-no-begend-shortcut 1.1378 + 1.1379 + Disable [prefix] b ?? shortcut (@code{nil)} 1.1380 +@end table 1.1381 + 1.1382 +@node Sample definitions, Hook variables, All customizable variables, Lisp variables 1.1383 +@comment node-name, next, previous, up 1.1384 +@subsection Sample definitions 1.1385 +@cindex prefix key stroke 1.1386 +@cindex fill-prefix 1.1387 + 1.1388 + For instance, to change the prefix key stroke to @kbd{ESC}, and name of 1.1389 +the user dictionary @file{~/src/emacs/yatexrc}, and set @code{fill-prefix} 1.1390 +to single TAB character, add the following @code{setq} to @file{~/.emacs}. 1.1391 + 1.1392 +@lisp 1.1393 + (setq YaTeX-prefix "\e" 1.1394 + YaTeX-user-completion-table "~/src/emacs/yatexrc" 1.1395 + YaTeX-fill-prefix " ") 1.1396 +@end lisp 1.1397 + 1.1398 +@node Hook variables, Hook file, Sample definitions, Lisp variables 1.1399 +@comment node-name, next, previous, up 1.1400 +@subsection Hook variables 1.1401 +@cindex hook variables 1.1402 + 1.1403 + More customizations will be done by the hook-function defined in 1.1404 +hook-variable @code{yatex-mode-hook}. This is useful to define a shortcut 1.1405 +key sequence to enter some environments other than @code{document} and 1.1406 +@code{enumerate} etc. The following statement defines @code{[prefix] ba} 1.1407 +to enter @code{\begin@{abstract@}} ... @code{=end@{abstract@}} 1.1408 +immediately. 1.1409 + 1.1410 +@lisp 1.1411 + (setq yatex-mode-hook 1.1412 + '(lambda() (YaTeX-define-begend-key "ba" "abstract"))) 1.1413 +@end lisp 1.1414 + 1.1415 + You should use functions @code{YaTeX-define-key}, or 1.1416 +@code{YaTeX-define-begend-key} to define all the key sequences of 1.1417 +yatex-mode. 1.1418 + 1.1419 +@node Hook file, , Hook variables, Lisp variables 1.1420 +@comment node-name, next, previous, up 1.1421 +@subsection Hook file 1.1422 +@cindex hook file 1.1423 + 1.1424 + You can stuff all of YaTeX relating expressions into a file named 1.1425 +@file{yatexhks.el} if you have a lot of codes. YaTeX automatically load 1.1426 +this file at the initialization of itself. Using @file{yatexhks.el} 1.1427 +makes @code{yatex-mode-load-hook} unnecessary. 1.1428 + 1.1429 +@node Add-in functions, , Lisp variables, Customizations 1.1430 +@comment node-name, next, previous, up 1.1431 +@section Add-in functions 1.1432 +@cindex add-in functions 1.1433 + 1.1434 + You can easily define a function to input detailed arguments 1.1435 +with completion according to La@TeX{} environments or commands. To 1.1436 +know the way to define these functions, see also @file{yatexadd.doc} in 1.1437 +this package please. 1.1438 + 1.1439 + 1.1440 +@node Etcetera, Copying, Customizations, Top 1.1441 +@comment node-name, next, previous, up 1.1442 +@chapter Etcetera 1.1443 + 1.1444 + The standard completion tables provided in @file{yatex.el} contain a 1.1445 +few La@TeX{} commands I frequently use. This is to lessen the key 1.1446 +strokes to complete entire word, because too many candidates 1.1447 +rarely used often cause too many hits. Therefore always try to 1.1448 +use completion in order to enrich your dictionary, and you will 1.1449 +also find `Wild Bird' growing suitable for your La@TeX{} style. 1.1450 + 1.1451 + 1.1452 +@node Copying, , Etcetera, Top 1.1453 +@comment node-name, next, previous, up 1.1454 +@chapter Copying 1.1455 + 1.1456 + This program is distributed as a free software. You can 1.1457 +redistribute this software freely but with NO warranty to anything 1.1458 +as a result of using this software. However, any reports and 1.1459 +suggestions are welcome as long as I feel interests in this 1.1460 +software. My possible e-mail address is `yuuji@@ae.keio.ac.jp'. 1.1461 +(up to Mar.1993 at least) 1.1462 + 1.1463 + The specification of this software will be surely modified 1.1464 +(depending on my feelings) without notice :-p. 1.1465 + 1.1466 + 1.1467 +@flushright 1.1468 + HIROSE Yuuji 1.1469 +@end flushright 1.1470 +@bye 1.1471 + 1.1472 +Local variables: 1.1473 +mode: texinfo 1.1474 +fill-prefix: nil 1.1475 +fill-column: 74 1.1476 +End: