yatex

view docs/yatexe @ 126:91bf68eeefe8

Add documentation for latex+p(D)f and YaTeX-dvipdf-command.
author yuuji@gentei.org
date Thu, 27 May 2010 10:34:34 +0900
parents 6d682b9d4bc8
children 8703f090c628
line source
1 Info file: yatexe, -*-Text-*-
2 produced by `texinfo-format-buffer'
3 from file `yatexe.tex'
4 using `texinfmt.el' version 2.32 of 19 November 1993.
9 
10 File: yatexe, Node: Top, Next: What is YaTeX?, Prev: (dir), Up: (dir)
12 * Menu:
14 * What is YaTeX?::
15 * Main features:: What YaTeX can do
16 * Installation:: Guide to install
17 * Typesetting:: Call typesetting processes
18 * %#notation:: Meta-keyword `%#'
19 * Completion:: Input LaTeX commands with completion
20 * Local dictionaries:: Directory dependent completion
21 * Commenting out:: Commenting/uncommenting text
22 * Cursor jump:: Jumping to related position
23 * Changing and Deleting:: Changing/deleting certain unit of text
24 * Filling:: Filling an item or paragraph
25 * Updation of includeonly:: Free from maintaining includeonly
26 * What column:: Check what table-column the cursor belong
27 * Intelligent newline:: Guess requisites of new line
28 * Usepackage checker:: Selecting correct \usepackage is YaTeX's job
29 * Online help:: On-line documentation of LaTeX
30 * Browsing file hierarchy:: Walking through file hierarchy
31 * Cooperation with other packages:: Work well with gmhist, min-out
32 * Customizations:: How to breed `Wild Bird'
33 * Etcetera:: YaTeX is acquisitive.
34 * Copying:: Redistribution
37 
38 File: yatexe, Node: What is YaTeX?, Next: Main features, Prev: Top, Up: Top
40 What is YaTeX?
41 **************
43 YaTeX automates typesetting and previewing of LaTeX and enables
44 completing input of LaTeX mark-up command such as
45 `\begin{}'..`\end{}'.
47 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
48 Language Enhancement to GNU Emacs), and latex on DOS.
50 
51 File: yatexe, Node: Main features, Next: Installation, Prev: What is YaTeX?, Up: Top
53 Main features
54 *************
56 * Invocation of typesetter, previewer and related programs(`C-c t')
57 * Typesetting on static region which is independent from point
58 * Semiautomatic replacing of `\includeonly'
59 * Jumping to error line(`C-c '')
60 * Completing-read of LaTeX commands such as `\begin{}',
61 `\section' etc.
62 (`C-c b', `C-c s', `C-c l', `C-c m')
63 * Enclosing text into LaTeX environments or commands
64 (`C-u' ABOVEKEYSTROKES)
65 * Displaying the structure of text at entering sectioning commands
66 * Lump shifting of sectioning commands (*Note view-sectioning::)
67 * Learning unknown/new LaTeX commands for the next completion
68 * Argument reading with a guide for complicated LaTeX commands
69 * Generating argument-readers for new/unsupported commands(`yatexgen')
70 * Quick changing or deleting of LaTeX commands(`C-c c', `C-c k')
71 * Jumping from and to inter-file, begin<->end, ref<->label(`C-c g')
72 * Blanket commenting out or uncommenting
73 (`C-c >', `C-c <', `C-c ,', `C-c .')
74 * Easy input of accent mark, math-mode's commands and Greek letters
75 (`C-c a', `;', `:')
76 * Online help for the popular LaTeX commands
77 (`C-c ?', `C-c /')
78 * Document files hierarchy browser (`C-c d')
79 * Adding automatically \usepackage corresponding to inputting LaTeX
80 macro with completion
81 * Allow you to forget creating \label{}s, \ref or \cite completion
82 automatically generate labels.
84 
85 File: yatexe, Node: Installation, Next: Typesetting, Prev: Main features, Up: Top
87 Installation
88 ************
90 Put next two expressions into your `~/.emacs'.
92 (setq auto-mode-alist
93 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
94 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
96 Next, add certain path name where you put files of YaTeX to your
97 load-path. If you want to put them in `~/src/emacs', write
99 (setq load-path
100 (cons (expand-file-name "~/src/emacs") load-path))
102 in your `~/.emacs'
104 Then, yatex-mode will be automatically loaded when you visit a
105 file which has extension `.tex'. If yatex-mode is successfully
106 loaded, mode string on mode line will be turned to "YaTeX".
109 
110 File: yatexe, Node: Typesetting, Next: %#notation, Prev: Installation, Up: Top
112 Typesetting
113 ***********
115 The prefix key stroke of yatex-mode is `C-c' (Press 'C' with Control
116 key) by default. If you don't intend to change the prefix key stroke,
117 assume all `[prefix]' as `C-c' in this document. These key
118 strokes execute typeset or preview command.
120 `[prefix] t j'
121 ... invoke latex
122 `[prefix] t r'
123 ... invoke latex on region
124 `[prefix] t k'
125 ... kill current typesetting process
126 `[prefix] t b'
127 ... invoke bibtex
128 `[prefix] t i'
129 ... invoke makeindex
130 `[prefix] t d'
131 ... invoke latex && dvipdfmx
132 `[prefix] t p'
133 ... preview
134 `[prefix] t l'
135 ... lpr dvi-file
136 `[prefix] t s'
137 ... search current string on xdvi-remote
139 * Menu:
141 * Calling typesetter::
142 * Calling previewer::
143 * Printing out::
145 
146 File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting
148 Calling typesetter
149 ==================
151 Typing `[prefix] t j', the current editing window will be divided
152 horizontally when you invoke latex command, and log message of LaTeX
153 typesetting will be displayed in the other window; called typesetting
154 buffer. The typesetting buffer automatically scrolls up and traces LaTeX
155 warnings and error messages. If you see latex stopping by an error, you
156 can send string to latex in the typesetting buffer.
158 If an error stops the LaTeX typesetting, this key stroke will move the
159 cursor to the line where LaTeX error is detected.
161 `[prefix] ''
162 `([prefix]+single quotation)'
164 ... jump to the previous error or warning
166 If you find a noticeable error, move to the typesetting buffer and move
167 the cursor on the line of error message and type `SPACE' key. This makes
168 the cursor move to corresponding source line.
170 Since `[prefix] tr' pastes the region into the file `texput.tex' in the
171 current directory, you should be careful of overwriting. The method of
172 specification of the region is shown in the section *Note %#notation::.
174 The documentclass for typeset-region is the same as that of editing file
175 if you edit one file, and is the same as main file's if you edit splitting
176 files.
178 
179 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting
181 Calling previewer
182 =================
184 `[prefix] t p' invokes the TeX previewer. And if you are using
185 xdvi-remote, which can be controled from other terminals, `[prefix] t s'
186 enables you to search current string at the cursor on the running xdvi
187 window.
189 
190 File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting
192 Printing out
193 ============
195 When you type `[preifx] t l', YaTeX asks you the range of dvi-printing
196 by default. You can skip this by invoking it with universal-argument as
197 follows:
199 C-u [prefix] tl
201 
202 File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top
204 %# notation
205 ***********
207 You can control the typesetting process by describing `%#' notations in
208 the source text.
210 * Menu:
212 * Changing typesetter::
213 * Splitting input files::
214 * Static region for typesetting::
215 * Lpr format::
216 * Editing %# notation::
218 
219 File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation
221 To change the `latex' command or to split a source text.
222 ========================================================
224 To change the typesetting command, write
226 %#!latex-big
228 anywhere in the source text. This is useful for changing typesetter.
230 
231 File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation
233 Splitting input files
234 =====================
236 And if you split the source text and edit subfile that should be
237 included from main text.
239 %#!latex main.tex
241 will be helpful to execute latex on main file from sub text buffer. Since
242 this command line after `%#!' will be sent to shell literally, next
243 description makes it convenient to use ghostview as dvi-previewer.
245 %#!latex main ; dvi2ps main.dvi > main
247 Note that YaTeX assumes the component before the last period of the last
248 word in this line as base name of the main LaTeX source. The `%f'
249 notation in this line is replaced by main file name, and `%r' replaced by
250 root name of main file name. If you specify `%f' or `%r', YaTeX always
251 ask you the name of main file at the first typesetting.
253 To make best use of the feature of inter-file jumping by `[prefix] g'
254 (see *Note Cursor jump::), take described below into consideration.
256 * You can put split texts in sub directory, but not in
257 sub directory of sub directory.
258 * In the main text, specify the child file name with relative path name
259 such as \include{chap1/sub}, when you include the file in
260 a sub-directory.
261 * In a sub-text, write `%#!latex main.tex' even if `main.tex'
262 is in the parent directory(not %#!latex ../main.tex).
264 
265 File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation
267 Static region
268 =============
270 Typeset-region by `[prefix] tr' passes the region between point and mark
271 to typesetting command by default. But when you want to typeset static
272 region, enclose the region by `%#BEGIN' and `%#END' as follows.
274 %#BEGIN
275 TheRegionYouWantToTypesetManyTimes
276 %#END
278 This is the rule of deciding the region.
280 1. If there exists %#BEGIN before point,
282 1. If there exists %#END after %#BEGIN,
283 * From %#BEGIN to %#END.
285 2. If %#END does not exist after %#BEGIN,
286 * From %#BEGIN to the end of buffer.
288 2. If there does not exist %#BEGIN before point,
289 * Between point and mark(standard method of Emacs).
291 It is useful to write `%#BEGIN' in the previous line of \begin and
292 `%#END' in the next line of \`end' when you try complex environment such
293 as `tabular' many times. It is also useful to put only `%#BEGIN' alone at
294 the middle of very long text. Do not forget to erase `%#BEGIN' `%#END'
295 pair.
297 
298 File: yatexe, Node: Lpr format, Next: Editing %# notation, Prev: Static region for typesetting, Up: %#notation
300 Lpr format
301 ==========
303 Lpr format is specified by three Lisp variables. Here are the default
304 values of them.
306 `(1)dviprint-command-format'
307 `"dvi2ps %f %t %s | lpr"'
308 `(2)dviprint-from-format'
309 `"-f %b"'
310 `(3)dviprint-to-format'
311 `"-t %e"'
313 On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text,
314 `%f' by contents of (2), %t by contents of (3). At these replacements,
315 `%b' in (2) is also replaced by the number of beginning page, `%e' in (3)
316 is replaced by the number of ending page. But `%f' and `%t' are ignored
317 when you omit the range of print-out by `C-u [prefix] tl'.
319 If you want to change this lpr format temporarily, put a command such as
320 follows somewhere in the text:
322 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
324 And if you want YaTeX not to ask you the range of printing out, the next
325 example may be helpful.
327 %#LPR dvi2ps %s | lpr
329 
330 File: yatexe, Node: Editing %# notation, Prev: Lpr format, Up: %#notation
332 Editing %# notation
333 ===================
335 To edit `%#' notation described above, type
337 `[prefix] %'
338 ... editing %# notation menu
340 and select one of the entry of the menu as follows.
342 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
344 Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and
345 `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN'
346 and `%#END' are automatically erased.
348 
349 File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top
351 Completion
352 **********
354 YaTeX makes it easy to input the LaTeX commands. There are several
355 kinds of completion type, begin-type, section-type, large-type, etc...
357 * Menu:
359 * Begin-type completion::
360 * Section-type completion::
361 * Large-type completion::
362 * Maketitle-type completion::
363 * Arbitrary completion::
364 * End completion::
365 * Accent completion::
366 * Image completion::
367 * Greek letters completion::
369 
370 File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion
372 Begin-type completion
373 =====================
375 "Begin-type completion" completes commands of `\begin{env}' ...
376 `\end{env}'. All of the begin-type completions begin with this key
377 sequence.
379 `[prefix] b'
380 ... start begin-type completion
382 An additional key stroke immediately completes a frequently used LaTeX
383 `\begin{}'...`\`end'{}' environment.
385 `[prefix] b c'
386 ... `\begin{center}...\end{center}'
387 `[prefix] b d'
388 ... `\begin{document}...\end{document}'
389 `[prefix] b D'
390 ... `\begin{description}...\end{description}'
391 `[prefix] b e'
392 ... `\begin{enumerate}...\end{enumerate}'
393 `[prefix] b E'
394 ... `\begin{equation}...\end{equation}'
395 `[prefix] b i'
396 ... `\begin{itemize}...\end{itemize}'
397 `[prefix] b l'
398 ... `\begin{flushleft}...\end{flushleft}'
399 `[prefix] b m'
400 ... `\begin{minipage}...\end{minipage}'
401 `[prefix] b t'
402 ... `\begin{tabbing}...\end{tabbing}'
403 `[prefix] b T'
404 ... `\begin{tabular}...\end{tabular}'
405 `[prefix] b^T'
406 ... `\begin{table}...\end{table}'
407 `[prefix] b p'
408 ... `\begin{picture}...\end{picture}'
409 `[prefix] b q'
410 ... `\begin{quote}...\end{quote}'
411 `[prefix] b Q'
412 ... `\begin{quotation}...\end{quotation}'
413 `[prefix] b r'
414 ... `\begin{flushright}...\end{flushright}'
415 `[prefix] b v'
416 ... `\begin{verbatim}...\end{verbatim}'
417 `[prefix] b V'
418 ... `\begin{verse}...\end{verse}'
420 Any other LaTeX environments are made by completing-read of the Emacs
421 function.
423 `[prefix] b SPACE'
424 ... begin-type completion
426 The next message will show up in the minibuffer
428 Begin environment(default document):
430 by typing `[prefix] b'. Put the wishing environment with completion in
431 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the
432 LaTeX source text. If the environment you want to put does not exist in
433 the YaTeX completion table, it will be registered in the user completion
434 table. YaTeX automatically saves the user completion table in the user
435 dictionary file at exiting of emacs.
437 At the completion of certain environments, the expected initial entry will
438 automatically inserted such as `\item' for `itemize' environment. If you
439 don't want the entry, it can be removed by undoing.
441 If you want to enclose some paragraphs which have already been written,
442 invoke the begin-type completion with changing the case of `b' of key
443 sequence upper(or invoke it with universal argument by `C-u' prefix).
445 The following example encloses a region with `description' environment.
447 `[prefix] B D'
448 `(or ESC 1 [prefix] b D)'
449 `(or C-u [prefix] b D)'
451 ... begin-type completion for region
453 This enclosing holds good for the completing input by `[prefix] b SPC'.
454 `[prefix] B SPC' enclose a region with the environment selected by
455 completing-read.
457 
458 File: yatexe, Node: Section-type completion, Next: Large-type completion, Prev: Begin-type completion, Up: Completion
460 Section-type completion
461 =======================
463 "Section-type completion" completes section-type commands which take an
464 argument or more such as `\section{foo}'. To invoke section-type
465 completion, type
467 `[prefix] s'
468 ... section-type completion
470 then the prompt
472 (C-v for view) \???{} (default documentclass):
474 will show up in the minibuffer. Section-type LaTeX commands are completed
475 by space key, and the default value is selected when you type nothing in
476 the minibuffer.
478 Next,
480 \section{???}:
482 prompts you the argument of section-type LaTeX command. For example, the
483 following inputs
485 \???{} (default documentclass): section
486 \section{???}: Hello world.
488 will insert the string
490 \section{Hello world.}
492 in your LaTeX source. When you neglect argument such as
494 (C-v for view) \???{} (default section): vspace*
495 \vspace*{???}:
497 YaTeX puts
499 \vspace*{}
501 and move the cursor in the braces.
503 In LaTeX command, there are commands which take more than one arguments
504 such as `\addtolength{\topmargin}{8mm}'. To complete these commands,
505 invoke section-type completion with universal argument as,
507 C-u 2 [prefix] s (or ESC 2 [prefix] s)
509 and make answers in minibuffer like this.
511 (C-v for view) \???{} (default vspace*): addtolength
512 \addtolength{???}: \topmargin
513 Argument 2: 8mm
515 `\addtolength' and the first argument `\topmargin' can be typed easily by
516 completing read. Since YaTeX also learns the number of arguments of
517 section-type command and will ask that many arguments in future
518 completion, you had better tell the number of arguments to YaTeX at the
519 first completion of the new word. But you can change the number of
520 arguments by calling the completion with different universal argument
521 again.
524 Invoking section-type completion with `[Prefix] S' (Capital `S')
525 includes the region as the first argument of section-type command.
527 The section/large/maketitle type completion can work at the prompt for
528 the argument of other section-type completion. Nested LaTeX commands are
529 efficiently read with the recursive completion by typing YaTeX's
530 completion key sequence in the minibuffer.
532 * Menu:
534 * view-sectioning::
536 
537 File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion
539 view-sectioning
540 ---------------
542 In the minibuffer at the prompt of section-type command completion,
543 typing `C-v' shows a list of sectioning commands in source text(The line
544 with `<<--' mark is the nearest sectioning command). Then, default
545 sectioning command appears in the minibuffer. You can go up/down
546 sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing
547 buffer by `C-v'/`M-v', and can hide sectioning commands under certain
548 level by 0 through 6. Type `?' in the minibuffer of sectioning prompt
549 for more information.
551 You can generate this listing buffer (`*Sectioning Lines*' buffer) by
552 typing
553 `M-x YaTeX-section-overview'
554 ... Generate *Sectioning Lines* buffer
556 from the LaTeX source buffer. In this listing buffer, typing `u' on the
557 sectioning command shifts up the corresponding sectioning command in
558 source text and `d' shifts down. After marking lines in the listing
559 buffer, typing `U' shifts up all sectioning commands in the region, and
560 `U' shifts down. Here are all the key bindings of `*Sectioning Lines*'
561 buffer.
563 `SPC'
564 ... Jump to corresponding source line
565 `.'
566 ... Display corresponding source line
567 `u'
568 ... Shift up a sectioning line
569 `d'
570 ... Shift down a sectioning line
571 `U'
572 ... Shift up sectioning lines in region
573 `D'
574 ... Shift down sectioning lines in region
575 `0...6'
576 ... Hide sectioning commands whose level is lower than n
579 
580 File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Section-type completion, Up: Completion
582 Large-type completion
583 =====================
585 "Large-type completion" inputs the font or size changing descriptions
586 such as `{\large }'. When you type
588 `[prefix] l'
589 ... large-type completion
591 the message in the minibuffer
593 {\??? } (default large):
595 prompts prompts you large-type command with completing-read. There are
596 TeX commands to change fonts or sizes, `it', `huge' and so on, in the
597 completion table.
599 Region-based completion is also invoked by changing the letter after
600 prefix key stroke as `[prefix] L'. It encloses the region by braces with
601 large-type command.
603 
604 File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion
606 Maketitle-type completion
607 =========================
609 We call it "maketitle-type completion" which completes commands such as
610 `\maketitle'. Take notice that maketitle-type commands take no arguments.
611 Then, typing
613 `[prefix] m'
614 ... maketitle-type completion
616 begins maketitle-completion. Above mentioned method is true for
617 maketitle-completion, and there are LaTeX commands with no arguments in
618 completion table.
620 
621 File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion
623 Arbitrary completion
624 ====================
626 You can complete certain LaTeX command anywhere without typical
627 completing method as described, by typing
629 `[prefix] SPC'
630 ... arbitrary completion
632 after the initial string of LaTeX command that is preceded by `\'.
634 
635 File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion
637 End completion
638 ==============
640 YaTeX automatically detects the opened environment and close it with
641 \`\end{environment}'. Though proficient YaTeX users never fail to make
642 environment with begin-type completion, some may begin an environment
643 manually. In that case, type
645 `[prefix] e'
646 ... `end' completion
648 at the end of the opened environment.
650 
651 File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion
653 Accent completion
654 =================
656 When you want to write the European accent marks(like `\`{o}'),
658 `[prefix] a'
659 ... accent completion
661 shows the menu
663 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
665 in the minibuffer. Chose one character or corresponding numeric, and you
666 will see
668 \`{}
670 in the editing buffer with the cursor positioned in braces. Type one more
671 character `o' for example, then
673 \`{o}
675 will be completed, and the cursor gets out from braces.
677 
678 File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion
680 Image completion of mathematical sign
681 =====================================
683 Arrow marks, sigma mark and those signs mainly used in the TeX's math
684 environment are completed by key sequences which imitate the corresponding
685 symbols graphically. This completion only works in the math environment.
686 YaTeX automatically detects whether the cursor located in math environment
687 or not, and change the behavior of key strokes `;' and `:'.
689 By the way, we often express the leftarrow mark by `<-' for example.
690 Considering such image, you can write `\leftarrow' by typing `<-' after
691 `;' (semicolon) as a prefix. In the same way, `\longleftarrow' (`<--') is
692 completed by typing `;<--', infinity mark which is imitated by `oo' is
693 completed by typing `;oo'.
695 Here are the sample operations in YaTeX math-mode.
697 INPUT Completed LaTeX commands
698 ; < - `\leftarrow'
699 ; < - - `\longleftarrow'
700 ; < - - > `\longleftrightarrow'
701 ; o `\circ'
702 ; o o `\infty'
704 In any case, you can quit from image completion and can move to the next
705 editing operation if the LaTeX command you want is shown in the buffer.
707 `;' itself in math-environment is inserted by `;;'. Typing `TAB' in the
708 midst of image completion shows all of the LaTeX commands that start with
709 the same name as string you previously typed in. In this menu buffer,
710 press `RET' after moving the cursor (by `n', `p', `b', `f') to insert the
711 LaTeX command.
713 To know all of the completion table, type `TAB' just after `;'. And
714 here is the sample menu by `TAB' after `;<'.
716 KEY LaTeX sequence sign
717 < \leq <
718 ~
719 << \ll <<
720 <- \leftarrow <-
721 <= \Leftarrow <=
723 You can define your favorite key-vs-sequence completion table in the
724 Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also
725 `yatexmth.el' for the information of the structure of this variable.
727 
728 File: yatexe, Node: Greek letters completion, Prev: Image completion, Up: Completion
730 Greek letters completion
731 ========================
733 Math-mode of YaTeX provides another image completion, Greek letters
734 completion in the same method. After prefix `:', typing `a' makes
735 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type
736 `:TAB' to know all the correspondence of alphabets vs. Greek letters.
738 If you will find `;' or `:' doesn't work in correct position of math
739 environment, it may be a bug of YaTeX. Please send me a bug report with
740 the configuration of your text, and avoid it temporarily by typing `;' or
741 `:' after universal-argument(`C-u') which forces `;' and `:' to work as
742 math-prefix.
744 
745 File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top
747 Local dictionaries
748 ******************
750 Tables for completion consist of three dictionaries; `standard
751 dictionary' built in `yatex.el', `user dictionary' for your common private
752 commands, and `local dictionary' that is effective in a certain directory.
754 When you input the command unknown to YaTeX at a completion in the
755 minibuffer, YaTeX asks you with the following prompt;
757 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard
759 In this menu, typing `u' updates your `user dictionary', `l' updates your
760 local dictionary, `n' updates only on-memory dictionary which go through
761 only current Emacs session, and `d' updates no dictionary and throws the
762 new word away.
764 If you find this switching feature meaningless and bothersome, put the
765 next expression into your `~/.emacs'
767 (setq YaTeX-nervous nil)
769 
770 File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top
772 Commenting out
773 **************
775 You may want to comment out some region.
777 `[prefix] >'
778 ... comment out region by %
779 `[prefix] <'
780 ... uncomment region
782 cause an operation to the region between point and mark.
784 `[prefix] .'
785 ... comment out current paragraph
786 `[prefix] ,'
787 ... uncomment current paragraph
789 comments or uncomments the paragraph where the cursor belongs. This
790 `paragraph' means the region marked by the function mark-paragraph, bound
791 to `ESC h' by default. It is NOT predictable what will happen when you
792 continuously comment out some paragraph many times.
794 You can also comment out an environment between `\begin' and `\end', or
795 a `\begin'-\`\end' pair themselves, by making the following key strokes on
796 the line where `\begin{}' or `\end{}' exists.
798 `[prefix] >'
799 ... comment out from \begin to \`end'
800 `[prefix] <'
801 ... uncomment from \begin to \`end'
803 comment whole the contents of environment. Moreover,
805 `[prefix] .'
806 ... comment out \begin and \`end'
807 `[prefix] ,'
808 ... uncomment \begin and \`end'
810 (un)comments out only environment declaration: `\begin{}' and `\end{}'.
811 NOTE that even if you intend to comment out some region, invoking
812 `[prefix] >' on the `\begin',`\end' line decides to work in `commenting
813 out from `\begin' to `\end'' mode.
816 
817 File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top
819 Cursor jump
820 ***********
823 * Menu:
825 * Jump to corresponding object::
826 * Invoking image processor::
827 * Jump to main file::
828 * Jumping around the environment::
829 * Jumping to last completion position::
831 
832 File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump
834 Jump to corresponding object
835 ============================
837 Typing
839 `[prefix] g'
840 ... go to corresponding object
842 in a certain place move the cursor to the place corresponding to the LaTeX
843 command of last place. YaTeX recognize the followings as pairs that have
844 relation each other.
846 * `\begin{}' <-> `\end{}'
847 * `%#BEGIN' <-> `%#END'
848 * On the image-including line -> corresponding viewer or drawing tool
849 * `\label{}' <-> `\ref{}'
850 * `\include(\input)' -> included file
851 * `\bibitem{}' <-> `\cite{}'
853 On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the
854 corresponding `\end',`\begin' line, if its partner really exists. The
855 behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the
856 correspondent of `label/ref' or `cite/bibitem' exists in another file,
857 that file have to be opened to make a round trip between references by
858 `[prefix] g'.
860 If you type `[prefix] g' on the line of `\include{chap1}', typically in
861 the main text, YaTeX switches buffer to `chap1.tex'.
863 `[prefix] 4 g'
864 ... go to corresponding object in other window
866 do the same job as `[prefix] g' except it's done in other window. Note
867 that this function doesn't work on `begin/end', `%#BEGIN/%#END' pairs
868 because it is meaningless.
870 
871 File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump
873 Invoking image processor
874 ========================
877 `image-including line' described above means such lines as
878 `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX
879 automatically searches source of `foo.ps' and invokes image viewer or
880 drawing tool correspoinding to it. For example; if you draw an image
881 foo.obj with Tgif and enclose its product named foo.eps by `\epsfile'
882 command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif
883 foo.obj'. How a processor is choosen is as follows.
885 1. If there is an expression matching with one of the pattern defined in
886 `YaTeX-processed-file-regexp-alist', extract file name from regexp
887 group surrounded by \\(\\). (Which group corresponds is written in
888 the cdr part of each list.) If no matches were found, do nothing.
889 2. If there is a pattern as `%PROCESSOR' which is defined in the
890 variable `YaTeX-file-processor-alist', call that processor giving the
891 file name with corresponding extension.
892 3. If not, check the existence of each file which is supplied the
893 extension in the cdr part of each list of
894 `YaTeX-file-processor-alist'. If any, call the corresponding image
895 viewer or drawing tool.
897 
898 File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump
900 Jump to main file
901 =================
903 Typing
905 `[prefix] ^'
906 ... visit main file
907 `[prefix] 4^'
908 ... visit main file in other buffer
910 in a sub text switch the buffer to the main text specified by `%#!'
911 notation.
913 
914 File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump
916 Jumping around the environment
917 ==============================
919 And these are the functions which work on the current LaTeX environment:
921 `M-C-a'
922 ... beginning of environment
923 `M-C-e'
924 ... `end' of environment
925 `M-C-@'
926 ... mark environment
928 
929 File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump
931 Jumping to last completion position
932 ===================================
934 YaTeX always memorize the position of completion into register `3'. So
935 every time you make a trip to any other part of text other than you are
936 writing, you can return to the editing paragraph by calling
937 register-to-point with argument YaTeX-current-position-register, which is
938 achieved by typing `C-x j 3'(by default).
940 
941 File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top
943 Changing and Deleting
944 *********************
946 These functions are for change or deletion of LaTeX commands already
947 entered.
949 `[prefix] c'
950 ... change LaTeX command
951 `[prefix] k'
952 ... kill LaTeX command
954 * Menu:
956 * Changing LaTeX commands::
957 * Killing LaTeX commands::
959 
960 File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting
962 Changing LaTeX commands
963 =======================
965 `[prefix] c' can change the various (La)TeX commands. This can change the
966 followings.
967 * Environment names
968 * Section-type commands
969 * Argument of section-type commands
970 * Optional parameters (enclosed by []) of section-type commands
971 * Font/size designators
972 * Math-mode's maketitle-type commands that can be inputted with image
973 completion
975 Typing `[prefix] c' on one of above objects you want to change brings a
976 suitable reading function sometimes with completion. Note: If you want to
977 change the argument of section-type command that contains other LaTeX
978 commands, type `[prefix] c' either of surrounding braces of the argument
979 in order to make YaTeX ignore the internal LaTeX sequences as an object of
980 changing. Anyway, it is very difficult to know which argument position
981 the cursor belongs because the LaTeX commands can be nested and braces can
982 freely emerge. So keep it mind to put the cursor on a brace when you are
983 thinking of changing a complicated argument.
985 
986 File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting
988 Killing LaTeX commands
989 ======================
991 `[prefix] k' kills the LaTeX commands sometimes with their arguments.
992 Following table illustrates the correspondence of the invoking position
993 and what is killed.
995 [Invoking position] [action]
996 \begin, \end line kill \begin,\end pairs
997 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
998 on a Section-type command kill section-type command
999 on a parenthesis kill parentheses
1001 Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines
1002 `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take
1003 care not to create any line that contains more than one `\begin' or so.
1005 While all operations above are to kill `containers' which surround some
1006 text, universal argument (`C-u') for these commands kills not only
1007 `containers' but also `contents' of them. See below as a sample.
1009 Original text: [prefix] k C-u [prefix] k
1010 Main \footnote{note} here. Main note here. Main here.
1011 ~(cursor)
1014 File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top
1016 Filling
1017 *******
1020 Filling an item
1021 ===============
1023 To fill a term (descriptive sentences) of `\item', type
1025 `M-q'
1026 ... fill item
1028 on that item.
1030 YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular
1031 expression to search item header in itemize environment. If you make a
1032 newcommand to itemize terms(e.g. `\underlineitem'), put
1034 (setq YaTeX-item-regexp
1035 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1037 in your `~/.emacs'. If you are not familiar with regular expression for
1038 Emacs-Lisp, name a newcommand for `itemize' beginning with `\item' such as
1039 `\itembf', not `\bfitem'.
1041 This function reformats the `\item' into `hang-indented' style. For
1042 example:
1044 itemize, enumerate environment:
1046 >\item[foo] `foo' is the typical word for describing an
1047 > arbitrarily written....
1048 description environment:
1049 > \item[bar] When the word `for' is used as an arbitrarily
1050 > word, `bar' is bound to follow it.
1052 Note that the indent depth of an `\item' word and its descriptive
1053 paragraph are the same in latter case. If you want to use different
1054 depth, invoke fill-paragraph at the beginning of non-whitespace
1055 character(see below).
1058 Filling paragraph
1059 =================
1061 Fill-paragraph is little bit adapted for LaTeX sources. It retains from
1062 filling in certain environments where formatting leads to a disaster such
1063 as verbatim, tabular, or so. And it protects `\verb' expressions from
1064 being folded (The variable `YaTeX-verb-regexp' controls this). Besides,
1065 putting cursor on the first occurrence of non-whitespace character on a
1066 line changes the fill-prefix temporarily to the depth of the line.
1069 File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top
1071 Updation of `\includeonly'
1072 **************************
1074 When you edit splitting source texts, the notation
1076 \includeonly{CurrentEditingFileName}
1078 in the main file reduces the time of typesetting. If you want to hack
1079 other file a little however, you have to rewrite it to
1081 \includeonly{OtherFileNameYouWantToFix}
1083 in the main file. YaTeX automatically detects that the current edited
1084 text is not in includeonly list and prompts you
1086 A)dd R)eplace %)comment?
1088 in the minibuffer. Type `a' if you want to add the current file name to
1089 `\includeonly' list, `r' to replace \`includeonly' list with the current
1090 file, and type `%' to comment out the `\includeonly' line.
1093 File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top
1095 What column?
1096 ************
1098 We are often get tired of finding the corresponding column in large
1099 tabulars. For example,
1101 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
1102 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1103 Home Addr.&Home Phone\\ \hline
1104 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1105 zzz-www & Japan & 9876-54321 \\
1106 & 2 & \multicolumn{2}{c|}{Unknown}
1107 &&&(???)
1108 \\ \hline
1109 \end{tabular}
1111 Suppose you have the cursor located at `(???)' mark, can you tell which
1112 column it is belonging at once? Maybe no. In such case, type
1114 `[prefix] &'
1115 ... What column
1117 in that position. YaTeX tells you the column header of the current field.
1118 Since YaTeX assumes the first line of tabular environment as a row of
1119 column headers, you can create a row of virtual column headers by putting
1120 them in the first line and commenting that line with `%'.
1123 File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top
1125 Intelligent newline
1126 *******************
1128 At the end of begin-type completion of tabular[*], array, itemize,
1129 enumerate or tabbing environment, or typing
1131 `ESC RET'
1132 ... Intelligent newline
1134 in these environments inserts the contents corresponding to the current
1135 environment in the next line. (At the begin-type completion, this
1136 contents can be removed by `undo'.) In `tabular' environment, for
1137 example, `ESC RET' inserts the certain number of `&' and trailing `\\',
1138 and `\hline' if other `\hline' is found in backward. Here are the list of
1139 contents vs. environments.
1141 * `tabular', `tabular*', `array'
1143 Corresponding number of `&' and `\\'.
1144 And `\hline' if needed.
1146 * `tabbing'
1148 The same number of `\>' as `\=' in the first line.
1150 * `itemize', `enumerate', `description', `list'
1152 `\item' or `item[]'.
1154 Note that since this function works seeing the contents of the first
1155 line, please call this after the second line if possible.
1157 If you want to apply these trick to other environments, `foo'
1158 environment for example, define the function named
1159 `YaTeX-intelligent-newline-foo' to insert corresponding contents. That
1160 function will be called at the beginning of the next line after the
1161 newline is inserted to the current line. Since the function
1162 `YaTeX-indent-line' is designed to indent the current line properly,
1163 calling this function before your code to insert certain contents must be
1164 useful. See the definition of the function
1165 `YaTeX-intelligent-newline-itemize' as an example.
1168 File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top
1170 Usepackage checker
1171 ******************
1173 When you input begint-type, section-type, maketitle-type macros with
1174 completion, and it requires some LaTeX2e package, YaTeX examines the
1175 existence of correct `\usepackage'. If not, YaTeX inserts the
1176 `\usepackage{}' declaration corresponding to input macro.
1178 To activate the package completion for your favarite package, set the
1179 variable `YaTeX-package-alist-private' correctly. Please refere the value
1180 of `YaTeX-package-alist-default' as an example.
1183 File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top
1185 Online help
1186 ***********
1188 YaTeX provides you the online help with popular LaTeX commands.
1190 Here are the key strokes for the online help.
1192 `[prefix] ?'
1193 ... Online help
1194 `[prefix] /'
1195 ... Online apropos
1198 Online help
1199 ===========
1201 `Online help' shows the documentation for the popular LaTeX
1202 commands(defaults to the commands on the cursor) in the next buffer.
1203 There are two help file, `global help' and `private help'. The former
1204 file contains the descriptions on the standard LaTeX command and is
1205 specified its name by variable `YaTeX-help-file'. Usually, the global
1206 help file should be located in public space (`$EMACSEXECPATH' by default)
1207 and should be world writable so that anyone can update it to enrich its
1208 contents. The latter file contains descriptions on non-standard or
1209 personal command definitions and is specified by
1210 `YaTeX-help-file-private'. This file should be put into private
1211 directory.
1214 Online apropos
1215 ==============
1217 `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all
1218 the documentations that contains the keyword entered by the user.
1221 When no descriptions are found...
1222 =================================
1224 If there is no description on a command in help files, YaTeX requires
1225 you to write a description on that command. If you are willing to do,
1226 determine which help file to add and write the description on it referring
1227 your manual of (La)TeX. Please send me your additional descriptions if
1228 you describe the help on some standard commands. I might want to include
1229 it in the next distribution.
1232 File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top
1234 Browsing file hierarchy
1235 ***********************
1237 When you are editing multi-file source, typing
1239 `[prefix] d'
1240 ... browse file hierarchy
1242 asks you the parent-most file (which may be defaulted) and displays the
1243 documentation hierarchy in the next window. In this buffer, the following
1244 commands are available.
1246 `n'
1247 ... move to the next line and show its contents
1248 `p'
1249 ... move to the previous line and show its contents
1250 `N'
1251 ... move to the next file in the same inclusion level
1252 `P'
1253 ... move to the previous file in the same inclusion level
1254 `j'
1255 ... move to the next line
1256 `k'
1257 ... move to the previous line
1258 `u'
1259 ... move to the parent file
1260 `.'
1261 ... show the current files contents in the next window
1262 `SPC'
1263 ... scroll up the current file window
1264 `DEL, b'
1265 ... scroll down the current file window
1266 `<'
1267 ... show the beginning of the current file
1268 `>'
1269 ... show the end of the current file
1270 `>'
1271 ... return to the previous postion after `<' or `>'
1272 `RET, g'
1273 ... open the current file in the next window
1274 `mouse-2'
1275 ... same as RET(available only with window system)
1276 `o'
1277 ... other window
1278 `1'
1279 ... delete other windows
1280 `-'
1281 ... shrink hierarchy buffer window
1282 `+'
1283 ... enlarge hierarchy buffer window
1284 `?'
1285 ... describe mode
1286 `q'
1287 ... quit
1289 Note that operations on the file contents in the next window do not work
1290 correctly when you close the corresponding file.
1293 File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top
1295 Cooperation with other packages
1296 *******************************
1298 YaTeX works better with other brilliant packages.
1301 gmhist
1302 ======
1304 When you are loading `gmhist.el' and `gmhist-mh.el', you can use
1305 independent command history list at the prompt of preview command
1306 (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you
1307 can enter the previous command line string repeatedly by typing `M-p'.
1310 min-out
1311 =======
1313 `min-out', the outline minor mode, can be used in yatex-mode buffers.
1314 If you want to use it with YaTeX, please refer the file `yatexm-o.el' as
1315 an example.
1318 File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top
1320 Customizations
1321 **************
1323 You can customize YaTeX by setting Emacs-Lisp variables and by making
1324 add-in functions.
1326 * Menu:
1328 * Lisp variables::
1329 * Add-in functions::
1330 * Add-in generator::
1333 File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations
1335 Lisp variables
1336 ==============
1338 You can change the key assignments or make completion more comfortable
1339 by setting the values of various variables which control the movement of
1340 yatex-mode.
1342 For example, if you want to change the prefix key stroke from `C-c' to
1343 any other sequence, set YaTeX-prefix to whatever you want to use. If you
1344 don't want to use the key sequence `C-c letter' which is assumed to be the
1345 user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter'
1346 to `t', and all of the default key bind of `C-c letter' will turn to the
1347 corresponding `C-c C-letter' (but the region based completions that is
1348 invoked with `C-c Capital-letter' remain valid, if you want to disable
1349 those bindings, set that variable to 1 instead of `t').
1351 * Menu:
1353 * All customizable variables::
1354 * Sample definitions::
1355 * Hook variables::
1356 * Hook file::
1359 File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables
1361 All customizable variables
1362 --------------------------
1364 Here are the customizable variables of yatex-mode. Each value setq-ed
1365 in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected.
1366 Parenthesized contents stands for the default value. When you are to
1367 change some of these variables, see more detailed documentation of the
1368 variable by `M-x describe-variable'.
1370 -- Variable: YaTeX-japan
1371 Set this nil to produce all messages in English (`Depends on Japanese
1372 feature of Emacs')
1374 -- Variable: YaTeX-kanji-code
1375 Default buffer-file-coding-system for YaTeX modes' buffer. Set this
1376 0 to no language conversion. Nil to preserve original coding-system.
1377 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (`1 or 2')
1379 -- Variable: YaTeX-prefix
1380 Prefix key stroke (`C-c')
1382 -- Variable: YaTeX-inhibit-prefix-letter
1383 Change key stroke from `C-c letter' to `C-c C-letter' (`nil')
1385 -- Variable: YaTeX-fill-prefix
1386 Fill-prefix used in yatex-mode (`nil')
1388 -- Variable: YaTeX-user-completion-table
1389 Name of user dictionary where learned completion table will be
1390 stored. (`"~/.yatexrc"')
1392 -- Variable: tex-command
1393 LaTeX typesetter command (`"latex"')
1395 -- Variable: dvi2-command
1396 Preview command (`"xdvi -geo +0+0 -s 4"')
1398 -- Variable: dviprint-command-format
1399 Command format to print dvi file (`"dvi2ps %f %t %s | lpr"')
1401 -- Variable: dviprint-from-format
1402 Start page format of above %f. %b will turn to start page (`"-f %b"')
1404 -- Variable: dviprint-to-format
1405 End page format of above %t. %e will turn to `end' page (`"-t %e"')
1407 -- Variable: makeindex-command
1408 Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS))
1410 -- Variable: YaTeX-dvipdf-command
1411 Default command name to convert .dvi to PDF (`"dvipdfmx"')
1413 -- Variable: YaTeX-need-nonstop
1414 Put `\nonstopmode{}' or not (`nil')
1416 -- Variable: latex-warning-regexp
1417 Regular expression of warning message latex command puts out
1418 (`"line.* [0-9]*"')
1420 -- Variable: latex-error-regexp
1421 Regular expression of error message (`"l\\.[1-9][0-9]*"')
1423 -- Variable: latex-dos-emergency-message
1424 Message latex command running on DOS puts at abort (`"Emergency
1425 stop"')
1427 -- Variable: YaTeX-item-regexp
1428 Regular expression of item command (`"\\\\item"')
1430 -- Variable: YaTeX-verb-regexp
1431 Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"')
1433 -- Variable: YaTeX-nervous
1434 T for using local dictionary (`t')
1436 -- Variable: YaTeX-sectioning-regexp
1437 Regexp of LaTeX sectioning command
1438 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"')
1440 -- Variable: YaTeX-fill-inhibit-environments
1441 Inhibit fill in these environments (`'("tabular" "tabular*" "array"
1442 "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath"
1443 "verbatim" "verbatim*")')
1445 -- Variable: YaTeX-uncomment-once
1446 T for deleting all preceding `%' (`nil')
1448 -- Variable: YaTeX-close-paren-always
1449 T for always close all parenthesis automatically, `nil' for only eol
1450 (`t')
1452 -- Variable: YaTeX-auto-math-mode
1453 Switch math-mode automatically (`t')
1455 -- Variable: YaTeX-math-key-list-private
1456 User defined alist, math-mode-prefix vs completion alist used in
1457 image completion (`nil'). See `yatexmth.el' for the information
1458 about how to define a completion alist.
1460 -- Variable: YaTeX-default-pop-window-height
1461 Initial height of typesetting buffer when one-window. Number for the
1462 lines of the buffer, numerical string for the percentage of the
1463 screen-height. `nil' for half height (10)
1465 -- Variable: YaTeX-help-file
1466 Global online help file name
1467 (`$doc-directory/../../site-lisp/YATEXHLP.eng')
1469 -- Variable: YaTeX-help-file-private
1470 Private online help file name (`"~/YATEXHLP.eng"')
1472 -- Variable: YaTeX-no-begend-shortcut
1473 Disable [prefix] b ?? shortcut (`nil)'
1475 -- Variable: YaTeX-hilit-pattern-adjustment-private
1476 List of the list that contain the regular expression and the symbol
1477 of logical meaning of the string that matches the pattern. See also
1478 the value from `(assq 'yatex-mode hilit-patterns-alist)' and the
1479 value of `YaTeX-hilit-pattern-adjustment-default' (and even the
1480 document of hilit19.el).
1482 -- Variable: YaTeX-sectioning-level
1483 Alist of LaTeX's sectioning command vs its height.
1485 -- Variable: YaTeX-hierarchy-ignore-heading-regexp
1486 `YaTeX-display-hierarchy' searches for sectioning command first, and
1487 comment line secondary as a file headings. In latter case, ignore lines
1488 that match with regular expression of this variable. Default value of
1489 this variable is RCS header expressions and mode specifying line `-*- xxxx
1490 -*'.
1492 -- Variable: YaTeX-skip-default-reader
1493 Non-nil for this variable skips the default argument reader of
1494 section-type command when add-in function for it is not defined
1495 (`nil')
1497 -- Variable: YaTeX-create-file-prefix-g
1498 When typing `prefix g' on the `\include' line, open the target file
1499 even if the file doesn't exist (`nil')
1501 -- Variable: YaTeX-simple-messages
1502 Simplyfy messages of various completions (`nil')
1504 -- Variable: YaTeX-hilit-sectioning-face
1505 When hilit19 and yatex19 is active, YaTeX colors the sectioning
1506 commands. This variable specifies the foreground and background
1507 color of `\part' macro. The default value is `'(yellow/dodgerblue
1508 yellow/slateblue)'. The first element of this list is for the screen
1509 when `hilit-background-mode' is `'light', and the second element is
1510 for `'dark'. You should specify both color as `forecolor/backcolor'.
1512 -- Variable: YaTeX-hilit-sectioning-attenuation-rate
1513 When color mode, this variable specifies how much attenuate the color
1514 density of `\subparagraph' compared with that of `\chapter' (`'(15
1515 40)') See also `YaTeX-hilit-sectioning-face'.
1517 -- Variable: YaTeX-use-AMS-LaTeX
1518 If you use AMS-LaTeX, set to `t' (`nil')
1520 -- Variable: YaTeX-use-LaTeX2e
1521 If you use LaTeX2e, set to `t' (`t')
1523 -- Variable: YaTeX-template-file
1524 File name which is automatically inserted at creation
1525 (`~/work/template.tex')
1527 -- Variable: YaTeX-search-file-from-top-directory
1528 Non-nil means to search input-files from the directory where main
1529 file exists (`t')
1531 -- Variable: YaTeX-use-font-lock
1532 Use font-lock to fontify buffer or not (`(featurep 'font-lock)'
1534 -- Variable: YaTeX-use-hilit19
1535 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)'
1537 -- Variable: YaTeX-use-italic-bold
1538 YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20
1539 or later). This variable is effective only when font-lock is used.
1540 (`(featurep 'hilit19)'
1542 -- Variable: YaTeX-singlecmd-suffix
1543 Suffix which is always inserted after maketitle-type macros. `"{}"'
1544 is recommended.
1546 -- Variable: YaTeX-package-alist-private
1547 Alist of LaTeX2e-package name vs. lists of macros in it. Set this
1548 alist properly and YaTeX automatically check the declaratiion of
1549 `usepackage' for corresponding macro, when you input that macro with
1550 completion. If required `usepackage' is not found, YaTeX also
1551 automatically inserts `\usepackage'. Alist is as follows;
1552 '((PackageName1
1553 (completionType ListOfMacro)
1554 (completionType ListOfMacro))
1555 (PackageName2
1556 (completionType ListOfMacro)
1557 (completionType ListOfMacro...))....) completionType is
1558 one of `env, section, maketitle'. Consult the value of
1559 `YaTeX-package-alist-default' as an example.
1561 -- Variable: YaTeX-tabular-indentation
1562 At indentation by `C-i' in tabular or array environment, YaTeX put
1563 the additional spaces to the normail indentation depth. The number
1564 of additional spaces is the product of YaTeX-tabular-indentation and
1565 the number of column position in tabular.
1567 -- Variable: YaTeX-noindent-env-regexp
1568 Regexp of environment names that should begin with no indentation.
1569 All verbatime-like environment name should match with.
1571 -- Variable: YaTeX-ref-default-label-string
1572 Default \\ref time string format. This format is like strftime(3)
1573 but allowed conversion char are as follows; %y -> Last 2 digit of
1574 year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H ->
1575 Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal
1576 conversion of yymmdd. %qX -> alphabetical-decimal conversion of
1577 HHMMSS. Beware defualt label-string should be always unique. So
1578 this format string should have both time part (%H+%M+%S or %qX) and
1579 date part (%y+(%b|%m)+%d or %qx).
1581 -- Variable: YaTeX-ref-generate-label-function
1582 Function to generate default label string for unnamed \\label{}s.
1583 The function pointed to this value should take two arguments. First
1584 argument is LaTeX macro's name, second is macro's argument. Here is
1585 an example for using this value.
1586 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label)
1587 (defun my-yatex-generate-label (command value)
1588 (and (string= command "caption")
1589 (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t)
1590 (setq command (match-string 1)))
1591 (let ((alist '(("chapter" . "chap")
1592 ("section" . "sec")
1593 ("subsection" . "subsec")
1594 ("figure" . "fig")
1595 ("table" . "tbl"))))
1596 (if (setq command (cdr (assoc command alist)))
1597 (concat command ":" value)
1598 (YaTeX::ref-generate-label nil nil))))
1602 File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables
1604 Sample definitions
1605 ------------------
1607 For instance, to change the prefix key stroke to `ESC', and name of the
1608 user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB
1609 character, add the following `setq' to `~/.emacs'.
1611 (setq YaTeX-prefix "\e"
1612 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1613 YaTeX-fill-prefix " ")
1616 File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables
1618 Hook variables
1619 --------------
1621 More customizations will be done by the hook-function defined in
1622 hook-variable `yatex-mode-hook'. This is useful to define a shortcut key
1623 sequence to enter some environments other than `document' and `enumerate'
1624 etc. The following statement defines `[prefix] ba' to enter
1625 `\begin{abstract}' ... `=end{abstract}' immediately.
1627 (setq yatex-mode-hook
1628 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1630 You should use functions `YaTeX-define-key', or
1631 `YaTeX-define-begend-key' to define all the key sequences of yatex-mode.
1634 File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables
1636 Hook file
1637 ---------
1639 You can stuff all of YaTeX related expressions into a file named
1640 `yatexhks.el' if you have a lot of codes. YaTeX automatically load this
1641 file at the initialization of itself. Using `yatexhks.el' makes
1642 `yatex-mode-load-hook' unnecessary.
1645 File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations
1647 Add-in functions
1648 ================
1650 You can easily define a function to input detailed arguments with
1651 completion according to LaTeX environments or commands.
1654 What is add-in functions?
1655 -------------------------
1657 When you input `tabular' environment, don't you think "I want YaTeX to
1658 complete its argument toward my favorite one such as `{|c|c|c|}'..."?
1659 Yes, you can define the function to complete arguments for any environment
1660 and any LaTeX commands.
1663 Procedure
1664 ---------
1666 Here is the procedure to define add-in functions.
1667 1. Define the function
1668 2. Put the function into `yatexhks.el'
1670 * Menu:
1672 * How the add-in function works::
1673 * How the function is called::
1674 * Useful functions for creating add-in::
1675 * Contribution::
1678 File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions
1680 How the add-in function works
1681 -----------------------------
1683 There are three types of add-in.
1685 1. Option add-in
1686 2. argument add-in
1687 3. enclosing add-in
1689 "Option add-in" returns the LaTeX's optional parameters such as optional
1690 strings after `\begin{ENV}', optional strings between a section-type
1691 command and its first argument, and optional strings just after type
1692 maketitle-type command. The following illustrates the name of add-in
1693 functions, where underlined strings are generated by add-in functions.
1695 \begin{table}[ht] (Function name: YaTeX:table)
1696 ~~~~
1697 \put(100,200){} (Function name: YaTeX:put)
1698 ~~~~~~~~~
1699 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1700 ~~~~~~~~~~
1702 Obviously, the function name is decided by concatenating the prefix
1703 `YaTeX:' and LaTeX command's name.
1705 Another add-in type is "argument add-in", which completes arguments for
1706 section-type commands.
1708 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1709 ~~~~ ~~~
1711 When the section-type command is inputted, the function named by
1712 concatenating `YaTeX::' and section-type command, is called automatically
1713 with an integer argument which indicates which argument of section-type
1714 command is being read. Thus the add-in should determine the job referring
1715 the value of its argument.
1717 "enclosing add-in" is for modifying and/or checking the region that will
1718 be enclosed by section-type commands via `[prefix] S'. An enclosing
1719 add-in function will be called with two arguments, beginning of the
1720 enclosed region and end of the region. Suppose you want to enclose the
1721 existing text `(a+b)/c' by `\frac{}'.
1723 a/c
1724 | |
1725 A B
1727 You do set-mark-command at point A and then move to point B. Typing
1728 `[prefix] S' and input `frac' enclose the region like this;
1730 \frac{a/c}
1732 Normally, the expression `a/c' is translated to `\frac{a}{c}'. An
1733 enclosing add-in is useful for modifying `/' to `}{'.
1735 * Menu:
1737 * Defining option-add-in::
1738 * Defining argument-add-in::
1739 * Defining enclosing-add-in::
1742 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
1744 Defining `option add-in'
1745 ........................
1747 If you want `{|c|c|c|}' for all `tabular' environment,
1749 (defun YaTeX:tabular ()
1750 "{|c|c|c|}")
1752 is enough. If you want more complicated format, define as below.
1754 (defun YaTeX:tabular ()
1755 "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}")
1757 Note that the character `\' must be described as `\\' in Emacs-Lisp. The
1758 next example reads the tabular format from keyboard.
1759 (defun YaTeX:tabular ()
1760 (concat "{" (read-string "Rule: ") "}"))
1763 File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works
1765 Defining `argument add-in'
1766 ..........................
1768 This section describes how to define the add-in function for
1769 `\newcommand'.
1771 The first argument of `\newcommand' begins always with `\'. The second
1772 argument is usually so complex that we can not edit them in the
1773 minibuffer. Here is the created function considering this.
1775 (defun YaTeX::newcommand (n) ;n is argument position
1776 (cond
1777 ((= n 1) ;1st argument is macro name
1778 (read-string "Command: " "\\")) ;initial input `\'
1779 ((= n 2) "") ;do nothing when reading arg#2
1780 (t nil)))
1782 Note that when the `argument add-in' function return `nil', normal
1783 argument reader will be called.
1786 File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works
1788 Defining `enclosing add-in'
1789 ...........................
1791 This section describes how to define the add-in function for text
1792 enclosed by `\frac{}'.
1794 When enclosing the text `5/3' by `\frac{}', you might want to replace
1795 `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two
1796 arguments, beginning of enclosed text and end of enclosed text. The
1797 function is expected to replace `/' with `}{'. Here is an example
1798 expression.
1800 (defun YaTeX::frac-region (beg end)
1801 (catch 'done
1802 (while (search-forward "/" end t)
1803 (goto-char (match-beginning 0))
1804 (if (y-or-n-p "Replace this slash(/) with `}{'")
1805 (throw 'done (replace-match "}{")))
1806 (goto-char (match-end 0)))))
1809 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
1811 How the function is called
1812 --------------------------
1814 YaTeX calls the add-in functions for specified begin-type, section-type,
1815 and maketitle-type command, if any. `Option add-in' functions for
1816 begin-type are called when `\begin{ENV}' has been inserted, functions for
1817 section-type are called just before input of the first argument, and
1818 functions for maketitle-type is called after maketitle-type command has
1819 been inserted. `Argument add-in' functions are called at each entry of
1820 arguments for section-type commands.
1823 File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions
1825 Useful functions for creating add-in
1826 ------------------------------------
1828 Many add-in functions for typical LaTeX commands are defined in
1829 `yatexadd.el'. Those are also useful as references. Here are the short
1830 descriptions on useful functions, where [F] means function, [A] means
1831 arguments, [D] means description.
1833 `[F]'
1834 YaTeX:read-position
1835 `[A]'
1836 Character list which can show up in the brackets
1837 `[D]'
1838 Return the location specifier such as `[htb]'. When nothing is
1839 entered, omit [] itself. If the possible characters are "htbp", call
1840 this function as `(YaTeX:read-position "htbp")'
1842 `[F]'
1843 YaTeX:read-coordinates
1844 `[A]'
1845 Base prompt, X-axis prompt, Y-axis prompt (each optional)
1846 `[D]'
1847 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for
1848 X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the
1849 form of "(X,Y)". The default prompts are `Dimension', `X', `Y'
1850 respectively.
1852 `[F]'
1853 YaTeX:check-completion-type
1854 `[A]'
1855 One of the symbols: 'begin, 'section, or 'maketitle
1856 `[D]'
1857 Check the current completion type is specified one and cause error
1858 if not. The variable `YaTeX-current-completion-type' holds the symbol
1859 according to the current completion type.
1862 File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions
1864 Contribution
1865 ------------
1867 If you make your own pretty function and you let it be in public, please
1868 send me the function. I'm going to include it in the next release.
1871 File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations
1873 Add-in generator
1874 ================
1876 First, don't forget to read the section of add-in functions *Note Add-in
1877 functions::. If you easily understand how to define them, there's no need
1878 to read this section. But being not familiar with Emacs-Lisp, when you
1879 don't have clear idea what to do, this section describes how to get YaTeX
1880 make add-in function.
1882 There are two methods of generation. One is for fully interactive
1883 generator for beginners and another requires little knowledge of
1884 Emacs-Lisp.
1887 Generator for beginners
1888 -----------------------
1889 The former generator is called by
1890 `M-x YaTeX-generate'
1892 strokes. All you have to do is follow the guidances. Defying them may
1893 cases the disaster (I wonder what is it???). So when you make some
1894 mistake, it is recommendable to type `C-g' and start afresh.
1897 Simple generator
1898 ----------------
1900 The latter generator is invoked by the next sequence.
1901 `M-x YaTeX-generate-simple'
1902 This generator can make both "option add-in" and "argument add-in"
1903 (*refer the section add-in functions*
1904 *Note How the add-in function works::), whereas `YaTeX-generate'
1905 cannot make "argument addin".
1907 For example, assume you have the LaTeX command as follows.
1909 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
1910 (A) (B) (1) (2) (3)
1911 (A)Optional parameter to specify the position
1912 One of t(top), b(bottom), l(left), r(right)
1913 (B)Maximum size of frame
1914 (1)1st argument is filename of EPS file
1915 (2)2nd argument indicates
1916 plain do nothing
1917 frame make frame around image
1918 dframe make double-frame around image
1919 for included EPS file.
1920 (3)Caption for the picture
1922 Now get start with generation. Typing `M-x YaTeX-generate-simple'
1923 brings the prompt:
1924 (O)ption? (A)rgument?
1927 Generating "option add-in"
1928 ..........................
1930 Since (A), (B) above are optional argument, all we have to do to
1931 complete them is define the option add-in for them. Let's generate the
1932 function to complete (A).
1934 M-x YaTeX-generate-simple RET
1935 epsinput RET
1938 Typing as above leads the next prompt.
1940 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
1942 This asks that "Which type is the completion style of 1st argument?".
1943 Here are the possible completion style.
1945 `String'
1946 read plain string
1947 `Complete'
1948 read with completion
1949 `File'
1950 read file name
1951 `Option'
1952 read optional string (if string omitted, omit [] too)
1953 `Position'
1954 read positional option (like [htbp])
1955 `Coord.'
1956 read coordinates
1957 `Quit'
1958 quit from generating
1960 Since (A) is the optional argument to specify the location of included
1961 EPS file, the completion style is `Position', and the possible characters
1962 are t, b, l, and r. To tell these information to generator, operate as
1963 follows.
1965 Read type(1).... p
1966 Acceptable characters: tblr RET
1968 (B) is coordinate. So its completion style is coOrd. We want a prompt
1969 meaning "Maximum size" when completion.
1971 Read type(2).... o
1972 Prompt for coordinates: Max size RET
1974 That's all for optional argument. Select quit.
1976 Read type(3).... q
1978 Then the generated option add-in function for \epsinput will be shown in
1979 the next window.
1982 Generating "argument add-in"
1983 ............................
1985 Next, create the argument add-in. The arguments for \epsinput are EPS
1986 file name, framing style, and caption string in sequence.
1988 M-x YaTeX-generate-simple RET
1989 epsinput RET
1992 Above key strokes bring the prompt that asks the number of argument.
1993 Answer it with 3.
1995 How many arguments?: 3 RET
1997 Then the generator asks the completion style and prompt for completion.
1998 Answer them. `f' for FileName and prompt string.
2000 Read type(1).... f
2001 Prompt for argument#1 EPS file name RET
2003 The second argument is one of selected symbol. So the completion type
2004 is `Completion'.
2006 Read type(2).... c
2007 Prompt for argument#2 Include style RET
2009 Then all the candidates ready to be read. Type single RET after
2010 entering all.
2012 Item[1](RET to exit): plain RET
2013 Item[2](RET to exit): frame RET
2014 Item[3](RET to exit): dframe RET
2015 Item[4](RET to exit): RET
2017 The following prompt asks whether the entered string must belong to
2018 candidates or not. In this case, since the argument must be one of
2019 `plain', `frame', and `dframe', type `y'.
2021 Require match? (y or n) y
2023 The last argument is the caption string for which any completion is
2024 needed.
2026 Read type(3).... s
2027 Prompt for argument#3 Caption RET
2028 default: Figure of RET
2030 Finally we'll get the argument add-in in the next window.
2033 Contribution
2034 ------------
2036 If you get your own pretty function and you let it be in public, please
2037 steel yourself in the happy atmosphere and do not send me the function. I
2038 do know it is not fine because it is generated by yatexgen:-p.
2041 File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top
2043 Etcetera
2044 ********
2046 The standard completion tables provided in `yatex.el' contain a few
2047 LaTeX commands I frequently use. This is to lessen the key strokes to
2048 complete entire word, because too many candidates rarely used often cause
2049 too many hits. Therefore always try to use completion in order to enrich
2050 your dictionary, and you will also find `Wild Bird' growing suitable for
2051 your LaTeX style.
2053 The package name `Wild Bird' is the English translation of Japanese
2054 title `Yachou', which is a trick on words of Japanese.
2057 File: yatexe, Node: Copying, Prev: Etcetera, Up: Top
2059 Copying
2060 *******
2062 This program is distributed as a free software. You can
2063 use/copy/modify/redistribute this software freely but with NO warranty to
2064 anything as a result of using this software. Adopting code from this
2065 program is also free. But I would not do contract act.
2067 Any reports and suggestions are welcome as long as I feel interests in
2068 this software. My possible e-mail address is `yuuji@yatex.org'. (as of
2069 Jan.2004) And there is mailing list for YaTeX. Although the common
2070 language is Japanese, questions in English will be welcome. To join the
2071 ML, send the mail whose subject is `append' to the address
2072 `yatex@yatex.org. If you have some question, please ask to
2073 `yatex-admin@yatex.org'.
2075 The specification of this software will be surely modified (depending on
2076 my feelings) without notice :-p.
2079 HIROSE Yuuji
2081 Tag table:
2082 Node: Top153
2083 Node: What is YaTeX?1493
2084 Node: Main features1865
2085 Node: Installation3456
2086 Node: Typesetting4232
2087 Node: Calling typesetter5167
2088 Node: Calling previewer6512
2089 Node: Printing out6872
2090 Node: %#notation7163
2091 Node: Changing typesetter7538
2092 Node: Splitting input files7901
2093 Node: Static region for typesetting9328
2094 Node: Lpr format10456
2095 Node: Editing %# notation11512
2096 Node: Completion12030
2097 Node: Begin-type completion12589
2098 Node: Section-type completion15632
2099 Node: view-sectioning18066
2100 Node: Large-type completion19645
2101 Node: Maketitle-type completion20375
2102 Node: Arbitrary completion20926
2103 Node: End completion21315
2104 Node: Accent completion21784
2105 Node: Image completion22400
2106 Node: Greek letters completion24656
2107 Node: Local dictionaries25382
2108 Node: Commenting out26318
2109 Node: Cursor jump27776
2110 Node: Jump to corresponding object28087
2111 Node: Invoking image processor29487
2112 Node: Jump to main file30829
2113 Node: Jumping around the environment31193
2114 Node: Jumping to last completion position31610
2115 Node: Changing and Deleting32118
2116 Node: Changing LaTeX commands32509
2117 Node: Killing LaTeX commands33685
2118 Node: Filling34869
2119 Node: Updation of includeonly36719
2120 Node: What column37515
2121 Node: Intelligent newline38599
2122 Node: Usepackage checker40259
2123 Node: Online help40849
2124 Node: Browsing file hierarchy42523
2125 Node: Cooperation with other packages44259
2126 Node: Customizations44963
2127 Node: Lisp variables45296
2128 Node: All customizable variables46299
2129 Node: Sample definitions56182
2130 Node: Hook variables56694
2131 Node: Hook file57397
2132 Node: Add-in functions57735
2133 Node: How the add-in function works58594
2134 Node: Defining option-add-in60792
2135 Node: Defining argument-add-in61513
2136 Node: Defining enclosing-add-in62394
2137 Node: How the function is called63247
2138 Node: Useful functions for creating add-in63922
2139 Node: Contribution65326
2140 Node: Add-in generator65599
2141 Node: Etcetera70992
2142 Node: Copying71596
2144 End tag table