20
|
1 \input texinfo.tex
|
|
2 @setfilename yatexe
|
|
3 @settitle Yet Another tex-mode for Emacs
|
|
4
|
|
5 @iftex
|
|
6 @syncodeindex fn cp
|
|
7 @syncodeindex vr cp
|
|
8 @end iftex
|
|
9
|
|
10 @titlepage
|
|
11 @sp 10
|
|
12 @center
|
|
13 @subtitle Yet Another tex-mode for emacs
|
|
14 @title Wild Bird
|
|
15 @subtitle // YaTeX //
|
|
16 @author @copyright{} 1991-1994 by HIROSE, Yuuji [yuuji@@ae.keio.ac.jp]
|
|
17 @end titlepage
|
|
18
|
|
19 @node Top, What is YaTeX?, (dir), (dir)
|
|
20 @comment node-name, next, previous, up
|
|
21 @cindex Demacs
|
|
22 @cindex Mule
|
|
23 @cindex LaTeX
|
|
24 @cindex YaTeX
|
|
25
|
|
26 @menu
|
|
27 * What is YaTeX?::
|
|
28 * Main features::
|
|
29 * Installation::
|
|
30 * Typesetting::
|
|
31 * %# notation::
|
|
32 * Completion::
|
|
33 * Commenting out::
|
|
34 * Cursor jump::
|
|
35 * Changing and Deleting::
|
|
36 * Filling an item::
|
|
37 * Local dictionaries::
|
|
38 * Updation of @code{\includeonly}::
|
|
39 * What column?::
|
28
|
40 * Intelligent newline::
|
20
|
41 * Online help::
|
|
42 * Cooperation with other packages::
|
|
43 * Customizations::
|
|
44 * Etcetera::
|
|
45 * Copying::
|
|
46
|
|
47 --- The Detailed Node Listing ---
|
|
48
|
|
49 %# notation
|
|
50
|
|
51 * Changing typesetter::
|
|
52 * Static region for typesetting::
|
|
53 * Lpr format::
|
|
54 * Editing %# notation::
|
|
55
|
|
56 Completion
|
|
57
|
|
58 * Begin-type completion::
|
|
59 * Section-type completion::
|
|
60 * Large-type completion::
|
|
61 * Maketitle-type completion::
|
|
62 * Arbitrary completion::
|
|
63 * End completion::
|
|
64 * Accent completion::
|
|
65 * Image completion::
|
|
66 * Greek letters completion::
|
|
67
|
|
68 Section-type completion
|
|
69
|
|
70 * view-sectioning::
|
|
71
|
|
72 Customizations
|
|
73
|
|
74 * Lisp variables::
|
|
75 * Add-in functions::
|
|
76
|
|
77 Lisp variables
|
|
78
|
|
79 * All customizable variables::
|
|
80 * Sample definitions::
|
|
81 * Hook variables::
|
|
82 * Hook file::
|
|
83 @end menu
|
|
84
|
|
85 @node What is YaTeX?, Main features, Top, Top
|
|
86 @comment node-name, next, previous, up
|
|
87 @chapter What is YaTeX?
|
|
88
|
|
89 YaTeX automates typesetting and previewing of LaTeX and enables
|
|
90 completing input of LaTeX mark-up command such as
|
|
91 @code{\begin@{@}}..@code{\end@{@}}.
|
|
92
|
|
93 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi
|
|
94 Language Enhancement to GNU Emacs), and latex on DOS.
|
|
95
|
|
96 @node Main features, Installation, What is YaTeX?, Top
|
|
97 @comment node-name, next, previous, up
|
|
98 @chapter Main features
|
|
99
|
|
100 @itemize
|
|
101 @item Invocation of typesetter, previewer and related programs(C-c t)
|
|
102 @item Typesetting on static region which is independent from point
|
|
103 @item Semiautomatic replacing of @code{\include only}
|
|
104 @item Jumping to error line(@kbd{C-c '})
|
|
105 @item Completing-read of La@TeX{} commands such as @code{\begin@{@}},
|
|
106 @code{\section} etc.
|
|
107 (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m})
|
|
108 @item Enclosing text into La@TeX{} environments or commands
|
|
109 (@kbd{C-u} @var{AboveKeyStrokes})
|
|
110 @item Learning unknown/new La@TeX{} commands for the next completion
|
|
111 @item Argument reading with a guide for complicated La@TeX{} commands
|
|
112 @item Generating argument-readers for new/unsupported commands(@file{yatexgen})
|
|
113 @item Quick changing or deleting of La@TeX{} commands(@kbd{C-c c}, @kbd{C-c k})
|
|
114 @item Jumping from and to inter-file, begin<->end, ref<->label(@kbd{C-c g})
|
|
115 @item Blanket commenting out or uncommenting
|
|
116 (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .})
|
|
117 @item Easy input of accent mark, math-mode's commands and Greek letters
|
|
118 (@kbd{C-c a}, @kbd{;}, @kbd{/})
|
|
119 @item Online help for the popular La@TeX{} commands
|
|
120 (@kbd{C-c ?}, @kbd{C-c /})(English help is not yet supported)
|
|
121 @end itemize
|
|
122
|
|
123 @node Installation, Typesetting, Main features, Top
|
|
124 @comment node-name, next, previous, up
|
|
125 @chapter Installation
|
|
126 @cindex installation
|
|
127 @cindex .emacs
|
|
128 @cindex auto-mode-alist
|
|
129 @cindex autoload
|
|
130
|
|
131 Put next two expressions into your @file{~/.emacs}.
|
|
132
|
|
133 @lisp
|
|
134 (setq auto-mode-alist
|
|
135 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
|
|
136 (autoload 'yatex-mode "yatex" "Yet Another La@TeX{} mode" t)
|
|
137 @end lisp
|
|
138
|
|
139 Next, add certain path name where you put files of YaTeX to your
|
|
140 load-path. If you want to put them in @file{~/src/emacs}, write
|
|
141
|
|
142 @lisp
|
|
143 (setq load-path
|
|
144 (cons (expand-file-name "~/src/emacs") load-path))
|
|
145 @end lisp
|
|
146
|
|
147 @noindent
|
|
148 in your @file{~/.emacs}
|
|
149
|
|
150 Then, yatex-mode will be automatically loaded when you visit a
|
|
151 file which has extension @file{.tex}. If yatex-mode is successfully
|
|
152 loaded, mode string on mode line will be turned to "YaTeX".
|
|
153
|
|
154
|
|
155 @node Typesetting, %# notation, Installation, Top
|
|
156 @comment node-name, next, previous, up
|
|
157 @chapter Typesetting
|
|
158 @cindex typesetting
|
|
159 @cindex previewer
|
|
160 @cindex typesetter
|
|
161 @cindex latex
|
|
162 @cindex printing out
|
|
163
|
|
164 The prefix key stroke of yatex-mode is @kbd{C-c} (Press 'C' with Control
|
|
165 key) by default. If you don't intend to change the prefix key stroke,
|
|
166 assume all @kbd{[prefix]} as @kbd{C-c} in this document. These key
|
|
167 strokes execute typeset or preview command.
|
|
168
|
|
169 @table @kbd
|
|
170 @item [prefix] tj
|
|
171 @dots{} invoke latex
|
|
172 @item [prefix] tr
|
|
173 @dots{} invoke latex on region
|
|
174 @item [prefix] tk
|
|
175 @dots{} kill current typesetting process
|
|
176 @item [prefix] tb
|
|
177 @dots{} invoke bibtex
|
|
178 @item [prefix] tp
|
|
179 @dots{} preview
|
|
180 @item [prefix] tl
|
|
181 @dots{} lpr dvi-file
|
|
182 @end table
|
|
183
|
|
184 The current editing window will be divided horizontally when you
|
|
185 invoke latex command, and log message of La@TeX{} typesetting will be
|
|
186 displayed in the other window; called typesetting buffer. The
|
|
187 typesetting buffer automatically scrolls up and traces La@TeX{}
|
|
188 warnings and error messages. If you see latex stopping by an
|
|
189 error, you can send string to latex in the typesetting buffer.
|
|
190
|
|
191 If an error stops the La@TeX{} typesetting, this key stroke will
|
|
192 move the cursor to the line where La@TeX{} error is detected.
|
|
193
|
|
194 @table @kbd
|
|
195 @item [prefix] '
|
|
196 @itemx ([prefix]+single quotation)
|
|
197
|
|
198 @dots{} jump to the previous error or warning
|
|
199 @end table
|
|
200
|
|
201 If you find a noticeable error, move to the typesetting buffer and move
|
|
202 the cursor on the line of error message and type @kbd{SPACE} key. This
|
|
203 makes the cursor move to corresponding source line.
|
|
204
|
|
205 Since @kbd{[prefix] tr} pastes the region into the file
|
|
206 @file{texput.tex} in the current directory, you should be careful of
|
|
207 overwriting. The method of specification of the region is shown in the
|
|
208 section @xref{%#NOTATION}.
|
|
209
|
|
210 The documentstyle for typeset-region is the same as that of editing
|
|
211 file if you edit one file, and is the same as main file's if you
|
|
212 edit splitting files.
|
|
213
|
|
214 YaTeX asks you the range of dvi-printing by default. You can
|
|
215 skip this by invoking it with universal-argument as follows:
|
|
216
|
|
217 @example
|
|
218 C-u [prefix] tl
|
|
219 @end example
|
|
220
|
|
221 @node %# notation, Completion, Typesetting, Top
|
|
222 @comment node-name, next, previous, up
|
|
223 @chapter %# notation
|
|
224 @cindex %# notation
|
|
225
|
|
226 You can control the typesetting process by describing @code{%#}
|
|
227 notations in the source text.
|
|
228
|
|
229 @menu
|
|
230 * Changing typesetter::
|
|
231 * Static region for typesetting::
|
|
232 * Lpr format::
|
|
233 * Editing %# notation::
|
|
234 @end menu
|
|
235
|
33
|
236 @node Changing typesetter, Static region for typesetting, %# notation, %# notation
|
20
|
237 @comment node-name, next, previous, up
|
|
238 @section To change the `latex' command or to split a source text.
|
|
239 @cindex typesetter
|
|
240
|
|
241 To change the typesetting command, write
|
|
242
|
|
243 @example
|
|
244 %#!latex-big
|
|
245 @end example
|
|
246
|
|
247 @noindent
|
|
248 anywhere in the source text. And if you split the source text and
|
|
249 edit subfile that should be included from main text.
|
|
250
|
|
251 @example
|
|
252 %#!latex main.tex
|
|
253 @end example
|
|
254
|
|
255 @noindent
|
|
256 will be helpful to execute latex on main file from sub text buffer. Since
|
|
257 this command line after @kbd{%#!} will be sent to shell literally, next
|
|
258 description makes it convenient to use ghostview as dvi-previewer.
|
|
259
|
|
260 @example
|
|
261 %#!latex main ; dvi2ps main.dvi > main
|
|
262 @end example
|
|
263
|
|
264 @noindent
|
|
265 Note that YaTeX assumes the component before the last period of
|
|
266 the last word in this line as base name of the main La@TeX{} source.
|
|
267
|
|
268 Here are the restrictions on splitting sources.
|
|
269
|
|
270 @itemize
|
|
271 @item All the file name should be different.
|
|
272 @item You can put split texts in sub directory, but not in
|
|
273 sub directory of sub directory.
|
|
274 @item In the main text,specify the file with relative path name
|
|
275 such as \include{chap1/sub}, when you include the file in
|
|
276 a sub-directory.
|
|
277 @item In a sub-text, write @code{%#!latex main.tex} even if @file{main.tex}
|
|
278 is in the parent directory(not %#!latex ../main.tex).
|
|
279 @end itemize
|
|
280
|
|
281 @node Static region for typesetting, Lpr format, Changing typesetter, %# notation
|
|
282 @comment node-name, next, previous, up
|
|
283 @section Static region
|
|
284 @cindex static region
|
|
285 @cindex Fixed region
|
|
286
|
|
287 Typeset-region by @kbd{[prefix] tr} passes the region between point and
|
|
288 mark to typesetting command by default. But when you want to typeset
|
|
289 static region, enclose the region by @code{%#BEGIN} and @code{%#END} as
|
|
290 follows.
|
|
291
|
|
292 @example
|
|
293 %#BEGIN
|
|
294 TheRegionYouWantToTypesetManyTimes
|
|
295 %#END
|
|
296 @end example
|
|
297
|
|
298 This is the rule of deciding the region.
|
|
299
|
|
300 @enumerate
|
|
301 @item
|
|
302 If there exists %#BEGIN before point,
|
|
303
|
|
304 @enumerate
|
|
305 @item
|
|
306 If there exists %#END after %#BEGIN,
|
|
307 @itemize
|
|
308 @item From %#BEGIN to %#END.
|
|
309 @end itemize
|
|
310
|
|
311 @item
|
|
312 If %#END does not exist after %#BEGIN,
|
|
313 @itemize
|
|
314 @item From %#BEGIN to the end of buffer.
|
|
315 @end itemize
|
|
316 @end enumerate
|
|
317
|
|
318 @item
|
|
319 If there does not exist %#BEGIN before point,
|
|
320 @itemize
|
|
321 @item Between point and mark(standard method of Emacs).
|
|
322 @end itemize
|
|
323 @end enumerate
|
|
324
|
|
325 It is useful to write @code{%#BEGIN} in the previous line of \begin and
|
|
326 @code{%#END} in the next line of \@code{end} when you try complex
|
|
327 environment such as `tabular' many times. It is also useful to put only
|
|
328 @code{%#BEGIN} alone at the middle of very long text. Do not forget to
|
|
329 erase @code{%#BEGIN} @code{%#END} pair.
|
|
330
|
|
331 @node Lpr format, Editing %# notation, Static region for typesetting, %# notation
|
|
332 @comment node-name, next, previous, up
|
|
333 @section Lpr format
|
|
334 @cindex lpr format
|
|
335
|
|
336 Lpr format is specified by three Lisp variables. Here are the
|
|
337 default values of them.
|
|
338
|
|
339 @table @code
|
|
340 @item (1)dviprint-command-format
|
|
341 @code{"dvi2ps %f %t %s | lpr"}
|
|
342 @item (2)dviprint-from-format
|
|
343 @code{"-f %b"}
|
|
344 @item (3)dviprint-to-format
|
|
345 @code{"-t %e"}
|
|
346 @end table
|
|
347
|
|
348 On YaTeX-lpr, @code{%s} in (1) is replaced by the file name of main
|
|
349 text, @code{%f} by contents of (2), %t by contents of (3). At these
|
|
350 replacements, @code{%b} in (2) is also replaced by the number of beginning
|
|
351 page, @code{%e} in (3) is replaced by the number of ending page. But
|
|
352 @code{%f} and @code{%t} are ignored when you omit the range of print-out
|
|
353 by @kbd{C-u [prefix] tl}.
|
|
354
|
|
355 If you want to change this lpr format temporarily, put a command
|
|
356 such as follows somewhere in the text:
|
|
357
|
|
358 @example
|
|
359 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2
|
|
360 @end example
|
|
361
|
|
362 And if you want YaTeX not to ask you the range of printing
|
|
363 out, the next example may be helpful.
|
|
364
|
|
365 @example
|
|
366 %#LPR dvi2ps %s | lpr
|
|
367 @end example
|
|
368
|
|
369 @node Editing %# notation, , Lpr format, %# notation
|
|
370 @comment node-name, next, previous, up
|
|
371 @section Editing %# notation
|
|
372
|
|
373 To edit @code{%#} notation described above, type
|
|
374
|
|
375 @table @kbd
|
|
376 @item [prefix] %
|
|
377 @dots{} editing %# notation menu
|
|
378 @end table
|
|
379
|
|
380 @noindent
|
|
381 and select one of the entry of the menu as follows.
|
|
382
|
|
383 @example
|
|
384 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR
|
|
385 @end example
|
|
386
|
|
387 @noindent
|
|
388 Type @kbd{!} to edit @code{%#!} entry, @code{b} to enclose the region with
|
|
389 @code{%#BEGIN} and @code{%#END}, and @code{l} to edit @code{%#LPR} entry.
|
|
390 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are
|
|
391 automatically erased.
|
|
392
|
|
393 @node Completion, Commenting out, %# notation, Top
|
|
394 @comment node-name, next, previous, up
|
|
395 @chapter Completion
|
|
396 @cindex completion
|
|
397
|
|
398 YaTeX makes it easy to input the La@TeX{} commands. There are several
|
|
399 kinds of completion type, begin-type, section-type, large-type, etc...
|
|
400
|
|
401 @menu
|
|
402 * Begin-type completion::
|
|
403 * Section-type completion::
|
|
404 * Large-type completion::
|
|
405 * Maketitle-type completion::
|
|
406 * Arbitrary completion::
|
|
407 * End completion::
|
|
408 * Accent completion::
|
|
409 * Image completion::
|
|
410 * Greek letters completion::
|
|
411 @end menu
|
|
412
|
33
|
413 @node Begin-type completion, Section-type completion, Completion, Completion
|
20
|
414 @comment node-name, next, previous, up
|
|
415 @section Begin-type completion
|
|
416 @cindex begin-type completion
|
|
417 @cindex environment
|
|
418 @cindex prefix b
|
|
419
|
|
420 "Begin-type completion" completes commands of @code{\begin@{env@}} ...
|
|
421 @code{\end@{env@}}. All of the begin-type completions begin with this key
|
|
422 sequence.
|
|
423
|
|
424 @table @kbd
|
|
425 @item [prefix] b
|
|
426 @dots{} start begin-type completion
|
|
427 @end table
|
|
428
|
|
429 @noindent
|
|
430 An additional key stroke immediately completes a frequently used
|
|
431 La@TeX{} @code{\begin@{@}}...@code{\@code{end}@{@}} environment.
|
|
432
|
|
433 @table @kbd
|
|
434 @item [prefix] b c
|
|
435 @dots{} @code{\begin@{center@}...\end@{center@}}
|
|
436 @item [prefix] b d
|
|
437 @dots{} @code{\begin@{document@}...\end@{document@}}
|
|
438 @item [prefix] b D
|
|
439 @dots{} @code{\begin@{description@}...\end@{description@}}
|
|
440 @item [prefix] b e
|
|
441 @dots{} @code{\begin@{enumerate@}...\end@{enumerate@}}
|
|
442 @item [prefix] b E
|
|
443 @dots{} @code{\begin@{equation@}...\end@{equation@}}
|
|
444 @item [prefix] b i
|
|
445 @dots{} @code{\begin@{itemize@}...\end@{itemize@}}
|
|
446 @item [prefix] b l
|
|
447 @dots{} @code{\begin@{flushleft@}...\end@{flushleft@}}
|
|
448 @item [prefix] b m
|
|
449 @dots{} @code{\begin@{minipage@}...\end@{minipage@}}
|
|
450 @item [prefix] b t
|
|
451 @dots{} @code{\begin@{tabbing@}...\end@{tabbing@}}
|
|
452 @item [prefix] b T
|
|
453 @dots{} @code{\begin@{tabular@}...\end@{tabular@}}
|
|
454 @item [prefix] b^T
|
|
455 @dots{} @code{\begin@{table@}...\end@{table@}}
|
|
456 @item [prefix] b p
|
|
457 @dots{} @code{\begin@{picture@}...\end@{picture@}}
|
|
458 @item [prefix] b q
|
|
459 @dots{} @code{\begin@{quote@}...\end@{quote@}}
|
|
460 @item [prefix] b Q
|
|
461 @dots{} @code{\begin@{quotation@}...\end@{quotation@}}
|
|
462 @item [prefix] b r
|
|
463 @dots{} @code{\begin@{flushright@}...\end@{flushright@}}
|
|
464 @item [prefix] b v
|
|
465 @dots{} @code{\begin@{verbatim@}...\end@{verbatim@}}
|
|
466 @item [prefix] b V
|
|
467 @dots{} @code{\begin@{verse@}...\end@{verse@}}
|
|
468 @end table
|
|
469
|
|
470 Any other La@TeX{} environments are made by completing-read of the
|
|
471 Emacs function.
|
|
472
|
|
473 @table @kbd
|
|
474 @item [prefix] b SPACE
|
|
475 @dots{} begin-type completion
|
|
476 @end table
|
|
477
|
|
478 @noindent
|
|
479 The next message will show up in the minibuffer
|
|
480
|
|
481 @example
|
|
482 Begin environment(default document):
|
|
483 @end example
|
|
484
|
|
485 @noindent
|
|
486 by typing @kbd{[prefix] b}. Put the wishing environment with completion
|
|
487 in the minibuffer, and @code{\begin@{env@}}...\@code{\end@{env@}} will be
|
|
488 inserted in the La@TeX{} source text. If the environment you want to put
|
|
489 does not exist in the YaTeX completion table, it will be registered in the
|
|
490 user completion table. YaTeX automatically saves the user completion
|
|
491 table in the user dictionary file at exiting of emacs.
|
|
492
|
|
493 If you want to enclose some paragraphs which have already been
|
|
494 written, invoke the begin-type completion with changing the case
|
|
495 of @kbd{b} of key sequence upper(or invoke it with universal argument
|
|
496 by @kbd{C-u} prefix).
|
|
497 @cindex enclose region into environment
|
|
498
|
|
499 The following example encloses a region with `description'
|
|
500 environment.
|
|
501
|
|
502 @table @kbd
|
|
503 @item [prefix] B D
|
|
504 @itemx (or ESC 1 [prefix] b D)
|
|
505 @itemx (or C-u [prefix] b D)
|
|
506
|
|
507 @dots{} begin-type completion for region
|
|
508 @end table
|
|
509
|
|
510 This enclosing holds good for the completing input by @kbd{[prefix] b
|
|
511 SPC}. @kbd{[prefix] B SPC} enclose a region with the environment selected
|
|
512 by completing-read.
|
|
513
|
|
514 @node Section-type completion, Large-type completion, Begin-type completion, Completion
|
|
515 @comment node-name, next, previous, up
|
|
516 @section Section-type completion
|
|
517 @cindex section-type completion
|
|
518 @cindex prefix s
|
|
519
|
|
520 "Section-type completion" completes section-type commands which take an
|
|
521 argument or more such as @code{\section@{foo@}}. To invoke section-type
|
|
522 completion, type
|
|
523
|
|
524 @table @kbd
|
|
525 @item [prefix] s
|
|
526 @dots{} section-type completion
|
|
527 @end table
|
|
528
|
|
529 @noindent
|
|
530 then the prompt
|
|
531
|
|
532 @example
|
|
533 (C-v for view) \???@{@} (default documentstyle):
|
|
534 @end example
|
|
535
|
|
536 @noindent
|
|
537 will show up in the minibuffer. Section-type La@TeX{} commands are
|
|
538 completed by space key, and the default value is selected when you
|
|
539 type nothing in the minibuffer.
|
|
540
|
|
541 Next,
|
|
542
|
|
543 @example
|
|
544 \section@{???@}:
|
|
545 @end example
|
|
546
|
|
547 @noindent
|
|
548 prompts you the argument of section-type La@TeX{} command. For
|
|
549 example, the following inputs
|
|
550
|
|
551 @example
|
|
552 \???@{@} (default documentstyle): section
|
|
553 \section{???}: Hello world.
|
|
554 @end example
|
|
555
|
|
556 @noindent
|
|
557 will insert the string
|
|
558
|
|
559 @example
|
|
560 \section@{Hello world.@}
|
|
561 @end example
|
|
562
|
|
563 in your La@TeX{} source. When you neglect argument such as
|
|
564
|
|
565 @example
|
|
566 (C-v for view) \???@{@} (default section): vspace*
|
|
567 \vspace*@{???@}:
|
|
568 @end example
|
|
569
|
|
570 YaTeX puts
|
|
571
|
|
572 @example
|
|
573 \vspace*@{@}
|
|
574 @end example
|
|
575
|
|
576 @noindent
|
|
577 and move the cursor in the braces.
|
|
578
|
|
579 In La@TeX{} command, there are commands which take more than one
|
|
580 arguments such as @code{\addtolength{\topmargin}{8mm}}. To complete these
|
|
581 commands, invoke section-type completion with universal argument as,
|
|
582 @cindex number of argument
|
|
583
|
|
584 @example
|
|
585 C-u 2 [prefix] s (or ESC 2 [prefix] s)
|
|
586 @end example
|
|
587
|
|
588 @noindent
|
|
589 and make answers in minibuffer like this.
|
|
590
|
|
591 @example
|
|
592 (C-v for view) \???@{@} (default vspace*): addtolength
|
|
593 \addtolength@{???@}: \topmargin
|
|
594 Argument 2: 8mm
|
|
595 @end example
|
|
596
|
|
597 @code{\addtolength} and the first argument @code{\topmargin} can be typed
|
|
598 easily by completing read. Since YaTeX also learns the number of
|
|
599 arguments of section-type command and will ask that many arguments in
|
|
600 future completion, you had better tell the number of arguments to YaTeX at
|
|
601 the first completion of the new word. But you can change the number of
|
|
602 arguments by calling the completion with different universal argument
|
|
603 again.
|
|
604
|
|
605 The special number of argument 0 makes YaTeX use read-string to
|
|
606 read the first argument instead of completing-read. It is more
|
|
607 comfortable to enter first argument without completion when you
|
|
608 put section title which contains space character. Normally, such
|
|
609 sectioning commands as chapter, section, paragraph..., have
|
|
610 argument 0 in the completion table.
|
|
611
|
|
612 Invoking section-type completion with @code{[Prefix] S} (Capital `S')
|
|
613 includes the region as the first argument of section-type command.
|
|
614
|
|
615 The section/large/maketitle type completion can work at the
|
|
616 prompt for the argument of other section-type completion.
|
|
617 Nested La@TeX{} commands are efficiently read with the recursive
|
|
618 completion by typing YaTeX's completion key sequence in the
|
|
619 minibuffer.
|
|
620
|
|
621 @menu
|
|
622 * view-sectioning::
|
|
623 @end menu
|
|
624
|
33
|
625 @node view-sectioning, , Section-type completion, Section-type completion
|
20
|
626 @comment node-name, next, previous, up
|
|
627 @subsection view-sectioning
|
|
628 @cindex view sectioning
|
|
629 @cindex outline
|
|
630
|
|
631 In the minibuffer at the prompt of section-type command completion,
|
|
632 typing @kbd{C-v} shows a list of sectioning commands in source text(The
|
|
633 line with @code{<<--} mark is the nearest sectioning command). Then,
|
|
634 default sectioning command appears in the minibuffer. You can go up/down
|
|
635 sectioning command by typing @kbd{C-p}/@kbd{C-n}, can scrolls up/down the
|
|
636 listing buffer by @kbd{C-v}/@kbd{M-v}, and can hide sectioning commands
|
|
637 under certain level by 0 through 6. Type @kbd{?} in the minibuffer of
|
|
638 sectioning prompt for more information.
|
|
639
|
|
640 @node Large-type completion, Maketitle-type completion, Section-type completion, Completion
|
|
641 @comment node-name, next, previous, up
|
|
642 @section Large-type completion
|
|
643
|
|
644 "Large-type completion" inputs the font or size changing
|
|
645 descriptions such as @code{@{\large @}}. When you type
|
|
646
|
|
647 @table @kbd
|
|
648 @item [prefix] l
|
|
649 @dots{} large-type completion
|
|
650 @end table
|
|
651
|
|
652 @noindent
|
|
653 the message in the minibuffer
|
|
654
|
|
655 @example
|
|
656 @{\??? @} (default large):
|
|
657 @end example
|
|
658
|
|
659 prompts prompts you large-type command with completing-read. There are
|
|
660 TeX commands to change fonts or sizes, @code{it}, @code{huge} and so on,
|
|
661 in the completion table.
|
|
662
|
|
663 Region-based completion is also invoked by changing the letter after
|
|
664 prefix key stroke as @kbd{[prefix] L}. It encloses the region by braces
|
|
665 with large-type command.
|
|
666
|
|
667 @node Maketitle-type completion, Arbitrary completion, Large-type completion, Completion
|
|
668 @comment node-name, next, previous, up
|
|
669 @section Maketitle-type completion
|
|
670 @cindex maketitle-type completion
|
|
671
|
|
672 We call it "maketitle-type completion" which completes commands such as
|
|
673 @code{\maketitle}. Take notice that maketitle-type commands take no
|
|
674 arguments. Then, typing
|
|
675
|
|
676 @table @kbd
|
|
677 @item [prefix] m
|
|
678 @dots{} maketitle-type completion
|
|
679 @end table
|
|
680
|
|
681 @noindent
|
|
682 begins maketitle-completion. Above mentioned method is true for
|
|
683 maketitle-completion, and there are La@TeX{} commands with no
|
|
684 arguments in completion table.
|
|
685
|
|
686 @node Arbitrary completion, End completion, Maketitle-type completion, Completion
|
|
687 @comment node-name, next, previous, up
|
|
688 @section Arbitrary completion
|
|
689 @cindex arbitrary completion
|
|
690
|
|
691 @noindent
|
|
692 You can complete certain La@TeX{} command anywhere without typical
|
|
693 completing method as described, by typing
|
|
694
|
|
695 @table @kbd
|
|
696 @item [prefix] SPC
|
|
697 @dots{} arbitrary completion
|
|
698 @end table
|
|
699
|
|
700 @noindent
|
|
701 after the initial string of La@TeX{} command that is preceded by @code{\}.
|
|
702
|
|
703 @node End completion, Accent completion, Arbitrary completion, Completion
|
|
704 @comment node-name, next, previous, up
|
|
705 @section End completion
|
|
706 @cindex end completion
|
|
707
|
|
708 @noindent
|
|
709 YaTeX automatically detects the opened environment and close it with
|
|
710 \@code{\end@{environment@}}. Though proficient YaTeX users never fail to
|
|
711 make environment with begin-type completion, some may begin an environment
|
|
712 manually. In that case, type
|
|
713
|
|
714 @table @kbd
|
|
715 @item [prefix] e
|
|
716 @dots{} @code{end} completion
|
|
717 @end table
|
|
718
|
|
719 @noindent
|
|
720 at the end of the opened environment.
|
|
721
|
|
722 @node Accent completion, Image completion, End completion, Completion
|
|
723 @comment node-name, next, previous, up
|
|
724 @section Accent completion
|
|
725 @cindex accent completion
|
|
726
|
|
727 When you want to write the European accent marks(like @code{\`@{o@}}),
|
|
728
|
|
729 @table @kbd
|
|
730 @item [prefix] a
|
|
731 @dots{} accent completion
|
|
732 @end table
|
|
733
|
|
734 @noindent
|
|
735 shows the menu
|
|
736
|
|
737 @example
|
|
738 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b
|
|
739 @end example
|
|
740
|
|
741 @noindent
|
|
742 in the minibuffer. Chose one character or corresponding numeric,
|
|
743 and you will see
|
|
744
|
|
745 @example
|
|
746 \`{}
|
|
747 @end example
|
|
748
|
|
749 @noindent
|
|
750 in the editing buffer with the cursor positioned in braces. Type
|
|
751 one more character `o' for example, then
|
|
752
|
|
753 @example
|
|
754 \`{o}
|
|
755 @end example
|
|
756
|
|
757 @noindent
|
|
758 will be completed, and the cursor gets out from braces.
|
|
759
|
|
760 @node Image completion, Greek letters completion, Accent completion, Completion
|
|
761 @comment node-name, next, previous, up
|
|
762 @section Image completion of mathematical sign
|
|
763 @cindex image completion
|
|
764 @cindex math-mode
|
|
765 @cindex sigma
|
|
766 @cindex leftarrow
|
|
767 @cindex ;
|
|
768
|
|
769 Arrow marks, sigma mark and those signs mainly used in the
|
|
770 TeX's math environment are completed by key sequences which
|
|
771 imitate the corresponding symbols graphically. This completion
|
|
772 only works in the math environment. YaTeX automatically detects
|
|
773 whether the cursor located in math environment or not, and
|
|
774 change the behavior of key strokes @kbd{;} and @kbd{/}.
|
|
775
|
|
776 By the way, we often express the leftarrow mark by `<-' for example.
|
|
777 Considering such image, you can write @code{\leftarrow} by typing @kbd{<-}
|
|
778 after @kbd{;} (semicolon) as a prefix. In the same way,
|
|
779 @code{\longleftarrow} (@code{<--}) is completed by typing @kbd{;<--},
|
|
780 infinity mark which is imitated by @code{oo} is completed by typing
|
|
781 @kbd{;oo}.
|
|
782
|
|
783 Here are the sample operations in YaTeX math-mode.
|
|
784
|
|
785 @example
|
|
786 INPUT Completed La@TeX{} commands
|
|
787 ; < - @code{\leftarrow}
|
|
788 ; < - - @code{\longleftarrow}
|
|
789 ; < - - > @code{\longleftrightarrow}
|
|
790 ; o @code{\circ}
|
|
791 ; o o @code{\infty}
|
|
792 @end example
|
|
793
|
|
794 In any case, you can quit from image completion and can move
|
|
795 to the next editing operation if the La@TeX{} command you want is
|
|
796 shown in the buffer.
|
|
797
|
|
798 @code{;} itself in math-environment is inserted by @kbd{;;}. Typing
|
|
799 @kbd{TAB} in the midst of image completion shows all of the La@TeX{}
|
|
800 commands that start with the same name as string you previously typed in.
|
|
801 In this menu buffer, press @kbd{RET} after moving the cursor (by @kbd{n},
|
|
802 @kbd{p}, @kbd{b}, @kbd{f}) to insert the La@TeX{} command.
|
|
803
|
|
804 To know all of the completion table, type @kbd{TAB} just after @kbd{;}.
|
|
805 And here is the sample menu by @kbd{TAB} after @kbd{;<}.
|
|
806
|
|
807 @example
|
|
808 KEY LaTeX sequence sign
|
|
809 < \leq <
|
|
810 ~
|
|
811 << \ll <<
|
|
812 <- \leftarrow <-
|
|
813 <= \Leftarrow <=
|
|
814 @end example
|
|
815
|
|
816 You can define your favorite key-vs-sequence completion table in the
|
|
817 Emacs-Lisp variable @code{YaTeX-math-sign-alist-private}. See also
|
|
818 @file{yatexmth.el} for the information of the structure of this variable.
|
|
819
|
|
820 @node Greek letters completion, , Image completion, Completion
|
|
821 @comment node-name, next, previous, up
|
|
822 @section Greek letters completion
|
|
823 @cindex Greek letters completion
|
|
824 @cindex /
|
|
825
|
|
826 Math-mode of YaTeX provides another image completion, Greek letters
|
|
827 completion in the same method. After prefix @kbd{/}, typing @kbd{a} makes
|
|
828 @code{\alpha}, @kbd{b} makes @code{\beta} and @kbd{g} makes @code{\gamma}
|
|
829 and so on. First, type @kbd{/TAB} to know all the correspondence of
|
|
830 alphabets v.s. Greek letters.
|
|
831
|
|
832 If you will find @kbd{;} or @kbd{/} doesn't work in correct position of
|
|
833 math environment, it may be a bug of YaTeX. Please send me a bug report
|
|
834 with the configuration of your text, and avoid it temporarily by typing
|
|
835 @kbd{;} or @kbd{/} after universal-argument(@kbd{C-u}) which forces
|
|
836 @kbd{;} and @kbd{/} to work as math-prefix.
|
|
837
|
|
838 @node Commenting out, Cursor jump, Completion, Top
|
|
839 @comment node-name, next, previous, up
|
|
840 @chapter Commenting out
|
|
841 @cindex commenting out
|
|
842 @cindex prefix >
|
|
843 @cindex prefix <
|
|
844 @cindex prefix ,
|
|
845 @cindex prefix .
|
|
846
|
|
847 You may want to comment out some region.
|
|
848
|
|
849 @table @kbd
|
|
850 @item [prefix] >
|
|
851 @dots{} comment out region by %
|
|
852 @item [prefix] <
|
|
853 @dots{} uncomment region
|
|
854 @end table
|
|
855
|
|
856 @noindent
|
|
857 cause an operation to the region between point and mark.
|
|
858
|
|
859 @table @kbd
|
|
860 @item [prefix] .
|
|
861 @dots{} comment out current paragraph
|
|
862 @item [prefix] ,
|
|
863 @dots{} uncomment current paragraph
|
|
864 @end table
|
|
865
|
|
866 @noindent
|
|
867 comments or uncomments the paragraph where the cursor belongs.
|
|
868 This `paragraph' means the region marked by the function
|
|
869 mark-paragraph, bound to @kbd{ESC h} by default. It is NOT
|
|
870 predictable what will happen when you continuously comment out
|
|
871 some paragraph many times.
|
|
872
|
|
873 You can also comment out an environment between @code{\begin} and
|
|
874 @code{\end}, or a @code{\begin}-\@code{\end} pair themselves, by making the
|
|
875 following key strokes on the line where @code{\begin@{@}} or
|
|
876 @code{\end@{@}} exists.
|
|
877
|
|
878 @table @kbd
|
|
879 @item [prefix] >
|
|
880 @dots{} comment out from \begin to \@code{end}
|
|
881 @item [prefix] <
|
|
882 @dots{} uncomment from \begin to \@code{end}
|
|
883 @end table
|
|
884
|
|
885 @noindent
|
|
886 comment whole the contents of environment. Moreover,
|
|
887
|
|
888 @table @kbd
|
|
889 @item [prefix] .
|
|
890 @dots{} comment out \begin and \@code{end}
|
|
891 @item [prefix] ,
|
|
892 @dots{} uncomment \begin and \@code{end}
|
|
893 @end table
|
|
894
|
|
895 @noindent
|
|
896 (un)comments out only environment declaration: @code{\begin@{@}} and
|
|
897 @code{\end@{@}}. NOTE that even if you intend to comment out some region,
|
|
898 invoking @kbd{[prefix] >} on the @code{\begin},@code{\end} line decides to
|
|
899 work in `commenting out from @code{\begin} to @code{\end}' mode.
|
|
900
|
|
901
|
|
902 @node Cursor jump, Changing and Deleting, Commenting out, Top
|
|
903 @comment node-name, next, previous, up
|
|
904 @chapter Cursor jump
|
|
905 @cindex cursor jump
|
|
906 @cindex prefix g
|
|
907
|
|
908 On a @code{\begin},@code{\end} line, the key stroke
|
|
909
|
|
910 @table @kbd
|
|
911 @item [prefix] g
|
|
912 @dots{} go to corresponding object
|
|
913 @end table
|
|
914
|
|
915 @noindent
|
|
916 moves the cursor to the corresponding @code{\end},@code{\begin} line, if
|
|
917 its partner really exists. It is also applicable to A @code{%#BEGIN} and
|
|
918 @code{%#END} pair.
|
|
919
|
|
920 If you type @code{[prefix] g} on the line of @code{\include@{chap1@}},
|
|
921 maybe in main text, YaTeX switches buffer to @file{chap1.tex}. On the
|
|
922 contrary, the key strokes
|
|
923
|
|
924 @table @kbd
|
|
925 @item [prefix] ^
|
|
926 @dots{} visit main file
|
|
927 @item [prefix] 4^
|
|
928 @dots{} visit main file in other buffer
|
|
929 @end table
|
|
930 @cindex prefix ^
|
|
931 @cindex prefix 4 ^
|
|
932
|
|
933 in a sub text switch the buffer to the main text specified by
|
|
934 @code{%#!} notation.
|
|
935
|
|
936 And these are the functions which work on the current La@TeX{}
|
|
937 environment:
|
|
938
|
|
939 @table @kbd
|
|
940 @item M-C-a
|
|
941 @dots{} beginning of environment
|
|
942 @item M-C-e
|
|
943 @dots{} @code{end} of environment
|
|
944 @item M-C-@@
|
|
945 @dots{} mark environment
|
|
946 @end table
|
|
947 @cindex M-C-a
|
|
948 @cindex M-C-e
|
|
949 @cindex M-C-@@
|
|
950
|
|
951 @node Changing and Deleting, Filling an item, Cursor jump, Top
|
|
952 @comment node-name, next, previous, up
|
|
953 @chapter Changing and Deleting
|
|
954
|
|
955 These functions are for change or deletion of La@TeX{} commands
|
|
956 already entered.
|
|
957
|
|
958 @table @kbd
|
|
959 @item [prefix] c
|
|
960 @dots{} change La@TeX{} command
|
|
961 @item [prefix] k
|
|
962 @dots{} kill La@TeX{} command
|
|
963 @end table
|
|
964 @cindex prefix c
|
|
965 @cindex prefix k
|
|
966
|
|
967 @kbd{[prefix] c} can change the name of the corresponding environment
|
|
968 declaration. @kbd{[prefix] k} works as follows:
|
|
969
|
|
970 @example
|
|
971 [Invoking position] [action]
|
|
972 \begin,\end line kill \begin,\end pairs
|
|
973 %BEGIN, %END line kill %BEGIN,%END pairs
|
|
974 on a Section-type command kill section-type command
|
|
975 on a parenthesis kill parentheses
|
|
976 @end example
|
|
977
|
|
978 While all operations above are to kill `containers' which surround some
|
|
979 text, universal argument (@kbd{C-u}) for these commands kills not only
|
|
980 `containers' but also `contents' of them. See below as a sample.
|
|
981
|
|
982 @example
|
|
983 Original text: [prefix] k C-u [prefix] k
|
|
984 Main \footnote@{note@} here. Main note here. Main here.
|
|
985 ~(cursor)
|
|
986 @end example
|
|
987
|
|
988 @node Filling an item, Local dictionaries, Changing and Deleting, Top
|
|
989 @comment node-name, next, previous, up
|
|
990 @chapter Filling an item
|
|
991 @cindex filling an item
|
|
992 @cindex prefix i
|
|
993
|
|
994 To fill a term (sentence) of @code{\item}, type
|
|
995
|
|
996 @table @kbd
|
|
997 @item [prefix] i
|
|
998 @dots{} fill item
|
|
999 @end table
|
|
1000
|
|
1001 @noindent
|
|
1002 on that item.
|
|
1003
|
|
1004 YaTeX uses the value of the variable @code{YaTeX-item-regexp} as the
|
|
1005 regular expression to search item header in itemize environment.
|
|
1006 If you make a newcommand to itemize terms(eg. @code{\underlineitem}), put
|
|
1007
|
|
1008 @lisp
|
|
1009 (setq YaTeX-item-regexp
|
|
1010 "\\(\\\\item\\)\\|\\(\\\\underlineitem\\)")
|
|
1011 @end lisp
|
|
1012 @cindex YaTeX-item-regexp
|
|
1013
|
|
1014 in your @file{~/.emacs}. If you are not familiar with regular expression
|
|
1015 for Emacs-Lisp, name a newcommand for `itemize' beginning with
|
|
1016 @code{\item} such as @code{\itembf}, not @code{\bfitem}.
|
|
1017
|
|
1018 @node Local dictionaries, Updation of @code{\includeonly}, Filling an item, Top
|
|
1019 @comment node-name, next, previous, up
|
33
|
1020 @chapter Local dictionaries
|
20
|
1021 @cindex local dictionaries
|
|
1022 @cindex nervous users
|
|
1023
|
33
|
1024 Tables for completion consist of three dictionaries; `standard
|
|
1025 dictionary' built in @file{yatex.el}, `user dictionary' for your common
|
|
1026 private commands, and `local dictionary' that is effective in a certain
|
|
1027 directory.
|
|
1028
|
|
1029 When you input the command unknown to YaTeX at a completion in the
|
|
1030 minibuffer, YaTeX asks you with the following prompt;
|
|
1031
|
|
1032 @example
|
|
1033 `foo' is not in table. Register into: U)serTable L)ocal N)one
|
|
1034 @end example
|
|
1035
|
|
1036 @noindent
|
|
1037 In this menu, typing `u' updates your `user dictionary', `l' updates your
|
|
1038 local dictionary, and `n' updates no dictionary and throws the word away.
|
|
1039
|
|
1040 If you find this switching feature meaningless and bothersome, put the
|
|
1041 next expression into your @file{~/.emacs}
|
20
|
1042
|
|
1043 @lisp
|
33
|
1044 (setq YaTeX-nervous nil)
|
20
|
1045 @end lisp
|
|
1046
|
|
1047 @node Updation of @code{\includeonly}, What column?, Local dictionaries, Top
|
|
1048 @comment node-name, next, previous, up
|
|
1049 @chapter Updation of @code{\includeonly}
|
|
1050 @cindex includeonly
|
|
1051
|
|
1052 When you edit splitting source texts, the notation
|
|
1053
|
|
1054 @example
|
|
1055 \includeonly@{CurrentEditingFileName@}
|
|
1056 @end example
|
|
1057
|
|
1058 @noindent
|
|
1059 in the main file reduces the time of typesetting. If you want
|
|
1060 to hack other file a little however, you have to rewrite it to
|
|
1061
|
|
1062 @example
|
|
1063 \includeonly@{OtherFileNameYouWantToFix@}
|
|
1064 @end example
|
|
1065
|
|
1066 @noindent
|
|
1067 in the main file. YaTeX automatically detects that the current
|
|
1068 edited text is not in includeonly list and prompts you
|
|
1069
|
|
1070 @example
|
|
1071 A)dd R)eplace %)comment?
|
|
1072 @end example
|
|
1073
|
|
1074 in the minibuffer. Type @kbd{a} if you want to add the current file name
|
|
1075 to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list
|
|
1076 by the current file, and type @kbd{%} to comment out the
|
|
1077 @code{\includeonly} line.
|
|
1078
|
28
|
1079 @node What column?, Intelligent newline, Updation of @code{\includeonly}, Top
|
20
|
1080 @comment node-name, next, previous, up
|
|
1081 @chapter What column?
|
|
1082 @cindex what column
|
|
1083 @cindex complex tabular
|
|
1084 @cindex prefix &
|
|
1085
|
|
1086 We are often get tired of finding the corresponding column in
|
|
1087 large tabulars. For example,
|
|
1088
|
|
1089 @example
|
|
1090 \begin@{tabular@}@{|c|c|c|c|c|c|c|c|@}\hline
|
|
1091 Name&Position&Post No.&Addr.&Phone No.&FAX No.&
|
|
1092 Home Addr.&Home Phone\\ \hline
|
|
1093 Thunder Bird & 6 & 223 & LA & xxx-yyy &
|
|
1094 zzz-www & Japan & 9876-54321 \\
|
|
1095 & 2 & \multicolumn@{2@}@{c|@}@{Unknown@}
|
|
1096 &&&(???)
|
|
1097 \\ \hline
|
|
1098 \end@{tabular@}
|
|
1099 @end example
|
|
1100
|
|
1101 Suppose you have the cursor located at @code{(???)} mark, can you tell
|
|
1102 which column it is belonging at once? Maybe no. In such case,
|
|
1103 type
|
|
1104
|
|
1105 @table @kbd
|
|
1106 @item [prefix] &
|
|
1107 @dots{} What column
|
|
1108 @end table
|
|
1109
|
|
1110 @noindent
|
|
1111 in that position. YaTeX tells you the column header of the
|
|
1112 current field. Since YaTeX assumes the first line of tabular
|
|
1113 environment as a row of column headers, you can create a row of
|
|
1114 virtual column headers by putting them in the first line and
|
|
1115 commenting that line with @code{%}.
|
|
1116
|
28
|
1117 @node Intelligent newline, Online help, What column?, Top
|
|
1118 @comment node-name, next, previous, up
|
|
1119 @chapter Intelligent newline
|
|
1120 @cindex Intelligent newline
|
|
1121 @cindex ESC RET
|
|
1122 @cindex M-C-m
|
|
1123
|
|
1124 In tabular[*], array, itemize, enumerate or tabbing environment,
|
|
1125
|
|
1126 @table @kbd
|
|
1127 @item ESC RET
|
|
1128 @dots{} Intelligent newline
|
|
1129 @end table
|
|
1130
|
|
1131 @noindent
|
|
1132 inserts the contents corresponding to the current environment in the next
|
|
1133 line. In @code{tabular} environment, for example, @kbd{ESC RET} inserts
|
|
1134 the certain number of @code{&} and trailing @code{\\}, and @code{\hline}
|
|
1135 if other @code{\hline} is found in backward. Here are the list of
|
|
1136 contents v.s. environments.
|
|
1137
|
|
1138 @itemize
|
|
1139 @item @code{tabular}, @code{tabular*}, @code{array}
|
|
1140
|
|
1141 Corresponding number of @code{&} and @code{\\}.
|
|
1142 And @code{\hline} if needed.
|
|
1143
|
|
1144 @item @code{tabbing}
|
|
1145
|
|
1146 The same number of @code{\>} as @code{\=} in the first line.
|
|
1147
|
|
1148 @item @code{itemize}, @code{enumerate}, @code{description}, @code{list}
|
|
1149
|
|
1150 @code{\item} or @code{item[]}.
|
|
1151 @end itemize
|
|
1152
|
|
1153 Note that since this function works seeing the contents of the first
|
|
1154 line, please call this after the second line if possible.
|
|
1155
|
|
1156 If you want to apply these trick to other environments, @code{foo}
|
|
1157 environment for example, define the function named
|
|
1158 @code{YaTeX-intelligent-newline-foo} to insert corresponding contents.
|
|
1159 That function will be called at the beginning of the next line after the
|
|
1160 newline is inserted to the current line. Since the function
|
|
1161 @code{YaTeX-indent-line} is designed to indent the current line properly,
|
|
1162 calling this function before your code to insert certain contents must be
|
|
1163 useful. See the definition of the function
|
|
1164 @code{YaTeX-intelligent-newline-itemize} as an example.
|
|
1165
|
|
1166 @node Online help, Cooperation with other packages, Intelligent newline, Top
|
20
|
1167 @comment node-name, next, previous, up
|
|
1168 @chapter Online help
|
|
1169 @cindex online help
|
|
1170 @cindex prefix ?
|
|
1171 @cindex prefix /
|
|
1172 @cindex apropos
|
|
1173 @cindex keyword search
|
|
1174
|
|
1175 YaTeX provides you the online help with popular La@TeX{} commands.
|
|
1176
|
|
1177 Here are the key strokes for the online help.
|
|
1178
|
|
1179 @table @kbd
|
|
1180 @item [prefix] ?
|
|
1181 @dots{} Online help
|
|
1182 @item [prefix] /
|
|
1183 @dots{} Online apropos
|
|
1184 @end table
|
|
1185
|
|
1186 @section Online help
|
|
1187
|
|
1188 `Online help' shows the documentation for the popular La@TeX{}
|
|
1189 commands(defaults to the commands on the cursor) in the next buffer.
|
|
1190 There are two help file, `global help' and `private help'. The former
|
|
1191 file contains the descriptions on the standard La@TeX{} command and is
|
|
1192 specified its name by variable @code{YaTeX-help-file}. Usually, the
|
|
1193 global help file should be located in public space (@code{$EMACSEXECPATH}
|
|
1194 by default) and should be world writable so that anyone can update it to
|
|
1195 enrich its contents. The latter file contains descriptions on
|
|
1196 non-standard or personal command definitions and is specified by
|
|
1197 @code{YaTeX-help-file-private}. This file should be put into private
|
|
1198 directory.
|
|
1199
|
|
1200 @section Online apropos
|
|
1201
|
|
1202 `Online apropos' is an equivalent of GNU Emacs's apropos. It
|
|
1203 shows all the documentations that contains the keyword entered by
|
|
1204 the user.
|
|
1205
|
|
1206 @section When no descriptions are found...
|
|
1207
|
|
1208 If there is no description on a command in help files, YaTeX
|
|
1209 requires you to write a description on that command. If you are
|
|
1210 willing to do, determine which help file to add and write the
|
|
1211 description on it referring your manual of (La)TeX. Please send
|
|
1212 me your additional descriptions if you describe the help on some
|
|
1213 standard commands. I might want to include it in the next
|
|
1214 distribution.
|
|
1215
|
|
1216 @node Cooperation with other packages, Customizations, Online help, Top
|
|
1217 @comment node-name, next, previous, up
|
|
1218 @chapter Cooperation with other packages
|
|
1219
|
|
1220 YaTeX works better with other brilliant packages.
|
|
1221
|
|
1222 @section gmhist
|
|
1223 @cindex gmhist
|
|
1224 @cindex command history
|
|
1225 @cindex minibuffer history
|
|
1226
|
|
1227 When you are loading @file{gmhist.el} and @file{gmhist-mh.el}, you can
|
|
1228 use independent command history list at the prompt of preview command
|
|
1229 (@kbd{[prefix] tp}) and print command (@kbd{[prefix] tl}). On each
|
|
1230 prompt, you can enter the previous command line string repeatedly by
|
|
1231 typing @kbd{M-p}.
|
|
1232
|
|
1233 @section min-out
|
|
1234 @cindex min-out
|
|
1235
|
|
1236 @file{min-out}, the outline minor mode, can be used in yatex-mode
|
|
1237 buffers. If you want to use it with YaTeX, please refer the
|
|
1238 file @file{yatexm-o.el} as an example.
|
|
1239
|
|
1240 @node Customizations, Etcetera, Cooperation with other packages, Top
|
|
1241 @comment node-name, next, previous, up
|
|
1242 @chapter Customizations
|
|
1243 @cindex customizations
|
|
1244
|
|
1245 You can customize YaTeX by setting Emacs-Lisp variables and by making
|
|
1246 add-in functions.
|
|
1247
|
|
1248 @menu
|
|
1249 * Lisp variables::
|
|
1250 * Add-in functions::
|
|
1251 @end menu
|
|
1252
|
33
|
1253 @node Lisp variables, Add-in functions, Customizations, Customizations
|
20
|
1254 @comment node-name, next, previous, up
|
|
1255 @section Lisp variables
|
|
1256 @cindex customizable variables
|
|
1257
|
|
1258 You can change the key assignments or make completion more
|
|
1259 comfortable by setting the values of various variables which
|
|
1260 control the movement of yatex-mode.
|
|
1261
|
|
1262 For example, if you want to change the prefix key stroke from @kbd{C-c}
|
|
1263 to any other sequence, set YaTeX-prefix to whatever you want to use. If
|
|
1264 you don't want to use the key sequence @kbd{C-c letter} which is assumed
|
|
1265 to be the user reserved sequence in Emacs world, set
|
|
1266 @code{YaTeX-inhibit-prefix-letter} to @code{t}, and all of the default key
|
|
1267 bind of @kbd{C-c letter} will turn to the corresponding @kbd{C-c C-letter}
|
|
1268 (but the region based completions that is invoked with @kbd{C-c
|
|
1269 Capital-letter} remain valid, if you want to disable those bindings, set
|
|
1270 that variable to 1 instead of @code{t}).
|
|
1271
|
|
1272 @menu
|
|
1273 * All customizable variables::
|
|
1274 * Sample definitions::
|
|
1275 * Hook variables::
|
|
1276 * Hook file::
|
|
1277 @end menu
|
|
1278
|
33
|
1279 @node All customizable variables, Sample definitions, Lisp variables, Lisp variables
|
20
|
1280 @comment node-name, next, previous, up
|
|
1281 @subsection All customizable variables
|
|
1282 @cindex all customizable variables
|
|
1283
|
|
1284 Here are the customizable variables of yatex-mode. Each value setq-ed
|
|
1285 in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is
|
|
1286 neglected. Parenthesized contents stands for the default value.
|
|
1287
|
|
1288 @table @samp
|
|
1289 @item YaTeX-prefix
|
|
1290
|
|
1291 Prefix key stroke (@kbd{C-c})
|
|
1292
|
|
1293 @item YaTeX-inhibit-prefix-letter
|
|
1294
|
|
1295 Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter}
|
|
1296 (@code{nil})
|
|
1297
|
|
1298 @item YaTeX-fill-prefix
|
|
1299
|
|
1300 Fill-prefix used in yatex-mode (@code{nil})
|
|
1301
|
|
1302 @item YaTeX-open-lines
|
|
1303
|
|
1304 Number of blank lines between cursor and @code{\begin@{@}},
|
|
1305 @code{\@code{end}@{@}} (0)
|
|
1306
|
|
1307 @item YaTeX-user-completion-table
|
|
1308
|
|
1309 Name of user dictionary where learned completion table will be stored.
|
|
1310 (@code{"~/.yatexrc"})
|
|
1311
|
|
1312 @item YaTeX-item-regexp
|
|
1313
|
|
1314 Regular expression of item command(@code{"\\\\item"})
|
|
1315
|
|
1316 @item tex-command
|
|
1317
|
|
1318 La@TeX{} typesetter command (@code{"latex"})
|
|
1319
|
|
1320 @item dvi2-command
|
|
1321
|
|
1322 Preview command
|
|
1323 (@code{"xdvi -geo +0+0 -s 4 -display (getenv"DISPLAY")"})
|
|
1324
|
|
1325 @item dviprint-command-format
|
|
1326
|
|
1327 Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"})
|
|
1328
|
|
1329 @item dviprint-from-format
|
|
1330
|
|
1331 Start page format of above %f. %b will turn to start page
|
|
1332 (@code{"-f %b"})
|
|
1333
|
|
1334 @item dviprint-to-format
|
|
1335
|
|
1336 End page format of above %t. %e will turn to @code{end} page
|
|
1337 (@code{"-t %e"})
|
|
1338
|
|
1339 @item section-name
|
|
1340
|
|
1341 Initial default value at the first section-type completion
|
|
1342 (@code{"documentstyle"})
|
|
1343
|
|
1344 @item env-name
|
|
1345
|
|
1346 Initial default value at the first begin-type completion
|
|
1347 (@code{"document"})
|
|
1348
|
|
1349 @item fontsize-name
|
|
1350
|
|
1351 Ditto of large-type (@code{"large"})
|
|
1352
|
|
1353 @item single-command
|
|
1354
|
|
1355 Ditto of maketitle-type (@code{"maketitle"})
|
|
1356
|
|
1357 @item YaTeX-need-nonstop
|
|
1358
|
|
1359 Put @code{\nonstopmode@{@}} or not (@code{nil})
|
|
1360
|
|
1361 @item latex-warning-regexp
|
|
1362
|
|
1363 Regular expression of warning message latex command puts out
|
|
1364 (@code{"line.* [0-9]*"})
|
|
1365
|
|
1366 @item latex-error-regexp
|
|
1367
|
|
1368 Regular expression of error message (@code{"l\\.[1-9][0-9]*"})
|
|
1369
|
|
1370 @item latex-dos-emergency-message
|
|
1371
|
|
1372 Message latex command running on DOS puts at abort
|
|
1373 (@code{"Emergency stop"})
|
|
1374
|
|
1375 @item YaTeX-item-regexp
|
|
1376
|
|
1377 Regexp of La@TeX{} itemization command (@code{"\\\\(sub\\)*item"})
|
|
1378
|
|
1379 @item YaTeX-nervous
|
|
1380
|
|
1381 T for using local dictionary (@code{t})
|
|
1382
|
|
1383 @item YaTeX-sectioning-regexp
|
|
1384
|
|
1385 Regexp of La@TeX{} sectioning command
|
|
1386
|
|
1387 (@code{"part\\|chapter\\|\\(sub\\)*\\(section\\|paragraph\\)"})
|
|
1388
|
|
1389 @item YaTeX-fill-inhibit-environments
|
|
1390
|
|
1391 Inhibit fill in these environments (@code{'("verbatim" "tabular")})
|
|
1392
|
|
1393 @item YaTeX-uncomment-once
|
|
1394
|
|
1395 @code{T} for deleting all preceding @code{%} (@code{nil})
|
|
1396
|
|
1397 @item YaTeX-close-paren-always
|
|
1398
|
|
1399 @code{T} for always close all parenthesis automatically,
|
|
1400 @code{nil} for only eol(@code{t})
|
|
1401
|
|
1402 @item YaTeX-auto-math-mode
|
|
1403
|
|
1404 Switch math-mode automatically(@code{t})
|
|
1405
|
|
1406 @item YaTeX-default-pop-window-height
|
|
1407
|
|
1408 Initial height of typesetting buffer when one-window.
|
|
1409 Number for the lines of the buffer, numerical string for
|
|
1410 the percentage of the screen-height.
|
|
1411 @code{nil} for half height(10)
|
|
1412
|
|
1413 @item YaTeX-help-file
|
|
1414
|
|
1415 Global online help file name (@file{$EMACS/etc/YATEXHLP.jp})
|
|
1416
|
|
1417 @item YaTeX-help-file-private
|
|
1418
|
|
1419 Private online help file name (@file{"~/YATEXHLP.jp"})
|
|
1420
|
|
1421 @item YaTeX-no-begend-shortcut
|
|
1422
|
|
1423 Disable [prefix] b ?? shortcut (@code{nil)}
|
|
1424 @end table
|
|
1425
|
|
1426 @node Sample definitions, Hook variables, All customizable variables, Lisp variables
|
|
1427 @comment node-name, next, previous, up
|
|
1428 @subsection Sample definitions
|
|
1429 @cindex prefix key stroke
|
|
1430 @cindex fill-prefix
|
|
1431
|
|
1432 For instance, to change the prefix key stroke to @kbd{ESC}, and name of
|
|
1433 the user dictionary @file{~/src/emacs/yatexrc}, and set @code{fill-prefix}
|
|
1434 to single TAB character, add the following @code{setq} to @file{~/.emacs}.
|
|
1435
|
|
1436 @lisp
|
|
1437 (setq YaTeX-prefix "\e"
|
|
1438 YaTeX-user-completion-table "~/src/emacs/yatexrc"
|
|
1439 YaTeX-fill-prefix " ")
|
|
1440 @end lisp
|
|
1441
|
|
1442 @node Hook variables, Hook file, Sample definitions, Lisp variables
|
|
1443 @comment node-name, next, previous, up
|
|
1444 @subsection Hook variables
|
|
1445 @cindex hook variables
|
|
1446
|
|
1447 More customizations will be done by the hook-function defined in
|
|
1448 hook-variable @code{yatex-mode-hook}. This is useful to define a shortcut
|
|
1449 key sequence to enter some environments other than @code{document} and
|
|
1450 @code{enumerate} etc. The following statement defines @code{[prefix] ba}
|
|
1451 to enter @code{\begin@{abstract@}} ... @code{=end@{abstract@}}
|
|
1452 immediately.
|
|
1453
|
|
1454 @lisp
|
|
1455 (setq yatex-mode-hook
|
|
1456 '(lambda() (YaTeX-define-begend-key "ba" "abstract")))
|
|
1457 @end lisp
|
|
1458
|
|
1459 You should use functions @code{YaTeX-define-key}, or
|
|
1460 @code{YaTeX-define-begend-key} to define all the key sequences of
|
|
1461 yatex-mode.
|
|
1462
|
|
1463 @node Hook file, , Hook variables, Lisp variables
|
|
1464 @comment node-name, next, previous, up
|
|
1465 @subsection Hook file
|
|
1466 @cindex hook file
|
|
1467
|
|
1468 You can stuff all of YaTeX relating expressions into a file named
|
|
1469 @file{yatexhks.el} if you have a lot of codes. YaTeX automatically load
|
|
1470 this file at the initialization of itself. Using @file{yatexhks.el}
|
|
1471 makes @code{yatex-mode-load-hook} unnecessary.
|
|
1472
|
|
1473 @node Add-in functions, , Lisp variables, Customizations
|
|
1474 @comment node-name, next, previous, up
|
|
1475 @section Add-in functions
|
|
1476 @cindex add-in functions
|
|
1477
|
|
1478 You can easily define a function to input detailed arguments
|
|
1479 with completion according to La@TeX{} environments or commands. To
|
|
1480 know the way to define these functions, see also @file{yatexadd.doc} in
|
|
1481 this package please.
|
|
1482
|
|
1483
|
|
1484 @node Etcetera, Copying, Customizations, Top
|
|
1485 @comment node-name, next, previous, up
|
|
1486 @chapter Etcetera
|
|
1487
|
|
1488 The standard completion tables provided in @file{yatex.el} contain a
|
|
1489 few La@TeX{} commands I frequently use. This is to lessen the key
|
|
1490 strokes to complete entire word, because too many candidates
|
|
1491 rarely used often cause too many hits. Therefore always try to
|
|
1492 use completion in order to enrich your dictionary, and you will
|
|
1493 also find `Wild Bird' growing suitable for your La@TeX{} style.
|
|
1494
|
|
1495
|
|
1496 @node Copying, , Etcetera, Top
|
|
1497 @comment node-name, next, previous, up
|
|
1498 @chapter Copying
|
|
1499
|
|
1500 This program is distributed as a free software. You can
|
|
1501 redistribute this software freely but with NO warranty to anything
|
|
1502 as a result of using this software. However, any reports and
|
|
1503 suggestions are welcome as long as I feel interests in this
|
|
1504 software. My possible e-mail address is `yuuji@@ae.keio.ac.jp'.
|
|
1505 (up to Mar.1993 at least)
|
|
1506
|
|
1507 The specification of this software will be surely modified
|
|
1508 (depending on my feelings) without notice :-p.
|
|
1509
|
|
1510
|
|
1511 @flushright
|
|
1512 HIROSE Yuuji
|
|
1513 @end flushright
|
|
1514 @bye
|
|
1515
|
|
1516 Local variables:
|
|
1517 mode: texinfo
|
|
1518 fill-prefix: nil
|
|
1519 fill-column: 74
|
|
1520 End:
|