yatex
diff docs/yatexe @ 83:680d92784c1a
Initial revision
author | yuuji |
---|---|
date | Sun, 27 Sep 2009 13:04:14 +0000 |
parents | |
children | 590fc51462c7 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docs/yatexe Sun Sep 27 13:04:14 2009 +0000 1.3 @@ -0,0 +1,2137 @@ 1.4 +Info file: yatexe, -*-Text-*- 1.5 +produced by `texinfo-format-buffer' 1.6 +from file `yatexe.tex' 1.7 +using `texinfmt.el' version 2.32 of 19 November 1993. 1.8 + 1.9 + 1.10 + 1.11 + 1.12 + 1.13 +File: yatexe, Node: Top, Next: What is YaTeX?, Prev: (dir), Up: (dir) 1.14 + 1.15 +* Menu: 1.16 + 1.17 +* What is YaTeX?:: 1.18 +* Main features:: What YaTeX can do 1.19 +* Installation:: Guide to install 1.20 +* Typesetting:: Call typesetting processes 1.21 +* %#notation:: Meta-keyword `%#' 1.22 +* Completion:: Input LaTeX commands with completion 1.23 +* Local dictionaries:: Directory dependent completion 1.24 +* Commenting out:: Commenting/uncommenting text 1.25 +* Cursor jump:: Jumping to related position 1.26 +* Changing and Deleting:: Changing/deleting certain unit of text 1.27 +* Filling:: Filling an item or paragraph 1.28 +* Updation of includeonly:: Free from maintaining includeonly 1.29 +* What column:: Check what table-column the cursor belong 1.30 +* Intelligent newline:: Guess requisites of new line 1.31 +* Usepackage checker:: Selecting correct \usepackage is YaTeX's job 1.32 +* Online help:: On-line documentation of LaTeX 1.33 +* Browsing file hierarchy:: Walking through file hierarchy 1.34 +* Cooperation with other packages:: Work well with gmhist, min-out 1.35 +* Customizations:: How to breed `Wild Bird' 1.36 +* Etcetera:: YaTeX is acquisitive. 1.37 +* Copying:: Redistribution 1.38 + 1.39 + 1.40 + 1.41 +File: yatexe, Node: What is YaTeX?, Next: Main features, Prev: Top, Up: Top 1.42 + 1.43 +What is YaTeX? 1.44 +************** 1.45 + 1.46 + YaTeX automates typesetting and previewing of LaTeX and enables 1.47 +completing input of LaTeX mark-up command such as 1.48 +`\begin{}'..`\end{}'. 1.49 + 1.50 + YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi 1.51 +Language Enhancement to GNU Emacs), and latex on DOS. 1.52 + 1.53 + 1.54 +File: yatexe, Node: Main features, Next: Installation, Prev: What is YaTeX?, Up: Top 1.55 + 1.56 +Main features 1.57 +************* 1.58 + 1.59 + * Invocation of typesetter, previewer and related programs(`C-c t') 1.60 + * Typesetting on static region which is independent from point 1.61 + * Semiautomatic replacing of `\includeonly' 1.62 + * Jumping to error line(`C-c '') 1.63 + * Completing-read of LaTeX commands such as `\begin{}', 1.64 + `\section' etc. 1.65 + (`C-c b', `C-c s', `C-c l', `C-c m') 1.66 + * Enclosing text into LaTeX environments or commands 1.67 + (`C-u' ABOVEKEYSTROKES) 1.68 + * Displaying the structure of text at entering sectioning commands 1.69 + * Lump shifting of sectioning commands (*Note view-sectioning::) 1.70 + * Learning unknown/new LaTeX commands for the next completion 1.71 + * Argument reading with a guide for complicated LaTeX commands 1.72 + * Generating argument-readers for new/unsupported commands(`yatexgen') 1.73 + * Quick changing or deleting of LaTeX commands(`C-c c', `C-c k') 1.74 + * Jumping from and to inter-file, begin<->end, ref<->label(`C-c g') 1.75 + * Blanket commenting out or uncommenting 1.76 + (`C-c >', `C-c <', `C-c ,', `C-c .') 1.77 + * Easy input of accent mark, math-mode's commands and Greek letters 1.78 + (`C-c a', `;', `:') 1.79 + * Online help for the popular LaTeX commands 1.80 + (`C-c ?', `C-c /') 1.81 + * Document files hierarchy browser (`C-c d') 1.82 + * Adding automatically \usepackage corresponding to inputting LaTeX 1.83 + macro with completion 1.84 + * Allow you to forget creating \label{}s, \ref or \cite completion 1.85 + automatically generate labels. 1.86 + 1.87 + 1.88 +File: yatexe, Node: Installation, Next: Typesetting, Prev: Main features, Up: Top 1.89 + 1.90 +Installation 1.91 +************ 1.92 + 1.93 + Put next two expressions into your `~/.emacs'. 1.94 + 1.95 + (setq auto-mode-alist 1.96 + (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) 1.97 + (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) 1.98 + 1.99 +Next, add certain path name where you put files of YaTeX to your 1.100 +load-path. If you want to put them in `~/src/emacs', write 1.101 + 1.102 + (setq load-path 1.103 + (cons (expand-file-name "~/src/emacs") load-path)) 1.104 + 1.105 +in your `~/.emacs' 1.106 + 1.107 + Then, yatex-mode will be automatically loaded when you visit a 1.108 +file which has extension `.tex'. If yatex-mode is successfully 1.109 +loaded, mode string on mode line will be turned to "YaTeX". 1.110 + 1.111 + 1.112 + 1.113 +File: yatexe, Node: Typesetting, Next: %#notation, Prev: Installation, Up: Top 1.114 + 1.115 +Typesetting 1.116 +*********** 1.117 + 1.118 + The prefix key stroke of yatex-mode is `C-c' (Press 'C' with Control 1.119 +key) by default. If you don't intend to change the prefix key stroke, 1.120 +assume all `[prefix]' as `C-c' in this document. These key 1.121 +strokes execute typeset or preview command. 1.122 + 1.123 +`[prefix] t j' 1.124 + ... invoke latex 1.125 +`[prefix] t r' 1.126 + ... invoke latex on region 1.127 +`[prefix] t k' 1.128 + ... kill current typesetting process 1.129 +`[prefix] t b' 1.130 + ... invoke bibtex 1.131 +`[prefix] t p' 1.132 + ... preview 1.133 +`[prefix] t l' 1.134 + ... lpr dvi-file 1.135 +`[prefix] t s' 1.136 + ... search current string on xdvi-remote 1.137 + 1.138 +* Menu: 1.139 + 1.140 +* Calling typesetter:: 1.141 +* Calling previewer:: 1.142 +* Printing out:: 1.143 + 1.144 + 1.145 +File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting 1.146 + 1.147 +Calling typesetter 1.148 +================== 1.149 + 1.150 + Typing `[prefix] t j', the current editing window will be divided 1.151 +horizontally when you invoke latex command, and log message of LaTeX 1.152 +typesetting will be displayed in the other window; called typesetting 1.153 +buffer. The typesetting buffer automatically scrolls up and traces LaTeX 1.154 +warnings and error messages. If you see latex stopping by an error, you 1.155 +can send string to latex in the typesetting buffer. 1.156 + 1.157 + If an error stops the LaTeX typesetting, this key stroke will move the 1.158 +cursor to the line where LaTeX error is detected. 1.159 + 1.160 +`[prefix] '' 1.161 +`([prefix]+single quotation)' 1.162 + 1.163 + ... jump to the previous error or warning 1.164 + 1.165 + If you find a noticeable error, move to the typesetting buffer and move 1.166 +the cursor on the line of error message and type `SPACE' key. This makes 1.167 +the cursor move to corresponding source line. 1.168 + 1.169 + Since `[prefix] tr' pastes the region into the file `texput.tex' in the 1.170 +current directory, you should be careful of overwriting. The method of 1.171 +specification of the region is shown in the section *Note %#notation::. 1.172 + 1.173 + The documentclass for typeset-region is the same as that of editing file 1.174 +if you edit one file, and is the same as main file's if you edit splitting 1.175 +files. 1.176 + 1.177 + 1.178 +File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting 1.179 + 1.180 +Calling previewer 1.181 +================= 1.182 + 1.183 + `[prefix] t p' invokes the TeX previewer. And if you are using 1.184 +xdvi-remote, which can be controled from other terminals, `[prefix] t s' 1.185 +enables you to search current string at the cursor on the running xdvi 1.186 +window. 1.187 + 1.188 + 1.189 +File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting 1.190 + 1.191 +Printing out 1.192 +============ 1.193 + 1.194 + When you type `[preifx] t l', YaTeX asks you the range of dvi-printing 1.195 +by default. You can skip this by invoking it with universal-argument as 1.196 +follows: 1.197 + 1.198 + C-u [prefix] tl 1.199 + 1.200 + 1.201 +File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top 1.202 + 1.203 +%# notation 1.204 +*********** 1.205 + 1.206 + You can control the typesetting process by describing `%#' notations in 1.207 +the source text. 1.208 + 1.209 +* Menu: 1.210 + 1.211 +* Changing typesetter:: 1.212 +* Splitting input files:: 1.213 +* Static region for typesetting:: 1.214 +* Lpr format:: 1.215 +* Editing %# notation:: 1.216 + 1.217 + 1.218 +File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation 1.219 + 1.220 +To change the `latex' command or to split a source text. 1.221 +======================================================== 1.222 + 1.223 + To change the typesetting command, write 1.224 + 1.225 + %#!latex-big 1.226 + 1.227 +anywhere in the source text. This is useful for changing typesetter. 1.228 + 1.229 + 1.230 +File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation 1.231 + 1.232 +Splitting input files 1.233 +===================== 1.234 + 1.235 + And if you split the source text and edit subfile that should be 1.236 +included from main text. 1.237 + 1.238 + %#!latex main.tex 1.239 + 1.240 +will be helpful to execute latex on main file from sub text buffer. Since 1.241 +this command line after `%#!' will be sent to shell literally, next 1.242 +description makes it convenient to use ghostview as dvi-previewer. 1.243 + 1.244 + %#!latex main ; dvi2ps main.dvi > main 1.245 + 1.246 +Note that YaTeX assumes the component before the last period of the last 1.247 +word in this line as base name of the main LaTeX source. The `%f' 1.248 +notation in this line is replaced by main file name, and `%r' replaced by 1.249 +root name of main file name. If you specify `%f' or `%r', YaTeX always 1.250 +ask you the name of main file at the first typesetting. 1.251 + 1.252 + To make best use of the feature of inter-file jumping by `[prefix] g' 1.253 +(see *Note Cursor jump::), take described below into consideration. 1.254 + 1.255 + * You can put split texts in sub directory, but not in 1.256 + sub directory of sub directory. 1.257 + * In the main text, specify the child file name with relative path name 1.258 + such as \include{chap1/sub}, when you include the file in 1.259 + a sub-directory. 1.260 + * In a sub-text, write `%#!latex main.tex' even if `main.tex' 1.261 + is in the parent directory(not %#!latex ../main.tex). 1.262 + 1.263 + 1.264 +File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation 1.265 + 1.266 +Static region 1.267 +============= 1.268 + 1.269 + Typeset-region by `[prefix] tr' passes the region between point and mark 1.270 +to typesetting command by default. But when you want to typeset static 1.271 +region, enclose the region by `%#BEGIN' and `%#END' as follows. 1.272 + 1.273 + %#BEGIN 1.274 + TheRegionYouWantToTypesetManyTimes 1.275 + %#END 1.276 + 1.277 +This is the rule of deciding the region. 1.278 + 1.279 + 1. If there exists %#BEGIN before point, 1.280 + 1.281 + 1. If there exists %#END after %#BEGIN, 1.282 + * From %#BEGIN to %#END. 1.283 + 1.284 + 2. If %#END does not exist after %#BEGIN, 1.285 + * From %#BEGIN to the end of buffer. 1.286 + 1.287 + 2. If there does not exist %#BEGIN before point, 1.288 + * Between point and mark(standard method of Emacs). 1.289 + 1.290 + It is useful to write `%#BEGIN' in the previous line of \begin and 1.291 +`%#END' in the next line of \`end' when you try complex environment such 1.292 +as `tabular' many times. It is also useful to put only `%#BEGIN' alone at 1.293 +the middle of very long text. Do not forget to erase `%#BEGIN' `%#END' 1.294 +pair. 1.295 + 1.296 + 1.297 +File: yatexe, Node: Lpr format, Next: Editing %# notation, Prev: Static region for typesetting, Up: %#notation 1.298 + 1.299 +Lpr format 1.300 +========== 1.301 + 1.302 + Lpr format is specified by three Lisp variables. Here are the default 1.303 +values of them. 1.304 + 1.305 +`(1)dviprint-command-format' 1.306 + `"dvi2ps %f %t %s | lpr"' 1.307 +`(2)dviprint-from-format' 1.308 + `"-f %b"' 1.309 +`(3)dviprint-to-format' 1.310 + `"-t %e"' 1.311 + 1.312 + On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text, 1.313 +`%f' by contents of (2), %t by contents of (3). At these replacements, 1.314 +`%b' in (2) is also replaced by the number of beginning page, `%e' in (3) 1.315 +is replaced by the number of ending page. But `%f' and `%t' are ignored 1.316 +when you omit the range of print-out by `C-u [prefix] tl'. 1.317 + 1.318 + If you want to change this lpr format temporarily, put a command such as 1.319 +follows somewhere in the text: 1.320 + 1.321 + %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2 1.322 + 1.323 + And if you want YaTeX not to ask you the range of printing out, the next 1.324 +example may be helpful. 1.325 + 1.326 + %#LPR dvi2ps %s | lpr 1.327 + 1.328 + 1.329 +File: yatexe, Node: Editing %# notation, Prev: Lpr format, Up: %#notation 1.330 + 1.331 +Editing %# notation 1.332 +=================== 1.333 + 1.334 + To edit `%#' notation described above, type 1.335 + 1.336 +`[prefix] %' 1.337 + ... editing %# notation menu 1.338 + 1.339 +and select one of the entry of the menu as follows. 1.340 + 1.341 + !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR 1.342 + 1.343 +Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and 1.344 +`%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN' 1.345 +and `%#END' are automatically erased. 1.346 + 1.347 + 1.348 +File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top 1.349 + 1.350 +Completion 1.351 +********** 1.352 + 1.353 + YaTeX makes it easy to input the LaTeX commands. There are several 1.354 +kinds of completion type, begin-type, section-type, large-type, etc... 1.355 + 1.356 +* Menu: 1.357 + 1.358 +* Begin-type completion:: 1.359 +* Section-type completion:: 1.360 +* Large-type completion:: 1.361 +* Maketitle-type completion:: 1.362 +* Arbitrary completion:: 1.363 +* End completion:: 1.364 +* Accent completion:: 1.365 +* Image completion:: 1.366 +* Greek letters completion:: 1.367 + 1.368 + 1.369 +File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion 1.370 + 1.371 +Begin-type completion 1.372 +===================== 1.373 + 1.374 + "Begin-type completion" completes commands of `\begin{env}' ... 1.375 +`\end{env}'. All of the begin-type completions begin with this key 1.376 +sequence. 1.377 + 1.378 +`[prefix] b' 1.379 + ... start begin-type completion 1.380 + 1.381 +An additional key stroke immediately completes a frequently used LaTeX 1.382 +`\begin{}'...`\`end'{}' environment. 1.383 + 1.384 +`[prefix] b c' 1.385 + ... `\begin{center}...\end{center}' 1.386 +`[prefix] b d' 1.387 + ... `\begin{document}...\end{document}' 1.388 +`[prefix] b D' 1.389 + ... `\begin{description}...\end{description}' 1.390 +`[prefix] b e' 1.391 + ... `\begin{enumerate}...\end{enumerate}' 1.392 +`[prefix] b E' 1.393 + ... `\begin{equation}...\end{equation}' 1.394 +`[prefix] b i' 1.395 + ... `\begin{itemize}...\end{itemize}' 1.396 +`[prefix] b l' 1.397 + ... `\begin{flushleft}...\end{flushleft}' 1.398 +`[prefix] b m' 1.399 + ... `\begin{minipage}...\end{minipage}' 1.400 +`[prefix] b t' 1.401 + ... `\begin{tabbing}...\end{tabbing}' 1.402 +`[prefix] b T' 1.403 + ... `\begin{tabular}...\end{tabular}' 1.404 +`[prefix] b^T' 1.405 + ... `\begin{table}...\end{table}' 1.406 +`[prefix] b p' 1.407 + ... `\begin{picture}...\end{picture}' 1.408 +`[prefix] b q' 1.409 + ... `\begin{quote}...\end{quote}' 1.410 +`[prefix] b Q' 1.411 + ... `\begin{quotation}...\end{quotation}' 1.412 +`[prefix] b r' 1.413 + ... `\begin{flushright}...\end{flushright}' 1.414 +`[prefix] b v' 1.415 + ... `\begin{verbatim}...\end{verbatim}' 1.416 +`[prefix] b V' 1.417 + ... `\begin{verse}...\end{verse}' 1.418 + 1.419 + Any other LaTeX environments are made by completing-read of the Emacs 1.420 +function. 1.421 + 1.422 +`[prefix] b SPACE' 1.423 + ... begin-type completion 1.424 + 1.425 +The next message will show up in the minibuffer 1.426 + 1.427 + Begin environment(default document): 1.428 + 1.429 +by typing `[prefix] b'. Put the wishing environment with completion in 1.430 +the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the 1.431 +LaTeX source text. If the environment you want to put does not exist in 1.432 +the YaTeX completion table, it will be registered in the user completion 1.433 +table. YaTeX automatically saves the user completion table in the user 1.434 +dictionary file at exiting of emacs. 1.435 + 1.436 +At the completion of certain environments, the expected initial entry will 1.437 +automatically inserted such as `\item' for `itemize' environment. If you 1.438 +don't want the entry, it can be removed by undoing. 1.439 + 1.440 + If you want to enclose some paragraphs which have already been written, 1.441 +invoke the begin-type completion with changing the case of `b' of key 1.442 +sequence upper(or invoke it with universal argument by `C-u' prefix). 1.443 + 1.444 + The following example encloses a region with `description' environment. 1.445 + 1.446 +`[prefix] B D' 1.447 +`(or ESC 1 [prefix] b D)' 1.448 +`(or C-u [prefix] b D)' 1.449 + 1.450 + ... begin-type completion for region 1.451 + 1.452 + This enclosing holds good for the completing input by `[prefix] b SPC'. 1.453 +`[prefix] B SPC' enclose a region with the environment selected by 1.454 +completing-read. 1.455 + 1.456 + 1.457 +File: yatexe, Node: Section-type completion, Next: Large-type completion, Prev: Begin-type completion, Up: Completion 1.458 + 1.459 +Section-type completion 1.460 +======================= 1.461 + 1.462 + "Section-type completion" completes section-type commands which take an 1.463 +argument or more such as `\section{foo}'. To invoke section-type 1.464 +completion, type 1.465 + 1.466 +`[prefix] s' 1.467 + ... section-type completion 1.468 + 1.469 +then the prompt 1.470 + 1.471 + (C-v for view) \???{} (default documentclass): 1.472 + 1.473 +will show up in the minibuffer. Section-type LaTeX commands are completed 1.474 +by space key, and the default value is selected when you type nothing in 1.475 +the minibuffer. 1.476 + 1.477 + Next, 1.478 + 1.479 + \section{???}: 1.480 + 1.481 +prompts you the argument of section-type LaTeX command. For example, the 1.482 +following inputs 1.483 + 1.484 + \???{} (default documentclass): section 1.485 + \section{???}: Hello world. 1.486 + 1.487 +will insert the string 1.488 + 1.489 + \section{Hello world.} 1.490 + 1.491 +in your LaTeX source. When you neglect argument such as 1.492 + 1.493 + (C-v for view) \???{} (default section): vspace* 1.494 + \vspace*{???}: 1.495 + 1.496 +YaTeX puts 1.497 + 1.498 + \vspace*{} 1.499 + 1.500 +and move the cursor in the braces. 1.501 + 1.502 + In LaTeX command, there are commands which take more than one arguments 1.503 +such as `\addtolength{\topmargin}{8mm}'. To complete these commands, 1.504 +invoke section-type completion with universal argument as, 1.505 + 1.506 + C-u 2 [prefix] s (or ESC 2 [prefix] s) 1.507 + 1.508 +and make answers in minibuffer like this. 1.509 + 1.510 + (C-v for view) \???{} (default vspace*): addtolength 1.511 + \addtolength{???}: \topmargin 1.512 + Argument 2: 8mm 1.513 + 1.514 +`\addtolength' and the first argument `\topmargin' can be typed easily by 1.515 +completing read. Since YaTeX also learns the number of arguments of 1.516 +section-type command and will ask that many arguments in future 1.517 +completion, you had better tell the number of arguments to YaTeX at the 1.518 +first completion of the new word. But you can change the number of 1.519 +arguments by calling the completion with different universal argument 1.520 +again. 1.521 + 1.522 + 1.523 + Invoking section-type completion with `[Prefix] S' (Capital `S') 1.524 +includes the region as the first argument of section-type command. 1.525 + 1.526 + The section/large/maketitle type completion can work at the prompt for 1.527 +the argument of other section-type completion. Nested LaTeX commands are 1.528 +efficiently read with the recursive completion by typing YaTeX's 1.529 +completion key sequence in the minibuffer. 1.530 + 1.531 +* Menu: 1.532 + 1.533 +* view-sectioning:: 1.534 + 1.535 + 1.536 +File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion 1.537 + 1.538 +view-sectioning 1.539 +--------------- 1.540 + 1.541 + In the minibuffer at the prompt of section-type command completion, 1.542 +typing `C-v' shows a list of sectioning commands in source text(The line 1.543 +with `<<--' mark is the nearest sectioning command). Then, default 1.544 +sectioning command appears in the minibuffer. You can go up/down 1.545 +sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing 1.546 +buffer by `C-v'/`M-v', and can hide sectioning commands under certain 1.547 +level by 0 through 6. Type `?' in the minibuffer of sectioning prompt 1.548 +for more information. 1.549 + 1.550 + You can generate this listing buffer (`*Sectioning Lines*' buffer) by 1.551 +typing 1.552 +`M-x YaTeX-section-overview' 1.553 + ... Generate *Sectioning Lines* buffer 1.554 + 1.555 +from the LaTeX source buffer. In this listing buffer, typing `u' on the 1.556 +sectioning command shifts up the corresponding sectioning command in 1.557 +source text and `d' shifts down. After marking lines in the listing 1.558 +buffer, typing `U' shifts up all sectioning commands in the region, and 1.559 +`U' shifts down. Here are all the key bindings of `*Sectioning Lines*' 1.560 +buffer. 1.561 + 1.562 +`SPC' 1.563 + ... Jump to corresponding source line 1.564 +`.' 1.565 + ... Display corresponding source line 1.566 +`u' 1.567 + ... Shift up a sectioning line 1.568 +`d' 1.569 + ... Shift down a sectioning line 1.570 +`U' 1.571 + ... Shift up sectioning lines in region 1.572 +`D' 1.573 + ... Shift down sectioning lines in region 1.574 +`0...6' 1.575 + ... Hide sectioning commands whose level is lower than n 1.576 + 1.577 + 1.578 + 1.579 +File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Section-type completion, Up: Completion 1.580 + 1.581 +Large-type completion 1.582 +===================== 1.583 + 1.584 + "Large-type completion" inputs the font or size changing descriptions 1.585 +such as `{\large }'. When you type 1.586 + 1.587 +`[prefix] l' 1.588 + ... large-type completion 1.589 + 1.590 +the message in the minibuffer 1.591 + 1.592 + {\??? } (default large): 1.593 + 1.594 +prompts prompts you large-type command with completing-read. There are 1.595 +TeX commands to change fonts or sizes, `it', `huge' and so on, in the 1.596 +completion table. 1.597 + 1.598 + Region-based completion is also invoked by changing the letter after 1.599 +prefix key stroke as `[prefix] L'. It encloses the region by braces with 1.600 +large-type command. 1.601 + 1.602 + 1.603 +File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion 1.604 + 1.605 +Maketitle-type completion 1.606 +========================= 1.607 + 1.608 + We call it "maketitle-type completion" which completes commands such as 1.609 +`\maketitle'. Take notice that maketitle-type commands take no arguments. 1.610 +Then, typing 1.611 + 1.612 +`[prefix] m' 1.613 + ... maketitle-type completion 1.614 + 1.615 +begins maketitle-completion. Above mentioned method is true for 1.616 +maketitle-completion, and there are LaTeX commands with no arguments in 1.617 +completion table. 1.618 + 1.619 + 1.620 +File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion 1.621 + 1.622 +Arbitrary completion 1.623 +==================== 1.624 + 1.625 + You can complete certain LaTeX command anywhere without typical 1.626 +completing method as described, by typing 1.627 + 1.628 +`[prefix] SPC' 1.629 + ... arbitrary completion 1.630 + 1.631 +after the initial string of LaTeX command that is preceded by `\'. 1.632 + 1.633 + 1.634 +File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion 1.635 + 1.636 +End completion 1.637 +============== 1.638 + 1.639 + YaTeX automatically detects the opened environment and close it with 1.640 +\`\end{environment}'. Though proficient YaTeX users never fail to make 1.641 +environment with begin-type completion, some may begin an environment 1.642 +manually. In that case, type 1.643 + 1.644 +`[prefix] e' 1.645 + ... `end' completion 1.646 + 1.647 +at the end of the opened environment. 1.648 + 1.649 + 1.650 +File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion 1.651 + 1.652 +Accent completion 1.653 +================= 1.654 + 1.655 + When you want to write the European accent marks(like `\`{o}'), 1.656 + 1.657 +`[prefix] a' 1.658 + ... accent completion 1.659 + 1.660 +shows the menu 1.661 + 1.662 + 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b 1.663 + 1.664 +in the minibuffer. Chose one character or corresponding numeric, and you 1.665 +will see 1.666 + 1.667 + \`{} 1.668 + 1.669 +in the editing buffer with the cursor positioned in braces. Type one more 1.670 +character `o' for example, then 1.671 + 1.672 + \`{o} 1.673 + 1.674 +will be completed, and the cursor gets out from braces. 1.675 + 1.676 + 1.677 +File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion 1.678 + 1.679 +Image completion of mathematical sign 1.680 +===================================== 1.681 + 1.682 + Arrow marks, sigma mark and those signs mainly used in the TeX's math 1.683 +environment are completed by key sequences which imitate the corresponding 1.684 +symbols graphically. This completion only works in the math environment. 1.685 +YaTeX automatically detects whether the cursor located in math environment 1.686 +or not, and change the behavior of key strokes `;' and `:'. 1.687 + 1.688 + By the way, we often express the leftarrow mark by `<-' for example. 1.689 +Considering such image, you can write `\leftarrow' by typing `<-' after 1.690 +`;' (semicolon) as a prefix. In the same way, `\longleftarrow' (`<--') is 1.691 +completed by typing `;<--', infinity mark which is imitated by `oo' is 1.692 +completed by typing `;oo'. 1.693 + 1.694 + Here are the sample operations in YaTeX math-mode. 1.695 + 1.696 + INPUT Completed LaTeX commands 1.697 + ; < - `\leftarrow' 1.698 + ; < - - `\longleftarrow' 1.699 + ; < - - > `\longleftrightarrow' 1.700 + ; o `\circ' 1.701 + ; o o `\infty' 1.702 + 1.703 + In any case, you can quit from image completion and can move to the next 1.704 +editing operation if the LaTeX command you want is shown in the buffer. 1.705 + 1.706 + `;' itself in math-environment is inserted by `;;'. Typing `TAB' in the 1.707 +midst of image completion shows all of the LaTeX commands that start with 1.708 +the same name as string you previously typed in. In this menu buffer, 1.709 +press `RET' after moving the cursor (by `n', `p', `b', `f') to insert the 1.710 +LaTeX command. 1.711 + 1.712 + To know all of the completion table, type `TAB' just after `;'. And 1.713 +here is the sample menu by `TAB' after `;<'. 1.714 + 1.715 + KEY LaTeX sequence sign 1.716 + < \leq < 1.717 + ~ 1.718 + << \ll << 1.719 + <- \leftarrow <- 1.720 + <= \Leftarrow <= 1.721 + 1.722 + You can define your favorite key-vs-sequence completion table in the 1.723 +Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also 1.724 +`yatexmth.el' for the information of the structure of this variable. 1.725 + 1.726 + 1.727 +File: yatexe, Node: Greek letters completion, Prev: Image completion, Up: Completion 1.728 + 1.729 +Greek letters completion 1.730 +======================== 1.731 + 1.732 + Math-mode of YaTeX provides another image completion, Greek letters 1.733 +completion in the same method. After prefix `:', typing `a' makes 1.734 +`\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type 1.735 +`:TAB' to know all the correspondence of alphabets vs. Greek letters. 1.736 + 1.737 + If you will find `;' or `:' doesn't work in correct position of math 1.738 +environment, it may be a bug of YaTeX. Please send me a bug report with 1.739 +the configuration of your text, and avoid it temporarily by typing `;' or 1.740 +`:' after universal-argument(`C-u') which forces `;' and `:' to work as 1.741 +math-prefix. 1.742 + 1.743 + 1.744 +File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top 1.745 + 1.746 +Local dictionaries 1.747 +****************** 1.748 + 1.749 + Tables for completion consist of three dictionaries; `standard 1.750 +dictionary' built in `yatex.el', `user dictionary' for your common private 1.751 +commands, and `local dictionary' that is effective in a certain directory. 1.752 + 1.753 + When you input the command unknown to YaTeX at a completion in the 1.754 +minibuffer, YaTeX asks you with the following prompt; 1.755 + 1.756 + `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard 1.757 + 1.758 +In this menu, typing `u' updates your `user dictionary', `l' updates your 1.759 +local dictionary, `n' updates only on-memory dictionary which go through 1.760 +only current Emacs session, and `d' updates no dictionary and throws the 1.761 +new word away. 1.762 + 1.763 + If you find this switching feature meaningless and bothersome, put the 1.764 +next expression into your `~/.emacs' 1.765 + 1.766 + (setq YaTeX-nervous nil) 1.767 + 1.768 + 1.769 +File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top 1.770 + 1.771 +Commenting out 1.772 +************** 1.773 + 1.774 + You may want to comment out some region. 1.775 + 1.776 +`[prefix] >' 1.777 + ... comment out region by % 1.778 +`[prefix] <' 1.779 + ... uncomment region 1.780 + 1.781 +cause an operation to the region between point and mark. 1.782 + 1.783 +`[prefix] .' 1.784 + ... comment out current paragraph 1.785 +`[prefix] ,' 1.786 + ... uncomment current paragraph 1.787 + 1.788 +comments or uncomments the paragraph where the cursor belongs. This 1.789 +`paragraph' means the region marked by the function mark-paragraph, bound 1.790 +to `ESC h' by default. It is NOT predictable what will happen when you 1.791 +continuously comment out some paragraph many times. 1.792 + 1.793 + You can also comment out an environment between `\begin' and `\end', or 1.794 +a `\begin'-\`\end' pair themselves, by making the following key strokes on 1.795 +the line where `\begin{}' or `\end{}' exists. 1.796 + 1.797 +`[prefix] >' 1.798 + ... comment out from \begin to \`end' 1.799 +`[prefix] <' 1.800 + ... uncomment from \begin to \`end' 1.801 + 1.802 +comment whole the contents of environment. Moreover, 1.803 + 1.804 +`[prefix] .' 1.805 + ... comment out \begin and \`end' 1.806 +`[prefix] ,' 1.807 + ... uncomment \begin and \`end' 1.808 + 1.809 +(un)comments out only environment declaration: `\begin{}' and `\end{}'. 1.810 +NOTE that even if you intend to comment out some region, invoking 1.811 +`[prefix] >' on the `\begin',`\end' line decides to work in `commenting 1.812 +out from `\begin' to `\end'' mode. 1.813 + 1.814 + 1.815 + 1.816 +File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top 1.817 + 1.818 +Cursor jump 1.819 +*********** 1.820 + 1.821 + 1.822 +* Menu: 1.823 + 1.824 +* Jump to corresponding object:: 1.825 +* Invoking image processor:: 1.826 +* Jump to main file:: 1.827 +* Jumping around the environment:: 1.828 +* Jumping to last completion position:: 1.829 + 1.830 + 1.831 +File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump 1.832 + 1.833 +Jump to corresponding object 1.834 +============================ 1.835 + 1.836 + Typing 1.837 + 1.838 +`[prefix] g' 1.839 + ... go to corresponding object 1.840 + 1.841 +in a certain place move the cursor to the place corresponding to the LaTeX 1.842 +command of last place. YaTeX recognize the followings as pairs that have 1.843 +relation each other. 1.844 + 1.845 + * `\begin{}' <-> `\end{}' 1.846 + * `%#BEGIN' <-> `%#END' 1.847 + * On the image-including line -> corresponding viewer or drawing tool 1.848 + * `\label{}' <-> `\ref{}' 1.849 + * `\include(\input)' -> included file 1.850 + * `\bibitem{}' <-> `\cite{}' 1.851 + 1.852 + On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the 1.853 +corresponding `\end',`\begin' line, if its partner really exists. The 1.854 +behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the 1.855 +correspondent of `label/ref' or `cite/bibitem' exists in another file, 1.856 +that file have to be opened to make a round trip between references by 1.857 +`[prefix] g'. 1.858 + 1.859 + If you type `[prefix] g' on the line of `\include{chap1}', typically in 1.860 +the main text, YaTeX switches buffer to `chap1.tex'. 1.861 + 1.862 +`[prefix] 4 g' 1.863 + ... go to corresponding object in other window 1.864 + 1.865 +do the same job as `[prefix] g' except it's done in other window. Note 1.866 +that this function doesn't work on `begin/end', `%#BEGIN/%#END' pairs 1.867 +because it is meaningless. 1.868 + 1.869 + 1.870 +File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump 1.871 + 1.872 +Invoking image processor 1.873 +======================== 1.874 + 1.875 + 1.876 +`image-including line' described above means such lines as 1.877 +`\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX 1.878 +automatically searches source of `foo.ps' and invokes image viewer or 1.879 +drawing tool correspoinding to it. For example; if you draw an image 1.880 +foo.obj with Tgif and enclose its product named foo.eps by `\epsfile' 1.881 +command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif 1.882 +foo.obj'. How a processor is choosen is as follows. 1.883 + 1.884 + 1. If there is an expression matching with one of the pattern defined in 1.885 + `YaTeX-processed-file-regexp-alist', extract file name from regexp 1.886 + group surrounded by \\(\\). (Which group corresponds is written in 1.887 + the cdr part of each list.) If no matches were found, do nothing. 1.888 + 2. If there is a pattern as `%PROCESSOR' which is defined in the 1.889 + variable `YaTeX-file-processor-alist', call that processor giving the 1.890 + file name with corresponding extension. 1.891 + 3. If not, check the existence of each file which is supplied the 1.892 + extension in the cdr part of each list of 1.893 + `YaTeX-file-processor-alist'. If any, call the corresponding image 1.894 + viewer or drawing tool. 1.895 + 1.896 + 1.897 +File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump 1.898 + 1.899 +Jump to main file 1.900 +================= 1.901 + 1.902 + Typing 1.903 + 1.904 +`[prefix] ^' 1.905 + ... visit main file 1.906 +`[prefix] 4^' 1.907 + ... visit main file in other buffer 1.908 + 1.909 +in a sub text switch the buffer to the main text specified by `%#!' 1.910 +notation. 1.911 + 1.912 + 1.913 +File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump 1.914 + 1.915 +Jumping around the environment 1.916 +============================== 1.917 + 1.918 + And these are the functions which work on the current LaTeX environment: 1.919 + 1.920 +`M-C-a' 1.921 + ... beginning of environment 1.922 +`M-C-e' 1.923 + ... `end' of environment 1.924 +`M-C-@' 1.925 + ... mark environment 1.926 + 1.927 + 1.928 +File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump 1.929 + 1.930 +Jumping to last completion position 1.931 +=================================== 1.932 + 1.933 +YaTeX always memorize the position of completion into register `3'. So 1.934 +every time you make a trip to any other part of text other than you are 1.935 +writing, you can return to the editing paragraph by calling 1.936 +register-to-point with argument YaTeX-current-position-register, which is 1.937 +achieved by typing `C-x j 3'(by default). 1.938 + 1.939 + 1.940 +File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top 1.941 + 1.942 +Changing and Deleting 1.943 +********************* 1.944 + 1.945 + These functions are for change or deletion of LaTeX commands already 1.946 +entered. 1.947 + 1.948 +`[prefix] c' 1.949 + ... change LaTeX command 1.950 +`[prefix] k' 1.951 + ... kill LaTeX command 1.952 + 1.953 +* Menu: 1.954 + 1.955 +* Changing LaTeX commands:: 1.956 +* Killing LaTeX commands:: 1.957 + 1.958 + 1.959 +File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting 1.960 + 1.961 +Changing LaTeX commands 1.962 +======================= 1.963 + 1.964 +`[prefix] c' can change the various (La)TeX commands. This can change the 1.965 +followings. 1.966 + * Environment names 1.967 + * Section-type commands 1.968 + * Argument of section-type commands 1.969 + * Optional parameters (enclosed by []) of section-type commands 1.970 + * Font/size designators 1.971 + * Math-mode's maketitle-type commands that can be inputted with image 1.972 + completion 1.973 + 1.974 + Typing `[prefix] c' on one of above objects you want to change brings a 1.975 +suitable reading function sometimes with completion. Note: If you want to 1.976 +change the argument of section-type command that contains other LaTeX 1.977 +commands, type `[prefix] c' either of surrounding braces of the argument 1.978 +in order to make YaTeX ignore the internal LaTeX sequences as an object of 1.979 +changing. Anyway, it is very difficult to know which argument position 1.980 +the cursor belongs because the LaTeX commands can be nested and braces can 1.981 +freely emerge. So keep it mind to put the cursor on a brace when you are 1.982 +thinking of changing a complicated argument. 1.983 + 1.984 + 1.985 +File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting 1.986 + 1.987 +Killing LaTeX commands 1.988 +====================== 1.989 + 1.990 + `[prefix] k' kills the LaTeX commands sometimes with their arguments. 1.991 +Following table illustrates the correspondence of the invoking position 1.992 +and what is killed. 1.993 + 1.994 + [Invoking position] [action] 1.995 + \begin, \end line kill \begin,\end pairs 1.996 + %#BEGIN, %#END line kill %#BEGIN,%#END pairs 1.997 + on a Section-type command kill section-type command 1.998 + on a parenthesis kill parentheses 1.999 + 1.1000 +Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines 1.1001 +`\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take 1.1002 +care not to create any line that contains more than one `\begin' or so. 1.1003 + 1.1004 +While all operations above are to kill `containers' which surround some 1.1005 +text, universal argument (`C-u') for these commands kills not only 1.1006 +`containers' but also `contents' of them. See below as a sample. 1.1007 + 1.1008 + Original text: [prefix] k C-u [prefix] k 1.1009 + Main \footnote{note} here. Main note here. Main here. 1.1010 + ~(cursor) 1.1011 + 1.1012 + 1.1013 +File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top 1.1014 + 1.1015 +Filling 1.1016 +******* 1.1017 + 1.1018 + 1.1019 +Filling an item 1.1020 +=============== 1.1021 + 1.1022 + To fill a term (descriptive sentences) of `\item', type 1.1023 + 1.1024 +`M-q' 1.1025 + ... fill item 1.1026 + 1.1027 +on that item. 1.1028 + 1.1029 + YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular 1.1030 +expression to search item header in itemize environment. If you make a 1.1031 +newcommand to itemize terms(e.g. `\underlineitem'), put 1.1032 + 1.1033 + (setq YaTeX-item-regexp 1.1034 + "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)") 1.1035 + 1.1036 +in your `~/.emacs'. If you are not familiar with regular expression for 1.1037 +Emacs-Lisp, name a newcommand for `itemize' beginning with `\item' such as 1.1038 +`\itembf', not `\bfitem'. 1.1039 + 1.1040 + This function reformats the `\item' into `hang-indented' style. For 1.1041 +example: 1.1042 + 1.1043 + itemize, enumerate environment: 1.1044 + > 1.1045 + >\item[foo] `foo' is the typical word for describing an 1.1046 + > arbitrarily written.... 1.1047 + description environment: 1.1048 + > \item[bar] When the word `for' is used as an arbitrarily 1.1049 + > word, `bar' is bound to follow it. 1.1050 + 1.1051 + Note that the indent depth of an `\item' word and its descriptive 1.1052 +paragraph are the same in latter case. If you want to use different 1.1053 +depth, invoke fill-paragraph at the beginning of non-whitespace 1.1054 +character(see below). 1.1055 + 1.1056 + 1.1057 +Filling paragraph 1.1058 +================= 1.1059 + 1.1060 + Fill-paragraph is little bit adapted for LaTeX sources. It retains from 1.1061 +filling in certain environments where formatting leads to a disaster such 1.1062 +as verbatim, tabular, or so. And it protects `\verb' expressions from 1.1063 +being folded (The variable `YaTeX-verb-regexp' controls this). Besides, 1.1064 +putting cursor on the first occurrence of non-whitespace character on a 1.1065 +line changes the fill-prefix temporarily to the depth of the line. 1.1066 + 1.1067 + 1.1068 +File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top 1.1069 + 1.1070 +Updation of `\includeonly' 1.1071 +************************** 1.1072 + 1.1073 + When you edit splitting source texts, the notation 1.1074 + 1.1075 + \includeonly{CurrentEditingFileName} 1.1076 + 1.1077 +in the main file reduces the time of typesetting. If you want to hack 1.1078 +other file a little however, you have to rewrite it to 1.1079 + 1.1080 + \includeonly{OtherFileNameYouWantToFix} 1.1081 + 1.1082 +in the main file. YaTeX automatically detects that the current edited 1.1083 +text is not in includeonly list and prompts you 1.1084 + 1.1085 + A)dd R)eplace %)comment? 1.1086 + 1.1087 +in the minibuffer. Type `a' if you want to add the current file name to 1.1088 +`\includeonly' list, `r' to replace \`includeonly' list with the current 1.1089 +file, and type `%' to comment out the `\includeonly' line. 1.1090 + 1.1091 + 1.1092 +File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top 1.1093 + 1.1094 +What column? 1.1095 +************ 1.1096 + 1.1097 + We are often get tired of finding the corresponding column in large 1.1098 +tabulars. For example, 1.1099 + 1.1100 + \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline 1.1101 + Name&Position&Post No.&Addr.&Phone No.&FAX No.& 1.1102 + Home Addr.&Home Phone\\ \hline 1.1103 + Thunder Bird & 6 & 223 & LA & xxx-yyy & 1.1104 + zzz-www & Japan & 9876-54321 \\ 1.1105 + & 2 & \multicolumn{2}{c|}{Unknown} 1.1106 + &&&(???) 1.1107 + \\ \hline 1.1108 + \end{tabular} 1.1109 + 1.1110 +Suppose you have the cursor located at `(???)' mark, can you tell which 1.1111 +column it is belonging at once? Maybe no. In such case, type 1.1112 + 1.1113 +`[prefix] &' 1.1114 + ... What column 1.1115 + 1.1116 +in that position. YaTeX tells you the column header of the current field. 1.1117 +Since YaTeX assumes the first line of tabular environment as a row of 1.1118 +column headers, you can create a row of virtual column headers by putting 1.1119 +them in the first line and commenting that line with `%'. 1.1120 + 1.1121 + 1.1122 +File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top 1.1123 + 1.1124 +Intelligent newline 1.1125 +******************* 1.1126 + 1.1127 + At the end of begin-type completion of tabular[*], array, itemize, 1.1128 +enumerate or tabbing environment, or typing 1.1129 + 1.1130 +`ESC RET' 1.1131 + ... Intelligent newline 1.1132 + 1.1133 +in these environments inserts the contents corresponding to the current 1.1134 +environment in the next line. (At the begin-type completion, this 1.1135 +contents can be removed by `undo'.) In `tabular' environment, for 1.1136 +example, `ESC RET' inserts the certain number of `&' and trailing `\\', 1.1137 +and `\hline' if other `\hline' is found in backward. Here are the list of 1.1138 +contents vs. environments. 1.1139 + 1.1140 + * `tabular', `tabular*', `array' 1.1141 + 1.1142 + Corresponding number of `&' and `\\'. 1.1143 + And `\hline' if needed. 1.1144 + 1.1145 + * `tabbing' 1.1146 + 1.1147 + The same number of `\>' as `\=' in the first line. 1.1148 + 1.1149 + * `itemize', `enumerate', `description', `list' 1.1150 + 1.1151 + `\item' or `item[]'. 1.1152 + 1.1153 + Note that since this function works seeing the contents of the first 1.1154 +line, please call this after the second line if possible. 1.1155 + 1.1156 + If you want to apply these trick to other environments, `foo' 1.1157 +environment for example, define the function named 1.1158 +`YaTeX-intelligent-newline-foo' to insert corresponding contents. That 1.1159 +function will be called at the beginning of the next line after the 1.1160 +newline is inserted to the current line. Since the function 1.1161 +`YaTeX-indent-line' is designed to indent the current line properly, 1.1162 +calling this function before your code to insert certain contents must be 1.1163 +useful. See the definition of the function 1.1164 +`YaTeX-intelligent-newline-itemize' as an example. 1.1165 + 1.1166 + 1.1167 +File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top 1.1168 + 1.1169 +Usepackage checker 1.1170 +****************** 1.1171 + 1.1172 +When you input begint-type, section-type, maketitle-type macros with 1.1173 +completion, and it requires some LaTeX2e package, YaTeX examines the 1.1174 +existence of correct `\usepackage'. If not, YaTeX inserts the 1.1175 +`\usepackage{}' declaration corresponding to input macro. 1.1176 + 1.1177 +To activate the package completion for your favarite package, set the 1.1178 +variable `YaTeX-package-alist-private' correctly. Please refere the value 1.1179 +of `YaTeX-package-alist-default' as an example. 1.1180 + 1.1181 + 1.1182 +File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top 1.1183 + 1.1184 +Online help 1.1185 +*********** 1.1186 + 1.1187 + YaTeX provides you the online help with popular LaTeX commands. 1.1188 + 1.1189 + Here are the key strokes for the online help. 1.1190 + 1.1191 +`[prefix] ?' 1.1192 + ... Online help 1.1193 +`[prefix] /' 1.1194 + ... Online apropos 1.1195 + 1.1196 + 1.1197 +Online help 1.1198 +=========== 1.1199 + 1.1200 + `Online help' shows the documentation for the popular LaTeX 1.1201 +commands(defaults to the commands on the cursor) in the next buffer. 1.1202 +There are two help file, `global help' and `private help'. The former 1.1203 +file contains the descriptions on the standard LaTeX command and is 1.1204 +specified its name by variable `YaTeX-help-file'. Usually, the global 1.1205 +help file should be located in public space (`$EMACSEXECPATH' by default) 1.1206 +and should be world writable so that anyone can update it to enrich its 1.1207 +contents. The latter file contains descriptions on non-standard or 1.1208 +personal command definitions and is specified by 1.1209 +`YaTeX-help-file-private'. This file should be put into private 1.1210 +directory. 1.1211 + 1.1212 + 1.1213 +Online apropos 1.1214 +============== 1.1215 + 1.1216 + `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all 1.1217 +the documentations that contains the keyword entered by the user. 1.1218 + 1.1219 + 1.1220 +When no descriptions are found... 1.1221 +================================= 1.1222 + 1.1223 + If there is no description on a command in help files, YaTeX requires 1.1224 +you to write a description on that command. If you are willing to do, 1.1225 +determine which help file to add and write the description on it referring 1.1226 +your manual of (La)TeX. Please send me your additional descriptions if 1.1227 +you describe the help on some standard commands. I might want to include 1.1228 +it in the next distribution. 1.1229 + 1.1230 + 1.1231 +File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top 1.1232 + 1.1233 +Browsing file hierarchy 1.1234 +*********************** 1.1235 + 1.1236 + When you are editing multi-file source, typing 1.1237 + 1.1238 +`[prefix] d' 1.1239 + ... browse file hierarchy 1.1240 + 1.1241 +asks you the parent-most file (which may be defaulted) and displays the 1.1242 +documentation hierarchy in the next window. In this buffer, the following 1.1243 +commands are available. 1.1244 + 1.1245 +`n' 1.1246 + ... move to the next line and show its contents 1.1247 +`p' 1.1248 + ... move to the previous line and show its contents 1.1249 +`N' 1.1250 + ... move to the next file in the same inclusion level 1.1251 +`P' 1.1252 + ... move to the previous file in the same inclusion level 1.1253 +`j' 1.1254 + ... move to the next line 1.1255 +`k' 1.1256 + ... move to the previous line 1.1257 +`u' 1.1258 + ... move to the parent file 1.1259 +`.' 1.1260 + ... show the current files contents in the next window 1.1261 +`SPC' 1.1262 + ... scroll up the current file window 1.1263 +`DEL, b' 1.1264 + ... scroll down the current file window 1.1265 +`<' 1.1266 + ... show the beginning of the current file 1.1267 +`>' 1.1268 + ... show the end of the current file 1.1269 +`>' 1.1270 + ... return to the previous postion after `<' or `>' 1.1271 +`RET, g' 1.1272 + ... open the current file in the next window 1.1273 +`mouse-2' 1.1274 + ... same as RET(available only with window system) 1.1275 +`o' 1.1276 + ... other window 1.1277 +`1' 1.1278 + ... delete other windows 1.1279 +`-' 1.1280 + ... shrink hierarchy buffer window 1.1281 +`+' 1.1282 + ... enlarge hierarchy buffer window 1.1283 +`?' 1.1284 + ... describe mode 1.1285 +`q' 1.1286 + ... quit 1.1287 + 1.1288 + Note that operations on the file contents in the next window do not work 1.1289 +correctly when you close the corresponding file. 1.1290 + 1.1291 + 1.1292 +File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top 1.1293 + 1.1294 +Cooperation with other packages 1.1295 +******************************* 1.1296 + 1.1297 + YaTeX works better with other brilliant packages. 1.1298 + 1.1299 + 1.1300 +gmhist 1.1301 +====== 1.1302 + 1.1303 + When you are loading `gmhist.el' and `gmhist-mh.el', you can use 1.1304 +independent command history list at the prompt of preview command 1.1305 +(`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you 1.1306 +can enter the previous command line string repeatedly by typing `M-p'. 1.1307 + 1.1308 + 1.1309 +min-out 1.1310 +======= 1.1311 + 1.1312 + `min-out', the outline minor mode, can be used in yatex-mode buffers. 1.1313 +If you want to use it with YaTeX, please refer the file `yatexm-o.el' as 1.1314 +an example. 1.1315 + 1.1316 + 1.1317 +File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top 1.1318 + 1.1319 +Customizations 1.1320 +************** 1.1321 + 1.1322 + You can customize YaTeX by setting Emacs-Lisp variables and by making 1.1323 +add-in functions. 1.1324 + 1.1325 +* Menu: 1.1326 + 1.1327 +* Lisp variables:: 1.1328 +* Add-in functions:: 1.1329 +* Add-in generator:: 1.1330 + 1.1331 + 1.1332 +File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations 1.1333 + 1.1334 +Lisp variables 1.1335 +============== 1.1336 + 1.1337 + You can change the key assignments or make completion more comfortable 1.1338 +by setting the values of various variables which control the movement of 1.1339 +yatex-mode. 1.1340 + 1.1341 + For example, if you want to change the prefix key stroke from `C-c' to 1.1342 +any other sequence, set YaTeX-prefix to whatever you want to use. If you 1.1343 +don't want to use the key sequence `C-c letter' which is assumed to be the 1.1344 +user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter' 1.1345 +to `t', and all of the default key bind of `C-c letter' will turn to the 1.1346 +corresponding `C-c C-letter' (but the region based completions that is 1.1347 +invoked with `C-c Capital-letter' remain valid, if you want to disable 1.1348 +those bindings, set that variable to 1 instead of `t'). 1.1349 + 1.1350 +* Menu: 1.1351 + 1.1352 +* All customizable variables:: 1.1353 +* Sample definitions:: 1.1354 +* Hook variables:: 1.1355 +* Hook file:: 1.1356 + 1.1357 + 1.1358 +File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables 1.1359 + 1.1360 +All customizable variables 1.1361 +-------------------------- 1.1362 + 1.1363 + Here are the customizable variables of yatex-mode. Each value setq-ed 1.1364 +in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected. 1.1365 +Parenthesized contents stands for the default value. When you are to 1.1366 +change some of these variables, see more detailed documentation of the 1.1367 +variable by `M-x describe-variable'. 1.1368 + 1.1369 + -- Variable: YaTeX-japan 1.1370 + Set this nil to produce all messages in English (`Depends on Japanese 1.1371 + feature of Emacs') 1.1372 + 1.1373 + -- Variable: YaTeX-kanji-code 1.1374 + Default buffer-file-coding-system for YaTeX modes' buffer. Set this 1.1375 + 0 to no language conversion. Nil to preserve original coding-system. 1.1376 + (`1 or 2') 1.1377 + 1.1378 + -- Variable: YaTeX-prefix 1.1379 + Prefix key stroke (`C-c') 1.1380 + 1.1381 + -- Variable: YaTeX-inhibit-prefix-letter 1.1382 + Change key stroke from `C-c letter' to `C-c C-letter' (`nil') 1.1383 + 1.1384 + -- Variable: YaTeX-fill-prefix 1.1385 + Fill-prefix used in yatex-mode (`nil') 1.1386 + 1.1387 + -- Variable: YaTeX-user-completion-table 1.1388 + Name of user dictionary where learned completion table will be 1.1389 + stored. (`"~/.yatexrc"') 1.1390 + 1.1391 + -- Variable: tex-command 1.1392 + LaTeX typesetter command (`"latex"') 1.1393 + 1.1394 + -- Variable: dvi2-command 1.1395 + Preview command (`"xdvi -geo +0+0 -s 4"') 1.1396 + 1.1397 + -- Variable: dviprint-command-format 1.1398 + Command format to print dvi file (`"dvi2ps %f %t %s | lpr"') 1.1399 + 1.1400 + -- Variable: dviprint-from-format 1.1401 + Start page format of above %f. %b will turn to start page (`"-f %b"') 1.1402 + 1.1403 + -- Variable: dviprint-to-format 1.1404 + End page format of above %t. %e will turn to `end' page (`"-t %e"') 1.1405 + 1.1406 + -- Variable: makeindex-command 1.1407 + Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS)) 1.1408 + 1.1409 + -- Variable: YaTeX-need-nonstop 1.1410 + Put `\nonstopmode{}' or not (`nil') 1.1411 + 1.1412 + -- Variable: latex-warning-regexp 1.1413 + Regular expression of warning message latex command puts out 1.1414 + (`"line.* [0-9]*"') 1.1415 + 1.1416 + -- Variable: latex-error-regexp 1.1417 + Regular expression of error message (`"l\\.[1-9][0-9]*"') 1.1418 + 1.1419 + -- Variable: latex-dos-emergency-message 1.1420 + Message latex command running on DOS puts at abort (`"Emergency 1.1421 + stop"') 1.1422 + 1.1423 + -- Variable: YaTeX-item-regexp 1.1424 + Regular expression of item command (`"\\\\item"') 1.1425 + 1.1426 + -- Variable: YaTeX-verb-regexp 1.1427 + Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"') 1.1428 + 1.1429 + -- Variable: YaTeX-nervous 1.1430 + T for using local dictionary (`t') 1.1431 + 1.1432 + -- Variable: YaTeX-sectioning-regexp 1.1433 + Regexp of LaTeX sectioning command 1.1434 + (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"') 1.1435 + 1.1436 + -- Variable: YaTeX-fill-inhibit-environments 1.1437 + Inhibit fill in these environments (`'("tabular" "tabular*" "array" 1.1438 + "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" 1.1439 + "verbatim" "verbatim*")') 1.1440 + 1.1441 + -- Variable: YaTeX-uncomment-once 1.1442 + T for deleting all preceding `%' (`nil') 1.1443 + 1.1444 + -- Variable: YaTeX-close-paren-always 1.1445 + T for always close all parenthesis automatically, `nil' for only eol 1.1446 + (`t') 1.1447 + 1.1448 + -- Variable: YaTeX-auto-math-mode 1.1449 + Switch math-mode automatically (`t') 1.1450 + 1.1451 + -- Variable: YaTeX-math-key-list-private 1.1452 + User defined alist, math-mode-prefix vs completion alist used in 1.1453 + image completion (`nil'). See `yatexmth.el' for the information 1.1454 + about how to define a completion alist. 1.1455 + 1.1456 + -- Variable: YaTeX-default-pop-window-height 1.1457 + Initial height of typesetting buffer when one-window. Number for the 1.1458 + lines of the buffer, numerical string for the percentage of the 1.1459 + screen-height. `nil' for half height (10) 1.1460 + 1.1461 + -- Variable: YaTeX-help-file 1.1462 + Global online help file name 1.1463 + (`$doc-directory/../../site-lisp/YATEXHLP.eng') 1.1464 + 1.1465 + -- Variable: YaTeX-help-file-private 1.1466 + Private online help file name (`"~/YATEXHLP.eng"') 1.1467 + 1.1468 + -- Variable: YaTeX-no-begend-shortcut 1.1469 + Disable [prefix] b ?? shortcut (`nil)' 1.1470 + 1.1471 + -- Variable: YaTeX-hilit-pattern-adjustment-private 1.1472 + List of the list that contain the regular expression and the symbol 1.1473 + of logical meaning of the string that matches the pattern. See also 1.1474 + the value from `(assq 'yatex-mode hilit-patterns-alist)' and the 1.1475 + value of `YaTeX-hilit-pattern-adjustment-default' (and even the 1.1476 + document of hilit19.el). 1.1477 + 1.1478 + -- Variable: YaTeX-sectioning-level 1.1479 + Alist of LaTeX's sectioning command vs its height. 1.1480 + 1.1481 + -- Variable: YaTeX-hierarchy-ignore-heading-regexp 1.1482 + `YaTeX-display-hierarchy' searches for sectioning command first, and 1.1483 + comment line secondary as a file headings. In latter case, ignore lines 1.1484 + that match with regular expression of this variable. Default value of 1.1485 + this variable is RCS header expressions and mode specifying line `-*- xxxx 1.1486 + -*'. 1.1487 + 1.1488 + -- Variable: YaTeX-skip-default-reader 1.1489 + Non-nil for this variable skips the default argument reader of 1.1490 + section-type command when add-in function for it is not defined 1.1491 + (`nil') 1.1492 + 1.1493 + -- Variable: YaTeX-create-file-prefix-g 1.1494 + When typing `prefix g' on the `\include' line, open the target file 1.1495 + even if the file doesn't exist (`nil') 1.1496 + 1.1497 + -- Variable: YaTeX-simple-messages 1.1498 + Simplyfy messages of various completions (`nil') 1.1499 + 1.1500 + -- Variable: YaTeX-hilit-sectioning-face 1.1501 + When hilit19 and yatex19 is active, YaTeX colors the sectioning 1.1502 + commands. This variable specifies the foreground and background 1.1503 + color of `\part' macro. The default value is `'(yellow/dodgerblue 1.1504 + yellow/slateblue)'. The first element of this list is for the screen 1.1505 + when `hilit-background-mode' is `'light', and the second element is 1.1506 + for `'dark'. You should specify both color as `forecolor/backcolor'. 1.1507 + 1.1508 + -- Variable: YaTeX-hilit-sectioning-attenuation-rate 1.1509 + When color mode, this variable specifies how much attenuate the color 1.1510 + density of `\subparagraph' compared with that of `\chapter' (`'(15 1.1511 + 40)') See also `YaTeX-hilit-sectioning-face'. 1.1512 + 1.1513 + -- Variable: YaTeX-use-AMS-LaTeX 1.1514 + If you use AMS-LaTeX, set to `t' (`nil') 1.1515 + 1.1516 + -- Variable: YaTeX-use-LaTeX2e 1.1517 + If you use LaTeX2e, set to `t' (`t') 1.1518 + 1.1519 + -- Variable: YaTeX-template-file 1.1520 + File name which is automatically inserted at creation 1.1521 + (`~/work/template.tex') 1.1522 + 1.1523 + -- Variable: YaTeX-search-file-from-top-directory 1.1524 + Non-nil means to search input-files from the directory where main 1.1525 + file exists (`t') 1.1526 + 1.1527 + -- Variable: YaTeX-use-font-lock 1.1528 + Use font-lock to fontify buffer or not (`(featurep 'font-lock)' 1.1529 + 1.1530 + -- Variable: YaTeX-use-hilit19 1.1531 + Use hilit19 to highlight buffer or not (`(featurep 'hilit19)' 1.1532 + 1.1533 + -- Variable: YaTeX-use-italic-bold 1.1534 + YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20 1.1535 + or later). This variable is effective only when font-lock is used. 1.1536 + (`(featurep 'hilit19)' 1.1537 + 1.1538 + -- Variable: YaTeX-singlecmd-suffix 1.1539 + Suffix which is always inserted after maketitle-type macros. `"{}"' 1.1540 + is recommended. 1.1541 + 1.1542 + -- Variable: YaTeX-package-alist-private 1.1543 + Alist of LaTeX2e-package name vs. lists of macros in it. Set this 1.1544 + alist properly and YaTeX automatically check the declaratiion of 1.1545 + `usepackage' for corresponding macro, when you input that macro with 1.1546 + completion. If required `usepackage' is not found, YaTeX also 1.1547 + automatically inserts `\usepackage'. Alist is as follows; 1.1548 + '((PackageName1 1.1549 + (completionType ListOfMacro) 1.1550 + (completionType ListOfMacro)) 1.1551 + (PackageName2 1.1552 + (completionType ListOfMacro) 1.1553 + (completionType ListOfMacro...))....) completionType is 1.1554 + one of `env, section, maketitle'. Consult the value of 1.1555 + `YaTeX-package-alist-default' as an example. 1.1556 + 1.1557 + -- Variable: YaTeX-tabular-indentation 1.1558 + At indentation by `C-i' in tabular or array environment, YaTeX put 1.1559 + the additional spaces to the normail indentation depth. The number 1.1560 + of additional spaces is the product of YaTeX-tabular-indentation and 1.1561 + the number of column position in tabular. 1.1562 + 1.1563 + -- Variable: YaTeX-noindent-env-regexp 1.1564 + Regexp of environment names that should begin with no indentation. 1.1565 + All verbatime-like environment name should match with. 1.1566 + 1.1567 + -- Variable: YaTeX-ref-default-label-string 1.1568 + Default \\ref time string format. This format is like strftime(3) 1.1569 + but allowed conversion char are as follows; %y -> Last 2 digit of 1.1570 + year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H -> 1.1571 + Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal 1.1572 + conversion of yymmdd. %qX -> alphabetical-decimal conversion of 1.1573 + HHMMSS. Beware defualt label-string should be always unique. So 1.1574 + this format string should have both time part (%H+%M+%S or %qX) and 1.1575 + date part (%y+(%b|%m)+%d or %qx). 1.1576 + 1.1577 + -- Variable: YaTeX-ref-generate-label-function 1.1578 + Function to generate default label string for unnamed \\label{}s. 1.1579 + The function pointed to this value should take two arguments. First 1.1580 + argument is LaTeX macro's name, second is macro's argument. Here is 1.1581 + an example for using this value. 1.1582 + (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label) 1.1583 + (defun my-yatex-generate-label (command value) 1.1584 + (and (string= command "caption") 1.1585 + (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t) 1.1586 + (setq command (match-string 1))) 1.1587 + (let ((alist '(("chapter" . "chap") 1.1588 + ("section" . "sec") 1.1589 + ("subsection" . "subsec") 1.1590 + ("figure" . "fig") 1.1591 + ("table" . "tbl")))) 1.1592 + (if (setq command (cdr (assoc command alist))) 1.1593 + (concat command ":" value) 1.1594 + (YaTeX::ref-generate-label nil nil)))) 1.1595 + 1.1596 + 1.1597 + 1.1598 +File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables 1.1599 + 1.1600 +Sample definitions 1.1601 +------------------ 1.1602 + 1.1603 + For instance, to change the prefix key stroke to `ESC', and name of the 1.1604 +user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB 1.1605 +character, add the following `setq' to `~/.emacs'. 1.1606 + 1.1607 + (setq YaTeX-prefix "\e" 1.1608 + YaTeX-user-completion-table "~/src/emacs/yatexrc" 1.1609 + YaTeX-fill-prefix " ") 1.1610 + 1.1611 + 1.1612 +File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables 1.1613 + 1.1614 +Hook variables 1.1615 +-------------- 1.1616 + 1.1617 + More customizations will be done by the hook-function defined in 1.1618 +hook-variable `yatex-mode-hook'. This is useful to define a shortcut key 1.1619 +sequence to enter some environments other than `document' and `enumerate' 1.1620 +etc. The following statement defines `[prefix] ba' to enter 1.1621 +`\begin{abstract}' ... `=end{abstract}' immediately. 1.1622 + 1.1623 + (setq yatex-mode-hook 1.1624 + '(lambda() (YaTeX-define-begend-key "ba" "abstract"))) 1.1625 + 1.1626 + You should use functions `YaTeX-define-key', or 1.1627 +`YaTeX-define-begend-key' to define all the key sequences of yatex-mode. 1.1628 + 1.1629 + 1.1630 +File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables 1.1631 + 1.1632 +Hook file 1.1633 +--------- 1.1634 + 1.1635 + You can stuff all of YaTeX related expressions into a file named 1.1636 +`yatexhks.el' if you have a lot of codes. YaTeX automatically load this 1.1637 +file at the initialization of itself. Using `yatexhks.el' makes 1.1638 +`yatex-mode-load-hook' unnecessary. 1.1639 + 1.1640 + 1.1641 +File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations 1.1642 + 1.1643 +Add-in functions 1.1644 +================ 1.1645 + 1.1646 + You can easily define a function to input detailed arguments with 1.1647 +completion according to LaTeX environments or commands. 1.1648 + 1.1649 + 1.1650 +What is add-in functions? 1.1651 +------------------------- 1.1652 + 1.1653 + When you input `tabular' environment, don't you think "I want YaTeX to 1.1654 +complete its argument toward my favorite one such as `{|c|c|c|}'..."? 1.1655 +Yes, you can define the function to complete arguments for any environment 1.1656 +and any LaTeX commands. 1.1657 + 1.1658 + 1.1659 +Procedure 1.1660 +--------- 1.1661 + 1.1662 + Here is the procedure to define add-in functions. 1.1663 + 1. Define the function 1.1664 + 2. Put the function into `yatexhks.el' 1.1665 + 1.1666 +* Menu: 1.1667 + 1.1668 +* How the add-in function works:: 1.1669 +* How the function is called:: 1.1670 +* Useful functions for creating add-in:: 1.1671 +* Contribution:: 1.1672 + 1.1673 + 1.1674 +File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions 1.1675 + 1.1676 +How the add-in function works 1.1677 +----------------------------- 1.1678 + 1.1679 +There are three types of add-in. 1.1680 + 1.1681 + 1. Option add-in 1.1682 + 2. argument add-in 1.1683 + 3. enclosing add-in 1.1684 + 1.1685 +"Option add-in" returns the LaTeX's optional parameters such as optional 1.1686 +strings after `\begin{ENV}', optional strings between a section-type 1.1687 +command and its first argument, and optional strings just after type 1.1688 +maketitle-type command. The following illustrates the name of add-in 1.1689 +functions, where underlined strings are generated by add-in functions. 1.1690 + 1.1691 + \begin{table}[ht] (Function name: YaTeX:table) 1.1692 + ~~~~ 1.1693 + \put(100,200){} (Function name: YaTeX:put) 1.1694 + ~~~~~~~~~ 1.1695 + \sum_{i=0}^{n} (Function name: YaTeX:sum) 1.1696 + ~~~~~~~~~~ 1.1697 + 1.1698 + Obviously, the function name is decided by concatenating the prefix 1.1699 +`YaTeX:' and LaTeX command's name. 1.1700 + 1.1701 + Another add-in type is "argument add-in", which completes arguments for 1.1702 +section-type commands. 1.1703 + 1.1704 + \newcommand{\foo}{bar} (Function name: YaTeX::newcommand) 1.1705 + ~~~~ ~~~ 1.1706 + 1.1707 + When the section-type command is inputted, the function named by 1.1708 +concatenating `YaTeX::' and section-type command, is called automatically 1.1709 +with an integer argument which indicates which argument of section-type 1.1710 +command is being read. Thus the add-in should determine the job referring 1.1711 +the value of its argument. 1.1712 + 1.1713 + "enclosing add-in" is for modifying and/or checking the region that will 1.1714 +be enclosed by section-type commands via `[prefix] S'. An enclosing 1.1715 +add-in function will be called with two arguments, beginning of the 1.1716 +enclosed region and end of the region. Suppose you want to enclose the 1.1717 +existing text `(a+b)/c' by `\frac{}'. 1.1718 + 1.1719 + a/c 1.1720 + | | 1.1721 + A B 1.1722 + 1.1723 +You do set-mark-command at point A and then move to point B. Typing 1.1724 +`[prefix] S' and input `frac' enclose the region like this; 1.1725 + 1.1726 + \frac{a/c} 1.1727 + 1.1728 +Normally, the expression `a/c' is translated to `\frac{a}{c}'. An 1.1729 +enclosing add-in is useful for modifying `/' to `}{'. 1.1730 + 1.1731 +* Menu: 1.1732 + 1.1733 +* Defining option-add-in:: 1.1734 +* Defining argument-add-in:: 1.1735 +* Defining enclosing-add-in:: 1.1736 + 1.1737 + 1.1738 +File: yatexe, Node: Defining option-add-in, Next: Defining argument-add-in, Prev: How the add-in function works, Up: How the add-in function works 1.1739 + 1.1740 +Defining `option add-in' 1.1741 +........................ 1.1742 + 1.1743 + If you want `{|c|c|c|}' for all `tabular' environment, 1.1744 + 1.1745 + (defun YaTeX:tabular () 1.1746 + "{|c|c|c|}") 1.1747 + 1.1748 +is enough. If you want more complicated format, define as below. 1.1749 + 1.1750 + (defun YaTeX:tabular () 1.1751 + "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}") 1.1752 + 1.1753 +Note that the character `\' must be described as `\\' in Emacs-Lisp. The 1.1754 +next example reads the tabular format from keyboard. 1.1755 + (defun YaTeX:tabular () 1.1756 + (concat "{" (read-string "Rule: ") "}")) 1.1757 + 1.1758 + 1.1759 +File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works 1.1760 + 1.1761 +Defining `argument add-in' 1.1762 +.......................... 1.1763 + 1.1764 + This section describes how to define the add-in function for 1.1765 +`\newcommand'. 1.1766 + 1.1767 + The first argument of `\newcommand' begins always with `\'. The second 1.1768 +argument is usually so complex that we can not edit them in the 1.1769 +minibuffer. Here is the created function considering this. 1.1770 + 1.1771 + (defun YaTeX::newcommand (n) ;n is argument position 1.1772 + (cond 1.1773 + ((= n 1) ;1st argument is macro name 1.1774 + (read-string "Command: " "\\")) ;initial input `\' 1.1775 + ((= n 2) "") ;do nothing when reading arg#2 1.1776 + (t nil))) 1.1777 + 1.1778 + Note that when the `argument add-in' function return `nil', normal 1.1779 +argument reader will be called. 1.1780 + 1.1781 + 1.1782 +File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works 1.1783 + 1.1784 +Defining `enclosing add-in' 1.1785 +........................... 1.1786 + 1.1787 + This section describes how to define the add-in function for text 1.1788 +enclosed by `\frac{}'. 1.1789 + 1.1790 + When enclosing the text `5/3' by `\frac{}', you might want to replace 1.1791 +`/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two 1.1792 +arguments, beginning of enclosed text and end of enclosed text. The 1.1793 +function is expected to replace `/' with `}{'. Here is an example 1.1794 +expression. 1.1795 + 1.1796 + (defun YaTeX::frac-region (beg end) 1.1797 + (catch 'done 1.1798 + (while (search-forward "/" end t) 1.1799 + (goto-char (match-beginning 0)) 1.1800 + (if (y-or-n-p "Replace this slash(/) with `}{'") 1.1801 + (throw 'done (replace-match "}{"))) 1.1802 + (goto-char (match-end 0))))) 1.1803 + 1.1804 + 1.1805 +File: yatexe, Node: How the function is called, Next: Useful functions for creating add-in, Prev: How the add-in function works, Up: Add-in functions 1.1806 + 1.1807 +How the function is called 1.1808 +-------------------------- 1.1809 + 1.1810 + YaTeX calls the add-in functions for specified begin-type, section-type, 1.1811 +and maketitle-type command, if any. `Option add-in' functions for 1.1812 +begin-type are called when `\begin{ENV}' has been inserted, functions for 1.1813 +section-type are called just before input of the first argument, and 1.1814 +functions for maketitle-type is called after maketitle-type command has 1.1815 +been inserted. `Argument add-in' functions are called at each entry of 1.1816 +arguments for section-type commands. 1.1817 + 1.1818 + 1.1819 +File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions 1.1820 + 1.1821 +Useful functions for creating add-in 1.1822 +------------------------------------ 1.1823 + 1.1824 + Many add-in functions for typical LaTeX commands are defined in 1.1825 +`yatexadd.el'. Those are also useful as references. Here are the short 1.1826 +descriptions on useful functions, where [F] means function, [A] means 1.1827 +arguments, [D] means description. 1.1828 + 1.1829 +`[F]' 1.1830 + YaTeX:read-position 1.1831 +`[A]' 1.1832 + Character list which can show up in the brackets 1.1833 +`[D]' 1.1834 + Return the location specifier such as `[htb]'. When nothing is 1.1835 + entered, omit [] itself. If the possible characters are "htbp", call 1.1836 + this function as `(YaTeX:read-position "htbp")' 1.1837 + 1.1838 +`[F]' 1.1839 + YaTeX:read-coordinates 1.1840 +`[A]' 1.1841 + Base prompt, X-axis prompt, Y-axis prompt (each optional) 1.1842 +`[D]' 1.1843 + Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for 1.1844 + X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the 1.1845 + form of "(X,Y)". The default prompts are `Dimension', `X', `Y' 1.1846 + respectively. 1.1847 + 1.1848 +`[F]' 1.1849 + YaTeX:check-completion-type 1.1850 +`[A]' 1.1851 + One of the symbols: 'begin, 'section, or 'maketitle 1.1852 +`[D]' 1.1853 + Check the current completion type is specified one and cause error 1.1854 + if not. The variable `YaTeX-current-completion-type' holds the symbol 1.1855 + according to the current completion type. 1.1856 + 1.1857 + 1.1858 +File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions 1.1859 + 1.1860 +Contribution 1.1861 +------------ 1.1862 + 1.1863 + If you make your own pretty function and you let it be in public, please 1.1864 +send me the function. I'm going to include it in the next release. 1.1865 + 1.1866 + 1.1867 +File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations 1.1868 + 1.1869 +Add-in generator 1.1870 +================ 1.1871 + 1.1872 + First, don't forget to read the section of add-in functions *Note Add-in 1.1873 +functions::. If you easily understand how to define them, there's no need 1.1874 +to read this section. But being not familiar with Emacs-Lisp, when you 1.1875 +don't have clear idea what to do, this section describes how to get YaTeX 1.1876 +make add-in function. 1.1877 + 1.1878 + There are two methods of generation. One is for fully interactive 1.1879 +generator for beginners and another requires little knowledge of 1.1880 +Emacs-Lisp. 1.1881 + 1.1882 + 1.1883 +Generator for beginners 1.1884 +----------------------- 1.1885 + The former generator is called by 1.1886 + `M-x YaTeX-generate' 1.1887 + 1.1888 +strokes. All you have to do is follow the guidances. Defying them may 1.1889 +cases the disaster (I wonder what is it???). So when you make some 1.1890 +mistake, it is recommendable to type `C-g' and start afresh. 1.1891 + 1.1892 + 1.1893 +Simple generator 1.1894 +---------------- 1.1895 + 1.1896 + The latter generator is invoked by the next sequence. 1.1897 + `M-x YaTeX-generate-simple' 1.1898 +This generator can make both "option add-in" and "argument add-in" 1.1899 +(*refer the section add-in functions* 1.1900 +*Note How the add-in function works::), whereas `YaTeX-generate' 1.1901 +cannot make "argument addin". 1.1902 + 1.1903 + For example, assume you have the LaTeX command as follows. 1.1904 + 1.1905 + \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} 1.1906 + (A) (B) (1) (2) (3) 1.1907 + (A)Optional parameter to specify the position 1.1908 + One of t(top), b(bottom), l(left), r(right) 1.1909 + (B)Maximum size of frame 1.1910 + (1)1st argument is filename of EPS file 1.1911 + (2)2nd argument indicates 1.1912 + plain do nothing 1.1913 + frame make frame around image 1.1914 + dframe make double-frame around image 1.1915 + for included EPS file. 1.1916 + (3)Caption for the picture 1.1917 + 1.1918 + Now get start with generation. Typing `M-x YaTeX-generate-simple' 1.1919 +brings the prompt: 1.1920 + (O)ption? (A)rgument? 1.1921 + 1.1922 + 1.1923 +Generating "option add-in" 1.1924 +.......................... 1.1925 + 1.1926 + Since (A), (B) above are optional argument, all we have to do to 1.1927 +complete them is define the option add-in for them. Let's generate the 1.1928 +function to complete (A). 1.1929 + 1.1930 + M-x YaTeX-generate-simple RET 1.1931 + epsinput RET 1.1932 + o 1.1933 + 1.1934 +Typing as above leads the next prompt. 1.1935 + 1.1936 + Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit 1.1937 + 1.1938 + This asks that "Which type is the completion style of 1st argument?". 1.1939 +Here are the possible completion style. 1.1940 + 1.1941 +`String' 1.1942 + read plain string 1.1943 +`Complete' 1.1944 + read with completion 1.1945 +`File' 1.1946 + read file name 1.1947 +`Option' 1.1948 + read optional string (if string omitted, omit [] too) 1.1949 +`Position' 1.1950 + read positional option (like [htbp]) 1.1951 +`Coord.' 1.1952 + read coordinates 1.1953 +`Quit' 1.1954 + quit from generating 1.1955 + 1.1956 + Since (A) is the optional argument to specify the location of included 1.1957 +EPS file, the completion style is `Position', and the possible characters 1.1958 +are t, b, l, and r. To tell these information to generator, operate as 1.1959 +follows. 1.1960 + 1.1961 + Read type(1).... p 1.1962 + Acceptable characters: tblr RET 1.1963 + 1.1964 + (B) is coordinate. So its completion style is coOrd. We want a prompt 1.1965 +meaning "Maximum size" when completion. 1.1966 + 1.1967 + Read type(2).... o 1.1968 + Prompt for coordinates: Max size RET 1.1969 + 1.1970 + That's all for optional argument. Select quit. 1.1971 + 1.1972 + Read type(3).... q 1.1973 + 1.1974 + Then the generated option add-in function for \epsinput will be shown in 1.1975 +the next window. 1.1976 + 1.1977 + 1.1978 +Generating "argument add-in" 1.1979 +............................ 1.1980 + 1.1981 + Next, create the argument add-in. The arguments for \epsinput are EPS 1.1982 +file name, framing style, and caption string in sequence. 1.1983 + 1.1984 + M-x YaTeX-generate-simple RET 1.1985 + epsinput RET 1.1986 + a 1.1987 + 1.1988 + Above key strokes bring the prompt that asks the number of argument. 1.1989 +Answer it with 3. 1.1990 + 1.1991 + How many arguments?: 3 RET 1.1992 + 1.1993 + Then the generator asks the completion style and prompt for completion. 1.1994 +Answer them. `f' for FileName and prompt string. 1.1995 + 1.1996 + Read type(1).... f 1.1997 + Prompt for argument#1 EPS file name RET 1.1998 + 1.1999 + The second argument is one of selected symbol. So the completion type 1.2000 +is `Completion'. 1.2001 + 1.2002 + Read type(2).... c 1.2003 + Prompt for argument#2 Include style RET 1.2004 + 1.2005 + Then all the candidates ready to be read. Type single RET after 1.2006 +entering all. 1.2007 + 1.2008 + Item[1](RET to exit): plain RET 1.2009 + Item[2](RET to exit): frame RET 1.2010 + Item[3](RET to exit): dframe RET 1.2011 + Item[4](RET to exit): RET 1.2012 + 1.2013 + The following prompt asks whether the entered string must belong to 1.2014 +candidates or not. In this case, since the argument must be one of 1.2015 +`plain', `frame', and `dframe', type `y'. 1.2016 + 1.2017 + Require match? (y or n) y 1.2018 + 1.2019 + The last argument is the caption string for which any completion is 1.2020 +needed. 1.2021 + 1.2022 + Read type(3).... s 1.2023 + Prompt for argument#3 Caption RET 1.2024 + default: Figure of RET 1.2025 + 1.2026 + Finally we'll get the argument add-in in the next window. 1.2027 + 1.2028 + 1.2029 +Contribution 1.2030 +------------ 1.2031 + 1.2032 + If you get your own pretty function and you let it be in public, please 1.2033 +steel yourself in the happy atmosphere and do not send me the function. I 1.2034 +do know it is not fine because it is generated by yatexgen:-p. 1.2035 + 1.2036 + 1.2037 +File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top 1.2038 + 1.2039 +Etcetera 1.2040 +******** 1.2041 + 1.2042 + The standard completion tables provided in `yatex.el' contain a few 1.2043 +LaTeX commands I frequently use. This is to lessen the key strokes to 1.2044 +complete entire word, because too many candidates rarely used often cause 1.2045 +too many hits. Therefore always try to use completion in order to enrich 1.2046 +your dictionary, and you will also find `Wild Bird' growing suitable for 1.2047 +your LaTeX style. 1.2048 + 1.2049 + The package name `Wild Bird' is the English translation of Japanese 1.2050 +title `Yachou', which is a trick on words of Japanese. 1.2051 + 1.2052 + 1.2053 +File: yatexe, Node: Copying, Prev: Etcetera, Up: Top 1.2054 + 1.2055 +Copying 1.2056 +******* 1.2057 + 1.2058 + This program is distributed as a free software. You can 1.2059 +use/copy/modify/redistribute this software freely but with NO warranty to 1.2060 +anything as a result of using this software. Adopting code from this 1.2061 +program is also free. But I would not do contract act. 1.2062 + 1.2063 +Any reports and suggestions are welcome as long as I feel interests in 1.2064 +this software. My possible e-mail address is `yuuji@yatex.org'. (as of 1.2065 +Jan.2004) And there is mailing list for YaTeX. Although the common 1.2066 +language is Japanese, questions in English will be welcome. To join the 1.2067 +ML, send the mail whose subject is `append' to the address 1.2068 +`yatex@yatex.org. If you have some question, please ask to 1.2069 +`yatex-admin@yatex.org'. 1.2070 + 1.2071 + The specification of this software will be surely modified (depending on 1.2072 +my feelings) without notice :-p. 1.2073 + 1.2074 + 1.2075 + HIROSE Yuuji 1.2076 + 1.2077 +Tag table: 1.2078 +Node: Top153 1.2079 +Node: What is YaTeX?1493 1.2080 +Node: Main features1865 1.2081 +Node: Installation3456 1.2082 +Node: Typesetting4232 1.2083 +Node: Calling typesetter5061 1.2084 +Node: Calling previewer6406 1.2085 +Node: Printing out6766 1.2086 +Node: %#notation7057 1.2087 +Node: Changing typesetter7432 1.2088 +Node: Splitting input files7795 1.2089 +Node: Static region for typesetting9222 1.2090 +Node: Lpr format10350 1.2091 +Node: Editing %# notation11406 1.2092 +Node: Completion11924 1.2093 +Node: Begin-type completion12483 1.2094 +Node: Section-type completion15526 1.2095 +Node: view-sectioning17960 1.2096 +Node: Large-type completion19539 1.2097 +Node: Maketitle-type completion20269 1.2098 +Node: Arbitrary completion20820 1.2099 +Node: End completion21209 1.2100 +Node: Accent completion21678 1.2101 +Node: Image completion22294 1.2102 +Node: Greek letters completion24550 1.2103 +Node: Local dictionaries25276 1.2104 +Node: Commenting out26212 1.2105 +Node: Cursor jump27670 1.2106 +Node: Jump to corresponding object27981 1.2107 +Node: Invoking image processor29381 1.2108 +Node: Jump to main file30723 1.2109 +Node: Jumping around the environment31087 1.2110 +Node: Jumping to last completion position31504 1.2111 +Node: Changing and Deleting32012 1.2112 +Node: Changing LaTeX commands32403 1.2113 +Node: Killing LaTeX commands33579 1.2114 +Node: Filling34763 1.2115 +Node: Updation of includeonly36613 1.2116 +Node: What column37409 1.2117 +Node: Intelligent newline38493 1.2118 +Node: Usepackage checker40153 1.2119 +Node: Online help40743 1.2120 +Node: Browsing file hierarchy42417 1.2121 +Node: Cooperation with other packages44153 1.2122 +Node: Customizations44857 1.2123 +Node: Lisp variables45190 1.2124 +Node: All customizable variables46193 1.2125 +Node: Sample definitions55941 1.2126 +Node: Hook variables56453 1.2127 +Node: Hook file57156 1.2128 +Node: Add-in functions57494 1.2129 +Node: How the add-in function works58353 1.2130 +Node: Defining option-add-in60551 1.2131 +Node: Defining argument-add-in61272 1.2132 +Node: Defining enclosing-add-in62153 1.2133 +Node: How the function is called63006 1.2134 +Node: Useful functions for creating add-in63681 1.2135 +Node: Contribution65085 1.2136 +Node: Add-in generator65358 1.2137 +Node: Etcetera70751 1.2138 +Node: Copying71355 1.2139 + 1.2140 +End tag table