yatex
changeset 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 | 6b0fab5e8eea |
children | 5102afa98191 |
files | docs/yatexe.tex docs/yatexj.tex |
diffstat | 2 files changed, 3052 insertions(+), 0 deletions(-) [+] |
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:
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/docs/yatexj.tex Thu Jul 07 16:37:05 1994 +0000 2.3 @@ -0,0 +1,1579 @@ 2.4 +\input texinfo @c -*- texinfo -*- 2.5 +%#!bigjtex 2.6 +@setfilename yatexj 2.7 +@settitle Yet Another tex-mode for Emacs 2.8 + 2.9 +@iftex 2.10 +@syncodeindex fn cp 2.11 +@syncodeindex vr cp 2.12 +@end iftex 2.13 + 2.14 +@titlepage 2.15 +@sp 10 2.16 +@center 2.17 +@subtitle Yet Another tex-mode for emacs 2.18 +@title 『野鳥』 2.19 +@subtitle // YaTeX // 2.20 +@author @copyright{} 1991-1994 by HIROSE, Yuuji [yuuji@@ae.keio.ac.jp] 2.21 +@end titlepage 2.22 + 2.23 +@node Top, Intro - はじめに, (dir), (dir) 2.24 +@comment node-name, next, previous, up 2.25 + 2.26 +@menu 2.27 +* Intro - はじめに:: 2.28 +* Main features - 主な機能:: 2.29 +* Installation - インストール:: 2.30 +* Invocation - 外部コマンドの起動:: 2.31 +* %#記法:: 2.32 +* Completion - 補完入力:: 2.33 +* Commenting out - コメントアウト:: 2.34 +* Cursor jump - カーソルジャンプ:: 2.35 +* Modifying/Deleting - 変更/削除:: 2.36 +* Filling item - itemの桁揃え:: 2.37 +* Local dictionary - ローカル辞書(神経質な人へ):: 2.38 +* Includeonly - 勝手にincludeonly:: 2.39 +* Where am I? - 今はどこ?:: 2.40 +* Online help - オンラインヘルプ:: 2.41 +* Cooperation with other packages - 他パッケージとの連携:: 2.42 +* Customizations - カスタマイズ:: 2.43 +* Etc - その他:: 2.44 +* Copying - 取り扱い:: 2.45 +@end menu 2.46 + 2.47 +@node Intro - はじめに, Main features - 主な機能, Top, Top 2.48 +@comment node-name, next, previous, up 2.49 +@chapter はじめに 2.50 +@cindex Demacs 2.51 +@cindex Mule 2.52 +@cindex LaTeX 2.53 +@cindex やちょう 2.54 + 2.55 + 野鳥は、GNU Emacs で La@TeX{} 用の文書を作成する時に jLa@TeX{} などの 2.56 +タイプセットコマンドや、プレヴューアの起動を Emacs 編集画面中から 2.57 +行えるようにすると共に、拡張性の高い種々の補完機能によりソーステキ 2.58 +ストの編集を支援します。さらに La@TeX{} コマンドのオンラインヘルプに 2.59 +よりマニュアルを調べる手間を軽減します。 2.60 + 2.61 + 2.62 +@node Main features - 主な機能, Installation - インストール, Intro - はじめに, Top 2.63 +@comment node-name, next, previous, up 2.64 +@chapter 主な機能 2.65 + 2.66 +@itemize @bullet 2.67 +@item タイプセッタやプレヴューアなどの編集画面からの起動(C-c t) 2.68 +@item カーソル位置によらない固定リジョンの部分タイプセット 2.69 +@item \includeonlyのワンタッチ更新 2.70 +@item エラー箇所への自動ジャンプ(C-c ') 2.71 +@item @code{\begin@{@}, \end@{@}, \section...} などの La@TeX{} 2.72 +コマンドの補完入力 2.73 +(@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) 2.74 +@item 既に入力したテキストを環境やコマンド引数の中に取り込む括り補完 2.75 +(@kbd{C-u} 通常補完キー) 2.76 +@item 補完辞書の学習 2.77 +@item La@TeX{} の環境やコマンドに応じたガイド付き引数入力 2.78 +@item 野鳥にないガイド付き引数入力関数の自動生成(@file{yatexgen.el}) 2.79 +@item La@TeX{} コマンドの削除/変更(@kbd{C-c k}, @kbd{C-c c}) 2.80 +@item ファイル間、@code{\begin}<->@code{\end}間、 2.81 + @code{\ref}<->@code{\label}間ジャンプ(@code{C-c g}) 2.82 +@item 一括コメントアウト/アンコメントアウト 2.83 + (@code{C-c >}, @code{C-c <}, @code{C-c ,}, @code{C-c .}) 2.84 +@item アクセント記号/数式環境用コマンド/ギリシャ文字の入力支援 2.85 + (@code{C-c a}, @code{;}, @code{/}) 2.86 +@item tabular/array環境のカラム位置ガイド 2.87 +@item 標準的 La@TeX{} コマンドのオンラインヘルプ(@code{C-c ?}, @code{C-c /}) 2.88 +@end itemize 2.89 + 2.90 +@node Installation - インストール, Invocation - 外部コマンドの起動, Main features - 主な機能, Top 2.91 +@comment node-name, next, previous, up 2.92 +@chapter 起動法 2.93 +@cindex Install 2.94 +@cindex インストール[いんすとーる] 2.95 +@cindex .emacs 2.96 +@cindex auto-mode-alist 2.97 +@cindex autoload 2.98 + 2.99 + ~/.emacsに下の2項目を加えます。 2.100 + 2.101 +@lisp 2.102 + (setq auto-mode-alist 2.103 + (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) 2.104 + (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) 2.105 +@end lisp 2.106 + 2.107 +次に野鳥の emacs-lisp ファイル群を置くディレクトリを load-path に 2.108 +加えます。たとえば、@file{~/src/emacs/yatex}に置くのであれば、 2.109 + 2.110 +@lisp 2.111 +(setq load-path (cons (expand-file-name "~/src/emacs/yatex") load-path)) 2.112 +@end lisp 2.113 + 2.114 +@noindent 2.115 +などとします。 2.116 + 2.117 + 以上の設定により、拡張子が .tex であるファイルを編集すると自動的に野鳥が 2.118 +ロードされます。野鳥が正常に起動できたときはモードラインの表示が「やてふ」 2.119 +に変わります。 2.120 + 2.121 + 2.122 +@node Invocation - 外部コマンドの起動, %#記法, Installation - インストール, Top 2.123 +@comment node-name, next, previous, up 2.124 +@chapter latexコマンド起動 2.125 +@cindex prefix key 2.126 +@cindex C-c 2.127 +@cindex タイプセッタ[たいぷせった] 2.128 +@cindex プレヴューア[ぷれびゅーあ] 2.129 +@cindex jlatex 2.130 +@cindex プリントアウト[ぷりんとあうと] 2.131 + 2.132 + yatex-mode の prefix キーは、標準状態で @kbd{C-c} (Ctrlキーを押しながらc) 2.133 +です。以下、標準のキー割当の場合、@kbd{[prefix]} は @kbd{C-c} と読み換えて 2.134 +下さい。まず、次のキー入力により、jlatex などのタイプセットプログラム(以後 2.135 +タイプセッタと呼ぶ)、プレヴューアなどの起動ができます。 2.136 + 2.137 +@table @kbd 2.138 +@item [prefix] t j 2.139 + @dots{} タイプセッタ(jlatex)起動 2.140 +@item [prefix] t r 2.141 + @dots{} タイプセッタ起動(領域指定) 2.142 +@item [prefix] t k 2.143 + @dots{} 動作中のタイプセッタの停止 2.144 +@item [prefix] t b 2.145 + @dots{} jbibtex起動 2.146 +@item [prefix] t p 2.147 + @dots{} プレヴューア起動 2.148 +@item [prefix] t l 2.149 + @dots{} lpr(プリントアウト用)コマンド起動 2.150 +@end table 2.151 + 2.152 +@menu 2.153 +* Calling typesetter - タイプセッタ起動:: 2.154 +* Print out - プリントアウト用コマンドの起動:: 2.155 +@end menu 2.156 + 2.157 +@node Calling typesetter - タイプセッタ起動, Print out - プリントアウト用コマンドの起動, Invocation - 外部コマンドの起動, Invocation - 外部コマンドの起動 2.158 +@comment node-name, next, previous, up 2.159 +@section タイプセッタ起動 2.160 +@cindex タイプセッタ起動 2.161 +@cindex タイプセットエラー[たいぷせっとえらー] 2.162 +@cindex エラー修正[えらーしゅうせい] 2.163 + 2.164 + タイプセッタを起動すると、編集ウィンドウが2つに分割され、片方のウィンド 2.165 +ウにタイプセット画面が表示されます。出力されるメッセージと連動しタイプセッ 2.166 +トバッファは自動的にスクロールします。もし、途中でエラーが起こって止まって 2.167 +しまった場合にはタイプセットバッファに移り、(@kbd{^Xo}) タイプセッタの出し 2.168 +ている ? プロンプトに対して、@kbd{x} (処理の中断)などの指示を送ることがで 2.169 +きます。エラーを修正する場合は、 2.170 + 2.171 +@table @kbd 2.172 +@item [prefix] ' 2.173 +@itemx (prefix+アポストロフィ) 2.174 + @dots{} 直前のエラー発生行へジャンプ 2.175 +@end table 2.176 + 2.177 +を入力することにより、タイプセッタがエラーを発生した行に移ることができます。 2.178 +また、タイプセッタの出力する overfull hbox などのウォーニング行にも対応し 2.179 +ていますので、順次 @kbd{[prefix] '} を押すことにより、一つ前のウォーニング 2.180 +発生行にジャンプしていきます。 2.181 + 2.182 + もし、気になるエラー行があった場合は、タイプセットバッファで、エ 2.183 +ラーの表示されている行にカーソルを合わせスペースキーを押すと La@TeX{} 2.184 +ソースの対応する行にジャンプします。 2.185 + 2.186 + なお、領域指定のタイプセットでは、単一ファイルの La@TeX{} ソースの編集時 2.187 +にはそのファイルの documentstyle が、別ファイルから include している場合に 2.188 +はメインファイルの documentstyle が自動的に選択されます。指定領域は、メイ 2.189 +ンファイルのあるディレクトリの@file{texput.tex}という臨時ファイルに出力さ 2.190 +れますので、上書きには注意してください。領域の指定方法は@xref{%#記法}の項を 2.191 +参照してください。 2.192 + 2.193 +@node Print out - プリントアウト用コマンドの起動, , Calling typesetter - タイプセッタ起動, Invocation - 外部コマンドの起動 2.194 +@comment node-name, next, previous, up 2.195 +@section プリントアウト 2.196 + 2.197 + プリントアウトする時は、出力開始/終了ページを聞いてきますが、こ 2.198 +れを省略したい時は、universal-argument をつけて下さい。 2.199 + 2.200 +@cindex 出力開始ページ[しゅつりょくかいしぺーじ] 2.201 +@cindex 出力終了ページ[しゅつりょくしゅうりょうぺーじ] 2.202 + 2.203 + 2.204 +@table @kbd 2.205 +@item C-u [prefix] t l 2.206 + @dots{} ページ確認省略lpr起動 2.207 +@end table 2.208 +@cindex ページ確認省略lpr起動[ぺーじかくにんしょうりゃくlprきどう] 2.209 + 2.210 +@node %#記法, Completion - 補完入力, Invocation - 外部コマンドの起動, Top 2.211 +@comment node-name, next, previous, up 2.212 +@chapter %#記法 2.213 + 2.214 + 本文中に@code{%#}ではじまるキーワードを埋め込むことでタイプセッタ起動等 2.215 +の制御をすることができます。 2.216 + 2.217 +@menu 2.218 +* Changing typesetter - タイプセット用コマンドの変更:: 2.219 +* Splitting input files - 入力ファイル分割:: 2.220 +* Fix region for typesetting - 領域の固定:: 2.221 +* lpr format - プリントアウトコマンド用フォーマット:: 2.222 +* Editing %# notation - %#記法の編集:: 2.223 +@end menu 2.224 + 2.225 +@node Changing typesetter - タイプセット用コマンドの変更, Splitting input files - 入力ファイル分割, %#記法, %#記法 2.226 +@comment node-name, next, previous, up 2.227 +@section タイプセット用コマンド変更 2.228 + 2.229 + 起動するコマンドを変えたい時は本文中に次のような行を書きます。 2.230 + 2.231 +@cindex 起動するコマンドを変える[きどうするこまんどをかえる] 2.232 + 2.233 +@example 2.234 + %#!jlatex-ntt example 2.235 +@end example 2.236 + 2.237 +NTT jTeX と、ASCII jTeX を使い分けたいような場合に便利でしょう。 2.238 + 2.239 +@cindex タイプセッタの使い分け[たいぷせったのつかいわけ] 2.240 + 2.241 +@node Splitting input files - 入力ファイル分割, Fix region for typesetting - 領域の固定, Changing typesetter - タイプセット用コマンドの変更, %#記法 2.242 +@comment node-name, next, previous, up 2.243 +@section 入力ファイル分割 2.244 + 2.245 +また、章毎に別ファイルの .tex を作成している場合で、@file{main.tex}から 2.246 +@file{sub.tex}を @code{\include}しているような時は、@file{sub.tex}の任意の 2.247 +位置に次のような行を埋め込みます。 2.248 + 2.249 +@example 2.250 + %#!jlatex main.tex 2.251 +@end example 2.252 + 2.253 +@cindex 入力ファイル分割[にゅうりょくふぁいるぶんかつ] 2.254 + 2.255 +上の例のようにコマンド名だけでなく引数も書いた場合には、全てをそのまま 2.256 +shell に渡すので次のように書けば、ghostview などをプレヴューアに使う時に便 2.257 +利です。 2.258 + 2.259 +@cindex ghostview 2.260 + 2.261 +@example 2.262 + %#!jlatex main ; dvi2ps main.dvi > main 2.263 +@end example 2.264 + 2.265 +なお、この行の最後の単語のピリオド以前を「メインファイル」のベース 2.266 +ネームであると仮定します(上の2つの場合どちらも@file{main})。 2.267 + 2.268 + 入力ファイル分割時には次のことに注意して下さい。 2.269 + 2.270 +@enumerate 2.271 +@item 2.272 +同時に編集するファイル群の名前は重複のないようにする。 2.273 +@item 2.274 +サブディレクトリを作って、その中にサブファイルを置くことはできるが 2.275 +サブディレクトリのサブディレクトリには置けない。 2.276 +@item 2.277 +メインファイルからサブディレクトリ内のファイルを include 2.278 +する時には、相対パス指定を用いて、 2.279 +@code{\include{chap1/sub}}のように記述。 2.280 +@item 2.281 +メインファイルが一つ上のディレクトリにある場合も、サブファイルには 2.282 +%#!jlatex main.tex のように記述する(../mainではない)。 2.283 +@end enumerate 2.284 + 2.285 + 2.286 + 2.287 +@node Fix region for typesetting - 領域の固定, lpr format - プリントアウトコマンド用フォーマット, Splitting input files - 入力ファイル分割, %#記法 2.288 +@comment node-name, next, previous, up 2.289 +@section 領域の固定 2.290 +@cindex 固定領域のタイプセット[こていりょういきのたいぷせっと] 2.291 +@cindex %#BEGIN 2.292 +@cindex %#END 2.293 + 2.294 + @kbd{[prefix] tr} の領域指定のタイプセットでは、とくに指定のないかぎり、 2.295 +@kbd{C-SPC}でマークした位置と、ポイント(カーソル位置)の間を領域とみなしま 2.296 +すが、必ず決まった領域をタイプセットしたい場合は、その領域を 2.297 + 2.298 +@example 2.299 + %#BEGIN 2.300 + <渡したい領域> 2.301 + %#END 2.302 +@end example 2.303 + 2.304 +@noindent 2.305 +のように@code{%#BEGIN}と@code{%#END}で囲み、カーソルを「@code{%#BEGIN}以降」 2.306 +に置いてください。この時の領域決定規則をまとめると次のようになります。 2.307 + 2.308 + 2.309 +@enumerate 2.310 +@item 2.311 +カーソル位置よりバッファの先頭方向に@code{%#BEGIN}というキーワードが 2.312 +ある場合 2.313 + 2.314 +@enumerate 2.315 +@item 2.316 +@code{%#BEGIN}よりバッファの末尾方向に@code{%#END}というキーワードが見つかっ 2.317 +た場合。 2.318 +→@code{%#BEGIN} から、その @code{%#END} のある位置まで。 2.319 +@item 2.320 +@code{%#END} が見つからなかった場合。 2.321 +→バッファの最後尾まで。 2.322 +@end enumerate 2.323 +@cindex 領域決定規則[りょういきけっていきそく] 2.324 + 2.325 +@item 2.326 +カーソル位置よりバッファの先頭方向に @code{%#BEGIN} というキーワードが 2.327 +見つからなかった場合。 2.328 +→マーク(C-SPC位置)とポイント(カーソル位置)の間の領域。 2.329 +@end enumerate 2.330 + 2.331 + tabular 環境を何度も試行錯誤しているような場合は、@code{\begin}の前の行 2.332 +に @code{%#BEGIN} と書き、@code{\end} の次の行に @code{%#END} と書いておく 2.333 +と簡単に作表結果をテストすることができます。また、長い .tex ファイルの後半 2.334 +に @code{%#BEGIN} を書いておけば、前半の部分は無視できます。このBEGINとEND 2.335 +の消し忘れには十分ご注意下さい。 2.336 +@cindex 長いファイルの編集[ながいふぁいるのへんしゅう] 2.337 + 2.338 +@node Require, lpr format - プリントアウトコマンド用フォーマット, Fix region for typesetting - 領域の固定, %#記法 2.339 +@comment node-name, next, previous, up 2.340 + 2.341 +@node lpr format - プリントアウトコマンド用フォーマット, Editing %# notation - %#記法の編集, Fix region for typesetting - 領域の固定, %#記法 2.342 +@comment node-name, next, previous, up 2.343 +@section lprフォーマット 2.344 +@cindex lprふぉーまっと 2.345 +@cindex lprフォーマット 2.346 +@cindex lpr format 2.347 + 2.348 + まず、プリントアウト用コマンド列のフォーマットについて説明します。 2.349 +コマンド列フォーマットは、3つの Lisp 変数によって表現されます。デ 2.350 +フォルトの dvi2ps 用のフォーマットを例に説明します。 2.351 + 2.352 +@table @code 2.353 +@item dviprint-command-format 2.354 +"dvi2ps %f %t %s | lpr" 2.355 + 2.356 +@item dviprint-from-format 2.357 +"-f %b" 2.358 + 2.359 +@item dviprint-to-format 2.360 +"-t %e" 2.361 +@end table 2.362 + 2.363 +実際にプリントアウトする時は、(1)中の %s がファイル名に置き換えられ、%f が 2.364 +(2)の内容、%t が(3)の内容に置き換えられます。その際に(2)の文字列中の %b は 2.365 +「出力開始ページ」、(3)の文字列中の %e は「出力終了ページ」に置き換えられ 2.366 +ます。もし、ページを指定しない時には、%f, %t 両方とも無視されます。 2.367 + 2.368 + この、dviprint-command-format を臨時に変えたい時は、La@TeX{} の 2.369 +ソーステキスト中の任意の場所に、 2.370 + 2.371 +@example 2.372 + %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2 2.373 +@end example 2.374 + 2.375 +@noindent 2.376 +のように書いて下さい。プリントアウトするページ範囲をいちいち聞かせないよう 2.377 +にする時に 2.378 + 2.379 +@example 2.380 + %#LPR dvi2ps %s | lpr 2.381 +@end example 2.382 + 2.383 +@noindent 2.384 +などとするのも便利かもしれません。 2.385 + 2.386 +@node Editing %# notation - %#記法の編集, , lpr format - プリントアウトコマンド用フォーマット, %#記法 2.387 +@comment node-name, next, previous, up 2.388 +@section %#記法自体の編集 2.389 +@cindex %#きほうじたいのへんしゅう 2.390 + 2.391 +以上のような@code{%#}で始まる各種制御記法を編集するためには 2.392 + 2.393 +@table @kbd 2.394 +@item [prefix] % 2.395 + @dots{} %#記法編集メニュー 2.396 +@end table 2.397 + 2.398 +@noindent 2.399 +を押します。 2.400 + 2.401 +@example 2.402 + !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR 2.403 +@end example 2.404 + 2.405 +@noindent 2.406 +というメニューが出て来るので、@code{%#!}に続くコマンドを変更したい時には 2.407 +@kbd{!}を、@code{%#LPR}で lpr フォーマットを変えたい時は@kbd{l}を、あらか 2.408 +じめ設定したリジョンを @code{%#BEGIN} 〜 @code{%#END} で括りたい時は、 2.409 +@kbd{b}を押します。@kbd{b}を選んだ時には、それまでバッファ中に置かれていた 2.410 +@code{%#BEGIN}, @code{%#END} が自動的に消去されます。 2.411 +@cindex lprフォーマットの変更[lprふぉーまっとのへんこう] 2.412 + 2.413 +@node Completion - 補完入力, Commenting out - コメントアウト, %#記法, Top 2.414 +@comment node-name, next, previous, up 2.415 +@chapter 補完入力 2.416 + 2.417 + La@TeX{} での環境名などは、野鳥の補完機能を利用して能率的に入力すること 2.418 +ができます。 2.419 + 2.420 +@menu 2.421 +* begin型補完:: 2.422 +* section型補完:: 2.423 +* large型補完:: 2.424 +* maketitle型補完:: 2.425 +* Arbitrary completion - 随時補完:: 2.426 +* end補完:: 2.427 +* Accent mark completion - アクセント記号補完:: 2.428 +* Image completion - 数式記号イメージ補完:: 2.429 +* Greek letter completion - ギリシャ文字補完:: 2.430 +@end menu 2.431 + 2.432 +@node begin型補完, section型補完, Completion - 補完入力, Completion - 補完入力 2.433 +@comment node-name, next, previous, up 2.434 +@section begin型補完 2.435 +@cindex begin型補完[beginがたほかん] 2.436 +@cindex 環境名の補完[かんきょうめいのほかん] 2.437 +@cindex prefix b 2.438 + 2.439 + @code{\begin@{env@}...\end@{env@}}の様な形式の入力の補完をbegin型補完と 2.440 +呼ぶことにします。begin 型補完は、 2.441 + 2.442 +@table @kbd 2.443 +@item [prefix] b 2.444 + @dots{} begin 型補完開始(標準では C-c b) 2.445 +@end table 2.446 + 2.447 +@noindent 2.448 +で始まります。頻繁に用いられる次の La@TeX{} 環境の補完は、[prefix] @kbd{b} 2.449 +に続く次の1文字を入力するだけで、@code{\begin@{xxx@}...\end@{xxx@}}を完成 2.450 +させます。 2.451 + 2.452 +@table @kbd 2.453 +@item [prefix] b c 2.454 + @dots{} @code{\begin@{center@}...\end@{center@}} 2.455 +@item [prefix] b d 2.456 + @dots{} @code{\begin@{document@}...\end@{document@}} 2.457 +@item [prefix] b D 2.458 + @dots{} @code{\begin@{description@}...\end@{description@}} 2.459 +@item [prefix] b e 2.460 + @dots{} @code{\begin@{enumerate@}...\end@{enumerate@}} 2.461 +@item [prefix] b E 2.462 + @dots{} @code{\begin@{equation@}...\end@{equation@}} 2.463 +@item [prefix] b i 2.464 + @dots{} @code{\begin@{itemize@}...\end@{itemize@}} 2.465 +@item [prefix] b l 2.466 + @dots{} @code{\begin@{flushleft@}...\end@{flushleft@}} 2.467 +@item [prefix] b m 2.468 + @dots{} @code{\begin@{minipage@}...\end@{minipage@}} 2.469 +@item [prefix] b t 2.470 + @dots{} @code{\begin@{tabbing@}...\end@{tabbing@}} 2.471 +@item [prefix] b T 2.472 + @dots{} @code{\begin@{tabular@}...\end@{tabular@}} 2.473 +@item [prefix] b ^T 2.474 + @dots{} @code{\begin@{table@}...\end@{table@}} 2.475 +@item [prefix] b p 2.476 + @dots{} @code{\begin@{picture@}...\end@{picture@}} 2.477 +@item [prefix] b q 2.478 + @dots{} @code{\begin@{quote@}...\end@{quote@}} 2.479 +@item [prefix] b Q 2.480 + @dots{} @code{\begin@{quotation@}...\end@{quotation@}} 2.481 +@item [prefix] b r 2.482 + @dots{} @code{\begin@{flushright@}...\end@{flushright@}} 2.483 +@item [prefix] b v 2.484 + @dots{} @code{\begin@{verbatim@}...\end@{verbatim@}} 2.485 +@item [prefix] b V 2.486 + @dots{} @code{\begin@{verse@}...\end@{verse@}} 2.487 +@end table 2.488 + 2.489 + 上記のもの以外の環境名は Emacs の持つインクリメンタルな補完機能を用いて 2.490 +入力します(上記の環境名も以下の補完入力可能)。 2.491 + 2.492 +@table @kbd 2.493 +@item [prefix] b @key{SPC} 2.494 + @dots{} begin 型補完入力 2.495 +@end table 2.496 + 2.497 +@kbd{[prefix] b @key{SPC}} と入力すると、最下行のミニバッファに 2.498 + 2.499 +@example 2.500 + Begin environment(default document): 2.501 +@end example 2.502 + 2.503 +@noindent 2.504 +と表示されます。ここで、何も入れずにリターンキーのみ押すと、括弧内に出てい 2.505 +るデフォルトの環境名が入力されますが、適当な環境名を入力すると、 2.506 +@code{\begin@{環境名@} … \end@{環境名@}}が文書中に挿入されます。ミニバッ 2.507 +ファで環境名を入力するときに、環境名の頭文字を入力し「スペース」をたたくと、 2.508 +一致する環境名が内部テーブルに存在した場合、正しい環境名に補完されるので、 2.509 +入力の手間が省けます。内部テーブルに存在しない環境名を入力した時はユーザ専 2.510 +用のテーブルに登録され、さらにそのテーブルを自動的に、ユーザ辞書(デフォル 2.511 +トでは @file{~/.yatexrc})に保存します。 2.512 +@cindex ユーザ辞書[ゆーざじしょ] 2.513 + 2.514 +@subsection 既に書いたテキストを環境で括る 2.515 + 2.516 + ところで、最初に書いてしまったブロックを後から、itemize 環境の中 2.517 +に閉じこめたいと思うことがありますが、そのようなときは、あらかじめ 2.518 +閉じこめたい段落をマークして、begin 型補完の各コマンドの @kbd{[prefix]} 2.519 +の次の『小文字の 'b'』 を『大文字』に変えて起動して下さい。(または、 2.520 +@kbd{C-u} を先に打ち、universal argument をつけても可能です) 2.521 +@cindex ブロック[ぶろっく] 2.522 +@cindex 閉じ込める[とじこめる] 2.523 + 2.524 + 例えばあるパラグラフを description 環境の中に入れたいときは、 2.525 +そのパラグラフをマークしてから、 2.526 + 2.527 +@table @kbd 2.528 +@item [prefix] B D 2.529 +@itemx (または ESC 1 [prefix] b D) 2.530 +@itemx (または C-u [prefix] b D など) 2.531 +@end table 2.532 + 2.533 +とタイプしてください。これは、@kbd{[prefix] b SPC}の補完入力にもあてはまり、 2.534 +@kbd{b} を大文字に変えて、@kbd{[prefix] B SPC} とタイプすれば、あらかじめ 2.535 +マークしておいたリジョンを、begin と end の環境で括ります。 2.536 + 2.537 +@node section型補完, large型補完, begin型補完, Completion - 補完入力 2.538 +@comment node-name, next, previous, up 2.539 +@section section型補完 2.540 +@cindex section型補完[sectionがたほかん] 2.541 +@cindex prefix s 2.542 + 2.543 + @code{\section@{目的@}} のような形式の入力の補完を section 型補完と呼ぶこ 2.544 +とにします。section 型補完は、 2.545 + 2.546 +@table @kbd 2.547 +@item [prefix] s 2.548 + @dots{} section 型補完 2.549 +@end table 2.550 + 2.551 +@noindent 2.552 +で実行します。@kbd{[prefix] s} を入力するとミニバッファに、 2.553 + 2.554 +@example 2.555 + (C-v for view) \???@{@} (default documentstyle): 2.556 +@end example 2.557 + 2.558 +@noindent 2.559 +というプロンプトが現れるので、そこで @samp{section} のような La@TeX{} コマ 2.560 +ンド名を入力します。ここでもリターンキーのみで括弧内のデフォルト値が選択さ 2.561 +れるほか、@samp{chapter}などのような頻度の高い名称入力にはスペースキーによ 2.562 +る補完機能が有効です。 次に、@{@}の中身の入力を促す、 2.563 + 2.564 +@example 2.565 + \section@{???@}: 2.566 +@end example 2.567 + 2.568 +@noindent 2.569 +というプロンプトが現れるので、セクションのタイトルなどを入力します。 2.570 +たとえば、 2.571 + 2.572 +@example 2.573 + (C-v for view) \???@{@} (default documentstyle): section 2.574 + \section@{???@}: 目的 2.575 +@end example 2.576 + 2.577 +@noindent 2.578 +のように入力した場合は、文章中に 2.579 + 2.580 +@example 2.581 + \section@{目的@} 2.582 +@end example 2.583 + 2.584 +@noindent 2.585 +が挿入され、 2.586 + 2.587 +@example 2.588 + (C-v for view) \???@{@} (default section): vspace* 2.589 + \vspace*@{???@}: 2.590 +@end example 2.591 + 2.592 +@noindent 2.593 +のように@{@}の中身を省略したときは、 2.594 + 2.595 +@example 2.596 + \vspace*@{@} 2.597 +@end example 2.598 + 2.599 +@noindent 2.600 +だけが挿入され、改行はせずカーソルは自動的に中括弧の内側に移動します。 2.601 + 2.602 +@menu 2.603 +* 2個以上の引数をとる section型コマンド:: 2.604 +* Input argument without copletion - 引数入力時に補完しない:: 2.605 +* Enclose region -type command - 既に書いたテキストを括る:: 2.606 +* Recursive completion - 再帰補完:: 2.607 +* view-sectioning - セクション区切りのアウトライン表示:: 2.608 +@end menu 2.609 + 2.610 +@node 2個以上の引数をとる section型コマンド, Input argument without copletion - 引数入力時に補完しない, section型補完, section型補完 2.611 +@comment node-name, next, previous, up 2.612 +@subsection 2個以上の引数をとる section型コマンド 2.613 +@cindex 引数[ひきすう] 2.614 + 2.615 + ところで、@samp{\addtolength{\topmargin}{8mm}} などのように、引数を二つ 2.616 +以上取る La@TeX{} コマンドがあります。このようなコマンドの補完入力には、 2.617 +section 型補完呼び出しに引数を付けてください。例えば上の@samp{addtolength} 2.618 +の例であれば、引数2を指定します。つまり、 2.619 + 2.620 +@example 2.621 + C-u 2 [prefix] s (または、ESC 2 [prefix] s) 2.622 +@end example 2.623 + 2.624 +@noindent 2.625 +と section 型補完を呼び出した後、 2.626 + 2.627 +@example 2.628 + (Ctrl-v for view) \???@{@} (default vspace*): addtolength 2.629 + \addtolength@{???@}: \topmargin 2.630 + Argument 2: 8mm 2.631 +@end example 2.632 + 2.633 +@noindent 2.634 +のように入力してください。最初の addtolength の部分と、第一引数で 2.635 +ある \topmargin の入力は当然スペースによる補完入力が可能です。ユー 2.636 +ザ辞書に登録される La@TeX{} コマンドには、この引数の数も学習されるの 2.637 +で、最初の補完の時引数の数を指定して起動しておけば、以後の補完時に 2.638 +は、記憶された個数だけ引数を聞いて来るようになります。あとで引数の 2.639 +個数を変えたい時は、再び C-u を用いて個数を指定し直すことで、自動 2.640 +的に辞書中の引数の個数の部分を更新します。 2.641 +@cindex 引数の個数を変える[ひきすうのこすうをかえる] 2.642 + 2.643 +@node Input argument without copletion - 引数入力時に補完しない, Enclose region -type command - 既に書いたテキストを括る, 2個以上の引数をとる section型コマンド, section型補完 2.644 +@comment node-name, next, previous, up 2.645 +@subsection 引数入力時に補完しない 2.646 +@cindex 引数入力時に補完しない[ひきすうにゅうりょくじにほかんしない] 2.647 + 2.648 + なお、特別な例として引数0を指定すると、第一引数の入力時に補完入力ではな 2.649 +く、単純な文字列入力を使用するようになります。段落を指定する@samp{chapter} 2.650 +や @samp{section}などは第一引数の段落タイトル入力時に、スペースを含めるこ 2.651 +とがあるので、補完入力は却ってじゃまになります。標準設定では、これらの段落 2.652 +指定コマンド(chapter, section, paragraph など)に引数0の指定が埋め込まれて 2.653 +います。 2.654 + 2.655 +@node Enclose region -type command - 既に書いたテキストを括る, Recursive completion - 再帰補完, Input argument without copletion - 引数入力時に補完しない, section型補完 2.656 +@comment node-name, next, previous, up 2.657 +@subsection 既に書いたテキストを括る 2.658 +@cindex 括る[くくる] 2.659 + 2.660 + また、起動コマンドの@kbd{s}を大文字に変えて起動すると、あらかじめ書 2.661 +いた文章を section 型コマンドの第一引数として括ります。 2.662 + 2.663 +@node Recursive completion - 再帰補完, view-sectioning - セクション区切りのアウトライン表示, Enclose region -type command - 既に書いたテキストを括る, section型補完 2.664 +@comment node-name, next, previous, up 2.665 +@subsection 再帰補完 2.666 +@cindex 再帰補完[さいきほかん] 2.667 + 2.668 + 高度な使い方になるかもしれませんが、section型補完の引数の入力時にさらに 2.669 +補完入力を利用することができます(section/large/maketitle型に限る)。section 2.670 +型コマンドの引数に更に La@TeX{} コマンドが来る場合にはミニバッファで野鳥の 2.671 +補完キーを再帰的に入力することで引数の入力も効率的に行なえます。 2.672 + 2.673 +@node view-sectioning - セクション区切りのアウトライン表示, , Recursive completion - 再帰補完, section型補完 2.674 +@comment node-name, next, previous, up 2.675 +@subsection セクション区切りのアウトライン表示 2.676 +@cindex アウトライン[あうとらいん] 2.677 + 2.678 + 通常のsection型補完の時にミニバッファで@kbd{C-v}を押すと現在存在するセク 2.679 +ション区切りコマンド全てを一覧表示します(「<<--」のついている行がもっとも 2.680 +近いセクション区切り)。この時ミニバッファで@kbd{C-p}, @kbd{C-n} を押すと 2.681 +@samp{part}, @samp{chapter}, ..., @samp{subparagraph} のコマンドが論理階層 2.682 +の高さにしたがって上下します。また、@kbd{C-v}, @kbd{M-v} を押すとセクショ 2.683 +ン区切り一覧バッファがスクロールし、数字の@kbd{0}〜@kbd{7}を押すとある高さ 2.684 +以上のセクション区切りだけを選んで表示します(実際にやって見れば分かります)。 2.685 +この一覧バッファにカーソルを移しスペースを押すと、該当するセクション区切り 2.686 +のある本文中の場所にジャンプします。 2.687 +@cindex 論理階層[ろんりかいそう] 2.688 +@cindex セクション区切り[せくしょんくぎり] 2.689 +@cindex ジャンプ[じゃんぷ] 2.690 + 2.691 +@node large型補完, maketitle型補完, section型補完, Completion - 補完入力 2.692 +@comment node-name, next, previous, up 2.693 +@section large型補完 2.694 +@cindex large型補完[largeがたほかん] 2.695 +@cindex prefix l 2.696 + 2.697 + @code{@{\large @}} のような形式の補完を large 型補完と呼ぶことにします。 2.698 + 2.699 +@table @kbd 2.700 +@item [prefix] l 2.701 + @dots{} large 型補完開始 2.702 +@end table 2.703 + 2.704 +@noindent 2.705 +がlarge型補完の開始です。@kbd{[prefix] l} を押すと、ミニバッファに 2.706 + 2.707 +@example 2.708 + @{\??? @} (default large): 2.709 +@end example 2.710 + 2.711 +@noindent 2.712 +と表示されるので、上記のものと同じ要領で補完入力して下さい。補完候補に用意 2.713 +されているのは、@samp{footnotesize} や @samp{huge} のような文字サイズ指定 2.714 +子と、@samp{bf}や@samp{dg}のようなフォント指定子です。 2.715 +@cindex 文字サイズ指定子[もじさいずしていし] 2.716 +@cindex フォント指定子[ふぉんとしていし] 2.717 + 2.718 +@subsection 既に書いた文字を括る 2.719 +@cindex 括る[くくる] 2.720 + 2.721 + また、begin型補完の時と同様、先に書いてしまった一連の文章の文字のサイズ 2.722 +を変えたいと思う時がありますが、そのような時は、サイズや大きさを変えたい文 2.723 +字の範囲をマークしてから、呼び出しキーを @kbd{[prefix] L} と、大文字の L 2.724 +に変えて呼び出せば、そのリジョン全体が、ブレースで囲まれます。 2.725 + 2.726 +@node maketitle型補完, Arbitrary completion - 随時補完, large型補完, Completion - 補完入力 2.727 +@comment node-name, next, previous, up 2.728 +@section maketitle型補完 2.729 +@cindex maketitle型補完[maketitleがたほかん] 2.730 +@cindex prefix m 2.731 + 2.732 + @code{\maketitle} の形式の補完を maketitle 型補完と呼ぶことにします。 2.733 + 2.734 +@table @kbd 2.735 +@item [prefix] m 2.736 + @dots{} maketitle 型補完開始 2.737 +@end table 2.738 + 2.739 +@noindent 2.740 +で、maketitle 型補完を開始します。補完の要領は今までのものとまったく同じで 2.741 +す。La@TeX{} 用のコマンド名が補完候補として用意されています。 2.742 + 2.743 +@node Arbitrary completion - 随時補完, end補完, maketitle型補完, Completion - 補完入力 2.744 +@comment node-name, next, previous, up 2.745 +@section 随時補完 2.746 +@cindex 随時補完[ずいじほかん] 2.747 +@cindex prefix SPC 2.748 + 2.749 + さて、今まで述べた典型的な La@TeX{} コマンド形式の補完入力を用いずに、今 2.750 +入力しようとしている La@TeX{} コマンドを文書中の任意の位置で随時補完するこ 2.751 +ともできます。La@TeX{} コマンド(先頭が\で始まる)を入力している途中で、 2.752 + 2.753 +@table @kbd 2.754 +@item [prefix] SPC 2.755 + @dots{} 随時補完 2.756 +@end table 2.757 + 2.758 +@noindent 2.759 +を入力すれば、全ての補完候補の中から一致するものが選ばれカーソル位置に挿入 2.760 +されます。 2.761 + 2.762 +@node end補完, Accent mark completion - アクセント記号補完, Arbitrary completion - 随時補完, Completion - 補完入力 2.763 +@comment node-name, next, previous, up 2.764 +@section end補完 2.765 +@cindex end補完[endほかん] 2.766 +@cindex prefix e 2.767 + 2.768 + 現在開いたままの環境名を自動的に検出し、@code{\end@{環境名@}}を挿入しま 2.769 +す。begin 型補完を用いれば環境の閉じ忘れはないのですが、時にはついつい手で 2.770 +@code{\begin@{環境名@}} を入れてしまい、悲しい思いをすることがあります。そ 2.771 +のような時には気にせず続けて文章を入力し、しかるのちに 2.772 + 2.773 +@table @kbd 2.774 +@item [prefix] e 2.775 + @dots{} end 補完 2.776 +@end table 2.777 + 2.778 +@noindent 2.779 + とすることで、現在開いている環境名で \end{} が補われます。 2.780 + 2.781 +@node Accent mark completion - アクセント記号補完, Image completion - 数式記号イメージ補完, end補完, Completion - 補完入力 2.782 +@comment node-name, next, previous, up 2.783 +@section アクセント記号補完 2.784 +@cindex アクセント記号補完[あくせんときごうほかん] 2.785 +@cindex prefix a 2.786 +@cindex 欧文[おうぶん] 2.787 + 2.788 + 欧文のアクセント記号(@code{\`@{o@}}など)を入力する時は、 2.789 + 2.790 +@table @kbd 2.791 +@item [prefix] a 2.792 + @dots{} アクセント記号入力 2.793 +@end table 2.794 + 2.795 +@noindent 2.796 +を押すと、ミニバッファに 2.797 + 2.798 +@example 2.799 + 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b 2.800 +@end example 2.801 + 2.802 +@noindent 2.803 +というメニューが出て来るので、数字、または対応する記号/英字を入力 2.804 +して下さい。すると編集バッファに、 2.805 + 2.806 +@example 2.807 + \`@{@} 2.808 +@end example 2.809 + 2.810 +@noindent 2.811 +があらわれ、カーソルが@{@}内に位置するので、さらに一文字入力する事で、 2.812 + 2.813 +@example 2.814 + \`@{o@} 2.815 +@end example 2.816 + 2.817 +@noindent 2.818 +が完成され、カーソルは@{@}の外に戻ります。 2.819 + 2.820 +@node Image completion - 数式記号イメージ補完, Greek letter completion - ギリシャ文字補完, Accent mark completion - アクセント記号補完, Completion - 補完入力 2.821 +@comment node-name, next, previous, up 2.822 +@section 数式記号イメージ補完 2.823 +@cindex 数式記号イメージ補完[すうしききごういめーじほかん] 2.824 +@cindex イメージ補完[いめーじほかん] 2.825 +@cindex ; 2.826 +@cindex 数式モード[すうしきもーど] 2.827 +@cindex 矢印[やじるし] 2.828 +@cindex Σ[しぐま] 2.829 +@cindex leftarrow 2.830 +@cindex ∞[むげんだい] 2.831 + 2.832 + 主に数式モードで使用される、矢印やΣなどの記号を擬似的に表現するキー入力 2.833 +で、La@TeX{} コマンドを入力できます。これは野鳥自身の「数式モード」でのみ 2.834 +動作します。野鳥はカーソルが@TeX{}の数式環境の中にある時に@kbd{;}や、 2.835 +@kbd{/}に特殊な機能を持たせます。 2.836 + 2.837 + さて、例えば、←(leftarrow)をASCII文字だけで表現する場合、一般的には「<-」 2.838 +のようにしますが、これを利用して、数式記号イメージ入力モードで 2.839 +@code{\leftarrow}を入力するには、@kbd{;}(セミコロン)を打ってから@kbd{<-}と 2.840 +入力します。同様に、長い矢印←-(long-leftarrow) をASCII文字だけで表現する 2.841 +場合「<--」とするので、@code{\longleftarrow}を入力するためには、@kbd{;<--} 2.842 +と入力します。あるいは無限大記号をASCII文字だけで表現する時は「oo」のよう 2.843 +にすることから、@code{\infty} を入力する時は、@kbd{;oo}とキー入力します。 2.844 + 2.845 + これらの操作をまとめると次のようになります。 2.846 + 2.847 +@example 2.848 +INPUT 入力される La@TeX{} コマンド 2.849 +; < - @code{\leftarrow} 2.850 +; < - - @code{\longleftarrow} 2.851 +; < - - > @code{\longleftrightarrow} 2.852 +; o @code{\circ} 2.853 +; o o @code{\infty} 2.854 +@end example 2.855 + 2.856 + 2.857 +@noindent 2.858 + いずれの場合も、イメージ入力を行っている途中で望みのものがバッファ 2.859 +に表示されたなら、そこでイメージ入力を止めて次の編集動作に移っても 2.860 +構いません。 2.861 + 2.862 + 数式環境中で@samp{;}自身を入力するには@kbd{};;」のようにします。イメージ 2.863 +入力の途中でTABを押すと、それまで入力した文字で始まるもの一覧が表示されま 2.864 +す。ここで目的の La@TeX{} コマンドまでカーソルを移動し再度TABを押すことで 2.865 +その La@TeX{} コマンドがバッファに挿入されます。 2.866 +@cindex ;自身[;じしん] 2.867 + 2.868 + どのキー入力にどの記号が対応しているか全て知りたい時は、@kbd{;}を押した 2.869 +直後にリターンキーを押してください。以下の例は、@kbd{;<}と押した後にTAB 2.870 +を押したものです。 2.871 + 2.872 +@example 2.873 +KEY LaTeX sequence sign 2.874 +< \leq ≦ 2.875 +<< \ll 《 2.876 +<- \leftarrow ← 2.877 +<= \Leftarrow <= 2.878 +@end example 2.879 + 2.880 +左から[入力キー]、[対応する La@TeX{} コマンド]、[(擬似)記号図示]、と 2.881 +いう順でメニューが出て来るので、よく使うものを覚えておくと良いでしょ 2.882 +う。ものによってはASCII文字で表現することが困難なので、あまり覚え 2.883 +やすいキー並びではないものがあるでしょうから、そのような場合は 2.884 +\maketitle 型補完で入力するか、以下に述べる対応表の設定を行って単 2.885 +純なキー並びのものを設定すると良いでしょう。 2.886 + 2.887 + 入力キーと La@TeX{} コマンド、記号の対応表を個人的に設定したい場合は 2.888 +Emacs-Lisp 変数 @code{YaTeX-math-sign-alist-private} に定義してください。 2.889 +その内容とデフォルトのものを合わせたものが対応表として使用されます(private 2.890 +の方が優先される)。なお、この変数の構造については @file{yatexmth.el} を参 2.891 +照してください。 2.892 +@cindex YaTeX-math-sign-alist-private 2.893 + 2.894 +@node Greek letter completion - ギリシャ文字補完, , Image completion - 数式記号イメージ補完, Completion - 補完入力 2.895 +@comment node-name, next, previous, up 2.896 +@section ギリシャ文字補完 2.897 +@cindex ギリシャ文字補完[ぎりしゃもじほかん] 2.898 +@cindex / 2.899 + 2.900 + もう一つ、数式環境中で@kbd{/}を押すとギリシャ文字入力モードに入ります。 2.901 +@kbd{/}を押した直後に@kbd{a}を押すと@code{\alpha}が、@kbd{g} を押すと 2.902 +@code{\gamma}が、などアルファベットに対応したギリシャ文字が挿入されます。 2.903 +操作方法は;の数式記号補完とまったく同じです。まずは@kbd{/}の直後にリターン 2.904 +キーを押してどのアルファベットにどのギリシャ文字が対応しているか調べてみて 2.905 +ください。 2.906 + 2.907 + @kbd{;}と@kbd{/}を数式環境中で押しているにもかかわらず、イメージ補完が働 2.908 +かない場合は、@kbd{C-u ;}のように universal-argument をつけてキーを押すこ 2.909 +とにより、強制的にイメージ補完に入ることができます。また、この時にどのよう 2.910 +な状態で数式環境内判定に失敗したかをご連絡下さい。 2.911 + 2.912 +@node Commenting out - コメントアウト, Cursor jump - カーソルジャンプ, Completion - 補完入力, Top 2.913 +@comment node-name, next, previous, up 2.914 +@chapter コメントアウト 2.915 +@cindex コメントアウト[こめんとあうと] 2.916 +@cindex prefix < 2.917 +@cindex prefix > 2.918 +@cindex prefix . 2.919 +@cindex prefix , 2.920 + 2.921 + 2.922 + La@TeX{}の編集には試行錯誤がつきものです。ある部分を一括でコメントアウト 2.923 +したり、コメントを外したりしたいことがあります。 2.924 + 2.925 +@table @kbd 2.926 +@item [prefix] > 2.927 + @dots{} リジョンを % でコメントアウト 2.928 +@item [prefix] < 2.929 + @dots{} リジョンの % のコメントを外す 2.930 +@end table 2.931 + 2.932 +@noindent 2.933 +は、あらかじめ設定したリジョンに対しての操作、 2.934 + 2.935 +@table @kbd 2.936 +@item [prefix] . 2.937 + @dots{} 現在のパラグラフをコメントアウト 2.938 +@item [prefix] , 2.939 + @dots{} 現在のパラグラフのコメントを外す 2.940 +@end table 2.941 + 2.942 +@noindent 2.943 +は、カーソルの位置するパラグラフ全体に対しての操作です。なお、ここでいう 2.944 +「パラグラフ」は (@code{mark-paragraph}) 関数によりマークされる範囲を指し 2.945 +ます(標準設定で@kbd{ESC h}にバインドされている)。なお、既に@code{%}でコメ 2.946 +ントアウトされているパラグラフに対して繰り返しパラグラフのコメントを使用し 2.947 +た場合の動作は保証しませんので御注意ください。 2.948 + 2.949 + さて、文章に対してだけでなく、時には@code{\begin}, @code{\end} 自体に対 2.950 +してもコメントアウトの操作をしたいときがあります。このようなときは、 2.951 +@code{\begin@{@}} あるいは @code{\end@{@}} の行にカーソルを合わせ、 2.952 + 2.953 +@table @kbd 2.954 +@item [prefix] > 2.955 + @dots{} @code{\begin@{@}}〜@code{\end@{@}} 全てコメントアウト 2.956 +@item [prefix] < 2.957 + @dots{} @code{\begin@{@}}〜@code{\end@{@}} 全てコメントを外す 2.958 +@end table 2.959 + 2.960 +@noindent 2.961 +とすることで、@code{\begin〜\end}で囲まれる環境全てに対してコメント操作し、 2.962 + 2.963 +@table @kbd 2.964 +@item [prefix] . 2.965 + @dots{} @code{\begin@{@}} と @code{\end@{@}} をコメントアウト 2.966 +@item [prefix] , 2.967 + @dots{} @code{\begin@{@}} と @code{\end@{@}} のコメントを外す 2.968 +@end table 2.969 + 2.970 +は、対応する @code{\begin} と @code{\end} 2行だけを、コメント操作の対象と 2.971 +します。リジョンをコメントアウトしようとして、マークを設定したのちにカーソ 2.972 +ルを移動し@kbd{[preifx] >} を押してもカーソルが @code{\begin@{@}} の上にあ 2.973 +ると@code{\begin@{@}}〜@code{\end@{@}}モードでコメント機能が働いてしまうの 2.974 +で注意して下さい。 2.975 + 2.976 +@node Cursor jump - カーソルジャンプ, Modifying/Deleting - 変更/削除, Commenting out - コメントアウト, Top 2.977 +@comment node-name, next, previous, up 2.978 +@chapter カーソルジャンプ 2.979 +@cindex カーソルジャンプ[かーそるじゃんぷ] 2.980 +@cindex prefix g 2.981 + 2.982 + @code{\begin@{@}} や @code{\end@{@}} の行にカーソルを合わせ、 2.983 + 2.984 +@table @kbd 2.985 +@item [prefix] g 2.986 + @dots{} 対応するオブジェクトにジャンプ 2.987 +@end table 2.988 + 2.989 +@noindent 2.990 +を押すことにより、対応する@code{end/begin}の行にジャンプします。もちろん対 2.991 +応するものがない場合はエラーになります。またこれは、領域固定のための 2.992 +@code{%#BEGIN} と @code{%#END} のペアに対しても使えます。 2.993 +@xref{%#記法} 2.994 + 2.995 + メインの .tex ファイルの @code{\include{chap1}} などにカーソルを合わせ、 2.996 +@kbd{[prefix] g} を押すと、@file{chap1.tex} にジャンプします。また、 2.997 +@file{chap1.tex}のようなサブファイルで、 2.998 + 2.999 +@table @kbd 2.1000 +@item [prefix] ^ 2.1001 + @dots{} メインファイルにジャンプ 2.1002 +@item [prefix] 4 ^ 2.1003 + @dots{} 別ウィンドウでメインファイルにジャンプ 2.1004 +@end table 2.1005 + 2.1006 +@noindent 2.1007 +を押すと、メインファイルの編集バッファに切替えます。もし、メインファイルを 2.1008 +オープンしていない場合は、カレントディレクトリから探して自動的にオープンし 2.1009 +ます。さらに現在の環境を単位として機能するコマンドに以下のものがあります。 2.1010 + 2.1011 +@table @kbd 2.1012 +@item M-C-a 2.1013 + @dots{} 環境の先頭(@code{\begin})へジャンプ 2.1014 +@item M-C-e 2.1015 + @dots{} 環境の末尾(@code{\end})へジャンプ 2.1016 +@item M-C-@@ 2.1017 + @dots{} 環境全体をマーク 2.1018 +@end table 2.1019 +@cindex 環境の先頭へ[かんきょうのせんとうへ] 2.1020 +@cindex 環境の末尾へ[かんきょうのまつびへ] 2.1021 +@cindex 環境をマーク[かんきょうをまーく] 2.1022 +@cindex M-C-a 2.1023 +@cindex M-C-e 2.1024 +@cindex M-C-@@ 2.1025 + 2.1026 +上記のコマンドは通常の@kbd{[prefix]}キーではなく@kbd{META}キーをプリフィク 2.1027 +スとして機能するのでご注意下さい。 2.1028 + 2.1029 +@node Modifying/Deleting - 変更/削除, Filling item - itemの桁揃え, Cursor jump - カーソルジャンプ, Top 2.1030 +@comment node-name, next, previous, up 2.1031 +@chapter 変更/削除 2.1032 +@cindex 変更/削除[へんこう/さくじょ] 2.1033 +@cindex prefix c 2.1034 +@cindex prefix k 2.1035 + 2.1036 + 既に入力されている La@TeX{} コマンドの変更/削除のために以下の機能が用意 2.1037 +されています。 2.1038 + 2.1039 +@table @kbd 2.1040 +@item [prefix] c 2.1041 + @dots{} カーソル位置の La@TeX{} コマンドの変更 2.1042 +@item [prefix] k 2.1043 + @dots{} カーソル位置の La@TeX{} コマンドの削除 2.1044 +@end table 2.1045 + 2.1046 +@noindent 2.1047 +これらのコマンドは、コマンドを起動する場所によって動作を決定するので注意し 2.1048 +て下さい。 2.1049 + 2.1050 +@kbd{[prefix] c} は、@code{\begin@{@}} または @code{\end@{@}} のある場所で 2.1051 +起動すると、環境名の変更を行います。@kbd{[prefix] k} は起動する位置により 2.1052 +次のような動作を行います。 2.1053 +@cindex 環境名の変更[かんきょうめいのへんこう] 2.1054 +@cindex 環境の削除[かんきょうのさくじょ] 2.1055 + 2.1056 + 2.1057 +@example 2.1058 +起動位置 動作 2.1059 +\begin\endの行 @code{\begin\end}ペアの削除 2.1060 +%BEGIN, %END の行 %BEGIN,%ENDペアの削除 2.1061 +section型コマンドの上(中) section型コマンドの削除 2.1062 +フォント指定括弧の上 フォント指定の削除 2.1063 +括弧の上 対をなす括弧の削除 2.1064 +@end example 2.1065 + 2.1066 +@noindent 2.1067 +上記のものはすべて本文を囲う「容器」を削除するように働きますが、 2.1068 +universal-argument (@kbd{C-u}) を打った後で@kbd{[prefix] k}をタイプすると、 2.1069 +それぞれの「容器」に含まれる「中身」も一気に削除します。以下の例を参考にし 2.1070 +て下さい。 2.1071 + 2.1072 +@example 2.1073 + 元のテキスト: [prefix] k C-u [prefix] k 2.1074 + 本文\footnote@{脚注@}です。 本文脚注です。 本文です。 2.1075 + ↑(カーソル位置) 2.1076 +@end example 2.1077 + 2.1078 +@node Filling item - itemの桁揃え, Local dictionary - ローカル辞書(神経質な人へ), Modifying/Deleting - 変更/削除, Top 2.1079 +@comment node-name, next, previous, up 2.1080 +@chapter itemの桁揃え 2.1081 +@cindex itemの桁揃え[itemのけたぞろえ] 2.1082 +@cindex prefix i 2.1083 + 2.1084 + itemize 環境中にある@code{\item}の項目(文章)が複数行に渡る場合に、項 2.1085 +目の先頭を桁揃えしたい場合には、 2.1086 + 2.1087 +@table @kbd 2.1088 +@item [prefix] i 2.1089 + @dots{} itemの桁揃え 2.1090 +@end table 2.1091 + 2.1092 +@noindent 2.1093 +によって、その item のインデントの深さに応じて fill されます。なお、NTT 2.1094 +jTeX を使用している場合には、Lisp 変数@code{NTT-jTeX}を@code{t}にセットし 2.1095 +て下さい。 2.1096 +@cindex NTT-jTeX[えぬてぃーてぃーじぇーてっく] 2.1097 + 2.1098 + このとき、変数@code{YaTeX-item-regexp}の値(標準では @code{"\\\\item"})を 2.1099 +項目指定コマンドの正規表現として検索に使用します。itemize 環境で、独自のコ 2.1100 +マンドを定義して項目を列挙している場合(例えば@code{\underlineitem})は、 2.1101 +@file{~/.emacs} で次のように指定して下さい。 2.1102 +@cindex YaTeX-item-regexp 2.1103 + 2.1104 +@lisp 2.1105 + (setq YaTeX-item-regexp 2.1106 + "\\(\\\\item\\)\\|\\(\\\\underlineitem\\)") 2.1107 +@end lisp 2.1108 + 2.1109 +@noindent 2.1110 +この変数の指定の仕方がよく分からない場合は、独自の項目列挙コマンドの名前を 2.1111 +@code{@code{"\item"}で始まるものにして下さい(例えば"\itembf"})。 2.1112 + 2.1113 +@node Local dictionary - ローカル辞書(神経質な人へ), Includeonly - 勝手にincludeonly, Filling item - itemの桁揃え, Top 2.1114 +@comment node-name, next, previous, up 2.1115 +@chapter 神経質な人へ 2.1116 +@cindex ローカル辞書[ろーかるじしょ] 2.1117 +@cindex 神経質な人へ[しんけいしつなひとへ] 2.1118 +@cindex .yatexrc 2.1119 +@cindex へんなたんご[へんなたんご] 2.1120 + 2.1121 + 補完入力で間違った単語を入れてしまい、@file{.yatexrc} に変な単語が記録さ 2.1122 +れるのが気になってしまって、もはや編集に集中できないあなた。学習させたコマ 2.1123 +ンドは、今書いている文書中で定義しているローカルなものなので、やはり標準の 2.1124 +@file{.yatexrc} には保存して欲しくない、と思ったことのあるあなた。そんなあ 2.1125 +なたは、@file{~/.emacs} に次の一行を足してください。 2.1126 + 2.1127 +@lisp 2.1128 + (setq YaTeX-nervous t) 2.1129 +@end lisp 2.1130 +@cindex YaTeX-nervous 2.1131 + 2.1132 + 通常の、@file{yatex.el} に組み込まれた「標準テーブル」と 2.1133 +@file{~/.yatexrc} に保存される「ユーザテーブル」に加え、「一時テーブル」が 2.1134 +使えるようになります。これら補完テーブルにない単語を入れた時に、ユーザテー 2.1135 +ブル(UserTable)、その日だけ有効な一時テーブルに保存するか(TempTable)、覚え 2.1136 +ずに捨てる(None)かが選べるようになります。 2.1137 + 2.1138 + ところが、卒論などのように長期に渡って書く大きなものになると、その論文で 2.1139 +定義しているローカルなコマンドであっても「その日だけ」ではなく、その論文を 2.1140 +書いている間は補完してもらいたいものです。そんなときは、上記の変数 2.1141 +@code{YaTeX-nervous} を@code{t}にセットしたうえで、その論文を置いているディ 2.1142 +レクトリに@file{.yatexrc}(ユーザ辞書と同じ名前で中身は空)を作ってください。 2.1143 +すると、そのファイルをローカル辞書として一時テーブルの内容を保存するために 2.1144 +用います。以後、このローカル辞書の存在するディレクトリのファイルを編集する 2.1145 +時のみ、その辞書に含まれる補完候補が有効になります。 2.1146 + 2.1147 +@node Includeonly - 勝手にincludeonly, Where am I? - 今はどこ?, Local dictionary - ローカル辞書(神経質な人へ), Top 2.1148 +@comment node-name, next, previous, up 2.1149 +@chapter 勝手にincludeonly 2.1150 +@cindex 勝手にincludeonly[かってにincludeonly] 2.1151 +@cindex includeonly 2.1152 + 2.1153 + ファイルを分割して文章を入力している時には、メインファイル中に 2.1154 + 2.1155 +@example 2.1156 + \includeonly@{現在編集中のファイル名@} 2.1157 +@end example 2.1158 + 2.1159 +@noindent 2.1160 +のように書いておくことで、タイプセットの時間を節約できますが、ちょっと他の 2.1161 +ファイルを手直ししたい時には 2.1162 +@cindex 他のファイルの手直し[ほかのふぁいるのてなおし] 2.1163 + 2.1164 +@example 2.1165 + \includeonly@{ちょっと手直ししたいファイル名@} 2.1166 +@end example 2.1167 + 2.1168 +@noindent 2.1169 +と書き直さなければなりませんが、野鳥では現在編集しているファイル名がメイン 2.1170 +ファイルの@code{\includeonly}にない場合には自動的にこれを検出し、次の指示 2.1171 +を仰ぎます。 2.1172 + 2.1173 +@example 2.1174 + A)dd R)eplace %)comment? 2.1175 +@end example 2.1176 + 2.1177 +@noindent 2.1178 +現在編集中のファイルを @code{\includeonly} のリストに加えたい時には@kbd{a} 2.1179 +を、現在編集中のファイルだけを @code{\includeonly} にしたい時は@kbd{R}を、 2.1180 +@code{\includeonly} の行をコメントアウトして無効化したい時には、@kbd{%}を 2.1181 +それぞれ押して下さい。 2.1182 + 2.1183 +@node Where am I? - 今はどこ?, Online help - オンラインヘルプ, Includeonly - 勝手にincludeonly, Top 2.1184 +@comment node-name, next, previous, up 2.1185 +@chapter 今はどこ? 2.1186 +@cindex 今はどこ?[いまはどこ] 2.1187 +@cindex prefix & 2.1188 +@cindex 複雑なtabular[ふくざつなtabular] 2.1189 + 2.1190 + 項目数の多い tabular などをたくさん書いていると下の方の行で、いま書いて 2.1191 +いる桁がどこに対応するのかわからなくなってしまうことがあります。例えば、以 2.1192 +下のような tabular において、 2.1193 + 2.1194 +@example 2.1195 + \begin@{tabular@}{|c|c|c|c|c|c|c|c|}\hline 2.1196 + 氏名&所属&〒&住所&電話&FAX&帰省先&帰省先電話\\ \hline 2.1197 + 矢上二郎 & 6 & 223 & 横浜市港北区日吉 & xxx-yyy & 2.1198 + zzz-www & トンガ & 9876-54321 \\ 2.1199 + 日吉小僧 & 2 & \multicolumn@{2@}@{c|@}@{教えない@} 2.1200 + &&&(???) 2.1201 + \\ \hline 2.1202 + \end@{tabular@} 2.1203 +@end example 2.1204 + 2.1205 +@noindent 2.1206 +(???)の部分がどの項目なのかすぐに判断するのは難しいでしょう。こんな時は、 2.1207 + 2.1208 +@table @kbd 2.1209 +@item [prefix] & 2.1210 + @dots{} 現在のカラム表示 2.1211 +@end table 2.1212 +@cindex 現在のカラム表示[げんざいのからむひょうじ] 2.1213 + 2.1214 +を押すとカーソル位置のカラムがどの項目に該当するかをミニバッファに表示しま 2.1215 +す。tabular/array環境の第1行目を項目名の並びとみなして対応するものを探しま 2.1216 +す。もし項目名として別のものを与えたい場合は、行頭を@code{%}にしてダミーの 2.1217 +項目並びを作っておくと良いでしょう。 2.1218 + 2.1219 +@node Online help - オンラインヘルプ, Cooperation with other packages - 他パッケージとの連携, Where am I? - 今はどこ?, Top 2.1220 +@comment node-name, next, previous, up 2.1221 +@chapter オンラインヘルプ 2.1222 +@cindex オンラインヘルプ[おんらいんへるぷ] 2.1223 +@cindex apropos 2.1224 +@cindex キーワード検索[きーわーどけんさく] 2.1225 +@cindex prefix ? 2.1226 +@cindex prefix / 2.1227 + 2.1228 + 使おうとする La@TeX{} コマンドの用法がよく分からない時は、オンラインヘル 2.1229 +プをひきましょう。ヘルプに関するキーには以下のものがあります。 2.1230 + 2.1231 +@table @kbd 2.1232 +@item [prefix] ? 2.1233 + @dots{} オンラインヘルプ 2.1234 +@item [prefix] / 2.1235 + @dots{} オンラインapropos 2.1236 +@end table 2.1237 + 2.1238 +@section オンラインヘルプ 2.1239 +@cindex グローバルヘルプ[ぐろーばるへるぷ] 2.1240 +@cindex プライベートヘルプ[ぷらいべーとへるぷ] 2.1241 + 2.1242 + 「オンラインヘルプ」は、一般的な La@TeX{} コマンド(デフォルトでカーソル 2.1243 +位置のコマンド)に対する説明を隣のバッファに表示します。この時参照されるヘ 2.1244 +ルプ用ファイルには「グローバルヘルプ」と「プライベートヘルプ」の二種類があ 2.1245 +り、前者は La@TeX{} の標準コマンドの主なものの説明を含むファイルで、変数 2.1246 +@code{YaTeX-help-file}の値で指定されます。このファイルは通常公共の場所(デ 2.1247 +フォルトで@code{$EMACSEXECPATH})に置かれ、誰もがその内容を更新できるように 2.1248 +全員に書き込み権が与えられるべきものです。後者は、非標準もしくは個人的なマ 2.1249 +クロ定義に関する説明が書かれているファイルで、変数 2.1250 +@code{YaTeX-help-file-private}の値で指定されます。こちらはユーザのホームディ 2.1251 +レクトリの下などに置かれます。 2.1252 +@cindex YaTeX-help-file 2.1253 +@cindex YaTeX-help-file-private 2.1254 + 2.1255 +@section オンラインapropos 2.1256 + 2.1257 + 「オンラインapropos」は GNU Emacs の apropos と同様、ユーザが指定したキー 2.1258 +ワードを説明文に含む項目すべてを隣のバッファに表示します。 2.1259 + 2.1260 + もし、調べようとしたLa@TeX{}コマンドに対する説明がヘルプファイル中に見つ 2.1261 +からなかった場合は、説明文の入力を求めてくるので、可能であれば参考書などを 2.1262 +調べてそのコマンドの説明を入力してください。もし、なにか標準的なコマンドに 2.1263 +対する説明を書いたならばぜひ私までその説明をお送り下さい。次回の配布に含め 2.1264 +たいと思います。 2.1265 + 2.1266 +@node Cooperation with other packages - 他パッケージとの連携, Customizations - カスタマイズ, Online help - オンラインヘルプ, Top 2.1267 +@comment node-name, next, previous, up 2.1268 +@chapter 他パッケージとの連携 2.1269 +@cindex 他パッケージとの連携[たぱっけーじとのれんけい] 2.1270 + 2.1271 +@section gmhist 2.1272 +@cindex gmhist 2.1273 +@cindex コマンドヒストリ[こまんどひすとり] 2.1274 +@cindex ヒストリ[ひすとり] 2.1275 + 2.1276 + @file{gmhist.el}と@file{gmhist-mh.el} をロードしている場合、プレヴューコ 2.1277 +マンドの入力(@kbd{[prefix] tp]})、印刷コマンドの入力(@kbd{[prefix] tl})の 2.1278 +時に独立したヒストリを利用できます。それぞれのプロンプトで、@kbd{M-p} を押 2.1279 +すと直前に利用したコマンド文字列をくり返し呼び出すことができます。 2.1280 + 2.1281 +@section min-out 2.1282 +@cindex min-out 2.1283 + 2.1284 + @file{min-out.el} (@code{outline-minor-mode}) と野鳥を組み合わせて使うこ 2.1285 +とももちろん可能です。設定の方法に関しては@file{yatexm-o.el}をご覧ください。 2.1286 + 2.1287 +@node Customizations - カスタマイズ, Etc - その他, Cooperation with other packages - 他パッケージとの連携, Top 2.1288 +@comment node-name, next, previous, up 2.1289 +@chapter カスタマイズ 2.1290 +@cindex カスタマイズ[かすたまいず] 2.1291 +@cindex キーアサイン[きーあさいん] 2.1292 + 2.1293 + 野鳥の動作を制御する種々の変数を独自に設定することにより、補完入 2.1294 +力を起動するキーアサインを変えたり、環境名の補完候補をさらに充実さ 2.1295 +せることなどができます。 2.1296 + 2.1297 +@menu 2.1298 +* Lisp variables - lisp 変数:: 2.1299 +* Add-in functions - 付加関数(アドイン関数):: 2.1300 +@end menu 2.1301 + 2.1302 +@node Lisp variables - lisp 変数, Add-in functions - 付加関数(アドイン関数), Customizations - カスタマイズ, Customizations - カスタマイズ 2.1303 +@comment node-name, next, previous, up 2.1304 +@section lisp 変数 2.1305 +@cindex prefixキー変更[prefixきーへんこう] 2.1306 + 2.1307 + 例えば prefix キーを @kbd{C-c} 以外のキーにしたい場合は、 2.1308 +@code{YaTeX-prefix }に prefix キーにしたいシンボルを定義してください。さら 2.1309 +に、「@kbd{C-c 英字}」というキーバインドは独自の関数が割り当ててあるので使 2.1310 +いたくない。このような時は、@code{YaTeX-inhibit-prefix-letter} を @code{t} 2.1311 +に設定することにより、@kbd{C-c 英字…}のバインドが全て、対応する@kbd{C-c 2.1312 +C-英字…}に変わります(ただし、begin型 large型補完の大文字起動によるリジョ 2.1313 +ン指定は可能なままです。これも無効にしたい場合は@code{t}ではなく 1 にセッ 2.1314 +トして下さい。)。 2.1315 + 2.1316 +@menu 2.1317 +* All customizable variables - カスタマイズ変数一覧:: 2.1318 +* Sample definitions - カスタマイズ変数設定例:: 2.1319 +* Hook variables - hook変数:: 2.1320 +* Hook file - hook用ファイル:: 2.1321 +@end menu 2.1322 + 2.1323 +@node All customizable variables - カスタマイズ変数一覧, Sample definitions - カスタマイズ変数設定例, Lisp variables - lisp 変数, Lisp variables - lisp 変数 2.1324 +@comment node-name, next, previous, up 2.1325 +@subsection カスタマイズ変数一覧 2.1326 +@cindex カスタマイズ変数一覧[かすたまいずへんすういちらん] 2.1327 + 2.1328 + yatex-mode における次の変数がカスタマイズ可能です。@file{~/.emacs} で 2.1329 +@code{setq} しておけば、そちらの定義が優先されます。括弧の中はデフォルト値 2.1330 +です。 2.1331 + 2.1332 +@table @samp 2.1333 +@item YaTeX-prefix 2.1334 + 2.1335 +yatex-mode 中のプリフィクスキー(@kbd{C-c}) 2.1336 + 2.1337 +@item YaTeX-inhibit-prefix-letter 2.1338 + 2.1339 +prefix キーの直後のキーバインドで@kbd{英字}のものを@kbd{C-英字}に変更 2.1340 +(@code{nil}) 2.1341 + 2.1342 +@item YaTeX-fill-prefix 2.1343 + 2.1344 +本文を書く時の行頭に挿入する接頭辞すなわち fill-prefix (@code{""(nil)}) 2.1345 + 2.1346 +@item YaTeX-open-lines 2.1347 + 2.1348 +\begin{環境}と\end{環境}のあいだの空白行数 (0) 2.1349 + 2.1350 +@item YaTeX-user-completion-table 2.1351 + 2.1352 +学習したLa@TeX{}コマンド保存ファイル名(@code{"~/.yatexrc"}) 2.1353 + 2.1354 +@item YaTeX-kanji-code 2.1355 + 2.1356 +文書を作成する時の漢字コード1=Shift JIS, 2=JIS, 3=EUC(2 (MS-DOSでは1)) 2.1357 + 2.1358 +@item YaTeX-item-regexp 2.1359 + 2.1360 +itemの桁揃えの時に用いる、itemの正規表現(@code{"\\\\item"}) 2.1361 + 2.1362 +@item tex-command 2.1363 + 2.1364 +La@TeX{}タイプセッタコマンド名 (@code{"jlatex"}) 2.1365 + 2.1366 +@item dvi2-command 2.1367 + 2.1368 +プレヴューアコマンド名(@code{"xdvi -geo +0+0 -s 4 -display (getenv"DISPLAY")"}) 2.1369 + 2.1370 +@item dviprint-command-format 2.1371 + 2.1372 +dviファイルの印刷に使われるコマンド式(@code{"dvi2ps %f %t %s | lpr"}) 2.1373 + 2.1374 +@item dviprint-from-format 2.1375 + 2.1376 +上の@code{%f}に相当する開始ページ指定書式、@code{%b} が開始ページ番号に変 2.1377 +わる(@code{"-f %b"}) 2.1378 + 2.1379 +@item dviprint-to-format 2.1380 + 2.1381 +@code{%t} に相当する終了ページ指定書式、@code{%e}が終了ページ番号に変わる 2.1382 +(@code{"-t %e"}) 2.1383 + 2.1384 +@item section-name 2.1385 + 2.1386 +最初のsection型補完の規定値(@code{"documentstyle"}) 2.1387 + 2.1388 +@item env-name 2.1389 + 2.1390 +最初のbegin型補完の規定値(@code{"document"}) 2.1391 + 2.1392 +@item fontsize-name 2.1393 + 2.1394 +最初のlarge型補完の規定値(@code{"large"}) 2.1395 + 2.1396 +@item single-command 2.1397 + 2.1398 +最初のmaketitle型補完の規定値(@code{"maketitle"}) 2.1399 +@item YaTeX-need-nonstop 2.1400 + 2.1401 +@code{\nonstopmode@{@}}を自動的に付加するか(@code{nil}) 2.1402 + 2.1403 +@item latex-warning-regexp 2.1404 + 2.1405 +latexコマンドの出力するウォーニング行の正規表現(@code{"line.* [0-9]*"}) 2.1406 + 2.1407 +@item latex-error-regexp 2.1408 + 2.1409 +同じくエラー行の正規表現(@code{"l\\.[1-9][0-9]*"}) 2.1410 + 2.1411 +@item latex-dos-emergency-message 2.1412 + 2.1413 +MS-DOS上で動作する latex コマンドが、エラーにより停止するとき出力するメッ 2.1414 +セージ (@code{"Emergency stop"}) 2.1415 + 2.1416 +@item latex-message-kanji-code 2.1417 + 2.1418 +jlatex コマンドの出力するメッセージの漢字コード.タイプセットバッファ 2.1419 +の出力が化ける時は、これを設定する(2, Nemacsでのみ有効) 2.1420 + 2.1421 +@item NTT-jTeX 2.1422 + 2.1423 +NTT-j@TeX{}使用時@code{t}にする(@code{nil}) 2.1424 + 2.1425 +@item YaTeX-item-regexp 2.1426 + 2.1427 +item化コマンドの正規表現(@code{"\\\\(sub\\)*item"}) 2.1428 + 2.1429 +@item YaTeX-nervous 2.1430 + 2.1431 +ローカル辞書を用いる時 @code{t} (@code{nil}) 2.1432 + 2.1433 +@item YaTeX-sectioning-regexp 2.1434 + 2.1435 +セクション区切り設定コマンドの正規表現 2.1436 +(@code{"part\\|chapter\\|\\(sub\\)*\\(section\\|paragraph\\)"}) 2.1437 + 2.1438 +@item YaTeX-fill-inhibit-environments 2.1439 + 2.1440 +fill を抑止する環境名のリスト(@code{'("verbatim" "tabular")}) 2.1441 + 2.1442 +@item YaTeX-uncomment-once 2.1443 + 2.1444 +領域uncommentで行頭の複数の@code{%}を全て削除するか(@code{nil}) 2.1445 + 2.1446 +@item YaTeX-close-paren-always 2.1447 + 2.1448 +開き括弧の入力で常に閉じ括弧を入力する(@code{t}) 2.1449 + 2.1450 +@item YaTeX-auto-math-mode 2.1451 + 2.1452 +数式モードの切り替えを自動的に行う。(@code{nil}) 2.1453 + 2.1454 +@item YaTeX-default-pop-window-height 2.1455 + 2.1456 +1画面の時にタイプセットバッファを初めて作成する時の高さ。数値で行数、数字 2.1457 +文字列でEmacsウィンドウに対する百分率(10)。 2.1458 + 2.1459 +@item YaTeX-help-file 2.1460 + 2.1461 +共用ヘルプファイル(@file{$EMACS/etc/YATEXHLP.jp}) 2.1462 + 2.1463 +@item YaTeX-help-file-private 2.1464 + 2.1465 +個人用ヘルプファイル(@file{"~/YATEXHLP.jp"}) 2.1466 + 2.1467 +@item YaTeX-no-begend-shortcut 2.1468 + 2.1469 +@kbd{[prefix] b ??} のショートカットを使わず、@kbd{[prefix] b} だけで補完 2.1470 +入力に入る(@kbd{nil}) 2.1471 +@end table 2.1472 + 2.1473 +@node Sample definitions - カスタマイズ変数設定例, Hook variables - hook変数, All customizable variables - カスタマイズ変数一覧, Lisp variables - lisp 変数 2.1474 +@comment node-name, next, previous, up 2.1475 +@subsection カスタマイズ変数設定例 2.1476 +@cindex 設定例[せっていれい] 2.1477 + 2.1478 + たとえば、prefix キーとして@kbd{ESC}を使用し、新たな補完候補を格納するファ 2.1479 +イルを、@file{~/src/emacs/yatexrc} にし、行頭の prefix をタブ文字一つに変 2.1480 +えたいときは、 2.1481 + 2.1482 +@lisp 2.1483 + (setq YaTeX-prefix "\e" 2.1484 + YaTeX-user-completion-table "~/src/emacs/yatexrc" 2.1485 + YaTeX-fill-prefix " ") 2.1486 +@end lisp 2.1487 + 2.1488 +@noindent 2.1489 +を @file{~/.emacs} に加えます。 2.1490 + 2.1491 +@node Hook variables - hook変数, Hook file - hook用ファイル, Sample definitions - カスタマイズ変数設定例, Lisp variables - lisp 変数 2.1492 +@comment node-name, next, previous, up 2.1493 +@subsection hook変数 2.1494 +@cindex hook変数[hook変数] 2.1495 +@cindex yatex-mode-hook 2.1496 +@cindex yatex-mode-load-hook 2.1497 + 2.1498 + また、hook 変数 @code{yatex-mode-hook}, @code{yatex-mode-load-hook} を用 2.1499 +意しています。すべての yatex-mode のバッファで作用させたいものは、 2.1500 +@code{yatex-mode-hook} に記述し、@file{yatex.el} をロードする時だけ作用さ 2.1501 +せたいものは@code{yatex-mode-load-hook} に記述します。例えば、 2.1502 +@code{outline-minor-mode} を利用する場合、それぞれのバッファで 2.1503 +@code{outline-minor-mode} を有効にしたいので、@code{yatex-mode-hook} を次 2.1504 +のように設定します。 2.1505 + 2.1506 +@lisp 2.1507 + (setq yatex-mode-hook 2.1508 + '(lambda () (outline-minor-mode t))) 2.1509 +@end lisp 2.1510 + 2.1511 +@noindent 2.1512 +逆に、独自のキー定義を行いたい時などは、@code{yatex-mode-load-hook} を利用 2.1513 +します。例えば、begin 型補完において、 document や、enumerate 以外の環境名 2.1514 +もショートカットキーで入れたいなどという時は、次のようにします。以下の例は、 2.1515 +@kbd{[prefix] ba} で @code{\begin@{abstract@}}, @code{\end@{abstract@}} を 2.1516 +挿入します。 2.1517 + 2.1518 +@lisp 2.1519 + (setq yatex-mode-load-hook 2.1520 + '(lambda() (YaTeX-define-begend-key "ba" "abstract"))) 2.1521 +@end lisp 2.1522 + 2.1523 +なお、新たなキーの定義には、関数 @code{YaTeX-define-key} 2.1524 +@code{YaTeX-define-begend-key}を利用するようにしてください。 2.1525 + 2.1526 +@node Hook file - hook用ファイル, , Hook variables - hook変数, Lisp variables - lisp 変数 2.1527 +@comment node-name, next, previous, up 2.1528 +@subsection hook用ファイル 2.1529 + 2.1530 + 変数 @code{yatex-mode-load-hook} で定義する内容が多い時は、 2.1531 +@file{yatexhks.el}というファイルを作り、その中に野鳥関連の設定を書く事で、 2.1532 +初期化の時に自動的にロードします。 2.1533 + 2.1534 + 2.1535 +@node Add-in functions - 付加関数(アドイン関数), , Lisp variables - lisp 変数, Customizations - カスタマイズ 2.1536 +@comment node-name, next, previous, up 2.1537 +@section 付加関数(アドイン関数) 2.1538 + 2.1539 + 各種補完時に、環境名やコマンド名に応じたきめ細やかな補完入力機能を実現す 2.1540 +るための関数を作成することができます。この関数の作成方法や、組み込み方法に 2.1541 +関しては、@code{yatexadd.doc} をご覧ください。 2.1542 + 2.1543 +@node Etc - その他, Copying - 取り扱い, Customizations - カスタマイズ, Top 2.1544 +@comment node-name, next, previous, up 2.1545 +@chapter その他 2.1546 + 2.1547 + 野鳥の標準の La@TeX{} コマンドの辞書には、作者が頻繁に使うものしか登録さ 2.1548 +れていません。これは、補完候補に使いそうもないコマンドが存在して、補完した 2.1549 +いコマンドを出すまでのストローク数を増やしてしまう事を防止するためです。標 2.1550 +準辞書にないコマンドも、できるだけ補完入力方式を利用し、ユーザ辞書を充実さ 2.1551 +せることで、あなたの La@TeX{} スタイルにあった野鳥へと育っていくことでしょ 2.1552 +う。 2.1553 + 2.1554 +@node Copying - 取り扱い, , Etc - その他, Top 2.1555 +@comment node-name, next, previous, up 2.1556 +@chapter 取り扱い 2.1557 + 2.1558 + 本プログラムはフリーソフトウェアです。本プログラムを使用して生じたいかな 2.1559 +る結果に対しても作者は責任を負わないこととします。転載等に関しては制限いた 2.1560 +しません。常識的に扱ってください。また、使用している旨をメイルでお知らせい 2.1561 +ただくと、作者は喜んでサポートに励むことでしょう(ほんとか)。 2.1562 + 2.1563 + 苦情、希望、バグ報告、感想等、作者が本プログラムに興味を持ってい 2.1564 +る間に限り受け付けます。連絡は pcs39334@@asciinet.or.jp または、 2.1565 +yuuji@@ae.keio.ac.jpまで(1995年3月現在)。 2.1566 + 2.1567 +仕様は、予告なく確実に(気分次第で)変更されます:-p。 2.1568 + 2.1569 +@flushright 2.1570 +広瀬雄二 2.1571 +@end flushright 2.1572 + 2.1573 +@bye 2.1574 + 2.1575 +@c Local Variables: 2.1576 +@c fill-column: 74 2.1577 +@c fill-prefix: nil 2.1578 +@c End: 2.1579 + 2.1580 +Tag table: 2.1581 + 2.1582 +End tag table