yatex

view docs/yatexe @ 566:2ef9f21dd13b

Add note on YaTeX::usepackage-alist-default
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 24 Jan 2019 15:19:32 +0900
parents 355b28fc0025
children
line source
1 Info file: yatexe, -*-Text-*-
2 produced by `texinfo-format-buffer'
3 from file `yatexe.tex'
4 using `texinfmt.el' version 2.42 of 7 Jul 2006.
6 START-INFO-DIR-ENTRY
7 * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs (English).
8 END-INFO-DIR-ENTRY
14 
15 File: yatexe, Node: Top, Next: What is YaTeX?, Prev: (dir), Up: (dir)
17 * Menu:
19 * What is YaTeX?::
20 * Main features:: What YaTeX can do
21 * Installation:: Guide to install
22 * Typesetting:: Call typesetting processes
23 * %#notation:: Meta-keyword `%#'
24 * Completion:: Input LaTeX commands with completion
25 * Local dictionaries:: Directory dependent completion
26 * Commenting out:: Commenting/uncommenting text
27 * Cursor jump:: Jumping to related position
28 * Changing and Deleting:: Changing/deleting certain unit of text
29 * Filling:: Filling an item or paragraph
30 * Updation of includeonly:: Free from maintaining includeonly
31 * What column:: Check what table-column the cursor belong
32 * Intelligent newline:: Guess requisites of new line
33 * Usepackage checker:: Selecting correct \usepackage is YaTeX's job
34 * Online help:: On-line documentation of LaTeX
35 * Browsing file hierarchy:: Walking through file hierarchy
36 * Cooperation with other packages:: Work well with gmhist, min-out
37 * Customizations:: How to breed `Wild Bird'
38 * Etcetera:: YaTeX is acquisitive.
39 * Copying:: Redistribution
43 
44 File: yatexe, Node: What is YaTeX?, Next: Main features, Prev: Top, Up: Top
46 What is YaTeX?
47 **************
49 YaTeX automates typesetting and previewing of LaTeX and enables
50 completing input of LaTeX mark-up command such as
51 `\begin{}'..`\end{}'.
53 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
54 Language Enhancement to GNU Emacs), and latex on DOS.
57 
58 File: yatexe, Node: Main features, Next: Installation, Prev: What is YaTeX?, Up: Top
60 Main features
61 *************
63 * Invocation of typesetter, previewer and related programs(`C-c t')
64 * Typesetting on static region which is independent from point
65 * Semiautomatic replacing of `\includeonly'
66 * Jumping to error line(`C-c '')
67 * Completing-read of LaTeX commands such as `\begin{}', `\section' etc.
68 (`C-c b', `C-c s', `C-c l', `C-c m')
69 * Enclosing text into LaTeX environments or commands (ABOVEKEYSTROKES
70 after region setting)
71 * Displaying the structure of text at entering sectioning commands
72 * Lump shifting of sectioning commands (*Note view-sectioning::)
73 * Learning unknown/new LaTeX commands for the next completion
74 * Argument reading with a guide for complicated LaTeX commands
75 * Generating argument-readers for new/unsupported commands(`yatexgen')
76 * Quick changing or deleting of LaTeX commands(`C-c c', `C-c k')
77 * Jumping from and to inter-file, begin<->end, ref<->label(`C-c g')
78 * Blanket commenting out or uncommenting (`C-c >', `C-c <', `C-c ,',
79 `C-c .')
80 * Easy input of accent mark, math-mode's commands and Greek letters
81 (`C-c a', `;', `:')
82 * Online help for the popular LaTeX commands (`C-c ?', `C-c /')
83 * Document files hierarchy browser (`C-c d')
84 * Adding automatically \usepackage corresponding to inputting LaTeX
85 macro with completion
86 * Allow you to forget creating \label{}s, \ref{} or \cite{} completion
87 automatically generate labels.
88 * \includegraphics by Drag&Drop of image file
91 
92 File: yatexe, Node: Installation, Next: Typesetting, Prev: Main features, Up: Top
94 Installation
95 ************
97 Put next two expressions into your `~/.emacs'.
99 (setq auto-mode-alist
100 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
101 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
103 Next, add certain path name where you put files of YaTeX to your
104 load-path. If you want to put them in `~/src/emacs', write
106 (setq load-path
107 (cons (expand-file-name "~/src/emacs") load-path))
109 in your `~/.emacs'
111 Then, yatex-mode will be automatically loaded when you visit a file
112 which has extension `.tex'. If yatex-mode is successfully loaded, mode
113 string on mode line will be turned to "YaTeX".
117 
118 File: yatexe, Node: Typesetting, Next: %#notation, Prev: Installation, Up: Top
120 Typesetting
121 ***********
123 The prefix key stroke of yatex-mode is `C-c' (Press 'C' with Control
124 key) by default. If you don't intend to change the prefix key stroke,
125 assume all `[prefix]' as `C-c' in this document. These key strokes
126 execute typeset or preview command.
128 `[prefix] t j'
129 ... invoke typesetter
130 `[prefix] t r'
131 ... invoke typesetter on region
132 `[prefix] t e'
133 ... `on-the-fly preview' on current environment or whole
134 portion of current formulas in math-mode
135 `[prefix] t d'
136 ... invoke dvipdfmx after successful typesetting
137 `[prefix] t k'
138 ... kill current typesetting process
139 `[prefix] t b'
140 ... invoke bibtex
141 `[prefix] t i'
142 ... invoke makeindex
143 `[prefix] t d'
144 ... invoke latex && dvipdfmx
145 `[prefix] t p'
146 ... preview
147 `[prefix] t l'
148 ... lpr dvi-file
149 `[prefix] t s'
150 ... search current string on xdvi-remote
152 * Menu:
154 * Calling typesetter::
155 * Calling previewer::
156 * Printing out::
159 
160 File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting
162 Calling typesetter
163 ==================
165 Typing `[prefix] t j', the current editing window will be divided
166 horizontally when you invoke latex command, and log message of LaTeX
167 typesetting will be displayed in the other window; called typesetting
168 buffer. The typesetting buffer automatically scrolls up and traces LaTeX
169 warnings and error messages. If you see latex stopping by an error, you
170 can send string to latex in the typesetting buffer.
172 If an error stops the LaTeX typesetting, this key stroke will move the
173 cursor to the line where LaTeX error is detected.
175 `[prefix] ''
176 `([prefix]+single quotation)'
178 ... jump to the previous error or warning
180 If you find a noticeable error, move to the typesetting buffer and move
181 the cursor on the line of error message and type `SPACE' key. This makes
182 the cursor move to corresponding source line.
184 YaTeX-typeset-region invoked by `[prefix] tr' call typesetter for
185 region. The region is specified by standard point and mark, or by
186 `%#BEGIN' and `%#END' marks. Selected region will be copied to the
187 temporary file `texput.tex' with the same preamble as the main file of
188 current editing sources. Be sure to put all local macro settings in
189 preamble, not after `\begin{document}'. The method of specification of
190 the region is shown in the section *Note %#notation::.
192 The documentclass for typeset-region is the same as that of editing file
193 if you edit one file, and is the same as main file's if you edit splitting
194 files.
196 The `[prefix] te' key automatically marks current inner environment or
197 inner math mode or paragraph, and then call typeset-region with marked
198 region. This is convenient to quick view of current tabular environment
199 or current editing formulas. If running Emacs has the ability of
200 displaying images, typeset image will be shown in the next window.
201 Further more, if you modify the content within that environment, YaTeX
202 performs `on-the-fly' preview that automatically update preview image as
203 you typed.
205 If your Emacs does not supply on-the-fly preview, keeping previewer window
206 for `texput.dvi' is handy for debugging. Since `[prefix] te' selects the
207 inner-most environment as region, it is not suitable for partial
208 typesetting of doubly or more composed environment. If you want to do
209 partial typesetting for a nested environment, use `[prefix] tr' for
210 static-region, which is described in the section *Note %#notation::.
213 
214 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting
216 Calling previewer
217 =================
219 `[prefix] t p' invokes the TeX previewer. And if you are using
220 xdvi-remote, which can be controled from other terminals, `[prefix] t s'
221 enables you to search current string at the cursor on the running xdvi
222 window.
225 
226 File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting
228 Printing out
229 ============
231 When you type `[preifx] t l', YaTeX asks you the range of dvi-printing
232 by default. You can skip this by invoking it with universal-argument as
233 follows:
235 C-u [prefix] tl
238 
239 File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top
241 %# notation
242 ***********
244 You can control the typesetting process by describing `%#' notations in
245 the source text.
247 * Menu:
249 * Changing typesetter::
250 * Splitting input files::
251 * Static region for typesetting::
252 * Special Filtering Region::
253 * Lpr format::
254 * Controlling which command to invoke::
255 * Editing %# notation::
258 
259 File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation
261 To change the `latex' command or to split a source text.
262 ========================================================
264 To change the typesetting command, write
266 %#!latex-big
268 anywhere in the source text. This is useful for changing typesetter.
271 
272 File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation
274 Splitting input files
275 =====================
277 And if you split the source text and edit subfile that should be
278 included from main text.
280 %#!latex main.tex
282 will be helpful to execute latex on main file from sub text buffer. Since
283 this command line after `%#!' will be sent to shell literally, next
284 description makes it convenient to use ghostview as dvi-previewer.
286 %#!latex main && dvi2ps main.dvi > main
288 Note that YaTeX assumes the component before the last period of the last
289 word in this line as base name of the main LaTeX source. The `%f'
290 notation in this line is replaced by main file name, and `%r' replaced by
291 root name of main file name. If you specify `%f' or `%r', YaTeX always
292 ask you the name of main file at the first typesetting.
294 To make best use of the feature of inter-file jumping by `[prefix] g'
295 (see *Note Cursor jump::), take described below into consideration.
297 * You can put split texts in sub directory, but not in sub directory of
298 sub directory.
299 * In the main text, specify the child file name with relative path name
300 such as \include{chap1/sub}, when you include the file in a
301 sub-directory.
302 * In a sub-text, write `%#!latex main.tex' even if `main.tex' is in the
303 parent directory(not %#!latex ../main.tex).
306 
307 File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation
309 Static region
310 =============
312 Typeset-region by `[prefix] tr' passes the region between point and mark
313 to typesetting command by default. But when you want to typeset static
314 region, enclose the region by `%#BEGIN' and `%#END' as follows.
316 %#BEGIN
317 TheRegionYouWantToTypesetManyTimes
318 %#END
320 This is the rule of deciding the region.
322 1. If there exists %#BEGIN before point,
324 1. If there exists %#END after %#BEGIN,
325 * From %#BEGIN to %#END.
327 2. If %#END does not exist after %#BEGIN,
328 * From %#BEGIN to the end of buffer.
330 2. If there does not exist %#BEGIN before point,
331 * Between point and mark(standard method of Emacs).
333 It is useful to write `%#BEGIN' in the previous line of \begin and
334 `%#END' in the next line of \`end' when you try complex environment such
335 as `tabular' many times. It is also useful to put only `%#BEGIN' alone at
336 the middle of very long text. Do not forget to erase `%#BEGIN' `%#END'
337 pair.
340 
341 File: yatexe, Node: Special Filtering Region, Next: Lpr format, Prev: Static region for typesetting, Up: %#notation
343 Special Filtering Region
344 ========================
345 A region like below will be passed to external filter command.
346 %#BEGIN FILTER{foo.pdf}{dot -T %t -o %o}
347 \if0
348 ....blah blah blah...
349 ....blah blah blah...
350 ....blah blah blah...
351 \fi
352 %#END
354 In this case, typing `[prefix] t e' send three `blah' lines
355 to "dot -T pdf -o foo.pdf" as standard-input. It is useful to
356 have source of text-origin graphic generated by such tools as
357 graphviz or blockdiag, in LaTeX source. This special form of region
358 can be inserted via feeding `.dot' into environment completion by
359 `[prefix] t b'.
364 
365 File: yatexe, Node: Lpr format, Next: Controlling which command to invoke, Prev: Static region for typesetting, Up: %#notation
367 Lpr format
368 ==========
370 Lpr format is specified by three Lisp variables. Here are the default
371 values of them.
373 `(1)dviprint-command-format'
374 `"dvi2ps %f %t %s | lpr"'
375 `(2)dviprint-from-format'
376 `"-f %b"'
377 `(3)dviprint-to-format'
378 `"-t %e"'
380 On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text,
381 `%f' by contents of (2), %t by contents of (3). At these replacements,
382 `%b' in (2) is also replaced by the number of beginning page, `%e' in (3)
383 is replaced by the number of ending page. But `%f' and `%t' are ignored
384 when you omit the range of print-out by `C-u [prefix] tl'.
386 If you want to change this lpr format temporarily, put a command such as
387 follows somewhere in the text:
389 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
391 And if you want YaTeX not to ask you the range of printing out, the next
392 example may be helpful.
394 %#LPR dvi2ps %s | lpr
397 
398 File: yatexe, Node: Controlling which command to invoke, Next: Editing %# notation, Prev: Lpr format, Up: %#notation
400 Controlling which command to invoke
401 ===================================
403 These %# notation below can control which command to invoke for LaTeX
404 related process.
406 `%#PREVIEW'
408 ... Command line for DVI viewing ([prefix] t p)
409 `%#MAKEINDEX'
411 ... Command line for makeindex ([prefix] t i)
412 `%#BIBTEX'
414 ... Command line for bibtex ([prefix] t b)
415 `%#DVIPDF'
417 ... Command line for dvipdf(mx) ([prefix] t b)
418 `%#LPR'
420 ... Command line for printing out([prefix] t l)
421 `%#PDFVIEW'
423 ... Command line for PDF viewing
424 `%#IMAGEDPI'
426 ... DPI value for converting to on-the-fly prewview image
428 If you want to invoke "makeidx hogehoge" to update index, put the next
429 line some upper place in the source, for example.
431 %#MAKEINDEX makeidx hogehoge
435 
436 File: yatexe, Node: Editing %# notation, Prev: Controlling which command to invoke, Up: %#notation
438 Editing %# notation
439 ===================
441 To edit `%#' notation described above, type
443 `[prefix] %'
444 ... editing %# notation menu
446 and select one of the entry of the menu as follows.
448 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
450 Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and
451 `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN'
452 and `%#END' are automatically erased.
455 
456 File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top
458 Completion
459 **********
461 YaTeX makes it easy to input the LaTeX commands. There are several
462 kinds of completion type, begin-type, section-type, large-type, etc...
464 * Menu:
466 * Begin-type completion::
467 * Section-type completion::
468 * Label Generation::
469 * Large-type completion::
470 * Maketitle-type completion::
471 * Arbitrary completion::
472 * End completion::
473 * Accent completion::
474 * Image completion::
475 * Greek letters completion::
476 * Inserting parentheses::
479 
480 File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion
482 Begin-type completion
483 =====================
485 "Begin-type completion" completes commands of `\begin{env}' ...
486 `\end{env}'. All of the begin-type completions begin with this key
487 sequence.
489 `[prefix] b'
490 ... start begin-type completion
492 An additional key stroke immediately completes a frequently used LaTeX
493 `\begin{}'...`\`end'{}' environment.
495 `[prefix] b c'
496 ... `\begin{center}...\end{center}'
497 `[prefix] b d'
498 ... `\begin{document}...\end{document}'
499 `[prefix] b D'
500 ... `\begin{description}...\end{description}'
501 `[prefix] b e'
502 ... `\begin{enumerate}...\end{enumerate}'
503 `[prefix] b E'
504 ... `\begin{equation}...\end{equation}'
505 `[prefix] b i'
506 ... `\begin{itemize}...\end{itemize}'
507 `[prefix] b l'
508 ... `\begin{flushleft}...\end{flushleft}'
509 `[prefix] b m'
510 ... `\begin{minipage}...\end{minipage}'
511 `[prefix] b t'
512 ... `\begin{tabbing}...\end{tabbing}'
513 `[prefix] b T'
514 ... `\begin{tabular}...\end{tabular}'
515 `[prefix] b^T'
516 ... `\begin{table}...\end{table}'
517 `[prefix] b p'
518 ... `\begin{picture}...\end{picture}'
519 `[prefix] b q'
520 ... `\begin{quote}...\end{quote}'
521 `[prefix] b Q'
522 ... `\begin{quotation}...\end{quotation}'
523 `[prefix] b r'
524 ... `\begin{flushright}...\end{flushright}'
525 `[prefix] b v'
526 ... `\begin{verbatim}...\end{verbatim}'
527 `[prefix] b V'
528 ... `\begin{verse}...\end{verse}'
530 Any other LaTeX environments are made by completing-read of the Emacs
531 function.
533 `[prefix] b SPACE'
534 ... begin-type completion
536 The next message will show up in the minibuffer
538 Begin environment(default document):
540 by typing `[prefix] b'. Put the wishing environment with completion in
541 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the
542 LaTeX source text. If the environment you want to put does not exist in
543 the YaTeX completion table, it will be registered in the user completion
544 table. YaTeX automatically saves the user completion table in the user
545 dictionary file at exiting of emacs.
547 At the completion of certain environments, the expected initial entry will
548 automatically inserted such as `\item' for `itemize' environment. If you
549 don't want the entry, it can be removed by undoing.
551 If you want to enclose some paragraphs which have already been written
552 into environment, invoke the begin-type completion right after region
553 marking.
555 If you set `transient-mark-mode' to `nil' in your `~/.emacs', typing
556 `C-space' (`set-mark-command') twice turns `transient-mark-mode' on
557 temporarily. Then, type call begin-type completion to enclose text into a
558 environment.
562 
563 File: yatexe, Node: Section-type completion, Next: Label Generation, Prev: Begin-type completion, Up: Completion
565 Section-type completion
566 =======================
568 "Section-type completion" completes section-type commands which take an
569 argument or more such as `\section{foo}'. To invoke section-type
570 completion, type
572 `[prefix] s'
573 ... section-type completion
575 then the prompt
577 (C-v for view) \???{} (default documentclass):
579 will show up in the minibuffer. Section-type LaTeX commands are completed
580 by space key, and the default value is selected when you type nothing in
581 the minibuffer.
583 Next,
585 \section{???}:
587 prompts you the argument of section-type LaTeX command. For example, the
588 following inputs
590 \???{} (default documentclass): section
591 \section{???}: Hello world.
593 will insert the string
595 \section{Hello world.}
597 in your LaTeX source. When you neglect argument such as
599 (C-v for view) \???{} (default section): vspace*
600 \vspace*{???}:
602 YaTeX puts
604 \vspace*{}
606 and move the cursor in the braces.
608 In LaTeX command, there are commands which take more than one arguments
609 such as `\addtolength{\topmargin}{8mm}'. To complete these commands,
610 invoke section-type completion with universal argument as,
612 C-u 2 [prefix] s (or ESC 2 [prefix] s)
614 and make answers in minibuffer like this.
616 (C-v for view) \???{} (default vspace*): addtolength
617 \addtolength{???}: \topmargin
618 Argument 2: 8mm
620 `\addtolength' and the first argument `\topmargin' can be typed easily by
621 completing read. Since YaTeX also learns the number of arguments of
622 section-type command and will ask that many arguments in future
623 completion, you had better tell the number of arguments to YaTeX at the
624 first completion of the new word. But you can change the number of
625 arguments by calling the completion with different universal argument
626 again.
629 Invoking section-type completion with `[Prefix] S' (Capital `S')
630 includes the region as the first argument of section-type command.
632 The section/large/maketitle type completion can work at the prompt for
633 the argument of other section-type completion. Nested LaTeX commands are
634 efficiently read with the recursive completion by typing YaTeX's
635 completion key sequence in the minibuffer.
637 * Menu:
639 * view-sectioning::
642 
643 File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion
645 view-sectioning
646 ---------------
648 In the minibuffer at the prompt of section-type command completion,
649 typing `C-v' shows a list of sectioning commands in source text(The line
650 with `<<--' mark is the nearest sectioning command). Then, default
651 sectioning command appears in the minibuffer. You can go up/down
652 sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing
653 buffer by `C-v'/`M-v', and can hide sectioning commands under certain
654 level by 0 through 6. Type `?' in the minibuffer of sectioning prompt
655 for more information.
657 You can generate this listing buffer (`*Sectioning Lines*' buffer) by
658 typing
659 `M-x YaTeX-section-overview'
660 ... Generate *Sectioning Lines* buffer
662 from the LaTeX source buffer. In this listing buffer, typing `u' on
663 the sectioning command shifts up the corresponding sectioning command in
664 source text and `d' shifts down. After marking lines in the listing
665 buffer, typing `U' shifts up all sectioning commands in the region,
666 and `U' shifts down. Here are all the key bindings of
667 `*Sectioning Lines*' buffer.
669 `SPC'
670 ... Jump to corresponding source line
671 `.'
672 ... Display corresponding source line
673 `u'
674 ... Shift up a sectioning line
675 `d'
676 ... Shift down a sectioning line
677 `U'
678 ... Shift up sectioning lines in region
679 `D'
680 ... Shift down sectioning lines in region
681 `0...6'
682 ... Hide sectioning commands whose level is lower than n
685 
686 File: yatexe, Node: Label Generation, Next: Large-type completion, Prev: Section-type completion, Up: Completion
688 Label Generation
689 ================
691 When you want to type-in references of `\ref' or `\cite', all you have to
692 do is type `[prefix] s ref' without adding labels beforehand. You will
693 see possible LaTeX-counters in the next window even if some counter does
694 not have `\label'. Selecting the counter will automatically set the label
695 to that counter.
697 All possible counter list in the buffer tends to be large. You can reduce
698 the number of list by filtering type of counters by key-commands as
699 follows.
700 `M-a'
702 ... Show all(disable filtering)
703 `M-c'
705 ... Captions only
706 `M-e'
708 ... equations (with counters) only
709 `M-i'
711 ... numbers items only
712 `M-s'
714 ... sections only
715 `M-m'
717 ... other counters only
721 
722 File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Label Generation, Up: Completion
724 Large-type completion
725 =====================
727 "Large-type completion" inputs the font or size changing descriptions
728 such as `{\large }'. When you type
730 `[prefix] l'
731 ... large-type completion
733 the message in the minibuffer
735 {\??? } (default large):
737 prompts prompts you large-type command with completing-read. There are
738 TeX commands to change fonts or sizes, `it', `huge' and so on, in the
739 completion table.
741 Region-based completion is also invoked by calling completion after
742 region activated.
745 
746 File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion
748 Maketitle-type completion
749 =========================
751 We call it "maketitle-type completion" which completes commands such as
752 `\maketitle'. Take notice that maketitle-type commands take no arguments.
753 Then, typing
755 `[prefix] m'
756 ... maketitle-type completion
758 begins maketitle-completion. Above mentioned method is true for
759 maketitle-completion, and there are LaTeX commands with no arguments in
760 completion table.
763 
764 File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion
766 Arbitrary completion
767 ====================
769 You can complete certain LaTeX command anywhere without typical
770 completing method as described, by typing
772 `[prefix] SPC'
773 ... arbitrary completion
775 after the initial string of LaTeX command that is preceded by `\'.
778 
779 File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion
781 End completion
782 ==============
784 YaTeX automatically detects the opened environment and close it with
785 \`\end{environment}'. Though proficient YaTeX users never fail to make
786 environment with begin-type completion, some may begin an environment
787 manually. In that case, type
789 `[prefix] e'
790 ... `end' completion
792 at the end of the opened environment.
795 
796 File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion
798 Accent completion
799 =================
801 When you want to write the European accent marks(like `\`{o}'),
803 `[prefix] a'
804 ... accent completion
806 shows the menu
808 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
810 in the minibuffer. Chose one character or corresponding numeric, and you
811 will see
813 \`{}
815 in the editing buffer with the cursor positioned in braces. Type one more
816 character `o' for example, then
818 \`{o}
820 will be completed, and the cursor gets out from braces.
823 
824 File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion
826 Image completion of mathematical sign
827 =====================================
829 Arrow marks, sigma mark and those signs mainly used in the TeX's math
830 environment are completed by key sequences which imitate the corresponding
831 symbols graphically. This completion only works in the math environment.
832 YaTeX automatically detects whether the cursor located in math environment
833 or not, and change the behavior of key strokes `;' and `:'.
835 By the way, we often express the leftarrow mark by `<-' for example.
836 Considering such image, you can write `\leftarrow' by typing `<-'
837 after `;' (semicolon) as a prefix. In the same way,
838 `\longleftarrow' (`<--') is completed by typing `;<--',
839 infinity mark which is imitated by `oo' is completed by typing
840 `;oo'.
842 Here are the sample operations in YaTeX math-mode.
844 INPUT Completed LaTeX commands
845 ; < - `\leftarrow'
846 ; < - - `\longleftarrow'
847 ; < - - > `\longleftrightarrow'
848 ; o `\circ'
849 ; o o `\infty'
851 In any case, you can quit from image completion and can move to the next
852 editing operation if the LaTeX command you want is shown in the buffer.
854 `;' itself in math-environment is inserted by `;;'. Typing
855 `TAB' in the midst of image completion shows all of the LaTeX
856 commands that start with the same name as string you previously typed in.
857 In this menu buffer, press `RET' after moving the cursor (by `n',
858 `p', `b', `f') to insert the LaTeX command.
860 To know all of the completion table, type `TAB' just after `;'. And
861 here is the sample menu by `TAB' after `;<'.
863 KEY LaTeX sequence sign
864 < \leq <
865 ~
866 << \ll <<
867 <- \leftarrow <-
868 <= \Leftarrow <=
870 You can define your favorite key-vs-sequence completion table in the
871 Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also
872 `yatexmth.el' for the information of the structure of this variable.
875 
876 File: yatexe, Node: Greek letters completion, Next: Inserting parentheses, Prev: Image completion, Up: Completion
878 Greek letters completion
879 ========================
881 Math-mode of YaTeX provides another image completion, Greek letters
882 completion in the same method. After prefix `:', typing `a' makes
883 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type
884 `:TAB' to know all the correspondence of alphabets vs. Greek letters.
886 If you will find `;' or `:' doesn't work in correct position of
887 math environment, it may be a bug of YaTeX. Please send me a bug report
888 with the configuration of your text, and avoid it temporarily by typing
889 `;' or `:' after universal-argument(`C-u') which forces
890 `;' and `:' to work as math-prefix.
893 
894 File: yatexe, Node: Inserting parentheses, Prev: Greek letters completion, Up: Completion
896 Inserting parentheses
897 =====================
899 Typing opening parenthesis, one of `(', `{ and `['', automatically
900 inserts the closing one. If a opening bracket is typed after `\', `\]' is
901 automatically inserted with computed indentation. If you stop automatic
902 insertion, type `C-q' before opening parenthesis.
905 
906 File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top
908 Local dictionaries
909 ******************
911 Tables for completion consist of three dictionaries; `standard
912 dictionary' built in `yatex.el', `user dictionary' for your common private
913 commands, and `local dictionary' that is effective in a certain directory.
915 When you input the command unknown to YaTeX at a completion in the
916 minibuffer, YaTeX asks you with the following prompt;
918 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard
920 In this menu, typing `u' updates your `user dictionary', `l' updates your
921 local dictionary, `n' updates only on-memory dictionary which go through
922 only current Emacs session, and `d' updates no dictionary and throws the
923 new word away.
925 If you find this switching feature meaningless and bothersome, put the
926 next expression into your `~/.emacs'
928 (setq YaTeX-nervous nil)
931 
932 File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top
934 Commenting out
935 **************
937 You may want to comment out some region.
939 `[prefix] >'
940 ... comment out region by %
941 `[prefix] <'
942 ... uncomment region
944 cause an operation to the region between point and mark.
946 `[prefix] .'
947 ... comment out current paragraph
948 `[prefix] ,'
949 ... uncomment current paragraph
951 comments or uncomments the paragraph where the cursor belongs. This
952 `paragraph' means the region marked by the function mark-paragraph, bound
953 to `ESC h' by default. It is NOT predictable what will happen when you
954 continuously comment out some paragraph many times.
956 You can also comment out an environment between `\begin' and
957 `\end', or a `\begin'-\`\end' pair themselves, by making the
958 following key strokes on the line where `\begin{}' or
959 `\end{}' exists.
961 `[prefix] >'
962 ... comment out from \begin to \`end'
963 `[prefix] <'
964 ... uncomment from \begin to \`end'
966 comment whole the contents of environment. Moreover,
968 `[prefix] .'
969 ... comment out \begin and \`end'
970 `[prefix] ,'
971 ... uncomment \begin and \`end'
973 (un)comments out only environment declaration: `\begin{}' and `\end{}'.
974 NOTE that even if you intend to comment out some region, invoking
975 `[prefix] >' on the `\begin',`\end' line decides to work in `commenting
976 out from `\begin' to `\end'' mode.
980 
981 File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top
983 Cursor jump
984 ***********
987 * Menu:
989 * Jump to corresponding object::
990 * Invoking image processor::
991 * Jump to main file::
992 * Jumping around the environment::
993 * Jumping to last completion position::
996 
997 File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump
999 Jump to corresponding object
1000 ============================
1002 Typing
1004 `[prefix] g'
1005 ... go to corresponding object
1007 in a certain place move the cursor to the place corresponding to the LaTeX
1008 command of last place. YaTeX recognize the followings as pairs that have
1009 relation each other.
1011 * `\begin{}' <-> `\end{}'
1012 * `%#BEGIN' <-> `%#END'
1013 * On the image-including line -> corresponding viewer or drawing tool
1014 * `\label{}' <-> `\ref{}'
1015 * `\include(\input)' -> included file
1016 * `\bibitem{}' <-> `\cite{}'
1018 On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the
1019 corresponding `\end',`\begin' line, if its partner really exists. The
1020 behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the
1021 correspondent of `label/ref' or `cite/bibitem' exists in another file,
1022 that file have to be opened to make a round trip between references by
1023 `[prefix] g'.
1025 If you type `[prefix] g' on the line of `\include{chap1}', typically in
1026 the main text, YaTeX switches buffer to `chap1.tex'.
1028 `[prefix] 4 g'
1029 ... go to corresponding object in other window
1031 do the same job as `[prefix] g' except it's done in other window.
1032 Note that this function doesn't work on `begin/end',
1033 `%#BEGIN/%#END' pairs because it is meaningless.
1037 File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump
1039 Invoking image processor
1040 ========================
1043 `image-including line' described above means such lines as
1044 `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX
1045 automatically searches source of `foo.ps' and invokes image viewer or
1046 drawing tool correspoinding to it. For example; if you draw an image
1047 foo.obj with Tgif and enclose its product named foo.eps by `\epsfile'
1048 command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif
1049 foo.obj'. How a processor is choosen is as follows.
1051 1. If there is an expression matching with one of the pattern defined in
1052 `YaTeX-processed-file-regexp-alist', extract file name from regexp
1053 group surrounded by \\(\\). (Which group corresponds is written in
1054 the cdr part of each list.) If no matches were found, do nothing.
1055 2. If there is a pattern as `%PROCESSOR' which is defined in the
1056 variable `YaTeX-file-processor-alist', call that processor giving the
1057 file name with corresponding extension.
1058 3. If not, check the existence of each file which is supplied the
1059 extension in the cdr part of each list of
1060 `YaTeX-file-processor-alist'. If any, call the corresponding image
1061 viewer or drawing tool.
1065 File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump
1067 Jump to main file
1068 =================
1070 Typing
1072 `[prefix] ^'
1073 ... visit main file
1074 `[prefix] 4^'
1075 ... visit main file in other buffer
1077 in a sub text switch the buffer to the main text specified by
1078 `%#!' notation.
1082 File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump
1084 Jumping around the environment
1085 ==============================
1087 And these are the functions which work on the current LaTeX environment:
1089 `M-C-a'
1090 ... beginning of environment
1091 `M-C-e'
1092 ... `end' of environment
1093 `M-C-@'
1094 ... mark environment
1098 File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump
1100 Jumping to last completion position
1101 ===================================
1103 YaTeX always memorize the position of completion into register `3'. So
1104 every time you make a trip to any other part of text other than you are
1105 writing, you can return to the editing paragraph by calling
1106 register-to-point with argument YaTeX-current-position-register, which is
1107 achieved by typing `C-x j 3'(by default).
1111 File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top
1113 Changing and Deleting
1114 *********************
1116 These functions are for change or deletion of LaTeX commands already
1117 entered.
1119 `[prefix] c'
1120 ... change LaTeX command
1121 `[prefix] k'
1122 ... kill LaTeX command
1124 * Menu:
1126 * Changing LaTeX commands::
1127 * Killing LaTeX commands::
1131 File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting
1133 Changing LaTeX commands
1134 =======================
1136 `[prefix] c' can change the various (La)TeX commands. This can change the
1137 followings.
1138 * Environment names
1139 * Section-type commands
1140 * Argument of section-type commands
1141 * Optional parameters (enclosed by []) of section-type commands
1142 * Font/size designators
1143 * Math-mode's maketitle-type commands that can be inputted with image
1144 completion
1146 Typing `[prefix] c' on one of above objects you want to change brings a
1147 suitable reading function sometimes with completion. Note: If you want to
1148 change the argument of section-type command that contains other LaTeX
1149 commands, type `[prefix] c' either of surrounding braces of the argument
1150 in order to make YaTeX ignore the internal LaTeX sequences as an object of
1151 changing. Anyway, it is very difficult to know which argument position
1152 the cursor belongs because the LaTeX commands can be nested and braces can
1153 freely emerge. So keep it mind to put the cursor on a brace when you are
1154 thinking of changing a complicated argument.
1158 File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting
1160 Killing LaTeX commands
1161 ======================
1163 `[prefix] k' kills the LaTeX commands sometimes with their arguments.
1164 Following table illustrates the correspondence of the invoking position
1165 and what is killed.
1167 [Invoking position] [action]
1168 \begin, \end line kill \begin,\end pairs
1169 %#BEGIN, %#END line kill %#BEGIN,%#END pairs
1170 on a Section-type command kill section-type command
1171 on a parenthesis kill parentheses
1173 Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines
1174 `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take
1175 care not to create any line that contains more than one `\begin' or so.
1177 While all operations above are to kill `containers' which surround some
1178 text, universal argument (`C-u') for these commands kills not only
1179 `containers' but also `contents' of them. See below as a sample.
1181 Original text: [prefix] k C-u [prefix] k
1182 Main \footnote{note} here. Main note here. Main here.
1183 ~(cursor)
1187 File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top
1189 Filling
1190 *******
1193 Filling an item
1194 ===============
1196 To fill a term (descriptive sentences) of `\item', type
1198 `M-q'
1199 ... fill item
1201 on that item.
1203 YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular
1204 expression to search item header in itemize environment. If you make a
1205 newcommand to itemize terms(e.g. `\underlineitem'), put
1207 (setq YaTeX-item-regexp
1208 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)")
1210 in your `~/.emacs'. If you are not familiar with regular expression
1211 for Emacs-Lisp, name a newcommand for `itemize' beginning with
1212 `\item' such as `\itembf', not `\bfitem'.
1214 This function reformats the `\item' into `hang-indented' style. For
1215 example:
1217 itemize, enumerate environment:
1219 >\item[foo] `foo' is the typical word for describing an
1220 > arbitrarily written....
1221 description environment:
1222 > \item[bar] When the word `for' is used as an arbitrarily
1223 > word, `bar' is bound to follow it.
1225 Note that the indent depth of an `\item' word and its descriptive
1226 paragraph are the same in latter case. If you want to use different
1227 depth, invoke fill-paragraph at the beginning of non-whitespace
1228 character(see below).
1231 Filling paragraph
1232 =================
1234 Fill-paragraph is little bit adapted for LaTeX sources. It retains from
1235 filling in certain environments where formatting leads to a disaster such
1236 as verbatim, tabular, or so. And it protects `\verb' expressions from
1237 being folded (The variable `YaTeX-verb-regexp' controls this). Besides,
1238 putting cursor on the first occurrence of non-whitespace character on a
1239 line changes the fill-prefix temporarily to the depth of the line.
1243 File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top
1245 Updation of `\includeonly'
1246 **************************
1248 When you edit splitting source texts, the notation
1250 \includeonly{CurrentEditingFileName}
1252 in the main file reduces the time of typesetting. If you want to hack
1253 other file a little however, you have to rewrite it to
1255 \includeonly{OtherFileNameYouWantToFix}
1257 in the main file. YaTeX automatically detects that the current edited
1258 text is not in includeonly list and prompts you
1260 A)dd R)eplace %)comment?
1262 in the minibuffer. Type `a' if you want to add the current file name
1263 to `\includeonly' list, `r' to replace \`includeonly' list
1264 with the current file, and type `%' to comment out the
1265 `\includeonly' line.
1269 File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top
1271 What column?
1272 ************
1274 We are often get tired of finding the corresponding column in large
1275 tabulars. For example,
1277 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
1278 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
1279 Home Addr.&Home Phone\\ \hline
1280 Thunder Bird & 6 & 223 & LA & xxx-yyy &
1281 zzz-www & Japan & 9876-54321 \\
1282 & 2 & \multicolumn{2}{c|}{Unknown}
1283 &&&(???)
1284 \\ \hline
1285 \end{tabular}
1287 Suppose you have the cursor located at `(???)' mark, can you tell which
1288 column it is belonging at once? Maybe no. In such case, type
1290 `[prefix] &'
1291 ... What column
1293 in that position. YaTeX tells you the column header of the current field.
1294 Since YaTeX assumes the first line of tabular environment as a row of
1295 column headers, you can create a row of virtual column headers by putting
1296 them in the first line and commenting that line with `%'.
1300 File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top
1302 Intelligent newline
1303 *******************
1305 At the end of begin-type completion of tabular[*], array, itemize,
1306 enumerate or tabbing environment, or typing
1308 `ESC RET'
1309 ... Intelligent newline
1311 in these environments inserts the contents corresponding to the current
1312 environment in the next line. (At the begin-type completion, this
1313 contents can be removed by `undo'.) In `tabular' environment, for
1314 example, `ESC RET' inserts the certain number of `&' and trailing `\\',
1315 and `\hline' if other `\hline' is found in backward. Here are the list of
1316 contents vs. environments.
1318 * `tabular', `tabular*', `array'
1320 Corresponding number of `&' and `\\'. And `\hline' if
1321 needed.
1323 * `tabbing'
1325 The same number of `\>' as `\=' in the first line.
1327 * `itemize', `enumerate', `description', `list'
1329 `\item' or `item[]'.
1331 Note that since this function works seeing the contents of the first
1332 line, please call this after the second line if possible.
1334 If you want to apply these trick to other environments, `foo'
1335 environment for example, define the function named
1336 `YaTeX-intelligent-newline-foo' to insert corresponding contents.
1337 That function will be called at the beginning of the next line after the
1338 newline is inserted to the current line. Since the function
1339 `YaTeX-indent-line' is designed to indent the current line properly,
1340 calling this function before your code to insert certain contents must be
1341 useful. See the definition of the function
1342 `YaTeX-intelligent-newline-itemize' as an example.
1346 File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top
1348 Usepackage checker
1349 ******************
1351 When you input begint-type, section-type, maketitle-type macros with
1352 completion, and it requires some LaTeX2e package, YaTeX examines the
1353 existence of correct `\usepackage'. If not, YaTeX inserts the
1354 `\usepackage{}' declaration corresponding to input macro.
1356 To activate the package completion for your favarite package, set the
1357 variable `YaTeX-package-alist-private' correctly. Please refere the value
1358 of `YaTeX-package-alist-default' as an example.
1362 File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top
1364 Online help
1365 ***********
1367 YaTeX provides you the online help with popular LaTeX commands.
1369 Here are the key strokes for the online help.
1371 `[prefix] ?'
1372 ... Online help
1373 `[prefix] /'
1374 ... Online apropos
1377 Online help
1378 ===========
1380 `Online help' shows the documentation for the popular LaTeX
1381 commands(defaults to the commands on the cursor) in the next buffer.
1382 There are two help file, `global help' and `private help'. The former
1383 file contains the descriptions on the standard LaTeX command and is
1384 specified its name by variable `YaTeX-help-file'. Usually, the global
1385 help file should be located in public space (`$EMACSEXECPATH' by default)
1386 and should be world writable so that anyone can update it to enrich its
1387 contents. The latter file contains descriptions on non-standard or
1388 personal command definitions and is specified by
1389 `YaTeX-help-file-private'. This file should be put into private
1390 directory.
1393 Online apropos
1394 ==============
1396 `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all
1397 the documentations that contains the keyword entered by the user.
1400 When no descriptions are found...
1401 =================================
1403 If there is no description on a command in help files, YaTeX requires
1404 you to write a description on that command. If you are willing to do,
1405 determine which help file to add and write the description on it referring
1406 your manual of (La)TeX. Please send me your additional descriptions if
1407 you describe the help on some standard commands. I might want to include
1408 it in the next distribution.
1412 File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top
1414 Browsing file hierarchy
1415 ***********************
1417 When you are editing multi-file source, typing
1419 `[prefix] d'
1420 ... browse file hierarchy
1422 asks you the parent-most file (which may be defaulted) and displays the
1423 documentation hierarchy in the next window. In this buffer, the following
1424 commands are available.
1426 `n'
1427 ... move to the next line and show its contents
1428 `p'
1429 ... move to the previous line and show its contents
1430 `N'
1431 ... move to the next file in the same inclusion level
1432 `P'
1433 ... move to the previous file in the same inclusion level
1434 `j'
1435 ... move to the next line
1436 `k'
1437 ... move to the previous line
1438 `u'
1439 ... move to the parent file
1440 `.'
1441 ... show the current files contents in the next window
1442 `SPC'
1443 ... scroll up the current file window
1444 `DEL, b'
1445 ... scroll down the current file window
1446 `<'
1447 ... show the beginning of the current file
1448 `>'
1449 ... show the end of the current file
1450 `>'
1451 ... return to the previous postion after `<' or `>'
1452 `RET, g'
1453 ... open the current file in the next window
1454 `mouse-2'
1455 ... same as RET(available only with window system)
1456 `o'
1457 ... other window
1458 `1'
1459 ... delete other windows
1460 `-'
1461 ... shrink hierarchy buffer window
1462 `+'
1463 ... enlarge hierarchy buffer window
1464 `?'
1465 ... describe mode
1466 `q'
1467 ... quit
1469 Note that operations on the file contents in the next window do not work
1470 correctly when you close the corresponding file.
1474 File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top
1476 Cooperation with other packages
1477 *******************************
1479 YaTeX works better with other brilliant packages.
1482 gmhist
1483 ======
1485 When you are loading `gmhist.el' and `gmhist-mh.el', you can use
1486 independent command history list at the prompt of preview command
1487 (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you
1488 can enter the previous command line string repeatedly by typing `M-p'.
1491 min-out
1492 =======
1494 `min-out', the outline minor mode, can be used in yatex-mode buffers.
1495 If you want to use it with YaTeX, please refer the file `yatexm-o.el' as
1496 an example.
1500 File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top
1502 Customizations
1503 **************
1505 You can customize YaTeX by setting Emacs-Lisp variables and by making
1506 add-in functions.
1508 * Menu:
1510 * Lisp variables::
1511 * Add-in functions::
1512 * Add-in generator::
1516 File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations
1518 Lisp variables
1519 ==============
1521 You can change the key assignments or make completion more comfortable
1522 by setting the values of various variables which control the movement of
1523 yatex-mode.
1525 For example, if you want to change the prefix key stroke from `C-c' to
1526 any other sequence, set YaTeX-prefix to whatever you want to use. If you
1527 don't want to use the key sequence `C-c letter' which is assumed to be the
1528 user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter'
1529 to `t', and all of the default key bind of `C-c letter' will turn to the
1530 corresponding `C-c C-letter' (but the region based completions that is
1531 invoked with `C-c Capital-letter' remain valid, if you want to disable
1532 those bindings, set that variable to 1 instead of `t').
1534 * Menu:
1536 * All customizable variables::
1537 * Sample definitions::
1538 * Hook variables::
1539 * Hook file::
1543 File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables
1545 All customizable variables
1546 --------------------------
1548 Here are the customizable variables of yatex-mode. Each value setq-ed
1549 in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected.
1550 Parenthesized contents stands for the default value. When you are to
1551 change some of these variables, see more detailed documentation of the
1552 variable by `M-x describe-variable'.
1554 -- Variable: YaTeX-japan
1555 Set this nil to produce all messages in English (`Depends on Japanese
1556 feature of Emacs')
1558 -- Variable: YaTeX-kanji-code
1559 Default buffer-file-coding-system for YaTeX modes' buffer. Set this
1560 0 to no language conversion. Nil to preserve original
1561 coding-system. 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (`1 or 2')
1563 -- Variable: YaTeX-prefix
1564 Prefix key stroke (`C-c')
1566 -- Variable: YaTeX-inhibit-prefix-letter
1567 Change key stroke from `C-c letter' to `C-c C-letter' (`nil')
1569 -- Variable: YaTeX-fill-prefix
1570 Fill-prefix used in yatex-mode (`nil')
1572 -- Variable: YaTeX-user-completion-table
1573 Name of user dictionary where learned completion table will be
1574 stored. (`"~/.yatexrc"')
1576 -- Variable: tex-command
1577 LaTeX typesetter command (`"latex"')
1579 -- Variable: dvi2-command
1580 Preview command (`"xdvi -geo +0+0 -s 4"')
1582 -- Variable: dviprint-command-format
1583 Command format to print dvi file (`"dvi2ps %f %t %s | lpr"')
1585 -- Variable: dviprint-from-format
1586 Start page format of above %f. %b will turn to start page (`"-f %b"')
1588 -- Variable: dviprint-to-format
1589 End page format of above %t. %e will turn to `end' page (`"-t %e"')
1591 -- Variable: makeindex-command
1592 Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS))
1594 -- Variable: YaTeX-dvipdf-command
1595 Default command name to convert .dvi to PDF (`"dvipdfmx"')
1597 -- Variable: YaTeX-on-the-fly-preview-interval
1598 Interval time in seconds of idle to trigger on-the-fly preview of
1599 environment by `[prefix] t e'(0.9).
1600 `Nil' disables on-the-fly preview.
1602 -- Variable: YaTeX-on-the-fly-math-preview-engine
1603 Function symbol to use on-the-fly preview of MATH environment started
1604 by `[prefix] t e' (`'YaTeX-typeset-environment-by-lmp' which calls
1605 latex-math-preview-expression function if latex-math-preview is
1606 available, otherwise `'YaTeX-typeset-environment-by-builtin' which
1607 alls built-in function).
1609 `Nil' disables on-the-fly preview.
1611 -- Variable: YaTeX-cmd-gimp
1612 Command name of GIMP (code{"gimp"})
1613 -- Variable: YaTeX-cmd-tgif
1614 Command name of tgif (code{"tgif"})
1615 -- Variable: YaTeX-cmd-inkscape
1616 Command name of Inkscape (code{"inkscape"})
1617 -- Variable: YaTeX-cmd-dia
1618 Command name of Dia (code{"dia"})
1619 -- Variable: YaTeX-cmd-ooo
1620 Command name of OpenOffice.org/LibreOffice (code{"soffice"})
1621 -- Variable: YaTeX-cmd-gs
1622 Command name of Ghostscript (code{"gs"})
1623 -- Variable: YaTeX-cmd-dvips
1624 Command name of dvips (code{"dvips"})
1625 -- Variable: YaTeX-cmd-displayline
1626 Command name of displayline
1627 (code{"/Applications/Skim.app/Contents/SharedSupport/displayline"})
1628 -- Variable: YaTeX-cmd-edit-ps
1629 Command name for editing PostScript files(Value of
1630 code{"YaTeX-cmd-gimp"})
1631 -- Variable: YaTeX-cmd-edit-pdf
1632 Command name for editing PDF files(Value of code{"YaTeX-cmd-ooo"})
1633 -- Variable: YaTeX-cmd-edit-ai
1634 Command name for editing `.ai' files(Value of
1635 code{"YaTeX-cmd-inkscape"})
1636 -- Variable: YaTeX-cmd-edit-svg
1637 Command name for editing SVG files(Value of
1638 code{"YaTeX-cmd-inkscape"})
1639 -- Variable: YaTeX-cmd-edit-images
1640 Command name for editing image files(Value of code{"YaTeX-cmd-gimp"})
1642 -- Variable: YaTeX-need-nonstop
1643 Put `\nonstopmode{}' or not (`nil')
1645 -- Variable: latex-warning-regexp
1646 Regular expression of warning message latex command puts out
1647 (`"line.* [0-9]*"')
1649 -- Variable: latex-error-regexp
1650 Regular expression of error message (`"l\\.[1-9][0-9]*"')
1652 -- Variable: latex-dos-emergency-message
1653 Message latex command running on DOS puts at abort (`"Emergency
1654 stop"')
1656 -- Variable: YaTeX-item-regexp
1657 Regular expression of item command (`"\\\\item"')
1659 -- Variable: YaTeX-verb-regexp
1660 Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"')
1662 -- Variable: YaTeX-nervous
1663 T for using local dictionary (`t')
1665 -- Variable: YaTeX-sectioning-regexp
1666 Regexp of LaTeX sectioning command
1667 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"')
1669 -- Variable: YaTeX-fill-inhibit-environments
1670 Inhibit fill in these environments (`'("tabular" "tabular*" "array"
1671 "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath"
1672 "verbatim" "verbatim*")')
1674 -- Variable: YaTeX-uncomment-once
1675 T for deleting all preceding `%' (`nil')
1677 -- Variable: YaTeX-close-paren-always
1678 T for always close all parenthesis automatically, `nil' for only eol
1679 (`t')
1681 -- Variable: YaTeX-auto-math-mode
1682 Switch math-mode automatically (`t')
1684 -- Variable: YaTeX-math-key-list-private
1685 User defined alist, math-mode-prefix vs completion alist used in
1686 image completion (`nil'). See `yatexmth.el' for the information
1687 about how to define a completion alist.
1689 -- Variable: YaTeX-default-pop-window-height
1690 Initial height of typesetting buffer when one-window. Number for the
1691 lines of the buffer, numerical string for the percentage of the
1692 screen-height. `nil' for half height (10)
1694 -- Variable: YaTeX-help-file
1695 Global online help file name
1696 (`$doc-directory/../../site-lisp/YATEXHLP.eng')
1698 -- Variable: YaTeX-help-file-private
1699 Private online help file name (`"~/YATEXHLP.eng"')
1701 -- Variable: YaTeX-no-begend-shortcut
1702 Disable [prefix] b ?? shortcut (`nil)'
1704 -- Variable: YaTeX-hilit-pattern-adjustment-private
1705 List of the list that contain the regular expression and the symbol
1706 of logical meaning of the string that matches the pattern. See also
1707 the value from `(assq 'yatex-mode hilit-patterns-alist)' and the
1708 value of `YaTeX-hilit-pattern-adjustment-default' (and even the
1709 document of hilit19.el).
1711 -- Variable: YaTeX-sectioning-level
1712 Alist of LaTeX's sectioning command vs its height.
1714 -- Variable: YaTeX-hierarchy-ignore-heading-regexp
1715 `YaTeX-display-hierarchy' searches for sectioning command first, and
1716 comment line secondary as a file headings. In latter case, ignore lines
1717 that match with regular expression of this variable. Default value of
1718 this variable is RCS header expressions and mode specifying line `-*- xxxx
1719 -*'.
1721 -- Variable: YaTeX-skip-default-reader
1722 Non-nil for this variable skips the default argument reader of
1723 section-type command when add-in function for it is not defined
1724 (`nil')
1726 -- Variable: YaTeX-create-file-prefix-g
1727 When typing `prefix g' on the `\include' line, open the target file
1728 even if the file doesn't exist (`nil')
1730 -- Variable: YaTeX-simple-messages
1731 Simplyfy messages of various completions (`nil')
1733 -- Variable: YaTeX-hilit-sectioning-face
1734 When hilit19 and yatex19 is active, YaTeX colors the sectioning
1735 commands. This variable specifies the foreground and background
1736 color of `\part' macro. The default value is `'(yellow/dodgerblue
1737 yellow/slateblue)'. The first element of this list is for the screen
1738 when `hilit-background-mode' is `'light', and the second element is
1739 for `'dark'. You should specify both color as `forecolor/backcolor'.
1741 -- Variable: YaTeX-hilit-sectioning-attenuation-rate
1742 When color mode, this variable specifies how much attenuate the color
1743 density of `\subparagraph' compared with that of `\chapter' (`'(15
1744 40)') See also `YaTeX-hilit-sectioning-face'.
1746 -- Variable: YaTeX-use-AMS-LaTeX
1747 If you use AMS-LaTeX, set to `t' (`nil')
1749 -- Variable: YaTeX-use-LaTeX2e
1750 If you use LaTeX2e, set to `t' (`t')
1752 -- Variable: YaTeX-template-file
1753 File name which is automatically inserted at creation
1754 (`~/work/template.tex')
1756 -- Variable: YaTeX-search-file-from-top-directory
1757 Non-nil means to search input-files from the directory where main
1758 file exists (`t')
1760 -- Variable: YaTeX-use-font-lock
1761 Use font-lock to fontify buffer or not (`(featurep 'font-lock)'
1763 -- Variable: YaTeX-use-hilit19
1764 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)'
1766 -- Variable: YaTeX-use-italic-bold
1767 YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20
1768 or later). This variable is effective only when font-lock is used.
1769 (`(featurep 'hilit19)'
1771 -- Variable: YaTeX-singlecmd-suffix
1772 Suffix which is always inserted after maketitle-type macros.
1773 `"{}"' is recommended.
1775 -- Variable: YaTeX-package-alist-private
1776 Alist of LaTeX2e-package name vs. lists of macros in it. Set this
1777 alist properly and YaTeX automatically check the declaratiion of
1778 `usepackage' for corresponding macro, when you input that macro with
1779 completion. If required `usepackage' is not found, YaTeX also
1780 automatically inserts `\usepackage'. Alist is as follows;
1781 '((PackageName1 (completionType ListOfMacro) (completionType
1782 ListOfMacro)) (PackageName2 (completionType ListOfMacro)
1783 (completionType ListOfMacro...))....) completionType is one of `env,
1784 section, maketitle'. Consult the value of
1785 `YaTeX-package-alist-default' as an example.
1787 -- Variable: YaTeX-tabular-indentation
1788 At indentation by `C-i' in tabular or array environment, YaTeX put
1789 the additional spaces to the normail indentation depth. The number
1790 of additional spaces is the product of YaTeX-tabular-indentation and
1791 the number of column position in tabular.
1793 -- Variable: YaTeX-noindent-env-regexp
1794 Regexp of environment names that should begin with no indentation.
1795 All verbatime-like environment name should match with.
1797 -- Variable: YaTeX-electric-indent-mode
1798 Emacs 24.4 introduces automatic indentation of current and new lines.
1799 This might be annoying for some people. Pass this value to the
1800 function 'electric-indent-local-mode. If you prefer to stop
1801 electric-indent-mode in yatex-mode, set `-1' to this variable.
1803 -- Variable: YaTeX-ref-default-label-string
1804 Default \\ref time string format. This format is like strftime(3)
1805 but allowed conversion char are as follows; %y -> Last 2 digit of
1806 year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H ->
1807 Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal
1808 conversion of yymmdd. %qX -> alphabetical-decimal conversion of
1809 HHMMSS. Beware defualt label-string should be always unique. So
1810 this format string should have both time part (%H+%M+%S or %qX) and
1811 date part (%y+(%b|%m)+%d or %qx).
1813 -- Variable: YaTeX-ref-generate-label-function
1814 Function to generate default label string for unnamed \\label{}s.
1815 The function pointed to this value should take two arguments. First
1816 argument is LaTeX macro's name, second is macro's argument. Here is
1817 an example for using this value.
1818 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label)
1819 (defun my-yatex-generate-label (command value)
1820 (and (string= command "caption")
1821 (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t)
1822 (setq command (match-string 1)))
1823 (let ((alist '(("chapter" . "chap")
1824 ("section" . "sec")
1825 ("subsection" . "subsec")
1826 ("figure" . "fig")
1827 ("table" . "tbl"))))
1828 (if (setq command (cdr (assoc command alist)))
1829 (concat command ":" value)
1830 (YaTeX::ref-generate-label nil nil))))
1835 File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables
1837 Sample definitions
1838 ------------------
1840 For instance, to change the prefix key stroke to `ESC', and name of the
1841 user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB
1842 character, add the following `setq' to `~/.emacs'.
1844 (setq YaTeX-prefix "\e"
1845 YaTeX-user-completion-table "~/src/emacs/yatexrc"
1846 YaTeX-fill-prefix " ")
1850 File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables
1852 Hook variables
1853 --------------
1855 More customizations will be done by the hook-function defined in
1856 hook-variable `yatex-mode-hook'. This is useful to define a shortcut key
1857 sequence to enter some environments other than `document' and `enumerate'
1858 etc. The following statement defines `[prefix] ba' to enter
1859 `\begin{abstract}' ... `=end{abstract}' immediately.
1861 (setq yatex-mode-hook
1862 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
1864 You should use functions `YaTeX-define-key', or
1865 `YaTeX-define-begend-key' to define all the key sequences of yatex-mode.
1869 File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables
1871 Hook file
1872 ---------
1874 You can stuff all of YaTeX related expressions into a file named
1875 `yatexhks.el' if you have a lot of codes. YaTeX automatically load this
1876 file at the initialization of itself. Using `yatexhks.el' makes
1877 `yatex-mode-load-hook' unnecessary.
1881 File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations
1883 Add-in functions
1884 ================
1886 You can easily define a function to input detailed arguments with
1887 completion according to LaTeX environments or commands.
1890 What is add-in functions?
1891 -------------------------
1893 When you input `tabular' environment, don't you think "I want YaTeX to
1894 complete its argument toward my favorite one such as `{|c|c|c|}'..."?
1895 Yes, you can define the function to complete arguments for any environment
1896 and any LaTeX commands.
1899 Procedure
1900 ---------
1902 Here is the procedure to define add-in functions.
1903 1. Define the function
1904 2. Put the function into `yatexhks.el'
1906 * Menu:
1908 * How the add-in function works::
1909 * How the function is called::
1910 * Useful functions for creating add-in::
1911 * Contribution::
1915 File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions
1917 How the add-in function works
1918 -----------------------------
1920 There are three types of add-in.
1922 1. Option add-in
1923 2. argument add-in
1924 3. enclosing add-in
1926 "Option add-in" returns the LaTeX's optional parameters such as optional
1927 strings after `\begin{ENV}', optional strings between a section-type
1928 command and its first argument, and optional strings just after type
1929 maketitle-type command. The following illustrates the name of add-in
1930 functions, where underlined strings are generated by add-in functions.
1932 \begin{table}[ht] (Function name: YaTeX:table)
1933 ~~~~
1934 \put(100,200){} (Function name: YaTeX:put)
1935 ~~~~~~~~~
1936 \sum_{i=0}^{n} (Function name: YaTeX:sum)
1937 ~~~~~~~~~~
1939 Obviously, the function name is decided by concatenating the prefix
1940 `YaTeX:' and LaTeX command's name.
1942 Another add-in type is "argument add-in", which completes arguments for
1943 section-type commands.
1945 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand)
1946 ~~~~ ~~~
1948 When the section-type command is inputted, the function named by
1949 concatenating `YaTeX::' and section-type command, is called automatically
1950 with an integer argument which indicates which argument of section-type
1951 command is being read. Thus the add-in should determine the job referring
1952 the value of its argument.
1954 "enclosing add-in" is for modifying and/or checking the region that will
1955 be enclosed by section-type commands via `[prefix] S'. An enclosing
1956 add-in function will be called with two arguments, beginning of the
1957 enclosed region and end of the region. Suppose you want to enclose the
1958 existing text `(a+b)/c' by `\frac{}'.
1960 a/c
1961 | |
1962 A B
1964 You do set-mark-command at point A and then move to point B. Typing
1965 `[prefix] S' and input `frac' enclose the region like this;
1967 \frac{a/c}
1969 Normally, the expression `a/c' is translated to
1970 `\frac{a}{c}'. An enclosing add-in is useful for modifying
1971 `/' to `}{'.
1973 * Menu:
1975 * Defining option-add-in::
1976 * Defining argument-add-in::
1977 * Defining enclosing-add-in::
1981 File: yatexe, Node: Defining option-add-in, Next: Defining argument-add-in, Prev: How the add-in function works, Up: How the add-in function works
1983 Defining `option add-in'
1984 ........................
1986 If you want `{|c|c|c|}' for all `tabular' environment,
1988 (defun YaTeX:tabular ()
1989 "{|c|c|c|}")
1991 is enough. If you want more complicated format, define as below.
1993 (defun YaTeX:tabular ()
1994 "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}")
1996 Note that the character `\' must be described as `\\' in Emacs-Lisp. The
1997 next example reads the tabular format from keyboard.
1998 (defun YaTeX:tabular ()
1999 (concat "{" (read-string "Rule: ") "}"))
2003 File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works
2005 Defining `argument add-in'
2006 ..........................
2008 This section describes how to define the add-in function for
2009 `\newcommand'.
2011 The first argument of `\newcommand' begins always with `\'. The second
2012 argument is usually so complex that we can not edit them in the
2013 minibuffer. Here is the created function considering this.
2015 (defun YaTeX::newcommand (n) ;n is argument position
2016 (cond
2017 ((= n 1) ;1st argument is macro name
2018 (read-string "Command: " "\\")) ;initial input `\'
2019 ((= n 2) "") ;do nothing when reading arg#2
2020 (t nil)))
2022 Note that when the `argument add-in' function return `nil', normal
2023 argument reader will be called.
2027 File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works
2029 Defining `enclosing add-in'
2030 ...........................
2032 This section describes how to define the add-in function for text
2033 enclosed by `\frac{}'.
2035 When enclosing the text `5/3' by `\frac{}', you might want to replace
2036 `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two
2037 arguments, beginning of enclosed text and end of enclosed text. The
2038 function is expected to replace `/' with `}{'. Here is an example
2039 expression.
2041 (defun YaTeX::frac-region (beg end)
2042 (catch 'done
2043 (while (search-forward "/" end t)
2044 (goto-char (match-beginning 0))
2045 (if (y-or-n-p "Replace this slash(/) with `}{'")
2046 (throw 'done (replace-match "}{")))
2047 (goto-char (match-end 0)))))
2051 File: yatexe, Node: How the function is called, Next: Useful functions for creating add-in, Prev: How the add-in function works, Up: Add-in functions
2053 How the function is called
2054 --------------------------
2056 YaTeX calls the add-in functions for specified begin-type, section-type,
2057 and maketitle-type command, if any. `Option add-in' functions for
2058 begin-type are called when `\begin{ENV}' has been inserted, functions for
2059 section-type are called just before input of the first argument, and
2060 functions for maketitle-type is called after maketitle-type command has
2061 been inserted. `Argument add-in' functions are called at each entry of
2062 arguments for section-type commands.
2066 File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions
2068 Useful functions for creating add-in
2069 ------------------------------------
2071 Many add-in functions for typical LaTeX commands are defined in
2072 `yatexadd.el'. Those are also useful as references. Here are the short
2073 descriptions on useful functions, where [F] means function, [A] means
2074 arguments, [D] means description.
2076 `[F]'
2077 YaTeX:read-position
2078 `[A]'
2079 Character list which can show up in the brackets
2080 `[D]'
2081 Return the location specifier such as `[htb]'. When
2082 nothing is entered, omit [] itself. If the possible characters
2083 are "htbp", call this function as
2084 `(YaTeX:read-position "htbp")'
2086 `[F]'
2087 YaTeX:read-coordinates
2088 `[A]'
2089 Base prompt, X-axis prompt, Y-axis prompt (each optional)
2090 `[D]'
2091 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for
2092 X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the form
2093 of "(X,Y)". The default prompts are `Dimension', `X',
2094 `Y' respectively.
2096 `[F]'
2097 YaTeX:check-completion-type
2098 `[A]'
2099 One of the symbols: 'begin, 'section, or 'maketitle
2100 `[D]'
2101 Check the current completion type is specified one and cause error
2102 if not. The variable `YaTeX-current-completion-type' holds the symbol
2103 according to the current completion type.
2107 File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions
2109 Contribution
2110 ------------
2112 If you make your own pretty function and you let it be in public, please
2113 send me the function. I'm going to include it in the next release.
2117 File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations
2119 Add-in generator
2120 ================
2122 First, don't forget to read the section of add-in functions *Note Add-in
2123 functions::. If you easily understand how to define them, there's no need
2124 to read this section. But being not familiar with Emacs-Lisp, when you
2125 don't have clear idea what to do, this section describes how to get YaTeX
2126 make add-in function.
2128 There are two methods of generation. One is for fully interactive
2129 generator for beginners and another requires little knowledge of
2130 Emacs-Lisp.
2133 Generator for beginners
2134 -----------------------
2135 The former generator is called by
2136 `M-x YaTeX-generate'
2138 strokes. All you have to do is follow the guidances. Defying them may
2139 cases the disaster (I wonder what is it???). So when you make some
2140 mistake, it is recommendable to type `C-g' and start afresh.
2143 Simple generator
2144 ----------------
2146 The latter generator is invoked by the next sequence. `M-x
2147 YaTeX-generate-simple' This generator can make both
2148 "option add-in" and "argument add-in" (*refer the
2149 section add-in functions* *Note How the add-in
2150 function works::), whereas `YaTeX-generate' cannot
2151 make "argument addin".
2153 For example, assume you have the LaTeX command as follows.
2155 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo}
2156 (A) (B) (1) (2) (3)
2157 (A)Optional parameter to specify the position
2158 One of t(top), b(bottom), l(left), r(right)
2159 (B)Maximum size of frame
2160 (1)1st argument is filename of EPS file
2161 (2)2nd argument indicates
2162 plain do nothing
2163 frame make frame around image
2164 dframe make double-frame around image
2165 for included EPS file.
2166 (3)Caption for the picture
2168 Now get start with generation. Typing `M-x YaTeX-generate-simple'
2169 brings the prompt:
2170 (O)ption? (A)rgument?
2173 Generating "option add-in"
2174 ..........................
2176 Since (A), (B) above are optional argument, all we have to do to
2177 complete them is define the option add-in for them. Let's generate the
2178 function to complete (A).
2180 M-x YaTeX-generate-simple RET
2181 epsinput RET
2184 Typing as above leads the next prompt.
2186 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit
2188 This asks that "Which type is the completion style of 1st argument?".
2189 Here are the possible completion style.
2191 `String'
2192 read plain string
2193 `Complete'
2194 read with completion
2195 `File'
2196 read file name
2197 `Option'
2198 read optional string (if string omitted, omit [] too)
2199 `Position'
2200 read positional option (like [htbp])
2201 `Coord.'
2202 read coordinates
2203 `Quit'
2204 quit from generating
2206 Since (A) is the optional argument to specify the location of included
2207 EPS file, the completion style is `Position', and the possible characters
2208 are t, b, l, and r. To tell these information to generator, operate as
2209 follows.
2211 Read type(1).... p
2212 Acceptable characters: tblr RET
2214 (B) is coordinate. So its completion style is coOrd. We want a prompt
2215 meaning "Maximum size" when completion.
2217 Read type(2).... o
2218 Prompt for coordinates: Max size RET
2220 That's all for optional argument. Select quit.
2222 Read type(3).... q
2224 Then the generated option add-in function for \epsinput will be shown in
2225 the next window.
2228 Generating "argument add-in"
2229 ............................
2231 Next, create the argument add-in. The arguments for \epsinput are EPS
2232 file name, framing style, and caption string in sequence.
2234 M-x YaTeX-generate-simple RET
2235 epsinput RET
2238 Above key strokes bring the prompt that asks the number of argument.
2239 Answer it with 3.
2241 How many arguments?: 3 RET
2243 Then the generator asks the completion style and prompt for completion.
2244 Answer them. `f' for FileName and prompt string.
2246 Read type(1).... f
2247 Prompt for argument#1 EPS file name RET
2249 The second argument is one of selected symbol. So the completion type
2250 is `Completion'.
2252 Read type(2).... c
2253 Prompt for argument#2 Include style RET
2255 Then all the candidates ready to be read. Type single RET after
2256 entering all.
2258 Item[1](RET to exit): plain RET
2259 Item[2](RET to exit): frame RET
2260 Item[3](RET to exit): dframe RET
2261 Item[4](RET to exit): RET
2263 The following prompt asks whether the entered string must belong to
2264 candidates or not. In this case, since the argument must be one of
2265 `plain', `frame', and `dframe', type `y'.
2267 Require match? (y or n) y
2269 The last argument is the caption string for which any completion is
2270 needed.
2272 Read type(3).... s
2273 Prompt for argument#3 Caption RET
2274 default: Figure of RET
2276 Finally we'll get the argument add-in in the next window.
2279 Contribution
2280 ------------
2282 If you get your own pretty function and you let it be in public, please
2283 steel yourself in the happy atmosphere and do not send me the function. I
2284 do know it is not fine because it is generated by yatexgen:-p.
2288 File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top
2290 Etcetera
2291 ********
2293 The standard completion tables provided in `yatex.el' contain a few
2294 LaTeX commands I frequently use. This is to lessen the key strokes to
2295 complete entire word, because too many candidates rarely used often cause
2296 too many hits. Therefore always try to use completion in order to enrich
2297 your dictionary, and you will also find `Wild Bird' growing suitable for
2298 your LaTeX style.
2300 The package name `Wild Bird' is the English translation of Japanese
2301 title `Yachou', which is a trick on words of Japanese.
2305 File: yatexe, Node: Copying, Prev: Etcetera, Up: Top
2307 Copying
2308 *******
2310 This program is distributed as a free software. You can
2311 use/copy/modify/redistribute this software freely but with NO warranty to
2312 anything as a result of using this software. Adopting code from this
2313 program is also free. But I would not do contract act.
2315 This software can be treated with: "The 2-Clause BSD License" (since
2316 2017-09-09, yatex 1.80).
2318 Any reports and suggestions are welcome as long as I feel interests in
2319 this software. My possible e-mail address is `yuuji@yatex.org'. (as of
2320 Sep.2017) And there is mailing list for YaTeX. Although the common
2321 language is Japanese, questions in English will be welcome. To join the
2322 ML, send the mail whose subject is `append' to the address
2323 `yatex@yatex.org. If you have some question, please ask to
2324 `yatex-admin@yatex.org'.
2326 The specification of this software will be surely modified (depending on
2327 my feelings) without notice :-p.
2330 HIROSE Yuuji
2332 Tag table:
2333 Node: Top256
2334 Node: What is YaTeX?1583
2335 Node: Main features1956
2336 Node: Installation3591
2337 Node: Typesetting4368
2338 Node: Calling typesetter5489
2339 Node: Calling previewer8016
2340 Node: Printing out8377
2341 Node: %#notation8669
2342 Node: Changing typesetter9069
2343 Node: Splitting input files9433
2344 Node: Static region for typesetting10862
2345 Node: Special Filtering Region11991
2346 Node: Lpr format12723
2347 Node: Controlling which command to invoke13796
2348 Node: Editing %# notation14753
2349 Node: Completion15297
2350 Node: Begin-type completion15833
2351 Node: Section-type completion18687
2352 Node: view-sectioning21103
2353 Node: Label Generation22682
2354 Node: Large-type completion23582
2355 Node: Maketitle-type completion24228
2356 Node: Arbitrary completion24780
2357 Node: End completion25170
2358 Node: Accent completion25640
2359 Node: Image completion26257
2360 Node: Greek letters completion28512
2361 Node: Inserting parentheses29268
2362 Node: Local dictionaries29675
2363 Node: Commenting out30612
2364 Node: Cursor jump32071
2365 Node: Jump to corresponding object32362
2366 Node: Invoking image processor33762
2367 Node: Jump to main file35105
2368 Node: Jumping around the environment35471
2369 Node: Jumping to last completion position35889
2370 Node: Changing and Deleting36398
2371 Node: Changing LaTeX commands36779
2372 Node: Killing LaTeX commands37956
2373 Node: Filling39141
2374 Node: Updation of includeonly40996
2375 Node: What column41793
2376 Node: Intelligent newline42878
2377 Node: Usepackage checker44539
2378 Node: Online help45130
2379 Node: Browsing file hierarchy46805
2380 Node: Cooperation with other packages48542
2381 Node: Customizations49247
2382 Node: Lisp variables49543
2383 Node: All customizable variables50502
2384 Node: Sample definitions62467
2385 Node: Hook variables62980
2386 Node: Hook file63684
2387 Node: Add-in functions64023
2388 Node: How the add-in function works64861
2389 Node: Defining option-add-in67047
2390 Node: Defining argument-add-in67769
2391 Node: Defining enclosing-add-in68650
2392 Node: How the function is called69506
2393 Node: Useful functions for creating add-in70182
2394 Node: Contribution71592
2395 Node: Add-in generator71866
2396 Node: Etcetera77442
2397 Node: Copying78047
2399 End tag table