yatex

view docs/yatexe @ 83:680d92784c1a

Initial revision
author yuuji
date Sun, 27 Sep 2009 13:04:14 +0000
parents
children 590fc51462c7
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 p'
129 ... preview
130 `[prefix] t l'
131 ... lpr dvi-file
132 `[prefix] t s'
133 ... search current string on xdvi-remote
135 * Menu:
137 * Calling typesetter::
138 * Calling previewer::
139 * Printing out::
141 
142 File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting
144 Calling typesetter
145 ==================
147 Typing `[prefix] t j', the current editing window will be divided
148 horizontally when you invoke latex command, and log message of LaTeX
149 typesetting will be displayed in the other window; called typesetting
150 buffer. The typesetting buffer automatically scrolls up and traces LaTeX
151 warnings and error messages. If you see latex stopping by an error, you
152 can send string to latex in the typesetting buffer.
154 If an error stops the LaTeX typesetting, this key stroke will move the
155 cursor to the line where LaTeX error is detected.
157 `[prefix] ''
158 `([prefix]+single quotation)'
160 ... jump to the previous error or warning
162 If you find a noticeable error, move to the typesetting buffer and move
163 the cursor on the line of error message and type `SPACE' key. This makes
164 the cursor move to corresponding source line.
166 Since `[prefix] tr' pastes the region into the file `texput.tex' in the
167 current directory, you should be careful of overwriting. The method of
168 specification of the region is shown in the section *Note %#notation::.
170 The documentclass for typeset-region is the same as that of editing file
171 if you edit one file, and is the same as main file's if you edit splitting
172 files.
174 
175 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting
177 Calling previewer
178 =================
180 `[prefix] t p' invokes the TeX previewer. And if you are using
181 xdvi-remote, which can be controled from other terminals, `[prefix] t s'
182 enables you to search current string at the cursor on the running xdvi
183 window.
185 
186 File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting
188 Printing out
189 ============
191 When you type `[preifx] t l', YaTeX asks you the range of dvi-printing
192 by default. You can skip this by invoking it with universal-argument as
193 follows:
195 C-u [prefix] tl
197 
198 File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top
200 %# notation
201 ***********
203 You can control the typesetting process by describing `%#' notations in
204 the source text.
206 * Menu:
208 * Changing typesetter::
209 * Splitting input files::
210 * Static region for typesetting::
211 * Lpr format::
212 * Editing %# notation::
214 
215 File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation
217 To change the `latex' command or to split a source text.
218 ========================================================
220 To change the typesetting command, write
222 %#!latex-big
224 anywhere in the source text. This is useful for changing typesetter.
226 
227 File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation
229 Splitting input files
230 =====================
232 And if you split the source text and edit subfile that should be
233 included from main text.
235 %#!latex main.tex
237 will be helpful to execute latex on main file from sub text buffer. Since
238 this command line after `%#!' will be sent to shell literally, next
239 description makes it convenient to use ghostview as dvi-previewer.
241 %#!latex main ; dvi2ps main.dvi > main
243 Note that YaTeX assumes the component before the last period of the last
244 word in this line as base name of the main LaTeX source. The `%f'
245 notation in this line is replaced by main file name, and `%r' replaced by
246 root name of main file name. If you specify `%f' or `%r', YaTeX always
247 ask you the name of main file at the first typesetting.
249 To make best use of the feature of inter-file jumping by `[prefix] g'
250 (see *Note Cursor jump::), take described below into consideration.
252 * You can put split texts in sub directory, but not in
253 sub directory of sub directory.
254 * In the main text, specify the child file name with relative path name
255 such as \include{chap1/sub}, when you include the file in
256 a sub-directory.
257 * In a sub-text, write `%#!latex main.tex' even if `main.tex'
258 is in the parent directory(not %#!latex ../main.tex).
260 
261 File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation
263 Static region
264 =============
266 Typeset-region by `[prefix] tr' passes the region between point and mark
267 to typesetting command by default. But when you want to typeset static
268 region, enclose the region by `%#BEGIN' and `%#END' as follows.
270 %#BEGIN
271 TheRegionYouWantToTypesetManyTimes
272 %#END
274 This is the rule of deciding the region.
276 1. If there exists %#BEGIN before point,
278 1. If there exists %#END after %#BEGIN,
279 * From %#BEGIN to %#END.
281 2. If %#END does not exist after %#BEGIN,
282 * From %#BEGIN to the end of buffer.
284 2. If there does not exist %#BEGIN before point,
285 * Between point and mark(standard method of Emacs).
287 It is useful to write `%#BEGIN' in the previous line of \begin and
288 `%#END' in the next line of \`end' when you try complex environment such
289 as `tabular' many times. It is also useful to put only `%#BEGIN' alone at
290 the middle of very long text. Do not forget to erase `%#BEGIN' `%#END'
291 pair.
293 
294 File: yatexe, Node: Lpr format, Next: Editing %# notation, Prev: Static region for typesetting, Up: %#notation
296 Lpr format
297 ==========
299 Lpr format is specified by three Lisp variables. Here are the default
300 values of them.
302 `(1)dviprint-command-format'
303 `"dvi2ps %f %t %s | lpr"'
304 `(2)dviprint-from-format'
305 `"-f %b"'
306 `(3)dviprint-to-format'
307 `"-t %e"'
309 On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text,
310 `%f' by contents of (2), %t by contents of (3). At these replacements,
311 `%b' in (2) is also replaced by the number of beginning page, `%e' in (3)
312 is replaced by the number of ending page. But `%f' and `%t' are ignored
313 when you omit the range of print-out by `C-u [prefix] tl'.
315 If you want to change this lpr format temporarily, put a command such as
316 follows somewhere in the text:
318 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
320 And if you want YaTeX not to ask you the range of printing out, the next
321 example may be helpful.
323 %#LPR dvi2ps %s | lpr
325 
326 File: yatexe, Node: Editing %# notation, Prev: Lpr format, Up: %#notation
328 Editing %# notation
329 ===================
331 To edit `%#' notation described above, type
333 `[prefix] %'
334 ... editing %# notation menu
336 and select one of the entry of the menu as follows.
338 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
340 Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and
341 `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN'
342 and `%#END' are automatically erased.
344 
345 File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top
347 Completion
348 **********
350 YaTeX makes it easy to input the LaTeX commands. There are several
351 kinds of completion type, begin-type, section-type, large-type, etc...
353 * Menu:
355 * Begin-type completion::
356 * Section-type completion::
357 * Large-type completion::
358 * Maketitle-type completion::
359 * Arbitrary completion::
360 * End completion::
361 * Accent completion::
362 * Image completion::
363 * Greek letters completion::
365 
366 File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion
368 Begin-type completion
369 =====================
371 "Begin-type completion" completes commands of `\begin{env}' ...
372 `\end{env}'. All of the begin-type completions begin with this key
373 sequence.
375 `[prefix] b'
376 ... start begin-type completion
378 An additional key stroke immediately completes a frequently used LaTeX
379 `\begin{}'...`\`end'{}' environment.
381 `[prefix] b c'
382 ... `\begin{center}...\end{center}'
383 `[prefix] b d'
384 ... `\begin{document}...\end{document}'
385 `[prefix] b D'
386 ... `\begin{description}...\end{description}'
387 `[prefix] b e'
388 ... `\begin{enumerate}...\end{enumerate}'
389 `[prefix] b E'
390 ... `\begin{equation}...\end{equation}'
391 `[prefix] b i'
392 ... `\begin{itemize}...\end{itemize}'
393 `[prefix] b l'
394 ... `\begin{flushleft}...\end{flushleft}'
395 `[prefix] b m'
396 ... `\begin{minipage}...\end{minipage}'
397 `[prefix] b t'
398 ... `\begin{tabbing}...\end{tabbing}'
399 `[prefix] b T'
400 ... `\begin{tabular}...\end{tabular}'
401 `[prefix] b^T'
402 ... `\begin{table}...\end{table}'
403 `[prefix] b p'
404 ... `\begin{picture}...\end{picture}'
405 `[prefix] b q'
406 ... `\begin{quote}...\end{quote}'
407 `[prefix] b Q'
408 ... `\begin{quotation}...\end{quotation}'
409 `[prefix] b r'
410 ... `\begin{flushright}...\end{flushright}'
411 `[prefix] b v'
412 ... `\begin{verbatim}...\end{verbatim}'
413 `[prefix] b V'
414 ... `\begin{verse}...\end{verse}'
416 Any other LaTeX environments are made by completing-read of the Emacs
417 function.
419 `[prefix] b SPACE'
420 ... begin-type completion
422 The next message will show up in the minibuffer
424 Begin environment(default document):
426 by typing `[prefix] b'. Put the wishing environment with completion in
427 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the
428 LaTeX source text. If the environment you want to put does not exist in
429 the YaTeX completion table, it will be registered in the user completion
430 table. YaTeX automatically saves the user completion table in the user
431 dictionary file at exiting of emacs.
433 At the completion of certain environments, the expected initial entry will
434 automatically inserted such as `\item' for `itemize' environment. If you
435 don't want the entry, it can be removed by undoing.
437 If you want to enclose some paragraphs which have already been written,
438 invoke the begin-type completion with changing the case of `b' of key
439 sequence upper(or invoke it with universal argument by `C-u' prefix).
441 The following example encloses a region with `description' environment.
443 `[prefix] B D'
444 `(or ESC 1 [prefix] b D)'
445 `(or C-u [prefix] b D)'
447 ... begin-type completion for region
449 This enclosing holds good for the completing input by `[prefix] b SPC'.
450 `[prefix] B SPC' enclose a region with the environment selected by
451 completing-read.
453 
454 File: yatexe, Node: Section-type completion, Next: Large-type completion, Prev: Begin-type completion, Up: Completion
456 Section-type completion
457 =======================
459 "Section-type completion" completes section-type commands which take an
460 argument or more such as `\section{foo}'. To invoke section-type
461 completion, type
463 `[prefix] s'
464 ... section-type completion
466 then the prompt
468 (C-v for view) \???{} (default documentclass):
470 will show up in the minibuffer. Section-type LaTeX commands are completed
471 by space key, and the default value is selected when you type nothing in
472 the minibuffer.
474 Next,
476 \section{???}:
478 prompts you the argument of section-type LaTeX command. For example, the
479 following inputs
481 \???{} (default documentclass): section
482 \section{???}: Hello world.
484 will insert the string
486 \section{Hello world.}
488 in your LaTeX source. When you neglect argument such as
490 (C-v for view) \???{} (default section): vspace*
491 \vspace*{???}:
493 YaTeX puts
495 \vspace*{}
497 and move the cursor in the braces.
499 In LaTeX command, there are commands which take more than one arguments
500 such as `\addtolength{\topmargin}{8mm}'. To complete these commands,
501 invoke section-type completion with universal argument as,
503 C-u 2 [prefix] s (or ESC 2 [prefix] s)
505 and make answers in minibuffer like this.
507 (C-v for view) \???{} (default vspace*): addtolength
508 \addtolength{???}: \topmargin
509 Argument 2: 8mm
511 `\addtolength' and the first argument `\topmargin' can be typed easily by
512 completing read. Since YaTeX also learns the number of arguments of
513 section-type command and will ask that many arguments in future
514 completion, you had better tell the number of arguments to YaTeX at the
515 first completion of the new word. But you can change the number of
516 arguments by calling the completion with different universal argument
517 again.
520 Invoking section-type completion with `[Prefix] S' (Capital `S')
521 includes the region as the first argument of section-type command.
523 The section/large/maketitle type completion can work at the prompt for
524 the argument of other section-type completion. Nested LaTeX commands are
525 efficiently read with the recursive completion by typing YaTeX's
526 completion key sequence in the minibuffer.
528 * Menu:
530 * view-sectioning::
532 
533 File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion
535 view-sectioning
536 ---------------
538 In the minibuffer at the prompt of section-type command completion,
539 typing `C-v' shows a list of sectioning commands in source text(The line
540 with `<<--' mark is the nearest sectioning command). Then, default
541 sectioning command appears in the minibuffer. You can go up/down
542 sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing
543 buffer by `C-v'/`M-v', and can hide sectioning commands under certain
544 level by 0 through 6. Type `?' in the minibuffer of sectioning prompt
545 for more information.
547 You can generate this listing buffer (`*Sectioning Lines*' buffer) by
548 typing
549 `M-x YaTeX-section-overview'
550 ... Generate *Sectioning Lines* buffer
552 from the LaTeX source buffer. In this listing buffer, typing `u' on the
553 sectioning command shifts up the corresponding sectioning command in
554 source text and `d' shifts down. After marking lines in the listing
555 buffer, typing `U' shifts up all sectioning commands in the region, and
556 `U' shifts down. Here are all the key bindings of `*Sectioning Lines*'
557 buffer.
559 `SPC'
560 ... Jump to corresponding source line
561 `.'
562 ... Display corresponding source line
563 `u'
564 ... Shift up a sectioning line
565 `d'
566 ... Shift down a sectioning line
567 `U'
568 ... Shift up sectioning lines in region
569 `D'
570 ... Shift down sectioning lines in region
571 `0...6'
572 ... Hide sectioning commands whose level is lower than n
575 
576 File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Section-type completion, Up: Completion
578 Large-type completion
579 =====================
581 "Large-type completion" inputs the font or size changing descriptions
582 such as `{\large }'. When you type
584 `[prefix] l'
585 ... large-type completion
587 the message in the minibuffer
589 {\??? } (default large):
591 prompts prompts you large-type command with completing-read. There are
592 TeX commands to change fonts or sizes, `it', `huge' and so on, in the
593 completion table.
595 Region-based completion is also invoked by changing the letter after
596 prefix key stroke as `[prefix] L'. It encloses the region by braces with
597 large-type command.
599 
600 File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion
602 Maketitle-type completion
603 =========================
605 We call it "maketitle-type completion" which completes commands such as
606 `\maketitle'. Take notice that maketitle-type commands take no arguments.
607 Then, typing
609 `[prefix] m'
610 ... maketitle-type completion
612 begins maketitle-completion. Above mentioned method is true for
613 maketitle-completion, and there are LaTeX commands with no arguments in
614 completion table.
616 
617 File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion
619 Arbitrary completion
620 ====================
622 You can complete certain LaTeX command anywhere without typical
623 completing method as described, by typing
625 `[prefix] SPC'
626 ... arbitrary completion
628 after the initial string of LaTeX command that is preceded by `\'.
630 
631 File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion
633 End completion
634 ==============
636 YaTeX automatically detects the opened environment and close it with
637 \`\end{environment}'. Though proficient YaTeX users never fail to make
638 environment with begin-type completion, some may begin an environment
639 manually. In that case, type
641 `[prefix] e'
642 ... `end' completion
644 at the end of the opened environment.
646 
647 File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion
649 Accent completion
650 =================
652 When you want to write the European accent marks(like `\`{o}'),
654 `[prefix] a'
655 ... accent completion
657 shows the menu
659 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
661 in the minibuffer. Chose one character or corresponding numeric, and you
662 will see
664 \`{}
666 in the editing buffer with the cursor positioned in braces. Type one more
667 character `o' for example, then
669 \`{o}
671 will be completed, and the cursor gets out from braces.
673 
674 File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion
676 Image completion of mathematical sign
677 =====================================
679 Arrow marks, sigma mark and those signs mainly used in the TeX's math
680 environment are completed by key sequences which imitate the corresponding
681 symbols graphically. This completion only works in the math environment.
682 YaTeX automatically detects whether the cursor located in math environment
683 or not, and change the behavior of key strokes `;' and `:'.
685 By the way, we often express the leftarrow mark by `<-' for example.
686 Considering such image, you can write `\leftarrow' by typing `<-' after
687 `;' (semicolon) as a prefix. In the same way, `\longleftarrow' (`<--') is
688 completed by typing `;<--', infinity mark which is imitated by `oo' is
689 completed by typing `;oo'.
691 Here are the sample operations in YaTeX math-mode.
693 INPUT Completed LaTeX commands
694 ; < - `\leftarrow'
695 ; < - - `\longleftarrow'
696 ; < - - > `\longleftrightarrow'
697 ; o `\circ'
698 ; o o `\infty'
700 In any case, you can quit from image completion and can move to the next
701 editing operation if the LaTeX command you want is shown in the buffer.
703 `;' itself in math-environment is inserted by `;;'. Typing `TAB' in the
704 midst of image completion shows all of the LaTeX commands that start with
705 the same name as string you previously typed in. In this menu buffer,
706 press `RET' after moving the cursor (by `n', `p', `b', `f') to insert the
707 LaTeX command.
709 To know all of the completion table, type `TAB' just after `;'. And
710 here is the sample menu by `TAB' after `;<'.
712 KEY LaTeX sequence sign
713 < \leq <
714 ~
715 << \ll <<
716 <- \leftarrow <-
717 <= \Leftarrow <=
719 You can define your favorite key-vs-sequence completion table in the
720 Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also
721 `yatexmth.el' for the information of the structure of this variable.
723 
724 File: yatexe, Node: Greek letters completion, Prev: Image completion, Up: Completion
726 Greek letters completion
727 ========================
729 Math-mode of YaTeX provides another image completion, Greek letters
730 completion in the same method. After prefix `:', typing `a' makes
731 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type
732 `:TAB' to know all the correspondence of alphabets vs. Greek letters.
734 If you will find `;' or `:' doesn't work in correct position of math
735 environment, it may be a bug of YaTeX. Please send me a bug report with
736 the configuration of your text, and avoid it temporarily by typing `;' or
737 `:' after universal-argument(`C-u') which forces `;' and `:' to work as
738 math-prefix.
740 
741 File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top
743 Local dictionaries
744 ******************
746 Tables for completion consist of three dictionaries; `standard
747 dictionary' built in `yatex.el', `user dictionary' for your common private
748 commands, and `local dictionary' that is effective in a certain directory.
750 When you input the command unknown to YaTeX at a completion in the
751 minibuffer, YaTeX asks you with the following prompt;
753 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard
755 In this menu, typing `u' updates your `user dictionary', `l' updates your
756 local dictionary, `n' updates only on-memory dictionary which go through
757 only current Emacs session, and `d' updates no dictionary and throws the
758 new word away.
760 If you find this switching feature meaningless and bothersome, put the
761 next expression into your `~/.emacs'
763 (setq YaTeX-nervous nil)
765 
766 File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top
768 Commenting out
769 **************
771 You may want to comment out some region.
773 `[prefix] >'
774 ... comment out region by %
775 `[prefix] <'
776 ... uncomment region
778 cause an operation to the region between point and mark.
780 `[prefix] .'
781 ... comment out current paragraph
782 `[prefix] ,'
783 ... uncomment current paragraph
785 comments or uncomments the paragraph where the cursor belongs. This
786 `paragraph' means the region marked by the function mark-paragraph, bound
787 to `ESC h' by default. It is NOT predictable what will happen when you
788 continuously comment out some paragraph many times.
790 You can also comment out an environment between `\begin' and `\end', or
791 a `\begin'-\`\end' pair themselves, by making the following key strokes on
792 the line where `\begin{}' or `\end{}' exists.
794 `[prefix] >'
795 ... comment out from \begin to \`end'
796 `[prefix] <'
797 ... uncomment from \begin to \`end'
799 comment whole the contents of environment. Moreover,
801 `[prefix] .'
802 ... comment out \begin and \`end'
803 `[prefix] ,'
804 ... uncomment \begin and \`end'
806 (un)comments out only environment declaration: `\begin{}' and `\end{}'.
807 NOTE that even if you intend to comment out some region, invoking
808 `[prefix] >' on the `\begin',`\end' line decides to work in `commenting
809 out from `\begin' to `\end'' mode.
812 
813 File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top
815 Cursor jump
816 ***********
819 * Menu:
821 * Jump to corresponding object::
822 * Invoking image processor::
823 * Jump to main file::
824 * Jumping around the environment::
825 * Jumping to last completion position::
827 
828 File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump
830 Jump to corresponding object
831 ============================
833 Typing
835 `[prefix] g'
836 ... go to corresponding object
838 in a certain place move the cursor to the place corresponding to the LaTeX
839 command of last place. YaTeX recognize the followings as pairs that have
840 relation each other.
842 * `\begin{}' <-> `\end{}'
843 * `%#BEGIN' <-> `%#END'
844 * On the image-including line -> corresponding viewer or drawing tool
845 * `\label{}' <-> `\ref{}'
846 * `\include(\input)' -> included file
847 * `\bibitem{}' <-> `\cite{}'
849 On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the
850 corresponding `\end',`\begin' line, if its partner really exists. The
851 behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the
852 correspondent of `label/ref' or `cite/bibitem' exists in another file,
853 that file have to be opened to make a round trip between references by
854 `[prefix] g'.
856 If you type `[prefix] g' on the line of `\include{chap1}', typically in
857 the main text, YaTeX switches buffer to `chap1.tex'.
859 `[prefix] 4 g'
860 ... go to corresponding object in other window
862 do the same job as `[prefix] g' except it's done in other window. Note
863 that this function doesn't work on `begin/end', `%#BEGIN/%#END' pairs
864 because it is meaningless.
866 
867 File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump
869 Invoking image processor
870 ========================
873 `image-including line' described above means such lines as
874 `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX
875 automatically searches source of `foo.ps' and invokes image viewer or
876 drawing tool correspoinding to it. For example; if you draw an image
877 foo.obj with Tgif and enclose its product named foo.eps by `\epsfile'
878 command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif
879 foo.obj'. How a processor is choosen is as follows.
881 1. If there is an expression matching with one of the pattern defined in
882 `YaTeX-processed-file-regexp-alist', extract file name from regexp
883 group surrounded by \\(\\). (Which group corresponds is written in
884 the cdr part of each list.) If no matches were found, do nothing.
885 2. If there is a pattern as `%PROCESSOR' which is defined in the
886 variable `YaTeX-file-processor-alist', call that processor giving the
887 file name with corresponding extension.
888 3. If not, check the existence of each file which is supplied the
889 extension in the cdr part of each list of
890 `YaTeX-file-processor-alist'. If any, call the corresponding image
891 viewer or drawing tool.
893 
894 File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump
896 Jump to main file
897 =================
899 Typing
901 `[prefix] ^'
902 ... visit main file
903 `[prefix] 4^'
904 ... visit main file in other buffer
906 in a sub text switch the buffer to the main text specified by `%#!'
907 notation.
909 
910 File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump
912 Jumping around the environment
913 ==============================
915 And these are the functions which work on the current LaTeX environment:
917 `M-C-a'
918 ... beginning of environment
919 `M-C-e'
920 ... `end' of environment
921 `M-C-@'
922 ... mark environment
924 
925 File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump
927 Jumping to last completion position
928 ===================================
930 YaTeX always memorize the position of completion into register `3'. So
931 every time you make a trip to any other part of text other than you are
932 writing, you can return to the editing paragraph by calling
933 register-to-point with argument YaTeX-current-position-register, which is
934 achieved by typing `C-x j 3'(by default).
936 
937 File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top
939 Changing and Deleting
940 *********************
942 These functions are for change or deletion of LaTeX commands already
943 entered.
945 `[prefix] c'
946 ... change LaTeX command
947 `[prefix] k'
948 ... kill LaTeX command
950 * Menu:
952 * Changing LaTeX commands::
953 * Killing LaTeX commands::
955 
956 File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting
958 Changing LaTeX commands
959 =======================
961 `[prefix] c' can change the various (La)TeX commands. This can change the
962 followings.
963 * Environment names
964 * Section-type commands
965 * Argument of section-type commands
966 * Optional parameters (enclosed by []) of section-type commands
967 * Font/size designators
968 * Math-mode's maketitle-type commands that can be inputted with image
969 completion
971 Typing `[prefix] c' on one of above objects you want to change brings a
972 suitable reading function sometimes with completion. Note: If you want to
973 change the argument of section-type command that contains other LaTeX
974 commands, type `[prefix] c' either of surrounding braces of the argument
975 in order to make YaTeX ignore the internal LaTeX sequences as an object of
976 changing. Anyway, it is very difficult to know which argument position
977 the cursor belongs because the LaTeX commands can be nested and braces can
978 freely emerge. So keep it mind to put the cursor on a brace when you are
979 thinking of changing a complicated argument.
981 
982 File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting
984 Killing LaTeX commands
985 ======================
987 `[prefix] k' kills the LaTeX commands sometimes with their arguments.
988 Following table illustrates the correspondence of the invoking position
989 and what is killed.
991 [Invoking position] [action]
992 \begin, \end line kill \begin,\end pairs
993 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
994 on a Section-type command kill section-type command
995 on a parenthesis kill parentheses
997 Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines
998 `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take
999 care not to create any line that contains more than one `\begin' or so.
1001 While all operations above are to kill `containers' which surround some
1002 text, universal argument (`C-u') for these commands kills not only
1003 `containers' but also `contents' of them. See below as a sample.
1005 Original text: [prefix] k C-u [prefix] k
1006 Main \footnote{note} here. Main note here. Main here.
1007 ~(cursor)
1010 File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top
1012 Filling
1013 *******
1016 Filling an item
1017 ===============
1019 To fill a term (descriptive sentences) of `\item', type
1021 `M-q'
1022 ... fill item
1024 on that item.
1026 YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular
1027 expression to search item header in itemize environment. If you make a
1028 newcommand to itemize terms(e.g. `\underlineitem'), put
1030 (setq YaTeX-item-regexp
1031 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1033 in your `~/.emacs'. If you are not familiar with regular expression for
1034 Emacs-Lisp, name a newcommand for `itemize' beginning with `\item' such as
1035 `\itembf', not `\bfitem'.
1037 This function reformats the `\item' into `hang-indented' style. For
1038 example:
1040 itemize, enumerate environment:
1042 >\item[foo] `foo' is the typical word for describing an
1043 > arbitrarily written....
1044 description environment:
1045 > \item[bar] When the word `for' is used as an arbitrarily
1046 > word, `bar' is bound to follow it.
1048 Note that the indent depth of an `\item' word and its descriptive
1049 paragraph are the same in latter case. If you want to use different
1050 depth, invoke fill-paragraph at the beginning of non-whitespace
1051 character(see below).
1054 Filling paragraph
1055 =================
1057 Fill-paragraph is little bit adapted for LaTeX sources. It retains from
1058 filling in certain environments where formatting leads to a disaster such
1059 as verbatim, tabular, or so. And it protects `\verb' expressions from
1060 being folded (The variable `YaTeX-verb-regexp' controls this). Besides,
1061 putting cursor on the first occurrence of non-whitespace character on a
1062 line changes the fill-prefix temporarily to the depth of the line.
1065 File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top
1067 Updation of `\includeonly'
1068 **************************
1070 When you edit splitting source texts, the notation
1072 \includeonly{CurrentEditingFileName}
1074 in the main file reduces the time of typesetting. If you want to hack
1075 other file a little however, you have to rewrite it to
1077 \includeonly{OtherFileNameYouWantToFix}
1079 in the main file. YaTeX automatically detects that the current edited
1080 text is not in includeonly list and prompts you
1082 A)dd R)eplace %)comment?
1084 in the minibuffer. Type `a' if you want to add the current file name to
1085 `\includeonly' list, `r' to replace \`includeonly' list with the current
1086 file, and type `%' to comment out the `\includeonly' line.
1089 File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top
1091 What column?
1092 ************
1094 We are often get tired of finding the corresponding column in large
1095 tabulars. For example,
1097 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
1098 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1099 Home Addr.&Home Phone\\ \hline
1100 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1101 zzz-www & Japan & 9876-54321 \\
1102 & 2 & \multicolumn{2}{c|}{Unknown}
1103 &&&(???)
1104 \\ \hline
1105 \end{tabular}
1107 Suppose you have the cursor located at `(???)' mark, can you tell which
1108 column it is belonging at once? Maybe no. In such case, type
1110 `[prefix] &'
1111 ... What column
1113 in that position. YaTeX tells you the column header of the current field.
1114 Since YaTeX assumes the first line of tabular environment as a row of
1115 column headers, you can create a row of virtual column headers by putting
1116 them in the first line and commenting that line with `%'.
1119 File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top
1121 Intelligent newline
1122 *******************
1124 At the end of begin-type completion of tabular[*], array, itemize,
1125 enumerate or tabbing environment, or typing
1127 `ESC RET'
1128 ... Intelligent newline
1130 in these environments inserts the contents corresponding to the current
1131 environment in the next line. (At the begin-type completion, this
1132 contents can be removed by `undo'.) In `tabular' environment, for
1133 example, `ESC RET' inserts the certain number of `&' and trailing `\\',
1134 and `\hline' if other `\hline' is found in backward. Here are the list of
1135 contents vs. environments.
1137 * `tabular', `tabular*', `array'
1139 Corresponding number of `&' and `\\'.
1140 And `\hline' if needed.
1142 * `tabbing'
1144 The same number of `\>' as `\=' in the first line.
1146 * `itemize', `enumerate', `description', `list'
1148 `\item' or `item[]'.
1150 Note that since this function works seeing the contents of the first
1151 line, please call this after the second line if possible.
1153 If you want to apply these trick to other environments, `foo'
1154 environment for example, define the function named
1155 `YaTeX-intelligent-newline-foo' to insert corresponding contents. That
1156 function will be called at the beginning of the next line after the
1157 newline is inserted to the current line. Since the function
1158 `YaTeX-indent-line' is designed to indent the current line properly,
1159 calling this function before your code to insert certain contents must be
1160 useful. See the definition of the function
1161 `YaTeX-intelligent-newline-itemize' as an example.
1164 File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top
1166 Usepackage checker
1167 ******************
1169 When you input begint-type, section-type, maketitle-type macros with
1170 completion, and it requires some LaTeX2e package, YaTeX examines the
1171 existence of correct `\usepackage'. If not, YaTeX inserts the
1172 `\usepackage{}' declaration corresponding to input macro.
1174 To activate the package completion for your favarite package, set the
1175 variable `YaTeX-package-alist-private' correctly. Please refere the value
1176 of `YaTeX-package-alist-default' as an example.
1179 File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top
1181 Online help
1182 ***********
1184 YaTeX provides you the online help with popular LaTeX commands.
1186 Here are the key strokes for the online help.
1188 `[prefix] ?'
1189 ... Online help
1190 `[prefix] /'
1191 ... Online apropos
1194 Online help
1195 ===========
1197 `Online help' shows the documentation for the popular LaTeX
1198 commands(defaults to the commands on the cursor) in the next buffer.
1199 There are two help file, `global help' and `private help'. The former
1200 file contains the descriptions on the standard LaTeX command and is
1201 specified its name by variable `YaTeX-help-file'. Usually, the global
1202 help file should be located in public space (`$EMACSEXECPATH' by default)
1203 and should be world writable so that anyone can update it to enrich its
1204 contents. The latter file contains descriptions on non-standard or
1205 personal command definitions and is specified by
1206 `YaTeX-help-file-private'. This file should be put into private
1207 directory.
1210 Online apropos
1211 ==============
1213 `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all
1214 the documentations that contains the keyword entered by the user.
1217 When no descriptions are found...
1218 =================================
1220 If there is no description on a command in help files, YaTeX requires
1221 you to write a description on that command. If you are willing to do,
1222 determine which help file to add and write the description on it referring
1223 your manual of (La)TeX. Please send me your additional descriptions if
1224 you describe the help on some standard commands. I might want to include
1225 it in the next distribution.
1228 File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top
1230 Browsing file hierarchy
1231 ***********************
1233 When you are editing multi-file source, typing
1235 `[prefix] d'
1236 ... browse file hierarchy
1238 asks you the parent-most file (which may be defaulted) and displays the
1239 documentation hierarchy in the next window. In this buffer, the following
1240 commands are available.
1242 `n'
1243 ... move to the next line and show its contents
1244 `p'
1245 ... move to the previous line and show its contents
1246 `N'
1247 ... move to the next file in the same inclusion level
1248 `P'
1249 ... move to the previous file in the same inclusion level
1250 `j'
1251 ... move to the next line
1252 `k'
1253 ... move to the previous line
1254 `u'
1255 ... move to the parent file
1256 `.'
1257 ... show the current files contents in the next window
1258 `SPC'
1259 ... scroll up the current file window
1260 `DEL, b'
1261 ... scroll down the current file window
1262 `<'
1263 ... show the beginning of the current file
1264 `>'
1265 ... show the end of the current file
1266 `>'
1267 ... return to the previous postion after `<' or `>'
1268 `RET, g'
1269 ... open the current file in the next window
1270 `mouse-2'
1271 ... same as RET(available only with window system)
1272 `o'
1273 ... other window
1274 `1'
1275 ... delete other windows
1276 `-'
1277 ... shrink hierarchy buffer window
1278 `+'
1279 ... enlarge hierarchy buffer window
1280 `?'
1281 ... describe mode
1282 `q'
1283 ... quit
1285 Note that operations on the file contents in the next window do not work
1286 correctly when you close the corresponding file.
1289 File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top
1291 Cooperation with other packages
1292 *******************************
1294 YaTeX works better with other brilliant packages.
1297 gmhist
1298 ======
1300 When you are loading `gmhist.el' and `gmhist-mh.el', you can use
1301 independent command history list at the prompt of preview command
1302 (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you
1303 can enter the previous command line string repeatedly by typing `M-p'.
1306 min-out
1307 =======
1309 `min-out', the outline minor mode, can be used in yatex-mode buffers.
1310 If you want to use it with YaTeX, please refer the file `yatexm-o.el' as
1311 an example.
1314 File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top
1316 Customizations
1317 **************
1319 You can customize YaTeX by setting Emacs-Lisp variables and by making
1320 add-in functions.
1322 * Menu:
1324 * Lisp variables::
1325 * Add-in functions::
1326 * Add-in generator::
1329 File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations
1331 Lisp variables
1332 ==============
1334 You can change the key assignments or make completion more comfortable
1335 by setting the values of various variables which control the movement of
1336 yatex-mode.
1338 For example, if you want to change the prefix key stroke from `C-c' to
1339 any other sequence, set YaTeX-prefix to whatever you want to use. If you
1340 don't want to use the key sequence `C-c letter' which is assumed to be the
1341 user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter'
1342 to `t', and all of the default key bind of `C-c letter' will turn to the
1343 corresponding `C-c C-letter' (but the region based completions that is
1344 invoked with `C-c Capital-letter' remain valid, if you want to disable
1345 those bindings, set that variable to 1 instead of `t').
1347 * Menu:
1349 * All customizable variables::
1350 * Sample definitions::
1351 * Hook variables::
1352 * Hook file::
1355 File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables
1357 All customizable variables
1358 --------------------------
1360 Here are the customizable variables of yatex-mode. Each value setq-ed
1361 in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected.
1362 Parenthesized contents stands for the default value. When you are to
1363 change some of these variables, see more detailed documentation of the
1364 variable by `M-x describe-variable'.
1366 -- Variable: YaTeX-japan
1367 Set this nil to produce all messages in English (`Depends on Japanese
1368 feature of Emacs')
1370 -- Variable: YaTeX-kanji-code
1371 Default buffer-file-coding-system for YaTeX modes' buffer. Set this
1372 0 to no language conversion. Nil to preserve original coding-system.
1373 (`1 or 2')
1375 -- Variable: YaTeX-prefix
1376 Prefix key stroke (`C-c')
1378 -- Variable: YaTeX-inhibit-prefix-letter
1379 Change key stroke from `C-c letter' to `C-c C-letter' (`nil')
1381 -- Variable: YaTeX-fill-prefix
1382 Fill-prefix used in yatex-mode (`nil')
1384 -- Variable: YaTeX-user-completion-table
1385 Name of user dictionary where learned completion table will be
1386 stored. (`"~/.yatexrc"')
1388 -- Variable: tex-command
1389 LaTeX typesetter command (`"latex"')
1391 -- Variable: dvi2-command
1392 Preview command (`"xdvi -geo +0+0 -s 4"')
1394 -- Variable: dviprint-command-format
1395 Command format to print dvi file (`"dvi2ps %f %t %s | lpr"')
1397 -- Variable: dviprint-from-format
1398 Start page format of above %f. %b will turn to start page (`"-f %b"')
1400 -- Variable: dviprint-to-format
1401 End page format of above %t. %e will turn to `end' page (`"-t %e"')
1403 -- Variable: makeindex-command
1404 Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS))
1406 -- Variable: YaTeX-need-nonstop
1407 Put `\nonstopmode{}' or not (`nil')
1409 -- Variable: latex-warning-regexp
1410 Regular expression of warning message latex command puts out
1411 (`"line.* [0-9]*"')
1413 -- Variable: latex-error-regexp
1414 Regular expression of error message (`"l\\.[1-9][0-9]*"')
1416 -- Variable: latex-dos-emergency-message
1417 Message latex command running on DOS puts at abort (`"Emergency
1418 stop"')
1420 -- Variable: YaTeX-item-regexp
1421 Regular expression of item command (`"\\\\item"')
1423 -- Variable: YaTeX-verb-regexp
1424 Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"')
1426 -- Variable: YaTeX-nervous
1427 T for using local dictionary (`t')
1429 -- Variable: YaTeX-sectioning-regexp
1430 Regexp of LaTeX sectioning command
1431 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"')
1433 -- Variable: YaTeX-fill-inhibit-environments
1434 Inhibit fill in these environments (`'("tabular" "tabular*" "array"
1435 "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath"
1436 "verbatim" "verbatim*")')
1438 -- Variable: YaTeX-uncomment-once
1439 T for deleting all preceding `%' (`nil')
1441 -- Variable: YaTeX-close-paren-always
1442 T for always close all parenthesis automatically, `nil' for only eol
1443 (`t')
1445 -- Variable: YaTeX-auto-math-mode
1446 Switch math-mode automatically (`t')
1448 -- Variable: YaTeX-math-key-list-private
1449 User defined alist, math-mode-prefix vs completion alist used in
1450 image completion (`nil'). See `yatexmth.el' for the information
1451 about how to define a completion alist.
1453 -- Variable: YaTeX-default-pop-window-height
1454 Initial height of typesetting buffer when one-window. Number for the
1455 lines of the buffer, numerical string for the percentage of the
1456 screen-height. `nil' for half height (10)
1458 -- Variable: YaTeX-help-file
1459 Global online help file name
1460 (`$doc-directory/../../site-lisp/YATEXHLP.eng')
1462 -- Variable: YaTeX-help-file-private
1463 Private online help file name (`"~/YATEXHLP.eng"')
1465 -- Variable: YaTeX-no-begend-shortcut
1466 Disable [prefix] b ?? shortcut (`nil)'
1468 -- Variable: YaTeX-hilit-pattern-adjustment-private
1469 List of the list that contain the regular expression and the symbol
1470 of logical meaning of the string that matches the pattern. See also
1471 the value from `(assq 'yatex-mode hilit-patterns-alist)' and the
1472 value of `YaTeX-hilit-pattern-adjustment-default' (and even the
1473 document of hilit19.el).
1475 -- Variable: YaTeX-sectioning-level
1476 Alist of LaTeX's sectioning command vs its height.
1478 -- Variable: YaTeX-hierarchy-ignore-heading-regexp
1479 `YaTeX-display-hierarchy' searches for sectioning command first, and
1480 comment line secondary as a file headings. In latter case, ignore lines
1481 that match with regular expression of this variable. Default value of
1482 this variable is RCS header expressions and mode specifying line `-*- xxxx
1483 -*'.
1485 -- Variable: YaTeX-skip-default-reader
1486 Non-nil for this variable skips the default argument reader of
1487 section-type command when add-in function for it is not defined
1488 (`nil')
1490 -- Variable: YaTeX-create-file-prefix-g
1491 When typing `prefix g' on the `\include' line, open the target file
1492 even if the file doesn't exist (`nil')
1494 -- Variable: YaTeX-simple-messages
1495 Simplyfy messages of various completions (`nil')
1497 -- Variable: YaTeX-hilit-sectioning-face
1498 When hilit19 and yatex19 is active, YaTeX colors the sectioning
1499 commands. This variable specifies the foreground and background
1500 color of `\part' macro. The default value is `'(yellow/dodgerblue
1501 yellow/slateblue)'. The first element of this list is for the screen
1502 when `hilit-background-mode' is `'light', and the second element is
1503 for `'dark'. You should specify both color as `forecolor/backcolor'.
1505 -- Variable: YaTeX-hilit-sectioning-attenuation-rate
1506 When color mode, this variable specifies how much attenuate the color
1507 density of `\subparagraph' compared with that of `\chapter' (`'(15
1508 40)') See also `YaTeX-hilit-sectioning-face'.
1510 -- Variable: YaTeX-use-AMS-LaTeX
1511 If you use AMS-LaTeX, set to `t' (`nil')
1513 -- Variable: YaTeX-use-LaTeX2e
1514 If you use LaTeX2e, set to `t' (`t')
1516 -- Variable: YaTeX-template-file
1517 File name which is automatically inserted at creation
1518 (`~/work/template.tex')
1520 -- Variable: YaTeX-search-file-from-top-directory
1521 Non-nil means to search input-files from the directory where main
1522 file exists (`t')
1524 -- Variable: YaTeX-use-font-lock
1525 Use font-lock to fontify buffer or not (`(featurep 'font-lock)'
1527 -- Variable: YaTeX-use-hilit19
1528 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)'
1530 -- Variable: YaTeX-use-italic-bold
1531 YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20
1532 or later). This variable is effective only when font-lock is used.
1533 (`(featurep 'hilit19)'
1535 -- Variable: YaTeX-singlecmd-suffix
1536 Suffix which is always inserted after maketitle-type macros. `"{}"'
1537 is recommended.
1539 -- Variable: YaTeX-package-alist-private
1540 Alist of LaTeX2e-package name vs. lists of macros in it. Set this
1541 alist properly and YaTeX automatically check the declaratiion of
1542 `usepackage' for corresponding macro, when you input that macro with
1543 completion. If required `usepackage' is not found, YaTeX also
1544 automatically inserts `\usepackage'. Alist is as follows;
1545 '((PackageName1
1546 (completionType ListOfMacro)
1547 (completionType ListOfMacro))
1548 (PackageName2
1549 (completionType ListOfMacro)
1550 (completionType ListOfMacro...))....) completionType is
1551 one of `env, section, maketitle'. Consult the value of
1552 `YaTeX-package-alist-default' as an example.
1554 -- Variable: YaTeX-tabular-indentation
1555 At indentation by `C-i' in tabular or array environment, YaTeX put
1556 the additional spaces to the normail indentation depth. The number
1557 of additional spaces is the product of YaTeX-tabular-indentation and
1558 the number of column position in tabular.
1560 -- Variable: YaTeX-noindent-env-regexp
1561 Regexp of environment names that should begin with no indentation.
1562 All verbatime-like environment name should match with.
1564 -- Variable: YaTeX-ref-default-label-string
1565 Default \\ref time string format. This format is like strftime(3)
1566 but allowed conversion char are as follows; %y -> Last 2 digit of
1567 year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H ->
1568 Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal
1569 conversion of yymmdd. %qX -> alphabetical-decimal conversion of
1570 HHMMSS. Beware defualt label-string should be always unique. So
1571 this format string should have both time part (%H+%M+%S or %qX) and
1572 date part (%y+(%b|%m)+%d or %qx).
1574 -- Variable: YaTeX-ref-generate-label-function
1575 Function to generate default label string for unnamed \\label{}s.
1576 The function pointed to this value should take two arguments. First
1577 argument is LaTeX macro's name, second is macro's argument. Here is
1578 an example for using this value.
1579 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label)
1580 (defun my-yatex-generate-label (command value)
1581 (and (string= command "caption")
1582 (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t)
1583 (setq command (match-string 1)))
1584 (let ((alist '(("chapter" . "chap")
1585 ("section" . "sec")
1586 ("subsection" . "subsec")
1587 ("figure" . "fig")
1588 ("table" . "tbl"))))
1589 (if (setq command (cdr (assoc command alist)))
1590 (concat command ":" value)
1591 (YaTeX::ref-generate-label nil nil))))
1595 File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables
1597 Sample definitions
1598 ------------------
1600 For instance, to change the prefix key stroke to `ESC', and name of the
1601 user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB
1602 character, add the following `setq' to `~/.emacs'.
1604 (setq YaTeX-prefix "\e"
1605 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1606 YaTeX-fill-prefix " ")
1609 File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables
1611 Hook variables
1612 --------------
1614 More customizations will be done by the hook-function defined in
1615 hook-variable `yatex-mode-hook'. This is useful to define a shortcut key
1616 sequence to enter some environments other than `document' and `enumerate'
1617 etc. The following statement defines `[prefix] ba' to enter
1618 `\begin{abstract}' ... `=end{abstract}' immediately.
1620 (setq yatex-mode-hook
1621 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1623 You should use functions `YaTeX-define-key', or
1624 `YaTeX-define-begend-key' to define all the key sequences of yatex-mode.
1627 File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables
1629 Hook file
1630 ---------
1632 You can stuff all of YaTeX related expressions into a file named
1633 `yatexhks.el' if you have a lot of codes. YaTeX automatically load this
1634 file at the initialization of itself. Using `yatexhks.el' makes
1635 `yatex-mode-load-hook' unnecessary.
1638 File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations
1640 Add-in functions
1641 ================
1643 You can easily define a function to input detailed arguments with
1644 completion according to LaTeX environments or commands.
1647 What is add-in functions?
1648 -------------------------
1650 When you input `tabular' environment, don't you think "I want YaTeX to
1651 complete its argument toward my favorite one such as `{|c|c|c|}'..."?
1652 Yes, you can define the function to complete arguments for any environment
1653 and any LaTeX commands.
1656 Procedure
1657 ---------
1659 Here is the procedure to define add-in functions.
1660 1. Define the function
1661 2. Put the function into `yatexhks.el'
1663 * Menu:
1665 * How the add-in function works::
1666 * How the function is called::
1667 * Useful functions for creating add-in::
1668 * Contribution::
1671 File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions
1673 How the add-in function works
1674 -----------------------------
1676 There are three types of add-in.
1678 1. Option add-in
1679 2. argument add-in
1680 3. enclosing add-in
1682 "Option add-in" returns the LaTeX's optional parameters such as optional
1683 strings after `\begin{ENV}', optional strings between a section-type
1684 command and its first argument, and optional strings just after type
1685 maketitle-type command. The following illustrates the name of add-in
1686 functions, where underlined strings are generated by add-in functions.
1688 \begin{table}[ht] (Function name: YaTeX:table)
1689 ~~~~
1690 \put(100,200){} (Function name: YaTeX:put)
1691 ~~~~~~~~~
1692 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1693 ~~~~~~~~~~
1695 Obviously, the function name is decided by concatenating the prefix
1696 `YaTeX:' and LaTeX command's name.
1698 Another add-in type is "argument add-in", which completes arguments for
1699 section-type commands.
1701 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1702 ~~~~ ~~~
1704 When the section-type command is inputted, the function named by
1705 concatenating `YaTeX::' and section-type command, is called automatically
1706 with an integer argument which indicates which argument of section-type
1707 command is being read. Thus the add-in should determine the job referring
1708 the value of its argument.
1710 "enclosing add-in" is for modifying and/or checking the region that will
1711 be enclosed by section-type commands via `[prefix] S'. An enclosing
1712 add-in function will be called with two arguments, beginning of the
1713 enclosed region and end of the region. Suppose you want to enclose the
1714 existing text `(a+b)/c' by `\frac{}'.
1716 a/c
1717 | |
1718 A B
1720 You do set-mark-command at point A and then move to point B. Typing
1721 `[prefix] S' and input `frac' enclose the region like this;
1723 \frac{a/c}
1725 Normally, the expression `a/c' is translated to `\frac{a}{c}'. An
1726 enclosing add-in is useful for modifying `/' to `}{'.
1728 * Menu:
1730 * Defining option-add-in::
1731 * Defining argument-add-in::
1732 * Defining enclosing-add-in::
1735 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
1737 Defining `option add-in'
1738 ........................
1740 If you want `{|c|c|c|}' for all `tabular' environment,
1742 (defun YaTeX:tabular ()
1743 "{|c|c|c|}")
1745 is enough. If you want more complicated format, define as below.
1747 (defun YaTeX:tabular ()
1748 "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}")
1750 Note that the character `\' must be described as `\\' in Emacs-Lisp. The
1751 next example reads the tabular format from keyboard.
1752 (defun YaTeX:tabular ()
1753 (concat "{" (read-string "Rule: ") "}"))
1756 File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works
1758 Defining `argument add-in'
1759 ..........................
1761 This section describes how to define the add-in function for
1762 `\newcommand'.
1764 The first argument of `\newcommand' begins always with `\'. The second
1765 argument is usually so complex that we can not edit them in the
1766 minibuffer. Here is the created function considering this.
1768 (defun YaTeX::newcommand (n) ;n is argument position
1769 (cond
1770 ((= n 1) ;1st argument is macro name
1771 (read-string "Command: " "\\")) ;initial input `\'
1772 ((= n 2) "") ;do nothing when reading arg#2
1773 (t nil)))
1775 Note that when the `argument add-in' function return `nil', normal
1776 argument reader will be called.
1779 File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works
1781 Defining `enclosing add-in'
1782 ...........................
1784 This section describes how to define the add-in function for text
1785 enclosed by `\frac{}'.
1787 When enclosing the text `5/3' by `\frac{}', you might want to replace
1788 `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two
1789 arguments, beginning of enclosed text and end of enclosed text. The
1790 function is expected to replace `/' with `}{'. Here is an example
1791 expression.
1793 (defun YaTeX::frac-region (beg end)
1794 (catch 'done
1795 (while (search-forward "/" end t)
1796 (goto-char (match-beginning 0))
1797 (if (y-or-n-p "Replace this slash(/) with `}{'")
1798 (throw 'done (replace-match "}{")))
1799 (goto-char (match-end 0)))))
1802 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
1804 How the function is called
1805 --------------------------
1807 YaTeX calls the add-in functions for specified begin-type, section-type,
1808 and maketitle-type command, if any. `Option add-in' functions for
1809 begin-type are called when `\begin{ENV}' has been inserted, functions for
1810 section-type are called just before input of the first argument, and
1811 functions for maketitle-type is called after maketitle-type command has
1812 been inserted. `Argument add-in' functions are called at each entry of
1813 arguments for section-type commands.
1816 File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions
1818 Useful functions for creating add-in
1819 ------------------------------------
1821 Many add-in functions for typical LaTeX commands are defined in
1822 `yatexadd.el'. Those are also useful as references. Here are the short
1823 descriptions on useful functions, where [F] means function, [A] means
1824 arguments, [D] means description.
1826 `[F]'
1827 YaTeX:read-position
1828 `[A]'
1829 Character list which can show up in the brackets
1830 `[D]'
1831 Return the location specifier such as `[htb]'. When nothing is
1832 entered, omit [] itself. If the possible characters are "htbp", call
1833 this function as `(YaTeX:read-position "htbp")'
1835 `[F]'
1836 YaTeX:read-coordinates
1837 `[A]'
1838 Base prompt, X-axis prompt, Y-axis prompt (each optional)
1839 `[D]'
1840 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for
1841 X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the
1842 form of "(X,Y)". The default prompts are `Dimension', `X', `Y'
1843 respectively.
1845 `[F]'
1846 YaTeX:check-completion-type
1847 `[A]'
1848 One of the symbols: 'begin, 'section, or 'maketitle
1849 `[D]'
1850 Check the current completion type is specified one and cause error
1851 if not. The variable `YaTeX-current-completion-type' holds the symbol
1852 according to the current completion type.
1855 File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions
1857 Contribution
1858 ------------
1860 If you make your own pretty function and you let it be in public, please
1861 send me the function. I'm going to include it in the next release.
1864 File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations
1866 Add-in generator
1867 ================
1869 First, don't forget to read the section of add-in functions *Note Add-in
1870 functions::. If you easily understand how to define them, there's no need
1871 to read this section. But being not familiar with Emacs-Lisp, when you
1872 don't have clear idea what to do, this section describes how to get YaTeX
1873 make add-in function.
1875 There are two methods of generation. One is for fully interactive
1876 generator for beginners and another requires little knowledge of
1877 Emacs-Lisp.
1880 Generator for beginners
1881 -----------------------
1882 The former generator is called by
1883 `M-x YaTeX-generate'
1885 strokes. All you have to do is follow the guidances. Defying them may
1886 cases the disaster (I wonder what is it???). So when you make some
1887 mistake, it is recommendable to type `C-g' and start afresh.
1890 Simple generator
1891 ----------------
1893 The latter generator is invoked by the next sequence.
1894 `M-x YaTeX-generate-simple'
1895 This generator can make both "option add-in" and "argument add-in"
1896 (*refer the section add-in functions*
1897 *Note How the add-in function works::), whereas `YaTeX-generate'
1898 cannot make "argument addin".
1900 For example, assume you have the LaTeX command as follows.
1902 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
1903 (A) (B) (1) (2) (3)
1904 (A)Optional parameter to specify the position
1905 One of t(top), b(bottom), l(left), r(right)
1906 (B)Maximum size of frame
1907 (1)1st argument is filename of EPS file
1908 (2)2nd argument indicates
1909 plain do nothing
1910 frame make frame around image
1911 dframe make double-frame around image
1912 for included EPS file.
1913 (3)Caption for the picture
1915 Now get start with generation. Typing `M-x YaTeX-generate-simple'
1916 brings the prompt:
1917 (O)ption? (A)rgument?
1920 Generating "option add-in"
1921 ..........................
1923 Since (A), (B) above are optional argument, all we have to do to
1924 complete them is define the option add-in for them. Let's generate the
1925 function to complete (A).
1927 M-x YaTeX-generate-simple RET
1928 epsinput RET
1931 Typing as above leads the next prompt.
1933 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
1935 This asks that "Which type is the completion style of 1st argument?".
1936 Here are the possible completion style.
1938 `String'
1939 read plain string
1940 `Complete'
1941 read with completion
1942 `File'
1943 read file name
1944 `Option'
1945 read optional string (if string omitted, omit [] too)
1946 `Position'
1947 read positional option (like [htbp])
1948 `Coord.'
1949 read coordinates
1950 `Quit'
1951 quit from generating
1953 Since (A) is the optional argument to specify the location of included
1954 EPS file, the completion style is `Position', and the possible characters
1955 are t, b, l, and r. To tell these information to generator, operate as
1956 follows.
1958 Read type(1).... p
1959 Acceptable characters: tblr RET
1961 (B) is coordinate. So its completion style is coOrd. We want a prompt
1962 meaning "Maximum size" when completion.
1964 Read type(2).... o
1965 Prompt for coordinates: Max size RET
1967 That's all for optional argument. Select quit.
1969 Read type(3).... q
1971 Then the generated option add-in function for \epsinput will be shown in
1972 the next window.
1975 Generating "argument add-in"
1976 ............................
1978 Next, create the argument add-in. The arguments for \epsinput are EPS
1979 file name, framing style, and caption string in sequence.
1981 M-x YaTeX-generate-simple RET
1982 epsinput RET
1985 Above key strokes bring the prompt that asks the number of argument.
1986 Answer it with 3.
1988 How many arguments?: 3 RET
1990 Then the generator asks the completion style and prompt for completion.
1991 Answer them. `f' for FileName and prompt string.
1993 Read type(1).... f
1994 Prompt for argument#1 EPS file name RET
1996 The second argument is one of selected symbol. So the completion type
1997 is `Completion'.
1999 Read type(2).... c
2000 Prompt for argument#2 Include style RET
2002 Then all the candidates ready to be read. Type single RET after
2003 entering all.
2005 Item[1](RET to exit): plain RET
2006 Item[2](RET to exit): frame RET
2007 Item[3](RET to exit): dframe RET
2008 Item[4](RET to exit): RET
2010 The following prompt asks whether the entered string must belong to
2011 candidates or not. In this case, since the argument must be one of
2012 `plain', `frame', and `dframe', type `y'.
2014 Require match? (y or n) y
2016 The last argument is the caption string for which any completion is
2017 needed.
2019 Read type(3).... s
2020 Prompt for argument#3 Caption RET
2021 default: Figure of RET
2023 Finally we'll get the argument add-in in the next window.
2026 Contribution
2027 ------------
2029 If you get your own pretty function and you let it be in public, please
2030 steel yourself in the happy atmosphere and do not send me the function. I
2031 do know it is not fine because it is generated by yatexgen:-p.
2034 File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top
2036 Etcetera
2037 ********
2039 The standard completion tables provided in `yatex.el' contain a few
2040 LaTeX commands I frequently use. This is to lessen the key strokes to
2041 complete entire word, because too many candidates rarely used often cause
2042 too many hits. Therefore always try to use completion in order to enrich
2043 your dictionary, and you will also find `Wild Bird' growing suitable for
2044 your LaTeX style.
2046 The package name `Wild Bird' is the English translation of Japanese
2047 title `Yachou', which is a trick on words of Japanese.
2050 File: yatexe, Node: Copying, Prev: Etcetera, Up: Top
2052 Copying
2053 *******
2055 This program is distributed as a free software. You can
2056 use/copy/modify/redistribute this software freely but with NO warranty to
2057 anything as a result of using this software. Adopting code from this
2058 program is also free. But I would not do contract act.
2060 Any reports and suggestions are welcome as long as I feel interests in
2061 this software. My possible e-mail address is `yuuji@yatex.org'. (as of
2062 Jan.2004) And there is mailing list for YaTeX. Although the common
2063 language is Japanese, questions in English will be welcome. To join the
2064 ML, send the mail whose subject is `append' to the address
2065 `yatex@yatex.org. If you have some question, please ask to
2066 `yatex-admin@yatex.org'.
2068 The specification of this software will be surely modified (depending on
2069 my feelings) without notice :-p.
2072 HIROSE Yuuji
2074 Tag table:
2075 Node: Top153
2076 Node: What is YaTeX?1493
2077 Node: Main features1865
2078 Node: Installation3456
2079 Node: Typesetting4232
2080 Node: Calling typesetter5061
2081 Node: Calling previewer6406
2082 Node: Printing out6766
2083 Node: %#notation7057
2084 Node: Changing typesetter7432
2085 Node: Splitting input files7795
2086 Node: Static region for typesetting9222
2087 Node: Lpr format10350
2088 Node: Editing %# notation11406
2089 Node: Completion11924
2090 Node: Begin-type completion12483
2091 Node: Section-type completion15526
2092 Node: view-sectioning17960
2093 Node: Large-type completion19539
2094 Node: Maketitle-type completion20269
2095 Node: Arbitrary completion20820
2096 Node: End completion21209
2097 Node: Accent completion21678
2098 Node: Image completion22294
2099 Node: Greek letters completion24550
2100 Node: Local dictionaries25276
2101 Node: Commenting out26212
2102 Node: Cursor jump27670
2103 Node: Jump to corresponding object27981
2104 Node: Invoking image processor29381
2105 Node: Jump to main file30723
2106 Node: Jumping around the environment31087
2107 Node: Jumping to last completion position31504
2108 Node: Changing and Deleting32012
2109 Node: Changing LaTeX commands32403
2110 Node: Killing LaTeX commands33579
2111 Node: Filling34763
2112 Node: Updation of includeonly36613
2113 Node: What column37409
2114 Node: Intelligent newline38493
2115 Node: Usepackage checker40153
2116 Node: Online help40743
2117 Node: Browsing file hierarchy42417
2118 Node: Cooperation with other packages44153
2119 Node: Customizations44857
2120 Node: Lisp variables45190
2121 Node: All customizable variables46193
2122 Node: Sample definitions55941
2123 Node: Hook variables56453
2124 Node: Hook file57156
2125 Node: Add-in functions57494
2126 Node: How the add-in function works58353
2127 Node: Defining option-add-in60551
2128 Node: Defining argument-add-in61272
2129 Node: Defining enclosing-add-in62153
2130 Node: How the function is called63006
2131 Node: Useful functions for creating add-in63681
2132 Node: Contribution65085
2133 Node: Add-in generator65358
2134 Node: Etcetera70751
2135 Node: Copying71355
2137 End tag table