yatex

view docs/yatexe.tex @ 68:0eb6997bee16

More adjustment for Emacs20 and XEmacs [prefix] g for <applet> <!--#include> <!--#exec>
author yuuji
date Mon, 26 Oct 1998 12:05:32 +0000
parents df0bf1465254
children 807c1e7e68b7
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::
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 Cursor jump
82 * Jump to corresponding object::
83 * Invoking image processor::
84 * Jump to main file::
85 * Jumping around the environment::
86 * Jumping to last completion position::
88 Changing and Deleting
90 * Changing LaTeX commands::
91 * Killing LaTeX commands::
93 Customizations
95 * Lisp variables::
96 * Add-in functions::
97 * Add-in generator::
99 Lisp variables
101 * All customizable variables::
102 * Sample definitions::
103 * Hook variables::
104 * Hook file::
106 Procedure
108 * How the add-in function works::
109 * How the function is called::
110 * Useful functions for creating add-in::
111 * Contribution::
113 How the add-in function works
115 * Defining option-add-in::
116 * Defining argument-add-in::
117 @end menu
119 @node What is YaTeX?, Main features, Top, Top
120 @comment node-name, next, previous, up
121 @chapter What is YaTeX?
123 YaTeX automates typesetting and previewing of LaTeX and enables
124 completing input of LaTeX mark-up command such as
125 @code{\begin@{@}}..@code{\end@{@}}.
127 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
128 Language Enhancement to GNU Emacs), and latex on DOS.
130 @node Main features, Installation, What is YaTeX?, Top
131 @comment node-name, next, previous, up
132 @chapter Main features
134 @itemize
135 @item Invocation of typesetter, previewer and related programs(@kbd{C-c t})
136 @item Typesetting on static region which is independent from point
137 @item Semiautomatic replacing of @code{\includeonly}
138 @item Jumping to error line(@kbd{C-c '})
139 @item Completing-read of La@TeX{} commands such as @code{\begin@{@}},
140 @code{\section} etc.
141 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m})
142 @item Enclosing text into La@TeX{} environments or commands
143 (@kbd{C-u} @var{AboveKeyStrokes})
144 @item Displaying the structure of text at entering sectioning commands
145 @item Lump shifting of sectioning commands (@ref{view-sectioning})
146 @item Learning unknown/new La@TeX{} commands for the next completion
147 @item Argument reading with a guide for complicated La@TeX{} commands
148 @item Generating argument-readers for new/unsupported commands(@file{yatexgen})
149 @item Quick changing or deleting of La@TeX{} commands(@kbd{C-c c}, @kbd{C-c k})
150 @item Jumping from and to inter-file, begin<->end, ref<->label(@kbd{C-c g})
151 @item Blanket commenting out or uncommenting
152 (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .})
153 @item Easy input of accent mark, math-mode's commands and Greek letters
154 (@kbd{C-c a}, @kbd{;}, @kbd{:})
155 @item Online help for the popular La@TeX{} commands
156 (@kbd{C-c ?}, @kbd{C-c /})
157 @item Document files hierarchy browser (@kbd{C-c d})
158 @end itemize
160 @node Installation, Typesetting, Main features, Top
161 @comment node-name, next, previous, up
162 @chapter Installation
163 @cindex installation
164 @cindex .emacs
165 @cindex auto-mode-alist
166 @cindex autoload
168 Put next two expressions into your @file{~/.emacs}.
170 @lisp
171 (setq auto-mode-alist
172 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
173 (autoload 'yatex-mode "yatex" "Yet Another La@TeX{} mode" t)
174 @end lisp
176 Next, add certain path name where you put files of YaTeX to your
177 load-path. If you want to put them in @file{~/src/emacs}, write
179 @lisp
180 (setq load-path
181 (cons (expand-file-name "~/src/emacs") load-path))
182 @end lisp
184 @noindent
185 in your @file{~/.emacs}
187 Then, yatex-mode will be automatically loaded when you visit a
188 file which has extension @file{.tex}. If yatex-mode is successfully
189 loaded, mode string on mode line will be turned to "YaTeX".
192 @node Typesetting, %#notation, Installation, Top
193 @comment node-name, next, previous, up
194 @chapter Typesetting
195 @cindex typesetting
196 @cindex previewer
197 @cindex typesetter
198 @cindex latex
199 @cindex printing out
201 The prefix key stroke of yatex-mode is @kbd{C-c} (Press 'C' with Control
202 key) by default. If you don't intend to change the prefix key stroke,
203 assume all @kbd{[prefix]} as @kbd{C-c} in this document. These key
204 strokes execute typeset or preview command.
206 @table @kbd
207 @item [prefix] t j
208 @dots{} invoke latex
209 @item [prefix] t r
210 @dots{} invoke latex on region
211 @item [prefix] t k
212 @dots{} kill current typesetting process
213 @item [prefix] t b
214 @dots{} invoke bibtex
215 @item [prefix] t p
216 @dots{} preview
217 @item [prefix] t l
218 @dots{} lpr dvi-file
219 @item [prefix] t s
220 @dots{} search current string on xdvi-remote
221 @end table
223 @menu
224 * Calling typesetter::
225 * Calling previewer::
226 * Printing out::
227 @end menu
229 @node Calling typesetter, Calling previewer, Typesetting, Typesetting
230 @comment node-name, next, previous, up
231 @section Calling typesetter
233 Typing @kbd{[prefix] t j}, the current editing window will be divided
234 horizontally when you invoke latex command, and log message of La@TeX{}
235 typesetting will be displayed in the other window; called typesetting
236 buffer. The typesetting buffer automatically scrolls up and traces
237 La@TeX{} warnings and error messages. If you see latex stopping by an
238 error, you can send string to latex in the typesetting buffer.
240 If an error stops the La@TeX{} typesetting, this key stroke will
241 move the cursor to the line where La@TeX{} error is detected.
243 @table @kbd
244 @item [prefix] '
245 @itemx ([prefix]+single quotation)
247 @dots{} jump to the previous error or warning
248 @end table
250 If you find a noticeable error, move to the typesetting buffer and move
251 the cursor on the line of error message and type @kbd{SPACE} key. This
252 makes the cursor move to corresponding source line.
254 Since @kbd{[prefix] tr} pastes the region into the file
255 @file{texput.tex} in the current directory, you should be careful of
256 overwriting. The method of specification of the region is shown in the
257 section @xref{%#notation}.
259 The documentstyle for typeset-region is the same as that of editing
260 file if you edit one file, and is the same as main file's if you
261 edit splitting files.
263 @node Calling previewer, Printing out, Calling typesetter, Typesetting
264 @comment node-name, next, previous, up
265 @section Calling previewer
267 @kbd{[prefix] t p} invokes the TeX previewer. And if you are using
268 xdvi-remote, which can be controled from other terminals, @kbd{[prefix] t
269 s} enables you to search current string at the cursor on the running xdvi
270 window. You can get xdvi with `-remote feature' from;
271 @code{ftp://ftp.ae.keio.ac.jp/pub/text/xdvi/xdvi-remote}.
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 * Static region for typesetting::
296 * Lpr format::
297 * Editing %# notation::
298 @end menu
300 @node Changing typesetter, Static region for typesetting, %#notation, %#notation
301 @comment node-name, next, previous, up
302 @section To change the `latex' command or to split a source text.
303 @cindex typesetter
305 To change the typesetting command, write
307 @example
308 %#!latex-big
309 @end example
311 @noindent
312 anywhere in the source text. This is useful for changing
313 typesetter.
315 @node Splitting input files, Static region for typesetting, Changing typesetter, %#notation
316 @comment node-name, next, previous, up
318 And if you split the source text and
319 edit subfile that should be included from main text.
321 @example
322 %#!latex main.tex
323 @end example
325 @noindent
326 will be helpful to execute latex on main file from sub text buffer. Since
327 this command line after @kbd{%#!} will be sent to shell literally, next
328 description makes it convenient to use ghostview as dvi-previewer.
330 @example
331 %#!latex main ; dvi2ps main.dvi > main
332 @end example
334 @noindent
335 Note that YaTeX assumes the component before the last period of
336 the last word in this line as base name of the main La@TeX{} source.
338 To make best use of the feature of inter-file jumping by
339 @kbd{[prefix] g} (see @ref{Cursor jump}), take described below into
340 consideration.
342 @itemize
343 @item You can put split texts in sub directory, but not in
344 sub directory of sub directory.
345 @item In the main text, specify the child file name with relative path name
346 such as \include{chap1/sub}, when you include the file in
347 a sub-directory.
348 @item In a sub-text, write @code{%#!latex main.tex} even if @file{main.tex}
349 is in the parent directory(not %#!latex ../main.tex).
350 @end itemize
352 @node Static region for typesetting, Lpr format, Changing typesetter, %#notation
353 @comment node-name, next, previous, up
354 @section Static region
355 @cindex static region
356 @cindex Fixed region
358 Typeset-region by @kbd{[prefix] tr} passes the region between point and
359 mark to typesetting command by default. But when you want to typeset
360 static region, enclose the region by @code{%#BEGIN} and @code{%#END} as
361 follows.
363 @example
364 %#BEGIN
365 TheRegionYouWantToTypesetManyTimes
366 %#END
367 @end example
369 This is the rule of deciding the region.
371 @enumerate
372 @item
373 If there exists %#BEGIN before point,
375 @enumerate
376 @item
377 If there exists %#END after %#BEGIN,
378 @itemize
379 @item From %#BEGIN to %#END.
380 @end itemize
382 @item
383 If %#END does not exist after %#BEGIN,
384 @itemize
385 @item From %#BEGIN to the end of buffer.
386 @end itemize
387 @end enumerate
389 @item
390 If there does not exist %#BEGIN before point,
391 @itemize
392 @item Between point and mark(standard method of Emacs).
393 @end itemize
394 @end enumerate
396 It is useful to write @code{%#BEGIN} in the previous line of \begin and
397 @code{%#END} in the next line of \@code{end} when you try complex
398 environment such as `tabular' many times. It is also useful to put only
399 @code{%#BEGIN} alone at the middle of very long text. Do not forget to
400 erase @code{%#BEGIN} @code{%#END} pair.
402 @node Lpr format, Editing %# notation, Static region for typesetting, %#notation
403 @comment node-name, next, previous, up
404 @section Lpr format
405 @cindex lpr format
407 Lpr format is specified by three Lisp variables. Here are the
408 default values of them.
410 @table @code
411 @item (1)dviprint-command-format
412 @code{"dvi2ps %f %t %s | lpr"}
413 @item (2)dviprint-from-format
414 @code{"-f %b"}
415 @item (3)dviprint-to-format
416 @code{"-t %e"}
417 @end table
419 On YaTeX-lpr, @code{%s} in (1) is replaced by the file name of main
420 text, @code{%f} by contents of (2), %t by contents of (3). At these
421 replacements, @code{%b} in (2) is also replaced by the number of beginning
422 page, @code{%e} in (3) is replaced by the number of ending page. But
423 @code{%f} and @code{%t} are ignored when you omit the range of print-out
424 by @kbd{C-u [prefix] tl}.
426 If you want to change this lpr format temporarily, put a command
427 such as follows somewhere in the text:
429 @example
430 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
431 @end example
433 And if you want YaTeX not to ask you the range of printing
434 out, the next example may be helpful.
436 @example
437 %#LPR dvi2ps %s | lpr
438 @end example
440 @node Editing %# notation, , Lpr format, %#notation
441 @comment node-name, next, previous, up
442 @section Editing %# notation
444 To edit @code{%#} notation described above, type
446 @table @kbd
447 @item [prefix] %
448 @dots{} editing %# notation menu
449 @end table
451 @noindent
452 and select one of the entry of the menu as follows.
454 @example
455 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
456 @end example
458 @noindent
459 Type @kbd{!} to edit @code{%#!} entry, @code{b} to enclose the region with
460 @code{%#BEGIN} and @code{%#END}, and @code{l} to edit @code{%#LPR} entry.
461 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are
462 automatically erased.
464 @node Completion, Local dictionaries, %#notation, Top
465 @comment node-name, next, previous, up
466 @chapter Completion
467 @cindex completion
469 YaTeX makes it easy to input the La@TeX{} commands. There are several
470 kinds of completion type, begin-type, section-type, large-type, etc...
472 @menu
473 * Begin-type completion::
474 * Section-type completion::
475 * Large-type completion::
476 * Maketitle-type completion::
477 * Arbitrary completion::
478 * End completion::
479 * Accent completion::
480 * Image completion::
481 * Greek letters completion::
482 @end menu
484 @node Begin-type completion, Section-type completion, Completion, Completion
485 @comment node-name, next, previous, up
486 @section Begin-type completion
487 @cindex begin-type completion
488 @cindex environment
489 @cindex prefix b
491 "Begin-type completion" completes commands of @code{\begin@{env@}} ...
492 @code{\end@{env@}}. All of the begin-type completions begin with this key
493 sequence.
495 @table @kbd
496 @item [prefix] b
497 @dots{} start begin-type completion
498 @end table
500 @noindent
501 An additional key stroke immediately completes a frequently used
502 La@TeX{} @code{\begin@{@}}...@code{\@code{end}@{@}} environment.
504 @table @kbd
505 @item [prefix] b c
506 @dots{} @code{\begin@{center@}...\end@{center@}}
507 @item [prefix] b d
508 @dots{} @code{\begin@{document@}...\end@{document@}}
509 @item [prefix] b D
510 @dots{} @code{\begin@{description@}...\end@{description@}}
511 @item [prefix] b e
512 @dots{} @code{\begin@{enumerate@}...\end@{enumerate@}}
513 @item [prefix] b E
514 @dots{} @code{\begin@{equation@}...\end@{equation@}}
515 @item [prefix] b i
516 @dots{} @code{\begin@{itemize@}...\end@{itemize@}}
517 @item [prefix] b l
518 @dots{} @code{\begin@{flushleft@}...\end@{flushleft@}}
519 @item [prefix] b m
520 @dots{} @code{\begin@{minipage@}...\end@{minipage@}}
521 @item [prefix] b t
522 @dots{} @code{\begin@{tabbing@}...\end@{tabbing@}}
523 @item [prefix] b T
524 @dots{} @code{\begin@{tabular@}...\end@{tabular@}}
525 @item [prefix] b^T
526 @dots{} @code{\begin@{table@}...\end@{table@}}
527 @item [prefix] b p
528 @dots{} @code{\begin@{picture@}...\end@{picture@}}
529 @item [prefix] b q
530 @dots{} @code{\begin@{quote@}...\end@{quote@}}
531 @item [prefix] b Q
532 @dots{} @code{\begin@{quotation@}...\end@{quotation@}}
533 @item [prefix] b r
534 @dots{} @code{\begin@{flushright@}...\end@{flushright@}}
535 @item [prefix] b v
536 @dots{} @code{\begin@{verbatim@}...\end@{verbatim@}}
537 @item [prefix] b V
538 @dots{} @code{\begin@{verse@}...\end@{verse@}}
539 @end table
541 Any other La@TeX{} environments are made by completing-read of the
542 Emacs function.
544 @table @kbd
545 @item [prefix] b SPACE
546 @dots{} begin-type completion
547 @end table
549 @noindent
550 The next message will show up in the minibuffer
552 @example
553 Begin environment(default document):
554 @end example
556 @noindent
557 by typing @kbd{[prefix] b}. Put the wishing environment with completion
558 in the minibuffer, and @code{\begin@{env@}}...\@code{\end@{env@}} will be
559 inserted in the La@TeX{} source text. If the environment you want to put
560 does not exist in the YaTeX completion table, it will be registered in the
561 user completion table. YaTeX automatically saves the user completion
562 table in the user dictionary file at exiting of emacs.
564 At the completion of certain environments, the expected initial entry will
565 automatically inserted such as @code{\item} for @code{itemize}
566 environment. If you don't want the entry, it can be removed by undoing.
568 If you want to enclose some paragraphs which have already been
569 written, invoke the begin-type completion with changing the case
570 of @kbd{b} of key sequence upper(or invoke it with universal argument
571 by @kbd{C-u} prefix).
572 @cindex enclose region into environment
574 The following example encloses a region with `description'
575 environment.
577 @table @kbd
578 @item [prefix] B D
579 @itemx (or ESC 1 [prefix] b D)
580 @itemx (or C-u [prefix] b D)
582 @dots{} begin-type completion for region
583 @end table
585 This enclosing holds good for the completing input by @kbd{[prefix] b
586 SPC}. @kbd{[prefix] B SPC} enclose a region with the environment selected
587 by completing-read.
589 @node Section-type completion, Large-type completion, Begin-type completion, Completion
590 @comment node-name, next, previous, up
591 @section Section-type completion
592 @cindex section-type completion
593 @cindex prefix s
595 "Section-type completion" completes section-type commands which take an
596 argument or more such as @code{\section@{foo@}}. To invoke section-type
597 completion, type
599 @table @kbd
600 @item [prefix] s
601 @dots{} section-type completion
602 @end table
604 @noindent
605 then the prompt
607 @example
608 (C-v for view) \???@{@} (default documentstyle):
609 @end example
611 @noindent
612 will show up in the minibuffer. Section-type La@TeX{} commands are
613 completed by space key, and the default value is selected when you
614 type nothing in the minibuffer.
616 Next,
618 @example
619 \section@{???@}:
620 @end example
622 @noindent
623 prompts you the argument of section-type La@TeX{} command. For
624 example, the following inputs
626 @example
627 \???@{@} (default documentstyle): section
628 \section{???}: Hello world.
629 @end example
631 @noindent
632 will insert the string
634 @example
635 \section@{Hello world.@}
636 @end example
638 in your La@TeX{} source. When you neglect argument such as
640 @example
641 (C-v for view) \???@{@} (default section): vspace*
642 \vspace*@{???@}:
643 @end example
645 YaTeX puts
647 @example
648 \vspace*@{@}
649 @end example
651 @noindent
652 and move the cursor in the braces.
654 In La@TeX{} command, there are commands which take more than one
655 arguments such as @code{\addtolength{\topmargin}{8mm}}. To complete these
656 commands, invoke section-type completion with universal argument as,
657 @cindex number of argument
659 @example
660 C-u 2 [prefix] s (or ESC 2 [prefix] s)
661 @end example
663 @noindent
664 and make answers in minibuffer like this.
666 @example
667 (C-v for view) \???@{@} (default vspace*): addtolength
668 \addtolength@{???@}: \topmargin
669 Argument 2: 8mm
670 @end example
672 @code{\addtolength} and the first argument @code{\topmargin} can be typed
673 easily by completing read. Since YaTeX also learns the number of
674 arguments of section-type command and will ask that many arguments in
675 future completion, you had better tell the number of arguments to YaTeX at
676 the first completion of the new word. But you can change the number of
677 arguments by calling the completion with different universal argument
678 again.
681 Invoking section-type completion with @code{[Prefix] S} (Capital `S')
682 includes the region as the first argument of section-type command.
684 The section/large/maketitle type completion can work at the
685 prompt for the argument of other section-type completion.
686 Nested La@TeX{} commands are efficiently read with the recursive
687 completion by typing YaTeX's completion key sequence in the
688 minibuffer.
690 @menu
691 * view-sectioning::
692 @end menu
694 @node view-sectioning, , Section-type completion, Section-type completion
695 @comment node-name, next, previous, up
696 @subsection view-sectioning
697 @cindex view sectioning
698 @cindex outline
700 In the minibuffer at the prompt of section-type command completion,
701 typing @kbd{C-v} shows a list of sectioning commands in source text(The
702 line with @code{<<--} mark is the nearest sectioning command). Then,
703 default sectioning command appears in the minibuffer. You can go up/down
704 sectioning command by typing @kbd{C-p}/@kbd{C-n}, can scrolls up/down the
705 listing buffer by @kbd{C-v}/@kbd{M-v}, and can hide sectioning commands
706 under certain level by 0 through 6. Type @kbd{?} in the minibuffer of
707 sectioning prompt for more information.
709 You can generate this listing buffer (@code{*Sectioning Lines*} buffer)
710 by typing
711 @table @kbd
712 @item M-x YaTeX-section-overview
713 @dots{} Generate *Sectioning Lines* buffer
714 @end table
715 @cindex{Generate the listing of sectioning units}
716 from the LaTeX source buffer. In this listing buffer, typing @kbd{u} on
717 the sectioning command shifts up the corresponding sectioning command in
718 source text and @kbd{d} shifts down. After marking lines in the listing
719 buffer, typing @kbd{U} shifts up all sectioning commands in the region,
720 and @kbd{U} shifts down. Here are all the key bindings of
721 @code{*Sectioning Lines*} buffer.
723 @table @kbd
724 @item SPC
725 @dots{} Jump to corresponding source line
726 @item .
727 @dots{} Display corresponding source line
728 @item u
729 @dots{} Shift up a sectioning line
730 @item d
731 @dots{} Shift down a sectioning line
732 @item U
733 @dots{} Shift up sectioning lines in region
734 @item D
735 @dots{} Shift down sectioning lines in region
736 @item 0@dots{}6
737 @dots{} Hide sectioning commands whose level is lower than n
738 @end table
741 @node Large-type completion, Maketitle-type completion, Section-type completion, Completion
742 @comment node-name, next, previous, up
743 @section Large-type completion
745 "Large-type completion" inputs the font or size changing
746 descriptions such as @code{@{\large @}}. When you type
748 @table @kbd
749 @item [prefix] l
750 @dots{} large-type completion
751 @end table
753 @noindent
754 the message in the minibuffer
756 @example
757 @{\??? @} (default large):
758 @end example
760 prompts prompts you large-type command with completing-read. There are
761 TeX commands to change fonts or sizes, @code{it}, @code{huge} and so on,
762 in the completion table.
764 Region-based completion is also invoked by changing the letter after
765 prefix key stroke as @kbd{[prefix] L}. It encloses the region by braces
766 with large-type command.
768 @node Maketitle-type completion, Arbitrary completion, Large-type completion, Completion
769 @comment node-name, next, previous, up
770 @section Maketitle-type completion
771 @cindex maketitle-type completion
773 We call it "maketitle-type completion" which completes commands such as
774 @code{\maketitle}. Take notice that maketitle-type commands take no
775 arguments. Then, typing
777 @table @kbd
778 @item [prefix] m
779 @dots{} maketitle-type completion
780 @end table
782 @noindent
783 begins maketitle-completion. Above mentioned method is true for
784 maketitle-completion, and there are La@TeX{} commands with no
785 arguments in completion table.
787 @node Arbitrary completion, End completion, Maketitle-type completion, Completion
788 @comment node-name, next, previous, up
789 @section Arbitrary completion
790 @cindex arbitrary completion
792 @noindent
793 You can complete certain La@TeX{} command anywhere without typical
794 completing method as described, by typing
796 @table @kbd
797 @item [prefix] SPC
798 @dots{} arbitrary completion
799 @end table
801 @noindent
802 after the initial string of La@TeX{} command that is preceded by @code{\}.
804 @node End completion, Accent completion, Arbitrary completion, Completion
805 @comment node-name, next, previous, up
806 @section End completion
807 @cindex end completion
809 @noindent
810 YaTeX automatically detects the opened environment and close it with
811 \@code{\end@{environment@}}. Though proficient YaTeX users never fail to
812 make environment with begin-type completion, some may begin an environment
813 manually. In that case, type
815 @table @kbd
816 @item [prefix] e
817 @dots{} @code{end} completion
818 @end table
820 @noindent
821 at the end of the opened environment.
823 @node Accent completion, Image completion, End completion, Completion
824 @comment node-name, next, previous, up
825 @section Accent completion
826 @cindex accent completion
828 When you want to write the European accent marks(like @code{\`@{o@}}),
830 @table @kbd
831 @item [prefix] a
832 @dots{} accent completion
833 @end table
835 @noindent
836 shows the menu
838 @example
839 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
840 @end example
842 @noindent
843 in the minibuffer. Chose one character or corresponding numeric,
844 and you will see
846 @example
847 \`{}
848 @end example
850 @noindent
851 in the editing buffer with the cursor positioned in braces. Type
852 one more character `o' for example, then
854 @example
855 \`{o}
856 @end example
858 @noindent
859 will be completed, and the cursor gets out from braces.
861 @node Image completion, Greek letters completion, Accent completion, Completion
862 @comment node-name, next, previous, up
863 @section Image completion of mathematical sign
864 @cindex image completion
865 @cindex math-mode
866 @cindex sigma
867 @cindex leftarrow
868 @cindex ;
870 Arrow marks, sigma mark and those signs mainly used in the
871 TeX's math environment are completed by key sequences which
872 imitate the corresponding symbols graphically. This completion
873 only works in the math environment. YaTeX automatically detects
874 whether the cursor located in math environment or not, and
875 change the behavior of key strokes @kbd{;} and @kbd{:}.
877 By the way, we often express the leftarrow mark by `<-' for example.
878 Considering such image, you can write @code{\leftarrow} by typing @kbd{<-}
879 after @kbd{;} (semicolon) as a prefix. In the same way,
880 @code{\longleftarrow} (@code{<--}) is completed by typing @kbd{;<--},
881 infinity mark which is imitated by @code{oo} is completed by typing
882 @kbd{;oo}.
884 Here are the sample operations in YaTeX math-mode.
886 @example
887 INPUT Completed La@TeX{} commands
888 ; < - @code{\leftarrow}
889 ; < - - @code{\longleftarrow}
890 ; < - - > @code{\longleftrightarrow}
891 ; o @code{\circ}
892 ; o o @code{\infty}
893 @end example
895 In any case, you can quit from image completion and can move
896 to the next editing operation if the La@TeX{} command you want is
897 shown in the buffer.
899 @code{;} itself in math-environment is inserted by @kbd{;;}. Typing
900 @kbd{TAB} in the midst of image completion shows all of the La@TeX{}
901 commands that start with the same name as string you previously typed in.
902 In this menu buffer, press @kbd{RET} after moving the cursor (by @kbd{n},
903 @kbd{p}, @kbd{b}, @kbd{f}) to insert the La@TeX{} command.
905 To know all of the completion table, type @kbd{TAB} just after @kbd{;}.
906 And here is the sample menu by @kbd{TAB} after @kbd{;<}.
908 @example
909 KEY LaTeX sequence sign
910 < \leq <
911 ~
912 << \ll <<
913 <- \leftarrow <-
914 <= \Leftarrow <=
915 @end example
917 You can define your favorite key-vs-sequence completion table in the
918 Emacs-Lisp variable @code{YaTeX-math-sign-alist-private}. See also
919 @file{yatexmth.el} for the information of the structure of this variable.
921 @node Greek letters completion, , Image completion, Completion
922 @comment node-name, next, previous, up
923 @section Greek letters completion
924 @cindex Greek letters completion
925 @cindex :
927 Math-mode of YaTeX provides another image completion, Greek letters
928 completion in the same method. After prefix @kbd{:}, typing @kbd{a} makes
929 @code{\alpha}, @kbd{b} makes @code{\beta} and @kbd{g} makes @code{\gamma}
930 and so on. First, type @kbd{:TAB} to know all the correspondence of
931 alphabets vs. Greek letters.
933 If you will find @kbd{;} or @kbd{:} doesn't work in correct position of
934 math environment, it may be a bug of YaTeX. Please send me a bug report
935 with the configuration of your text, and avoid it temporarily by typing
936 @kbd{;} or @kbd{:} after universal-argument(@kbd{C-u}) which forces
937 @kbd{;} and @kbd{:} to work as math-prefix.
939 @node Local dictionaries, Commenting out, Completion, Top
940 @comment node-name, next, previous, up
941 @chapter Local dictionaries
942 @cindex local dictionaries
943 @cindex nervous users
945 Tables for completion consist of three dictionaries; `standard
946 dictionary' built in @file{yatex.el}, `user dictionary' for your common
947 private commands, and `local dictionary' that is effective in a certain
948 directory.
950 When you input the command unknown to YaTeX at a completion in the
951 minibuffer, YaTeX asks you with the following prompt;
953 @example
954 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscad
955 @end example
957 @noindent
958 In this menu, typing @kbd{u} updates your `user dictionary', @kbd{l}
959 updates your local dictionary, @kbd{n} updates only on-memory dictionary
960 which go through only current Emacs session, and @kbd{d} updates no
961 dictionary and throws the new word away.
963 If you find this switching feature meaningless and bothersome, put the
964 next expression into your @file{~/.emacs}
966 @lisp
967 (setq YaTeX-nervous nil)
968 @end lisp
970 @node Commenting out, Cursor jump, Local dictionaries, Top
971 @comment node-name, next, previous, up
972 @chapter Commenting out
973 @cindex commenting out
974 @cindex prefix >
975 @cindex prefix <
976 @cindex prefix ,
977 @cindex prefix .
979 You may want to comment out some region.
981 @table @kbd
982 @item [prefix] >
983 @dots{} comment out region by %
984 @item [prefix] <
985 @dots{} uncomment region
986 @end table
988 @noindent
989 cause an operation to the region between point and mark.
991 @table @kbd
992 @item [prefix] .
993 @dots{} comment out current paragraph
994 @item [prefix] ,
995 @dots{} uncomment current paragraph
996 @end table
998 @noindent
999 comments or uncomments the paragraph where the cursor belongs.
1000 This `paragraph' means the region marked by the function
1001 mark-paragraph, bound to @kbd{ESC h} by default. It is NOT
1002 predictable what will happen when you continuously comment out
1003 some paragraph many times.
1005 You can also comment out an environment between @code{\begin} and
1006 @code{\end}, or a @code{\begin}-\@code{\end} pair themselves, by making the
1007 following key strokes on the line where @code{\begin@{@}} or
1008 @code{\end@{@}} exists.
1010 @table @kbd
1011 @item [prefix] >
1012 @dots{} comment out from \begin to \@code{end}
1013 @item [prefix] <
1014 @dots{} uncomment from \begin to \@code{end}
1015 @end table
1017 @noindent
1018 comment whole the contents of environment. Moreover,
1020 @table @kbd
1021 @item [prefix] .
1022 @dots{} comment out \begin and \@code{end}
1023 @item [prefix] ,
1024 @dots{} uncomment \begin and \@code{end}
1025 @end table
1027 @noindent
1028 (un)comments out only environment declaration: @code{\begin@{@}} and
1029 @code{\end@{@}}. NOTE that even if you intend to comment out some region,
1030 invoking @kbd{[prefix] >} on the @code{\begin},@code{\end} line decides to
1031 work in `commenting out from @code{\begin} to @code{\end}' mode.
1034 @node Cursor jump, Changing and Deleting, Commenting out, Top
1035 @comment node-name, next, previous, up
1036 @chapter Cursor jump
1037 @cindex cursor jump
1038 @cindex prefix g
1041 @menu
1042 * Jump to corresponding object::
1043 * Invoking image processor::
1044 * Jump to main file::
1045 * Jumping around the environment::
1046 * Jumping to last completion position::
1047 @end menu
1049 @node Jump to corresponding object, Invoking image processor, Cursor jump, Cursor jump
1050 @comment node-name, next, previous, up
1051 @section Jump to corresponding object
1053 Typing
1055 @table @kbd
1056 @item [prefix] g
1057 @dots{} go to corresponding object
1058 @end table
1060 @noindent
1061 in a certain place move the cursor to the place corresponding to the
1062 La@TeX{} command of last place. YaTeX recognize the followings as pairs
1063 that have relation each other.
1065 @itemize @bullet
1066 @item @code{\begin@{@}} <-> @code{\end@{@}}
1067 @item @code{%#BEGIN} <-> @code{%#END}
1068 @item On the image-including line -> corresponding viewer or drawing tool
1069 @item @code{\label@{@}} <-> @code{\ref@{@}}
1070 @item @code{\include(\input)} -> included file
1071 @item @code{\bibitem@{@}} <-> @code{\cite@{@}}
1072 @end itemize
1074 On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} moves the
1075 cursor to the corresponding @code{\end},@code{\begin} line, if its partner
1076 really exists. The behavior on the line @code{%#BEGIN} and @code{%#END}
1077 are the same. Note that if the correspondent of @code{label/ref} or
1078 @code{cite/bibitem} exists in another file, that file have to be opened to
1079 make a round trip between references by @kbd{[prefix] g}.
1081 If you type @code{[prefix] g} on the line of @code{\include@{chap1@}},
1082 typically in the main text, YaTeX switches buffer to @file{chap1.tex}.
1084 @table @kbd
1085 @item [prefix] 4 g
1086 @dots{} go to corresponding object in other window
1087 @end table
1089 @noindent
1090 do the same job as @kbd{[prefix] g} except it's done in other window.
1091 Note that this function doesn't work on @code{begin/end},
1092 @code{%#BEGIN/%#END} pairs because it is meaningless.
1094 @node Invoking image processor, Jump to main file, Jump to corresponding object, Cursor jump
1095 @comment node-name, next, previous, up
1096 @section Invoking image processor
1097 @cindex{Drawing tool invocation}
1099 `image-including line' described above means such lines as
1100 @code{\epsfile@{file=foo.ps@}}. If you type @kbd{[prefix] g} on that
1101 line, YaTeX automatically searches source of `foo.ps' and invokes image
1102 viewer or drawing tool correspoinding to it. For example; if you draw
1103 an image foo.obj with Tgif and enclose its product named foo.eps by
1104 @code{\epsfile} command. Typing @kbd{[prefix] g} on @code{\epsfile} line
1105 make YaTeX invoke @code{tgif foo.obj}. How a processor is choosen is as
1106 follows.
1108 @enumerate
1109 @item
1110 If there is an expression matching with one of the pattern
1111 defined in @code{YaTeX-processed-file-regexp-alist}, extract file name
1112 from regexp group surrounded by \\(\\). (Which group corresponds is
1113 written in the cdr part of each list.) If no matches were found, do
1114 nothing.
1115 @item
1116 If there is a pattern as `%PROCESSOR' which is defined in the variable
1117 @code{YaTeX-file-processor-alist}, call that processor giving the
1118 file name with corresponding extension.
1119 @item
1120 If not, check the existence of each file which is supplied the
1121 extension in the cdr part of each list of
1122 @code{YaTeX-file-processor-alist}. If any, call the corresponding
1123 image viewer or drawing tool.
1124 @end enumerate
1126 @node Jump to main file, Jumping around the environment, Invoking image processor, Cursor jump
1127 @comment node-name, next, previous, up
1128 @section Jump to main file
1130 Typing
1132 @table @kbd
1133 @item [prefix] ^
1134 @dots{} visit main file
1135 @item [prefix] 4^
1136 @dots{} visit main file in other buffer
1137 @end table
1138 @cindex prefix ^
1139 @cindex prefix 4 ^
1141 in a sub text switch the buffer to the main text specified by
1142 @code{%#!} notation.
1144 @node Jumping around the environment, Jumping to last completion position, Jump to main file, Cursor jump
1145 @comment node-name, next, previous, up
1146 @section Jumping around the environment
1148 And these are the functions which work on the current La@TeX{}
1149 environment:
1151 @table @kbd
1152 @item M-C-a
1153 @dots{} beginning of environment
1154 @item M-C-e
1155 @dots{} @code{end} of environment
1156 @item M-C-@@
1157 @dots{} mark environment
1158 @end table
1159 @cindex M-C-a
1160 @cindex M-C-e
1161 @cindex M-C-@@
1163 @node Jumping to last completion position, , Jumping around the environment, Cursor jump
1164 @comment node-name, next, previous, up
1165 @section Jumping to last completion position
1167 YaTeX always memorize the position of completion into register @code{3}.
1168 So every time you make a trip to any other part of text other than you are
1169 writing, you can return to the editing paragraph by calling
1170 register-to-point with argument YaTeX-current-position-register, which is
1171 achieved by typing @kbd{C-x j 3}(by default).
1173 @node Changing and Deleting, Filling, Cursor jump, Top
1174 @comment node-name, next, previous, up
1175 @chapter Changing and Deleting
1177 These functions are for change or deletion of La@TeX{} commands
1178 already entered.
1180 @table @kbd
1181 @item [prefix] c
1182 @dots{} change La@TeX{} command
1183 @item [prefix] k
1184 @dots{} kill La@TeX{} command
1185 @end table
1186 @cindex prefix c
1187 @cindex prefix k
1189 @menu
1190 * Changing LaTeX commands::
1191 * Killing LaTeX commands::
1192 @end menu
1194 @node Changing LaTeX commands, Killing LaTeX commands, Changing and Deleting, Changing and Deleting
1195 @comment node-name, next, previous, up
1196 @section Changing La@TeX{} commands
1198 @kbd{[prefix] c} can change the various (La)@TeX{} commands. This can
1199 change the followings.
1200 @itemize @bullet
1201 @item Environment names
1202 @item Section-type commands
1203 @item Argument of section-type commands
1204 @item Optional parameters (enclosed by []) of section-type commands
1205 @item Font/size designators
1206 @item Math-mode's maketitle-type commands that can be inputted with
1207 image completion
1208 @end itemize
1210 Typing @kbd{[prefix] c} on one of above objects you want to change
1211 brings a suitable reading function sometimes with completion.
1212 Note: If you want to change the argument of section-type command that
1213 contains other La@TeX{} commands, type @kbd{[prefix] c} either of
1214 surrounding braces of the argument in order to make YaTeX ignore the
1215 internal La@TeX{} sequences as an object of changing. Anyway, it is
1216 very difficult to know which argument position the cursor belongs because
1217 the La@TeX{} commands can be nested and braces can freely emerge. So keep
1218 it mind to put the cursor on a brace when you are thinking of changing a
1219 complicated argument.
1221 @node Killing LaTeX commands, , Changing LaTeX commands, Changing and Deleting
1222 @comment node-name, next, previous, up
1223 @section Killing La@TeX{} commands
1224 @cindex Killing La@TeX{} commands
1226 @kbd{[prefix] k} kills the La@TeX{} commands sometimes with their
1227 arguments. Following table illustrates the correspondence of the invoking
1228 position and what is killed.
1230 @example
1231 [Invoking position] [action]
1232 \begin, \end line kill \begin,\end pairs
1233 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
1234 on a Section-type command kill section-type command
1235 on a parenthesis kill parentheses
1236 @end example
1238 Note that when killing @code{\begin, \end} or @code{%#BEGIN, %#END} pair,
1239 the lines @code{\begin, \end} or @code{%#BEGIN, %#END} exist will be
1240 killed entirely. So take care not to create any line that contains more
1241 than one @code{\begin} or so.
1243 While all operations above are to kill `containers' which surround some
1244 text, universal argument (@kbd{C-u}) for these commands kills not only
1245 `containers' but also `contents' of them. See below as a sample.
1247 @example
1248 Original text: [prefix] k C-u [prefix] k
1249 Main \footnote@{note@} here. Main note here. Main here.
1250 ~(cursor)
1251 @end example
1253 @node Filling, Updation of includeonly, Changing and Deleting, Top
1254 @comment node-name, next, previous, up
1255 @chapter Filling
1256 @cindex filling
1258 @section Filling an item
1259 @cindex filling an item
1260 @cindex prefix i
1262 To fill a term (descriptive sentences) of @code{\item}, type
1264 @c @table @kbd
1265 @c @item [prefix] i
1266 @c @dots{} fill item
1267 @c @end table
1268 @table @kbd
1269 @item M-q
1270 @dots{} fill item
1271 @end table
1273 @noindent
1274 on that item.
1276 YaTeX uses the value of the variable @code{YaTeX-item-regexp} as the
1277 regular expression to search item header in itemize environment.
1278 If you make a newcommand to itemize terms(e.g. @code{\underlineitem}), put
1280 @lisp
1281 (setq YaTeX-item-regexp
1282 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1283 @end lisp
1284 @cindex YaTeX-item-regexp
1286 in your @file{~/.emacs}. If you are not familiar with regular expression
1287 for Emacs-Lisp, name a newcommand for `itemize' beginning with
1288 @code{\item} such as @code{\itembf}, not @code{\bfitem}.
1290 This function reformats the @code{\item} into `hang-indented' style.
1291 For example:
1293 @example
1294 itemize, enumerate environment:
1296 >\item[foo] `foo' is the typical word for describing an
1297 > arbitrarily written....
1298 description environment:
1299 > \item[bar] When the word `for' is used as an arbitrarily
1300 > word, `bar' is bound to follow it.
1301 @end example
1303 Note that the indent depth of an @code{\item} word and its descriptive
1304 paragraph are the same in latter case. If you want to use different
1305 depth, invoke fill-paragraph at the beginning of non-whitespace
1306 character(see below).
1308 @section Filling paragraph
1309 @cindex Filling paragraph
1310 @cindex M-q
1312 Fill-paragraph is little bit adapted for La@TeX{} sources. It retains from
1313 filling in certain environments where formatting leads to a disaster such
1314 as verbatim, tabular, or so. And it protects @code{\verb} expressions
1315 from being folded (The variable @code{YaTeX-verb-regexp} controls this).
1316 Besides, putting cursor on the first occurrence of non-whitespace
1317 character on a line changes the fill-prefix temporarily to the depth of
1318 the line.
1320 @node Updation of includeonly, What column, Filling, Top
1321 @comment node-name, next, previous, up
1322 @chapter Updation of @code{\includeonly}
1323 @cindex includeonly
1325 When you edit splitting source texts, the notation
1327 @example
1328 \includeonly@{CurrentEditingFileName@}
1329 @end example
1331 @noindent
1332 in the main file reduces the time of typesetting. If you want
1333 to hack other file a little however, you have to rewrite it to
1335 @example
1336 \includeonly@{OtherFileNameYouWantToFix@}
1337 @end example
1339 @noindent
1340 in the main file. YaTeX automatically detects that the current
1341 edited text is not in includeonly list and prompts you
1343 @example
1344 A)dd R)eplace %)comment?
1345 @end example
1347 in the minibuffer. Type @kbd{a} if you want to add the current file name
1348 to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list
1349 by the current file, and type @kbd{%} to comment out the
1350 @code{\includeonly} line.
1352 @node What column, Intelligent newline, Updation of includeonly, Top
1353 @comment node-name, next, previous, up
1354 @chapter What column?
1355 @cindex what column
1356 @cindex complex tabular
1357 @cindex prefix &
1359 We are often get tired of finding the corresponding column in
1360 large tabulars. For example,
1362 @example
1363 \begin@{tabular@}@{|c|c|c|c|c|c|c|c|@}\hline
1364 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1365 Home Addr.&Home Phone\\ \hline
1366 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1367 zzz-www & Japan & 9876-54321 \\
1368 & 2 & \multicolumn@{2@}@{c|@}@{Unknown@}
1369 &&&(???)
1370 \\ \hline
1371 \end@{tabular@}
1372 @end example
1374 Suppose you have the cursor located at @code{(???)} mark, can you tell
1375 which column it is belonging at once? Maybe no. In such case,
1376 type
1378 @table @kbd
1379 @item [prefix] &
1380 @dots{} What column
1381 @end table
1383 @noindent
1384 in that position. YaTeX tells you the column header of the
1385 current field. Since YaTeX assumes the first line of tabular
1386 environment as a row of column headers, you can create a row of
1387 virtual column headers by putting them in the first line and
1388 commenting that line with @code{%}.
1390 @node Intelligent newline, Online help, What column, Top
1391 @comment node-name, next, previous, up
1392 @chapter Intelligent newline
1393 @cindex Intelligent newline
1394 @cindex ESC RET
1395 @cindex M-C-m
1397 At the end of begin-type completion of tabular[*], array, itemize,
1398 enumerate or tabbing environment, or typing
1400 @table @kbd
1401 @item ESC RET
1402 @dots{} Intelligent newline
1403 @end table
1405 @noindent
1406 in these environments inserts the contents corresponding to the current
1407 environment in the next line. (At the begin-type completion, this
1408 contents can be removed by `undo'.) In @code{tabular} environment, for
1409 example, @kbd{ESC RET} inserts the certain number of @code{&} and trailing
1410 @code{\\}, and @code{\hline} if other @code{\hline} is found in backward.
1411 Here are the list of contents vs. environments.
1413 @itemize
1414 @item @code{tabular}, @code{tabular*}, @code{array}
1416 Corresponding number of @code{&} and @code{\\}.
1417 And @code{\hline} if needed.
1419 @item @code{tabbing}
1421 The same number of @code{\>} as @code{\=} in the first line.
1423 @item @code{itemize}, @code{enumerate}, @code{description}, @code{list}
1425 @code{\item} or @code{item[]}.
1426 @end itemize
1428 Note that since this function works seeing the contents of the first
1429 line, please call this after the second line if possible.
1431 If you want to apply these trick to other environments, @code{foo}
1432 environment for example, define the function named
1433 @code{YaTeX-intelligent-newline-foo} to insert corresponding contents.
1434 That function will be called at the beginning of the next line after the
1435 newline is inserted to the current line. Since the function
1436 @code{YaTeX-indent-line} is designed to indent the current line properly,
1437 calling this function before your code to insert certain contents must be
1438 useful. See the definition of the function
1439 @code{YaTeX-intelligent-newline-itemize} as an example.
1441 @node Online help, Browsing file hierarchy, Intelligent newline, Top
1442 @comment node-name, next, previous, up
1443 @chapter Online help
1444 @cindex online help
1445 @cindex prefix ?
1446 @cindex prefix /
1447 @cindex apropos
1448 @cindex keyword search
1450 YaTeX provides you the online help with popular La@TeX{} commands.
1452 Here are the key strokes for the online help.
1454 @table @kbd
1455 @item [prefix] ?
1456 @dots{} Online help
1457 @item [prefix] /
1458 @dots{} Online apropos
1459 @end table
1461 @section Online help
1463 `Online help' shows the documentation for the popular La@TeX{}
1464 commands(defaults to the commands on the cursor) in the next buffer.
1465 There are two help file, `global help' and `private help'. The former
1466 file contains the descriptions on the standard La@TeX{} command and is
1467 specified its name by variable @code{YaTeX-help-file}. Usually, the
1468 global help file should be located in public space (@code{$EMACSEXECPATH}
1469 by default) and should be world writable so that anyone can update it to
1470 enrich its contents. The latter file contains descriptions on
1471 non-standard or personal command definitions and is specified by
1472 @code{YaTeX-help-file-private}. This file should be put into private
1473 directory.
1475 @section Online apropos
1477 `Online apropos' is an equivalent of GNU Emacs's apropos. It
1478 shows all the documentations that contains the keyword entered by
1479 the user.
1481 @section When no descriptions are found...
1483 If there is no description on a command in help files, YaTeX
1484 requires you to write a description on that command. If you are
1485 willing to do, determine which help file to add and write the
1486 description on it referring your manual of (La)TeX. Please send
1487 me your additional descriptions if you describe the help on some
1488 standard commands. I might want to include it in the next
1489 distribution.
1491 @node Browsing file hierarchy, Cooperation with other packages, Online help, Top
1492 @comment node-name, next, previous, up
1493 @chapter Browsing file hierarchy
1494 @cindex hierarchy
1495 @cindex browsing
1497 When you are editing multi-file source, typing
1499 @table @kbd
1500 @item [prefix] d
1501 @dots{} browse file hierarchy
1502 @end table
1504 @noindent
1505 asks you the parent-most file (which may be defaulted) and displays the
1506 documentation hierarchy in the next window. In this buffer, the following
1507 commands are available.
1509 @table @kbd
1510 @item n
1511 @dots{} move to the next line and show its contents
1512 @item p
1513 @dots{} move to the previous line and show its contents
1514 @item N
1515 @dots{} move to the next file in the same inclusion level
1516 @item P
1517 @dots{} move to the previous file in the same inclusion level
1518 @item j
1519 @dots{} move to the next line
1520 @item k
1521 @dots{} move to the previous line
1522 @item u
1523 @dots{} move to the parent file
1524 @item .
1525 @dots{} show the current files contents in the next window
1526 @item SPC
1527 @dots{} scroll up the current file window
1528 @item DEL, b
1529 @dots{} scroll down the current file window
1530 @item <
1531 @dots{} show the beginning of the current file
1532 @item >
1533 @dots{} show the end of the current file
1534 @item >
1535 @dots{} return to the previous postion after @kbd{<} or @kbd{>}
1536 @item RET, g
1537 @dots{} open the current file in the next window
1538 @item mouse-2
1539 @dots{} same as RET(available only with window system)
1540 @item o
1541 @dots{} other window
1542 @item 1
1543 @dots{} delete other windows
1544 @item -
1545 @dots{} shrink hierarchy buffer window
1546 @item +
1547 @dots{} enlarge hierarchy buffer window
1548 @item ?
1549 @dots{} describe mode
1550 @item q
1551 @dots{} quit
1552 @end table
1554 Note that operations on the file contents in the next window do not work
1555 correctly when you close the corresponding file.
1557 @node Cooperation with other packages, Customizations, Browsing file hierarchy, Top
1558 @comment node-name, next, previous, up
1559 @chapter Cooperation with other packages
1561 YaTeX works better with other brilliant packages.
1563 @section gmhist
1564 @cindex gmhist
1565 @cindex command history
1566 @cindex minibuffer history
1568 When you are loading @file{gmhist.el} and @file{gmhist-mh.el}, you can
1569 use independent command history list at the prompt of preview command
1570 (@kbd{[prefix] tp}) and print command (@kbd{[prefix] tl}). On each
1571 prompt, you can enter the previous command line string repeatedly by
1572 typing @kbd{M-p}.
1574 @section min-out
1575 @cindex min-out
1577 @file{min-out}, the outline minor mode, can be used in yatex-mode
1578 buffers. If you want to use it with YaTeX, please refer the
1579 file @file{yatexm-o.el} as an example.
1581 @node Customizations, Etcetera, Cooperation with other packages, Top
1582 @comment node-name, next, previous, up
1583 @chapter Customizations
1584 @cindex customizations
1586 You can customize YaTeX by setting Emacs-Lisp variables and by making
1587 add-in functions.
1589 @menu
1590 * Lisp variables::
1591 * Add-in functions::
1592 * Add-in generator::
1593 @end menu
1595 @node Lisp variables, Add-in functions, Customizations, Customizations
1596 @comment node-name, next, previous, up
1597 @section Lisp variables
1598 @cindex customizable variables
1600 You can change the key assignments or make completion more comfortable
1601 by setting the values of various variables which control the movement of
1602 yatex-mode.
1604 For example, if you want to change the prefix key stroke from @kbd{C-c}
1605 to any other sequence, set YaTeX-prefix to whatever you want to use. If
1606 you don't want to use the key sequence @kbd{C-c letter} which is assumed
1607 to be the user reserved sequence in Emacs world, set
1608 @code{YaTeX-inhibit-prefix-letter} to @code{t}, and all of the default key
1609 bind of @kbd{C-c letter} will turn to the corresponding @kbd{C-c C-letter}
1610 (but the region based completions that is invoked with @kbd{C-c
1611 Capital-letter} remain valid, if you want to disable those bindings, set
1612 that variable to 1 instead of @code{t}).
1614 @menu
1615 * All customizable variables::
1616 * Sample definitions::
1617 * Hook variables::
1618 * Hook file::
1619 @end menu
1621 @node All customizable variables, Sample definitions, Lisp variables, Lisp variables
1622 @comment node-name, next, previous, up
1623 @subsection All customizable variables
1624 @cindex all customizable variables
1626 Here are the customizable variables of yatex-mode. Each value setq-ed
1627 in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is
1628 neglected. Parenthesized contents stands for the default value. When you
1629 are to change some of these variables, see more detailed documentation of
1630 the variable by @kbd{M-x describe-variable}.
1632 @defvar YaTeX-prefix
1633 Prefix key stroke (@kbd{C-c})
1634 @end defvar
1636 @defvar YaTeX-inhibit-prefix-letter
1637 Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter} (@code{nil})
1638 @end defvar
1640 @defvar YaTeX-fill-prefix
1641 Fill-prefix used in yatex-mode (@code{nil})
1642 @end defvar
1644 @defvar YaTeX-user-completion-table
1645 Name of user dictionary where learned completion table will be stored.
1646 (@code{"~/.yatexrc"})
1647 @end defvar
1649 @defvar tex-command
1650 La@TeX{} typesetter command (@code{"latex"})
1651 @end defvar
1653 @defvar dvi2-command
1654 Preview command (@code{"xdvi -geo +0+0 -s 4"})
1655 @end defvar
1657 @defvar dviprint-command-format
1658 Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"})
1659 @end defvar
1661 @defvar dviprint-from-format
1662 Start page format of above %f. %b will turn to start page (@code{"-f %b"})
1663 @end defvar
1665 @defvar dviprint-to-format
1666 End page format of above %t. %e will turn to @code{end} page (@code{"-t %e"})
1667 @end defvar
1669 @defvar makeindex-command
1670 Default makeindex command (@code{"makeindex"} (@code{"makeind"} on MS-DOS))
1671 @end defvar
1673 @defvar section-name
1674 Initial default value at the first section-type completion
1675 (@code{"documentstyle"})
1676 @end defvar
1678 @defvar env-name
1679 Initial default value at the first begin-type completion (@code{"document"})
1680 @end defvar
1682 @defvar fontsize-name
1683 Ditto of large-type (@code{"large"})
1684 @end defvar
1686 @defvar single-command
1687 Ditto of maketitle-type (@code{"maketitle"})
1688 @end defvar
1690 @defvar YaTeX-need-nonstop
1691 Put @code{\nonstopmode@{@}} or not (@code{nil})
1692 @end defvar
1694 @defvar latex-warning-regexp
1695 Regular expression of warning message latex command puts out
1696 (@code{"line.* [0-9]*"})
1697 @end defvar
1699 @defvar latex-error-regexp
1700 Regular expression of error message (@code{"l\\.[1-9][0-9]*"})
1701 @end defvar
1703 @defvar latex-dos-emergency-message
1704 Message latex command running on DOS puts at abort (@code{"Emergency stop"})
1705 @end defvar
1707 @defvar YaTeX-item-regexp
1708 Regular expression of item command (@code{"\\\\item"})
1709 @end defvar
1711 @defvar YaTeX-verb-regexp
1712 Regexp of verb family. Omit \\\\. (@code{"verb\\*?\\|path"})
1713 @end defvar
1715 @defvar YaTeX-nervous
1716 T for using local dictionary (@code{t})
1717 @end defvar
1719 @defvar YaTeX-sectioning-regexp
1720 Regexp of La@TeX{} sectioning command
1721 (@code{"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"})
1722 @end defvar
1724 @defvar YaTeX-fill-inhibit-environments
1725 Inhibit fill in these environments
1726 (@code{'("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" "verbatim" "verbatim*")})
1727 @end defvar
1729 @defvar YaTeX-uncomment-once
1730 T for deleting all preceding @code{%} (@code{nil})
1731 @end defvar
1733 @defvar YaTeX-close-paren-always
1734 T for always close all parenthesis automatically, @code{nil} for only eol
1735 (@code{t})
1736 @end defvar
1738 @defvar YaTeX-auto-math-mode
1739 Switch math-mode automatically (@code{t})
1740 @end defvar
1742 @defvar YaTeX-math-key-list-private
1743 User defined alist, math-mode-prefix vs completion alist
1744 used in image completion (@code{nil}). See @file{yatexmth.el}
1745 for the information about how to define a completion alist.
1746 @end defvar
1748 @defvar YaTeX-default-pop-window-height
1749 Initial height of typesetting buffer when one-window.
1750 Number for the lines of the buffer, numerical string for
1751 the percentage of the screen-height. @code{nil} for half height (10)
1752 @end defvar
1754 @defvar YaTeX-help-file
1755 Global online help file name (@file{$EMACS/etc/YATEXHLP.jp})
1756 @end defvar
1758 @defvar YaTeX-help-file-private
1759 Private online help file name (@file{"~/YATEXHLP.jp"})
1760 @end defvar
1762 @defvar YaTeX-no-begend-shortcut
1763 Disable [prefix] b ?? shortcut (@code{nil)}
1764 @end defvar
1766 @defvar YaTeX-hilit-pattern-adjustment-private
1767 List of the list that contain the regular expression and the symbol of
1768 logical meaning of the string that matches the pattern. See also the
1769 value from @code{(assq 'yatex-mode hilit-patterns-alist)} and the value of
1770 @code{YaTeX-hilit-pattern-adjustment-default} (and even the document of
1771 hilit19.el).
1772 @end defvar
1774 @defvar YaTeX-sectioning-level
1775 Alist of LaTeX's sectioning command vs its height.
1776 @end defvar
1778 @defvar YaTeX-hierarchy-ignore-heading-regexp
1779 @code{YaTeX-display-hierarchy} searches for sectioning command first, and
1780 comment line secondary as a file headings. In latter case, ignore lines
1781 that match with regular expression of this variable. Default value of
1782 this variable is RCS header expressions and mode specifying line `-*- xxxx
1783 -*'.
1784 @end defvar
1786 @defvar YaTeX-skip-default-reader
1787 Non-nil for this variable skips the default argument reader of
1788 section-type command when add-in function for it is not defined
1789 (@code{nil})
1790 @end defvar
1792 @defvar YaTeX-create-file-prefix-g
1793 When typing @kbd{prefix g} on the @code{\include} line,
1794 open the target file even if the file doesn't exist (@code{nil})
1795 @end defvar
1797 @defvar YaTeX-simple-messages
1798 Simplyfy messages of various completions (@code{nil})
1799 @end defvar
1801 @defvar YaTeX-hilit-sectioning-face
1802 When hilit19 and yatex19 is active, YaTeX colors the sectioning commands.
1803 This variable specifies the foreground and background color of
1804 @code{\part} macro. The default value is @code{'(yellow/dodgerblue
1805 yellow/slateblue)}. The first element of this list is for the screen when
1806 @code{hilit-background-mode} is @code{'light}, and the second element is
1807 for @code{'dark}. You should specify both color as `forecolor/backcolor'.
1808 @end defvar
1810 @defvar YaTeX-hilit-sectioning-attenuation-rate
1811 When color mode, this variable specifies how much attenuate the color
1812 density of @code{\subparagraph} compared with that of @code{\chapter}
1813 (@code{'(15 40)}) See also @code{YaTeX-hilit-sectioning-face}.
1814 @end defvar
1816 @defvar YaTeX-use-AMS-LaTeX
1817 If you use AMS-LaTeX, set to @code{t} (@code{nil})
1818 @end defvar
1820 @defvar YaTeX-template-file
1821 File name which is automatically inserted at creation
1822 (@code{~/work/template.tex})
1823 @end defvar
1825 @node Sample definitions, Hook variables, All customizable variables, Lisp variables
1826 @comment node-name, next, previous, up
1827 @subsection Sample definitions
1828 @cindex prefix key stroke
1829 @cindex fill-prefix
1831 For instance, to change the prefix key stroke to @kbd{ESC}, and name of
1832 the user dictionary @file{~/src/emacs/yatexrc}, and set @code{fill-prefix}
1833 to single TAB character, add the following @code{setq} to @file{~/.emacs}.
1835 @lisp
1836 (setq YaTeX-prefix "\e"
1837 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1838 YaTeX-fill-prefix " ")
1839 @end lisp
1841 @node Hook variables, Hook file, Sample definitions, Lisp variables
1842 @comment node-name, next, previous, up
1843 @subsection Hook variables
1844 @cindex hook variables
1846 More customizations will be done by the hook-function defined in
1847 hook-variable @code{yatex-mode-hook}. This is useful to define a shortcut
1848 key sequence to enter some environments other than @code{document} and
1849 @code{enumerate} etc. The following statement defines @code{[prefix] ba}
1850 to enter @code{\begin@{abstract@}} ... @code{=end@{abstract@}}
1851 immediately.
1853 @lisp
1854 (setq yatex-mode-hook
1855 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1856 @end lisp
1858 You should use functions @code{YaTeX-define-key}, or
1859 @code{YaTeX-define-begend-key} to define all the key sequences of
1860 yatex-mode.
1862 @node Hook file, , Hook variables, Lisp variables
1863 @comment node-name, next, previous, up
1864 @subsection Hook file
1865 @cindex hook file
1867 You can stuff all of YaTeX related expressions into a file named
1868 @file{yatexhks.el} if you have a lot of codes. YaTeX automatically load
1869 this file at the initialization of itself. Using @file{yatexhks.el}
1870 makes @code{yatex-mode-load-hook} unnecessary.
1872 @node Add-in functions, Add-in generator, Lisp variables, Customizations
1873 @comment node-name, next, previous, up
1874 @section Add-in functions
1875 @cindex add-in functions
1876 @cindex yatexadd.el
1878 You can easily define a function to input detailed arguments
1879 with completion according to La@TeX{} environments or commands.
1881 @c @node What is add-in functions?, , Add-in functions, Add-in functions
1882 @comment node-name, next, previous, up
1883 @subsection What is add-in functions?
1884 @cindex tabular
1886 When you input @code{tabular} environment, don't you think ``I want
1887 YaTeX to complete its argument toward my favorite one such as
1888 @code{@{|c|c|c|@}}...''? Yes, you can define the function to complete
1889 arguments for any environment and any La@TeX{} commands.
1891 @subsection Procedure
1893 Here is the procedure to define add-in functions.
1894 @enumerate
1895 @item
1896 Define the function
1897 @item
1898 Put the function into @file{yatexhks.el}
1899 @end enumerate
1901 @menu
1902 * How the add-in function works::
1903 * How the function is called::
1904 * Useful functions for creating add-in::
1905 * Contribution::
1906 @end menu
1908 @node How the add-in function works, How the function is called, Add-in functions, Add-in functions
1909 @comment node-name, next, previous, up
1910 @subsection How the add-in function works
1912 There are two kinds of add-in. @dfn{Option add-in} returns the
1913 La@TeX{}'s optional parameters such as optional strings after
1914 @code{\begin@{ENV@}}, optional strings between a section-type command
1915 and its first argument, and optional strings just after type
1916 maketitle-type command. The following illustrates the name of add-in
1917 functions, where underlined strings are generated by add-in functions.
1919 @display
1920 \begin{table}[ht] (Function name: YaTeX:table)
1921 ~~~~
1922 \put(100,200){} (Function name: YaTeX:put)
1923 ~~~~~~~~~
1924 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1925 ~~~~~~~~~~
1926 @end display
1928 Obviously, the function name is decided by concatenating the prefix
1929 `YaTeX:' and La@TeX{} command's name.
1931 Another add-in type is @dfn{argument add-in}, which completes arguments
1932 for section-type commands.
1934 @display
1935 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1936 ~~~~ ~~~
1937 @end display
1939 When the section-type command is inputted, the function named by
1940 concatenating `YaTeX::' and section-type command, is called automatically
1941 with an integer argument which indicates which argument of section-type
1942 command is being read. Thus the add-in should determine the
1943 job referring the value of its argument.
1945 @menu
1946 * Defining option-add-in::
1947 * Defining argument-add-in::
1948 @end menu
1950 @node Defining option-add-in, Defining argument-add-in, How the add-in function works, How the add-in function works
1951 @comment node-name, next, previous, up
1952 @subsubsection Defining `option add-in'
1954 If you want @code{@{|c|c|c|@}} for all @code{tabular} environment,
1956 @lisp
1957 (defun YaTeX:tabular ()
1958 "{|c|c|c|}")
1959 @end lisp
1961 @noindent
1962 is enough. If you want more complicated format, define as below.
1964 @lisp
1965 (defun YaTeX:tabular ()
1966 "@{@@@{\\vrule width 1pt\\ @}|||@@@{\\ \\vrule width 1pt@}@}")
1967 @end lisp
1969 @noindent
1970 Note that the character @code{\} must be described as @code{\\} in
1971 Emacs-Lisp. The next example reads the tabular format from keyboard.
1972 @lisp
1973 (defun YaTeX:tabular ()
1974 (concat "{" (read-string "Rule: ") "}"))
1975 @end lisp
1977 @node Defining argument-add-in, , Defining option-add-in, How the add-in function works
1978 @comment node-name, next, previous, up
1979 @subsubsection Defining `argument add-in'
1981 This section describes how to define the add-in function for
1982 @code{\newcommand}.
1984 The first argument of @code{\newcommand} begins always with @code{\}.
1985 The second argument is usually so complex that we can not edit them in the
1986 minibuffer. Here is the created function considering this.
1988 @lisp
1989 (defun YaTeX::newcommand (n) ;n is argument position
1990 (cond
1991 ((= n 1) ;1st argument is macro name
1992 (read-string "Command: " "\\")) ;initial input `\'
1993 ((= n 2) "") ;do nothing when reading arg#2
1994 (t nil)))
1995 @end lisp
1997 Note that when the `argument add-in' function return `nil', normal
1998 argument reader will be called.
2000 @node How the function is called, Useful functions for creating add-in, How the add-in function works, Add-in functions
2001 @comment node-name, next, previous, up
2002 @subsection How the function is called
2004 YaTeX calls the add-in functions for specified begin-type, section-type,
2005 and maketitle-type command, if any. `Option add-in' functions for
2006 begin-type are called when @code{\begin@{ENV@}} has been inserted,
2007 functions for section-type are called just before input of the first
2008 argument, and functions for maketitle-type is called after maketitle-type
2009 command has been inserted. `Argument add-in' functions are called at each
2010 entry of arguments for section-type commands.
2012 @node Useful functions for creating add-in, Contribution, How the function is called, Add-in functions
2013 @comment node-name, next, previous, up
2014 @subsection Useful functions for creating add-in
2016 Many add-in functions for typical La@TeX{} commands are defined in
2017 @file{yatexadd.el}. Those are also useful as references. Here are the
2018 short descriptions on useful functions, where [F] means function, [A]
2019 means arguments, [D] means description.
2021 @itemize
2022 @item [F]
2023 YaTeX:read-position
2024 @itemx [A]
2025 Character list which can show up in the brackets
2026 @itemx [D]
2027 Return the location specifier such as `[htb]'. When
2028 nothing is entered, omit [] itself. If the possible characters
2029 are "htbp", call this function as
2030 @code{(YaTeX:read-position "htbp")}
2032 @item [F]
2033 YaTeX:read-coordinates
2034 @itemx [A]
2035 Base prompt, X-axis prompt, Y-axis prompt (each optional)
2036 @itemx [D]
2037 Read the coordinates with the prompt ``BasePrompt X-axisPrompt:'' for
2038 X-axis, ``BasePrompt Y-axisPrompt:'' for Y-axis, and return it in the form
2039 of ``(X,Y)''. The default prompts are @code{Dimension}, @code{X},
2040 @code{Y} respectively.
2042 @item [F]
2043 YaTeX:check-completion-type
2044 @itemx [A]
2045 One of the symbols: 'begin, 'section, or 'maketitle
2046 @itemx [D]
2047 Check the current completion type is specified one and cause error if
2048 not. The variable @code{YaTeX-current-completion-type} holds the symbol
2049 according to the current completion type.
2050 @end itemize
2052 @node Contribution, , Useful functions for creating add-in, Add-in functions
2053 @comment node-name, next, previous, up
2054 @subsection Contribution
2056 If you make your own pretty function and you let it be in public, please
2057 send me the function. I'm going to include it in the next release.
2059 @node Add-in generator, , Add-in functions, Customizations
2060 @comment node-name, next, previous, up
2061 @section Add-in generator
2063 First, don't forget to read the section of add-in functions @ref{Add-in
2064 functions}. If you easily understand how to define them, there's no need
2065 to read this section. But being not familiar with Emacs-Lisp, when you
2066 don't have clear idea what to do, this section describes how to get YaTeX
2067 make add-in function.
2069 There are two methods of generation. One is for fully interactive
2070 generator for beginners and another requires little knowledge of
2071 Emacs-Lisp.
2073 @subsection Generator for beginners
2074 The former generator is called by
2075 @center @kbd{M-x YaTeX-generate}
2077 @noindent
2078 strokes. All you have to do is follow the guidances. Defying them may cases
2079 the disaster (I wonder what is it???). So when you make some mistake, it
2080 is recommendable to type @kbd{C-g} and start afresh.
2082 @subsection Simple generator
2084 The latter generator is invoked by the next sequence.
2085 @center @kbd{M-x YaTeX-generate-simple}
2086 This generator can make both ``option add-in'' and ``argument add-in''
2087 (@emph{refer the section add-in functions}
2088 @ref{How the add-in function works}), whereas @code{YaTeX-generate}
2089 cannot make ``argument addin''.
2091 For example, assume you have the LaTeX command as follows.
2093 @example
2094 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
2095 (A) (B) (1) (2) (3)
2096 (A)Optional parameter to specify the position
2097 One of t(top), b(bottom), l(left), r(right)
2098 (B)Maximum size of frame
2099 (1)1st argument is filename of EPS file
2100 (2)2nd argument indicates
2101 plain do nothing
2102 frame make frame around image
2103 dframe make double-frame around image
2104 for included EPS file.
2105 (3)Caption for the picture
2106 @end example
2108 Now get start with generation. Typing @kbd{M-x YaTeX-generate-simple}
2109 brings the prompt:
2110 @display
2111 (O)ption? (A)rgument?
2112 @end display
2114 @subsubsection Generating ``option add-in''
2115 @cindex option add-in
2117 Since (A), (B) above are optional argument, all we have to do to
2118 complete them is define the option add-in for them. Let's generate the
2119 function to complete (A).
2121 @display
2122 M-x YaTeX-generate-simple RET
2123 epsinput RET
2125 @end display
2127 @noindent
2128 Typing as above leads the next prompt.
2130 @display
2131 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
2132 @end display
2134 @noindent
2135 This asks that ``Which type is the completion style of 1st argument?''.
2136 Here are the possible completion style.
2138 @table @code
2139 @item String
2140 read plain string
2141 @item Complete
2142 read with completion
2143 @item File
2144 read file name
2145 @item Option
2146 read optional string (if string omitted, omit [] too)
2147 @item Position
2148 read positional option (like [htbp])
2149 @item Coord.
2150 read coordinates
2151 @item Quit
2152 quit from generating
2153 @end table
2155 Since (A) is the optional argument to specify the location of included
2156 EPS file, the completion style is @code{Position}, and the possible
2157 characters are t, b, l, and r. To tell these information to generator,
2158 operate as follows.
2160 @display
2161 Read type(1).... p
2162 Acceptable characters: tblr RET
2163 @end display
2165 (B) is coordinate. So its completion style is coOrd. We want a prompt
2166 meaning ``Maximum size'' when completion.
2168 @display
2169 Read type(2).... o
2170 Prompt for coordinates: Max size RET
2171 @end display
2173 That's all for optional argument. Select quit.
2175 @display
2176 Read type(3).... q
2177 @end display
2179 Then the generated option add-in function for \epsinput will be shown in
2180 the next window.
2182 @subsubsection Generating ``argument add-in''
2183 @cindex argument add-in
2185 Next, create the argument add-in. The arguments for \epsinput are EPS
2186 file name, framing style, and caption string in sequence.
2188 @display
2189 M-x YaTeX-generate-simple RET
2190 epsinput RET
2192 @end display
2194 Above key strokes bring the prompt that asks the number of argument.
2195 Answer it with 3.
2197 @display
2198 How many arguments?: 3 RET
2199 @end display
2201 Then the generator asks the completion style and prompt for completion.
2202 Answer them. @kbd{f} for FileName and prompt string.
2204 @display
2205 Read type(1).... f
2206 Prompt for argument#1 EPS file name RET
2207 @end display
2209 The second argument is one of selected symbol. So the completion type
2210 is @code{Completion}.
2212 @display
2213 Read type(2).... c
2214 Prompt for argument#2 Include style RET
2215 @end display
2217 Then all the candidates ready to be read. Type single RET after
2218 entering all.
2220 @display
2221 Item[1](RET to exit): plain RET
2222 Item[2](RET to exit): frame RET
2223 Item[3](RET to exit): dframe RET
2224 Item[4](RET to exit): RET
2225 @end display
2227 The following prompt asks whether the entered string must belong to
2228 candidates or not. In this case, since the argument must be one of
2229 @code{plain}, @code{frame}, and @code{dframe}, type @code{y}.
2231 @display
2232 Require match? (y or n) y
2233 @end display
2235 The last argument is the caption string for which any completion is
2236 needed.
2238 @display
2239 Read type(3).... s
2240 Prompt for argument#3 Caption RET
2241 default: Figure of RET
2242 @end display
2244 Finally we'll get the argument add-in in the next window.
2246 @subsection Contribution
2248 If you get your own pretty function and you let it be in public, please
2249 steel yourself in the happy atmosphere and do not send me the function.
2250 I do know it is not fine because it is generated by yatexgen:-p.
2252 @node Etcetera, Copying, Customizations, Top
2253 @comment node-name, next, previous, up
2254 @chapter Etcetera
2256 The standard completion tables provided in @file{yatex.el} contain a
2257 few La@TeX{} commands I frequently use. This is to lessen the key
2258 strokes to complete entire word, because too many candidates
2259 rarely used often cause too many hits. Therefore always try to
2260 use completion in order to enrich your dictionary, and you will
2261 also find `Wild Bird' growing suitable for your La@TeX{} style.
2263 The package name `Wild Bird' is the English translation of Japanese
2264 title `Yachou', which is a trick on words of Japanese.
2266 @node Copying, , Etcetera, Top
2267 @comment node-name, next, previous, up
2268 @chapter Copying
2270 This program is distributed as a free software. You can
2271 redistribute this software freely but with NO warranty to anything
2272 as a result of using this software. However, any reports and
2273 suggestions are welcome as long as I feel interests in this
2274 software. My possible e-mail address is `yuuji@@ae.keio.ac.jp'.
2275 (up to Mar.1995 at least) And there is mailing list for YaTeX.
2276 Although the common language is Japanese, questions in English will be
2277 welcome. To join the ML, send the mail whose subject is `append' to
2278 the address `yatex-control@@jaist.ac.jp'. If you have some
2279 question, please ask to `yatex-request@@jaist.ac.jp'.
2281 The specification of this software will be surely modified
2282 (depending on my feelings) without notice :-p.
2285 @flushright
2286 HIROSE Yuuji
2287 @end flushright
2288 @bye
2290 Local variables:
2291 mode: texinfo
2292 fill-prefix: nil
2293 fill-column: 74
2294 End: