yatex

view docs/yatexe @ 130:8703f090c628

`[prefix] t e' for YaTeX-typeset-environment. It automatically mark current inner environment or portion of math mode, then call typeset-region on that region saving it in texput.tex.
author yuuji@gentei.org
date Thu, 27 May 2010 16:37:44 +0900
parents 91bf68eeefe8
children bd0a9177e5e7
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 e'
125 ... invoke latex on current environment or whole
126 portion of current formulas in math-mode.
127 `[prefix] t k'
128 ... kill current typesetting process
129 `[prefix] t b'
130 ... invoke bibtex
131 `[prefix] t i'
132 ... invoke makeindex
133 `[prefix] t d'
134 ... invoke latex && dvipdfmx
135 `[prefix] t p'
136 ... preview
137 `[prefix] t l'
138 ... lpr dvi-file
139 `[prefix] t s'
140 ... search current string on xdvi-remote
142 * Menu:
144 * Calling typesetter::
145 * Calling previewer::
146 * Printing out::
148 
149 File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting
151 Calling typesetter
152 ==================
154 Typing `[prefix] t j', the current editing window will be divided
155 horizontally when you invoke latex command, and log message of LaTeX
156 typesetting will be displayed in the other window; called typesetting
157 buffer. The typesetting buffer automatically scrolls up and traces LaTeX
158 warnings and error messages. If you see latex stopping by an error, you
159 can send string to latex in the typesetting buffer.
161 If an error stops the LaTeX typesetting, this key stroke will move the
162 cursor to the line where LaTeX error is detected.
164 `[prefix] ''
165 `([prefix]+single quotation)'
167 ... jump to the previous error or warning
169 If you find a noticeable error, move to the typesetting buffer and move
170 the cursor on the line of error message and type `SPACE' key. This makes
171 the cursor move to corresponding source line.
173 Since `[prefix] tr' pastes the region into the file `texput.tex' in the
174 current directory, you should be careful of overwriting. The method of
175 specification of the region is shown in the section *Note %#notation::.
177 The documentclass for typeset-region is the same as that of editing file
178 if you edit one file, and is the same as main file's if you edit splitting
179 files.
181 The `[prefix] te' key automatically marks current inner environment or
182 inner math mode and then call typeset-region with marked region. This is
183 convenient to quick view of current tabular environment or current editing
184 formulas. Keeping previewer window for `texput.dvi' is handy for
185 debugging.
187 
188 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting
190 Calling previewer
191 =================
193 `[prefix] t p' invokes the TeX previewer. And if you are using
194 xdvi-remote, which can be controled from other terminals, `[prefix] t s'
195 enables you to search current string at the cursor on the running xdvi
196 window.
198 
199 File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting
201 Printing out
202 ============
204 When you type `[preifx] t l', YaTeX asks you the range of dvi-printing
205 by default. You can skip this by invoking it with universal-argument as
206 follows:
208 C-u [prefix] tl
210 
211 File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top
213 %# notation
214 ***********
216 You can control the typesetting process by describing `%#' notations in
217 the source text.
219 * Menu:
221 * Changing typesetter::
222 * Splitting input files::
223 * Static region for typesetting::
224 * Lpr format::
225 * Editing %# notation::
227 
228 File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation
230 To change the `latex' command or to split a source text.
231 ========================================================
233 To change the typesetting command, write
235 %#!latex-big
237 anywhere in the source text. This is useful for changing typesetter.
239 
240 File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation
242 Splitting input files
243 =====================
245 And if you split the source text and edit subfile that should be
246 included from main text.
248 %#!latex main.tex
250 will be helpful to execute latex on main file from sub text buffer. Since
251 this command line after `%#!' will be sent to shell literally, next
252 description makes it convenient to use ghostview as dvi-previewer.
254 %#!latex main ; dvi2ps main.dvi > main
256 Note that YaTeX assumes the component before the last period of the last
257 word in this line as base name of the main LaTeX source. The `%f'
258 notation in this line is replaced by main file name, and `%r' replaced by
259 root name of main file name. If you specify `%f' or `%r', YaTeX always
260 ask you the name of main file at the first typesetting.
262 To make best use of the feature of inter-file jumping by `[prefix] g'
263 (see *Note Cursor jump::), take described below into consideration.
265 * You can put split texts in sub directory, but not in
266 sub directory of sub directory.
267 * In the main text, specify the child file name with relative path name
268 such as \include{chap1/sub}, when you include the file in
269 a sub-directory.
270 * In a sub-text, write `%#!latex main.tex' even if `main.tex'
271 is in the parent directory(not %#!latex ../main.tex).
273 
274 File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation
276 Static region
277 =============
279 Typeset-region by `[prefix] tr' passes the region between point and mark
280 to typesetting command by default. But when you want to typeset static
281 region, enclose the region by `%#BEGIN' and `%#END' as follows.
283 %#BEGIN
284 TheRegionYouWantToTypesetManyTimes
285 %#END
287 This is the rule of deciding the region.
289 1. If there exists %#BEGIN before point,
291 1. If there exists %#END after %#BEGIN,
292 * From %#BEGIN to %#END.
294 2. If %#END does not exist after %#BEGIN,
295 * From %#BEGIN to the end of buffer.
297 2. If there does not exist %#BEGIN before point,
298 * Between point and mark(standard method of Emacs).
300 It is useful to write `%#BEGIN' in the previous line of \begin and
301 `%#END' in the next line of \`end' when you try complex environment such
302 as `tabular' many times. It is also useful to put only `%#BEGIN' alone at
303 the middle of very long text. Do not forget to erase `%#BEGIN' `%#END'
304 pair.
306 
307 File: yatexe, Node: Lpr format, Next: Editing %# notation, Prev: Static region for typesetting, Up: %#notation
309 Lpr format
310 ==========
312 Lpr format is specified by three Lisp variables. Here are the default
313 values of them.
315 `(1)dviprint-command-format'
316 `"dvi2ps %f %t %s | lpr"'
317 `(2)dviprint-from-format'
318 `"-f %b"'
319 `(3)dviprint-to-format'
320 `"-t %e"'
322 On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text,
323 `%f' by contents of (2), %t by contents of (3). At these replacements,
324 `%b' in (2) is also replaced by the number of beginning page, `%e' in (3)
325 is replaced by the number of ending page. But `%f' and `%t' are ignored
326 when you omit the range of print-out by `C-u [prefix] tl'.
328 If you want to change this lpr format temporarily, put a command such as
329 follows somewhere in the text:
331 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
333 And if you want YaTeX not to ask you the range of printing out, the next
334 example may be helpful.
336 %#LPR dvi2ps %s | lpr
338 
339 File: yatexe, Node: Editing %# notation, Prev: Lpr format, Up: %#notation
341 Editing %# notation
342 ===================
344 To edit `%#' notation described above, type
346 `[prefix] %'
347 ... editing %# notation menu
349 and select one of the entry of the menu as follows.
351 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
353 Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and
354 `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN'
355 and `%#END' are automatically erased.
357 
358 File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top
360 Completion
361 **********
363 YaTeX makes it easy to input the LaTeX commands. There are several
364 kinds of completion type, begin-type, section-type, large-type, etc...
366 * Menu:
368 * Begin-type completion::
369 * Section-type completion::
370 * Large-type completion::
371 * Maketitle-type completion::
372 * Arbitrary completion::
373 * End completion::
374 * Accent completion::
375 * Image completion::
376 * Greek letters completion::
378 
379 File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion
381 Begin-type completion
382 =====================
384 "Begin-type completion" completes commands of `\begin{env}' ...
385 `\end{env}'. All of the begin-type completions begin with this key
386 sequence.
388 `[prefix] b'
389 ... start begin-type completion
391 An additional key stroke immediately completes a frequently used LaTeX
392 `\begin{}'...`\`end'{}' environment.
394 `[prefix] b c'
395 ... `\begin{center}...\end{center}'
396 `[prefix] b d'
397 ... `\begin{document}...\end{document}'
398 `[prefix] b D'
399 ... `\begin{description}...\end{description}'
400 `[prefix] b e'
401 ... `\begin{enumerate}...\end{enumerate}'
402 `[prefix] b E'
403 ... `\begin{equation}...\end{equation}'
404 `[prefix] b i'
405 ... `\begin{itemize}...\end{itemize}'
406 `[prefix] b l'
407 ... `\begin{flushleft}...\end{flushleft}'
408 `[prefix] b m'
409 ... `\begin{minipage}...\end{minipage}'
410 `[prefix] b t'
411 ... `\begin{tabbing}...\end{tabbing}'
412 `[prefix] b T'
413 ... `\begin{tabular}...\end{tabular}'
414 `[prefix] b^T'
415 ... `\begin{table}...\end{table}'
416 `[prefix] b p'
417 ... `\begin{picture}...\end{picture}'
418 `[prefix] b q'
419 ... `\begin{quote}...\end{quote}'
420 `[prefix] b Q'
421 ... `\begin{quotation}...\end{quotation}'
422 `[prefix] b r'
423 ... `\begin{flushright}...\end{flushright}'
424 `[prefix] b v'
425 ... `\begin{verbatim}...\end{verbatim}'
426 `[prefix] b V'
427 ... `\begin{verse}...\end{verse}'
429 Any other LaTeX environments are made by completing-read of the Emacs
430 function.
432 `[prefix] b SPACE'
433 ... begin-type completion
435 The next message will show up in the minibuffer
437 Begin environment(default document):
439 by typing `[prefix] b'. Put the wishing environment with completion in
440 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the
441 LaTeX source text. If the environment you want to put does not exist in
442 the YaTeX completion table, it will be registered in the user completion
443 table. YaTeX automatically saves the user completion table in the user
444 dictionary file at exiting of emacs.
446 At the completion of certain environments, the expected initial entry will
447 automatically inserted such as `\item' for `itemize' environment. If you
448 don't want the entry, it can be removed by undoing.
450 If you want to enclose some paragraphs which have already been written,
451 invoke the begin-type completion with changing the case of `b' of key
452 sequence upper(or invoke it with universal argument by `C-u' prefix).
454 The following example encloses a region with `description' environment.
456 `[prefix] B D'
457 `(or ESC 1 [prefix] b D)'
458 `(or C-u [prefix] b D)'
460 ... begin-type completion for region
462 This enclosing holds good for the completing input by `[prefix] b SPC'.
463 `[prefix] B SPC' enclose a region with the environment selected by
464 completing-read.
466 
467 File: yatexe, Node: Section-type completion, Next: Large-type completion, Prev: Begin-type completion, Up: Completion
469 Section-type completion
470 =======================
472 "Section-type completion" completes section-type commands which take an
473 argument or more such as `\section{foo}'. To invoke section-type
474 completion, type
476 `[prefix] s'
477 ... section-type completion
479 then the prompt
481 (C-v for view) \???{} (default documentclass):
483 will show up in the minibuffer. Section-type LaTeX commands are completed
484 by space key, and the default value is selected when you type nothing in
485 the minibuffer.
487 Next,
489 \section{???}:
491 prompts you the argument of section-type LaTeX command. For example, the
492 following inputs
494 \???{} (default documentclass): section
495 \section{???}: Hello world.
497 will insert the string
499 \section{Hello world.}
501 in your LaTeX source. When you neglect argument such as
503 (C-v for view) \???{} (default section): vspace*
504 \vspace*{???}:
506 YaTeX puts
508 \vspace*{}
510 and move the cursor in the braces.
512 In LaTeX command, there are commands which take more than one arguments
513 such as `\addtolength{\topmargin}{8mm}'. To complete these commands,
514 invoke section-type completion with universal argument as,
516 C-u 2 [prefix] s (or ESC 2 [prefix] s)
518 and make answers in minibuffer like this.
520 (C-v for view) \???{} (default vspace*): addtolength
521 \addtolength{???}: \topmargin
522 Argument 2: 8mm
524 `\addtolength' and the first argument `\topmargin' can be typed easily by
525 completing read. Since YaTeX also learns the number of arguments of
526 section-type command and will ask that many arguments in future
527 completion, you had better tell the number of arguments to YaTeX at the
528 first completion of the new word. But you can change the number of
529 arguments by calling the completion with different universal argument
530 again.
533 Invoking section-type completion with `[Prefix] S' (Capital `S')
534 includes the region as the first argument of section-type command.
536 The section/large/maketitle type completion can work at the prompt for
537 the argument of other section-type completion. Nested LaTeX commands are
538 efficiently read with the recursive completion by typing YaTeX's
539 completion key sequence in the minibuffer.
541 * Menu:
543 * view-sectioning::
545 
546 File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion
548 view-sectioning
549 ---------------
551 In the minibuffer at the prompt of section-type command completion,
552 typing `C-v' shows a list of sectioning commands in source text(The line
553 with `<<--' mark is the nearest sectioning command). Then, default
554 sectioning command appears in the minibuffer. You can go up/down
555 sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing
556 buffer by `C-v'/`M-v', and can hide sectioning commands under certain
557 level by 0 through 6. Type `?' in the minibuffer of sectioning prompt
558 for more information.
560 You can generate this listing buffer (`*Sectioning Lines*' buffer) by
561 typing
562 `M-x YaTeX-section-overview'
563 ... Generate *Sectioning Lines* buffer
565 from the LaTeX source buffer. In this listing buffer, typing `u' on the
566 sectioning command shifts up the corresponding sectioning command in
567 source text and `d' shifts down. After marking lines in the listing
568 buffer, typing `U' shifts up all sectioning commands in the region, and
569 `U' shifts down. Here are all the key bindings of `*Sectioning Lines*'
570 buffer.
572 `SPC'
573 ... Jump to corresponding source line
574 `.'
575 ... Display corresponding source line
576 `u'
577 ... Shift up a sectioning line
578 `d'
579 ... Shift down a sectioning line
580 `U'
581 ... Shift up sectioning lines in region
582 `D'
583 ... Shift down sectioning lines in region
584 `0...6'
585 ... Hide sectioning commands whose level is lower than n
588 
589 File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Section-type completion, Up: Completion
591 Large-type completion
592 =====================
594 "Large-type completion" inputs the font or size changing descriptions
595 such as `{\large }'. When you type
597 `[prefix] l'
598 ... large-type completion
600 the message in the minibuffer
602 {\??? } (default large):
604 prompts prompts you large-type command with completing-read. There are
605 TeX commands to change fonts or sizes, `it', `huge' and so on, in the
606 completion table.
608 Region-based completion is also invoked by changing the letter after
609 prefix key stroke as `[prefix] L'. It encloses the region by braces with
610 large-type command.
612 
613 File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion
615 Maketitle-type completion
616 =========================
618 We call it "maketitle-type completion" which completes commands such as
619 `\maketitle'. Take notice that maketitle-type commands take no arguments.
620 Then, typing
622 `[prefix] m'
623 ... maketitle-type completion
625 begins maketitle-completion. Above mentioned method is true for
626 maketitle-completion, and there are LaTeX commands with no arguments in
627 completion table.
629 
630 File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion
632 Arbitrary completion
633 ====================
635 You can complete certain LaTeX command anywhere without typical
636 completing method as described, by typing
638 `[prefix] SPC'
639 ... arbitrary completion
641 after the initial string of LaTeX command that is preceded by `\'.
643 
644 File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion
646 End completion
647 ==============
649 YaTeX automatically detects the opened environment and close it with
650 \`\end{environment}'. Though proficient YaTeX users never fail to make
651 environment with begin-type completion, some may begin an environment
652 manually. In that case, type
654 `[prefix] e'
655 ... `end' completion
657 at the end of the opened environment.
659 
660 File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion
662 Accent completion
663 =================
665 When you want to write the European accent marks(like `\`{o}'),
667 `[prefix] a'
668 ... accent completion
670 shows the menu
672 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
674 in the minibuffer. Chose one character or corresponding numeric, and you
675 will see
677 \`{}
679 in the editing buffer with the cursor positioned in braces. Type one more
680 character `o' for example, then
682 \`{o}
684 will be completed, and the cursor gets out from braces.
686 
687 File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion
689 Image completion of mathematical sign
690 =====================================
692 Arrow marks, sigma mark and those signs mainly used in the TeX's math
693 environment are completed by key sequences which imitate the corresponding
694 symbols graphically. This completion only works in the math environment.
695 YaTeX automatically detects whether the cursor located in math environment
696 or not, and change the behavior of key strokes `;' and `:'.
698 By the way, we often express the leftarrow mark by `<-' for example.
699 Considering such image, you can write `\leftarrow' by typing `<-' after
700 `;' (semicolon) as a prefix. In the same way, `\longleftarrow' (`<--') is
701 completed by typing `;<--', infinity mark which is imitated by `oo' is
702 completed by typing `;oo'.
704 Here are the sample operations in YaTeX math-mode.
706 INPUT Completed LaTeX commands
707 ; < - `\leftarrow'
708 ; < - - `\longleftarrow'
709 ; < - - > `\longleftrightarrow'
710 ; o `\circ'
711 ; o o `\infty'
713 In any case, you can quit from image completion and can move to the next
714 editing operation if the LaTeX command you want is shown in the buffer.
716 `;' itself in math-environment is inserted by `;;'. Typing `TAB' in the
717 midst of image completion shows all of the LaTeX commands that start with
718 the same name as string you previously typed in. In this menu buffer,
719 press `RET' after moving the cursor (by `n', `p', `b', `f') to insert the
720 LaTeX command.
722 To know all of the completion table, type `TAB' just after `;'. And
723 here is the sample menu by `TAB' after `;<'.
725 KEY LaTeX sequence sign
726 < \leq <
727 ~
728 << \ll <<
729 <- \leftarrow <-
730 <= \Leftarrow <=
732 You can define your favorite key-vs-sequence completion table in the
733 Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also
734 `yatexmth.el' for the information of the structure of this variable.
736 
737 File: yatexe, Node: Greek letters completion, Prev: Image completion, Up: Completion
739 Greek letters completion
740 ========================
742 Math-mode of YaTeX provides another image completion, Greek letters
743 completion in the same method. After prefix `:', typing `a' makes
744 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type
745 `:TAB' to know all the correspondence of alphabets vs. Greek letters.
747 If you will find `;' or `:' doesn't work in correct position of math
748 environment, it may be a bug of YaTeX. Please send me a bug report with
749 the configuration of your text, and avoid it temporarily by typing `;' or
750 `:' after universal-argument(`C-u') which forces `;' and `:' to work as
751 math-prefix.
753 
754 File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top
756 Local dictionaries
757 ******************
759 Tables for completion consist of three dictionaries; `standard
760 dictionary' built in `yatex.el', `user dictionary' for your common private
761 commands, and `local dictionary' that is effective in a certain directory.
763 When you input the command unknown to YaTeX at a completion in the
764 minibuffer, YaTeX asks you with the following prompt;
766 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard
768 In this menu, typing `u' updates your `user dictionary', `l' updates your
769 local dictionary, `n' updates only on-memory dictionary which go through
770 only current Emacs session, and `d' updates no dictionary and throws the
771 new word away.
773 If you find this switching feature meaningless and bothersome, put the
774 next expression into your `~/.emacs'
776 (setq YaTeX-nervous nil)
778 
779 File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top
781 Commenting out
782 **************
784 You may want to comment out some region.
786 `[prefix] >'
787 ... comment out region by %
788 `[prefix] <'
789 ... uncomment region
791 cause an operation to the region between point and mark.
793 `[prefix] .'
794 ... comment out current paragraph
795 `[prefix] ,'
796 ... uncomment current paragraph
798 comments or uncomments the paragraph where the cursor belongs. This
799 `paragraph' means the region marked by the function mark-paragraph, bound
800 to `ESC h' by default. It is NOT predictable what will happen when you
801 continuously comment out some paragraph many times.
803 You can also comment out an environment between `\begin' and `\end', or
804 a `\begin'-\`\end' pair themselves, by making the following key strokes on
805 the line where `\begin{}' or `\end{}' exists.
807 `[prefix] >'
808 ... comment out from \begin to \`end'
809 `[prefix] <'
810 ... uncomment from \begin to \`end'
812 comment whole the contents of environment. Moreover,
814 `[prefix] .'
815 ... comment out \begin and \`end'
816 `[prefix] ,'
817 ... uncomment \begin and \`end'
819 (un)comments out only environment declaration: `\begin{}' and `\end{}'.
820 NOTE that even if you intend to comment out some region, invoking
821 `[prefix] >' on the `\begin',`\end' line decides to work in `commenting
822 out from `\begin' to `\end'' mode.
825 
826 File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top
828 Cursor jump
829 ***********
832 * Menu:
834 * Jump to corresponding object::
835 * Invoking image processor::
836 * Jump to main file::
837 * Jumping around the environment::
838 * Jumping to last completion position::
840 
841 File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump
843 Jump to corresponding object
844 ============================
846 Typing
848 `[prefix] g'
849 ... go to corresponding object
851 in a certain place move the cursor to the place corresponding to the LaTeX
852 command of last place. YaTeX recognize the followings as pairs that have
853 relation each other.
855 * `\begin{}' <-> `\end{}'
856 * `%#BEGIN' <-> `%#END'
857 * On the image-including line -> corresponding viewer or drawing tool
858 * `\label{}' <-> `\ref{}'
859 * `\include(\input)' -> included file
860 * `\bibitem{}' <-> `\cite{}'
862 On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the
863 corresponding `\end',`\begin' line, if its partner really exists. The
864 behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the
865 correspondent of `label/ref' or `cite/bibitem' exists in another file,
866 that file have to be opened to make a round trip between references by
867 `[prefix] g'.
869 If you type `[prefix] g' on the line of `\include{chap1}', typically in
870 the main text, YaTeX switches buffer to `chap1.tex'.
872 `[prefix] 4 g'
873 ... go to corresponding object in other window
875 do the same job as `[prefix] g' except it's done in other window. Note
876 that this function doesn't work on `begin/end', `%#BEGIN/%#END' pairs
877 because it is meaningless.
879 
880 File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump
882 Invoking image processor
883 ========================
886 `image-including line' described above means such lines as
887 `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX
888 automatically searches source of `foo.ps' and invokes image viewer or
889 drawing tool correspoinding to it. For example; if you draw an image
890 foo.obj with Tgif and enclose its product named foo.eps by `\epsfile'
891 command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif
892 foo.obj'. How a processor is choosen is as follows.
894 1. If there is an expression matching with one of the pattern defined in
895 `YaTeX-processed-file-regexp-alist', extract file name from regexp
896 group surrounded by \\(\\). (Which group corresponds is written in
897 the cdr part of each list.) If no matches were found, do nothing.
898 2. If there is a pattern as `%PROCESSOR' which is defined in the
899 variable `YaTeX-file-processor-alist', call that processor giving the
900 file name with corresponding extension.
901 3. If not, check the existence of each file which is supplied the
902 extension in the cdr part of each list of
903 `YaTeX-file-processor-alist'. If any, call the corresponding image
904 viewer or drawing tool.
906 
907 File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump
909 Jump to main file
910 =================
912 Typing
914 `[prefix] ^'
915 ... visit main file
916 `[prefix] 4^'
917 ... visit main file in other buffer
919 in a sub text switch the buffer to the main text specified by `%#!'
920 notation.
922 
923 File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump
925 Jumping around the environment
926 ==============================
928 And these are the functions which work on the current LaTeX environment:
930 `M-C-a'
931 ... beginning of environment
932 `M-C-e'
933 ... `end' of environment
934 `M-C-@'
935 ... mark environment
937 
938 File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump
940 Jumping to last completion position
941 ===================================
943 YaTeX always memorize the position of completion into register `3'. So
944 every time you make a trip to any other part of text other than you are
945 writing, you can return to the editing paragraph by calling
946 register-to-point with argument YaTeX-current-position-register, which is
947 achieved by typing `C-x j 3'(by default).
949 
950 File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top
952 Changing and Deleting
953 *********************
955 These functions are for change or deletion of LaTeX commands already
956 entered.
958 `[prefix] c'
959 ... change LaTeX command
960 `[prefix] k'
961 ... kill LaTeX command
963 * Menu:
965 * Changing LaTeX commands::
966 * Killing LaTeX commands::
968 
969 File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting
971 Changing LaTeX commands
972 =======================
974 `[prefix] c' can change the various (La)TeX commands. This can change the
975 followings.
976 * Environment names
977 * Section-type commands
978 * Argument of section-type commands
979 * Optional parameters (enclosed by []) of section-type commands
980 * Font/size designators
981 * Math-mode's maketitle-type commands that can be inputted with image
982 completion
984 Typing `[prefix] c' on one of above objects you want to change brings a
985 suitable reading function sometimes with completion. Note: If you want to
986 change the argument of section-type command that contains other LaTeX
987 commands, type `[prefix] c' either of surrounding braces of the argument
988 in order to make YaTeX ignore the internal LaTeX sequences as an object of
989 changing. Anyway, it is very difficult to know which argument position
990 the cursor belongs because the LaTeX commands can be nested and braces can
991 freely emerge. So keep it mind to put the cursor on a brace when you are
992 thinking of changing a complicated argument.
994 
995 File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting
997 Killing LaTeX commands
998 ======================
1000 `[prefix] k' kills the LaTeX commands sometimes with their arguments.
1001 Following table illustrates the correspondence of the invoking position
1002 and what is killed.
1004 [Invoking position] [action]
1005 \begin, \end line kill \begin,\end pairs
1006 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
1007 on a Section-type command kill section-type command
1008 on a parenthesis kill parentheses
1010 Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines
1011 `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take
1012 care not to create any line that contains more than one `\begin' or so.
1014 While all operations above are to kill `containers' which surround some
1015 text, universal argument (`C-u') for these commands kills not only
1016 `containers' but also `contents' of them. See below as a sample.
1018 Original text: [prefix] k C-u [prefix] k
1019 Main \footnote{note} here. Main note here. Main here.
1020 ~(cursor)
1023 File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top
1025 Filling
1026 *******
1029 Filling an item
1030 ===============
1032 To fill a term (descriptive sentences) of `\item', type
1034 `M-q'
1035 ... fill item
1037 on that item.
1039 YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular
1040 expression to search item header in itemize environment. If you make a
1041 newcommand to itemize terms(e.g. `\underlineitem'), put
1043 (setq YaTeX-item-regexp
1044 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1046 in your `~/.emacs'. If you are not familiar with regular expression for
1047 Emacs-Lisp, name a newcommand for `itemize' beginning with `\item' such as
1048 `\itembf', not `\bfitem'.
1050 This function reformats the `\item' into `hang-indented' style. For
1051 example:
1053 itemize, enumerate environment:
1055 >\item[foo] `foo' is the typical word for describing an
1056 > arbitrarily written....
1057 description environment:
1058 > \item[bar] When the word `for' is used as an arbitrarily
1059 > word, `bar' is bound to follow it.
1061 Note that the indent depth of an `\item' word and its descriptive
1062 paragraph are the same in latter case. If you want to use different
1063 depth, invoke fill-paragraph at the beginning of non-whitespace
1064 character(see below).
1067 Filling paragraph
1068 =================
1070 Fill-paragraph is little bit adapted for LaTeX sources. It retains from
1071 filling in certain environments where formatting leads to a disaster such
1072 as verbatim, tabular, or so. And it protects `\verb' expressions from
1073 being folded (The variable `YaTeX-verb-regexp' controls this). Besides,
1074 putting cursor on the first occurrence of non-whitespace character on a
1075 line changes the fill-prefix temporarily to the depth of the line.
1078 File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top
1080 Updation of `\includeonly'
1081 **************************
1083 When you edit splitting source texts, the notation
1085 \includeonly{CurrentEditingFileName}
1087 in the main file reduces the time of typesetting. If you want to hack
1088 other file a little however, you have to rewrite it to
1090 \includeonly{OtherFileNameYouWantToFix}
1092 in the main file. YaTeX automatically detects that the current edited
1093 text is not in includeonly list and prompts you
1095 A)dd R)eplace %)comment?
1097 in the minibuffer. Type `a' if you want to add the current file name to
1098 `\includeonly' list, `r' to replace \`includeonly' list with the current
1099 file, and type `%' to comment out the `\includeonly' line.
1102 File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top
1104 What column?
1105 ************
1107 We are often get tired of finding the corresponding column in large
1108 tabulars. For example,
1110 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
1111 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1112 Home Addr.&Home Phone\\ \hline
1113 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1114 zzz-www & Japan & 9876-54321 \\
1115 & 2 & \multicolumn{2}{c|}{Unknown}
1116 &&&(???)
1117 \\ \hline
1118 \end{tabular}
1120 Suppose you have the cursor located at `(???)' mark, can you tell which
1121 column it is belonging at once? Maybe no. In such case, type
1123 `[prefix] &'
1124 ... What column
1126 in that position. YaTeX tells you the column header of the current field.
1127 Since YaTeX assumes the first line of tabular environment as a row of
1128 column headers, you can create a row of virtual column headers by putting
1129 them in the first line and commenting that line with `%'.
1132 File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top
1134 Intelligent newline
1135 *******************
1137 At the end of begin-type completion of tabular[*], array, itemize,
1138 enumerate or tabbing environment, or typing
1140 `ESC RET'
1141 ... Intelligent newline
1143 in these environments inserts the contents corresponding to the current
1144 environment in the next line. (At the begin-type completion, this
1145 contents can be removed by `undo'.) In `tabular' environment, for
1146 example, `ESC RET' inserts the certain number of `&' and trailing `\\',
1147 and `\hline' if other `\hline' is found in backward. Here are the list of
1148 contents vs. environments.
1150 * `tabular', `tabular*', `array'
1152 Corresponding number of `&' and `\\'.
1153 And `\hline' if needed.
1155 * `tabbing'
1157 The same number of `\>' as `\=' in the first line.
1159 * `itemize', `enumerate', `description', `list'
1161 `\item' or `item[]'.
1163 Note that since this function works seeing the contents of the first
1164 line, please call this after the second line if possible.
1166 If you want to apply these trick to other environments, `foo'
1167 environment for example, define the function named
1168 `YaTeX-intelligent-newline-foo' to insert corresponding contents. That
1169 function will be called at the beginning of the next line after the
1170 newline is inserted to the current line. Since the function
1171 `YaTeX-indent-line' is designed to indent the current line properly,
1172 calling this function before your code to insert certain contents must be
1173 useful. See the definition of the function
1174 `YaTeX-intelligent-newline-itemize' as an example.
1177 File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top
1179 Usepackage checker
1180 ******************
1182 When you input begint-type, section-type, maketitle-type macros with
1183 completion, and it requires some LaTeX2e package, YaTeX examines the
1184 existence of correct `\usepackage'. If not, YaTeX inserts the
1185 `\usepackage{}' declaration corresponding to input macro.
1187 To activate the package completion for your favarite package, set the
1188 variable `YaTeX-package-alist-private' correctly. Please refere the value
1189 of `YaTeX-package-alist-default' as an example.
1192 File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top
1194 Online help
1195 ***********
1197 YaTeX provides you the online help with popular LaTeX commands.
1199 Here are the key strokes for the online help.
1201 `[prefix] ?'
1202 ... Online help
1203 `[prefix] /'
1204 ... Online apropos
1207 Online help
1208 ===========
1210 `Online help' shows the documentation for the popular LaTeX
1211 commands(defaults to the commands on the cursor) in the next buffer.
1212 There are two help file, `global help' and `private help'. The former
1213 file contains the descriptions on the standard LaTeX command and is
1214 specified its name by variable `YaTeX-help-file'. Usually, the global
1215 help file should be located in public space (`$EMACSEXECPATH' by default)
1216 and should be world writable so that anyone can update it to enrich its
1217 contents. The latter file contains descriptions on non-standard or
1218 personal command definitions and is specified by
1219 `YaTeX-help-file-private'. This file should be put into private
1220 directory.
1223 Online apropos
1224 ==============
1226 `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all
1227 the documentations that contains the keyword entered by the user.
1230 When no descriptions are found...
1231 =================================
1233 If there is no description on a command in help files, YaTeX requires
1234 you to write a description on that command. If you are willing to do,
1235 determine which help file to add and write the description on it referring
1236 your manual of (La)TeX. Please send me your additional descriptions if
1237 you describe the help on some standard commands. I might want to include
1238 it in the next distribution.
1241 File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top
1243 Browsing file hierarchy
1244 ***********************
1246 When you are editing multi-file source, typing
1248 `[prefix] d'
1249 ... browse file hierarchy
1251 asks you the parent-most file (which may be defaulted) and displays the
1252 documentation hierarchy in the next window. In this buffer, the following
1253 commands are available.
1255 `n'
1256 ... move to the next line and show its contents
1257 `p'
1258 ... move to the previous line and show its contents
1259 `N'
1260 ... move to the next file in the same inclusion level
1261 `P'
1262 ... move to the previous file in the same inclusion level
1263 `j'
1264 ... move to the next line
1265 `k'
1266 ... move to the previous line
1267 `u'
1268 ... move to the parent file
1269 `.'
1270 ... show the current files contents in the next window
1271 `SPC'
1272 ... scroll up the current file window
1273 `DEL, b'
1274 ... scroll down the current file window
1275 `<'
1276 ... show the beginning of the current file
1277 `>'
1278 ... show the end of the current file
1279 `>'
1280 ... return to the previous postion after `<' or `>'
1281 `RET, g'
1282 ... open the current file in the next window
1283 `mouse-2'
1284 ... same as RET(available only with window system)
1285 `o'
1286 ... other window
1287 `1'
1288 ... delete other windows
1289 `-'
1290 ... shrink hierarchy buffer window
1291 `+'
1292 ... enlarge hierarchy buffer window
1293 `?'
1294 ... describe mode
1295 `q'
1296 ... quit
1298 Note that operations on the file contents in the next window do not work
1299 correctly when you close the corresponding file.
1302 File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top
1304 Cooperation with other packages
1305 *******************************
1307 YaTeX works better with other brilliant packages.
1310 gmhist
1311 ======
1313 When you are loading `gmhist.el' and `gmhist-mh.el', you can use
1314 independent command history list at the prompt of preview command
1315 (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you
1316 can enter the previous command line string repeatedly by typing `M-p'.
1319 min-out
1320 =======
1322 `min-out', the outline minor mode, can be used in yatex-mode buffers.
1323 If you want to use it with YaTeX, please refer the file `yatexm-o.el' as
1324 an example.
1327 File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top
1329 Customizations
1330 **************
1332 You can customize YaTeX by setting Emacs-Lisp variables and by making
1333 add-in functions.
1335 * Menu:
1337 * Lisp variables::
1338 * Add-in functions::
1339 * Add-in generator::
1342 File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations
1344 Lisp variables
1345 ==============
1347 You can change the key assignments or make completion more comfortable
1348 by setting the values of various variables which control the movement of
1349 yatex-mode.
1351 For example, if you want to change the prefix key stroke from `C-c' to
1352 any other sequence, set YaTeX-prefix to whatever you want to use. If you
1353 don't want to use the key sequence `C-c letter' which is assumed to be the
1354 user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter'
1355 to `t', and all of the default key bind of `C-c letter' will turn to the
1356 corresponding `C-c C-letter' (but the region based completions that is
1357 invoked with `C-c Capital-letter' remain valid, if you want to disable
1358 those bindings, set that variable to 1 instead of `t').
1360 * Menu:
1362 * All customizable variables::
1363 * Sample definitions::
1364 * Hook variables::
1365 * Hook file::
1368 File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables
1370 All customizable variables
1371 --------------------------
1373 Here are the customizable variables of yatex-mode. Each value setq-ed
1374 in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected.
1375 Parenthesized contents stands for the default value. When you are to
1376 change some of these variables, see more detailed documentation of the
1377 variable by `M-x describe-variable'.
1379 -- Variable: YaTeX-japan
1380 Set this nil to produce all messages in English (`Depends on Japanese
1381 feature of Emacs')
1383 -- Variable: YaTeX-kanji-code
1384 Default buffer-file-coding-system for YaTeX modes' buffer. Set this
1385 0 to no language conversion. Nil to preserve original coding-system.
1386 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (`1 or 2')
1388 -- Variable: YaTeX-prefix
1389 Prefix key stroke (`C-c')
1391 -- Variable: YaTeX-inhibit-prefix-letter
1392 Change key stroke from `C-c letter' to `C-c C-letter' (`nil')
1394 -- Variable: YaTeX-fill-prefix
1395 Fill-prefix used in yatex-mode (`nil')
1397 -- Variable: YaTeX-user-completion-table
1398 Name of user dictionary where learned completion table will be
1399 stored. (`"~/.yatexrc"')
1401 -- Variable: tex-command
1402 LaTeX typesetter command (`"latex"')
1404 -- Variable: dvi2-command
1405 Preview command (`"xdvi -geo +0+0 -s 4"')
1407 -- Variable: dviprint-command-format
1408 Command format to print dvi file (`"dvi2ps %f %t %s | lpr"')
1410 -- Variable: dviprint-from-format
1411 Start page format of above %f. %b will turn to start page (`"-f %b"')
1413 -- Variable: dviprint-to-format
1414 End page format of above %t. %e will turn to `end' page (`"-t %e"')
1416 -- Variable: makeindex-command
1417 Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS))
1419 -- Variable: YaTeX-dvipdf-command
1420 Default command name to convert .dvi to PDF (`"dvipdfmx"')
1422 -- Variable: YaTeX-need-nonstop
1423 Put `\nonstopmode{}' or not (`nil')
1425 -- Variable: latex-warning-regexp
1426 Regular expression of warning message latex command puts out
1427 (`"line.* [0-9]*"')
1429 -- Variable: latex-error-regexp
1430 Regular expression of error message (`"l\\.[1-9][0-9]*"')
1432 -- Variable: latex-dos-emergency-message
1433 Message latex command running on DOS puts at abort (`"Emergency
1434 stop"')
1436 -- Variable: YaTeX-item-regexp
1437 Regular expression of item command (`"\\\\item"')
1439 -- Variable: YaTeX-verb-regexp
1440 Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"')
1442 -- Variable: YaTeX-nervous
1443 T for using local dictionary (`t')
1445 -- Variable: YaTeX-sectioning-regexp
1446 Regexp of LaTeX sectioning command
1447 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"')
1449 -- Variable: YaTeX-fill-inhibit-environments
1450 Inhibit fill in these environments (`'("tabular" "tabular*" "array"
1451 "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath"
1452 "verbatim" "verbatim*")')
1454 -- Variable: YaTeX-uncomment-once
1455 T for deleting all preceding `%' (`nil')
1457 -- Variable: YaTeX-close-paren-always
1458 T for always close all parenthesis automatically, `nil' for only eol
1459 (`t')
1461 -- Variable: YaTeX-auto-math-mode
1462 Switch math-mode automatically (`t')
1464 -- Variable: YaTeX-math-key-list-private
1465 User defined alist, math-mode-prefix vs completion alist used in
1466 image completion (`nil'). See `yatexmth.el' for the information
1467 about how to define a completion alist.
1469 -- Variable: YaTeX-default-pop-window-height
1470 Initial height of typesetting buffer when one-window. Number for the
1471 lines of the buffer, numerical string for the percentage of the
1472 screen-height. `nil' for half height (10)
1474 -- Variable: YaTeX-help-file
1475 Global online help file name
1476 (`$doc-directory/../../site-lisp/YATEXHLP.eng')
1478 -- Variable: YaTeX-help-file-private
1479 Private online help file name (`"~/YATEXHLP.eng"')
1481 -- Variable: YaTeX-no-begend-shortcut
1482 Disable [prefix] b ?? shortcut (`nil)'
1484 -- Variable: YaTeX-hilit-pattern-adjustment-private
1485 List of the list that contain the regular expression and the symbol
1486 of logical meaning of the string that matches the pattern. See also
1487 the value from `(assq 'yatex-mode hilit-patterns-alist)' and the
1488 value of `YaTeX-hilit-pattern-adjustment-default' (and even the
1489 document of hilit19.el).
1491 -- Variable: YaTeX-sectioning-level
1492 Alist of LaTeX's sectioning command vs its height.
1494 -- Variable: YaTeX-hierarchy-ignore-heading-regexp
1495 `YaTeX-display-hierarchy' searches for sectioning command first, and
1496 comment line secondary as a file headings. In latter case, ignore lines
1497 that match with regular expression of this variable. Default value of
1498 this variable is RCS header expressions and mode specifying line `-*- xxxx
1499 -*'.
1501 -- Variable: YaTeX-skip-default-reader
1502 Non-nil for this variable skips the default argument reader of
1503 section-type command when add-in function for it is not defined
1504 (`nil')
1506 -- Variable: YaTeX-create-file-prefix-g
1507 When typing `prefix g' on the `\include' line, open the target file
1508 even if the file doesn't exist (`nil')
1510 -- Variable: YaTeX-simple-messages
1511 Simplyfy messages of various completions (`nil')
1513 -- Variable: YaTeX-hilit-sectioning-face
1514 When hilit19 and yatex19 is active, YaTeX colors the sectioning
1515 commands. This variable specifies the foreground and background
1516 color of `\part' macro. The default value is `'(yellow/dodgerblue
1517 yellow/slateblue)'. The first element of this list is for the screen
1518 when `hilit-background-mode' is `'light', and the second element is
1519 for `'dark'. You should specify both color as `forecolor/backcolor'.
1521 -- Variable: YaTeX-hilit-sectioning-attenuation-rate
1522 When color mode, this variable specifies how much attenuate the color
1523 density of `\subparagraph' compared with that of `\chapter' (`'(15
1524 40)') See also `YaTeX-hilit-sectioning-face'.
1526 -- Variable: YaTeX-use-AMS-LaTeX
1527 If you use AMS-LaTeX, set to `t' (`nil')
1529 -- Variable: YaTeX-use-LaTeX2e
1530 If you use LaTeX2e, set to `t' (`t')
1532 -- Variable: YaTeX-template-file
1533 File name which is automatically inserted at creation
1534 (`~/work/template.tex')
1536 -- Variable: YaTeX-search-file-from-top-directory
1537 Non-nil means to search input-files from the directory where main
1538 file exists (`t')
1540 -- Variable: YaTeX-use-font-lock
1541 Use font-lock to fontify buffer or not (`(featurep 'font-lock)'
1543 -- Variable: YaTeX-use-hilit19
1544 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)'
1546 -- Variable: YaTeX-use-italic-bold
1547 YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20
1548 or later). This variable is effective only when font-lock is used.
1549 (`(featurep 'hilit19)'
1551 -- Variable: YaTeX-singlecmd-suffix
1552 Suffix which is always inserted after maketitle-type macros. `"{}"'
1553 is recommended.
1555 -- Variable: YaTeX-package-alist-private
1556 Alist of LaTeX2e-package name vs. lists of macros in it. Set this
1557 alist properly and YaTeX automatically check the declaratiion of
1558 `usepackage' for corresponding macro, when you input that macro with
1559 completion. If required `usepackage' is not found, YaTeX also
1560 automatically inserts `\usepackage'. Alist is as follows;
1561 '((PackageName1
1562 (completionType ListOfMacro)
1563 (completionType ListOfMacro))
1564 (PackageName2
1565 (completionType ListOfMacro)
1566 (completionType ListOfMacro...))....) completionType is
1567 one of `env, section, maketitle'. Consult the value of
1568 `YaTeX-package-alist-default' as an example.
1570 -- Variable: YaTeX-tabular-indentation
1571 At indentation by `C-i' in tabular or array environment, YaTeX put
1572 the additional spaces to the normail indentation depth. The number
1573 of additional spaces is the product of YaTeX-tabular-indentation and
1574 the number of column position in tabular.
1576 -- Variable: YaTeX-noindent-env-regexp
1577 Regexp of environment names that should begin with no indentation.
1578 All verbatime-like environment name should match with.
1580 -- Variable: YaTeX-ref-default-label-string
1581 Default \\ref time string format. This format is like strftime(3)
1582 but allowed conversion char are as follows; %y -> Last 2 digit of
1583 year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H ->
1584 Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal
1585 conversion of yymmdd. %qX -> alphabetical-decimal conversion of
1586 HHMMSS. Beware defualt label-string should be always unique. So
1587 this format string should have both time part (%H+%M+%S or %qX) and
1588 date part (%y+(%b|%m)+%d or %qx).
1590 -- Variable: YaTeX-ref-generate-label-function
1591 Function to generate default label string for unnamed \\label{}s.
1592 The function pointed to this value should take two arguments. First
1593 argument is LaTeX macro's name, second is macro's argument. Here is
1594 an example for using this value.
1595 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label)
1596 (defun my-yatex-generate-label (command value)
1597 (and (string= command "caption")
1598 (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t)
1599 (setq command (match-string 1)))
1600 (let ((alist '(("chapter" . "chap")
1601 ("section" . "sec")
1602 ("subsection" . "subsec")
1603 ("figure" . "fig")
1604 ("table" . "tbl"))))
1605 (if (setq command (cdr (assoc command alist)))
1606 (concat command ":" value)
1607 (YaTeX::ref-generate-label nil nil))))
1611 File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables
1613 Sample definitions
1614 ------------------
1616 For instance, to change the prefix key stroke to `ESC', and name of the
1617 user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB
1618 character, add the following `setq' to `~/.emacs'.
1620 (setq YaTeX-prefix "\e"
1621 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1622 YaTeX-fill-prefix " ")
1625 File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables
1627 Hook variables
1628 --------------
1630 More customizations will be done by the hook-function defined in
1631 hook-variable `yatex-mode-hook'. This is useful to define a shortcut key
1632 sequence to enter some environments other than `document' and `enumerate'
1633 etc. The following statement defines `[prefix] ba' to enter
1634 `\begin{abstract}' ... `=end{abstract}' immediately.
1636 (setq yatex-mode-hook
1637 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1639 You should use functions `YaTeX-define-key', or
1640 `YaTeX-define-begend-key' to define all the key sequences of yatex-mode.
1643 File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables
1645 Hook file
1646 ---------
1648 You can stuff all of YaTeX related expressions into a file named
1649 `yatexhks.el' if you have a lot of codes. YaTeX automatically load this
1650 file at the initialization of itself. Using `yatexhks.el' makes
1651 `yatex-mode-load-hook' unnecessary.
1654 File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations
1656 Add-in functions
1657 ================
1659 You can easily define a function to input detailed arguments with
1660 completion according to LaTeX environments or commands.
1663 What is add-in functions?
1664 -------------------------
1666 When you input `tabular' environment, don't you think "I want YaTeX to
1667 complete its argument toward my favorite one such as `{|c|c|c|}'..."?
1668 Yes, you can define the function to complete arguments for any environment
1669 and any LaTeX commands.
1672 Procedure
1673 ---------
1675 Here is the procedure to define add-in functions.
1676 1. Define the function
1677 2. Put the function into `yatexhks.el'
1679 * Menu:
1681 * How the add-in function works::
1682 * How the function is called::
1683 * Useful functions for creating add-in::
1684 * Contribution::
1687 File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions
1689 How the add-in function works
1690 -----------------------------
1692 There are three types of add-in.
1694 1. Option add-in
1695 2. argument add-in
1696 3. enclosing add-in
1698 "Option add-in" returns the LaTeX's optional parameters such as optional
1699 strings after `\begin{ENV}', optional strings between a section-type
1700 command and its first argument, and optional strings just after type
1701 maketitle-type command. The following illustrates the name of add-in
1702 functions, where underlined strings are generated by add-in functions.
1704 \begin{table}[ht] (Function name: YaTeX:table)
1705 ~~~~
1706 \put(100,200){} (Function name: YaTeX:put)
1707 ~~~~~~~~~
1708 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1709 ~~~~~~~~~~
1711 Obviously, the function name is decided by concatenating the prefix
1712 `YaTeX:' and LaTeX command's name.
1714 Another add-in type is "argument add-in", which completes arguments for
1715 section-type commands.
1717 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1718 ~~~~ ~~~
1720 When the section-type command is inputted, the function named by
1721 concatenating `YaTeX::' and section-type command, is called automatically
1722 with an integer argument which indicates which argument of section-type
1723 command is being read. Thus the add-in should determine the job referring
1724 the value of its argument.
1726 "enclosing add-in" is for modifying and/or checking the region that will
1727 be enclosed by section-type commands via `[prefix] S'. An enclosing
1728 add-in function will be called with two arguments, beginning of the
1729 enclosed region and end of the region. Suppose you want to enclose the
1730 existing text `(a+b)/c' by `\frac{}'.
1732 a/c
1733 | |
1734 A B
1736 You do set-mark-command at point A and then move to point B. Typing
1737 `[prefix] S' and input `frac' enclose the region like this;
1739 \frac{a/c}
1741 Normally, the expression `a/c' is translated to `\frac{a}{c}'. An
1742 enclosing add-in is useful for modifying `/' to `}{'.
1744 * Menu:
1746 * Defining option-add-in::
1747 * Defining argument-add-in::
1748 * Defining enclosing-add-in::
1751 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
1753 Defining `option add-in'
1754 ........................
1756 If you want `{|c|c|c|}' for all `tabular' environment,
1758 (defun YaTeX:tabular ()
1759 "{|c|c|c|}")
1761 is enough. If you want more complicated format, define as below.
1763 (defun YaTeX:tabular ()
1764 "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}")
1766 Note that the character `\' must be described as `\\' in Emacs-Lisp. The
1767 next example reads the tabular format from keyboard.
1768 (defun YaTeX:tabular ()
1769 (concat "{" (read-string "Rule: ") "}"))
1772 File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works
1774 Defining `argument add-in'
1775 ..........................
1777 This section describes how to define the add-in function for
1778 `\newcommand'.
1780 The first argument of `\newcommand' begins always with `\'. The second
1781 argument is usually so complex that we can not edit them in the
1782 minibuffer. Here is the created function considering this.
1784 (defun YaTeX::newcommand (n) ;n is argument position
1785 (cond
1786 ((= n 1) ;1st argument is macro name
1787 (read-string "Command: " "\\")) ;initial input `\'
1788 ((= n 2) "") ;do nothing when reading arg#2
1789 (t nil)))
1791 Note that when the `argument add-in' function return `nil', normal
1792 argument reader will be called.
1795 File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works
1797 Defining `enclosing add-in'
1798 ...........................
1800 This section describes how to define the add-in function for text
1801 enclosed by `\frac{}'.
1803 When enclosing the text `5/3' by `\frac{}', you might want to replace
1804 `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two
1805 arguments, beginning of enclosed text and end of enclosed text. The
1806 function is expected to replace `/' with `}{'. Here is an example
1807 expression.
1809 (defun YaTeX::frac-region (beg end)
1810 (catch 'done
1811 (while (search-forward "/" end t)
1812 (goto-char (match-beginning 0))
1813 (if (y-or-n-p "Replace this slash(/) with `}{'")
1814 (throw 'done (replace-match "}{")))
1815 (goto-char (match-end 0)))))
1818 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
1820 How the function is called
1821 --------------------------
1823 YaTeX calls the add-in functions for specified begin-type, section-type,
1824 and maketitle-type command, if any. `Option add-in' functions for
1825 begin-type are called when `\begin{ENV}' has been inserted, functions for
1826 section-type are called just before input of the first argument, and
1827 functions for maketitle-type is called after maketitle-type command has
1828 been inserted. `Argument add-in' functions are called at each entry of
1829 arguments for section-type commands.
1832 File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions
1834 Useful functions for creating add-in
1835 ------------------------------------
1837 Many add-in functions for typical LaTeX commands are defined in
1838 `yatexadd.el'. Those are also useful as references. Here are the short
1839 descriptions on useful functions, where [F] means function, [A] means
1840 arguments, [D] means description.
1842 `[F]'
1843 YaTeX:read-position
1844 `[A]'
1845 Character list which can show up in the brackets
1846 `[D]'
1847 Return the location specifier such as `[htb]'. When nothing is
1848 entered, omit [] itself. If the possible characters are "htbp", call
1849 this function as `(YaTeX:read-position "htbp")'
1851 `[F]'
1852 YaTeX:read-coordinates
1853 `[A]'
1854 Base prompt, X-axis prompt, Y-axis prompt (each optional)
1855 `[D]'
1856 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for
1857 X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the
1858 form of "(X,Y)". The default prompts are `Dimension', `X', `Y'
1859 respectively.
1861 `[F]'
1862 YaTeX:check-completion-type
1863 `[A]'
1864 One of the symbols: 'begin, 'section, or 'maketitle
1865 `[D]'
1866 Check the current completion type is specified one and cause error
1867 if not. The variable `YaTeX-current-completion-type' holds the symbol
1868 according to the current completion type.
1871 File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions
1873 Contribution
1874 ------------
1876 If you make your own pretty function and you let it be in public, please
1877 send me the function. I'm going to include it in the next release.
1880 File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations
1882 Add-in generator
1883 ================
1885 First, don't forget to read the section of add-in functions *Note Add-in
1886 functions::. If you easily understand how to define them, there's no need
1887 to read this section. But being not familiar with Emacs-Lisp, when you
1888 don't have clear idea what to do, this section describes how to get YaTeX
1889 make add-in function.
1891 There are two methods of generation. One is for fully interactive
1892 generator for beginners and another requires little knowledge of
1893 Emacs-Lisp.
1896 Generator for beginners
1897 -----------------------
1898 The former generator is called by
1899 `M-x YaTeX-generate'
1901 strokes. All you have to do is follow the guidances. Defying them may
1902 cases the disaster (I wonder what is it???). So when you make some
1903 mistake, it is recommendable to type `C-g' and start afresh.
1906 Simple generator
1907 ----------------
1909 The latter generator is invoked by the next sequence.
1910 `M-x YaTeX-generate-simple'
1911 This generator can make both "option add-in" and "argument add-in"
1912 (*refer the section add-in functions*
1913 *Note How the add-in function works::), whereas `YaTeX-generate'
1914 cannot make "argument addin".
1916 For example, assume you have the LaTeX command as follows.
1918 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
1919 (A) (B) (1) (2) (3)
1920 (A)Optional parameter to specify the position
1921 One of t(top), b(bottom), l(left), r(right)
1922 (B)Maximum size of frame
1923 (1)1st argument is filename of EPS file
1924 (2)2nd argument indicates
1925 plain do nothing
1926 frame make frame around image
1927 dframe make double-frame around image
1928 for included EPS file.
1929 (3)Caption for the picture
1931 Now get start with generation. Typing `M-x YaTeX-generate-simple'
1932 brings the prompt:
1933 (O)ption? (A)rgument?
1936 Generating "option add-in"
1937 ..........................
1939 Since (A), (B) above are optional argument, all we have to do to
1940 complete them is define the option add-in for them. Let's generate the
1941 function to complete (A).
1943 M-x YaTeX-generate-simple RET
1944 epsinput RET
1947 Typing as above leads the next prompt.
1949 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
1951 This asks that "Which type is the completion style of 1st argument?".
1952 Here are the possible completion style.
1954 `String'
1955 read plain string
1956 `Complete'
1957 read with completion
1958 `File'
1959 read file name
1960 `Option'
1961 read optional string (if string omitted, omit [] too)
1962 `Position'
1963 read positional option (like [htbp])
1964 `Coord.'
1965 read coordinates
1966 `Quit'
1967 quit from generating
1969 Since (A) is the optional argument to specify the location of included
1970 EPS file, the completion style is `Position', and the possible characters
1971 are t, b, l, and r. To tell these information to generator, operate as
1972 follows.
1974 Read type(1).... p
1975 Acceptable characters: tblr RET
1977 (B) is coordinate. So its completion style is coOrd. We want a prompt
1978 meaning "Maximum size" when completion.
1980 Read type(2).... o
1981 Prompt for coordinates: Max size RET
1983 That's all for optional argument. Select quit.
1985 Read type(3).... q
1987 Then the generated option add-in function for \epsinput will be shown in
1988 the next window.
1991 Generating "argument add-in"
1992 ............................
1994 Next, create the argument add-in. The arguments for \epsinput are EPS
1995 file name, framing style, and caption string in sequence.
1997 M-x YaTeX-generate-simple RET
1998 epsinput RET
2001 Above key strokes bring the prompt that asks the number of argument.
2002 Answer it with 3.
2004 How many arguments?: 3 RET
2006 Then the generator asks the completion style and prompt for completion.
2007 Answer them. `f' for FileName and prompt string.
2009 Read type(1).... f
2010 Prompt for argument#1 EPS file name RET
2012 The second argument is one of selected symbol. So the completion type
2013 is `Completion'.
2015 Read type(2).... c
2016 Prompt for argument#2 Include style RET
2018 Then all the candidates ready to be read. Type single RET after
2019 entering all.
2021 Item[1](RET to exit): plain RET
2022 Item[2](RET to exit): frame RET
2023 Item[3](RET to exit): dframe RET
2024 Item[4](RET to exit): RET
2026 The following prompt asks whether the entered string must belong to
2027 candidates or not. In this case, since the argument must be one of
2028 `plain', `frame', and `dframe', type `y'.
2030 Require match? (y or n) y
2032 The last argument is the caption string for which any completion is
2033 needed.
2035 Read type(3).... s
2036 Prompt for argument#3 Caption RET
2037 default: Figure of RET
2039 Finally we'll get the argument add-in in the next window.
2042 Contribution
2043 ------------
2045 If you get your own pretty function and you let it be in public, please
2046 steel yourself in the happy atmosphere and do not send me the function. I
2047 do know it is not fine because it is generated by yatexgen:-p.
2050 File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top
2052 Etcetera
2053 ********
2055 The standard completion tables provided in `yatex.el' contain a few
2056 LaTeX commands I frequently use. This is to lessen the key strokes to
2057 complete entire word, because too many candidates rarely used often cause
2058 too many hits. Therefore always try to use completion in order to enrich
2059 your dictionary, and you will also find `Wild Bird' growing suitable for
2060 your LaTeX style.
2062 The package name `Wild Bird' is the English translation of Japanese
2063 title `Yachou', which is a trick on words of Japanese.
2066 File: yatexe, Node: Copying, Prev: Etcetera, Up: Top
2068 Copying
2069 *******
2071 This program is distributed as a free software. You can
2072 use/copy/modify/redistribute this software freely but with NO warranty to
2073 anything as a result of using this software. Adopting code from this
2074 program is also free. But I would not do contract act.
2076 Any reports and suggestions are welcome as long as I feel interests in
2077 this software. My possible e-mail address is `yuuji@yatex.org'. (as of
2078 Jan.2004) And there is mailing list for YaTeX. Although the common
2079 language is Japanese, questions in English will be welcome. To join the
2080 ML, send the mail whose subject is `append' to the address
2081 `yatex@yatex.org. If you have some question, please ask to
2082 `yatex-admin@yatex.org'.
2084 The specification of this software will be surely modified (depending on
2085 my feelings) without notice :-p.
2088 HIROSE Yuuji
2090 Tag table:
2091 Node: Top153
2092 Node: What is YaTeX?1493
2093 Node: Main features1865
2094 Node: Installation3456
2095 Node: Typesetting4232
2096 Node: Calling typesetter5300
2097 Node: Calling previewer6945
2098 Node: Printing out7305
2099 Node: %#notation7596
2100 Node: Changing typesetter7971
2101 Node: Splitting input files8334
2102 Node: Static region for typesetting9761
2103 Node: Lpr format10889
2104 Node: Editing %# notation11945
2105 Node: Completion12463
2106 Node: Begin-type completion13022
2107 Node: Section-type completion16065
2108 Node: view-sectioning18499
2109 Node: Large-type completion20078
2110 Node: Maketitle-type completion20808
2111 Node: Arbitrary completion21359
2112 Node: End completion21748
2113 Node: Accent completion22217
2114 Node: Image completion22833
2115 Node: Greek letters completion25089
2116 Node: Local dictionaries25815
2117 Node: Commenting out26751
2118 Node: Cursor jump28209
2119 Node: Jump to corresponding object28520
2120 Node: Invoking image processor29920
2121 Node: Jump to main file31262
2122 Node: Jumping around the environment31626
2123 Node: Jumping to last completion position32043
2124 Node: Changing and Deleting32551
2125 Node: Changing LaTeX commands32942
2126 Node: Killing LaTeX commands34118
2127 Node: Filling35302
2128 Node: Updation of includeonly37152
2129 Node: What column37948
2130 Node: Intelligent newline39032
2131 Node: Usepackage checker40692
2132 Node: Online help41282
2133 Node: Browsing file hierarchy42956
2134 Node: Cooperation with other packages44692
2135 Node: Customizations45396
2136 Node: Lisp variables45729
2137 Node: All customizable variables46732
2138 Node: Sample definitions56615
2139 Node: Hook variables57127
2140 Node: Hook file57830
2141 Node: Add-in functions58168
2142 Node: How the add-in function works59027
2143 Node: Defining option-add-in61225
2144 Node: Defining argument-add-in61946
2145 Node: Defining enclosing-add-in62827
2146 Node: How the function is called63680
2147 Node: Useful functions for creating add-in64355
2148 Node: Contribution65759
2149 Node: Add-in generator66032
2150 Node: Etcetera71425
2151 Node: Copying72029
2153 End tag table