yatex

view docs/yatexe @ 123:590fc51462c7

New typeset menu `latex+p(D)f' added. Call dvipdfmx when typesetting succeeded.
author yuuji@gentei.org
date Thu, 27 May 2010 10:16:56 +0900
parents 680d92784c1a
children 6d682b9d4bc8
line source
1 Info file: yatexe, -*-Text-*-
2 produced by `texinfo-format-buffer'
3 from file `yatexe.tex'
4 using `texinfmt.el' version 2.42 of 7 Jul 2006.
6 
7 File: yatexe, Node: Top, Next: What is YaTeX?, Prev: (dir), Up: (dir)
9 * Menu:
11 * What is YaTeX?::
12 * Main features:: What YaTeX can do
13 * Installation:: Guide to install
14 * Typesetting:: Call typesetting processes
15 * %#notation:: Meta-keyword `%#'
16 * Completion:: Input LaTeX commands with completion
17 * Local dictionaries:: Directory dependent completion
18 * Commenting out:: Commenting/uncommenting text
19 * Cursor jump:: Jumping to related position
20 * Changing and Deleting:: Changing/deleting certain unit of text
21 * Filling:: Filling an item or paragraph
22 * Updation of includeonly:: Free from maintaining includeonly
23 * What column:: Check what table-column the cursor belong
24 * Intelligent newline:: Guess requisites of new line
25 * Usepackage checker:: Selecting correct \usepackage is YaTeX's job
26 * Online help:: On-line documentation of LaTeX
27 * Browsing file hierarchy:: Walking through file hierarchy
28 * Cooperation with other packages:: Work well with gmhist, min-out
29 * Customizations:: How to breed `Wild Bird'
30 * Etcetera:: YaTeX is acquisitive.
31 * Copying:: Redistribution
35 
36 File: yatexe, Node: What is YaTeX?, Next: Main features, Prev: Top, Up: Top
38 What is YaTeX?
39 **************
41 YaTeX automates typesetting and previewing of LaTeX and enables
42 completing input of LaTeX mark-up command such as
43 `\begin{}'..`\end{}'.
45 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
46 Language Enhancement to GNU Emacs), and latex on DOS.
49 
50 File: yatexe, Node: Main features, Next: Installation, Prev: What is YaTeX?, Up: Top
52 Main features
53 *************
55 * Invocation of typesetter, previewer and related programs(`C-c t')
56 * Typesetting on static region which is independent from point
57 * Semiautomatic replacing of `\includeonly'
58 * Jumping to error line(`C-c '')
59 * Completing-read of LaTeX commands such as `\begin{}',
60 `\section' etc.
61 (`C-c b', `C-c s', `C-c l', `C-c m')
62 * Enclosing text into LaTeX environments or commands
63 (`C-u' ABOVEKEYSTROKES)
64 * Displaying the structure of text at entering sectioning commands
65 * Lump shifting of sectioning commands (*Note view-sectioning::)
66 * Learning unknown/new LaTeX commands for the next completion
67 * Argument reading with a guide for complicated LaTeX commands
68 * Generating argument-readers for new/unsupported commands(`yatexgen')
69 * Quick changing or deleting of LaTeX commands(`C-c c', `C-c k')
70 * Jumping from and to inter-file, begin<->end, ref<->label(`C-c g')
71 * Blanket commenting out or uncommenting
72 (`C-c >', `C-c <', `C-c ,', `C-c .')
73 * Easy input of accent mark, math-mode's commands and Greek letters
74 (`C-c a', `;', `:')
75 * Online help for the popular LaTeX commands
76 (`C-c ?', `C-c /')
77 * Document files hierarchy browser (`C-c d')
78 * Adding automatically \usepackage corresponding to inputting LaTeX
79 macro with completion
80 * Allow you to forget creating \label{}s, \ref or \cite completion
81 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".
110 
111 File: yatexe, Node: Typesetting, Next: %#notation, Prev: Installation, Up: Top
113 Typesetting
114 ***********
116 The prefix key stroke of yatex-mode is `C-c' (Press 'C' with Control
117 key) by default. If you don't intend to change the prefix key stroke,
118 assume all `[prefix]' as `C-c' in this document. These key
119 strokes execute typeset or preview command.
121 `[prefix] t j'
122 ... invoke latex
123 `[prefix] t r'
124 ... invoke latex on region
125 `[prefix] t k'
126 ... kill current typesetting process
127 `[prefix] t b'
128 ... invoke bibtex
129 `[prefix] t p'
130 ... preview
131 `[prefix] t l'
132 ... lpr dvi-file
133 `[prefix] t s'
134 ... search current string on xdvi-remote
136 * Menu:
138 * Calling typesetter::
139 * Calling previewer::
140 * Printing out::
143 
144 File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting
146 Calling typesetter
147 ==================
149 Typing `[prefix] t j', the current editing window will be divided
150 horizontally when you invoke latex command, and log message of LaTeX
151 typesetting will be displayed in the other window; called typesetting
152 buffer. The typesetting buffer automatically scrolls up and traces LaTeX
153 warnings and error messages. If you see latex stopping by an error, you
154 can send string to latex in the typesetting buffer.
156 If an error stops the LaTeX typesetting, this key stroke will move the
157 cursor to the line where LaTeX error is detected.
159 `[prefix] ''
160 `([prefix]+single quotation)'
162 ... jump to the previous error or warning
164 If you find a noticeable error, move to the typesetting buffer and move
165 the cursor on the line of error message and type `SPACE' key. This makes
166 the cursor move to corresponding source line.
168 Since `[prefix] tr' pastes the region into the file `texput.tex' in the
169 current directory, you should be careful of overwriting. The method of
170 specification of the region is shown in the section *Note %#notation::.
172 The documentclass for typeset-region is the same as that of editing file
173 if you edit one file, and is the same as main file's if you edit splitting
174 files.
177 
178 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting
180 Calling previewer
181 =================
183 `[prefix] t p' invokes the TeX previewer. And if you are using
184 xdvi-remote, which can be controled from other terminals, `[prefix] t s'
185 enables you to search current string at the cursor on the running xdvi
186 window.
189 
190 File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting
192 Printing out
193 ============
195 When you type `[preifx] t l', YaTeX asks you the range of dvi-printing
196 by default. You can skip this by invoking it with universal-argument as
197 follows:
199 C-u [prefix] tl
202 
203 File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top
205 %# notation
206 ***********
208 You can control the typesetting process by describing `%#' notations in
209 the source text.
211 * Menu:
213 * Changing typesetter::
214 * Splitting input files::
215 * Static region for typesetting::
216 * Lpr format::
217 * Editing %# notation::
220 
221 File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation
223 To change the `latex' command or to split a source text.
224 ========================================================
226 To change the typesetting command, write
228 %#!latex-big
230 anywhere in the source text. This is useful for changing typesetter.
233 
234 File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation
236 Splitting input files
237 =====================
239 And if you split the source text and edit subfile that should be
240 included from main text.
242 %#!latex main.tex
244 will be helpful to execute latex on main file from sub text buffer. Since
245 this command line after `%#!' will be sent to shell literally, next
246 description makes it convenient to use ghostview as dvi-previewer.
248 %#!latex main ; dvi2ps main.dvi > main
250 Note that YaTeX assumes the component before the last period of the last
251 word in this line as base name of the main LaTeX source. The `%f'
252 notation in this line is replaced by main file name, and `%r' replaced by
253 root name of main file name. If you specify `%f' or `%r', YaTeX always
254 ask you the name of main file at the first typesetting.
256 To make best use of the feature of inter-file jumping by `[prefix] g'
257 (see *Note Cursor jump::), take described below into consideration.
259 * You can put split texts in sub directory, but not in sub directory of
260 sub directory.
261 * In the main text, specify the child file name with relative path name
262 such as \include{chap1/sub}, when you include the file in a
263 sub-directory.
264 * In a sub-text, write `%#!latex main.tex' even if `main.tex' is in the
265 parent directory(not %#!latex ../main.tex).
268 
269 File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation
271 Static region
272 =============
274 Typeset-region by `[prefix] tr' passes the region between point and mark
275 to typesetting command by default. But when you want to typeset static
276 region, enclose the region by `%#BEGIN' and `%#END' as follows.
278 %#BEGIN
279 TheRegionYouWantToTypesetManyTimes
280 %#END
282 This is the rule of deciding the region.
284 1. If there exists %#BEGIN before point,
286 1. If there exists %#END after %#BEGIN,
287 * From %#BEGIN to %#END.
289 2. If %#END does not exist after %#BEGIN,
290 * From %#BEGIN to the end of buffer.
292 2. If there does not exist %#BEGIN before point,
293 * Between point and mark(standard method of Emacs).
295 It is useful to write `%#BEGIN' in the previous line of \begin and
296 `%#END' in the next line of \`end' when you try complex environment such
297 as `tabular' many times. It is also useful to put only `%#BEGIN' alone at
298 the middle of very long text. Do not forget to erase `%#BEGIN' `%#END'
299 pair.
302 
303 File: yatexe, Node: Lpr format, Next: Editing %# notation, Prev: Static region for typesetting, Up: %#notation
305 Lpr format
306 ==========
308 Lpr format is specified by three Lisp variables. Here are the default
309 values of them.
311 `(1)dviprint-command-format'
312 `"dvi2ps %f %t %s | lpr"'
313 `(2)dviprint-from-format'
314 `"-f %b"'
315 `(3)dviprint-to-format'
316 `"-t %e"'
318 On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text,
319 `%f' by contents of (2), %t by contents of (3). At these replacements,
320 `%b' in (2) is also replaced by the number of beginning page, `%e' in (3)
321 is replaced by the number of ending page. But `%f' and `%t' are ignored
322 when you omit the range of print-out by `C-u [prefix] tl'.
324 If you want to change this lpr format temporarily, put a command such as
325 follows somewhere in the text:
327 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
329 And if you want YaTeX not to ask you the range of printing out, the next
330 example may be helpful.
332 %#LPR dvi2ps %s | lpr
335 
336 File: yatexe, Node: Editing %# notation, Prev: Lpr format, Up: %#notation
338 Editing %# notation
339 ===================
341 To edit `%#' notation described above, type
343 `[prefix] %'
344 ... editing %# notation menu
346 and select one of the entry of the menu as follows.
348 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
350 Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and
351 `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN'
352 and `%#END' are automatically erased.
355 
356 File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top
358 Completion
359 **********
361 YaTeX makes it easy to input the LaTeX commands. There are several
362 kinds of completion type, begin-type, section-type, large-type, etc...
364 * Menu:
366 * Begin-type completion::
367 * Section-type completion::
368 * Large-type completion::
369 * Maketitle-type completion::
370 * Arbitrary completion::
371 * End completion::
372 * Accent completion::
373 * Image completion::
374 * Greek letters completion::
377 
378 File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion
380 Begin-type completion
381 =====================
383 "Begin-type completion" completes commands of `\begin{env}' ...
384 `\end{env}'. All of the begin-type completions begin with this key
385 sequence.
387 `[prefix] b'
388 ... start begin-type completion
390 An additional key stroke immediately completes a frequently used LaTeX
391 `\begin{}'...`\`end'{}' environment.
393 `[prefix] b c'
394 ... `\begin{center}...\end{center}'
395 `[prefix] b d'
396 ... `\begin{document}...\end{document}'
397 `[prefix] b D'
398 ... `\begin{description}...\end{description}'
399 `[prefix] b e'
400 ... `\begin{enumerate}...\end{enumerate}'
401 `[prefix] b E'
402 ... `\begin{equation}...\end{equation}'
403 `[prefix] b i'
404 ... `\begin{itemize}...\end{itemize}'
405 `[prefix] b l'
406 ... `\begin{flushleft}...\end{flushleft}'
407 `[prefix] b m'
408 ... `\begin{minipage}...\end{minipage}'
409 `[prefix] b t'
410 ... `\begin{tabbing}...\end{tabbing}'
411 `[prefix] b T'
412 ... `\begin{tabular}...\end{tabular}'
413 `[prefix] b^T'
414 ... `\begin{table}...\end{table}'
415 `[prefix] b p'
416 ... `\begin{picture}...\end{picture}'
417 `[prefix] b q'
418 ... `\begin{quote}...\end{quote}'
419 `[prefix] b Q'
420 ... `\begin{quotation}...\end{quotation}'
421 `[prefix] b r'
422 ... `\begin{flushright}...\end{flushright}'
423 `[prefix] b v'
424 ... `\begin{verbatim}...\end{verbatim}'
425 `[prefix] b V'
426 ... `\begin{verse}...\end{verse}'
428 Any other LaTeX environments are made by completing-read of the Emacs
429 function.
431 `[prefix] b SPACE'
432 ... begin-type completion
434 The next message will show up in the minibuffer
436 Begin environment(default document):
438 by typing `[prefix] b'. Put the wishing environment with completion in
439 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the
440 LaTeX source text. If the environment you want to put does not exist in
441 the YaTeX completion table, it will be registered in the user completion
442 table. YaTeX automatically saves the user completion table in the user
443 dictionary file at exiting of emacs.
445 At the completion of certain environments, the expected initial entry will
446 automatically inserted such as `\item' for `itemize' environment. If you
447 don't want the entry, it can be removed by undoing.
449 If you want to enclose some paragraphs which have already been written,
450 invoke the begin-type completion with changing the case of `b' of key
451 sequence upper(or invoke it with universal argument by `C-u' prefix).
453 The following example encloses a region with `description' environment.
455 `[prefix] B D'
456 `(or ESC 1 [prefix] b D)'
457 `(or C-u [prefix] b D)'
459 ... begin-type completion for region
461 This enclosing holds good for the completing input by `[prefix] b SPC'.
462 `[prefix] B SPC' enclose a region with the environment selected by
463 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::
546 
547 File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion
549 view-sectioning
550 ---------------
552 In the minibuffer at the prompt of section-type command completion,
553 typing `C-v' shows a list of sectioning commands in source text(The line
554 with `<<--' mark is the nearest sectioning command). Then, default
555 sectioning command appears in the minibuffer. You can go up/down
556 sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing
557 buffer by `C-v'/`M-v', and can hide sectioning commands under certain
558 level by 0 through 6. Type `?' in the minibuffer of sectioning prompt
559 for more information.
561 You can generate this listing buffer (`*Sectioning Lines*' buffer) by
562 typing
563 `M-x YaTeX-section-overview'
564 ... Generate *Sectioning Lines* buffer
566 from the LaTeX source buffer. In this listing buffer, typing `u' on
567 the sectioning command shifts up the corresponding sectioning command in
568 source text and `d' shifts down. After marking lines in the listing
569 buffer, typing `U' shifts up all sectioning commands in the region,
570 and `U' shifts down. Here are all the key bindings of
571 `*Sectioning Lines*' buffer.
573 `SPC'
574 ... Jump to corresponding source line
575 `.'
576 ... Display corresponding source line
577 `u'
578 ... Shift up a sectioning line
579 `d'
580 ... Shift down a sectioning line
581 `U'
582 ... Shift up sectioning lines in region
583 `D'
584 ... Shift down sectioning lines in region
585 `0...6'
586 ... Hide sectioning commands whose level is lower than n
590 
591 File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Section-type completion, Up: Completion
593 Large-type completion
594 =====================
596 "Large-type completion" inputs the font or size changing descriptions
597 such as `{\large }'. When you type
599 `[prefix] l'
600 ... large-type completion
602 the message in the minibuffer
604 {\??? } (default large):
606 prompts prompts you large-type command with completing-read. There are
607 TeX commands to change fonts or sizes, `it', `huge' and so on, in the
608 completion table.
610 Region-based completion is also invoked by changing the letter after
611 prefix key stroke as `[prefix] L'. It encloses the region by braces with
612 large-type command.
615 
616 File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion
618 Maketitle-type completion
619 =========================
621 We call it "maketitle-type completion" which completes commands such as
622 `\maketitle'. Take notice that maketitle-type commands take no arguments.
623 Then, typing
625 `[prefix] m'
626 ... maketitle-type completion
628 begins maketitle-completion. Above mentioned method is true for
629 maketitle-completion, and there are LaTeX commands with no arguments in
630 completion table.
633 
634 File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion
636 Arbitrary completion
637 ====================
639 You can complete certain LaTeX command anywhere without typical
640 completing method as described, by typing
642 `[prefix] SPC'
643 ... arbitrary completion
645 after the initial string of LaTeX command that is preceded by `\'.
648 
649 File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion
651 End completion
652 ==============
654 YaTeX automatically detects the opened environment and close it with
655 `\end{environment}'. Though proficient YaTeX users never fail to make
656 environment with begin-type completion, some may begin an environment
657 manually. In that case, type
659 `[prefix] e'
660 ... `end' completion
662 at the end of the opened environment.
665 
666 File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion
668 Accent completion
669 =================
671 When you want to write the European accent marks(like `\`{o}'),
673 `[prefix] a'
674 ... accent completion
676 shows the menu
678 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
680 in the minibuffer. Chose one character or corresponding numeric, and you
681 will see
683 \`{}
685 in the editing buffer with the cursor positioned in braces. Type one more
686 character `o' for example, then
688 \`{o}
690 will be completed, and the cursor gets out from braces.
693 
694 File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion
696 Image completion of mathematical sign
697 =====================================
699 Arrow marks, sigma mark and those signs mainly used in the TeX's math
700 environment are completed by key sequences which imitate the corresponding
701 symbols graphically. This completion only works in the math environment.
702 YaTeX automatically detects whether the cursor located in math environment
703 or not, and change the behavior of key strokes `;' and `:'.
705 By the way, we often express the leftarrow mark by `<-' for example.
706 Considering such image, you can write `\leftarrow' by typing `<-'
707 after `;' (semicolon) as a prefix. In the same way,
708 `\longleftarrow' (`<--') is completed by typing `;<--',
709 infinity mark which is imitated by `oo' is completed by typing
710 `;oo'.
712 Here are the sample operations in YaTeX math-mode.
714 INPUT Completed LaTeX commands
715 ; < - `\leftarrow'
716 ; < - - `\longleftarrow'
717 ; < - - > `\longleftrightarrow'
718 ; o `\circ'
719 ; o o `\infty'
721 In any case, you can quit from image completion and can move to the next
722 editing operation if the LaTeX command you want is shown in the buffer.
724 `;' itself in math-environment is inserted by `;;'. Typing
725 `TAB' in the midst of image completion shows all of the LaTeX
726 commands that start with the same name as string you previously typed in.
727 In this menu buffer, press `RET' after moving the cursor (by `n',
728 `p', `b', `f') to insert the LaTeX command.
730 To know all of the completion table, type `TAB' just after `;'. And
731 here is the sample menu by `TAB' after `;<'.
733 KEY LaTeX sequence sign
734 < \leq <
735 ~
736 << \ll <<
737 <- \leftarrow <-
738 <= \Leftarrow <=
740 You can define your favorite key-vs-sequence completion table in the
741 Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also
742 `yatexmth.el' for the information of the structure of this variable.
745 
746 File: yatexe, Node: Greek letters completion, Prev: Image completion, Up: Completion
748 Greek letters completion
749 ========================
751 Math-mode of YaTeX provides another image completion, Greek letters
752 completion in the same method. After prefix `:', typing `a' makes
753 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type
754 `:TAB' to know all the correspondence of alphabets vs. Greek letters.
756 If you will find `;' or `:' doesn't work in correct position of
757 math environment, it may be a bug of YaTeX. Please send me a bug report
758 with the configuration of your text, and avoid it temporarily by typing
759 `;' or `:' after universal-argument(`C-u') which forces
760 `;' and `:' to work as math-prefix.
763 
764 File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top
766 Local dictionaries
767 ******************
769 Tables for completion consist of three dictionaries; `standard
770 dictionary' built in `yatex.el', `user dictionary' for your common private
771 commands, and `local dictionary' that is effective in a certain directory.
773 When you input the command unknown to YaTeX at a completion in the
774 minibuffer, YaTeX asks you with the following prompt;
776 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard
778 In this menu, typing `u' updates your `user dictionary', `l' updates your
779 local dictionary, `n' updates only on-memory dictionary which go through
780 only current Emacs session, and `d' updates no dictionary and throws the
781 new word away.
783 If you find this switching feature meaningless and bothersome, put the
784 next expression into your `~/.emacs'
786 (setq YaTeX-nervous nil)
789 
790 File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top
792 Commenting out
793 **************
795 You may want to comment out some region.
797 `[prefix] >'
798 ... comment out region by %
799 `[prefix] <'
800 ... uncomment region
802 cause an operation to the region between point and mark.
804 `[prefix] .'
805 ... comment out current paragraph
806 `[prefix] ,'
807 ... uncomment current paragraph
809 comments or uncomments the paragraph where the cursor belongs. This
810 `paragraph' means the region marked by the function mark-paragraph, bound
811 to `ESC h' by default. It is NOT predictable what will happen when you
812 continuously comment out some paragraph many times.
814 You can also comment out an environment between `\begin' and
815 `\end', or a `\begin'-\`\end' pair themselves, by making the
816 following key strokes on the line where `\begin{}' or
817 `\end{}' exists.
819 `[prefix] >'
820 ... comment out from \begin to \`end'
821 `[prefix] <'
822 ... uncomment from \begin to \`end'
824 comment whole the contents of environment. Moreover,
826 `[prefix] .'
827 ... comment out \begin and \`end'
828 `[prefix] ,'
829 ... uncomment \begin and \`end'
831 (un)comments out only environment declaration: `\begin{}' and `\end{}'.
832 NOTE that even if you intend to comment out some region, invoking
833 `[prefix] >' on the `\begin',`\end' line decides to work in `commenting
834 out from `\begin' to `\end'' mode.
838 
839 File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top
841 Cursor jump
842 ***********
845 * Menu:
847 * Jump to corresponding object::
848 * Invoking image processor::
849 * Jump to main file::
850 * Jumping around the environment::
851 * Jumping to last completion position::
854 
855 File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump
857 Jump to corresponding object
858 ============================
860 Typing
862 `[prefix] g'
863 ... go to corresponding object
865 in a certain place move the cursor to the place corresponding to the LaTeX
866 command of last place. YaTeX recognize the followings as pairs that have
867 relation each other.
869 * `\begin{}' <-> `\end{}'
870 * `%#BEGIN' <-> `%#END'
871 * On the image-including line -> corresponding viewer or drawing tool
872 * `\label{}' <-> `\ref{}'
873 * `\include(\input)' -> included file
874 * `\bibitem{}' <-> `\cite{}'
876 On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the
877 corresponding `\end',`\begin' line, if its partner really exists. The
878 behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the
879 correspondent of `label/ref' or `cite/bibitem' exists in another file,
880 that file have to be opened to make a round trip between references by
881 `[prefix] g'.
883 If you type `[prefix] g' on the line of `\include{chap1}', typically in
884 the main text, YaTeX switches buffer to `chap1.tex'.
886 `[prefix] 4 g'
887 ... go to corresponding object in other window
889 do the same job as `[prefix] g' except it's done in other window.
890 Note that this function doesn't work on `begin/end',
891 `%#BEGIN/%#END' pairs because it is meaningless.
894 
895 File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump
897 Invoking image processor
898 ========================
901 `image-including line' described above means such lines as
902 `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX
903 automatically searches source of `foo.ps' and invokes image viewer or
904 drawing tool correspoinding to it. For example; if you draw an image
905 foo.obj with Tgif and enclose its product named foo.eps by `\epsfile'
906 command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif
907 foo.obj'. How a processor is choosen is as follows.
909 1. If there is an expression matching with one of the pattern defined in
910 `YaTeX-processed-file-regexp-alist', extract file name from regexp
911 group surrounded by \\(\\). (Which group corresponds is written in
912 the cdr part of each list.) If no matches were found, do nothing.
913 2. If there is a pattern as `%PROCESSOR' which is defined in the
914 variable `YaTeX-file-processor-alist', call that processor giving the
915 file name with corresponding extension.
916 3. If not, check the existence of each file which is supplied the
917 extension in the cdr part of each list of
918 `YaTeX-file-processor-alist'. If any, call the corresponding image
919 viewer or drawing tool.
922 
923 File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump
925 Jump to main file
926 =================
928 Typing
930 `[prefix] ^'
931 ... visit main file
932 `[prefix] 4^'
933 ... visit main file in other buffer
935 in a sub text switch the buffer to the main text specified by
936 `%#!' notation.
939 
940 File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump
942 Jumping around the environment
943 ==============================
945 And these are the functions which work on the current LaTeX environment:
947 `M-C-a'
948 ... beginning of environment
949 `M-C-e'
950 ... `end' of environment
951 `M-C-@'
952 ... mark environment
955 
956 File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump
958 Jumping to last completion position
959 ===================================
961 YaTeX always memorize the position of completion into register `3'. So
962 every time you make a trip to any other part of text other than you are
963 writing, you can return to the editing paragraph by calling
964 register-to-point with argument YaTeX-current-position-register, which is
965 achieved by typing `C-x j 3'(by default).
968 
969 File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top
971 Changing and Deleting
972 *********************
974 These functions are for change or deletion of LaTeX commands already
975 entered.
977 `[prefix] c'
978 ... change LaTeX command
979 `[prefix] k'
980 ... kill LaTeX command
982 * Menu:
984 * Changing LaTeX commands::
985 * Killing LaTeX commands::
988 
989 File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting
991 Changing LaTeX commands
992 =======================
994 `[prefix] c' can change the various (La)TeX commands. This can change the
995 followings.
996 * Environment names
997 * Section-type commands
998 * Argument of section-type commands
999 * Optional parameters (enclosed by []) of section-type commands
1000 * Font/size designators
1001 * Math-mode's maketitle-type commands that can be inputted with image
1002 completion
1004 Typing `[prefix] c' on one of above objects you want to change brings a
1005 suitable reading function sometimes with completion. Note: If you want to
1006 change the argument of section-type command that contains other LaTeX
1007 commands, type `[prefix] c' either of surrounding braces of the argument
1008 in order to make YaTeX ignore the internal LaTeX sequences as an object of
1009 changing. Anyway, it is very difficult to know which argument position
1010 the cursor belongs because the LaTeX commands can be nested and braces can
1011 freely emerge. So keep it mind to put the cursor on a brace when you are
1012 thinking of changing a complicated argument.
1016 File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting
1018 Killing LaTeX commands
1019 ======================
1021 `[prefix] k' kills the LaTeX commands sometimes with their arguments.
1022 Following table illustrates the correspondence of the invoking position
1023 and what is killed.
1025 [Invoking position] [action]
1026 \begin, \end line kill \begin,\end pairs
1027 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
1028 on a Section-type command kill section-type command
1029 on a parenthesis kill parentheses
1031 Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines
1032 `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take
1033 care not to create any line that contains more than one `\begin' or so.
1035 While all operations above are to kill `containers' which surround some
1036 text, universal argument (`C-u') for these commands kills not only
1037 `containers' but also `contents' of them. See below as a sample.
1039 Original text: [prefix] k C-u [prefix] k
1040 Main \footnote{note} here. Main note here. Main here.
1041 ~(cursor)
1045 File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top
1047 Filling
1048 *******
1051 Filling an item
1052 ===============
1054 To fill a term (descriptive sentences) of `\item', type
1056 `M-q'
1057 ... fill item
1059 on that item.
1061 YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular
1062 expression to search item header in itemize environment. If you make a
1063 newcommand to itemize terms(e.g. `\underlineitem'), put
1065 (setq YaTeX-item-regexp
1066 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1068 in your `~/.emacs'. If you are not familiar with regular expression
1069 for Emacs-Lisp, name a newcommand for `itemize' beginning with
1070 `\item' such as `\itembf', not `\bfitem'.
1072 This function reformats the `\item' into `hang-indented' style. For
1073 example:
1075 itemize, enumerate environment:
1077 >\item[foo] `foo' is the typical word for describing an
1078 > arbitrarily written....
1079 description environment:
1080 > \item[bar] When the word `for' is used as an arbitrarily
1081 > word, `bar' is bound to follow it.
1083 Note that the indent depth of an `\item' word and its descriptive
1084 paragraph are the same in latter case. If you want to use different
1085 depth, invoke fill-paragraph at the beginning of non-whitespace
1086 character(see below).
1089 Filling paragraph
1090 =================
1092 Fill-paragraph is little bit adapted for LaTeX sources. It retains from
1093 filling in certain environments where formatting leads to a disaster such
1094 as verbatim, tabular, or so. And it protects `\verb' expressions from
1095 being folded (The variable `YaTeX-verb-regexp' controls this). Besides,
1096 putting cursor on the first occurrence of non-whitespace character on a
1097 line changes the fill-prefix temporarily to the depth of the line.
1101 File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top
1103 Updation of `\includeonly'
1104 **************************
1106 When you edit splitting source texts, the notation
1108 \includeonly{CurrentEditingFileName}
1110 in the main file reduces the time of typesetting. If you want to hack
1111 other file a little however, you have to rewrite it to
1113 \includeonly{OtherFileNameYouWantToFix}
1115 in the main file. YaTeX automatically detects that the current edited
1116 text is not in includeonly list and prompts you
1118 A)dd R)eplace %)comment?
1120 in the minibuffer. Type `a' if you want to add the current file name
1121 to `\includeonly' list, `r' to replace \`includeonly' list
1122 with the current file, and type `%' to comment out the
1123 `\includeonly' line.
1127 File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top
1129 What column?
1130 ************
1132 We are often get tired of finding the corresponding column in large
1133 tabulars. For example,
1135 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
1136 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1137 Home Addr.&Home Phone\\ \hline
1138 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1139 zzz-www & Japan & 9876-54321 \\
1140 & 2 & \multicolumn{2}{c|}{Unknown}
1141 &&&(???)
1142 \\ \hline
1143 \end{tabular}
1145 Suppose you have the cursor located at `(???)' mark, can you tell which
1146 column it is belonging at once? Maybe no. In such case, type
1148 `[prefix] &'
1149 ... What column
1151 in that position. YaTeX tells you the column header of the current field.
1152 Since YaTeX assumes the first line of tabular environment as a row of
1153 column headers, you can create a row of virtual column headers by putting
1154 them in the first line and commenting that line with `%'.
1158 File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top
1160 Intelligent newline
1161 *******************
1163 At the end of begin-type completion of tabular[*], array, itemize,
1164 enumerate or tabbing environment, or typing
1166 `ESC RET'
1167 ... Intelligent newline
1169 in these environments inserts the contents corresponding to the current
1170 environment in the next line. (At the begin-type completion, this
1171 contents can be removed by `undo'.) In `tabular' environment, for
1172 example, `ESC RET' inserts the certain number of `&' and trailing `\\',
1173 and `\hline' if other `\hline' is found in backward. Here are the list of
1174 contents vs. environments.
1176 * `tabular', `tabular*', `array'
1178 Corresponding number of `&' and `\\'. And `\hline' if
1179 needed.
1181 * `tabbing'
1183 The same number of `\>' as `\=' in the first line.
1185 * `itemize', `enumerate', `description', `list'
1187 `\item' or `item[]'.
1189 Note that since this function works seeing the contents of the first
1190 line, please call this after the second line if possible.
1192 If you want to apply these trick to other environments, `foo'
1193 environment for example, define the function named
1194 `YaTeX-intelligent-newline-foo' to insert corresponding contents.
1195 That function will be called at the beginning of the next line after the
1196 newline is inserted to the current line. Since the function
1197 `YaTeX-indent-line' is designed to indent the current line properly,
1198 calling this function before your code to insert certain contents must be
1199 useful. See the definition of the function
1200 `YaTeX-intelligent-newline-itemize' as an example.
1204 File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top
1206 Usepackage checker
1207 ******************
1209 When you input begint-type, section-type, maketitle-type macros with
1210 completion, and it requires some LaTeX2e package, YaTeX examines the
1211 existence of correct `\usepackage'. If not, YaTeX inserts the
1212 `\usepackage{}' declaration corresponding to input macro.
1214 To activate the package completion for your favarite package, set the
1215 variable `YaTeX-package-alist-private' correctly. Please refere the value
1216 of `YaTeX-package-alist-default' as an example.
1220 File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top
1222 Online help
1223 ***********
1225 YaTeX provides you the online help with popular LaTeX commands.
1227 Here are the key strokes for the online help.
1229 `[prefix] ?'
1230 ... Online help
1231 `[prefix] /'
1232 ... Online apropos
1235 Online help
1236 ===========
1238 `Online help' shows the documentation for the popular LaTeX
1239 commands(defaults to the commands on the cursor) in the next buffer.
1240 There are two help file, `global help' and `private help'. The former
1241 file contains the descriptions on the standard LaTeX command and is
1242 specified its name by variable `YaTeX-help-file'. Usually, the global
1243 help file should be located in public space (`$EMACSEXECPATH' by default)
1244 and should be world writable so that anyone can update it to enrich its
1245 contents. The latter file contains descriptions on non-standard or
1246 personal command definitions and is specified by
1247 `YaTeX-help-file-private'. This file should be put into private
1248 directory.
1251 Online apropos
1252 ==============
1254 `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all
1255 the documentations that contains the keyword entered by the user.
1258 When no descriptions are found...
1259 =================================
1261 If there is no description on a command in help files, YaTeX requires
1262 you to write a description on that command. If you are willing to do,
1263 determine which help file to add and write the description on it referring
1264 your manual of (La)TeX. Please send me your additional descriptions if
1265 you describe the help on some standard commands. I might want to include
1266 it in the next distribution.
1270 File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top
1272 Browsing file hierarchy
1273 ***********************
1275 When you are editing multi-file source, typing
1277 `[prefix] d'
1278 ... browse file hierarchy
1280 asks you the parent-most file (which may be defaulted) and displays the
1281 documentation hierarchy in the next window. In this buffer, the following
1282 commands are available.
1284 `n'
1285 ... move to the next line and show its contents
1286 `p'
1287 ... move to the previous line and show its contents
1288 `N'
1289 ... move to the next file in the same inclusion level
1290 `P'
1291 ... move to the previous file in the same inclusion level
1292 `j'
1293 ... move to the next line
1294 `k'
1295 ... move to the previous line
1296 `u'
1297 ... move to the parent file
1298 `.'
1299 ... show the current files contents in the next window
1300 `SPC'
1301 ... scroll up the current file window
1302 `DEL, b'
1303 ... scroll down the current file window
1304 `<'
1305 ... show the beginning of the current file
1306 `>'
1307 ... show the end of the current file
1308 `>'
1309 ... return to the previous postion after `<' or `>'
1310 `RET, g'
1311 ... open the current file in the next window
1312 `mouse-2'
1313 ... same as RET(available only with window system)
1314 `o'
1315 ... other window
1316 `1'
1317 ... delete other windows
1318 `-'
1319 ... shrink hierarchy buffer window
1320 `+'
1321 ... enlarge hierarchy buffer window
1322 `?'
1323 ... describe mode
1324 `q'
1325 ... quit
1327 Note that operations on the file contents in the next window do not work
1328 correctly when you close the corresponding file.
1332 File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top
1334 Cooperation with other packages
1335 *******************************
1337 YaTeX works better with other brilliant packages.
1340 gmhist
1341 ======
1343 When you are loading `gmhist.el' and `gmhist-mh.el', you can use
1344 independent command history list at the prompt of preview command
1345 (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you
1346 can enter the previous command line string repeatedly by typing `M-p'.
1349 min-out
1350 =======
1352 `min-out', the outline minor mode, can be used in yatex-mode buffers.
1353 If you want to use it with YaTeX, please refer the file `yatexm-o.el' as
1354 an example.
1358 File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top
1360 Customizations
1361 **************
1363 You can customize YaTeX by setting Emacs-Lisp variables and by making
1364 add-in functions.
1366 * Menu:
1368 * Lisp variables::
1369 * Add-in functions::
1370 * Add-in generator::
1374 File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations
1376 Lisp variables
1377 ==============
1379 You can change the key assignments or make completion more comfortable
1380 by setting the values of various variables which control the movement of
1381 yatex-mode.
1383 For example, if you want to change the prefix key stroke from `C-c' to
1384 any other sequence, set YaTeX-prefix to whatever you want to use. If you
1385 don't want to use the key sequence `C-c letter' which is assumed to be the
1386 user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter'
1387 to `t', and all of the default key bind of `C-c letter' will turn to the
1388 corresponding `C-c C-letter' (but the region based completions that is
1389 invoked with `C-c Capital-letter' remain valid, if you want to disable
1390 those bindings, set that variable to 1 instead of `t').
1392 * Menu:
1394 * All customizable variables::
1395 * Sample definitions::
1396 * Hook variables::
1397 * Hook file::
1401 File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables
1403 All customizable variables
1404 --------------------------
1406 Here are the customizable variables of yatex-mode. Each value setq-ed
1407 in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected.
1408 Parenthesized contents stands for the default value. When you are to
1409 change some of these variables, see more detailed documentation of the
1410 variable by `M-x describe-variable'.
1412 -- Variable: YaTeX-japan
1413 Set this nil to produce all messages in English (`Depends on Japanese
1414 feature of Emacs')
1416 -- Variable: YaTeX-kanji-code
1417 Default buffer-file-coding-system for YaTeX modes' buffer. Set this
1418 0 to no language conversion. Nil to preserve original
1419 coding-system. 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (`1 or 2')
1421 -- Variable: YaTeX-prefix
1422 Prefix key stroke (`C-c')
1424 -- Variable: YaTeX-inhibit-prefix-letter
1425 Change key stroke from `C-c letter' to `C-c C-letter' (`nil')
1427 -- Variable: YaTeX-fill-prefix
1428 Fill-prefix used in yatex-mode (`nil')
1430 -- Variable: YaTeX-user-completion-table
1431 Name of user dictionary where learned completion table will be
1432 stored. (`"~/.yatexrc"')
1434 -- Variable: tex-command
1435 LaTeX typesetter command (`"latex"')
1437 -- Variable: dvi2-command
1438 Preview command (`"xdvi -geo +0+0 -s 4"')
1440 -- Variable: dviprint-command-format
1441 Command format to print dvi file (`"dvi2ps %f %t %s | lpr"')
1443 -- Variable: dviprint-from-format
1444 Start page format of above %f. %b will turn to start page (`"-f %b"')
1446 -- Variable: dviprint-to-format
1447 End page format of above %t. %e will turn to `end' page (`"-t %e"')
1449 -- Variable: makeindex-command
1450 Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS))
1452 -- Variable: YaTeX-need-nonstop
1453 Put `\nonstopmode{}' or not (`nil')
1455 -- Variable: latex-warning-regexp
1456 Regular expression of warning message latex command puts out
1457 (`"line.* [0-9]*"')
1459 -- Variable: latex-error-regexp
1460 Regular expression of error message (`"l\\.[1-9][0-9]*"')
1462 -- Variable: latex-dos-emergency-message
1463 Message latex command running on DOS puts at abort (`"Emergency
1464 stop"')
1466 -- Variable: YaTeX-item-regexp
1467 Regular expression of item command (`"\\\\item"')
1469 -- Variable: YaTeX-verb-regexp
1470 Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"')
1472 -- Variable: YaTeX-nervous
1473 T for using local dictionary (`t')
1475 -- Variable: YaTeX-sectioning-regexp
1476 Regexp of LaTeX sectioning command
1477 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"')
1479 -- Variable: YaTeX-fill-inhibit-environments
1480 Inhibit fill in these environments (`'("tabular" "tabular*" "array"
1481 picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath"
1482 verbatim" "verbatim*")')
1484 -- Variable: YaTeX-uncomment-once
1485 T for deleting all preceding `%' (`nil')
1487 -- Variable: YaTeX-close-paren-always
1488 T for always close all parenthesis automatically, `nil' for only eol
1489 (`t')
1491 -- Variable: YaTeX-auto-math-mode
1492 Switch math-mode automatically (`t')
1494 -- Variable: YaTeX-math-key-list-private
1495 User defined alist, math-mode-prefix vs completion alist used in
1496 image completion (`nil'). See `yatexmth.el' for the information
1497 about how to define a completion alist.
1499 -- Variable: YaTeX-default-pop-window-height
1500 Initial height of typesetting buffer when one-window. Number for the
1501 lines of the buffer, numerical string for the percentage of the
1502 screen-height. `nil' for half height (10)
1504 -- Variable: YaTeX-help-file
1505 Global online help file name
1506 (`$doc-directory/../../site-lisp/YATEXHLP.eng')
1508 -- Variable: YaTeX-help-file-private
1509 Private online help file name (`"~/YATEXHLP.eng"')
1511 -- Variable: YaTeX-no-begend-shortcut
1512 Disable [prefix] b ?? shortcut (`nil)'
1514 -- Variable: YaTeX-hilit-pattern-adjustment-private
1515 List of the list that contain the regular expression and the symbol
1516 of logical meaning of the string that matches the pattern. See also
1517 the value from `(assq 'yatex-mode hilit-patterns-alist)' and the
1518 value of `YaTeX-hilit-pattern-adjustment-default' (and even the
1519 document of hilit19.el).
1521 -- Variable: YaTeX-sectioning-level
1522 Alist of LaTeX's sectioning command vs its height.
1524 -- Variable: YaTeX-hierarchy-ignore-heading-regexp
1525 `YaTeX-display-hierarchy' searches for sectioning command first, and
1526 comment line secondary as a file headings. In latter case, ignore lines
1527 that match with regular expression of this variable. Default value of
1528 this variable is RCS header expressions and mode specifying line `-*- xxxx
1529 -*'.
1531 -- Variable: YaTeX-skip-default-reader
1532 Non-nil for this variable skips the default argument reader of
1533 section-type command when add-in function for it is not defined
1534 (`nil')
1536 -- Variable: YaTeX-create-file-prefix-g
1537 When typing `prefix g' on the `\include' line, open the target file
1538 even if the file doesn't exist (`nil')
1540 -- Variable: YaTeX-simple-messages
1541 Simplyfy messages of various completions (`nil')
1543 -- Variable: YaTeX-hilit-sectioning-face
1544 When hilit19 and yatex19 is active, YaTeX colors the sectioning
1545 commands. This variable specifies the foreground and background
1546 color of `\part' macro. The default value is `'(yellow/dodgerblue
1547 yellow/slateblue)'. The first element of this list is for the screen
1548 when `hilit-background-mode' is `'light', and the second element is
1549 for `'dark'. You should specify both color as `forecolor/backcolor'.
1551 -- Variable: YaTeX-hilit-sectioning-attenuation-rate
1552 When color mode, this variable specifies how much attenuate the color
1553 density of `\subparagraph' compared with that of `\chapter' (`'(15
1554 40)') See also `YaTeX-hilit-sectioning-face'.
1556 -- Variable: YaTeX-use-AMS-LaTeX
1557 If you use AMS-LaTeX, set to `t' (`nil')
1559 -- Variable: YaTeX-use-LaTeX2e
1560 If you use LaTeX2e, set to `t' (`t')
1562 -- Variable: YaTeX-template-file
1563 File name which is automatically inserted at creation
1564 (`~/work/template.tex')
1566 -- Variable: YaTeX-search-file-from-top-directory
1567 Non-nil means to search input-files from the directory where main
1568 file exists (`t')
1570 -- Variable: YaTeX-use-font-lock
1571 Use font-lock to fontify buffer or not (`(featurep 'font-lock)'
1573 -- Variable: YaTeX-use-hilit19
1574 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)'
1576 -- Variable: YaTeX-use-italic-bold
1577 YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20
1578 or later). This variable is effective only when font-lock is used.
1579 (`(featurep 'hilit19)'
1581 -- Variable: YaTeX-singlecmd-suffix
1582 Suffix which is always inserted after maketitle-type macros.
1583 `"{}"' is recommended.
1585 -- Variable: YaTeX-package-alist-private
1586 Alist of LaTeX2e-package name vs. lists of macros in it. Set this
1587 alist properly and YaTeX automatically check the declaratiion of
1588 `usepackage' for corresponding macro, when you input that macro with
1589 completion. If required `usepackage' is not found, YaTeX also
1590 automatically inserts `\usepackage'. Alist is as follows;
1591 '((PackageName1 (completionType ListOfMacro) (completionType
1592 ListOfMacro)) (PackageName2 (completionType ListOfMacro)
1593 (completionType ListOfMacro...))....) completionType is one of `env,
1594 section, maketitle'. Consult the value of
1595 `YaTeX-package-alist-default' as an example.
1597 -- Variable: YaTeX-tabular-indentation
1598 At indentation by `C-i' in tabular or array environment, YaTeX put
1599 the additional spaces to the normail indentation depth. The number
1600 of additional spaces is the product of YaTeX-tabular-indentation and
1601 the number of column position in tabular.
1603 -- Variable: YaTeX-noindent-env-regexp
1604 Regexp of environment names that should begin with no indentation.
1605 All verbatime-like environment name should match with.
1607 -- Variable: YaTeX-ref-default-label-string
1608 Default \\ref time string format. This format is like strftime(3)
1609 but allowed conversion char are as follows; %y -> Last 2 digit of
1610 year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H ->
1611 Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal
1612 conversion of yymmdd. %qX -> alphabetical-decimal conversion of
1613 HHMMSS. Beware defualt label-string should be always unique. So
1614 this format string should have both time part (%H+%M+%S or %qX) and
1615 date part (%y+(%b|%m)+%d or %qx).
1617 -- Variable: YaTeX-ref-generate-label-function
1618 Function to generate default label string for unnamed \\label{}s.
1619 The function pointed to this value should take two arguments. First
1620 argument is LaTeX macro's name, second is macro's argument. Here is
1621 an example for using this value.
1622 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label)
1623 (defun my-yatex-generate-label (command value)
1624 (and (string= command "caption")
1625 (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t)
1626 (setq command (match-string 1)))
1627 (let ((alist '(("chapter" . "chap")
1628 ("section" . "sec")
1629 ("subsection" . "subsec")
1630 ("figure" . "fig")
1631 ("table" . "tbl"))))
1632 (if (setq command (cdr (assoc command alist)))
1633 (concat command ":" value)
1634 (YaTeX::ref-generate-label nil nil))))
1639 File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables
1641 Sample definitions
1642 ------------------
1644 For instance, to change the prefix key stroke to `ESC', and name of the
1645 user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB
1646 character, add the following `setq' to `~/.emacs'.
1648 (setq YaTeX-prefix "\e"
1649 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1650 YaTeX-fill-prefix " ")
1654 File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables
1656 Hook variables
1657 --------------
1659 More customizations will be done by the hook-function defined in
1660 hook-variable `yatex-mode-hook'. This is useful to define a shortcut key
1661 sequence to enter some environments other than `document' and `enumerate'
1662 etc. The following statement defines `[prefix] ba' to enter
1663 `\begin{abstract}' ... `=end{abstract}' immediately.
1665 (setq yatex-mode-hook
1666 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1668 You should use functions `YaTeX-define-key', or
1669 `YaTeX-define-begend-key' to define all the key sequences of yatex-mode.
1673 File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables
1675 Hook file
1676 ---------
1678 You can stuff all of YaTeX related expressions into a file named
1679 `yatexhks.el' if you have a lot of codes. YaTeX automatically load this
1680 file at the initialization of itself. Using `yatexhks.el' makes
1681 `yatex-mode-load-hook' unnecessary.
1685 File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations
1687 Add-in functions
1688 ================
1690 You can easily define a function to input detailed arguments with
1691 completion according to LaTeX environments or commands.
1694 What is add-in functions?
1695 -------------------------
1697 When you input `tabular' environment, don't you think "I want YaTeX to
1698 complete its argument toward my favorite one such as `{|c|c|c|}'..."?
1699 Yes, you can define the function to complete arguments for any environment
1700 and any LaTeX commands.
1703 Procedure
1704 ---------
1706 Here is the procedure to define add-in functions.
1707 1. Define the function
1708 2. Put the function into `yatexhks.el'
1710 * Menu:
1712 * How the add-in function works::
1713 * How the function is called::
1714 * Useful functions for creating add-in::
1715 * Contribution::
1719 File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions
1721 How the add-in function works
1722 -----------------------------
1724 There are three types of add-in.
1726 1. Option add-in
1727 2. argument add-in
1728 3. enclosing add-in
1730 "Option add-in" returns the LaTeX's optional parameters such as optional
1731 strings after `\begin{ENV}', optional strings between a section-type
1732 command and its first argument, and optional strings just after type
1733 maketitle-type command. The following illustrates the name of add-in
1734 functions, where underlined strings are generated by add-in functions.
1736 \begin{table}[ht] (Function name: YaTeX:table)
1737 ~~~~
1738 \put(100,200){} (Function name: YaTeX:put)
1739 ~~~~~~~~~
1740 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1741 ~~~~~~~~~~
1743 Obviously, the function name is decided by concatenating the prefix
1744 `YaTeX:' and LaTeX command's name.
1746 Another add-in type is "argument add-in", which completes arguments for
1747 section-type commands.
1749 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1750 ~~~~ ~~~
1752 When the section-type command is inputted, the function named by
1753 concatenating `YaTeX::' and section-type command, is called automatically
1754 with an integer argument which indicates which argument of section-type
1755 command is being read. Thus the add-in should determine the job referring
1756 the value of its argument.
1758 "enclosing add-in" is for modifying and/or checking the region that will
1759 be enclosed by section-type commands via `[prefix] S'. An enclosing
1760 add-in function will be called with two arguments, beginning of the
1761 enclosed region and end of the region. Suppose you want to enclose the
1762 existing text `(a+b)/c' by `\frac{}'.
1764 a/c
1765 | |
1766 A B
1768 You do set-mark-command at point A and then move to point B. Typing
1769 `[prefix] S' and input `frac' enclose the region like this;
1771 \frac{a/c}
1773 Normally, the expression `a/c' is translated to
1774 `\frac{a}{c}'. An enclosing add-in is useful for modifying
1775 `/' to `}{'.
1777 * Menu:
1779 * Defining option-add-in::
1780 * Defining argument-add-in::
1781 * Defining enclosing-add-in::
1785 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
1787 Defining `option add-in'
1788 ........................
1790 If you want `{|c|c|c|}' for all `tabular' environment,
1792 (defun YaTeX:tabular ()
1793 "{|c|c|c|}")
1795 is enough. If you want more complicated format, define as below.
1797 (defun YaTeX:tabular ()
1798 "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}")
1800 Note that the character `\' must be described as `\\' in Emacs-Lisp. The
1801 next example reads the tabular format from keyboard.
1802 (defun YaTeX:tabular ()
1803 (concat "{" (read-string "Rule: ") "}"))
1807 File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works
1809 Defining `argument add-in'
1810 ..........................
1812 This section describes how to define the add-in function for
1813 `\newcommand'.
1815 The first argument of `\newcommand' begins always with `\'. The second
1816 argument is usually so complex that we can not edit them in the
1817 minibuffer. Here is the created function considering this.
1819 (defun YaTeX::newcommand (n) ;n is argument position
1820 (cond
1821 ((= n 1) ;1st argument is macro name
1822 (read-string "Command: " "\\")) ;initial input `\'
1823 ((= n 2) "") ;do nothing when reading arg#2
1824 (t nil)))
1826 Note that when the `argument add-in' function return `nil', normal
1827 argument reader will be called.
1831 File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works
1833 Defining `enclosing add-in'
1834 ...........................
1836 This section describes how to define the add-in function for text
1837 enclosed by `\frac{}'.
1839 When enclosing the text `5/3' by `\frac{}', you might want to replace
1840 `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two
1841 arguments, beginning of enclosed text and end of enclosed text. The
1842 function is expected to replace `/' with `}{'. Here is an example
1843 expression.
1845 (defun YaTeX::frac-region (beg end)
1846 (catch 'done
1847 (while (search-forward "/" end t)
1848 (goto-char (match-beginning 0))
1849 (if (y-or-n-p "Replace this slash(/) with `}{'")
1850 (throw 'done (replace-match "}{")))
1851 (goto-char (match-end 0)))))
1855 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
1857 How the function is called
1858 --------------------------
1860 YaTeX calls the add-in functions for specified begin-type, section-type,
1861 and maketitle-type command, if any. `Option add-in' functions for
1862 begin-type are called when `\begin{ENV}' has been inserted, functions for
1863 section-type are called just before input of the first argument, and
1864 functions for maketitle-type is called after maketitle-type command has
1865 been inserted. `Argument add-in' functions are called at each entry of
1866 arguments for section-type commands.
1870 File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions
1872 Useful functions for creating add-in
1873 ------------------------------------
1875 Many add-in functions for typical LaTeX commands are defined in
1876 `yatexadd.el'. Those are also useful as references. Here are the short
1877 descriptions on useful functions, where [F] means function, [A] means
1878 arguments, [D] means description.
1880 `[F]'
1881 YaTeX:read-position
1882 `[A]'
1883 Character list which can show up in the brackets
1884 `[D]'
1885 Return the location specifier such as `[htb]'. When
1886 nothing is entered, omit [] itself. If the possible characters
1887 are "htbp", call this function as
1888 `(YaTeX:read-position "htbp")'
1890 `[F]'
1891 YaTeX:read-coordinates
1892 `[A]'
1893 Base prompt, X-axis prompt, Y-axis prompt (each optional)
1894 `[D]'
1895 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for
1896 X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the form
1897 of "(X,Y)". The default prompts are `Dimension', `X',
1898 `Y' respectively.
1900 `[F]'
1901 YaTeX:check-completion-type
1902 `[A]'
1903 One of the symbols: 'begin, 'section, or 'maketitle
1904 `[D]'
1905 Check the current completion type is specified one and cause error
1906 if not. The variable `YaTeX-current-completion-type' holds the symbol
1907 according to the current completion type.
1911 File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions
1913 Contribution
1914 ------------
1916 If you make your own pretty function and you let it be in public, please
1917 send me the function. I'm going to include it in the next release.
1921 File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations
1923 Add-in generator
1924 ================
1926 First, don't forget to read the section of add-in functions *Note Add-in
1927 functions::. If you easily understand how to define them, there's no need
1928 to read this section. But being not familiar with Emacs-Lisp, when you
1929 don't have clear idea what to do, this section describes how to get YaTeX
1930 make add-in function.
1932 There are two methods of generation. One is for fully interactive
1933 generator for beginners and another requires little knowledge of
1934 Emacs-Lisp.
1937 Generator for beginners
1938 -----------------------
1939 The former generator is called by
1940 `M-x YaTeX-generate'
1942 strokes. All you have to do is follow the guidances. Defying them may
1943 cases the disaster (I wonder what is it???). So when you make some
1944 mistake, it is recommendable to type `C-g' and start afresh.
1947 Simple generator
1948 ----------------
1950 The latter generator is invoked by the next sequence. `M-x
1951 YaTeX-generate-simple' This generator can make both "option add-in" and
1952 argument add-in" (*refer the section add-in functions* *Note How the
1953 add-in function works::), whereas `YaTeX-generate' cannot make "argument
1954 addin".
1956 For example, assume you have the LaTeX command as follows.
1958 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
1959 (A) (B) (1) (2) (3)
1960 (A)Optional parameter to specify the position
1961 One of t(top), b(bottom), l(left), r(right)
1962 (B)Maximum size of frame
1963 (1)1st argument is filename of EPS file
1964 (2)2nd argument indicates
1965 plain do nothing
1966 frame make frame around image
1967 dframe make double-frame around image
1968 for included EPS file.
1969 (3)Caption for the picture
1971 Now get start with generation. Typing `M-x YaTeX-generate-simple'
1972 brings the prompt:
1973 (O)ption? (A)rgument?
1976 Generating "option add-in"
1977 ..........................
1979 Since (A), (B) above are optional argument, all we have to do to
1980 complete them is define the option add-in for them. Let's generate the
1981 function to complete (A).
1983 M-x YaTeX-generate-simple RET
1984 epsinput RET
1987 Typing as above leads the next prompt.
1989 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
1991 This asks that "Which type is the completion style of 1st argument?".
1992 Here are the possible completion style.
1994 `String'
1995 read plain string
1996 `Complete'
1997 read with completion
1998 `File'
1999 read file name
2000 `Option'
2001 read optional string (if string omitted, omit [] too)
2002 `Position'
2003 read positional option (like [htbp])
2004 `Coord.'
2005 read coordinates
2006 `Quit'
2007 quit from generating
2009 Since (A) is the optional argument to specify the location of included
2010 EPS file, the completion style is `Position', and the possible characters
2011 are t, b, l, and r. To tell these information to generator, operate as
2012 follows.
2014 Read type(1).... p
2015 Acceptable characters: tblr RET
2017 (B) is coordinate. So its completion style is coOrd. We want a prompt
2018 meaning "Maximum size" when completion.
2020 Read type(2).... o
2021 Prompt for coordinates: Max size RET
2023 That's all for optional argument. Select quit.
2025 Read type(3).... q
2027 Then the generated option add-in function for \epsinput will be shown in
2028 the next window.
2031 Generating "argument add-in"
2032 ............................
2034 Next, create the argument add-in. The arguments for \epsinput are EPS
2035 file name, framing style, and caption string in sequence.
2037 M-x YaTeX-generate-simple RET
2038 epsinput RET
2041 Above key strokes bring the prompt that asks the number of argument.
2042 Answer it with 3.
2044 How many arguments?: 3 RET
2046 Then the generator asks the completion style and prompt for completion.
2047 Answer them. `f' for FileName and prompt string.
2049 Read type(1).... f
2050 Prompt for argument#1 EPS file name RET
2052 The second argument is one of selected symbol. So the completion type
2053 is `Completion'.
2055 Read type(2).... c
2056 Prompt for argument#2 Include style RET
2058 Then all the candidates ready to be read. Type single RET after
2059 entering all.
2061 Item[1](RET to exit): plain RET
2062 Item[2](RET to exit): frame RET
2063 Item[3](RET to exit): dframe RET
2064 Item[4](RET to exit): RET
2066 The following prompt asks whether the entered string must belong to
2067 candidates or not. In this case, since the argument must be one of
2068 `plain', `frame', and `dframe', type `y'.
2070 Require match? (y or n) y
2072 The last argument is the caption string for which any completion is
2073 needed.
2075 Read type(3).... s
2076 Prompt for argument#3 Caption RET
2077 default: Figure of RET
2079 Finally we'll get the argument add-in in the next window.
2082 Contribution
2083 ------------
2085 If you get your own pretty function and you let it be in public, please
2086 steel yourself in the happy atmosphere and do not send me the function. I
2087 do know it is not fine because it is generated by yatexgen:-p.
2091 File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top
2093 Etcetera
2094 ********
2096 The standard completion tables provided in `yatex.el' contain a few
2097 LaTeX commands I frequently use. This is to lessen the key strokes to
2098 complete entire word, because too many candidates rarely used often cause
2099 too many hits. Therefore always try to use completion in order to enrich
2100 your dictionary, and you will also find `Wild Bird' growing suitable for
2101 your LaTeX style.
2103 The package name `Wild Bird' is the English translation of Japanese
2104 title `Yachou', which is a trick on words of Japanese.
2108 File: yatexe, Node: Copying, Prev: Etcetera, Up: Top
2110 Copying
2111 *******
2113 This program is distributed as a free software. You can
2114 use/copy/modify/redistribute this software freely but with NO warranty to
2115 anything as a result of using this software. Adopting code from this
2116 program is also free. But I would not do contract act.
2118 Any reports and suggestions are welcome as long as I feel interests in
2119 this software. My possible e-mail address is `yuuji@yatex.org'. (as of
2120 Jan.2004) And there is mailing list for YaTeX. Although the common
2121 language is Japanese, questions in English will be welcome. To join the
2122 ML, send the mail whose subject is `append' to the address
2123 `yatex@yatex.org. If you have some question, please ask to
2124 `yatex-admin@yatex.org'.
2126 The specification of this software will be surely modified (depending on
2127 my feelings) without notice :-p.
2130 HIROSE Yuuji
2132 Tag table:
2133 Node: Top145
2134 Node: What is YaTeX?1472
2135 Node: Main features1845
2136 Node: Installation3436
2137 Node: Typesetting4213
2138 Node: Calling typesetter5006
2139 Node: Calling previewer6352
2140 Node: Printing out6713
2141 Node: %#notation7005
2142 Node: Changing typesetter7336
2143 Node: Splitting input files7700
2144 Node: Static region for typesetting9124
2145 Node: Lpr format10253
2146 Node: Editing %# notation11310
2147 Node: Completion11829
2148 Node: Begin-type completion12318
2149 Node: Section-type completion15360
2150 Node: view-sectioning17781
2151 Node: Large-type completion19361
2152 Node: Maketitle-type completion20091
2153 Node: Arbitrary completion20643
2154 Node: End completion21033
2155 Node: Accent completion21502
2156 Node: Image completion22119
2157 Node: Greek letters completion24374
2158 Node: Local dictionaries25101
2159 Node: Commenting out26038
2160 Node: Cursor jump27497
2161 Node: Jump to corresponding object27788
2162 Node: Invoking image processor29188
2163 Node: Jump to main file30531
2164 Node: Jumping around the environment30897
2165 Node: Jumping to last completion position31315
2166 Node: Changing and Deleting31824
2167 Node: Changing LaTeX commands32205
2168 Node: Killing LaTeX commands33382
2169 Node: Filling34567
2170 Node: Updation of includeonly36422
2171 Node: What column37219
2172 Node: Intelligent newline38304
2173 Node: Usepackage checker39957
2174 Node: Online help40548
2175 Node: Browsing file hierarchy42223
2176 Node: Cooperation with other packages43960
2177 Node: Customizations44665
2178 Node: Lisp variables44961
2179 Node: All customizable variables45920
2180 Node: Sample definitions55615
2181 Node: Hook variables56128
2182 Node: Hook file56832
2183 Node: Add-in functions57171
2184 Node: How the add-in function works58009
2185 Node: Defining option-add-in60195
2186 Node: Defining argument-add-in60917
2187 Node: Defining enclosing-add-in61798
2188 Node: How the function is called62654
2189 Node: Useful functions for creating add-in63330
2190 Node: Contribution64740
2191 Node: Add-in generator65014
2192 Node: Etcetera70474
2193 Node: Copying71079
2195 End tag table