yatex

view docs/yatexe.tex @ 60:9e08ed569d80

yahtml: change keystroke of calling browser to [prefix] t p yahtml: don't count <a>tag contents as column in <pre> yahtml: support [prefix] c against src="", align="". and many many more
author yuuji
date Fri, 24 Jan 1997 09:04:06 +0000
parents 48ac97a6b6ce
children df0bf1465254
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 @syncodeindex vr cp
9 @end iftex
11 @titlepage
12 @sp 10
13 @center
14 @subtitle Yet Another tex-mode for emacs
15 @title Wild Bird
16 @subtitle // YaTeX //
17 @author @copyright{} 1991-1996 by HIROSE, Yuuji [yuuji@@ae.keio.ac.jp]
18 @end titlepage
20 @node Top, What is YaTeX?, (dir), (dir)
21 @comment node-name, next, previous, up
22 @cindex Demacs
23 @cindex Mule
24 @cindex LaTeX
25 @cindex YaTeX
27 @menu
28 * What is YaTeX?::
29 * Main features:: What YaTeX can do
30 * Installation:: Guide to install
31 * Typesetting:: Call typesetting processes
32 * %# notation:: Quick notation of controlling YaTeX
33 * Completion:: Input LaTeX commands with completion
34 * Local dictionaries:: Directory dependent completion
35 * Commenting out:: Commenting/uncommenting text
36 * Cursor jump:: Jumping to related position
37 * Changing and Deleting:: Changing/deleting certain unit of text
38 * Filling:: Filling an item or paragraph
39 * Updation of includeonly:: Free from maintaining includeonly
40 * What column:: Check what table-column the cursor belong
41 * Intelligent newline:: Guess requisites of new line
42 * Online help:: On-line documentation of LaTeX
43 * Browsing file hierarchy:: Walking through file hierarchy
44 * Cooperation with other packages:: Work well with gmhist, min-out
45 * Customizations:: How to breed `Wild Bird'
46 * Etcetera:: YaTeX is acquisitive.
47 * Copying:: Redistribution
49 --- The Detailed Node Listing ---
51 Typesetting
53 * Calling typesetter::
54 * Calling previewer::
55 * Printing out::
57 %# notation
59 * Changing typesetter::
60 * Static region for typesetting::
61 * Lpr format::
62 * Editing %# notation::
64 Completion
66 * Begin-type completion::
67 * Section-type completion::
68 * Large-type completion::
69 * Maketitle-type completion::
70 * Arbitrary completion::
71 * End completion::
72 * Accent completion::
73 * Image completion::
74 * Greek letters completion::
76 Section-type completion
78 * view-sectioning::
80 Changing and Deleting
82 * Changing La@TeX{} commands::
83 * Killing La@TeX{} commands::
85 Customizations
87 * Lisp variables::
88 * Add-in functions::
89 * Add-in generator::
91 Lisp variables
93 * All customizable variables::
94 * Sample definitions::
95 * Hook variables::
96 * Hook file::
98 Procedure
100 * How the add-in function works::
101 * How the function is called::
102 * Useful functions for creating add-in::
103 * Contribution::
105 How the add-in function works
107 * Defining `option add-in'::
108 * Defining `argument add-in'::
109 @end menu
111 @node What is YaTeX?, Main features, Top, Top
112 @comment node-name, next, previous, up
113 @chapter What is YaTeX?
115 YaTeX automates typesetting and previewing of LaTeX and enables
116 completing input of LaTeX mark-up command such as
117 @code{\begin@{@}}..@code{\end@{@}}.
119 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
120 Language Enhancement to GNU Emacs), and latex on DOS.
122 @node Main features, Installation, What is YaTeX?, Top
123 @comment node-name, next, previous, up
124 @chapter Main features
126 @itemize
127 @item Invocation of typesetter, previewer and related programs(@kbd{C-c t})
128 @item Typesetting on static region which is independent from point
129 @item Semiautomatic replacing of @code{\includeonly}
130 @item Jumping to error line(@kbd{C-c '})
131 @item Completing-read of La@TeX{} commands such as @code{\begin@{@}},
132 @code{\section} etc.
133 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m})
134 @item Enclosing text into La@TeX{} environments or commands
135 (@kbd{C-u} @var{AboveKeyStrokes})
136 @item Displaying the structure of text at entering sectioning commands
137 @item Lump shifting of sectioning commands (@ref{view-sectioning})
138 @item Learning unknown/new La@TeX{} commands for the next completion
139 @item Argument reading with a guide for complicated La@TeX{} commands
140 @item Generating argument-readers for new/unsupported commands(@file{yatexgen})
141 @item Quick changing or deleting of La@TeX{} commands(@kbd{C-c c}, @kbd{C-c k})
142 @item Jumping from and to inter-file, begin<->end, ref<->label(@kbd{C-c g})
143 @item Blanket commenting out or uncommenting
144 (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .})
145 @item Easy input of accent mark, math-mode's commands and Greek letters
146 (@kbd{C-c a}, @kbd{;}, @kbd{:})
147 @item Online help for the popular La@TeX{} commands
148 (@kbd{C-c ?}, @kbd{C-c /})
149 @item Document files hierarchy browser (@kbd{C-c d})
150 @end itemize
152 @node Installation, Typesetting, Main features, Top
153 @comment node-name, next, previous, up
154 @chapter Installation
155 @cindex installation
156 @cindex .emacs
157 @cindex auto-mode-alist
158 @cindex autoload
160 Put next two expressions into your @file{~/.emacs}.
162 @lisp
163 (setq auto-mode-alist
164 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
165 (autoload 'yatex-mode "yatex" "Yet Another La@TeX{} mode" t)
166 @end lisp
168 Next, add certain path name where you put files of YaTeX to your
169 load-path. If you want to put them in @file{~/src/emacs}, write
171 @lisp
172 (setq load-path
173 (cons (expand-file-name "~/src/emacs") load-path))
174 @end lisp
176 @noindent
177 in your @file{~/.emacs}
179 Then, yatex-mode will be automatically loaded when you visit a
180 file which has extension @file{.tex}. If yatex-mode is successfully
181 loaded, mode string on mode line will be turned to "YaTeX".
184 @node Typesetting, %# notation, Installation, Top
185 @comment node-name, next, previous, up
186 @chapter Typesetting
187 @cindex typesetting
188 @cindex previewer
189 @cindex typesetter
190 @cindex latex
191 @cindex printing out
193 The prefix key stroke of yatex-mode is @kbd{C-c} (Press 'C' with Control
194 key) by default. If you don't intend to change the prefix key stroke,
195 assume all @kbd{[prefix]} as @kbd{C-c} in this document. These key
196 strokes execute typeset or preview command.
198 @table @kbd
199 @item [prefix] t j
200 @dots{} invoke latex
201 @item [prefix] t r
202 @dots{} invoke latex on region
203 @item [prefix] t k
204 @dots{} kill current typesetting process
205 @item [prefix] t b
206 @dots{} invoke bibtex
207 @item [prefix] t p
208 @dots{} preview
209 @item [prefix] t l
210 @dots{} lpr dvi-file
211 @item [prefix] t s
212 @dots{} search current string on xdvi-remote
213 @end table
215 @menu
216 * Calling typesetter::
217 * Calling previewer::
218 * Printing out::
219 @end menu
221 @node Calling typesetter, Calling previewer, Typesetting, Typesetting
222 @comment node-name, next, previous, up
223 @section{Calling typesetter}
225 Typing @kbd{[prefix] t j}, the current editing window will be divided
226 horizontally when you invoke latex command, and log message of La@TeX{}
227 typesetting will be displayed in the other window; called typesetting
228 buffer. The typesetting buffer automatically scrolls up and traces
229 La@TeX{} warnings and error messages. If you see latex stopping by an
230 error, you can send string to latex in the typesetting buffer.
232 If an error stops the La@TeX{} typesetting, this key stroke will
233 move the cursor to the line where La@TeX{} error is detected.
235 @table @kbd
236 @item [prefix] '
237 @itemx ([prefix]+single quotation)
239 @dots{} jump to the previous error or warning
240 @end table
242 If you find a noticeable error, move to the typesetting buffer and move
243 the cursor on the line of error message and type @kbd{SPACE} key. This
244 makes the cursor move to corresponding source line.
246 Since @kbd{[prefix] tr} pastes the region into the file
247 @file{texput.tex} in the current directory, you should be careful of
248 overwriting. The method of specification of the region is shown in the
249 section @xref{%#NOTATION}.
251 The documentstyle for typeset-region is the same as that of editing
252 file if you edit one file, and is the same as main file's if you
253 edit splitting files.
255 @node Calling previewer, Printing out, Calling typesetter, Typesetting
256 @comment node-name, next, previous, up
257 @section{Calling previewer}
259 @kbd{[prefix] t p} invokes the TeX previewer. And if you are using
260 xdvi-remote, which can be controled from other terminals, @kbd{[prefix] t
261 s} enables you to search current string at the cursor on the running xdvi
262 window. You can get xdvi with `-remote feature' from;
263 @code{ftp://ftp.ae.keio.ac.jp/pub/text/xdvi/xdvi-remote}.
265 @node Printing out, , Calling previewer, Typesetting
266 @comment node-name, next, previous, up
267 @section{Printing out}
269 When you type @code{[preifx] t l}, YaTeX asks you the range of
270 dvi-printing by default. You can skip this by invoking it with
271 universal-argument as follows:
273 @example
274 C-u [prefix] tl
275 @end example
277 @node %# notation, Completion, Typesetting, Top
278 @comment node-name, next, previous, up
279 @chapter %# notation
280 @cindex %# notation
282 You can control the typesetting process by describing @code{%#}
283 notations in the source text.
285 @menu
286 * Changing typesetter::
287 * Static region for typesetting::
288 * Lpr format::
289 * Editing %# notation::
290 @end menu
292 @node Changing typesetter, Static region for typesetting, %# notation, %# notation
293 @comment node-name, next, previous, up
294 @section To change the `latex' command or to split a source text.
295 @cindex typesetter
297 To change the typesetting command, write
299 @example
300 %#!latex-big
301 @end example
303 @noindent
304 anywhere in the source text. This is useful for changing
305 typesetter.
307 @node Splitting input files, Static region for typesetting, Changing typesetter, %# notation
308 @comment node-name, next, previous, up
310 And if you split the source text and
311 edit subfile that should be included from main text.
313 @example
314 %#!latex main.tex
315 @end example
317 @noindent
318 will be helpful to execute latex on main file from sub text buffer. Since
319 this command line after @kbd{%#!} will be sent to shell literally, next
320 description makes it convenient to use ghostview as dvi-previewer.
322 @example
323 %#!latex main ; dvi2ps main.dvi > main
324 @end example
326 @noindent
327 Note that YaTeX assumes the component before the last period of
328 the last word in this line as base name of the main La@TeX{} source.
330 To make best use of the feature of inter-file jumping by
331 @kbd{[prefix] g} (see @ref{Cursor jump}), take described below into
332 consideration.
334 @itemize
335 @item You can put split texts in sub directory, but not in
336 sub directory of sub directory.
337 @item In the main text, specify the child file name with relative path name
338 such as \include{chap1/sub}, when you include the file in
339 a sub-directory.
340 @item In a sub-text, write @code{%#!latex main.tex} even if @file{main.tex}
341 is in the parent directory(not %#!latex ../main.tex).
342 @end itemize
344 @node Static region for typesetting, Lpr format, Changing typesetter, %# notation
345 @comment node-name, next, previous, up
346 @section Static region
347 @cindex static region
348 @cindex Fixed region
350 Typeset-region by @kbd{[prefix] tr} passes the region between point and
351 mark to typesetting command by default. But when you want to typeset
352 static region, enclose the region by @code{%#BEGIN} and @code{%#END} as
353 follows.
355 @example
356 %#BEGIN
357 TheRegionYouWantToTypesetManyTimes
358 %#END
359 @end example
361 This is the rule of deciding the region.
363 @enumerate
364 @item
365 If there exists %#BEGIN before point,
367 @enumerate
368 @item
369 If there exists %#END after %#BEGIN,
370 @itemize
371 @item From %#BEGIN to %#END.
372 @end itemize
374 @item
375 If %#END does not exist after %#BEGIN,
376 @itemize
377 @item From %#BEGIN to the end of buffer.
378 @end itemize
379 @end enumerate
381 @item
382 If there does not exist %#BEGIN before point,
383 @itemize
384 @item Between point and mark(standard method of Emacs).
385 @end itemize
386 @end enumerate
388 It is useful to write @code{%#BEGIN} in the previous line of \begin and
389 @code{%#END} in the next line of \@code{end} when you try complex
390 environment such as `tabular' many times. It is also useful to put only
391 @code{%#BEGIN} alone at the middle of very long text. Do not forget to
392 erase @code{%#BEGIN} @code{%#END} pair.
394 @node Lpr format, Editing %# notation, Static region for typesetting, %# notation
395 @comment node-name, next, previous, up
396 @section Lpr format
397 @cindex lpr format
399 Lpr format is specified by three Lisp variables. Here are the
400 default values of them.
402 @table @code
403 @item (1)dviprint-command-format
404 @code{"dvi2ps %f %t %s | lpr"}
405 @item (2)dviprint-from-format
406 @code{"-f %b"}
407 @item (3)dviprint-to-format
408 @code{"-t %e"}
409 @end table
411 On YaTeX-lpr, @code{%s} in (1) is replaced by the file name of main
412 text, @code{%f} by contents of (2), %t by contents of (3). At these
413 replacements, @code{%b} in (2) is also replaced by the number of beginning
414 page, @code{%e} in (3) is replaced by the number of ending page. But
415 @code{%f} and @code{%t} are ignored when you omit the range of print-out
416 by @kbd{C-u [prefix] tl}.
418 If you want to change this lpr format temporarily, put a command
419 such as follows somewhere in the text:
421 @example
422 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
423 @end example
425 And if you want YaTeX not to ask you the range of printing
426 out, the next example may be helpful.
428 @example
429 %#LPR dvi2ps %s | lpr
430 @end example
432 @node Editing %# notation, , Lpr format, %# notation
433 @comment node-name, next, previous, up
434 @section Editing %# notation
436 To edit @code{%#} notation described above, type
438 @table @kbd
439 @item [prefix] %
440 @dots{} editing %# notation menu
441 @end table
443 @noindent
444 and select one of the entry of the menu as follows.
446 @example
447 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
448 @end example
450 @noindent
451 Type @kbd{!} to edit @code{%#!} entry, @code{b} to enclose the region with
452 @code{%#BEGIN} and @code{%#END}, and @code{l} to edit @code{%#LPR} entry.
453 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are
454 automatically erased.
456 @node Completion, Local dictionaries, %# notation, Top
457 @comment node-name, next, previous, up
458 @chapter Completion
459 @cindex completion
461 YaTeX makes it easy to input the La@TeX{} commands. There are several
462 kinds of completion type, begin-type, section-type, large-type, etc...
464 @menu
465 * Begin-type completion::
466 * Section-type completion::
467 * Large-type completion::
468 * Maketitle-type completion::
469 * Arbitrary completion::
470 * End completion::
471 * Accent completion::
472 * Image completion::
473 * Greek letters completion::
474 @end menu
476 @node Begin-type completion, Section-type completion, Completion, Completion
477 @comment node-name, next, previous, up
478 @section Begin-type completion
479 @cindex begin-type completion
480 @cindex environment
481 @cindex prefix b
483 "Begin-type completion" completes commands of @code{\begin@{env@}} ...
484 @code{\end@{env@}}. All of the begin-type completions begin with this key
485 sequence.
487 @table @kbd
488 @item [prefix] b
489 @dots{} start begin-type completion
490 @end table
492 @noindent
493 An additional key stroke immediately completes a frequently used
494 La@TeX{} @code{\begin@{@}}...@code{\@code{end}@{@}} environment.
496 @table @kbd
497 @item [prefix] b c
498 @dots{} @code{\begin@{center@}...\end@{center@}}
499 @item [prefix] b d
500 @dots{} @code{\begin@{document@}...\end@{document@}}
501 @item [prefix] b D
502 @dots{} @code{\begin@{description@}...\end@{description@}}
503 @item [prefix] b e
504 @dots{} @code{\begin@{enumerate@}...\end@{enumerate@}}
505 @item [prefix] b E
506 @dots{} @code{\begin@{equation@}...\end@{equation@}}
507 @item [prefix] b i
508 @dots{} @code{\begin@{itemize@}...\end@{itemize@}}
509 @item [prefix] b l
510 @dots{} @code{\begin@{flushleft@}...\end@{flushleft@}}
511 @item [prefix] b m
512 @dots{} @code{\begin@{minipage@}...\end@{minipage@}}
513 @item [prefix] b t
514 @dots{} @code{\begin@{tabbing@}...\end@{tabbing@}}
515 @item [prefix] b T
516 @dots{} @code{\begin@{tabular@}...\end@{tabular@}}
517 @item [prefix] b^T
518 @dots{} @code{\begin@{table@}...\end@{table@}}
519 @item [prefix] b p
520 @dots{} @code{\begin@{picture@}...\end@{picture@}}
521 @item [prefix] b q
522 @dots{} @code{\begin@{quote@}...\end@{quote@}}
523 @item [prefix] b Q
524 @dots{} @code{\begin@{quotation@}...\end@{quotation@}}
525 @item [prefix] b r
526 @dots{} @code{\begin@{flushright@}...\end@{flushright@}}
527 @item [prefix] b v
528 @dots{} @code{\begin@{verbatim@}...\end@{verbatim@}}
529 @item [prefix] b V
530 @dots{} @code{\begin@{verse@}...\end@{verse@}}
531 @end table
533 Any other La@TeX{} environments are made by completing-read of the
534 Emacs function.
536 @table @kbd
537 @item [prefix] b SPACE
538 @dots{} begin-type completion
539 @end table
541 @noindent
542 The next message will show up in the minibuffer
544 @example
545 Begin environment(default document):
546 @end example
548 @noindent
549 by typing @kbd{[prefix] b}. Put the wishing environment with completion
550 in the minibuffer, and @code{\begin@{env@}}...\@code{\end@{env@}} will be
551 inserted in the La@TeX{} source text. If the environment you want to put
552 does not exist in the YaTeX completion table, it will be registered in the
553 user completion table. YaTeX automatically saves the user completion
554 table in the user dictionary file at exiting of emacs.
556 At the completion of certain environments, the expected initial entry will
557 automatically inserted such as @code{\item} for @code{itemize}
558 environment. If you don't want the entry, it can be removed by undoing.
560 If you want to enclose some paragraphs which have already been
561 written, invoke the begin-type completion with changing the case
562 of @kbd{b} of key sequence upper(or invoke it with universal argument
563 by @kbd{C-u} prefix).
564 @cindex enclose region into environment
566 The following example encloses a region with `description'
567 environment.
569 @table @kbd
570 @item [prefix] B D
571 @itemx (or ESC 1 [prefix] b D)
572 @itemx (or C-u [prefix] b D)
574 @dots{} begin-type completion for region
575 @end table
577 This enclosing holds good for the completing input by @kbd{[prefix] b
578 SPC}. @kbd{[prefix] B SPC} enclose a region with the environment selected
579 by completing-read.
581 @node Section-type completion, Large-type completion, Begin-type completion, Completion
582 @comment node-name, next, previous, up
583 @section Section-type completion
584 @cindex section-type completion
585 @cindex prefix s
587 "Section-type completion" completes section-type commands which take an
588 argument or more such as @code{\section@{foo@}}. To invoke section-type
589 completion, type
591 @table @kbd
592 @item [prefix] s
593 @dots{} section-type completion
594 @end table
596 @noindent
597 then the prompt
599 @example
600 (C-v for view) \???@{@} (default documentstyle):
601 @end example
603 @noindent
604 will show up in the minibuffer. Section-type La@TeX{} commands are
605 completed by space key, and the default value is selected when you
606 type nothing in the minibuffer.
608 Next,
610 @example
611 \section@{???@}:
612 @end example
614 @noindent
615 prompts you the argument of section-type La@TeX{} command. For
616 example, the following inputs
618 @example
619 \???@{@} (default documentstyle): section
620 \section{???}: Hello world.
621 @end example
623 @noindent
624 will insert the string
626 @example
627 \section@{Hello world.@}
628 @end example
630 in your La@TeX{} source. When you neglect argument such as
632 @example
633 (C-v for view) \???@{@} (default section): vspace*
634 \vspace*@{???@}:
635 @end example
637 YaTeX puts
639 @example
640 \vspace*@{@}
641 @end example
643 @noindent
644 and move the cursor in the braces.
646 In La@TeX{} command, there are commands which take more than one
647 arguments such as @code{\addtolength{\topmargin}{8mm}}. To complete these
648 commands, invoke section-type completion with universal argument as,
649 @cindex number of argument
651 @example
652 C-u 2 [prefix] s (or ESC 2 [prefix] s)
653 @end example
655 @noindent
656 and make answers in minibuffer like this.
658 @example
659 (C-v for view) \???@{@} (default vspace*): addtolength
660 \addtolength@{???@}: \topmargin
661 Argument 2: 8mm
662 @end example
664 @code{\addtolength} and the first argument @code{\topmargin} can be typed
665 easily by completing read. Since YaTeX also learns the number of
666 arguments of section-type command and will ask that many arguments in
667 future completion, you had better tell the number of arguments to YaTeX at
668 the first completion of the new word. But you can change the number of
669 arguments by calling the completion with different universal argument
670 again.
673 Invoking section-type completion with @code{[Prefix] S} (Capital `S')
674 includes the region as the first argument of section-type command.
676 The section/large/maketitle type completion can work at the
677 prompt for the argument of other section-type completion.
678 Nested La@TeX{} commands are efficiently read with the recursive
679 completion by typing YaTeX's completion key sequence in the
680 minibuffer.
682 @menu
683 * view-sectioning::
684 @end menu
686 @node view-sectioning, , Section-type completion, Section-type completion
687 @comment node-name, next, previous, up
688 @subsection view-sectioning
689 @cindex view sectioning
690 @cindex outline
692 In the minibuffer at the prompt of section-type command completion,
693 typing @kbd{C-v} shows a list of sectioning commands in source text(The
694 line with @code{<<--} mark is the nearest sectioning command). Then,
695 default sectioning command appears in the minibuffer. You can go up/down
696 sectioning command by typing @kbd{C-p}/@kbd{C-n}, can scrolls up/down the
697 listing buffer by @kbd{C-v}/@kbd{M-v}, and can hide sectioning commands
698 under certain level by 0 through 6. Type @kbd{?} in the minibuffer of
699 sectioning prompt for more information.
701 You can generate this listing buffer (@code{*Sectioning Lines*} buffer)
702 by typing
703 @table @kbd
704 @item M-x YaTeX-section-overview
705 @dots{} Generate *Sectioning Lines* buffer
706 @end table
707 @cindex{Generate the listing of sectioning units}
708 from the LaTeX source buffer. In this listing buffer, typing @kbd{u} on
709 the sectioning command shifts up the corresponding sectioning command in
710 source text and @kbd{d} shifts down. After marking lines in the listing
711 buffer, typing @kbd{U} shifts up all sectioning commands in the region,
712 and @kbd{U} shifts down. Here are all the key bindings of
713 @code{*Sectioning Lines*} buffer.
715 @table @kbd
716 @item SPC
717 @dots{} Jump to corresponding source line
718 @item .
719 @dots{} Display corresponding source line
720 @item u
721 @dots{} Shift up a sectioning line
722 @item d
723 @dots{} Shift down a sectioning line
724 @item U
725 @dots{} Shift up sectioning lines in region
726 @item D
727 @dots{} Shift down sectioning lines in region
728 @item 0$B!A(B6
729 @dots{} Hide sectioning commands whose level is lower than n
730 @end table
733 @node Large-type completion, Maketitle-type completion, Section-type completion, Completion
734 @comment node-name, next, previous, up
735 @section Large-type completion
737 "Large-type completion" inputs the font or size changing
738 descriptions such as @code{@{\large @}}. When you type
740 @table @kbd
741 @item [prefix] l
742 @dots{} large-type completion
743 @end table
745 @noindent
746 the message in the minibuffer
748 @example
749 @{\??? @} (default large):
750 @end example
752 prompts prompts you large-type command with completing-read. There are
753 TeX commands to change fonts or sizes, @code{it}, @code{huge} and so on,
754 in the completion table.
756 Region-based completion is also invoked by changing the letter after
757 prefix key stroke as @kbd{[prefix] L}. It encloses the region by braces
758 with large-type command.
760 @node Maketitle-type completion, Arbitrary completion, Large-type completion, Completion
761 @comment node-name, next, previous, up
762 @section Maketitle-type completion
763 @cindex maketitle-type completion
765 We call it "maketitle-type completion" which completes commands such as
766 @code{\maketitle}. Take notice that maketitle-type commands take no
767 arguments. Then, typing
769 @table @kbd
770 @item [prefix] m
771 @dots{} maketitle-type completion
772 @end table
774 @noindent
775 begins maketitle-completion. Above mentioned method is true for
776 maketitle-completion, and there are La@TeX{} commands with no
777 arguments in completion table.
779 @node Arbitrary completion, End completion, Maketitle-type completion, Completion
780 @comment node-name, next, previous, up
781 @section Arbitrary completion
782 @cindex arbitrary completion
784 @noindent
785 You can complete certain La@TeX{} command anywhere without typical
786 completing method as described, by typing
788 @table @kbd
789 @item [prefix] SPC
790 @dots{} arbitrary completion
791 @end table
793 @noindent
794 after the initial string of La@TeX{} command that is preceded by @code{\}.
796 @node End completion, Accent completion, Arbitrary completion, Completion
797 @comment node-name, next, previous, up
798 @section End completion
799 @cindex end completion
801 @noindent
802 YaTeX automatically detects the opened environment and close it with
803 \@code{\end@{environment@}}. Though proficient YaTeX users never fail to
804 make environment with begin-type completion, some may begin an environment
805 manually. In that case, type
807 @table @kbd
808 @item [prefix] e
809 @dots{} @code{end} completion
810 @end table
812 @noindent
813 at the end of the opened environment.
815 @node Accent completion, Image completion, End completion, Completion
816 @comment node-name, next, previous, up
817 @section Accent completion
818 @cindex accent completion
820 When you want to write the European accent marks(like @code{\`@{o@}}),
822 @table @kbd
823 @item [prefix] a
824 @dots{} accent completion
825 @end table
827 @noindent
828 shows the menu
830 @example
831 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
832 @end example
834 @noindent
835 in the minibuffer. Chose one character or corresponding numeric,
836 and you will see
838 @example
839 \`{}
840 @end example
842 @noindent
843 in the editing buffer with the cursor positioned in braces. Type
844 one more character `o' for example, then
846 @example
847 \`{o}
848 @end example
850 @noindent
851 will be completed, and the cursor gets out from braces.
853 @node Image completion, Greek letters completion, Accent completion, Completion
854 @comment node-name, next, previous, up
855 @section Image completion of mathematical sign
856 @cindex image completion
857 @cindex math-mode
858 @cindex sigma
859 @cindex leftarrow
860 @cindex ;
862 Arrow marks, sigma mark and those signs mainly used in the
863 TeX's math environment are completed by key sequences which
864 imitate the corresponding symbols graphically. This completion
865 only works in the math environment. YaTeX automatically detects
866 whether the cursor located in math environment or not, and
867 change the behavior of key strokes @kbd{;} and @kbd{:}.
869 By the way, we often express the leftarrow mark by `<-' for example.
870 Considering such image, you can write @code{\leftarrow} by typing @kbd{<-}
871 after @kbd{;} (semicolon) as a prefix. In the same way,
872 @code{\longleftarrow} (@code{<--}) is completed by typing @kbd{;<--},
873 infinity mark which is imitated by @code{oo} is completed by typing
874 @kbd{;oo}.
876 Here are the sample operations in YaTeX math-mode.
878 @example
879 INPUT Completed La@TeX{} commands
880 ; < - @code{\leftarrow}
881 ; < - - @code{\longleftarrow}
882 ; < - - > @code{\longleftrightarrow}
883 ; o @code{\circ}
884 ; o o @code{\infty}
885 @end example
887 In any case, you can quit from image completion and can move
888 to the next editing operation if the La@TeX{} command you want is
889 shown in the buffer.
891 @code{;} itself in math-environment is inserted by @kbd{;;}. Typing
892 @kbd{TAB} in the midst of image completion shows all of the La@TeX{}
893 commands that start with the same name as string you previously typed in.
894 In this menu buffer, press @kbd{RET} after moving the cursor (by @kbd{n},
895 @kbd{p}, @kbd{b}, @kbd{f}) to insert the La@TeX{} command.
897 To know all of the completion table, type @kbd{TAB} just after @kbd{;}.
898 And here is the sample menu by @kbd{TAB} after @kbd{;<}.
900 @example
901 KEY LaTeX sequence sign
902 < \leq <
903 ~
904 << \ll <<
905 <- \leftarrow <-
906 <= \Leftarrow <=
907 @end example
909 You can define your favorite key-vs-sequence completion table in the
910 Emacs-Lisp variable @code{YaTeX-math-sign-alist-private}. See also
911 @file{yatexmth.el} for the information of the structure of this variable.
913 @node Greek letters completion, , Image completion, Completion
914 @comment node-name, next, previous, up
915 @section Greek letters completion
916 @cindex Greek letters completion
917 @cindex :
919 Math-mode of YaTeX provides another image completion, Greek letters
920 completion in the same method. After prefix @kbd{:}, typing @kbd{a} makes
921 @code{\alpha}, @kbd{b} makes @code{\beta} and @kbd{g} makes @code{\gamma}
922 and so on. First, type @kbd{:TAB} to know all the correspondence of
923 alphabets vs. Greek letters.
925 If you will find @kbd{;} or @kbd{:} doesn't work in correct position of
926 math environment, it may be a bug of YaTeX. Please send me a bug report
927 with the configuration of your text, and avoid it temporarily by typing
928 @kbd{;} or @kbd{:} after universal-argument(@kbd{C-u}) which forces
929 @kbd{;} and @kbd{:} to work as math-prefix.
931 @node Local dictionaries, Commenting out, Completion, Top
932 @comment node-name, next, previous, up
933 @chapter Local dictionaries
934 @cindex local dictionaries
935 @cindex nervous users
937 Tables for completion consist of three dictionaries; `standard
938 dictionary' built in @file{yatex.el}, `user dictionary' for your common
939 private commands, and `local dictionary' that is effective in a certain
940 directory.
942 When you input the command unknown to YaTeX at a completion in the
943 minibuffer, YaTeX asks you with the following prompt;
945 @example
946 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscad
947 @end example
949 @noindent
950 In this menu, typing @kbd{u} updates your `user dictionary', @kbd{l}
951 updates your local dictionary, @kbd{n} updates only on-memory dictionary
952 which go through only current Emacs session, and @kbd{d} updates no
953 dictionary and throws the new word away.
955 If you find this switching feature meaningless and bothersome, put the
956 next expression into your @file{~/.emacs}
958 @lisp
959 (setq YaTeX-nervous nil)
960 @end lisp
962 @node Commenting out, Cursor jump, Local dictionaries, Top
963 @comment node-name, next, previous, up
964 @chapter Commenting out
965 @cindex commenting out
966 @cindex prefix >
967 @cindex prefix <
968 @cindex prefix ,
969 @cindex prefix .
971 You may want to comment out some region.
973 @table @kbd
974 @item [prefix] >
975 @dots{} comment out region by %
976 @item [prefix] <
977 @dots{} uncomment region
978 @end table
980 @noindent
981 cause an operation to the region between point and mark.
983 @table @kbd
984 @item [prefix] .
985 @dots{} comment out current paragraph
986 @item [prefix] ,
987 @dots{} uncomment current paragraph
988 @end table
990 @noindent
991 comments or uncomments the paragraph where the cursor belongs.
992 This `paragraph' means the region marked by the function
993 mark-paragraph, bound to @kbd{ESC h} by default. It is NOT
994 predictable what will happen when you continuously comment out
995 some paragraph many times.
997 You can also comment out an environment between @code{\begin} and
998 @code{\end}, or a @code{\begin}-\@code{\end} pair themselves, by making the
999 following key strokes on the line where @code{\begin@{@}} or
1000 @code{\end@{@}} exists.
1002 @table @kbd
1003 @item [prefix] >
1004 @dots{} comment out from \begin to \@code{end}
1005 @item [prefix] <
1006 @dots{} uncomment from \begin to \@code{end}
1007 @end table
1009 @noindent
1010 comment whole the contents of environment. Moreover,
1012 @table @kbd
1013 @item [prefix] .
1014 @dots{} comment out \begin and \@code{end}
1015 @item [prefix] ,
1016 @dots{} uncomment \begin and \@code{end}
1017 @end table
1019 @noindent
1020 (un)comments out only environment declaration: @code{\begin@{@}} and
1021 @code{\end@{@}}. NOTE that even if you intend to comment out some region,
1022 invoking @kbd{[prefix] >} on the @code{\begin},@code{\end} line decides to
1023 work in `commenting out from @code{\begin} to @code{\end}' mode.
1026 @node Cursor jump, Changing and Deleting, Commenting out, Top
1027 @comment node-name, next, previous, up
1028 @chapter Cursor jump
1029 @cindex cursor jump
1030 @cindex prefix g
1032 @section Jump to corresponding object
1034 Typing
1036 @table @kbd
1037 @item [prefix] g
1038 @dots{} go to corresponding object
1039 @end table
1041 @noindent
1042 in a certain place move the cursor to the place corresponding to the
1043 La@TeX{} command of last place. YaTeX recognize the followings as pairs
1044 that have relation each other.
1046 @itemize @bullet
1047 @item @code{\begin@{@}} <-> @code{\end@{@}}
1048 @item @code{%#BEGIN} <-> @code{%#END}
1049 @item On the image-including line -> corresponding viewer or drawing tool
1050 @item @code{\label@{@}} <-> @code{\ref@{@}}
1051 @item @code{\include(\input)} -> included file
1052 @item @code{\bibitem@{@}} <-> @code{\cite@{@}}
1053 @end itemize
1055 On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} moves the
1056 cursor to the corresponding @code{\end},@code{\begin} line, if its partner
1057 really exists. The behavior on the line @code{%#BEGIN} and @code{%#END}
1058 are the same. Note that if the correspondent of @code{label/ref} or
1059 @code{cite/bibitem} exists in another file, that file have to be opened to
1060 make a round trip between references by @kbd{[prefix] g}.
1062 If you type @code{[prefix] g} on the line of @code{\include@{chap1@}},
1063 typically in the main text, YaTeX switches buffer to @file{chap1.tex}.
1065 @table @kbd
1066 @item [prefix] 4 g
1067 @dots{} go to corresponding object in other window
1068 @end table
1070 @noindent
1071 do the same job as @kbd{[prefix] g} except it's done in other window.
1072 Note that this function doesn't work on @code{begin/end},
1073 @code{%#BEGIN/%#END} pairs because it is meaningless.
1075 @section{Invoking image processor}
1076 @cindex{Drawing tool invocation}
1078 `image-including line' described above means such lines as
1079 @code{\epsfile@{file=foo.ps@}}. If you type @kbd{[prefix] g} on that
1080 line, YaTeX automatically searches source of `foo.ps' and invokes image
1081 viewer or drawing tool correspoinding to it. For example; if you draw
1082 an image foo.obj with Tgif and enclose its product named foo.eps by
1083 @code{\epsfile} command. Typing @kbd{[prefix] g} on @code{\epsfile} line
1084 make YaTeX invoke @code{tgif foo.obj}. How a processor is choosen is as
1085 follows.
1087 @enumerate
1088 @item
1089 If there is an expression matching with one of the pattern
1090 defined in @code{YaTeX-processed-file-regexp-alist}, extract file name
1091 from regexp group surrounded by \\(\\). (Which group corresponds is
1092 written in the cdr part of each list.) If no matches were found, do
1093 nothing.
1094 @item
1095 If there is a pattern as `%PROCESSOR' which is defined in the variable
1096 @code{YaTeX-file-processor-alist}, call that processor giving the
1097 file name with corresponding extension.
1098 @item
1099 If not, check the existence of each file which is supplied the
1100 extension in the cdr part of each list of
1101 @code{YaTeX-file-processor-alist}. If any, call the corresponding
1102 image viewer or drawing tool.
1103 @end enumerate
1105 @section Jump to main file
1107 Typing
1109 @table @kbd
1110 @item [prefix] ^
1111 @dots{} visit main file
1112 @item [prefix] 4^
1113 @dots{} visit main file in other buffer
1114 @end table
1115 @cindex prefix ^
1116 @cindex prefix 4 ^
1118 in a sub text switch the buffer to the main text specified by
1119 @code{%#!} notation.
1121 @section Other jumping features
1123 And these are the functions which work on the current La@TeX{}
1124 environment:
1126 @table @kbd
1127 @item M-C-a
1128 @dots{} beginning of environment
1129 @item M-C-e
1130 @dots{} @code{end} of environment
1131 @item M-C-@@
1132 @dots{} mark environment
1133 @end table
1134 @cindex M-C-a
1135 @cindex M-C-e
1136 @cindex M-C-@@
1138 @node Changing and Deleting, Filling, Cursor jump, Top
1139 @comment node-name, next, previous, up
1140 @chapter Changing and Deleting
1142 These functions are for change or deletion of La@TeX{} commands
1143 already entered.
1145 @table @kbd
1146 @item [prefix] c
1147 @dots{} change La@TeX{} command
1148 @item [prefix] k
1149 @dots{} kill La@TeX{} command
1150 @end table
1151 @cindex prefix c
1152 @cindex prefix k
1154 @menu
1155 * Changing La@TeX{} commands::
1156 * Killing La@TeX{} commands::
1157 @end menu
1159 @node Changing La@TeX{} commands, Killing La@TeX{} commands, Changing and Deleting, Changing and Deleting
1160 @comment node-name, next, previous, up
1161 @section Changing La@TeX{} commands
1163 @kbd{[prefix] c} can change the various (La)@TeX{} commands. This can
1164 change the followings.
1165 @itemize @bullet
1166 @item Environment names
1167 @item Section-type commands
1168 @item Argument of section-type commands
1169 @item Optional parameters (enclosed by []) of section-type commands
1170 @item Font/size designators
1171 @item Math-mode's maketitle-type commands that can be inputted with
1172 image completion
1173 @end itemize
1175 Typing @kbd{[prefix] c} on one of above objects you want to change
1176 brings a suitable reading function sometimes with completion.
1177 Note: If you want to change the argument of section-type command that
1178 contains other La@TeX{} commands, type @kbd{[prefix] c} either of
1179 surrounding braces of the argument in order to make YaTeX ignore the
1180 internal La@TeX{} sequences as an object of changing. Anyway, it is
1181 very difficult to know which argument position the cursor belongs because
1182 the La@TeX{} commands can be nested and braces can freely emerge. So keep
1183 it mind to put the cursor on a brace when you are thinking of changing a
1184 complicated argument.
1186 @node Killing La@TeX{} commands, , Changing La@TeX{} commands, Changing and Deleting
1187 @comment node-name, next, previous, up
1188 @section Killing La@TeX{} commands
1189 @cindex Killing La@TeX{} commands
1191 @kbd{[prefix] k} kills the La@TeX{} commands sometimes with their
1192 arguments. Following table illustrates the correspondence of the invoking
1193 position and what is killed.
1195 @example
1196 [Invoking position] [action]
1197 \begin, \end line kill \begin,\end pairs
1198 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
1199 on a Section-type command kill section-type command
1200 on a parenthesis kill parentheses
1201 @end example
1203 Note that when killing @code{\begin, \end} or @code{%#BEGIN, %#END} pair,
1204 the lines @code{\begin, \end} or @code{%#BEGIN, %#END} exist will be
1205 killed entirely. So take care not to create any line that contains more
1206 than one @code{\begin} or so.
1208 While all operations above are to kill `containers' which surround some
1209 text, universal argument (@kbd{C-u}) for these commands kills not only
1210 `containers' but also `contents' of them. See below as a sample.
1212 @example
1213 Original text: [prefix] k C-u [prefix] k
1214 Main \footnote@{note@} here. Main note here. Main here.
1215 ~(cursor)
1216 @end example
1218 @node Filling, Updation of includeonly, Changing and Deleting, Top
1219 @comment node-name, next, previous, up
1220 @chapter Filling
1221 @cindex filling
1223 @section Filling an item
1224 @cindex filling an item
1225 @cindex prefix i
1227 To fill a term (descriptive sentences) of @code{\item}, type
1229 @c @table @kbd
1230 @c @item [prefix] i
1231 @c @dots{} fill item
1232 @c @end table
1233 @table @kbd
1234 @item M-q
1235 @dots{} fill item
1236 @end table
1238 @noindent
1239 on that item.
1241 YaTeX uses the value of the variable @code{YaTeX-item-regexp} as the
1242 regular expression to search item header in itemize environment.
1243 If you make a newcommand to itemize terms(e.g. @code{\underlineitem}), put
1245 @lisp
1246 (setq YaTeX-item-regexp
1247 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1248 @end lisp
1249 @cindex YaTeX-item-regexp
1251 in your @file{~/.emacs}. If you are not familiar with regular expression
1252 for Emacs-Lisp, name a newcommand for `itemize' beginning with
1253 @code{\item} such as @code{\itembf}, not @code{\bfitem}.
1255 This function reformats the @code{\item} into `hang-indented' style.
1256 For example:
1258 @example
1259 itemize, enumerate environment:
1261 >\item[foo] `foo' is the typical word for describing an
1262 > arbitrarily written....
1263 description environment:
1264 > \item[bar] When the word `for' is used as an arbitrarily
1265 > word, `bar' is bound to follow it.
1266 @end example
1268 Note that the indent depth of an @code{\item} word and its descriptive
1269 paragraph are the same in latter case. If you want to use different
1270 depth, invoke fill-paragraph at the beginning of non-whitespace
1271 character(see below).
1273 @section Filling paragraph
1274 @cindex Filling paragraph
1275 @cindex M-q
1277 Fill-paragraph is little bit adapted for La@TeX{} sources. It retains from
1278 filling in certain environments where formatting leads to a disaster such
1279 as verbatim, tabular, or so. And it protects @code{\verb} expressions
1280 from being folded (The variable @code{YaTeX-verb-regexp} controls this).
1281 Besides, putting cursor on the first occurrence of non-whitespace
1282 character on a line changes the fill-prefix temporarily to the depth of
1283 the line.
1285 @node Updation of includeonly, What column, Filling, Top
1286 @comment node-name, next, previous, up
1287 @chapter Updation of @code{\includeonly}
1288 @cindex includeonly
1290 When you edit splitting source texts, the notation
1292 @example
1293 \includeonly@{CurrentEditingFileName@}
1294 @end example
1296 @noindent
1297 in the main file reduces the time of typesetting. If you want
1298 to hack other file a little however, you have to rewrite it to
1300 @example
1301 \includeonly@{OtherFileNameYouWantToFix@}
1302 @end example
1304 @noindent
1305 in the main file. YaTeX automatically detects that the current
1306 edited text is not in includeonly list and prompts you
1308 @example
1309 A)dd R)eplace %)comment?
1310 @end example
1312 in the minibuffer. Type @kbd{a} if you want to add the current file name
1313 to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list
1314 by the current file, and type @kbd{%} to comment out the
1315 @code{\includeonly} line.
1317 @node What column, Intelligent newline, Updation of includeonly, Top
1318 @comment node-name, next, previous, up
1319 @chapter What column?
1320 @cindex what column
1321 @cindex complex tabular
1322 @cindex prefix &
1324 We are often get tired of finding the corresponding column in
1325 large tabulars. For example,
1327 @example
1328 \begin@{tabular@}@{|c|c|c|c|c|c|c|c|@}\hline
1329 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1330 Home Addr.&Home Phone\\ \hline
1331 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1332 zzz-www & Japan & 9876-54321 \\
1333 & 2 & \multicolumn@{2@}@{c|@}@{Unknown@}
1334 &&&(???)
1335 \\ \hline
1336 \end@{tabular@}
1337 @end example
1339 Suppose you have the cursor located at @code{(???)} mark, can you tell
1340 which column it is belonging at once? Maybe no. In such case,
1341 type
1343 @table @kbd
1344 @item [prefix] &
1345 @dots{} What column
1346 @end table
1348 @noindent
1349 in that position. YaTeX tells you the column header of the
1350 current field. Since YaTeX assumes the first line of tabular
1351 environment as a row of column headers, you can create a row of
1352 virtual column headers by putting them in the first line and
1353 commenting that line with @code{%}.
1355 @node Intelligent newline, Online help, What column, Top
1356 @comment node-name, next, previous, up
1357 @chapter Intelligent newline
1358 @cindex Intelligent newline
1359 @cindex ESC RET
1360 @cindex M-C-m
1362 At the end of begin-type completion of tabular[*], array, itemize,
1363 enumerate or tabbing environment, or typing
1365 @table @kbd
1366 @item ESC RET
1367 @dots{} Intelligent newline
1368 @end table
1370 @noindent
1371 in these environments inserts the contents corresponding to the current
1372 environment in the next line. (At the begin-type completion, this
1373 contents can be removed by `undo'.) In @code{tabular} environment, for
1374 example, @kbd{ESC RET} inserts the certain number of @code{&} and trailing
1375 @code{\\}, and @code{\hline} if other @code{\hline} is found in backward.
1376 Here are the list of contents vs. environments.
1378 @itemize
1379 @item @code{tabular}, @code{tabular*}, @code{array}
1381 Corresponding number of @code{&} and @code{\\}.
1382 And @code{\hline} if needed.
1384 @item @code{tabbing}
1386 The same number of @code{\>} as @code{\=} in the first line.
1388 @item @code{itemize}, @code{enumerate}, @code{description}, @code{list}
1390 @code{\item} or @code{item[]}.
1391 @end itemize
1393 Note that since this function works seeing the contents of the first
1394 line, please call this after the second line if possible.
1396 If you want to apply these trick to other environments, @code{foo}
1397 environment for example, define the function named
1398 @code{YaTeX-intelligent-newline-foo} to insert corresponding contents.
1399 That function will be called at the beginning of the next line after the
1400 newline is inserted to the current line. Since the function
1401 @code{YaTeX-indent-line} is designed to indent the current line properly,
1402 calling this function before your code to insert certain contents must be
1403 useful. See the definition of the function
1404 @code{YaTeX-intelligent-newline-itemize} as an example.
1406 @node Online help, Browsing file hierarchy, Intelligent newline, Top
1407 @comment node-name, next, previous, up
1408 @chapter Online help
1409 @cindex online help
1410 @cindex prefix ?
1411 @cindex prefix /
1412 @cindex apropos
1413 @cindex keyword search
1415 YaTeX provides you the online help with popular La@TeX{} commands.
1417 Here are the key strokes for the online help.
1419 @table @kbd
1420 @item [prefix] ?
1421 @dots{} Online help
1422 @item [prefix] /
1423 @dots{} Online apropos
1424 @end table
1426 @section Online help
1428 `Online help' shows the documentation for the popular La@TeX{}
1429 commands(defaults to the commands on the cursor) in the next buffer.
1430 There are two help file, `global help' and `private help'. The former
1431 file contains the descriptions on the standard La@TeX{} command and is
1432 specified its name by variable @code{YaTeX-help-file}. Usually, the
1433 global help file should be located in public space (@code{$EMACSEXECPATH}
1434 by default) and should be world writable so that anyone can update it to
1435 enrich its contents. The latter file contains descriptions on
1436 non-standard or personal command definitions and is specified by
1437 @code{YaTeX-help-file-private}. This file should be put into private
1438 directory.
1440 @section Online apropos
1442 `Online apropos' is an equivalent of GNU Emacs's apropos. It
1443 shows all the documentations that contains the keyword entered by
1444 the user.
1446 @section When no descriptions are found...
1448 If there is no description on a command in help files, YaTeX
1449 requires you to write a description on that command. If you are
1450 willing to do, determine which help file to add and write the
1451 description on it referring your manual of (La)TeX. Please send
1452 me your additional descriptions if you describe the help on some
1453 standard commands. I might want to include it in the next
1454 distribution.
1456 @node Browsing file hierarchy, Cooperation with other packages, Online help, Top
1457 @comment node-name, next, previous, up
1458 @chapter Browsing file hierarchy
1459 @cindex hierarchy
1460 @cindex browsing
1462 When you are editing multi-file source, typing
1464 @table @kbd
1465 @item [prefix] d
1466 @dots{} browse file hierarchy
1467 @end table
1469 @noindent
1470 asks you the parent-most file (which may be defaulted) and displays the
1471 documentation hierarchy in the next window. In this buffer, the following
1472 commands are available.
1474 @table @kbd
1475 @item n
1476 @dots{} move to the next line and show its contents
1477 @item p
1478 @dots{} move to the previous line and show its contents
1479 @item N
1480 @dots{} move to the next file in the same inclusion level
1481 @item P
1482 @dots{} move to the previous file in the same inclusion level
1483 @item j
1484 @dots{} move to the next line
1485 @item k
1486 @dots{} move to the previous line
1487 @item u
1488 @dots{} move to the parent file
1489 @item .
1490 @dots{} show the current files contents in the next window
1491 @item SPC
1492 @dots{} scroll up the current file window
1493 @item DEL, b
1494 @dots{} scroll down the current file window
1495 @item <
1496 @dots{} show the beginning of the current file
1497 @item >
1498 @dots{} show the end of the current file
1499 @item >
1500 @dots{} return to the previous postion after @kbd{<} or @kbd{>}
1501 @item RET, g
1502 @dots{} open the current file in the next window
1503 @item mouse-2
1504 @dots{} same as RET(available only with window system)
1505 @item o
1506 @dots{} other window
1507 @item 1
1508 @dots{} delete other windows
1509 @item -
1510 @dots{} shrink hierarchy buffer window
1511 @item +
1512 @dots{} enlarge hierarchy buffer window
1513 @item ?
1514 @dots{} describe mode
1515 @item q
1516 @dots{} quit
1517 @end table
1519 Note that operations on the file contents in the next window do not work
1520 correctly when you close the corresponding file.
1522 @node Cooperation with other packages, Customizations, Browsing file hierarchy, Top
1523 @comment node-name, next, previous, up
1524 @chapter Cooperation with other packages
1526 YaTeX works better with other brilliant packages.
1528 @section gmhist
1529 @cindex gmhist
1530 @cindex command history
1531 @cindex minibuffer history
1533 When you are loading @file{gmhist.el} and @file{gmhist-mh.el}, you can
1534 use independent command history list at the prompt of preview command
1535 (@kbd{[prefix] tp}) and print command (@kbd{[prefix] tl}). On each
1536 prompt, you can enter the previous command line string repeatedly by
1537 typing @kbd{M-p}.
1539 @section min-out
1540 @cindex min-out
1542 @file{min-out}, the outline minor mode, can be used in yatex-mode
1543 buffers. If you want to use it with YaTeX, please refer the
1544 file @file{yatexm-o.el} as an example.
1546 @node Customizations, Etcetera, Cooperation with other packages, Top
1547 @comment node-name, next, previous, up
1548 @chapter Customizations
1549 @cindex customizations
1551 You can customize YaTeX by setting Emacs-Lisp variables and by making
1552 add-in functions.
1554 @menu
1555 * Lisp variables::
1556 * Add-in functions::
1557 * Add-in generator::
1558 @end menu
1560 @node Lisp variables, Add-in functions, Customizations, Customizations
1561 @comment node-name, next, previous, up
1562 @section Lisp variables
1563 @cindex customizable variables
1565 You can change the key assignments or make completion more comfortable
1566 by setting the values of various variables which control the movement of
1567 yatex-mode.
1569 For example, if you want to change the prefix key stroke from @kbd{C-c}
1570 to any other sequence, set YaTeX-prefix to whatever you want to use. If
1571 you don't want to use the key sequence @kbd{C-c letter} which is assumed
1572 to be the user reserved sequence in Emacs world, set
1573 @code{YaTeX-inhibit-prefix-letter} to @code{t}, and all of the default key
1574 bind of @kbd{C-c letter} will turn to the corresponding @kbd{C-c C-letter}
1575 (but the region based completions that is invoked with @kbd{C-c
1576 Capital-letter} remain valid, if you want to disable those bindings, set
1577 that variable to 1 instead of @code{t}).
1579 @menu
1580 * All customizable variables::
1581 * Sample definitions::
1582 * Hook variables::
1583 * Hook file::
1584 @end menu
1586 @node All customizable variables, Sample definitions, Lisp variables, Lisp variables
1587 @comment node-name, next, previous, up
1588 @subsection All customizable variables
1589 @cindex all customizable variables
1591 Here are the customizable variables of yatex-mode. Each value setq-ed
1592 in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is
1593 neglected. Parenthesized contents stands for the default value. When you
1594 are to change some of these variables, see more detailed documentation of
1595 the variable by @kbd{M-x describe-variable}.
1597 @defvar YaTeX-prefix
1598 Prefix key stroke (@kbd{C-c})
1599 @end defvar
1601 @defvar YaTeX-inhibit-prefix-letter
1602 Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter} (@code{nil})
1603 @end defvar
1605 @defvar YaTeX-fill-prefix
1606 Fill-prefix used in yatex-mode (@code{nil})
1607 @end defvar
1609 @defvar YaTeX-user-completion-table
1610 Name of user dictionary where learned completion table will be stored.
1611 (@code{"~/.yatexrc"})
1612 @end defvar
1614 @defvar tex-command
1615 La@TeX{} typesetter command (@code{"latex"})
1616 @end defvar
1618 @defvar dvi2-command
1619 Preview command (@code{"xdvi -geo +0+0 -s 4"})
1620 @end defvar
1622 @defvar dviprint-command-format
1623 Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"})
1624 @end defvar
1626 @defvar dviprint-from-format
1627 Start page format of above %f. %b will turn to start page (@code{"-f %b"})
1628 @end defvar
1630 @defvar dviprint-to-format
1631 End page format of above %t. %e will turn to @code{end} page (@code{"-t %e"})
1632 @end defvar
1634 @defvar makeindex-command
1635 Default makeindex command (@code{"makeindex"} (@code{"makeind"} on MS-DOS))
1636 @end defvar
1638 @defvar section-name
1639 Initial default value at the first section-type completion
1640 (@code{"documentstyle"})
1641 @end defvar
1643 @defvar env-name
1644 Initial default value at the first begin-type completion (@code{"document"})
1645 @end defvar
1647 @defvar fontsize-name
1648 Ditto of large-type (@code{"large"})
1649 @end defvar
1651 @defvar single-command
1652 Ditto of maketitle-type (@code{"maketitle"})
1653 @end defvar
1655 @defvar YaTeX-need-nonstop
1656 Put @code{\nonstopmode@{@}} or not (@code{nil})
1657 @end defvar
1659 @defvar latex-warning-regexp
1660 Regular expression of warning message latex command puts out
1661 (@code{"line.* [0-9]*"})
1662 @end defvar
1664 @defvar latex-error-regexp
1665 Regular expression of error message (@code{"l\\.[1-9][0-9]*"})
1666 @end defvar
1668 @defvar latex-dos-emergency-message
1669 Message latex command running on DOS puts at abort (@code{"Emergency stop"})
1670 @end defvar
1672 @defvar YaTeX-item-regexp
1673 Regular expression of item command (@code{"\\\\item"})
1674 @end defvar
1676 @defvar YaTeX-verb-regexp
1677 Regexp of verb family. Omit \\\\. (@code{"verb\\*?\\|path"})
1678 @end defvar
1680 @defvar YaTeX-nervous
1681 T for using local dictionary (@code{t})
1682 @end defvar
1684 @defvar YaTeX-sectioning-regexp
1685 Regexp of La@TeX{} sectioning command
1686 (@code{"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"})
1687 @end defvar
1689 @defvar YaTeX-fill-inhibit-environments
1690 Inhibit fill in these environments
1691 (@code{'("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" "verbatim" "verbatim*")})
1692 @end defvar
1694 @defvar YaTeX-uncomment-once
1695 T for deleting all preceding @code{%} (@code{nil})
1696 @end defvar
1698 @defvar YaTeX-close-paren-always
1699 T for always close all parenthesis automatically, @code{nil} for only eol
1700 (@code{t})
1701 @end defvar
1703 @defvar YaTeX-auto-math-mode
1704 Switch math-mode automatically (@code{t})
1705 @end defvar
1707 @defvar YaTeX-math-key-list-private
1708 User defined alist, math-mode-prefix vs completion alist
1709 used in image completion (@code{nil}). See @file{yatexmth.el}
1710 for the information about how to define a completion alist.
1711 @end defvar
1713 @defvar YaTeX-default-pop-window-height
1714 Initial height of typesetting buffer when one-window.
1715 Number for the lines of the buffer, numerical string for
1716 the percentage of the screen-height. @code{nil} for half height (10)
1717 @end defvar
1719 @defvar YaTeX-help-file
1720 Global online help file name (@file{$EMACS/etc/YATEXHLP.jp})
1721 @end defvar
1723 @defvar YaTeX-help-file-private
1724 Private online help file name (@file{"~/YATEXHLP.jp"})
1725 @end defvar
1727 @defvar YaTeX-no-begend-shortcut
1728 Disable [prefix] b ?? shortcut (@code{nil)}
1729 @end defvar
1731 @defvar YaTeX-hilit-pattern-adjustment-private
1732 List of the list that contain the regular expression and the symbol of
1733 logical meaning of the string that matches the pattern. See also the
1734 value from @code{(assq 'yatex-mode hilit-patterns-alist)} and the value of
1735 @code{YaTeX-hilit-pattern-adjustment-default} (and even the document of
1736 hilit19.el).
1737 @end defvar
1739 @defvar YaTeX-sectioning-level
1740 Alist of LaTeX's sectioning command vs its height.
1741 @end defvar
1743 @defvar YaTeX-hierarchy-ignore-heading-regexp
1744 @code{YaTeX-display-hierarchy} searches for sectioning command first, and
1745 comment line secondary as a file headings. In latter case, ignore lines
1746 that match with regular expression of this variable. Default value of
1747 this variable is RCS header expressions and mode specifying line `-*- xxxx
1748 -*'.
1749 @end defvar
1751 @defvar YaTeX-skip-default-reader
1752 Non-nil for this variable skips the default argument reader of
1753 section-type command when add-in function for it is not defined
1754 (@code{nil})
1755 @end defvar
1757 @defvar YaTeX-create-file-prefix-g
1758 When typing @kbd{prefix g} on the @code{\include} line,
1759 open the target file even if the file doesn't exist (@code{nil})
1760 @end defvar
1762 @defvar YaTeX-simple-messages
1763 Simplyfy messages of various completions (@code{nil})
1764 @end defvar
1766 @defvar YaTeX-hilit-sectioning-face
1767 When hilit19 and yatex19 is active, YaTeX colors the sectioning commands.
1768 This variable specifies the foreground and background color of
1769 @code{\part} macro. The default value is @code{'(yellow/dodgerblue
1770 yellow/slateblue)}. The first element of this list is for the screen when
1771 @code{hilit-background-mode} is @code{'light}, and the second element is
1772 for @code{'dark}. You should specify both color as `forecolor/backcolor'.
1773 @end defvar
1775 @defvar YaTeX-hilit-sectioning-attenuation-rate
1776 When color mode, this variable specifies how much attenuate the color
1777 density of @code{\subparagraph} compared with that of @code{\chapter}
1778 (@code{'(15 40)}) See also @code{YaTeX-hilit-sectioning-face}.
1779 @end defvar
1781 @defvar YaTeX-use-AMS-LaTeX
1782 If you use AMS-LaTeX, set to @code{t} (@code{nil})
1783 @end defvar
1785 @node Sample definitions, Hook variables, All customizable variables, Lisp variables
1786 @comment node-name, next, previous, up
1787 @subsection Sample definitions
1788 @cindex prefix key stroke
1789 @cindex fill-prefix
1791 For instance, to change the prefix key stroke to @kbd{ESC}, and name of
1792 the user dictionary @file{~/src/emacs/yatexrc}, and set @code{fill-prefix}
1793 to single TAB character, add the following @code{setq} to @file{~/.emacs}.
1795 @lisp
1796 (setq YaTeX-prefix "\e"
1797 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1798 YaTeX-fill-prefix " ")
1799 @end lisp
1801 @node Hook variables, Hook file, Sample definitions, Lisp variables
1802 @comment node-name, next, previous, up
1803 @subsection Hook variables
1804 @cindex hook variables
1806 More customizations will be done by the hook-function defined in
1807 hook-variable @code{yatex-mode-hook}. This is useful to define a shortcut
1808 key sequence to enter some environments other than @code{document} and
1809 @code{enumerate} etc. The following statement defines @code{[prefix] ba}
1810 to enter @code{\begin@{abstract@}} ... @code{=end@{abstract@}}
1811 immediately.
1813 @lisp
1814 (setq yatex-mode-hook
1815 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1816 @end lisp
1818 You should use functions @code{YaTeX-define-key}, or
1819 @code{YaTeX-define-begend-key} to define all the key sequences of
1820 yatex-mode.
1822 @node Hook file, , Hook variables, Lisp variables
1823 @comment node-name, next, previous, up
1824 @subsection Hook file
1825 @cindex hook file
1827 You can stuff all of YaTeX related expressions into a file named
1828 @file{yatexhks.el} if you have a lot of codes. YaTeX automatically load
1829 this file at the initialization of itself. Using @file{yatexhks.el}
1830 makes @code{yatex-mode-load-hook} unnecessary.
1832 @node Add-in functions, Add-in generator, Lisp variables, Customizations
1833 @comment node-name, next, previous, up
1834 @section Add-in functions
1835 @cindex add-in functions
1836 @cindex yatexadd.el
1838 You can easily define a function to input detailed arguments
1839 with completion according to La@TeX{} environments or commands.
1841 @c @node What is add-in functions?, , Add-in functions, Add-in functions
1842 @comment node-name, next, previous, up
1843 @subsection What is add-in functions?
1844 @cindex tabular
1846 When you input @code{tabular} environment, don't you think ``I want
1847 YaTeX to complete its argument toward my favorite one such as
1848 @code{@{|c|c|c|@}}...''? Yes, you can define the function to complete
1849 arguments for any environment and any La@TeX{} commands.
1851 @subsection Procedure
1853 Here is the procedure to define add-in functions.
1854 @enumerate
1855 @item
1856 Define the function
1857 @item
1858 Put the function into @file{yatexhks.el}
1859 @end enumerate
1861 @menu
1862 * How the add-in function works::
1863 * How the function is called::
1864 * Useful functions for creating add-in::
1865 * Contribution::
1866 @end menu
1868 @node How the add-in function works, How the function is called, Add-in functions, Add-in functions
1869 @comment node-name, next, previous, up
1870 @subsection How the add-in function works
1872 There are two kinds of add-in. @dfn{Option add-in} returns the
1873 La@TeX{}'s optional parameters such as optional strings after
1874 @code{\begin@{ENV@}}, optional strings between a section-type command
1875 and its first argument, and optional strings just after type
1876 maketitle-type command. The following illustrates the name of add-in
1877 functions, where underlined strings are generated by add-in functions.
1879 @display
1880 \begin{table}[ht] (Function name: YaTeX:table)
1881 ~~~~
1882 \put(100,200){} (Function name: YaTeX:put)
1883 ~~~~~~~~~
1884 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1885 ~~~~~~~~~~
1886 @end display
1888 Obviously, the function name is decided by concatenating the prefix
1889 `YaTeX:' and La@TeX{} command's name.
1891 Another add-in type is @dfn{argument add-in}, which completes arguments
1892 for section-type commands.
1894 @display
1895 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1896 ~~~~ ~~~
1897 @end display
1899 When the section-type command is inputted, the function named by
1900 concatenating `YaTeX::' and section-type command, is called automatically
1901 with an integer argument which indicates which argument of section-type
1902 command is being read. Thus the add-in should determine the
1903 job referring the value of its argument.
1905 @menu
1906 * Defining `option add-in'::
1907 * Defining `argument add-in'::
1908 @end menu
1910 @node Defining `option add-in', Defining `argument add-in', How the add-in function works, How the add-in function works
1911 @comment node-name, next, previous, up
1912 @subsubsection Defining `option add-in'
1914 If you want @code{@{|c|c|c|@}} for all @code{tabular} environment,
1916 @lisp
1917 (defun YaTeX:tabular ()
1918 "{|c|c|c|}")
1919 @end lisp
1921 @noindent
1922 is enough. If you want more complicated format, define as below.
1924 @lisp
1925 (defun YaTeX:tabular ()
1926 "@{@@@{\\vrule width 1pt\\ @}|||@@@{\\ \\vrule width 1pt@}@}")
1927 @end lisp
1929 @noindent
1930 Note that the character @code{\} must be described as @code{\\} in
1931 Emacs-Lisp. The next example reads the tabular format from keyboard.
1932 @lisp
1933 (defun YaTeX:tabular ()
1934 (concat "{" (read-string "Rule: ") "}"))
1935 @end lisp
1937 @node Defining `argument add-in', , Defining `option add-in', How the add-in function works
1938 @comment node-name, next, previous, up
1939 @subsubsection Defining `argument add-in'
1941 This section describes how to define the add-in function for
1942 @code{\newcommand}.
1944 The first argument of @code{\newcommand} begins always with @code{\}.
1945 The second argument is usually so complex that we can not edit them in the
1946 minibuffer. Here is the created function considering this.
1948 @lisp
1949 (defun YaTeX::newcommand (n) ;n is argument position
1950 (cond
1951 ((= n 1) ;1st argument is macro name
1952 (read-string "Command: " "\\")) ;initial input `\'
1953 ((= n 2) "") ;do nothing when reading arg#2
1954 (t nil)))
1955 @end lisp
1957 Note that when the `argument add-in' function return `nil', normal
1958 argument reader will be called.
1960 @node How the function is called, Useful functions for creating add-in, How the add-in function works, Add-in functions
1961 @comment node-name, next, previous, up
1962 @subsection How the function is called
1964 YaTeX calls the add-in functions for specified begin-type, section-type,
1965 and maketitle-type command, if any. `Option add-in' functions for
1966 begin-type are called when @code{\begin@{ENV@}} has been inserted,
1967 functions for section-type are called just before input of the first
1968 argument, and functions for maketitle-type is called after maketitle-type
1969 command has been inserted. `Argument add-in' functions are called at each
1970 entry of arguments for section-type commands.
1972 @node Useful functions for creating add-in, Contribution, How the function is called, Add-in functions
1973 @comment node-name, next, previous, up
1974 @subsection Useful functions for creating add-in
1976 Many add-in functions for typical La@TeX{} commands are defined in
1977 @file{yatexadd.el}. Those are also useful as references. Here are the
1978 short descriptions on useful functions, where [F] means function, [A]
1979 means arguments, [D] means description.
1981 @itemize
1982 @item [F]
1983 YaTeX:read-position
1984 @itemx [A]
1985 Character list which can show up in the brackets
1986 @itemx [D]
1987 Return the location specifier such as `[htb]'. When
1988 nothing is entered, omit [] itself. If the possible characters
1989 are "htbp", call this function as
1990 @code{(YaTeX:read-position "htbp")}
1992 @item [F]
1993 YaTeX:read-coordinates
1994 @itemx [A]
1995 Base prompt, X-axis prompt, Y-axis prompt (each optional)
1996 @itemx [D]
1997 Read the coordinates with the prompt ``BasePrompt X-axisPrompt:'' for
1998 X-axis, ``BasePrompt Y-axisPrompt:'' for Y-axis, and return it in the form
1999 of ``(X,Y)''. The default prompts are @code{Dimension}, @code{X},
2000 @code{Y} respectively.
2002 @item [F]
2003 YaTeX:check-completion-type
2004 @itemx [A]
2005 One of the symbols: 'begin, 'section, or 'maketitle
2006 @itemx [D]
2007 Check the current completion type is specified one and cause error if
2008 not. The variable @code{YaTeX-current-completion-type} holds the symbol
2009 according to the current completion type.
2010 @end itemize
2012 @node Contribution, , Useful functions for creating add-in, Add-in functions
2013 @comment node-name, next, previous, up
2014 @subsection Contribution
2016 If you make your own pretty function and you let it be in public, please
2017 send me the function. I'm going to include it in the next release.
2019 @node Add-in generator, , Add-in functions, Customizations
2020 @comment node-name, next, previous, up
2021 @section Add-in generator
2023 First, don't forget to read the section of add-in functions @ref{Add-in
2024 functions}. If you easily understand how to define them, there's no need
2025 to read this section. But being not familiar with Emacs-Lisp, when you
2026 don't have clear idea what to do, this section describes how to get YaTeX
2027 make add-in function.
2029 There are two methods of generation. One is for fully interactive
2030 generator for beginners and another requires little knowledge of
2031 Emacs-Lisp.
2033 @subsection Generator for beginners
2034 The former generator is called by
2035 @center @kbd{M-x YaTeX-generate}
2037 @noindent
2038 strokes. All you have to do is follow the guidances. Defying them may cases
2039 the disaster (I wonder what is it???). So when you make some mistake, it
2040 is recommendable to type @kbd{C-g} and start afresh.
2042 @subsection Simple generator
2044 The latter generator is invoked by the next sequence.
2045 @center @kbd{M-x YaTeX-generate-simple}
2046 This generator can make both ``option add-in'' and ``argument add-in''
2047 (@emph{refer the section add-in functions}
2048 @ref{How the add-in function works?}), whereas @code{YaTeX-generate}
2049 cannot make ``argument addin''.
2051 For example, assume you have the LaTeX command as follows.
2053 @example
2054 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
2055 (A) (B) (1) (2) (3)
2056 (A)Optional parameter to specify the position
2057 One of t(top), b(bottom), l(left), r(right)
2058 (B)Maximum size of frame
2059 (1)1st argument is filename of EPS file
2060 (2)2nd argument indicates
2061 plain do nothing
2062 frame make frame around image
2063 dframe make double-frame around image
2064 for included EPS file.
2065 (3)Caption for the picture
2066 @end example
2068 Now get start with generation. Typing @kbd{M-x YaTeX-generate-simple}
2069 brings the prompt:
2070 @display
2071 (O)ption? (A)rgument?
2072 @end display
2074 @subsubsection Generating ``option add-in''
2075 @cindex option add-in
2077 Since (A), (B) above are optional argument, all we have to do to
2078 complete them is define the option add-in for them. Let's generate the
2079 function to complete (A).
2081 @display
2082 M-x YaTeX-generate-simple RET
2083 epsinput RET
2085 @end display
2087 @noindent
2088 Typing as above leads the next prompt.
2090 @display
2091 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
2092 @end display
2094 @noindent
2095 This asks that ``Which type is the completion style of 1st argument?''.
2096 Here are the possible completion style.
2098 @table @code
2099 @item String
2100 read plain string
2101 @item Complete
2102 read with completion
2103 @item File
2104 read file name
2105 @item Option
2106 read optional string (if string omitted, omit [] too)
2107 @item Position
2108 read positional option (like [htbp])
2109 @item Coord.
2110 read coordinates
2111 @item Quit
2112 quit from generating
2113 @end table
2115 Since (A) is the optional argument to specify the location of included
2116 EPS file, the completion style is @code{Position}, and the possible
2117 characters are t, b, l, and r. To tell these information to generator,
2118 operate as follows.
2120 @display
2121 Read type(1).... p
2122 Acceptable characters: tblr RET
2123 @end display
2125 (B) is coordinate. So its completion style is coOrd. We want a prompt
2126 meaning ``Maximum size'' when completion.
2128 @display
2129 Read type(2).... o
2130 Prompt for coordinates: Max size RET
2131 @end display
2133 That's all for optional argument. Select quit.
2135 @display
2136 Read type(3).... q
2137 @end display
2139 Then the generated option add-in function for \epsinput will be shown in
2140 the next window.
2142 @subsubsection Generating ``argument add-in''
2143 @cindex argument add-in
2145 Next, create the argument add-in. The arguments for \epsinput are EPS
2146 file name, framing style, and caption string in sequence.
2148 @display
2149 M-x YaTeX-generate-simple RET
2150 epsinput RET
2152 @end display
2154 Above key strokes bring the prompt that asks the number of argument.
2155 Answer it with 3.
2157 @display
2158 How many arguments?: 3 RET
2159 @end display
2161 Then the generator asks the completion style and prompt for completion.
2162 Answer them. @kbd{f} for FileName and prompt string.
2164 @display
2165 Read type(1).... f
2166 Prompt for argument#1 EPS file name RET
2167 @end display
2169 The second argument is one of selected symbol. So the completion type
2170 is @code{Completion}.
2172 @display
2173 Read type(2).... c
2174 Prompt for argument#2 Include style RET
2175 @end display
2177 Then all the candidates ready to be read. Type single RET after
2178 entering all.
2180 @display
2181 Item[1](RET to exit): plain RET
2182 Item[2](RET to exit): frame RET
2183 Item[3](RET to exit): dframe RET
2184 Item[4](RET to exit): RET
2185 @end display
2187 The following prompt asks whether the entered string must belong to
2188 candidates or not. In this case, since the argument must be one of
2189 @code{plain}, @code{frame}, and @code{dframe}, type @code{y}.
2191 @display
2192 Require match? (y or n) y
2193 @end display
2195 The last argument is the caption string for which any completion is
2196 needed.
2198 @display
2199 Read type(3).... s
2200 Prompt for argument#3 Caption RET
2201 default: Figure of RET
2202 @end display
2204 Finally we'll get the argument add-in in the next window.
2206 @subsection Contribution
2208 If you get your own pretty function and you let it be in public, please
2209 steel yourself in the happy atmosphere and do not send me the function.
2210 I do know it is not fine because it is generated by yatexgen:-p.
2212 @node Etcetera, Copying, Customizations, Top
2213 @comment node-name, next, previous, up
2214 @chapter Etcetera
2216 The standard completion tables provided in @file{yatex.el} contain a
2217 few La@TeX{} commands I frequently use. This is to lessen the key
2218 strokes to complete entire word, because too many candidates
2219 rarely used often cause too many hits. Therefore always try to
2220 use completion in order to enrich your dictionary, and you will
2221 also find `Wild Bird' growing suitable for your La@TeX{} style.
2223 The package name `Wild Bird' is the English translation of Japanese
2224 title `Yachou', which is a trick on words of Japanese.
2226 @node Copying, , Etcetera, Top
2227 @comment node-name, next, previous, up
2228 @chapter Copying
2230 This program is distributed as a free software. You can
2231 redistribute this software freely but with NO warranty to anything
2232 as a result of using this software. However, any reports and
2233 suggestions are welcome as long as I feel interests in this
2234 software. My possible e-mail address is `yuuji@@ae.keio.ac.jp'.
2235 (up to Mar.1995 at least) And there is mailing list for YaTeX.
2236 Although the common language is Japanese, questions in English will be
2237 welcome. To join the ML, send the mail whose subject is `append' to
2238 the address `yatex-control@@jaist.ac.jp'. If you have some
2239 question, please ask to `yatex-request@@jaist.ac.jp'.
2241 The specification of this software will be surely modified
2242 (depending on my feelings) without notice :-p.
2245 @flushright
2246 HIROSE Yuuji
2247 @end flushright
2248 @bye
2250 Local variables:
2251 mode: texinfo
2252 fill-prefix: nil
2253 fill-column: 74
2254 End: