yatex

view docs/yatexe.tex @ 73:f41b01fef5d6

Stable version(hope to be)
author yuuji
date Wed, 22 May 2002 04:57:42 +0000
parents 0aaebd07dad0
children 0734be649cb8
line source
1 \def\lang{jp} % -*- texinfo -*-
2 \input texinfo.tex
3 @setfilename yatexe
4 @settitle Yet Another tex-mode for Emacs
6 @iftex
7 @c @syncodeindex fn cp
8 @c Last modified Fri Feb 2 12:39:12 2001 on firestorm
9 @syncodeindex vr cp
10 @end iftex
12 @titlepage
13 @sp 10
14 @center
15 @subtitle Yet Another tex-mode for emacs
16 @title Wild Bird
17 @subtitle // YaTeX //
18 @author @copyright{} 1991-1996 by HIROSE, Yuuji [yuuji@@yatex.org]
19 @end titlepage
21 @node Top, What is YaTeX?, (dir), (dir)
22 @comment node-name, next, previous, up
23 @cindex Demacs
24 @cindex Mule
25 @cindex LaTeX
26 @cindex YaTeX
28 @menu
29 * What is YaTeX?::
30 * Main features:: What YaTeX can do
31 * Installation:: Guide to install
32 * Typesetting:: Call typesetting processes
33 * %#notation::
34 * Completion:: Input LaTeX commands with completion
35 * Local dictionaries:: Directory dependent completion
36 * Commenting out:: Commenting/uncommenting text
37 * Cursor jump:: Jumping to related position
38 * Changing and Deleting:: Changing/deleting certain unit of text
39 * Filling:: Filling an item or paragraph
40 * Updation of includeonly:: Free from maintaining includeonly
41 * What column:: Check what table-column the cursor belong
42 * Intelligent newline:: Guess requisites of new line
43 * Online help:: On-line documentation of LaTeX
44 * Browsing file hierarchy:: Walking through file hierarchy
45 * Cooperation with other packages:: Work well with gmhist, min-out
46 * Customizations:: How to breed `Wild Bird'
47 * Etcetera:: YaTeX is acquisitive.
48 * Copying:: Redistribution
50 --- The Detailed Node Listing ---
52 Typesetting
54 * Calling typesetter::
55 * Calling previewer::
56 * Printing out::
58 %# notation
60 * Changing typesetter::
61 * Static region for typesetting::
62 * Lpr format::
63 * Editing %# notation::
65 Completion
67 * Begin-type completion::
68 * Section-type completion::
69 * Large-type completion::
70 * Maketitle-type completion::
71 * Arbitrary completion::
72 * End completion::
73 * Accent completion::
74 * Image completion::
75 * Greek letters completion::
77 Section-type completion
79 * view-sectioning::
81 Cursor jump
83 * Jump to corresponding object::
84 * Invoking image processor::
85 * Jump to main file::
86 * Jumping around the environment::
87 * Jumping to last completion position::
89 Changing and Deleting
91 * Changing LaTeX commands::
92 * Killing LaTeX commands::
94 Customizations
96 * Lisp variables::
97 * Add-in functions::
98 * Add-in generator::
100 Lisp variables
102 * All customizable variables::
103 * Sample definitions::
104 * Hook variables::
105 * Hook file::
107 Procedure
109 * How the add-in function works::
110 * How the function is called::
111 * Useful functions for creating add-in::
112 * Contribution::
114 How the add-in function works
116 * Defining option-add-in::
117 * Defining argument-add-in::
118 @end menu
120 @node What is YaTeX?, Main features, Top, Top
121 @comment node-name, next, previous, up
122 @chapter What is YaTeX?
124 YaTeX automates typesetting and previewing of LaTeX and enables
125 completing input of LaTeX mark-up command such as
126 @code{\begin@{@}}..@code{\end@{@}}.
128 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
129 Language Enhancement to GNU Emacs), and latex on DOS.
131 @node Main features, Installation, What is YaTeX?, Top
132 @comment node-name, next, previous, up
133 @chapter Main features
135 @itemize
136 @item Invocation of typesetter, previewer and related programs(@kbd{C-c t})
137 @item Typesetting on static region which is independent from point
138 @item Semiautomatic replacing of @code{\includeonly}
139 @item Jumping to error line(@kbd{C-c '})
140 @item Completing-read of La@TeX{} commands such as @code{\begin@{@}},
141 @code{\section} etc.
142 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m})
143 @item Enclosing text into La@TeX{} environments or commands
144 (@kbd{C-u} @var{AboveKeyStrokes})
145 @item Displaying the structure of text at entering sectioning commands
146 @item Lump shifting of sectioning commands (@ref{view-sectioning})
147 @item Learning unknown/new La@TeX{} commands for the next completion
148 @item Argument reading with a guide for complicated La@TeX{} commands
149 @item Generating argument-readers for new/unsupported commands(@file{yatexgen})
150 @item Quick changing or deleting of La@TeX{} commands(@kbd{C-c c}, @kbd{C-c k})
151 @item Jumping from and to inter-file, begin<->end, ref<->label(@kbd{C-c g})
152 @item Blanket commenting out or uncommenting
153 (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .})
154 @item Easy input of accent mark, math-mode's commands and Greek letters
155 (@kbd{C-c a}, @kbd{;}, @kbd{:})
156 @item Online help for the popular La@TeX{} commands
157 (@kbd{C-c ?}, @kbd{C-c /})
158 @item Document files hierarchy browser (@kbd{C-c d})
159 @end itemize
161 @node Installation, Typesetting, Main features, Top
162 @comment node-name, next, previous, up
163 @chapter Installation
164 @cindex installation
165 @cindex .emacs
166 @cindex auto-mode-alist
167 @cindex autoload
169 Put next two expressions into your @file{~/.emacs}.
171 @lisp
172 (setq auto-mode-alist
173 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
174 (autoload 'yatex-mode "yatex" "Yet Another La@TeX{} mode" t)
175 @end lisp
177 Next, add certain path name where you put files of YaTeX to your
178 load-path. If you want to put them in @file{~/src/emacs}, write
180 @lisp
181 (setq load-path
182 (cons (expand-file-name "~/src/emacs") load-path))
183 @end lisp
185 @noindent
186 in your @file{~/.emacs}
188 Then, yatex-mode will be automatically loaded when you visit a
189 file which has extension @file{.tex}. If yatex-mode is successfully
190 loaded, mode string on mode line will be turned to "YaTeX".
193 @node Typesetting, %#notation, Installation, Top
194 @comment node-name, next, previous, up
195 @chapter Typesetting
196 @cindex typesetting
197 @cindex previewer
198 @cindex typesetter
199 @cindex latex
200 @cindex printing out
202 The prefix key stroke of yatex-mode is @kbd{C-c} (Press 'C' with Control
203 key) by default. If you don't intend to change the prefix key stroke,
204 assume all @kbd{[prefix]} as @kbd{C-c} in this document. These key
205 strokes execute typeset or preview command.
207 @table @kbd
208 @item [prefix] t j
209 @dots{} invoke latex
210 @item [prefix] t r
211 @dots{} invoke latex on region
212 @item [prefix] t k
213 @dots{} kill current typesetting process
214 @item [prefix] t b
215 @dots{} invoke bibtex
216 @item [prefix] t p
217 @dots{} preview
218 @item [prefix] t l
219 @dots{} lpr dvi-file
220 @item [prefix] t s
221 @dots{} search current string on xdvi-remote
222 @end table
224 @menu
225 * Calling typesetter::
226 * Calling previewer::
227 * Printing out::
228 @end menu
230 @node Calling typesetter, Calling previewer, Typesetting, Typesetting
231 @comment node-name, next, previous, up
232 @section Calling typesetter
234 Typing @kbd{[prefix] t j}, the current editing window will be divided
235 horizontally when you invoke latex command, and log message of La@TeX{}
236 typesetting will be displayed in the other window; called typesetting
237 buffer. The typesetting buffer automatically scrolls up and traces
238 La@TeX{} warnings and error messages. If you see latex stopping by an
239 error, you can send string to latex in the typesetting buffer.
241 If an error stops the La@TeX{} typesetting, this key stroke will
242 move the cursor to the line where La@TeX{} error is detected.
244 @table @kbd
245 @item [prefix] '
246 @itemx ([prefix]+single quotation)
248 @dots{} jump to the previous error or warning
249 @end table
251 If you find a noticeable error, move to the typesetting buffer and move
252 the cursor on the line of error message and type @kbd{SPACE} key. This
253 makes the cursor move to corresponding source line.
255 Since @kbd{[prefix] tr} pastes the region into the file
256 @file{texput.tex} in the current directory, you should be careful of
257 overwriting. The method of specification of the region is shown in the
258 section @xref{%#notation}.
260 The documentclass for typeset-region is the same as that of editing
261 file if you edit one file, and is the same as main file's if you
262 edit splitting files.
264 @node Calling previewer, Printing out, Calling typesetter, Typesetting
265 @comment node-name, next, previous, up
266 @section Calling previewer
268 @kbd{[prefix] t p} invokes the TeX previewer. And if you are using
269 xdvi-remote, which can be controled from other terminals, @kbd{[prefix] t
270 s} enables you to search current string at the cursor on the running xdvi
271 window.
273 @node Printing out, , Calling previewer, Typesetting
274 @comment node-name, next, previous, up
275 @section Printing out
277 When you type @code{[preifx] t l}, YaTeX asks you the range of
278 dvi-printing by default. You can skip this by invoking it with
279 universal-argument as follows:
281 @example
282 C-u [prefix] tl
283 @end example
285 @node %#notation, Completion, Typesetting, Top
286 @comment node-name, next, previous, up
287 @chapter %# notation
288 @cindex %# notation
290 You can control the typesetting process by describing @code{%#}
291 notations in the source text.
293 @menu
294 * Changing typesetter::
295 * Splitting input files::
296 * Static region for typesetting::
297 * Lpr format::
298 * Editing %# notation::
299 @end menu
301 @node Changing typesetter, Splitting input files, %#notation, %#notation
302 @comment node-name, next, previous, up
303 @section To change the `latex' command or to split a source text.
304 @cindex typesetter
306 To change the typesetting command, write
308 @example
309 %#!latex-big
310 @end example
312 @noindent
313 anywhere in the source text. This is useful for changing
314 typesetter.
316 @node Splitting input files, Static region for typesetting, Changing typesetter, %#notation
317 @comment node-name, next, previous, up
318 @section Splitting input files
320 And if you split the source text and
321 edit subfile that should be included from main text.
323 @example
324 %#!latex main.tex
325 @end example
327 @noindent
328 will be helpful to execute latex on main file from sub text buffer. Since
329 this command line after @kbd{%#!} will be sent to shell literally, next
330 description makes it convenient to use ghostview as dvi-previewer.
332 @example
333 %#!latex main ; dvi2ps main.dvi > main
334 @end example
336 @noindent
337 Note that YaTeX assumes the component before the last period of
338 the last word in this line as base name of the main La@TeX{} source.
340 To make best use of the feature of inter-file jumping by
341 @kbd{[prefix] g} (see @ref{Cursor jump}), take described below into
342 consideration.
344 @itemize
345 @item You can put split texts in sub directory, but not in
346 sub directory of sub directory.
347 @item In the main text, specify the child file name with relative path name
348 such as \include@{chap1/sub@}, when you include the file in
349 a sub-directory.
350 @item In a sub-text, write @code{%#!latex main.tex} even if @file{main.tex}
351 is in the parent directory(not %#!latex ../main.tex).
352 @end itemize
354 @node Static region for typesetting, Lpr format, Splitting input files, %#notation
355 @comment node-name, next, previous, up
356 @section Static region
357 @cindex static region
358 @cindex Fixed region
360 Typeset-region by @kbd{[prefix] tr} passes the region between point and
361 mark to typesetting command by default. But when you want to typeset
362 static region, enclose the region by @code{%#BEGIN} and @code{%#END} as
363 follows.
365 @example
366 %#BEGIN
367 TheRegionYouWantToTypesetManyTimes
368 %#END
369 @end example
371 This is the rule of deciding the region.
373 @enumerate
374 @item
375 If there exists %#BEGIN before point,
377 @enumerate
378 @item
379 If there exists %#END after %#BEGIN,
380 @itemize
381 @item From %#BEGIN to %#END.
382 @end itemize
384 @item
385 If %#END does not exist after %#BEGIN,
386 @itemize
387 @item From %#BEGIN to the end of buffer.
388 @end itemize
389 @end enumerate
391 @item
392 If there does not exist %#BEGIN before point,
393 @itemize
394 @item Between point and mark(standard method of Emacs).
395 @end itemize
396 @end enumerate
398 It is useful to write @code{%#BEGIN} in the previous line of \begin and
399 @code{%#END} in the next line of \@code{end} when you try complex
400 environment such as `tabular' many times. It is also useful to put only
401 @code{%#BEGIN} alone at the middle of very long text. Do not forget to
402 erase @code{%#BEGIN} @code{%#END} pair.
404 @node Lpr format, Editing %# notation, Static region for typesetting, %#notation
405 @comment node-name, next, previous, up
406 @section Lpr format
407 @cindex lpr format
409 Lpr format is specified by three Lisp variables. Here are the
410 default values of them.
412 @table @code
413 @item (1)dviprint-command-format
414 @code{"dvi2ps %f %t %s | lpr"}
415 @item (2)dviprint-from-format
416 @code{"-f %b"}
417 @item (3)dviprint-to-format
418 @code{"-t %e"}
419 @end table
421 On YaTeX-lpr, @code{%s} in (1) is replaced by the file name of main
422 text, @code{%f} by contents of (2), %t by contents of (3). At these
423 replacements, @code{%b} in (2) is also replaced by the number of beginning
424 page, @code{%e} in (3) is replaced by the number of ending page. But
425 @code{%f} and @code{%t} are ignored when you omit the range of print-out
426 by @kbd{C-u [prefix] tl}.
428 If you want to change this lpr format temporarily, put a command
429 such as follows somewhere in the text:
431 @example
432 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
433 @end example
435 And if you want YaTeX not to ask you the range of printing
436 out, the next example may be helpful.
438 @example
439 %#LPR dvi2ps %s | lpr
440 @end example
442 @node Editing %# notation, , Lpr format, %#notation
443 @comment node-name, next, previous, up
444 @section Editing %# notation
446 To edit @code{%#} notation described above, type
448 @table @kbd
449 @item [prefix] %
450 @dots{} editing %# notation menu
451 @end table
453 @noindent
454 and select one of the entry of the menu as follows.
456 @example
457 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
458 @end example
460 @noindent
461 Type @kbd{!} to edit @code{%#!} entry, @code{b} to enclose the region with
462 @code{%#BEGIN} and @code{%#END}, and @code{l} to edit @code{%#LPR} entry.
463 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are
464 automatically erased.
466 @node Completion, Local dictionaries, %#notation, Top
467 @comment node-name, next, previous, up
468 @chapter Completion
469 @cindex completion
471 YaTeX makes it easy to input the La@TeX{} commands. There are several
472 kinds of completion type, begin-type, section-type, large-type, etc...
474 @menu
475 * Begin-type completion::
476 * Section-type completion::
477 * Large-type completion::
478 * Maketitle-type completion::
479 * Arbitrary completion::
480 * End completion::
481 * Accent completion::
482 * Image completion::
483 * Greek letters completion::
484 @end menu
486 @node Begin-type completion, Section-type completion, Completion, Completion
487 @comment node-name, next, previous, up
488 @section Begin-type completion
489 @cindex begin-type completion
490 @cindex environment
491 @cindex prefix b
493 "Begin-type completion" completes commands of @code{\begin@{env@}} ...
494 @code{\end@{env@}}. All of the begin-type completions begin with this key
495 sequence.
497 @table @kbd
498 @item [prefix] b
499 @dots{} start begin-type completion
500 @end table
502 @noindent
503 An additional key stroke immediately completes a frequently used
504 La@TeX{} @code{\begin@{@}}...@code{\@code{end}@{@}} environment.
506 @table @kbd
507 @item [prefix] b c
508 @dots{} @code{\begin@{center@}...\end@{center@}}
509 @item [prefix] b d
510 @dots{} @code{\begin@{document@}...\end@{document@}}
511 @item [prefix] b D
512 @dots{} @code{\begin@{description@}...\end@{description@}}
513 @item [prefix] b e
514 @dots{} @code{\begin@{enumerate@}...\end@{enumerate@}}
515 @item [prefix] b E
516 @dots{} @code{\begin@{equation@}...\end@{equation@}}
517 @item [prefix] b i
518 @dots{} @code{\begin@{itemize@}...\end@{itemize@}}
519 @item [prefix] b l
520 @dots{} @code{\begin@{flushleft@}...\end@{flushleft@}}
521 @item [prefix] b m
522 @dots{} @code{\begin@{minipage@}...\end@{minipage@}}
523 @item [prefix] b t
524 @dots{} @code{\begin@{tabbing@}...\end@{tabbing@}}
525 @item [prefix] b T
526 @dots{} @code{\begin@{tabular@}...\end@{tabular@}}
527 @item [prefix] b^T
528 @dots{} @code{\begin@{table@}...\end@{table@}}
529 @item [prefix] b p
530 @dots{} @code{\begin@{picture@}...\end@{picture@}}
531 @item [prefix] b q
532 @dots{} @code{\begin@{quote@}...\end@{quote@}}
533 @item [prefix] b Q
534 @dots{} @code{\begin@{quotation@}...\end@{quotation@}}
535 @item [prefix] b r
536 @dots{} @code{\begin@{flushright@}...\end@{flushright@}}
537 @item [prefix] b v
538 @dots{} @code{\begin@{verbatim@}...\end@{verbatim@}}
539 @item [prefix] b V
540 @dots{} @code{\begin@{verse@}...\end@{verse@}}
541 @end table
543 Any other La@TeX{} environments are made by completing-read of the
544 Emacs function.
546 @table @kbd
547 @item [prefix] b SPACE
548 @dots{} begin-type completion
549 @end table
551 @noindent
552 The next message will show up in the minibuffer
554 @example
555 Begin environment(default document):
556 @end example
558 @noindent
559 by typing @kbd{[prefix] b}. Put the wishing environment with completion
560 in the minibuffer, and @code{\begin@{env@}}...\@code{\end@{env@}} will be
561 inserted in the La@TeX{} source text. If the environment you want to put
562 does not exist in the YaTeX completion table, it will be registered in the
563 user completion table. YaTeX automatically saves the user completion
564 table in the user dictionary file at exiting of emacs.
566 At the completion of certain environments, the expected initial entry will
567 automatically inserted such as @code{\item} for @code{itemize}
568 environment. If you don't want the entry, it can be removed by undoing.
570 If you want to enclose some paragraphs which have already been
571 written, invoke the begin-type completion with changing the case
572 of @kbd{b} of key sequence upper(or invoke it with universal argument
573 by @kbd{C-u} prefix).
574 @cindex enclose region into environment
576 The following example encloses a region with `description'
577 environment.
579 @table @kbd
580 @item [prefix] B D
581 @itemx (or ESC 1 [prefix] b D)
582 @itemx (or C-u [prefix] b D)
584 @dots{} begin-type completion for region
585 @end table
587 This enclosing holds good for the completing input by @kbd{[prefix] b
588 SPC}. @kbd{[prefix] B SPC} enclose a region with the environment selected
589 by completing-read.
591 @node Section-type completion, Large-type completion, Begin-type completion, Completion
592 @comment node-name, next, previous, up
593 @section Section-type completion
594 @cindex section-type completion
595 @cindex prefix s
597 "Section-type completion" completes section-type commands which take an
598 argument or more such as @code{\section@{foo@}}. To invoke section-type
599 completion, type
601 @table @kbd
602 @item [prefix] s
603 @dots{} section-type completion
604 @end table
606 @noindent
607 then the prompt
609 @example
610 (C-v for view) \???@{@} (default documentclass):
611 @end example
613 @noindent
614 will show up in the minibuffer. Section-type La@TeX{} commands are
615 completed by space key, and the default value is selected when you
616 type nothing in the minibuffer.
618 Next,
620 @example
621 \section@{???@}:
622 @end example
624 @noindent
625 prompts you the argument of section-type La@TeX{} command. For
626 example, the following inputs
628 @example
629 \???@{@} (default documentclass): section
630 \section@{???@}: Hello world.
631 @end example
633 @noindent
634 will insert the string
636 @example
637 \section@{Hello world.@}
638 @end example
640 in your La@TeX{} source. When you neglect argument such as
642 @example
643 (C-v for view) \???@{@} (default section): vspace*
644 \vspace*@{???@}:
645 @end example
647 YaTeX puts
649 @example
650 \vspace*@{@}
651 @end example
653 @noindent
654 and move the cursor in the braces.
656 In La@TeX{} command, there are commands which take more than one
657 arguments such as @code{\addtolength@{\topmargin@}@{8mm@}}. To complete these
658 commands, invoke section-type completion with universal argument as,
659 @cindex number of argument
661 @example
662 C-u 2 [prefix] s (or ESC 2 [prefix] s)
663 @end example
665 @noindent
666 and make answers in minibuffer like this.
668 @example
669 (C-v for view) \???@{@} (default vspace*): addtolength
670 \addtolength@{???@}: \topmargin
671 Argument 2: 8mm
672 @end example
674 @code{\addtolength} and the first argument @code{\topmargin} can be typed
675 easily by completing read. Since YaTeX also learns the number of
676 arguments of section-type command and will ask that many arguments in
677 future completion, you had better tell the number of arguments to YaTeX at
678 the first completion of the new word. But you can change the number of
679 arguments by calling the completion with different universal argument
680 again.
683 Invoking section-type completion with @code{[Prefix] S} (Capital `S')
684 includes the region as the first argument of section-type command.
686 The section/large/maketitle type completion can work at the
687 prompt for the argument of other section-type completion.
688 Nested La@TeX{} commands are efficiently read with the recursive
689 completion by typing YaTeX's completion key sequence in the
690 minibuffer.
692 @menu
693 * view-sectioning::
694 @end menu
696 @node view-sectioning, , Section-type completion, Section-type completion
697 @comment node-name, next, previous, up
698 @subsection view-sectioning
699 @cindex view sectioning
700 @cindex outline
702 In the minibuffer at the prompt of section-type command completion,
703 typing @kbd{C-v} shows a list of sectioning commands in source text(The
704 line with @code{<<--} mark is the nearest sectioning command). Then,
705 default sectioning command appears in the minibuffer. You can go up/down
706 sectioning command by typing @kbd{C-p}/@kbd{C-n}, can scrolls up/down the
707 listing buffer by @kbd{C-v}/@kbd{M-v}, and can hide sectioning commands
708 under certain level by 0 through 6. Type @kbd{?} in the minibuffer of
709 sectioning prompt for more information.
711 You can generate this listing buffer (@code{*Sectioning Lines*} buffer)
712 by typing
713 @table @kbd
714 @item M-x YaTeX-section-overview
715 @dots{} Generate *Sectioning Lines* buffer
716 @end table
717 @cindex{Generate the listing of sectioning units}
718 from the LaTeX source buffer. In this listing buffer, typing @kbd{u} on
719 the sectioning command shifts up the corresponding sectioning command in
720 source text and @kbd{d} shifts down. After marking lines in the listing
721 buffer, typing @kbd{U} shifts up all sectioning commands in the region,
722 and @kbd{U} shifts down. Here are all the key bindings of
723 @code{*Sectioning Lines*} buffer.
725 @table @kbd
726 @item SPC
727 @dots{} Jump to corresponding source line
728 @item .
729 @dots{} Display corresponding source line
730 @item u
731 @dots{} Shift up a sectioning line
732 @item d
733 @dots{} Shift down a sectioning line
734 @item U
735 @dots{} Shift up sectioning lines in region
736 @item D
737 @dots{} Shift down sectioning lines in region
738 @item 0@dots{}6
739 @dots{} Hide sectioning commands whose level is lower than n
740 @end table
743 @node Large-type completion, Maketitle-type completion, Section-type completion, Completion
744 @comment node-name, next, previous, up
745 @section Large-type completion
747 "Large-type completion" inputs the font or size changing
748 descriptions such as @code{@{\large @}}. When you type
750 @table @kbd
751 @item [prefix] l
752 @dots{} large-type completion
753 @end table
755 @noindent
756 the message in the minibuffer
758 @example
759 @{\??? @} (default large):
760 @end example
762 prompts prompts you large-type command with completing-read. There are
763 TeX commands to change fonts or sizes, @code{it}, @code{huge} and so on,
764 in the completion table.
766 Region-based completion is also invoked by changing the letter after
767 prefix key stroke as @kbd{[prefix] L}. It encloses the region by braces
768 with large-type command.
770 @node Maketitle-type completion, Arbitrary completion, Large-type completion, Completion
771 @comment node-name, next, previous, up
772 @section Maketitle-type completion
773 @cindex maketitle-type completion
775 We call it "maketitle-type completion" which completes commands such as
776 @code{\maketitle}. Take notice that maketitle-type commands take no
777 arguments. Then, typing
779 @table @kbd
780 @item [prefix] m
781 @dots{} maketitle-type completion
782 @end table
784 @noindent
785 begins maketitle-completion. Above mentioned method is true for
786 maketitle-completion, and there are La@TeX{} commands with no
787 arguments in completion table.
789 @node Arbitrary completion, End completion, Maketitle-type completion, Completion
790 @comment node-name, next, previous, up
791 @section Arbitrary completion
792 @cindex arbitrary completion
794 @noindent
795 You can complete certain La@TeX{} command anywhere without typical
796 completing method as described, by typing
798 @table @kbd
799 @item [prefix] SPC
800 @dots{} arbitrary completion
801 @end table
803 @noindent
804 after the initial string of La@TeX{} command that is preceded by @code{\}.
806 @node End completion, Accent completion, Arbitrary completion, Completion
807 @comment node-name, next, previous, up
808 @section End completion
809 @cindex end completion
811 @noindent
812 YaTeX automatically detects the opened environment and close it with
813 \@code{\end@{environment@}}. Though proficient YaTeX users never fail to
814 make environment with begin-type completion, some may begin an environment
815 manually. In that case, type
817 @table @kbd
818 @item [prefix] e
819 @dots{} @code{end} completion
820 @end table
822 @noindent
823 at the end of the opened environment.
825 @node Accent completion, Image completion, End completion, Completion
826 @comment node-name, next, previous, up
827 @section Accent completion
828 @cindex accent completion
830 When you want to write the European accent marks(like @code{\`@{o@}}),
832 @table @kbd
833 @item [prefix] a
834 @dots{} accent completion
835 @end table
837 @noindent
838 shows the menu
840 @example
841 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
842 @end example
844 @noindent
845 in the minibuffer. Chose one character or corresponding numeric,
846 and you will see
848 @example
849 \`@{@}
850 @end example
852 @noindent
853 in the editing buffer with the cursor positioned in braces. Type
854 one more character `o' for example, then
856 @example
857 \`@{o@}
858 @end example
860 @noindent
861 will be completed, and the cursor gets out from braces.
863 @node Image completion, Greek letters completion, Accent completion, Completion
864 @comment node-name, next, previous, up
865 @section Image completion of mathematical sign
866 @cindex image completion
867 @cindex math-mode
868 @cindex sigma
869 @cindex leftarrow
870 @cindex ;
872 Arrow marks, sigma mark and those signs mainly used in the
873 TeX's math environment are completed by key sequences which
874 imitate the corresponding symbols graphically. This completion
875 only works in the math environment. YaTeX automatically detects
876 whether the cursor located in math environment or not, and
877 change the behavior of key strokes @kbd{;} and @kbd{:}.
879 By the way, we often express the leftarrow mark by `<-' for example.
880 Considering such image, you can write @code{\leftarrow} by typing @kbd{<-}
881 after @kbd{;} (semicolon) as a prefix. In the same way,
882 @code{\longleftarrow} (@code{<--}) is completed by typing @kbd{;<--},
883 infinity mark which is imitated by @code{oo} is completed by typing
884 @kbd{;oo}.
886 Here are the sample operations in YaTeX math-mode.
888 @example
889 INPUT Completed La@TeX{} commands
890 ; < - @code{\leftarrow}
891 ; < - - @code{\longleftarrow}
892 ; < - - > @code{\longleftrightarrow}
893 ; o @code{\circ}
894 ; o o @code{\infty}
895 @end example
897 In any case, you can quit from image completion and can move
898 to the next editing operation if the La@TeX{} command you want is
899 shown in the buffer.
901 @code{;} itself in math-environment is inserted by @kbd{;;}. Typing
902 @kbd{TAB} in the midst of image completion shows all of the La@TeX{}
903 commands that start with the same name as string you previously typed in.
904 In this menu buffer, press @kbd{RET} after moving the cursor (by @kbd{n},
905 @kbd{p}, @kbd{b}, @kbd{f}) to insert the La@TeX{} command.
907 To know all of the completion table, type @kbd{TAB} just after @kbd{;}.
908 And here is the sample menu by @kbd{TAB} after @kbd{;<}.
910 @example
911 KEY LaTeX sequence sign
912 < \leq <
913 ~
914 << \ll <<
915 <- \leftarrow <-
916 <= \Leftarrow <=
917 @end example
919 You can define your favorite key-vs-sequence completion table in the
920 Emacs-Lisp variable @code{YaTeX-math-sign-alist-private}. See also
921 @file{yatexmth.el} for the information of the structure of this variable.
923 @node Greek letters completion, , Image completion, Completion
924 @comment node-name, next, previous, up
925 @section Greek letters completion
926 @cindex Greek letters completion
927 @cindex :
929 Math-mode of YaTeX provides another image completion, Greek letters
930 completion in the same method. After prefix @kbd{:}, typing @kbd{a} makes
931 @code{\alpha}, @kbd{b} makes @code{\beta} and @kbd{g} makes @code{\gamma}
932 and so on. First, type @kbd{:TAB} to know all the correspondence of
933 alphabets vs. Greek letters.
935 If you will find @kbd{;} or @kbd{:} doesn't work in correct position of
936 math environment, it may be a bug of YaTeX. Please send me a bug report
937 with the configuration of your text, and avoid it temporarily by typing
938 @kbd{;} or @kbd{:} after universal-argument(@kbd{C-u}) which forces
939 @kbd{;} and @kbd{:} to work as math-prefix.
941 @node Local dictionaries, Commenting out, Completion, Top
942 @comment node-name, next, previous, up
943 @chapter Local dictionaries
944 @cindex local dictionaries
945 @cindex nervous users
947 Tables for completion consist of three dictionaries; `standard
948 dictionary' built in @file{yatex.el}, `user dictionary' for your common
949 private commands, and `local dictionary' that is effective in a certain
950 directory.
952 When you input the command unknown to YaTeX at a completion in the
953 minibuffer, YaTeX asks you with the following prompt;
955 @example
956 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard
957 @end example
959 @noindent
960 In this menu, typing @kbd{u} updates your `user dictionary', @kbd{l}
961 updates your local dictionary, @kbd{n} updates only on-memory dictionary
962 which go through only current Emacs session, and @kbd{d} updates no
963 dictionary and throws the new word away.
965 If you find this switching feature meaningless and bothersome, put the
966 next expression into your @file{~/.emacs}
968 @lisp
969 (setq YaTeX-nervous nil)
970 @end lisp
972 @node Commenting out, Cursor jump, Local dictionaries, Top
973 @comment node-name, next, previous, up
974 @chapter Commenting out
975 @cindex commenting out
976 @cindex prefix >
977 @cindex prefix <
978 @cindex prefix ,
979 @cindex prefix .
981 You may want to comment out some region.
983 @table @kbd
984 @item [prefix] >
985 @dots{} comment out region by %
986 @item [prefix] <
987 @dots{} uncomment region
988 @end table
990 @noindent
991 cause an operation to the region between point and mark.
993 @table @kbd
994 @item [prefix] .
995 @dots{} comment out current paragraph
996 @item [prefix] ,
997 @dots{} uncomment current paragraph
998 @end table
1000 @noindent
1001 comments or uncomments the paragraph where the cursor belongs.
1002 This `paragraph' means the region marked by the function
1003 mark-paragraph, bound to @kbd{ESC h} by default. It is NOT
1004 predictable what will happen when you continuously comment out
1005 some paragraph many times.
1007 You can also comment out an environment between @code{\begin} and
1008 @code{\end}, or a @code{\begin}-\@code{\end} pair themselves, by making the
1009 following key strokes on the line where @code{\begin@{@}} or
1010 @code{\end@{@}} exists.
1012 @table @kbd
1013 @item [prefix] >
1014 @dots{} comment out from \begin to \@code{end}
1015 @item [prefix] <
1016 @dots{} uncomment from \begin to \@code{end}
1017 @end table
1019 @noindent
1020 comment whole the contents of environment. Moreover,
1022 @table @kbd
1023 @item [prefix] .
1024 @dots{} comment out \begin and \@code{end}
1025 @item [prefix] ,
1026 @dots{} uncomment \begin and \@code{end}
1027 @end table
1029 @noindent
1030 (un)comments out only environment declaration: @code{\begin@{@}} and
1031 @code{\end@{@}}. NOTE that even if you intend to comment out some region,
1032 invoking @kbd{[prefix] >} on the @code{\begin},@code{\end} line decides to
1033 work in `commenting out from @code{\begin} to @code{\end}' mode.
1036 @node Cursor jump, Changing and Deleting, Commenting out, Top
1037 @comment node-name, next, previous, up
1038 @chapter Cursor jump
1039 @cindex cursor jump
1040 @cindex prefix g
1043 @menu
1044 * Jump to corresponding object::
1045 * Invoking image processor::
1046 * Jump to main file::
1047 * Jumping around the environment::
1048 * Jumping to last completion position::
1049 @end menu
1051 @node Jump to corresponding object, Invoking image processor, Cursor jump, Cursor jump
1052 @comment node-name, next, previous, up
1053 @section Jump to corresponding object
1055 Typing
1057 @table @kbd
1058 @item [prefix] g
1059 @dots{} go to corresponding object
1060 @end table
1062 @noindent
1063 in a certain place move the cursor to the place corresponding to the
1064 La@TeX{} command of last place. YaTeX recognize the followings as pairs
1065 that have relation each other.
1067 @itemize @bullet
1068 @item @code{\begin@{@}} <-> @code{\end@{@}}
1069 @item @code{%#BEGIN} <-> @code{%#END}
1070 @item On the image-including line -> corresponding viewer or drawing tool
1071 @item @code{\label@{@}} <-> @code{\ref@{@}}
1072 @item @code{\include(\input)} -> included file
1073 @item @code{\bibitem@{@}} <-> @code{\cite@{@}}
1074 @end itemize
1076 On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} moves the
1077 cursor to the corresponding @code{\end},@code{\begin} line, if its partner
1078 really exists. The behavior on the line @code{%#BEGIN} and @code{%#END}
1079 are the same. Note that if the correspondent of @code{label/ref} or
1080 @code{cite/bibitem} exists in another file, that file have to be opened to
1081 make a round trip between references by @kbd{[prefix] g}.
1083 If you type @code{[prefix] g} on the line of @code{\include@{chap1@}},
1084 typically in the main text, YaTeX switches buffer to @file{chap1.tex}.
1086 @table @kbd
1087 @item [prefix] 4 g
1088 @dots{} go to corresponding object in other window
1089 @end table
1091 @noindent
1092 do the same job as @kbd{[prefix] g} except it's done in other window.
1093 Note that this function doesn't work on @code{begin/end},
1094 @code{%#BEGIN/%#END} pairs because it is meaningless.
1096 @node Invoking image processor, Jump to main file, Jump to corresponding object, Cursor jump
1097 @comment node-name, next, previous, up
1098 @section Invoking image processor
1099 @cindex{Drawing tool invocation}
1101 `image-including line' described above means such lines as
1102 @code{\epsfile@{file=foo.ps@}}. If you type @kbd{[prefix] g} on that
1103 line, YaTeX automatically searches source of `foo.ps' and invokes image
1104 viewer or drawing tool correspoinding to it. For example; if you draw
1105 an image foo.obj with Tgif and enclose its product named foo.eps by
1106 @code{\epsfile} command. Typing @kbd{[prefix] g} on @code{\epsfile} line
1107 make YaTeX invoke @code{tgif foo.obj}. How a processor is choosen is as
1108 follows.
1110 @enumerate
1111 @item
1112 If there is an expression matching with one of the pattern
1113 defined in @code{YaTeX-processed-file-regexp-alist}, extract file name
1114 from regexp group surrounded by \\(\\). (Which group corresponds is
1115 written in the cdr part of each list.) If no matches were found, do
1116 nothing.
1117 @item
1118 If there is a pattern as `%PROCESSOR' which is defined in the variable
1119 @code{YaTeX-file-processor-alist}, call that processor giving the
1120 file name with corresponding extension.
1121 @item
1122 If not, check the existence of each file which is supplied the
1123 extension in the cdr part of each list of
1124 @code{YaTeX-file-processor-alist}. If any, call the corresponding
1125 image viewer or drawing tool.
1126 @end enumerate
1128 @node Jump to main file, Jumping around the environment, Invoking image processor, Cursor jump
1129 @comment node-name, next, previous, up
1130 @section Jump to main file
1132 Typing
1134 @table @kbd
1135 @item [prefix] ^
1136 @dots{} visit main file
1137 @item [prefix] 4^
1138 @dots{} visit main file in other buffer
1139 @end table
1140 @cindex prefix ^
1141 @cindex prefix 4 ^
1143 in a sub text switch the buffer to the main text specified by
1144 @code{%#!} notation.
1146 @node Jumping around the environment, Jumping to last completion position, Jump to main file, Cursor jump
1147 @comment node-name, next, previous, up
1148 @section Jumping around the environment
1150 And these are the functions which work on the current La@TeX{}
1151 environment:
1153 @table @kbd
1154 @item M-C-a
1155 @dots{} beginning of environment
1156 @item M-C-e
1157 @dots{} @code{end} of environment
1158 @item M-C-@@
1159 @dots{} mark environment
1160 @end table
1161 @cindex M-C-a
1162 @cindex M-C-e
1163 @cindex M-C-@@
1165 @node Jumping to last completion position, , Jumping around the environment, Cursor jump
1166 @comment node-name, next, previous, up
1167 @section Jumping to last completion position
1169 YaTeX always memorize the position of completion into register @code{3}.
1170 So every time you make a trip to any other part of text other than you are
1171 writing, you can return to the editing paragraph by calling
1172 register-to-point with argument YaTeX-current-position-register, which is
1173 achieved by typing @kbd{C-x j 3}(by default).
1175 @node Changing and Deleting, Filling, Cursor jump, Top
1176 @comment node-name, next, previous, up
1177 @chapter Changing and Deleting
1179 These functions are for change or deletion of La@TeX{} commands
1180 already entered.
1182 @table @kbd
1183 @item [prefix] c
1184 @dots{} change La@TeX{} command
1185 @item [prefix] k
1186 @dots{} kill La@TeX{} command
1187 @end table
1188 @cindex prefix c
1189 @cindex prefix k
1191 @menu
1192 * Changing LaTeX commands::
1193 * Killing LaTeX commands::
1194 @end menu
1196 @node Changing LaTeX commands, Killing LaTeX commands, Changing and Deleting, Changing and Deleting
1197 @comment node-name, next, previous, up
1198 @section Changing La@TeX{} commands
1200 @kbd{[prefix] c} can change the various (La)@TeX{} commands. This can
1201 change the followings.
1202 @itemize @bullet
1203 @item Environment names
1204 @item Section-type commands
1205 @item Argument of section-type commands
1206 @item Optional parameters (enclosed by []) of section-type commands
1207 @item Font/size designators
1208 @item Math-mode's maketitle-type commands that can be inputted with
1209 image completion
1210 @end itemize
1212 Typing @kbd{[prefix] c} on one of above objects you want to change
1213 brings a suitable reading function sometimes with completion.
1214 Note: If you want to change the argument of section-type command that
1215 contains other La@TeX{} commands, type @kbd{[prefix] c} either of
1216 surrounding braces of the argument in order to make YaTeX ignore the
1217 internal La@TeX{} sequences as an object of changing. Anyway, it is
1218 very difficult to know which argument position the cursor belongs because
1219 the La@TeX{} commands can be nested and braces can freely emerge. So keep
1220 it mind to put the cursor on a brace when you are thinking of changing a
1221 complicated argument.
1223 @node Killing LaTeX commands, , Changing LaTeX commands, Changing and Deleting
1224 @comment node-name, next, previous, up
1225 @section Killing La@TeX{} commands
1226 @cindex Killing La@TeX{} commands
1228 @kbd{[prefix] k} kills the La@TeX{} commands sometimes with their
1229 arguments. Following table illustrates the correspondence of the invoking
1230 position and what is killed.
1232 @example
1233 [Invoking position] [action]
1234 \begin, \end line kill \begin,\end pairs
1235 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
1236 on a Section-type command kill section-type command
1237 on a parenthesis kill parentheses
1238 @end example
1240 Note that when killing @code{\begin, \end} or @code{%#BEGIN, %#END} pair,
1241 the lines @code{\begin, \end} or @code{%#BEGIN, %#END} exist will be
1242 killed entirely. So take care not to create any line that contains more
1243 than one @code{\begin} or so.
1245 While all operations above are to kill `containers' which surround some
1246 text, universal argument (@kbd{C-u}) for these commands kills not only
1247 `containers' but also `contents' of them. See below as a sample.
1249 @example
1250 Original text: [prefix] k C-u [prefix] k
1251 Main \footnote@{note@} here. Main note here. Main here.
1252 ~(cursor)
1253 @end example
1255 @node Filling, Updation of includeonly, Changing and Deleting, Top
1256 @comment node-name, next, previous, up
1257 @chapter Filling
1258 @cindex filling
1260 @section Filling an item
1261 @cindex filling an item
1262 @cindex prefix i
1264 To fill a term (descriptive sentences) of @code{\item}, type
1266 @c @table @kbd
1267 @c @item [prefix] i
1268 @c @dots{} fill item
1269 @c @end table
1270 @table @kbd
1271 @item M-q
1272 @dots{} fill item
1273 @end table
1275 @noindent
1276 on that item.
1278 YaTeX uses the value of the variable @code{YaTeX-item-regexp} as the
1279 regular expression to search item header in itemize environment.
1280 If you make a newcommand to itemize terms(e.g. @code{\underlineitem}), put
1282 @lisp
1283 (setq YaTeX-item-regexp
1284 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1285 @end lisp
1286 @cindex YaTeX-item-regexp
1288 in your @file{~/.emacs}. If you are not familiar with regular expression
1289 for Emacs-Lisp, name a newcommand for `itemize' beginning with
1290 @code{\item} such as @code{\itembf}, not @code{\bfitem}.
1292 This function reformats the @code{\item} into `hang-indented' style.
1293 For example:
1295 @example
1296 itemize, enumerate environment:
1298 >\item[foo] `foo' is the typical word for describing an
1299 > arbitrarily written....
1300 description environment:
1301 > \item[bar] When the word `for' is used as an arbitrarily
1302 > word, `bar' is bound to follow it.
1303 @end example
1305 Note that the indent depth of an @code{\item} word and its descriptive
1306 paragraph are the same in latter case. If you want to use different
1307 depth, invoke fill-paragraph at the beginning of non-whitespace
1308 character(see below).
1310 @section Filling paragraph
1311 @cindex Filling paragraph
1312 @cindex M-q
1314 Fill-paragraph is little bit adapted for La@TeX{} sources. It retains from
1315 filling in certain environments where formatting leads to a disaster such
1316 as verbatim, tabular, or so. And it protects @code{\verb} expressions
1317 from being folded (The variable @code{YaTeX-verb-regexp} controls this).
1318 Besides, putting cursor on the first occurrence of non-whitespace
1319 character on a line changes the fill-prefix temporarily to the depth of
1320 the line.
1322 @node Updation of includeonly, What column, Filling, Top
1323 @comment node-name, next, previous, up
1324 @chapter Updation of @code{\includeonly}
1325 @cindex includeonly
1327 When you edit splitting source texts, the notation
1329 @example
1330 \includeonly@{CurrentEditingFileName@}
1331 @end example
1333 @noindent
1334 in the main file reduces the time of typesetting. If you want
1335 to hack other file a little however, you have to rewrite it to
1337 @example
1338 \includeonly@{OtherFileNameYouWantToFix@}
1339 @end example
1341 @noindent
1342 in the main file. YaTeX automatically detects that the current
1343 edited text is not in includeonly list and prompts you
1345 @example
1346 A)dd R)eplace %)comment?
1347 @end example
1349 in the minibuffer. Type @kbd{a} if you want to add the current file name
1350 to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list
1351 by the current file, and type @kbd{%} to comment out the
1352 @code{\includeonly} line.
1354 @node What column, Intelligent newline, Updation of includeonly, Top
1355 @comment node-name, next, previous, up
1356 @chapter What column?
1357 @cindex what column
1358 @cindex complex tabular
1359 @cindex prefix &
1361 We are often get tired of finding the corresponding column in
1362 large tabulars. For example,
1364 @example
1365 \begin@{tabular@}@{|c|c|c|c|c|c|c|c|@}\hline
1366 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1367 Home Addr.&Home Phone\\ \hline
1368 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1369 zzz-www & Japan & 9876-54321 \\
1370 & 2 & \multicolumn@{2@}@{c|@}@{Unknown@}
1371 &&&(???)
1372 \\ \hline
1373 \end@{tabular@}
1374 @end example
1376 Suppose you have the cursor located at @code{(???)} mark, can you tell
1377 which column it is belonging at once? Maybe no. In such case,
1378 type
1380 @table @kbd
1381 @item [prefix] &
1382 @dots{} What column
1383 @end table
1385 @noindent
1386 in that position. YaTeX tells you the column header of the
1387 current field. Since YaTeX assumes the first line of tabular
1388 environment as a row of column headers, you can create a row of
1389 virtual column headers by putting them in the first line and
1390 commenting that line with @code{%}.
1392 @node Intelligent newline, Online help, What column, Top
1393 @comment node-name, next, previous, up
1394 @chapter Intelligent newline
1395 @cindex Intelligent newline
1396 @cindex ESC RET
1397 @cindex M-C-m
1399 At the end of begin-type completion of tabular[*], array, itemize,
1400 enumerate or tabbing environment, or typing
1402 @table @kbd
1403 @item ESC RET
1404 @dots{} Intelligent newline
1405 @end table
1407 @noindent
1408 in these environments inserts the contents corresponding to the current
1409 environment in the next line. (At the begin-type completion, this
1410 contents can be removed by `undo'.) In @code{tabular} environment, for
1411 example, @kbd{ESC RET} inserts the certain number of @code{&} and trailing
1412 @code{\\}, and @code{\hline} if other @code{\hline} is found in backward.
1413 Here are the list of contents vs. environments.
1415 @itemize
1416 @item @code{tabular}, @code{tabular*}, @code{array}
1418 Corresponding number of @code{&} and @code{\\}.
1419 And @code{\hline} if needed.
1421 @item @code{tabbing}
1423 The same number of @code{\>} as @code{\=} in the first line.
1425 @item @code{itemize}, @code{enumerate}, @code{description}, @code{list}
1427 @code{\item} or @code{item[]}.
1428 @end itemize
1430 Note that since this function works seeing the contents of the first
1431 line, please call this after the second line if possible.
1433 If you want to apply these trick to other environments, @code{foo}
1434 environment for example, define the function named
1435 @code{YaTeX-intelligent-newline-foo} to insert corresponding contents.
1436 That function will be called at the beginning of the next line after the
1437 newline is inserted to the current line. Since the function
1438 @code{YaTeX-indent-line} is designed to indent the current line properly,
1439 calling this function before your code to insert certain contents must be
1440 useful. See the definition of the function
1441 @code{YaTeX-intelligent-newline-itemize} as an example.
1443 @node Online help, Browsing file hierarchy, Intelligent newline, Top
1444 @comment node-name, next, previous, up
1445 @chapter Online help
1446 @cindex online help
1447 @cindex prefix ?
1448 @cindex prefix /
1449 @cindex apropos
1450 @cindex keyword search
1452 YaTeX provides you the online help with popular La@TeX{} commands.
1454 Here are the key strokes for the online help.
1456 @table @kbd
1457 @item [prefix] ?
1458 @dots{} Online help
1459 @item [prefix] /
1460 @dots{} Online apropos
1461 @end table
1463 @section Online help
1465 `Online help' shows the documentation for the popular La@TeX{}
1466 commands(defaults to the commands on the cursor) in the next buffer.
1467 There are two help file, `global help' and `private help'. The former
1468 file contains the descriptions on the standard La@TeX{} command and is
1469 specified its name by variable @code{YaTeX-help-file}. Usually, the
1470 global help file should be located in public space (@code{$EMACSEXECPATH}
1471 by default) and should be world writable so that anyone can update it to
1472 enrich its contents. The latter file contains descriptions on
1473 non-standard or personal command definitions and is specified by
1474 @code{YaTeX-help-file-private}. This file should be put into private
1475 directory.
1477 @section Online apropos
1479 `Online apropos' is an equivalent of GNU Emacs's apropos. It
1480 shows all the documentations that contains the keyword entered by
1481 the user.
1483 @section When no descriptions are found...
1485 If there is no description on a command in help files, YaTeX
1486 requires you to write a description on that command. If you are
1487 willing to do, determine which help file to add and write the
1488 description on it referring your manual of (La)TeX. Please send
1489 me your additional descriptions if you describe the help on some
1490 standard commands. I might want to include it in the next
1491 distribution.
1493 @node Browsing file hierarchy, Cooperation with other packages, Online help, Top
1494 @comment node-name, next, previous, up
1495 @chapter Browsing file hierarchy
1496 @cindex hierarchy
1497 @cindex browsing
1499 When you are editing multi-file source, typing
1501 @table @kbd
1502 @item [prefix] d
1503 @dots{} browse file hierarchy
1504 @end table
1506 @noindent
1507 asks you the parent-most file (which may be defaulted) and displays the
1508 documentation hierarchy in the next window. In this buffer, the following
1509 commands are available.
1511 @table @kbd
1512 @item n
1513 @dots{} move to the next line and show its contents
1514 @item p
1515 @dots{} move to the previous line and show its contents
1516 @item N
1517 @dots{} move to the next file in the same inclusion level
1518 @item P
1519 @dots{} move to the previous file in the same inclusion level
1520 @item j
1521 @dots{} move to the next line
1522 @item k
1523 @dots{} move to the previous line
1524 @item u
1525 @dots{} move to the parent file
1526 @item .
1527 @dots{} show the current files contents in the next window
1528 @item SPC
1529 @dots{} scroll up the current file window
1530 @item DEL, b
1531 @dots{} scroll down the current file window
1532 @item <
1533 @dots{} show the beginning of the current file
1534 @item >
1535 @dots{} show the end of the current file
1536 @item >
1537 @dots{} return to the previous postion after @kbd{<} or @kbd{>}
1538 @item RET, g
1539 @dots{} open the current file in the next window
1540 @item mouse-2
1541 @dots{} same as RET(available only with window system)
1542 @item o
1543 @dots{} other window
1544 @item 1
1545 @dots{} delete other windows
1546 @item -
1547 @dots{} shrink hierarchy buffer window
1548 @item +
1549 @dots{} enlarge hierarchy buffer window
1550 @item ?
1551 @dots{} describe mode
1552 @item q
1553 @dots{} quit
1554 @end table
1556 Note that operations on the file contents in the next window do not work
1557 correctly when you close the corresponding file.
1559 @node Cooperation with other packages, Customizations, Browsing file hierarchy, Top
1560 @comment node-name, next, previous, up
1561 @chapter Cooperation with other packages
1563 YaTeX works better with other brilliant packages.
1565 @section gmhist
1566 @cindex gmhist
1567 @cindex command history
1568 @cindex minibuffer history
1570 When you are loading @file{gmhist.el} and @file{gmhist-mh.el}, you can
1571 use independent command history list at the prompt of preview command
1572 (@kbd{[prefix] tp}) and print command (@kbd{[prefix] tl}). On each
1573 prompt, you can enter the previous command line string repeatedly by
1574 typing @kbd{M-p}.
1576 @section min-out
1577 @cindex min-out
1579 @file{min-out}, the outline minor mode, can be used in yatex-mode
1580 buffers. If you want to use it with YaTeX, please refer the
1581 file @file{yatexm-o.el} as an example.
1583 @node Customizations, Etcetera, Cooperation with other packages, Top
1584 @comment node-name, next, previous, up
1585 @chapter Customizations
1586 @cindex customizations
1588 You can customize YaTeX by setting Emacs-Lisp variables and by making
1589 add-in functions.
1591 @menu
1592 * Lisp variables::
1593 * Add-in functions::
1594 * Add-in generator::
1595 @end menu
1597 @node Lisp variables, Add-in functions, Customizations, Customizations
1598 @comment node-name, next, previous, up
1599 @section Lisp variables
1600 @cindex customizable variables
1602 You can change the key assignments or make completion more comfortable
1603 by setting the values of various variables which control the movement of
1604 yatex-mode.
1606 For example, if you want to change the prefix key stroke from @kbd{C-c}
1607 to any other sequence, set YaTeX-prefix to whatever you want to use. If
1608 you don't want to use the key sequence @kbd{C-c letter} which is assumed
1609 to be the user reserved sequence in Emacs world, set
1610 @code{YaTeX-inhibit-prefix-letter} to @code{t}, and all of the default key
1611 bind of @kbd{C-c letter} will turn to the corresponding @kbd{C-c C-letter}
1612 (but the region based completions that is invoked with @kbd{C-c
1613 Capital-letter} remain valid, if you want to disable those bindings, set
1614 that variable to 1 instead of @code{t}).
1616 @menu
1617 * All customizable variables::
1618 * Sample definitions::
1619 * Hook variables::
1620 * Hook file::
1621 @end menu
1623 @node All customizable variables, Sample definitions, Lisp variables, Lisp variables
1624 @comment node-name, next, previous, up
1625 @subsection All customizable variables
1626 @cindex all customizable variables
1628 Here are the customizable variables of yatex-mode. Each value setq-ed
1629 in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is
1630 neglected. Parenthesized contents stands for the default value. When you
1631 are to change some of these variables, see more detailed documentation of
1632 the variable by @kbd{M-x describe-variable}.
1634 @defvar YaTeX-prefix
1635 Prefix key stroke (@kbd{C-c})
1636 @end defvar
1638 @defvar YaTeX-inhibit-prefix-letter
1639 Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter} (@code{nil})
1640 @end defvar
1642 @defvar YaTeX-fill-prefix
1643 Fill-prefix used in yatex-mode (@code{nil})
1644 @end defvar
1646 @defvar YaTeX-user-completion-table
1647 Name of user dictionary where learned completion table will be stored.
1648 (@code{"~/.yatexrc"})
1649 @end defvar
1651 @defvar tex-command
1652 La@TeX{} typesetter command (@code{"latex"})
1653 @end defvar
1655 @defvar dvi2-command
1656 Preview command (@code{"xdvi -geo +0+0 -s 4"})
1657 @end defvar
1659 @defvar dviprint-command-format
1660 Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"})
1661 @end defvar
1663 @defvar dviprint-from-format
1664 Start page format of above %f. %b will turn to start page (@code{"-f %b"})
1665 @end defvar
1667 @defvar dviprint-to-format
1668 End page format of above %t. %e will turn to @code{end} page (@code{"-t %e"})
1669 @end defvar
1671 @defvar makeindex-command
1672 Default makeindex command (@code{"makeindex"} (@code{"makeind"} on MS-DOS))
1673 @end defvar
1675 @defvar YaTeX-need-nonstop
1676 Put @code{\nonstopmode@{@}} or not (@code{nil})
1677 @end defvar
1679 @defvar latex-warning-regexp
1680 Regular expression of warning message latex command puts out
1681 (@code{"line.* [0-9]*"})
1682 @end defvar
1684 @defvar latex-error-regexp
1685 Regular expression of error message (@code{"l\\.[1-9][0-9]*"})
1686 @end defvar
1688 @defvar latex-dos-emergency-message
1689 Message latex command running on DOS puts at abort (@code{"Emergency stop"})
1690 @end defvar
1692 @defvar YaTeX-item-regexp
1693 Regular expression of item command (@code{"\\\\item"})
1694 @end defvar
1696 @defvar YaTeX-verb-regexp
1697 Regexp of verb family. Omit \\\\. (@code{"verb\\*?\\|path"})
1698 @end defvar
1700 @defvar YaTeX-nervous
1701 T for using local dictionary (@code{t})
1702 @end defvar
1704 @defvar YaTeX-sectioning-regexp
1705 Regexp of La@TeX{} sectioning command
1706 (@code{"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"})
1707 @end defvar
1709 @defvar YaTeX-fill-inhibit-environments
1710 Inhibit fill in these environments
1711 (@code{'("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" "verbatim" "verbatim*")})
1712 @end defvar
1714 @defvar YaTeX-uncomment-once
1715 T for deleting all preceding @code{%} (@code{nil})
1716 @end defvar
1718 @defvar YaTeX-close-paren-always
1719 T for always close all parenthesis automatically, @code{nil} for only eol
1720 (@code{t})
1721 @end defvar
1723 @defvar YaTeX-auto-math-mode
1724 Switch math-mode automatically (@code{t})
1725 @end defvar
1727 @defvar YaTeX-math-key-list-private
1728 User defined alist, math-mode-prefix vs completion alist
1729 used in image completion (@code{nil}). See @file{yatexmth.el}
1730 for the information about how to define a completion alist.
1731 @end defvar
1733 @defvar YaTeX-default-pop-window-height
1734 Initial height of typesetting buffer when one-window.
1735 Number for the lines of the buffer, numerical string for
1736 the percentage of the screen-height. @code{nil} for half height (10)
1737 @end defvar
1739 @defvar YaTeX-help-file
1740 Global online help file name (@file{$doc-directory/../../site-lisp/YATEXHLP.eng})
1741 @end defvar
1743 @defvar YaTeX-help-file-private
1744 Private online help file name (@file{"~/YATEXHLP.eng"})
1745 @end defvar
1747 @defvar YaTeX-no-begend-shortcut
1748 Disable [prefix] b ?? shortcut (@code{nil)}
1749 @end defvar
1751 @defvar YaTeX-hilit-pattern-adjustment-private
1752 List of the list that contain the regular expression and the symbol of
1753 logical meaning of the string that matches the pattern. See also the
1754 value from @code{(assq 'yatex-mode hilit-patterns-alist)} and the value of
1755 @code{YaTeX-hilit-pattern-adjustment-default} (and even the document of
1756 hilit19.el).
1757 @end defvar
1759 @defvar YaTeX-sectioning-level
1760 Alist of LaTeX's sectioning command vs its height.
1761 @end defvar
1763 @defvar YaTeX-hierarchy-ignore-heading-regexp
1764 @code{YaTeX-display-hierarchy} searches for sectioning command first, and
1765 comment line secondary as a file headings. In latter case, ignore lines
1766 that match with regular expression of this variable. Default value of
1767 this variable is RCS header expressions and mode specifying line `-*- xxxx
1768 -*'.
1769 @end defvar
1771 @defvar YaTeX-skip-default-reader
1772 Non-nil for this variable skips the default argument reader of
1773 section-type command when add-in function for it is not defined
1774 (@code{nil})
1775 @end defvar
1777 @defvar YaTeX-create-file-prefix-g
1778 When typing @kbd{prefix g} on the @code{\include} line,
1779 open the target file even if the file doesn't exist (@code{nil})
1780 @end defvar
1782 @defvar YaTeX-simple-messages
1783 Simplyfy messages of various completions (@code{nil})
1784 @end defvar
1786 @defvar YaTeX-hilit-sectioning-face
1787 When hilit19 and yatex19 is active, YaTeX colors the sectioning commands.
1788 This variable specifies the foreground and background color of
1789 @code{\part} macro. The default value is @code{'(yellow/dodgerblue
1790 yellow/slateblue)}. The first element of this list is for the screen when
1791 @code{hilit-background-mode} is @code{'light}, and the second element is
1792 for @code{'dark}. You should specify both color as `forecolor/backcolor'.
1793 @end defvar
1795 @defvar YaTeX-hilit-sectioning-attenuation-rate
1796 When color mode, this variable specifies how much attenuate the color
1797 density of @code{\subparagraph} compared with that of @code{\chapter}
1798 (@code{'(15 40)}) See also @code{YaTeX-hilit-sectioning-face}.
1799 @end defvar
1801 @defvar YaTeX-use-AMS-LaTeX
1802 If you use AMS-LaTeX, set to @code{t} (@code{nil})
1803 @end defvar
1805 @defvar YaTeX-use-LaTeX2e
1806 If you use LaTeX2e, set to @code{t} (@code{t})
1807 @end defvar
1809 @defvar YaTeX-template-file
1810 File name which is automatically inserted at creation
1811 (@code{~/work/template.tex})
1812 @end defvar
1814 @defvar YaTeX-search-file-from-top-directory
1815 Non-nil means to search input-files from the directory where main file exists
1816 (@code{t})
1817 @end defvar
1819 @defvar YaTeX-use-font-lock
1820 Use font-lock to fontify buffer or not (@code{(featurep 'font-lock)}
1821 @end defvar
1823 @defvar YaTeX-use-hilit19
1824 Use hilit19 to highlight buffer or not (@code{(featurep 'hilit19)}
1825 @end defvar
1827 @defvar YaTeX-use-italic-bold
1828 YaTeX tries to search italic, bold fontsets or not
1829 (@code{t} if Emacs-20 or later). This variable is effective only when
1830 font-lock is used.
1831 (@code{(featurep 'hilit19)}
1832 @end defvar
1835 @node Sample definitions, Hook variables, All customizable variables, Lisp variables
1836 @comment node-name, next, previous, up
1837 @subsection Sample definitions
1838 @cindex prefix key stroke
1839 @cindex fill-prefix
1841 For instance, to change the prefix key stroke to @kbd{ESC}, and name of
1842 the user dictionary @file{~/src/emacs/yatexrc}, and set @code{fill-prefix}
1843 to single TAB character, add the following @code{setq} to @file{~/.emacs}.
1845 @lisp
1846 (setq YaTeX-prefix "\e"
1847 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1848 YaTeX-fill-prefix " ")
1849 @end lisp
1851 @node Hook variables, Hook file, Sample definitions, Lisp variables
1852 @comment node-name, next, previous, up
1853 @subsection Hook variables
1854 @cindex hook variables
1856 More customizations will be done by the hook-function defined in
1857 hook-variable @code{yatex-mode-hook}. This is useful to define a shortcut
1858 key sequence to enter some environments other than @code{document} and
1859 @code{enumerate} etc. The following statement defines @code{[prefix] ba}
1860 to enter @code{\begin@{abstract@}} ... @code{=end@{abstract@}}
1861 immediately.
1863 @lisp
1864 (setq yatex-mode-hook
1865 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1866 @end lisp
1868 You should use functions @code{YaTeX-define-key}, or
1869 @code{YaTeX-define-begend-key} to define all the key sequences of
1870 yatex-mode.
1872 @node Hook file, , Hook variables, Lisp variables
1873 @comment node-name, next, previous, up
1874 @subsection Hook file
1875 @cindex hook file
1877 You can stuff all of YaTeX related expressions into a file named
1878 @file{yatexhks.el} if you have a lot of codes. YaTeX automatically load
1879 this file at the initialization of itself. Using @file{yatexhks.el}
1880 makes @code{yatex-mode-load-hook} unnecessary.
1882 @node Add-in functions, Add-in generator, Lisp variables, Customizations
1883 @comment node-name, next, previous, up
1884 @section Add-in functions
1885 @cindex add-in functions
1886 @cindex yatexadd.el
1888 You can easily define a function to input detailed arguments
1889 with completion according to La@TeX{} environments or commands.
1891 @c @node What is add-in functions?, , Add-in functions, Add-in functions
1892 @comment node-name, next, previous, up
1893 @subsection What is add-in functions?
1894 @cindex tabular
1896 When you input @code{tabular} environment, don't you think ``I want
1897 YaTeX to complete its argument toward my favorite one such as
1898 @code{@{|c|c|c|@}}...''? Yes, you can define the function to complete
1899 arguments for any environment and any La@TeX{} commands.
1901 @subsection Procedure
1903 Here is the procedure to define add-in functions.
1904 @enumerate
1905 @item
1906 Define the function
1907 @item
1908 Put the function into @file{yatexhks.el}
1909 @end enumerate
1911 @menu
1912 * How the add-in function works::
1913 * How the function is called::
1914 * Useful functions for creating add-in::
1915 * Contribution::
1916 @end menu
1918 @node How the add-in function works, How the function is called, Add-in functions, Add-in functions
1919 @comment node-name, next, previous, up
1920 @subsection How the add-in function works
1922 There are two kinds of add-in. @dfn{Option add-in} returns the
1923 La@TeX{}'s optional parameters such as optional strings after
1924 @code{\begin@{ENV@}}, optional strings between a section-type command
1925 and its first argument, and optional strings just after type
1926 maketitle-type command. The following illustrates the name of add-in
1927 functions, where underlined strings are generated by add-in functions.
1929 @display
1930 \begin@{table@}[ht] (Function name: YaTeX:table)
1931 ~~~~
1932 \put(100,200)@{@} (Function name: YaTeX:put)
1933 ~~~~~~~~~
1934 \sum_@{i=0@}^@{n@} (Function name: YaTeX:sum)
1935 ~~~~~~~~~~
1936 @end display
1938 Obviously, the function name is decided by concatenating the prefix
1939 `YaTeX:' and La@TeX{} command's name.
1941 Another add-in type is @dfn{argument add-in}, which completes arguments
1942 for section-type commands.
1944 @display
1945 \newcommand@{\foo@}@{bar@} (Function name: YaTeX::newcommand)
1946 ~~~~ ~~~
1947 @end display
1949 When the section-type command is inputted, the function named by
1950 concatenating `YaTeX::' and section-type command, is called automatically
1951 with an integer argument which indicates which argument of section-type
1952 command is being read. Thus the add-in should determine the
1953 job referring the value of its argument.
1955 @menu
1956 * Defining option-add-in::
1957 * Defining argument-add-in::
1958 @end menu
1960 @node Defining option-add-in, Defining argument-add-in, How the add-in function works, How the add-in function works
1961 @comment node-name, next, previous, up
1962 @subsubsection Defining `option add-in'
1964 If you want @code{@{|c|c|c|@}} for all @code{tabular} environment,
1966 @lisp
1967 (defun YaTeX:tabular ()
1968 "@{|c|c|c|@}")
1969 @end lisp
1971 @noindent
1972 is enough. If you want more complicated format, define as below.
1974 @lisp
1975 (defun YaTeX:tabular ()
1976 "@{@@@{\\vrule width 1pt\\ @}|||@@@{\\ \\vrule width 1pt@}@}")
1977 @end lisp
1979 @noindent
1980 Note that the character @code{\} must be described as @code{\\} in
1981 Emacs-Lisp. The next example reads the tabular format from keyboard.
1982 @lisp
1983 (defun YaTeX:tabular ()
1984 (concat "@{" (read-string "Rule: ") "@}"))
1985 @end lisp
1987 @node Defining argument-add-in, , Defining option-add-in, How the add-in function works
1988 @comment node-name, next, previous, up
1989 @subsubsection Defining `argument add-in'
1991 This section describes how to define the add-in function for
1992 @code{\newcommand}.
1994 The first argument of @code{\newcommand} begins always with @code{\}.
1995 The second argument is usually so complex that we can not edit them in the
1996 minibuffer. Here is the created function considering this.
1998 @lisp
1999 (defun YaTeX::newcommand (n) ;n is argument position
2000 (cond
2001 ((= n 1) ;1st argument is macro name
2002 (read-string "Command: " "\\")) ;initial input `\'
2003 ((= n 2) "") ;do nothing when reading arg#2
2004 (t nil)))
2005 @end lisp
2007 Note that when the `argument add-in' function return `nil', normal
2008 argument reader will be called.
2010 @node How the function is called, Useful functions for creating add-in, How the add-in function works, Add-in functions
2011 @comment node-name, next, previous, up
2012 @subsection How the function is called
2014 YaTeX calls the add-in functions for specified begin-type, section-type,
2015 and maketitle-type command, if any. `Option add-in' functions for
2016 begin-type are called when @code{\begin@{ENV@}} has been inserted,
2017 functions for section-type are called just before input of the first
2018 argument, and functions for maketitle-type is called after maketitle-type
2019 command has been inserted. `Argument add-in' functions are called at each
2020 entry of arguments for section-type commands.
2022 @node Useful functions for creating add-in, Contribution, How the function is called, Add-in functions
2023 @comment node-name, next, previous, up
2024 @subsection Useful functions for creating add-in
2026 Many add-in functions for typical La@TeX{} commands are defined in
2027 @file{yatexadd.el}. Those are also useful as references. Here are the
2028 short descriptions on useful functions, where [F] means function, [A]
2029 means arguments, [D] means description.
2031 @table @kbd
2032 @item [F]
2033 YaTeX:read-position
2034 @itemx [A]
2035 Character list which can show up in the brackets
2036 @itemx [D]
2037 Return the location specifier such as `[htb]'. When
2038 nothing is entered, omit [] itself. If the possible characters
2039 are "htbp", call this function as
2040 @code{(YaTeX:read-position "htbp")}
2042 @item [F]
2043 YaTeX:read-coordinates
2044 @itemx [A]
2045 Base prompt, X-axis prompt, Y-axis prompt (each optional)
2046 @itemx [D]
2047 Read the coordinates with the prompt ``BasePrompt X-axisPrompt:'' for
2048 X-axis, ``BasePrompt Y-axisPrompt:'' for Y-axis, and return it in the form
2049 of ``(X,Y)''. The default prompts are @code{Dimension}, @code{X},
2050 @code{Y} respectively.
2052 @item [F]
2053 YaTeX:check-completion-type
2054 @itemx [A]
2055 One of the symbols: 'begin, 'section, or 'maketitle
2056 @itemx [D]
2057 Check the current completion type is specified one and cause error if
2058 not. The variable @code{YaTeX-current-completion-type} holds the symbol
2059 according to the current completion type.
2060 @end table
2062 @node Contribution, , Useful functions for creating add-in, Add-in functions
2063 @comment node-name, next, previous, up
2064 @subsection Contribution
2066 If you make your own pretty function and you let it be in public, please
2067 send me the function. I'm going to include it in the next release.
2069 @node Add-in generator, , Add-in functions, Customizations
2070 @comment node-name, next, previous, up
2071 @section Add-in generator
2073 First, don't forget to read the section of add-in functions @ref{Add-in
2074 functions}. If you easily understand how to define them, there's no need
2075 to read this section. But being not familiar with Emacs-Lisp, when you
2076 don't have clear idea what to do, this section describes how to get YaTeX
2077 make add-in function.
2079 There are two methods of generation. One is for fully interactive
2080 generator for beginners and another requires little knowledge of
2081 Emacs-Lisp.
2083 @subsection Generator for beginners
2084 The former generator is called by
2085 @center @kbd{M-x YaTeX-generate}
2087 @noindent
2088 strokes. All you have to do is follow the guidances. Defying them may cases
2089 the disaster (I wonder what is it???). So when you make some mistake, it
2090 is recommendable to type @kbd{C-g} and start afresh.
2092 @subsection Simple generator
2094 The latter generator is invoked by the next sequence.
2095 @center @kbd{M-x YaTeX-generate-simple}
2096 This generator can make both ``option add-in'' and ``argument add-in''
2097 (@emph{refer the section add-in functions}
2098 @ref{How the add-in function works}), whereas @code{YaTeX-generate}
2099 cannot make ``argument addin''.
2101 For example, assume you have the LaTeX command as follows.
2103 @example
2104 \epsinput[t](250,50)@{hoge.eps@}@{plain@}@{Picture of foo@}
2105 (A) (B) (1) (2) (3)
2106 (A)Optional parameter to specify the position
2107 One of t(top), b(bottom), l(left), r(right)
2108 (B)Maximum size of frame
2109 (1)1st argument is filename of EPS file
2110 (2)2nd argument indicates
2111 plain do nothing
2112 frame make frame around image
2113 dframe make double-frame around image
2114 for included EPS file.
2115 (3)Caption for the picture
2116 @end example
2118 Now get start with generation. Typing @kbd{M-x YaTeX-generate-simple}
2119 brings the prompt:
2120 @display
2121 (O)ption? (A)rgument?
2122 @end display
2124 @subsubsection Generating ``option add-in''
2125 @cindex option add-in
2127 Since (A), (B) above are optional argument, all we have to do to
2128 complete them is define the option add-in for them. Let's generate the
2129 function to complete (A).
2131 @display
2132 M-x YaTeX-generate-simple RET
2133 epsinput RET
2135 @end display
2137 @noindent
2138 Typing as above leads the next prompt.
2140 @display
2141 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
2142 @end display
2144 @noindent
2145 This asks that ``Which type is the completion style of 1st argument?''.
2146 Here are the possible completion style.
2148 @table @code
2149 @item String
2150 read plain string
2151 @item Complete
2152 read with completion
2153 @item File
2154 read file name
2155 @item Option
2156 read optional string (if string omitted, omit [] too)
2157 @item Position
2158 read positional option (like [htbp])
2159 @item Coord.
2160 read coordinates
2161 @item Quit
2162 quit from generating
2163 @end table
2165 Since (A) is the optional argument to specify the location of included
2166 EPS file, the completion style is @code{Position}, and the possible
2167 characters are t, b, l, and r. To tell these information to generator,
2168 operate as follows.
2170 @display
2171 Read type(1).... p
2172 Acceptable characters: tblr RET
2173 @end display
2175 (B) is coordinate. So its completion style is coOrd. We want a prompt
2176 meaning ``Maximum size'' when completion.
2178 @display
2179 Read type(2).... o
2180 Prompt for coordinates: Max size RET
2181 @end display
2183 That's all for optional argument. Select quit.
2185 @display
2186 Read type(3).... q
2187 @end display
2189 Then the generated option add-in function for \epsinput will be shown in
2190 the next window.
2192 @subsubsection Generating ``argument add-in''
2193 @cindex argument add-in
2195 Next, create the argument add-in. The arguments for \epsinput are EPS
2196 file name, framing style, and caption string in sequence.
2198 @display
2199 M-x YaTeX-generate-simple RET
2200 epsinput RET
2202 @end display
2204 Above key strokes bring the prompt that asks the number of argument.
2205 Answer it with 3.
2207 @display
2208 How many arguments?: 3 RET
2209 @end display
2211 Then the generator asks the completion style and prompt for completion.
2212 Answer them. @kbd{f} for FileName and prompt string.
2214 @display
2215 Read type(1).... f
2216 Prompt for argument#1 EPS file name RET
2217 @end display
2219 The second argument is one of selected symbol. So the completion type
2220 is @code{Completion}.
2222 @display
2223 Read type(2).... c
2224 Prompt for argument#2 Include style RET
2225 @end display
2227 Then all the candidates ready to be read. Type single RET after
2228 entering all.
2230 @display
2231 Item[1](RET to exit): plain RET
2232 Item[2](RET to exit): frame RET
2233 Item[3](RET to exit): dframe RET
2234 Item[4](RET to exit): RET
2235 @end display
2237 The following prompt asks whether the entered string must belong to
2238 candidates or not. In this case, since the argument must be one of
2239 @code{plain}, @code{frame}, and @code{dframe}, type @code{y}.
2241 @display
2242 Require match? (y or n) y
2243 @end display
2245 The last argument is the caption string for which any completion is
2246 needed.
2248 @display
2249 Read type(3).... s
2250 Prompt for argument#3 Caption RET
2251 default: Figure of RET
2252 @end display
2254 Finally we'll get the argument add-in in the next window.
2256 @subsection Contribution
2258 If you get your own pretty function and you let it be in public, please
2259 steel yourself in the happy atmosphere and do not send me the function.
2260 I do know it is not fine because it is generated by yatexgen:-p.
2262 @node Etcetera, Copying, Customizations, Top
2263 @comment node-name, next, previous, up
2264 @chapter Etcetera
2266 The standard completion tables provided in @file{yatex.el} contain a
2267 few La@TeX{} commands I frequently use. This is to lessen the key
2268 strokes to complete entire word, because too many candidates
2269 rarely used often cause too many hits. Therefore always try to
2270 use completion in order to enrich your dictionary, and you will
2271 also find `Wild Bird' growing suitable for your La@TeX{} style.
2273 The package name `Wild Bird' is the English translation of Japanese
2274 title `Yachou', which is a trick on words of Japanese.
2276 @node Copying, , Etcetera, Top
2277 @comment node-name, next, previous, up
2278 @chapter Copying
2280 This program is distributed as a free software. You can
2281 redistribute this software freely but with NO warranty to anything
2282 as a result of using this software. However, any reports and
2283 suggestions are welcome as long as I feel interests in this
2284 software. My possible e-mail address is `yuuji@@yatex.org'.
2285 (up to Dec.2000 at least) And there is mailing list for YaTeX.
2286 Although the common language is Japanese, questions in English will be
2287 welcome. To join the ML, send the mail whose subject is `append' to
2288 the address `yatex@@yatex.org. If you have some
2289 question, please ask to `yatex-admin@@yatex.org'.
2291 The specification of this software will be surely modified
2292 (depending on my feelings) without notice :-p.
2295 @flushright
2296 HIROSE Yuuji
2297 @end flushright
2298 @bye
2300 Local variables:
2301 mode: texinfo
2302 fill-prefix: nil
2303 fill-column: 74
2304 End: