Mercurial > hgrepos > hgweb.cgi > yatex
annotate docs/yatexe @ 419:510106cf15fb dev
Info reformatted
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 12 Jul 2015 10:06:47 +0900 |
parents | 781604df4cbd |
children | d63ba3e187ca |
rev | line source |
---|---|
271 | 1 Info file: yatexe, -*-Text-*- |
2 produced by `texinfo-format-buffer' | |
3 from file `yatexe.tex' | |
419 | 4 using `texinfmt.el' version 2.42 of 7 Jul 2006. |
271 | 5 |
272
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
6 START-INFO-DIR-ENTRY |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
7 * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs (English). |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
8 END-INFO-DIR-ENTRY |
78d0fdc0459c
Add `@directory' entries to info sources.
HIROSE Yuuji <yuuji@gentei.org>
parents:
271
diff
changeset
|
9 |
271 | 10 |
11 | |
12 | |
13 | |
14 | |
15 File: yatexe, Node: Top, Next: What is YaTeX?, Prev: (dir), Up: (dir) | |
16 | |
17 * Menu: | |
18 | |
419 | 19 * What is YaTeX?:: |
271 | 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 | |
40 | |
41 | |
42 | |
43 | |
44 File: yatexe, Node: What is YaTeX?, Next: Main features, Prev: Top, Up: Top | |
45 | |
46 What is YaTeX? | |
47 ************** | |
48 | |
49 YaTeX automates typesetting and previewing of LaTeX and enables | |
419 | 50 completing input of LaTeX mark-up command such as |
51 `\begin{}'..`\end{}'. | |
271 | 52 |
53 YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi | |
54 Language Enhancement to GNU Emacs), and latex on DOS. | |
55 | |
56 | |
57 | |
58 File: yatexe, Node: Main features, Next: Installation, Prev: What is YaTeX?, Up: Top | |
59 | |
60 Main features | |
61 ************* | |
62 | |
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') | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
69 * Enclosing text into LaTeX environments or commands (ABOVEKEYSTROKES |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
70 after region setting) |
271 | 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 | |
89 | |
90 | |
91 File: yatexe, Node: Installation, Next: Typesetting, Prev: Main features, Up: Top | |
92 | |
93 Installation | |
94 ************ | |
95 | |
96 Put next two expressions into your `~/.emacs'. | |
97 | |
98 (setq auto-mode-alist | |
99 (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) | |
100 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) | |
101 | |
102 Next, add certain path name where you put files of YaTeX to your | |
103 load-path. If you want to put them in `~/src/emacs', write | |
104 | |
105 (setq load-path | |
106 (cons (expand-file-name "~/src/emacs") load-path)) | |
107 | |
108 in your `~/.emacs' | |
109 | |
110 Then, yatex-mode will be automatically loaded when you visit a file | |
111 which has extension `.tex'. If yatex-mode is successfully loaded, mode | |
112 string on mode line will be turned to "YaTeX". | |
113 | |
114 | |
115 | |
116 | |
117 File: yatexe, Node: Typesetting, Next: %#notation, Prev: Installation, Up: Top | |
118 | |
119 Typesetting | |
120 *********** | |
121 | |
122 The prefix key stroke of yatex-mode is `C-c' (Press 'C' with Control | |
123 key) by default. If you don't intend to change the prefix key stroke, | |
124 assume all `[prefix]' as `C-c' in this document. These key strokes | |
125 execute typeset or preview command. | |
126 | |
127 `[prefix] t j' | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
128 ... invoke typesetter |
271 | 129 `[prefix] t r' |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
130 ... invoke typesetter on region |
271 | 131 `[prefix] t e' |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
132 ... `on-the-fly preview' on current environment or whole |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
133 portion of current formulas in math-mode |
271 | 134 `[prefix] t d' |
419 | 135 ... invoke dvipdfmx after successful typesetting |
271 | 136 `[prefix] t k' |
137 ... kill current typesetting process | |
138 `[prefix] t b' | |
139 ... invoke bibtex | |
140 `[prefix] t i' | |
141 ... invoke makeindex | |
142 `[prefix] t d' | |
143 ... invoke latex && dvipdfmx | |
144 `[prefix] t p' | |
145 ... preview | |
146 `[prefix] t l' | |
147 ... lpr dvi-file | |
148 `[prefix] t s' | |
149 ... search current string on xdvi-remote | |
150 | |
151 * Menu: | |
152 | |
419 | 153 * Calling typesetter:: |
154 * Calling previewer:: | |
155 * Printing out:: | |
271 | 156 |
157 | |
158 | |
159 File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting | |
160 | |
161 Calling typesetter | |
162 ================== | |
163 | |
164 Typing `[prefix] t j', the current editing window will be divided | |
165 horizontally when you invoke latex command, and log message of LaTeX | |
166 typesetting will be displayed in the other window; called typesetting | |
167 buffer. The typesetting buffer automatically scrolls up and traces LaTeX | |
168 warnings and error messages. If you see latex stopping by an error, you | |
169 can send string to latex in the typesetting buffer. | |
170 | |
171 If an error stops the LaTeX typesetting, this key stroke will move the | |
172 cursor to the line where LaTeX error is detected. | |
173 | |
174 `[prefix] '' | |
175 `([prefix]+single quotation)' | |
176 | |
177 ... jump to the previous error or warning | |
178 | |
179 If you find a noticeable error, move to the typesetting buffer and move | |
180 the cursor on the line of error message and type `SPACE' key. This makes | |
181 the cursor move to corresponding source line. | |
182 | |
183 YaTeX-typeset-region invoked by `[prefix] tr' call typesetter for | |
184 region. The region is specified by standard point and mark, or by | |
185 `%#BEGIN' and `%#END' marks. Selected region will be copied to the | |
186 temporary file `texput.tex' with the same preamble as the main file of | |
187 current editing sources. Be sure to put all local macro settings in | |
188 preamble, not after `\begin{document}'. The method of specification of | |
189 the region is shown in the section *Note %#notation::. | |
190 | |
191 The documentclass for typeset-region is the same as that of editing file | |
192 if you edit one file, and is the same as main file's if you edit splitting | |
193 files. | |
194 | |
195 The `[prefix] te' key automatically marks current inner environment or | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
196 inner math mode or paragraph, and then call typeset-region with marked |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
197 region. This is convenient to quick view of current tabular environment |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
198 or current editing formulas. If running Emacs has the ability of |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
199 displaying images, typeset image will be shown in the next window. |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
200 Further more, if you modify the content within that environment, YaTeX |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
201 performs `on-the-fly' preview that automatically update preview image as |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
202 you typed. |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
203 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
204 If your Emacs does not supply on-the-fly preview, keeping previewer window |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
205 for `texput.dvi' is handy for debugging. Since `[prefix] te' selects the |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
206 inner-most environment as region, it is not suitable for partial |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
207 typesetting of doubly or more composed environment. If you want to do |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
208 partial typesetting for a nested environment, use `[prefix] tr' for |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
209 static-region, which is described in the section *Note %#notation::. |
271 | 210 |
211 | |
212 | |
213 File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting | |
214 | |
215 Calling previewer | |
216 ================= | |
217 | |
218 `[prefix] t p' invokes the TeX previewer. And if you are using | |
219 xdvi-remote, which can be controled from other terminals, `[prefix] t s' | |
220 enables you to search current string at the cursor on the running xdvi | |
221 window. | |
222 | |
223 | |
224 | |
225 File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting | |
226 | |
227 Printing out | |
228 ============ | |
229 | |
230 When you type `[preifx] t l', YaTeX asks you the range of dvi-printing | |
231 by default. You can skip this by invoking it with universal-argument as | |
232 follows: | |
233 | |
234 C-u [prefix] tl | |
235 | |
236 | |
237 | |
238 File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top | |
239 | |
240 %# notation | |
241 *********** | |
242 | |
243 You can control the typesetting process by describing `%#' notations in | |
244 the source text. | |
245 | |
246 * Menu: | |
247 | |
419 | 248 * Changing typesetter:: |
249 * Splitting input files:: | |
250 * Static region for typesetting:: | |
251 * Lpr format:: | |
252 * Controlling which command to invoke:: | |
253 * Editing %# notation:: | |
271 | 254 |
255 | |
256 | |
257 File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation | |
258 | |
259 To change the `latex' command or to split a source text. | |
260 ======================================================== | |
261 | |
262 To change the typesetting command, write | |
263 | |
264 %#!latex-big | |
265 | |
266 anywhere in the source text. This is useful for changing typesetter. | |
267 | |
268 | |
269 | |
270 File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation | |
271 | |
272 Splitting input files | |
273 ===================== | |
274 | |
275 And if you split the source text and edit subfile that should be | |
276 included from main text. | |
277 | |
278 %#!latex main.tex | |
279 | |
280 will be helpful to execute latex on main file from sub text buffer. Since | |
281 this command line after `%#!' will be sent to shell literally, next | |
282 description makes it convenient to use ghostview as dvi-previewer. | |
283 | |
284 %#!latex main && dvi2ps main.dvi > main | |
285 | |
286 Note that YaTeX assumes the component before the last period of the last | |
287 word in this line as base name of the main LaTeX source. The `%f' | |
288 notation in this line is replaced by main file name, and `%r' replaced by | |
289 root name of main file name. If you specify `%f' or `%r', YaTeX always | |
290 ask you the name of main file at the first typesetting. | |
291 | |
292 To make best use of the feature of inter-file jumping by `[prefix] g' | |
293 (see *Note Cursor jump::), take described below into consideration. | |
294 | |
295 * You can put split texts in sub directory, but not in sub directory of | |
296 sub directory. | |
297 * In the main text, specify the child file name with relative path name | |
298 such as \include{chap1/sub}, when you include the file in a | |
299 sub-directory. | |
300 * In a sub-text, write `%#!latex main.tex' even if `main.tex' is in the | |
301 parent directory(not %#!latex ../main.tex). | |
302 | |
303 | |
304 | |
305 File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation | |
306 | |
307 Static region | |
308 ============= | |
309 | |
310 Typeset-region by `[prefix] tr' passes the region between point and mark | |
311 to typesetting command by default. But when you want to typeset static | |
312 region, enclose the region by `%#BEGIN' and `%#END' as follows. | |
313 | |
314 %#BEGIN | |
315 TheRegionYouWantToTypesetManyTimes | |
316 %#END | |
317 | |
318 This is the rule of deciding the region. | |
319 | |
320 1. If there exists %#BEGIN before point, | |
321 | |
322 1. If there exists %#END after %#BEGIN, | |
323 * From %#BEGIN to %#END. | |
324 | |
325 2. If %#END does not exist after %#BEGIN, | |
326 * From %#BEGIN to the end of buffer. | |
327 | |
328 2. If there does not exist %#BEGIN before point, | |
329 * Between point and mark(standard method of Emacs). | |
330 | |
331 It is useful to write `%#BEGIN' in the previous line of \begin and | |
332 `%#END' in the next line of \`end' when you try complex environment such | |
333 as `tabular' many times. It is also useful to put only `%#BEGIN' alone at | |
334 the middle of very long text. Do not forget to erase `%#BEGIN' `%#END' | |
335 pair. | |
336 | |
337 | |
338 | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
339 File: yatexe, Node: Lpr format, Prev: Static region for typesetting, Up: %#notation |
271 | 340 |
341 Lpr format | |
342 ========== | |
343 | |
344 Lpr format is specified by three Lisp variables. Here are the default | |
345 values of them. | |
346 | |
347 `(1)dviprint-command-format' | |
348 `"dvi2ps %f %t %s | lpr"' | |
349 `(2)dviprint-from-format' | |
350 `"-f %b"' | |
351 `(3)dviprint-to-format' | |
352 `"-t %e"' | |
353 | |
354 On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text, | |
355 `%f' by contents of (2), %t by contents of (3). At these replacements, | |
356 `%b' in (2) is also replaced by the number of beginning page, `%e' in (3) | |
357 is replaced by the number of ending page. But `%f' and `%t' are ignored | |
358 when you omit the range of print-out by `C-u [prefix] tl'. | |
359 | |
360 If you want to change this lpr format temporarily, put a command such as | |
361 follows somewhere in the text: | |
362 | |
363 %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2 | |
364 | |
365 And if you want YaTeX not to ask you the range of printing out, the next | |
366 example may be helpful. | |
367 | |
368 %#LPR dvi2ps %s | lpr | |
369 | |
370 | |
371 | |
372 File: yatexe, Node: Controlling which command to invoke, Next: Editing %# notation, Prev: Lpr format, Up: %#notation | |
373 | |
374 Controlling which command to invoke | |
375 =================================== | |
376 | |
377 These %# notation below can control which command to invoke for LaTeX | |
378 related process. | |
379 | |
419 | 380 `%#PREVIEW' |
381 | |
382 ... Command line for DVI viewing ([prefix] t p) | |
271 | 383 `%#MAKEINDEX' |
419 | 384 |
385 ... Command line for makeindex ([prefix] t i) | |
386 `%#BIBTEX' | |
387 | |
388 ... Command line for bibtex ([prefix] t b) | |
330 | 389 `%#DVIPDF' |
419 | 390 |
391 ... Command line for dvipdf(mx) ([prefix] t b) | |
392 `%#LPR' | |
393 | |
394 ... Command line for printing out([prefix] t l) | |
395 `%#PDFVIEW' | |
396 | |
397 ... Command line for PDF viewing | |
398 `%#IMAGEDPI' | |
399 | |
400 ... DPI value for converting to on-the-fly prewview image | |
271 | 401 |
402 If you want to invoke "makeidx hogehoge" to update index, put the next | |
403 line some upper place in the source, for example. | |
404 | |
405 %#MAKEINDEX makeidx hogehoge | |
406 | |
407 | |
408 | |
409 | |
410 File: yatexe, Node: Editing %# notation, Prev: Controlling which command to invoke, Up: %#notation | |
411 | |
412 Editing %# notation | |
413 =================== | |
414 | |
415 To edit `%#' notation described above, type | |
416 | |
417 `[prefix] %' | |
418 ... editing %# notation menu | |
419 | |
420 and select one of the entry of the menu as follows. | |
421 | |
422 !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR | |
423 | |
424 Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and | |
425 `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN' | |
426 and `%#END' are automatically erased. | |
427 | |
428 | |
429 | |
430 File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top | |
431 | |
432 Completion | |
433 ********** | |
434 | |
435 YaTeX makes it easy to input the LaTeX commands. There are several | |
436 kinds of completion type, begin-type, section-type, large-type, etc... | |
437 | |
438 * Menu: | |
439 | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
440 * Begin-type completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
441 * Section-type completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
442 * Large-type completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
443 * Maketitle-type completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
444 * Arbitrary completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
445 * End completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
446 * Accent completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
447 * Image completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
448 * Greek letters completion:: |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
449 * Inserting parentheses:: |
271 | 450 |
451 | |
452 | |
453 File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion | |
454 | |
455 Begin-type completion | |
456 ===================== | |
457 | |
458 "Begin-type completion" completes commands of `\begin{env}' ... | |
459 `\end{env}'. All of the begin-type completions begin with this key | |
460 sequence. | |
461 | |
462 `[prefix] b' | |
463 ... start begin-type completion | |
464 | |
465 An additional key stroke immediately completes a frequently used LaTeX | |
466 `\begin{}'...`\`end'{}' environment. | |
467 | |
468 `[prefix] b c' | |
469 ... `\begin{center}...\end{center}' | |
470 `[prefix] b d' | |
471 ... `\begin{document}...\end{document}' | |
472 `[prefix] b D' | |
473 ... `\begin{description}...\end{description}' | |
474 `[prefix] b e' | |
475 ... `\begin{enumerate}...\end{enumerate}' | |
476 `[prefix] b E' | |
477 ... `\begin{equation}...\end{equation}' | |
478 `[prefix] b i' | |
479 ... `\begin{itemize}...\end{itemize}' | |
480 `[prefix] b l' | |
481 ... `\begin{flushleft}...\end{flushleft}' | |
482 `[prefix] b m' | |
483 ... `\begin{minipage}...\end{minipage}' | |
484 `[prefix] b t' | |
485 ... `\begin{tabbing}...\end{tabbing}' | |
486 `[prefix] b T' | |
487 ... `\begin{tabular}...\end{tabular}' | |
488 `[prefix] b^T' | |
489 ... `\begin{table}...\end{table}' | |
490 `[prefix] b p' | |
491 ... `\begin{picture}...\end{picture}' | |
492 `[prefix] b q' | |
493 ... `\begin{quote}...\end{quote}' | |
494 `[prefix] b Q' | |
495 ... `\begin{quotation}...\end{quotation}' | |
496 `[prefix] b r' | |
497 ... `\begin{flushright}...\end{flushright}' | |
498 `[prefix] b v' | |
499 ... `\begin{verbatim}...\end{verbatim}' | |
500 `[prefix] b V' | |
501 ... `\begin{verse}...\end{verse}' | |
502 | |
503 Any other LaTeX environments are made by completing-read of the Emacs | |
504 function. | |
505 | |
506 `[prefix] b SPACE' | |
507 ... begin-type completion | |
508 | |
509 The next message will show up in the minibuffer | |
510 | |
419 | 511 Begin environment(default document): |
271 | 512 |
513 by typing `[prefix] b'. Put the wishing environment with completion in | |
514 the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the | |
515 LaTeX source text. If the environment you want to put does not exist in | |
516 the YaTeX completion table, it will be registered in the user completion | |
517 table. YaTeX automatically saves the user completion table in the user | |
518 dictionary file at exiting of emacs. | |
519 | |
520 At the completion of certain environments, the expected initial entry will | |
521 automatically inserted such as `\item' for `itemize' environment. If you | |
522 don't want the entry, it can be removed by undoing. | |
523 | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
524 If you want to enclose some paragraphs which have already been written |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
525 into environment, invoke the begin-type completion right after region |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
526 marking. |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
527 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
528 If you set `transient-mark-mode' to `nil' in your `~/.emacs', typing |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
529 `C-space' (`set-mark-command') twice turns `transient-mark-mode' on |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
530 temporarily. Then, type call begin-type completion to enclose text into a |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
531 environment. |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
532 |
271 | 533 |
534 | |
535 | |
536 File: yatexe, Node: Section-type completion, Next: Large-type completion, Prev: Begin-type completion, Up: Completion | |
537 | |
538 Section-type completion | |
539 ======================= | |
540 | |
541 "Section-type completion" completes section-type commands which take an | |
542 argument or more such as `\section{foo}'. To invoke section-type | |
543 completion, type | |
544 | |
545 `[prefix] s' | |
546 ... section-type completion | |
547 | |
548 then the prompt | |
549 | |
550 (C-v for view) \???{} (default documentclass): | |
551 | |
552 will show up in the minibuffer. Section-type LaTeX commands are completed | |
553 by space key, and the default value is selected when you type nothing in | |
554 the minibuffer. | |
555 | |
556 Next, | |
557 | |
558 \section{???}: | |
559 | |
560 prompts you the argument of section-type LaTeX command. For example, the | |
561 following inputs | |
562 | |
563 \???{} (default documentclass): section | |
564 \section{???}: Hello world. | |
565 | |
566 will insert the string | |
567 | |
568 \section{Hello world.} | |
569 | |
570 in your LaTeX source. When you neglect argument such as | |
571 | |
572 (C-v for view) \???{} (default section): vspace* | |
419 | 573 \vspace*{???}: |
271 | 574 |
575 YaTeX puts | |
576 | |
577 \vspace*{} | |
578 | |
579 and move the cursor in the braces. | |
580 | |
581 In LaTeX command, there are commands which take more than one arguments | |
582 such as `\addtolength{\topmargin}{8mm}'. To complete these commands, | |
583 invoke section-type completion with universal argument as, | |
584 | |
585 C-u 2 [prefix] s (or ESC 2 [prefix] s) | |
586 | |
587 and make answers in minibuffer like this. | |
588 | |
589 (C-v for view) \???{} (default vspace*): addtolength | |
590 \addtolength{???}: \topmargin | |
591 Argument 2: 8mm | |
592 | |
593 `\addtolength' and the first argument `\topmargin' can be typed easily by | |
594 completing read. Since YaTeX also learns the number of arguments of | |
595 section-type command and will ask that many arguments in future | |
596 completion, you had better tell the number of arguments to YaTeX at the | |
597 first completion of the new word. But you can change the number of | |
598 arguments by calling the completion with different universal argument | |
599 again. | |
600 | |
601 | |
602 Invoking section-type completion with `[Prefix] S' (Capital `S') | |
603 includes the region as the first argument of section-type command. | |
604 | |
605 The section/large/maketitle type completion can work at the prompt for | |
606 the argument of other section-type completion. Nested LaTeX commands are | |
607 efficiently read with the recursive completion by typing YaTeX's | |
608 completion key sequence in the minibuffer. | |
609 | |
610 * Menu: | |
611 | |
419 | 612 * view-sectioning:: |
271 | 613 |
614 | |
615 | |
616 File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion | |
617 | |
618 view-sectioning | |
619 --------------- | |
620 | |
621 In the minibuffer at the prompt of section-type command completion, | |
622 typing `C-v' shows a list of sectioning commands in source text(The line | |
623 with `<<--' mark is the nearest sectioning command). Then, default | |
624 sectioning command appears in the minibuffer. You can go up/down | |
625 sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing | |
626 buffer by `C-v'/`M-v', and can hide sectioning commands under certain | |
627 level by 0 through 6. Type `?' in the minibuffer of sectioning prompt | |
628 for more information. | |
629 | |
630 You can generate this listing buffer (`*Sectioning Lines*' buffer) by | |
631 typing | |
632 `M-x YaTeX-section-overview' | |
633 ... Generate *Sectioning Lines* buffer | |
634 | |
419 | 635 from the LaTeX source buffer. In this listing buffer, typing `u' on |
636 the sectioning command shifts up the corresponding sectioning command in | |
271 | 637 source text and `d' shifts down. After marking lines in the listing |
419 | 638 buffer, typing `U' shifts up all sectioning commands in the region, |
639 and `U' shifts down. Here are all the key bindings of | |
640 `*Sectioning Lines*' buffer. | |
271 | 641 |
642 `SPC' | |
643 ... Jump to corresponding source line | |
644 `.' | |
645 ... Display corresponding source line | |
646 `u' | |
647 ... Shift up a sectioning line | |
648 `d' | |
649 ... Shift down a sectioning line | |
650 `U' | |
651 ... Shift up sectioning lines in region | |
652 `D' | |
653 ... Shift down sectioning lines in region | |
654 `0...6' | |
655 ... Hide sectioning commands whose level is lower than n | |
656 | |
657 | |
658 | |
659 | |
660 File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Section-type completion, Up: Completion | |
661 | |
662 Large-type completion | |
663 ===================== | |
664 | |
665 "Large-type completion" inputs the font or size changing descriptions | |
666 such as `{\large }'. When you type | |
667 | |
668 `[prefix] l' | |
669 ... large-type completion | |
670 | |
671 the message in the minibuffer | |
672 | |
419 | 673 {\??? } (default large): |
271 | 674 |
675 prompts prompts you large-type command with completing-read. There are | |
676 TeX commands to change fonts or sizes, `it', `huge' and so on, in the | |
677 completion table. | |
678 | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
679 Region-based completion is also invoked by calling completion after |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
680 region activated. |
271 | 681 |
682 | |
683 | |
684 File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion | |
685 | |
686 Maketitle-type completion | |
687 ========================= | |
688 | |
689 We call it "maketitle-type completion" which completes commands such as | |
690 `\maketitle'. Take notice that maketitle-type commands take no arguments. | |
691 Then, typing | |
692 | |
693 `[prefix] m' | |
694 ... maketitle-type completion | |
695 | |
696 begins maketitle-completion. Above mentioned method is true for | |
697 maketitle-completion, and there are LaTeX commands with no arguments in | |
698 completion table. | |
699 | |
700 | |
701 | |
702 File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion | |
703 | |
704 Arbitrary completion | |
705 ==================== | |
706 | |
707 You can complete certain LaTeX command anywhere without typical | |
708 completing method as described, by typing | |
709 | |
710 `[prefix] SPC' | |
711 ... arbitrary completion | |
712 | |
713 after the initial string of LaTeX command that is preceded by `\'. | |
714 | |
715 | |
716 | |
717 File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion | |
718 | |
719 End completion | |
720 ============== | |
721 | |
722 YaTeX automatically detects the opened environment and close it with | |
419 | 723 `\end{environment}'. Though proficient YaTeX users never fail to make |
271 | 724 environment with begin-type completion, some may begin an environment |
725 manually. In that case, type | |
726 | |
727 `[prefix] e' | |
728 ... `end' completion | |
729 | |
730 at the end of the opened environment. | |
731 | |
732 | |
733 | |
734 File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion | |
735 | |
736 Accent completion | |
737 ================= | |
738 | |
739 When you want to write the European accent marks(like `\`{o}'), | |
740 | |
741 `[prefix] a' | |
742 ... accent completion | |
743 | |
744 shows the menu | |
745 | |
746 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b | |
747 | |
748 in the minibuffer. Chose one character or corresponding numeric, and you | |
749 will see | |
750 | |
751 \`{} | |
752 | |
753 in the editing buffer with the cursor positioned in braces. Type one more | |
754 character `o' for example, then | |
755 | |
756 \`{o} | |
757 | |
758 will be completed, and the cursor gets out from braces. | |
759 | |
760 | |
761 | |
762 File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion | |
763 | |
764 Image completion of mathematical sign | |
765 ===================================== | |
766 | |
767 Arrow marks, sigma mark and those signs mainly used in the TeX's math | |
768 environment are completed by key sequences which imitate the corresponding | |
769 symbols graphically. This completion only works in the math environment. | |
770 YaTeX automatically detects whether the cursor located in math environment | |
771 or not, and change the behavior of key strokes `;' and `:'. | |
772 | |
773 By the way, we often express the leftarrow mark by `<-' for example. | |
419 | 774 Considering such image, you can write `\leftarrow' by typing `<-' |
775 after `;' (semicolon) as a prefix. In the same way, | |
776 `\longleftarrow' (`<--') is completed by typing `;<--', | |
777 infinity mark which is imitated by `oo' is completed by typing | |
778 `;oo'. | |
271 | 779 |
780 Here are the sample operations in YaTeX math-mode. | |
781 | |
782 INPUT Completed LaTeX commands | |
783 ; < - `\leftarrow' | |
784 ; < - - `\longleftarrow' | |
785 ; < - - > `\longleftrightarrow' | |
786 ; o `\circ' | |
787 ; o o `\infty' | |
788 | |
789 In any case, you can quit from image completion and can move to the next | |
790 editing operation if the LaTeX command you want is shown in the buffer. | |
791 | |
419 | 792 `;' itself in math-environment is inserted by `;;'. Typing |
793 `TAB' in the midst of image completion shows all of the LaTeX | |
794 commands that start with the same name as string you previously typed in. | |
795 In this menu buffer, press `RET' after moving the cursor (by `n', | |
796 `p', `b', `f') to insert the LaTeX command. | |
271 | 797 |
798 To know all of the completion table, type `TAB' just after `;'. And | |
799 here is the sample menu by `TAB' after `;<'. | |
800 | |
801 KEY LaTeX sequence sign | |
802 < \leq < | |
803 ~ | |
419 | 804 << \ll << |
271 | 805 <- \leftarrow <- |
806 <= \Leftarrow <= | |
807 | |
808 You can define your favorite key-vs-sequence completion table in the | |
809 Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also | |
810 `yatexmth.el' for the information of the structure of this variable. | |
811 | |
812 | |
813 | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
814 File: yatexe, Node: Greek letters completion, Next: Inserting parentheses, Prev: Image completion, Up: Completion |
271 | 815 |
816 Greek letters completion | |
817 ======================== | |
818 | |
819 Math-mode of YaTeX provides another image completion, Greek letters | |
820 completion in the same method. After prefix `:', typing `a' makes | |
821 `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type | |
822 `:TAB' to know all the correspondence of alphabets vs. Greek letters. | |
823 | |
419 | 824 If you will find `;' or `:' doesn't work in correct position of |
825 math environment, it may be a bug of YaTeX. Please send me a bug report | |
826 with the configuration of your text, and avoid it temporarily by typing | |
827 `;' or `:' after universal-argument(`C-u') which forces | |
828 `;' and `:' to work as math-prefix. | |
271 | 829 |
830 | |
831 | |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
832 File: yatexe, Node: Inserting parentheses, Prev: Greek letters completion, Up: Completion |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
833 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
834 Inserting parentheses |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
835 ===================== |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
836 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
837 Typing opening parenthesis, one of `(', `{ and `['', automatically |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
838 inserts the closing one. If a opening bracket is typed after `\', `\]' is |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
839 automatically inserted with computed indentation. If you stop automatic |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
840 insertion, type `C-q' before opening parenthesis. |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
841 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
842 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
843 |
271 | 844 File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top |
845 | |
846 Local dictionaries | |
847 ****************** | |
848 | |
849 Tables for completion consist of three dictionaries; `standard | |
850 dictionary' built in `yatex.el', `user dictionary' for your common private | |
851 commands, and `local dictionary' that is effective in a certain directory. | |
852 | |
853 When you input the command unknown to YaTeX at a completion in the | |
854 minibuffer, YaTeX asks you with the following prompt; | |
855 | |
856 `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard | |
857 | |
858 In this menu, typing `u' updates your `user dictionary', `l' updates your | |
859 local dictionary, `n' updates only on-memory dictionary which go through | |
860 only current Emacs session, and `d' updates no dictionary and throws the | |
861 new word away. | |
862 | |
863 If you find this switching feature meaningless and bothersome, put the | |
864 next expression into your `~/.emacs' | |
865 | |
866 (setq YaTeX-nervous nil) | |
867 | |
868 | |
869 | |
870 File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top | |
871 | |
872 Commenting out | |
873 ************** | |
874 | |
875 You may want to comment out some region. | |
876 | |
877 `[prefix] >' | |
878 ... comment out region by % | |
879 `[prefix] <' | |
880 ... uncomment region | |
881 | |
882 cause an operation to the region between point and mark. | |
883 | |
884 `[prefix] .' | |
885 ... comment out current paragraph | |
886 `[prefix] ,' | |
887 ... uncomment current paragraph | |
888 | |
889 comments or uncomments the paragraph where the cursor belongs. This | |
890 `paragraph' means the region marked by the function mark-paragraph, bound | |
891 to `ESC h' by default. It is NOT predictable what will happen when you | |
892 continuously comment out some paragraph many times. | |
893 | |
419 | 894 You can also comment out an environment between `\begin' and |
895 `\end', or a `\begin'-\`\end' pair themselves, by making the | |
896 following key strokes on the line where `\begin{}' or | |
897 `\end{}' exists. | |
271 | 898 |
899 `[prefix] >' | |
900 ... comment out from \begin to \`end' | |
901 `[prefix] <' | |
902 ... uncomment from \begin to \`end' | |
903 | |
904 comment whole the contents of environment. Moreover, | |
905 | |
906 `[prefix] .' | |
907 ... comment out \begin and \`end' | |
908 `[prefix] ,' | |
909 ... uncomment \begin and \`end' | |
910 | |
911 (un)comments out only environment declaration: `\begin{}' and `\end{}'. | |
912 NOTE that even if you intend to comment out some region, invoking | |
913 `[prefix] >' on the `\begin',`\end' line decides to work in `commenting | |
914 out from `\begin' to `\end'' mode. | |
915 | |
916 | |
917 | |
918 | |
919 File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top | |
920 | |
921 Cursor jump | |
922 *********** | |
923 | |
924 | |
925 * Menu: | |
926 | |
419 | 927 * Jump to corresponding object:: |
928 * Invoking image processor:: | |
929 * Jump to main file:: | |
930 * Jumping around the environment:: | |
931 * Jumping to last completion position:: | |
271 | 932 |
933 | |
934 | |
935 File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump | |
936 | |
937 Jump to corresponding object | |
938 ============================ | |
939 | |
940 Typing | |
941 | |
942 `[prefix] g' | |
943 ... go to corresponding object | |
944 | |
945 in a certain place move the cursor to the place corresponding to the LaTeX | |
946 command of last place. YaTeX recognize the followings as pairs that have | |
947 relation each other. | |
948 | |
949 * `\begin{}' <-> `\end{}' | |
950 * `%#BEGIN' <-> `%#END' | |
951 * On the image-including line -> corresponding viewer or drawing tool | |
952 * `\label{}' <-> `\ref{}' | |
953 * `\include(\input)' -> included file | |
954 * `\bibitem{}' <-> `\cite{}' | |
955 | |
956 On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the | |
957 corresponding `\end',`\begin' line, if its partner really exists. The | |
958 behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the | |
959 correspondent of `label/ref' or `cite/bibitem' exists in another file, | |
960 that file have to be opened to make a round trip between references by | |
961 `[prefix] g'. | |
962 | |
963 If you type `[prefix] g' on the line of `\include{chap1}', typically in | |
964 the main text, YaTeX switches buffer to `chap1.tex'. | |
965 | |
966 `[prefix] 4 g' | |
967 ... go to corresponding object in other window | |
968 | |
419 | 969 do the same job as `[prefix] g' except it's done in other window. |
970 Note that this function doesn't work on `begin/end', | |
971 `%#BEGIN/%#END' pairs because it is meaningless. | |
271 | 972 |
973 | |
974 | |
975 File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump | |
976 | |
977 Invoking image processor | |
978 ======================== | |
979 | |
980 | |
981 `image-including line' described above means such lines as | |
982 `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX | |
983 automatically searches source of `foo.ps' and invokes image viewer or | |
984 drawing tool correspoinding to it. For example; if you draw an image | |
985 foo.obj with Tgif and enclose its product named foo.eps by `\epsfile' | |
986 command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif | |
987 foo.obj'. How a processor is choosen is as follows. | |
988 | |
989 1. If there is an expression matching with one of the pattern defined in | |
990 `YaTeX-processed-file-regexp-alist', extract file name from regexp | |
991 group surrounded by \\(\\). (Which group corresponds is written in | |
992 the cdr part of each list.) If no matches were found, do nothing. | |
993 2. If there is a pattern as `%PROCESSOR' which is defined in the | |
994 variable `YaTeX-file-processor-alist', call that processor giving the | |
995 file name with corresponding extension. | |
996 3. If not, check the existence of each file which is supplied the | |
997 extension in the cdr part of each list of | |
998 `YaTeX-file-processor-alist'. If any, call the corresponding image | |
999 viewer or drawing tool. | |
1000 | |
1001 | |
1002 | |
1003 File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump | |
1004 | |
1005 Jump to main file | |
1006 ================= | |
1007 | |
1008 Typing | |
1009 | |
1010 `[prefix] ^' | |
1011 ... visit main file | |
1012 `[prefix] 4^' | |
1013 ... visit main file in other buffer | |
1014 | |
419 | 1015 in a sub text switch the buffer to the main text specified by |
1016 `%#!' notation. | |
271 | 1017 |
1018 | |
1019 | |
1020 File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump | |
1021 | |
1022 Jumping around the environment | |
1023 ============================== | |
1024 | |
1025 And these are the functions which work on the current LaTeX environment: | |
1026 | |
1027 `M-C-a' | |
1028 ... beginning of environment | |
1029 `M-C-e' | |
1030 ... `end' of environment | |
1031 `M-C-@' | |
1032 ... mark environment | |
1033 | |
1034 | |
1035 | |
1036 File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump | |
1037 | |
1038 Jumping to last completion position | |
1039 =================================== | |
1040 | |
1041 YaTeX always memorize the position of completion into register `3'. So | |
1042 every time you make a trip to any other part of text other than you are | |
1043 writing, you can return to the editing paragraph by calling | |
1044 register-to-point with argument YaTeX-current-position-register, which is | |
1045 achieved by typing `C-x j 3'(by default). | |
1046 | |
1047 | |
1048 | |
1049 File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top | |
1050 | |
1051 Changing and Deleting | |
1052 ********************* | |
1053 | |
1054 These functions are for change or deletion of LaTeX commands already | |
1055 entered. | |
1056 | |
1057 `[prefix] c' | |
1058 ... change LaTeX command | |
1059 `[prefix] k' | |
1060 ... kill LaTeX command | |
1061 | |
1062 * Menu: | |
1063 | |
419 | 1064 * Changing LaTeX commands:: |
1065 * Killing LaTeX commands:: | |
271 | 1066 |
1067 | |
1068 | |
1069 File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting | |
1070 | |
1071 Changing LaTeX commands | |
1072 ======================= | |
1073 | |
1074 `[prefix] c' can change the various (La)TeX commands. This can change the | |
1075 followings. | |
1076 * Environment names | |
1077 * Section-type commands | |
1078 * Argument of section-type commands | |
1079 * Optional parameters (enclosed by []) of section-type commands | |
1080 * Font/size designators | |
1081 * Math-mode's maketitle-type commands that can be inputted with image | |
1082 completion | |
1083 | |
1084 Typing `[prefix] c' on one of above objects you want to change brings a | |
1085 suitable reading function sometimes with completion. Note: If you want to | |
1086 change the argument of section-type command that contains other LaTeX | |
1087 commands, type `[prefix] c' either of surrounding braces of the argument | |
1088 in order to make YaTeX ignore the internal LaTeX sequences as an object of | |
1089 changing. Anyway, it is very difficult to know which argument position | |
1090 the cursor belongs because the LaTeX commands can be nested and braces can | |
1091 freely emerge. So keep it mind to put the cursor on a brace when you are | |
1092 thinking of changing a complicated argument. | |
1093 | |
1094 | |
1095 | |
1096 File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting | |
1097 | |
1098 Killing LaTeX commands | |
1099 ====================== | |
1100 | |
1101 `[prefix] k' kills the LaTeX commands sometimes with their arguments. | |
1102 Following table illustrates the correspondence of the invoking position | |
1103 and what is killed. | |
1104 | |
1105 [Invoking position] [action] | |
1106 \begin, \end line kill \begin,\end pairs | |
1107 %#BEGIN, %#END line kill %#BEGIN,%#END pairs | |
1108 on a Section-type command kill section-type command | |
1109 on a parenthesis kill parentheses | |
1110 | |
1111 Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines | |
1112 `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take | |
1113 care not to create any line that contains more than one `\begin' or so. | |
1114 | |
1115 While all operations above are to kill `containers' which surround some | |
1116 text, universal argument (`C-u') for these commands kills not only | |
1117 `containers' but also `contents' of them. See below as a sample. | |
1118 | |
1119 Original text: [prefix] k C-u [prefix] k | |
1120 Main \footnote{note} here. Main note here. Main here. | |
1121 ~(cursor) | |
1122 | |
1123 | |
1124 | |
1125 File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top | |
1126 | |
1127 Filling | |
1128 ******* | |
1129 | |
1130 | |
1131 Filling an item | |
1132 =============== | |
1133 | |
1134 To fill a term (descriptive sentences) of `\item', type | |
1135 | |
1136 `M-q' | |
1137 ... fill item | |
1138 | |
1139 on that item. | |
1140 | |
1141 YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular | |
1142 expression to search item header in itemize environment. If you make a | |
1143 newcommand to itemize terms(e.g. `\underlineitem'), put | |
1144 | |
1145 (setq YaTeX-item-regexp | |
1146 "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)") | |
1147 | |
419 | 1148 in your `~/.emacs'. If you are not familiar with regular expression |
1149 for Emacs-Lisp, name a newcommand for `itemize' beginning with | |
1150 `\item' such as `\itembf', not `\bfitem'. | |
271 | 1151 |
1152 This function reformats the `\item' into `hang-indented' style. For | |
1153 example: | |
1154 | |
1155 itemize, enumerate environment: | |
1156 > | |
1157 >\item[foo] `foo' is the typical word for describing an | |
1158 > arbitrarily written.... | |
1159 description environment: | |
1160 > \item[bar] When the word `for' is used as an arbitrarily | |
1161 > word, `bar' is bound to follow it. | |
1162 | |
1163 Note that the indent depth of an `\item' word and its descriptive | |
1164 paragraph are the same in latter case. If you want to use different | |
1165 depth, invoke fill-paragraph at the beginning of non-whitespace | |
1166 character(see below). | |
1167 | |
1168 | |
1169 Filling paragraph | |
1170 ================= | |
1171 | |
1172 Fill-paragraph is little bit adapted for LaTeX sources. It retains from | |
1173 filling in certain environments where formatting leads to a disaster such | |
1174 as verbatim, tabular, or so. And it protects `\verb' expressions from | |
1175 being folded (The variable `YaTeX-verb-regexp' controls this). Besides, | |
1176 putting cursor on the first occurrence of non-whitespace character on a | |
1177 line changes the fill-prefix temporarily to the depth of the line. | |
1178 | |
1179 | |
1180 | |
1181 File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top | |
1182 | |
1183 Updation of `\includeonly' | |
1184 ************************** | |
1185 | |
1186 When you edit splitting source texts, the notation | |
1187 | |
1188 \includeonly{CurrentEditingFileName} | |
1189 | |
1190 in the main file reduces the time of typesetting. If you want to hack | |
1191 other file a little however, you have to rewrite it to | |
1192 | |
1193 \includeonly{OtherFileNameYouWantToFix} | |
1194 | |
1195 in the main file. YaTeX automatically detects that the current edited | |
1196 text is not in includeonly list and prompts you | |
1197 | |
1198 A)dd R)eplace %)comment? | |
1199 | |
419 | 1200 in the minibuffer. Type `a' if you want to add the current file name |
1201 to `\includeonly' list, `r' to replace \`includeonly' list | |
1202 with the current file, and type `%' to comment out the | |
1203 `\includeonly' line. | |
271 | 1204 |
1205 | |
1206 | |
1207 File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top | |
1208 | |
1209 What column? | |
1210 ************ | |
1211 | |
1212 We are often get tired of finding the corresponding column in large | |
1213 tabulars. For example, | |
1214 | |
1215 \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline | |
1216 Name&Position&Post No.&Addr.&Phone No.&FAX No.& | |
1217 Home Addr.&Home Phone\\ \hline | |
1218 Thunder Bird & 6 & 223 & LA & xxx-yyy & | |
1219 zzz-www & Japan & 9876-54321 \\ | |
1220 & 2 & \multicolumn{2}{c|}{Unknown} | |
1221 &&&(???) | |
1222 \\ \hline | |
1223 \end{tabular} | |
1224 | |
1225 Suppose you have the cursor located at `(???)' mark, can you tell which | |
1226 column it is belonging at once? Maybe no. In such case, type | |
1227 | |
1228 `[prefix] &' | |
1229 ... What column | |
1230 | |
1231 in that position. YaTeX tells you the column header of the current field. | |
1232 Since YaTeX assumes the first line of tabular environment as a row of | |
1233 column headers, you can create a row of virtual column headers by putting | |
1234 them in the first line and commenting that line with `%'. | |
1235 | |
1236 | |
1237 | |
1238 File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top | |
1239 | |
1240 Intelligent newline | |
1241 ******************* | |
1242 | |
1243 At the end of begin-type completion of tabular[*], array, itemize, | |
1244 enumerate or tabbing environment, or typing | |
1245 | |
1246 `ESC RET' | |
1247 ... Intelligent newline | |
1248 | |
1249 in these environments inserts the contents corresponding to the current | |
1250 environment in the next line. (At the begin-type completion, this | |
1251 contents can be removed by `undo'.) In `tabular' environment, for | |
1252 example, `ESC RET' inserts the certain number of `&' and trailing `\\', | |
1253 and `\hline' if other `\hline' is found in backward. Here are the list of | |
1254 contents vs. environments. | |
1255 | |
1256 * `tabular', `tabular*', `array' | |
1257 | |
1258 Corresponding number of `&' and `\\'. And `\hline' if | |
1259 needed. | |
1260 | |
1261 * `tabbing' | |
1262 | |
1263 The same number of `\>' as `\=' in the first line. | |
1264 | |
1265 * `itemize', `enumerate', `description', `list' | |
1266 | |
1267 `\item' or `item[]'. | |
1268 | |
1269 Note that since this function works seeing the contents of the first | |
1270 line, please call this after the second line if possible. | |
1271 | |
1272 If you want to apply these trick to other environments, `foo' | |
1273 environment for example, define the function named | |
419 | 1274 `YaTeX-intelligent-newline-foo' to insert corresponding contents. |
1275 That function will be called at the beginning of the next line after the | |
271 | 1276 newline is inserted to the current line. Since the function |
1277 `YaTeX-indent-line' is designed to indent the current line properly, | |
1278 calling this function before your code to insert certain contents must be | |
1279 useful. See the definition of the function | |
1280 `YaTeX-intelligent-newline-itemize' as an example. | |
1281 | |
1282 | |
1283 | |
1284 File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top | |
1285 | |
1286 Usepackage checker | |
1287 ****************** | |
1288 | |
1289 When you input begint-type, section-type, maketitle-type macros with | |
1290 completion, and it requires some LaTeX2e package, YaTeX examines the | |
1291 existence of correct `\usepackage'. If not, YaTeX inserts the | |
1292 `\usepackage{}' declaration corresponding to input macro. | |
1293 | |
1294 To activate the package completion for your favarite package, set the | |
1295 variable `YaTeX-package-alist-private' correctly. Please refere the value | |
1296 of `YaTeX-package-alist-default' as an example. | |
1297 | |
1298 | |
1299 | |
1300 File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top | |
1301 | |
1302 Online help | |
1303 *********** | |
1304 | |
1305 YaTeX provides you the online help with popular LaTeX commands. | |
1306 | |
1307 Here are the key strokes for the online help. | |
1308 | |
1309 `[prefix] ?' | |
1310 ... Online help | |
1311 `[prefix] /' | |
1312 ... Online apropos | |
1313 | |
1314 | |
1315 Online help | |
1316 =========== | |
1317 | |
1318 `Online help' shows the documentation for the popular LaTeX | |
1319 commands(defaults to the commands on the cursor) in the next buffer. | |
1320 There are two help file, `global help' and `private help'. The former | |
1321 file contains the descriptions on the standard LaTeX command and is | |
1322 specified its name by variable `YaTeX-help-file'. Usually, the global | |
1323 help file should be located in public space (`$EMACSEXECPATH' by default) | |
1324 and should be world writable so that anyone can update it to enrich its | |
1325 contents. The latter file contains descriptions on non-standard or | |
1326 personal command definitions and is specified by | |
1327 `YaTeX-help-file-private'. This file should be put into private | |
1328 directory. | |
1329 | |
1330 | |
1331 Online apropos | |
1332 ============== | |
1333 | |
1334 `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all | |
1335 the documentations that contains the keyword entered by the user. | |
1336 | |
1337 | |
1338 When no descriptions are found... | |
1339 ================================= | |
1340 | |
1341 If there is no description on a command in help files, YaTeX requires | |
1342 you to write a description on that command. If you are willing to do, | |
1343 determine which help file to add and write the description on it referring | |
1344 your manual of (La)TeX. Please send me your additional descriptions if | |
1345 you describe the help on some standard commands. I might want to include | |
1346 it in the next distribution. | |
1347 | |
1348 | |
1349 | |
1350 File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top | |
1351 | |
1352 Browsing file hierarchy | |
1353 *********************** | |
1354 | |
1355 When you are editing multi-file source, typing | |
1356 | |
1357 `[prefix] d' | |
1358 ... browse file hierarchy | |
1359 | |
1360 asks you the parent-most file (which may be defaulted) and displays the | |
1361 documentation hierarchy in the next window. In this buffer, the following | |
1362 commands are available. | |
1363 | |
1364 `n' | |
1365 ... move to the next line and show its contents | |
1366 `p' | |
1367 ... move to the previous line and show its contents | |
1368 `N' | |
1369 ... move to the next file in the same inclusion level | |
1370 `P' | |
1371 ... move to the previous file in the same inclusion level | |
1372 `j' | |
1373 ... move to the next line | |
1374 `k' | |
1375 ... move to the previous line | |
1376 `u' | |
1377 ... move to the parent file | |
1378 `.' | |
1379 ... show the current files contents in the next window | |
1380 `SPC' | |
1381 ... scroll up the current file window | |
1382 `DEL, b' | |
1383 ... scroll down the current file window | |
1384 `<' | |
1385 ... show the beginning of the current file | |
1386 `>' | |
1387 ... show the end of the current file | |
1388 `>' | |
1389 ... return to the previous postion after `<' or `>' | |
1390 `RET, g' | |
1391 ... open the current file in the next window | |
1392 `mouse-2' | |
1393 ... same as RET(available only with window system) | |
1394 `o' | |
1395 ... other window | |
1396 `1' | |
1397 ... delete other windows | |
1398 `-' | |
1399 ... shrink hierarchy buffer window | |
1400 `+' | |
1401 ... enlarge hierarchy buffer window | |
1402 `?' | |
1403 ... describe mode | |
1404 `q' | |
1405 ... quit | |
1406 | |
1407 Note that operations on the file contents in the next window do not work | |
1408 correctly when you close the corresponding file. | |
1409 | |
1410 | |
1411 | |
1412 File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top | |
1413 | |
1414 Cooperation with other packages | |
1415 ******************************* | |
1416 | |
1417 YaTeX works better with other brilliant packages. | |
1418 | |
1419 | |
1420 gmhist | |
1421 ====== | |
1422 | |
1423 When you are loading `gmhist.el' and `gmhist-mh.el', you can use | |
1424 independent command history list at the prompt of preview command | |
1425 (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you | |
1426 can enter the previous command line string repeatedly by typing `M-p'. | |
1427 | |
1428 | |
1429 min-out | |
1430 ======= | |
1431 | |
1432 `min-out', the outline minor mode, can be used in yatex-mode buffers. | |
1433 If you want to use it with YaTeX, please refer the file `yatexm-o.el' as | |
1434 an example. | |
1435 | |
1436 | |
1437 | |
1438 File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top | |
1439 | |
1440 Customizations | |
1441 ************** | |
1442 | |
1443 You can customize YaTeX by setting Emacs-Lisp variables and by making | |
1444 add-in functions. | |
1445 | |
1446 * Menu: | |
1447 | |
419 | 1448 * Lisp variables:: |
1449 * Add-in functions:: | |
1450 * Add-in generator:: | |
271 | 1451 |
1452 | |
1453 | |
1454 File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations | |
1455 | |
1456 Lisp variables | |
1457 ============== | |
1458 | |
1459 You can change the key assignments or make completion more comfortable | |
1460 by setting the values of various variables which control the movement of | |
1461 yatex-mode. | |
1462 | |
1463 For example, if you want to change the prefix key stroke from `C-c' to | |
1464 any other sequence, set YaTeX-prefix to whatever you want to use. If you | |
1465 don't want to use the key sequence `C-c letter' which is assumed to be the | |
1466 user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter' | |
1467 to `t', and all of the default key bind of `C-c letter' will turn to the | |
1468 corresponding `C-c C-letter' (but the region based completions that is | |
1469 invoked with `C-c Capital-letter' remain valid, if you want to disable | |
1470 those bindings, set that variable to 1 instead of `t'). | |
1471 | |
1472 * Menu: | |
1473 | |
419 | 1474 * All customizable variables:: |
1475 * Sample definitions:: | |
1476 * Hook variables:: | |
1477 * Hook file:: | |
271 | 1478 |
1479 | |
1480 | |
1481 File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables | |
1482 | |
1483 All customizable variables | |
1484 -------------------------- | |
1485 | |
1486 Here are the customizable variables of yatex-mode. Each value setq-ed | |
1487 in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected. | |
1488 Parenthesized contents stands for the default value. When you are to | |
1489 change some of these variables, see more detailed documentation of the | |
1490 variable by `M-x describe-variable'. | |
1491 | |
1492 -- Variable: YaTeX-japan | |
1493 Set this nil to produce all messages in English (`Depends on Japanese | |
1494 feature of Emacs') | |
1495 | |
1496 -- Variable: YaTeX-kanji-code | |
1497 Default buffer-file-coding-system for YaTeX modes' buffer. Set this | |
1498 0 to no language conversion. Nil to preserve original | |
1499 coding-system. 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (`1 or 2') | |
1500 | |
1501 -- Variable: YaTeX-prefix | |
1502 Prefix key stroke (`C-c') | |
1503 | |
1504 -- Variable: YaTeX-inhibit-prefix-letter | |
1505 Change key stroke from `C-c letter' to `C-c C-letter' (`nil') | |
1506 | |
1507 -- Variable: YaTeX-fill-prefix | |
1508 Fill-prefix used in yatex-mode (`nil') | |
1509 | |
1510 -- Variable: YaTeX-user-completion-table | |
1511 Name of user dictionary where learned completion table will be | |
1512 stored. (`"~/.yatexrc"') | |
1513 | |
1514 -- Variable: tex-command | |
1515 LaTeX typesetter command (`"latex"') | |
1516 | |
1517 -- Variable: dvi2-command | |
1518 Preview command (`"xdvi -geo +0+0 -s 4"') | |
1519 | |
1520 -- Variable: dviprint-command-format | |
1521 Command format to print dvi file (`"dvi2ps %f %t %s | lpr"') | |
1522 | |
1523 -- Variable: dviprint-from-format | |
1524 Start page format of above %f. %b will turn to start page (`"-f %b"') | |
1525 | |
1526 -- Variable: dviprint-to-format | |
1527 End page format of above %t. %e will turn to `end' page (`"-t %e"') | |
1528 | |
1529 -- Variable: makeindex-command | |
1530 Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS)) | |
1531 | |
1532 -- Variable: YaTeX-dvipdf-command | |
1533 Default command name to convert .dvi to PDF (`"dvipdfmx"') | |
1534 | |
384
e95ae850eefb
Update copyright lines and so on.
HIROSE Yuuji <yuuji@gentei.org>
parents:
363
diff
changeset
|
1535 -- Variable: YaTeX-on-the-fly-preview-interval |
e95ae850eefb
Update copyright lines and so on.
HIROSE Yuuji <yuuji@gentei.org>
parents:
363
diff
changeset
|
1536 Interval time in seconds of idle to trigger on-the-fly preview of |
419 | 1537 environment by `[prefix] t e'(0.9). |
1538 `Nil' disables on-the-fly preview. | |
384
e95ae850eefb
Update copyright lines and so on.
HIROSE Yuuji <yuuji@gentei.org>
parents:
363
diff
changeset
|
1539 |
409
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1540 -- Variable: YaTeX-on-the-fly-math-preview-engine |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1541 Function symbol to use on-the-fly preview of MATH environment started |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1542 by `[prefix] t e' (`'YaTeX-typeset-environment-by-lmp' which calls |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1543 latex-math-preview-expression function if latex-math-preview is |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1544 available, otherwise `'YaTeX-typeset-environment-by-builtin' which |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1545 alls built-in function). |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1546 |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1547 `Nil' disables on-the-fly preview. |
781604df4cbd
New variables: YaTeX-electric-indent-mode, yahtml-electric-indent-mode
HIROSE Yuuji <yuuji@gentei.org>
parents:
384
diff
changeset
|
1548 |
363
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1549 -- Variable: YaTeX-cmd-gimp |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1550 Command name of GIMP (code{"gimp"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1551 -- Variable: YaTeX-cmd-tgif |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1552 Command name of tgif (code{"tgif"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1553 -- Variable: YaTeX-cmd-inkscape |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1554 Command name of Inkscape (code{"inkscape"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1555 -- Variable: YaTeX-cmd-dia |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1556 Command name of Dia (code{"dia"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1557 -- Variable: YaTeX-cmd-ooo |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1558 Command name of OpenOffice.org/LibreOffice (code{"soffice"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1559 -- Variable: YaTeX-cmd-gs |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1560 Command name of Ghostscript (code{"gs"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1561 -- Variable: YaTeX-cmd-dvips |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1562 Command name of dvips (code{"dvips"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1563 -- Variable: YaTeX-cmd-displayline |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1564 Command name of displayline |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1565 (code{"/Applications/Skim.app/Contents/SharedSupport/displayline"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1566 -- Variable: YaTeX-cmd-edit-ps |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1567 Command name for editing PostScript files(Value of |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1568 code{"YaTeX-cmd-gimp"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1569 -- Variable: YaTeX-cmd-edit-pdf |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1570 Command name for editing PDF files(Value of code{"YaTeX-cmd-ooo"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1571 -- Variable: YaTeX-cmd-edit-ai |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1572 Command name for editing `.ai' files(Value of |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1573 code{"YaTeX-cmd-inkscape"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1574 -- Variable: YaTeX-cmd-edit-svg |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1575 Command name for editing SVG files(Value of |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1576 code{"YaTeX-cmd-inkscape"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1577 -- Variable: YaTeX-cmd-edit-images |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1578 Command name for editing image files(Value of code{"YaTeX-cmd-gimp"}) |
f7ae3e4be0bb
Note about two new variables
HIROSE Yuuji <yuuji@gentei.org>
parents:
330
diff
changeset
|
1579 |
271 | 1580 -- Variable: YaTeX-need-nonstop |
1581 Put `\nonstopmode{}' or not (`nil') | |
1582 | |
1583 -- Variable: latex-warning-regexp | |
1584 Regular expression of warning message latex command puts out | |
1585 (`"line.* [0-9]*"') | |
1586 | |
1587 -- Variable: latex-error-regexp | |
1588 Regular expression of error message (`"l\\.[1-9][0-9]*"') | |
1589 | |
1590 -- Variable: latex-dos-emergency-message | |
1591 Message latex command running on DOS puts at abort (`"Emergency | |
1592 stop"') | |
1593 | |
1594 -- Variable: YaTeX-item-regexp | |
1595 Regular expression of item command (`"\\\\item"') | |
1596 | |
1597 -- Variable: YaTeX-verb-regexp | |
1598 Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"') | |
1599 | |
1600 -- Variable: YaTeX-nervous | |
1601 T for using local dictionary (`t') | |
1602 | |
1603 -- Variable: YaTeX-sectioning-regexp | |
1604 Regexp of LaTeX sectioning command | |
1605 (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"') | |
1606 | |
1607 -- Variable: YaTeX-fill-inhibit-environments | |
1608 Inhibit fill in these environments (`'("tabular" "tabular*" "array" | |
419 | 1609 picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" |
1610 verbatim" "verbatim*")') | |
271 | 1611 |
1612 -- Variable: YaTeX-uncomment-once | |
1613 T for deleting all preceding `%' (`nil') | |
1614 | |
1615 -- Variable: YaTeX-close-paren-always | |
1616 T for always close all parenthesis automatically, `nil' for only eol | |
1617 (`t') | |
1618 | |
1619 -- Variable: YaTeX-auto-math-mode | |
1620 Switch math-mode automatically (`t') | |
1621 | |
1622 -- Variable: YaTeX-math-key-list-private | |
1623 User defined alist, math-mode-prefix vs completion alist used in | |
1624 image completion (`nil'). See `yatexmth.el' for the information | |
1625 about how to define a completion alist. | |
1626 | |
1627 -- Variable: YaTeX-default-pop-window-height | |
1628 Initial height of typesetting buffer when one-window. Number for the | |
1629 lines of the buffer, numerical string for the percentage of the | |
1630 screen-height. `nil' for half height (10) | |
1631 | |
1632 -- Variable: YaTeX-help-file | |
1633 Global online help file name | |
1634 (`$doc-directory/../../site-lisp/YATEXHLP.eng') | |
1635 | |
1636 -- Variable: YaTeX-help-file-private | |
1637 Private online help file name (`"~/YATEXHLP.eng"') | |
1638 | |
1639 -- Variable: YaTeX-no-begend-shortcut | |
1640 Disable [prefix] b ?? shortcut (`nil)' | |
1641 | |
1642 -- Variable: YaTeX-hilit-pattern-adjustment-private | |
1643 List of the list that contain the regular expression and the symbol | |
1644 of logical meaning of the string that matches the pattern. See also | |
1645 the value from `(assq 'yatex-mode hilit-patterns-alist)' and the | |
1646 value of `YaTeX-hilit-pattern-adjustment-default' (and even the | |
1647 document of hilit19.el). | |
1648 | |
1649 -- Variable: YaTeX-sectioning-level | |
1650 Alist of LaTeX's sectioning command vs its height. | |
1651 | |
1652 -- Variable: YaTeX-hierarchy-ignore-heading-regexp | |
1653 `YaTeX-display-hierarchy' searches for sectioning command first, and | |
1654 comment line secondary as a file headings. In latter case, ignore lines | |
1655 that match with regular expression of this variable. Default value of | |
419 | 1656 this variable is RCS header expressions and mode specifying line `-*- xxxx |
271 | 1657 -*'. |
1658 | |
1659 -- Variable: YaTeX-skip-default-reader | |
1660 Non-nil for this variable skips the default argument reader of | |
1661 section-type command when add-in function for it is not defined | |
1662 (`nil') | |
1663 | |
1664 -- Variable: YaTeX-create-file-prefix-g | |
1665 When typing `prefix g' on the `\include' line, open the target file | |
1666 even if the file doesn't exist (`nil') | |
1667 | |
1668 -- Variable: YaTeX-simple-messages | |
1669 Simplyfy messages of various completions (`nil') | |
1670 | |
1671 -- Variable: YaTeX-hilit-sectioning-face | |
1672 When hilit19 and yatex19 is active, YaTeX colors the sectioning | |
1673 commands. This variable specifies the foreground and background | |
1674 color of `\part' macro. The default value is `'(yellow/dodgerblue | |
1675 yellow/slateblue)'. The first element of this list is for the screen | |
1676 when `hilit-background-mode' is `'light', and the second element is | |
1677 for `'dark'. You should specify both color as `forecolor/backcolor'. | |
1678 | |
1679 -- Variable: YaTeX-hilit-sectioning-attenuation-rate | |
1680 When color mode, this variable specifies how much attenuate the color | |
1681 density of `\subparagraph' compared with that of `\chapter' (`'(15 | |
1682 40)') See also `YaTeX-hilit-sectioning-face'. | |
1683 | |
1684 -- Variable: YaTeX-use-AMS-LaTeX | |
1685 If you use AMS-LaTeX, set to `t' (`nil') | |
1686 | |
1687 -- Variable: YaTeX-use-LaTeX2e | |
1688 If you use LaTeX2e, set to `t' (`t') | |
1689 | |
1690 -- Variable: YaTeX-template-file | |
1691 File name which is automatically inserted at creation | |
1692 (`~/work/template.tex') | |
1693 | |
1694 -- Variable: YaTeX-search-file-from-top-directory | |
1695 Non-nil means to search input-files from the directory where main | |
1696 file exists (`t') | |
1697 | |
1698 -- Variable: YaTeX-use-font-lock | |
1699 Use font-lock to fontify buffer or not (`(featurep 'font-lock)' | |
1700 | |
1701 -- Variable: YaTeX-use-hilit19 | |
1702 Use hilit19 to highlight buffer or not (`(featurep 'hilit19)' | |
1703 | |
1704 -- Variable: YaTeX-use-italic-bold | |
1705 YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20 | |
1706 or later). This variable is effective only when font-lock is used. | |
1707 (`(featurep 'hilit19)' | |
1708 | |
1709 -- Variable: YaTeX-singlecmd-suffix | |
419 | 1710 Suffix which is always inserted after maketitle-type macros. |
1711 `"{}"' is recommended. | |
271 | 1712 |
1713 -- Variable: YaTeX-package-alist-private | |
1714 Alist of LaTeX2e-package name vs. lists of macros in it. Set this | |
1715 alist properly and YaTeX automatically check the declaratiion of | |
1716 `usepackage' for corresponding macro, when you input that macro with | |
1717 completion. If required `usepackage' is not found, YaTeX also | |
1718 automatically inserts `\usepackage'. Alist is as follows; | |
1719 '((PackageName1 (completionType ListOfMacro) (completionType | |
1720 ListOfMacro)) (PackageName2 (completionType ListOfMacro) | |
1721 (completionType ListOfMacro...))....) completionType is one of `env, | |
1722 section, maketitle'. Consult the value of | |
1723 `YaTeX-package-alist-default' as an example. | |
1724 | |
1725 -- Variable: YaTeX-tabular-indentation | |
1726 At indentation by `C-i' in tabular or array environment, YaTeX put | |
1727 the additional spaces to the normail indentation depth. The number | |
1728 of additional spaces is the product of YaTeX-tabular-indentation and | |
1729 the number of column position in tabular. | |
1730 | |
1731 -- Variable: YaTeX-noindent-env-regexp | |
1732 Regexp of environment names that should begin with no indentation. | |
1733 All verbatime-like environment name should match with. | |
1734 | |
419 | 1735 -- Variable: YaTeX-electric-indent-mode |
1736 Emacs 24.4 introduces automatic indentation of current and new lines. | |
1737 This might be annoying for some people. Pass this value to the | |
1738 function 'electric-indent-local-mode. If you prefer to stop | |
1739 electric-indent-mode in yatex-mode, set `-1' to this variable. | |
1740 | |
271 | 1741 -- Variable: YaTeX-ref-default-label-string |
1742 Default \\ref time string format. This format is like strftime(3) | |
1743 but allowed conversion char are as follows; %y -> Last 2 digit of | |
1744 year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H -> | |
1745 Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal | |
1746 conversion of yymmdd. %qX -> alphabetical-decimal conversion of | |
1747 HHMMSS. Beware defualt label-string should be always unique. So | |
1748 this format string should have both time part (%H+%M+%S or %qX) and | |
1749 date part (%y+(%b|%m)+%d or %qx). | |
1750 | |
1751 -- Variable: YaTeX-ref-generate-label-function | |
1752 Function to generate default label string for unnamed \\label{}s. | |
1753 The function pointed to this value should take two arguments. First | |
1754 argument is LaTeX macro's name, second is macro's argument. Here is | |
1755 an example for using this value. | |
1756 (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label) | |
1757 (defun my-yatex-generate-label (command value) | |
1758 (and (string= command "caption") | |
1759 (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t) | |
1760 (setq command (match-string 1))) | |
1761 (let ((alist '(("chapter" . "chap") | |
1762 ("section" . "sec") | |
1763 ("subsection" . "subsec") | |
1764 ("figure" . "fig") | |
1765 ("table" . "tbl")))) | |
1766 (if (setq command (cdr (assoc command alist))) | |
1767 (concat command ":" value) | |
1768 (YaTeX::ref-generate-label nil nil)))) | |
1769 | |
1770 | |
1771 | |
1772 | |
1773 File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables | |
1774 | |
1775 Sample definitions | |
1776 ------------------ | |
1777 | |
1778 For instance, to change the prefix key stroke to `ESC', and name of the | |
1779 user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB | |
1780 character, add the following `setq' to `~/.emacs'. | |
1781 | |
1782 (setq YaTeX-prefix "\e" | |
1783 YaTeX-user-completion-table "~/src/emacs/yatexrc" | |
1784 YaTeX-fill-prefix " ") | |
1785 | |
1786 | |
1787 | |
1788 File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables | |
1789 | |
1790 Hook variables | |
1791 -------------- | |
1792 | |
1793 More customizations will be done by the hook-function defined in | |
1794 hook-variable `yatex-mode-hook'. This is useful to define a shortcut key | |
1795 sequence to enter some environments other than `document' and `enumerate' | |
1796 etc. The following statement defines `[prefix] ba' to enter | |
1797 `\begin{abstract}' ... `=end{abstract}' immediately. | |
1798 | |
1799 (setq yatex-mode-hook | |
1800 '(lambda() (YaTeX-define-begend-key "ba" "abstract"))) | |
1801 | |
1802 You should use functions `YaTeX-define-key', or | |
1803 `YaTeX-define-begend-key' to define all the key sequences of yatex-mode. | |
1804 | |
1805 | |
1806 | |
1807 File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables | |
1808 | |
1809 Hook file | |
1810 --------- | |
1811 | |
1812 You can stuff all of YaTeX related expressions into a file named | |
1813 `yatexhks.el' if you have a lot of codes. YaTeX automatically load this | |
1814 file at the initialization of itself. Using `yatexhks.el' makes | |
1815 `yatex-mode-load-hook' unnecessary. | |
1816 | |
1817 | |
1818 | |
1819 File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations | |
1820 | |
1821 Add-in functions | |
1822 ================ | |
1823 | |
1824 You can easily define a function to input detailed arguments with | |
1825 completion according to LaTeX environments or commands. | |
1826 | |
1827 | |
1828 What is add-in functions? | |
1829 ------------------------- | |
1830 | |
1831 When you input `tabular' environment, don't you think "I want YaTeX to | |
1832 complete its argument toward my favorite one such as `{|c|c|c|}'..."? | |
1833 Yes, you can define the function to complete arguments for any environment | |
1834 and any LaTeX commands. | |
1835 | |
1836 | |
1837 Procedure | |
1838 --------- | |
1839 | |
1840 Here is the procedure to define add-in functions. | |
1841 1. Define the function | |
1842 2. Put the function into `yatexhks.el' | |
1843 | |
1844 * Menu: | |
1845 | |
419 | 1846 * How the add-in function works:: |
1847 * How the function is called:: | |
1848 * Useful functions for creating add-in:: | |
1849 * Contribution:: | |
271 | 1850 |
1851 | |
1852 | |
1853 File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions | |
1854 | |
1855 How the add-in function works | |
1856 ----------------------------- | |
1857 | |
1858 There are three types of add-in. | |
1859 | |
1860 1. Option add-in | |
1861 2. argument add-in | |
1862 3. enclosing add-in | |
1863 | |
1864 "Option add-in" returns the LaTeX's optional parameters such as optional | |
1865 strings after `\begin{ENV}', optional strings between a section-type | |
1866 command and its first argument, and optional strings just after type | |
1867 maketitle-type command. The following illustrates the name of add-in | |
1868 functions, where underlined strings are generated by add-in functions. | |
1869 | |
1870 \begin{table}[ht] (Function name: YaTeX:table) | |
1871 ~~~~ | |
1872 \put(100,200){} (Function name: YaTeX:put) | |
1873 ~~~~~~~~~ | |
1874 \sum_{i=0}^{n} (Function name: YaTeX:sum) | |
1875 ~~~~~~~~~~ | |
1876 | |
1877 Obviously, the function name is decided by concatenating the prefix | |
1878 `YaTeX:' and LaTeX command's name. | |
1879 | |
1880 Another add-in type is "argument add-in", which completes arguments for | |
1881 section-type commands. | |
1882 | |
1883 \newcommand{\foo}{bar} (Function name: YaTeX::newcommand) | |
1884 ~~~~ ~~~ | |
1885 | |
1886 When the section-type command is inputted, the function named by | |
1887 concatenating `YaTeX::' and section-type command, is called automatically | |
1888 with an integer argument which indicates which argument of section-type | |
1889 command is being read. Thus the add-in should determine the job referring | |
1890 the value of its argument. | |
1891 | |
1892 "enclosing add-in" is for modifying and/or checking the region that will | |
1893 be enclosed by section-type commands via `[prefix] S'. An enclosing | |
1894 add-in function will be called with two arguments, beginning of the | |
1895 enclosed region and end of the region. Suppose you want to enclose the | |
1896 existing text `(a+b)/c' by `\frac{}'. | |
1897 | |
1898 a/c | |
1899 | | | |
1900 A B | |
1901 | |
1902 You do set-mark-command at point A and then move to point B. Typing | |
1903 `[prefix] S' and input `frac' enclose the region like this; | |
1904 | |
1905 \frac{a/c} | |
1906 | |
419 | 1907 Normally, the expression `a/c' is translated to |
1908 `\frac{a}{c}'. An enclosing add-in is useful for modifying | |
1909 `/' to `}{'. | |
271 | 1910 |
1911 * Menu: | |
1912 | |
419 | 1913 * Defining option-add-in:: |
1914 * Defining argument-add-in:: | |
1915 * Defining enclosing-add-in:: | |
271 | 1916 |
1917 | |
1918 | |
1919 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 | |
1920 | |
1921 Defining `option add-in' | |
1922 ........................ | |
1923 | |
1924 If you want `{|c|c|c|}' for all `tabular' environment, | |
1925 | |
1926 (defun YaTeX:tabular () | |
1927 "{|c|c|c|}") | |
1928 | |
1929 is enough. If you want more complicated format, define as below. | |
1930 | |
1931 (defun YaTeX:tabular () | |
1932 "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}") | |
1933 | |
1934 Note that the character `\' must be described as `\\' in Emacs-Lisp. The | |
1935 next example reads the tabular format from keyboard. | |
1936 (defun YaTeX:tabular () | |
1937 (concat "{" (read-string "Rule: ") "}")) | |
1938 | |
1939 | |
1940 | |
1941 File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works | |
1942 | |
1943 Defining `argument add-in' | |
1944 .......................... | |
1945 | |
1946 This section describes how to define the add-in function for | |
1947 `\newcommand'. | |
1948 | |
1949 The first argument of `\newcommand' begins always with `\'. The second | |
1950 argument is usually so complex that we can not edit them in the | |
1951 minibuffer. Here is the created function considering this. | |
1952 | |
1953 (defun YaTeX::newcommand (n) ;n is argument position | |
1954 (cond | |
1955 ((= n 1) ;1st argument is macro name | |
419 | 1956 (read-string "Command: " "\\")) ;initial input `\' |
271 | 1957 ((= n 2) "") ;do nothing when reading arg#2 |
1958 (t nil))) | |
1959 | |
1960 Note that when the `argument add-in' function return `nil', normal | |
1961 argument reader will be called. | |
1962 | |
1963 | |
1964 | |
1965 File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works | |
1966 | |
1967 Defining `enclosing add-in' | |
1968 ........................... | |
1969 | |
1970 This section describes how to define the add-in function for text | |
1971 enclosed by `\frac{}'. | |
1972 | |
1973 When enclosing the text `5/3' by `\frac{}', you might want to replace | |
1974 `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two | |
1975 arguments, beginning of enclosed text and end of enclosed text. The | |
1976 function is expected to replace `/' with `}{'. Here is an example | |
1977 expression. | |
1978 | |
1979 (defun YaTeX::frac-region (beg end) | |
1980 (catch 'done | |
1981 (while (search-forward "/" end t) | |
1982 (goto-char (match-beginning 0)) | |
1983 (if (y-or-n-p "Replace this slash(/) with `}{'") | |
419 | 1984 (throw 'done (replace-match "}{"))) |
271 | 1985 (goto-char (match-end 0))))) |
1986 | |
1987 | |
1988 | |
1989 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 | |
1990 | |
1991 How the function is called | |
1992 -------------------------- | |
1993 | |
1994 YaTeX calls the add-in functions for specified begin-type, section-type, | |
1995 and maketitle-type command, if any. `Option add-in' functions for | |
1996 begin-type are called when `\begin{ENV}' has been inserted, functions for | |
1997 section-type are called just before input of the first argument, and | |
1998 functions for maketitle-type is called after maketitle-type command has | |
1999 been inserted. `Argument add-in' functions are called at each entry of | |
2000 arguments for section-type commands. | |
2001 | |
2002 | |
2003 | |
2004 File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions | |
2005 | |
2006 Useful functions for creating add-in | |
2007 ------------------------------------ | |
2008 | |
2009 Many add-in functions for typical LaTeX commands are defined in | |
2010 `yatexadd.el'. Those are also useful as references. Here are the short | |
2011 descriptions on useful functions, where [F] means function, [A] means | |
2012 arguments, [D] means description. | |
2013 | |
2014 `[F]' | |
2015 YaTeX:read-position | |
2016 `[A]' | |
2017 Character list which can show up in the brackets | |
2018 `[D]' | |
419 | 2019 Return the location specifier such as `[htb]'. When |
2020 nothing is entered, omit [] itself. If the possible characters | |
2021 are "htbp", call this function as | |
2022 `(YaTeX:read-position "htbp")' | |
271 | 2023 |
2024 `[F]' | |
2025 YaTeX:read-coordinates | |
2026 `[A]' | |
2027 Base prompt, X-axis prompt, Y-axis prompt (each optional) | |
2028 `[D]' | |
2029 Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for | |
419 | 2030 X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the form |
2031 of "(X,Y)". The default prompts are `Dimension', `X', | |
2032 `Y' respectively. | |
271 | 2033 |
2034 `[F]' | |
2035 YaTeX:check-completion-type | |
2036 `[A]' | |
2037 One of the symbols: 'begin, 'section, or 'maketitle | |
2038 `[D]' | |
2039 Check the current completion type is specified one and cause error | |
2040 if not. The variable `YaTeX-current-completion-type' holds the symbol | |
2041 according to the current completion type. | |
2042 | |
2043 | |
2044 | |
2045 File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions | |
2046 | |
2047 Contribution | |
2048 ------------ | |
2049 | |
2050 If you make your own pretty function and you let it be in public, please | |
2051 send me the function. I'm going to include it in the next release. | |
2052 | |
2053 | |
2054 | |
2055 File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations | |
2056 | |
2057 Add-in generator | |
2058 ================ | |
2059 | |
2060 First, don't forget to read the section of add-in functions *Note Add-in | |
2061 functions::. If you easily understand how to define them, there's no need | |
2062 to read this section. But being not familiar with Emacs-Lisp, when you | |
2063 don't have clear idea what to do, this section describes how to get YaTeX | |
2064 make add-in function. | |
2065 | |
2066 There are two methods of generation. One is for fully interactive | |
2067 generator for beginners and another requires little knowledge of | |
2068 Emacs-Lisp. | |
2069 | |
2070 | |
2071 Generator for beginners | |
2072 ----------------------- | |
2073 The former generator is called by | |
2074 `M-x YaTeX-generate' | |
2075 | |
2076 strokes. All you have to do is follow the guidances. Defying them may | |
2077 cases the disaster (I wonder what is it???). So when you make some | |
2078 mistake, it is recommendable to type `C-g' and start afresh. | |
2079 | |
2080 | |
2081 Simple generator | |
2082 ---------------- | |
2083 | |
2084 The latter generator is invoked by the next sequence. `M-x | |
2085 YaTeX-generate-simple' This generator can make both "option add-in" and | |
419 | 2086 argument add-in" (*refer the section add-in functions* *Note How the |
271 | 2087 add-in function works::), whereas `YaTeX-generate' cannot make "argument |
2088 addin". | |
2089 | |
2090 For example, assume you have the LaTeX command as follows. | |
2091 | |
419 | 2092 \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} |
2093 (A) (B) (1) (2) (3) | |
2094 (A)Optional parameter to specify the position | |
2095 One of t(top), b(bottom), l(left), r(right) | |
2096 (B)Maximum size of frame | |
2097 (1)1st argument is filename of EPS file | |
2098 (2)2nd argument indicates | |
2099 plain do nothing | |
2100 frame make frame around image | |
2101 dframe make double-frame around image | |
2102 for included EPS file. | |
2103 (3)Caption for the picture | |
271 | 2104 |
2105 Now get start with generation. Typing `M-x YaTeX-generate-simple' | |
2106 brings the prompt: | |
2107 (O)ption? (A)rgument? | |
2108 | |
2109 | |
2110 Generating "option add-in" | |
2111 .......................... | |
2112 | |
2113 Since (A), (B) above are optional argument, all we have to do to | |
2114 complete them is define the option add-in for them. Let's generate the | |
2115 function to complete (A). | |
2116 | |
2117 M-x YaTeX-generate-simple RET | |
2118 epsinput RET | |
2119 o | |
2120 | |
2121 Typing as above leads the next prompt. | |
2122 | |
2123 Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit | |
2124 | |
2125 This asks that "Which type is the completion style of 1st argument?". | |
2126 Here are the possible completion style. | |
2127 | |
2128 `String' | |
2129 read plain string | |
2130 `Complete' | |
2131 read with completion | |
2132 `File' | |
2133 read file name | |
2134 `Option' | |
2135 read optional string (if string omitted, omit [] too) | |
2136 `Position' | |
2137 read positional option (like [htbp]) | |
2138 `Coord.' | |
2139 read coordinates | |
2140 `Quit' | |
2141 quit from generating | |
2142 | |
2143 Since (A) is the optional argument to specify the location of included | |
2144 EPS file, the completion style is `Position', and the possible characters | |
2145 are t, b, l, and r. To tell these information to generator, operate as | |
2146 follows. | |
2147 | |
419 | 2148 Read type(1).... p |
271 | 2149 Acceptable characters: tblr RET |
2150 | |
2151 (B) is coordinate. So its completion style is coOrd. We want a prompt | |
2152 meaning "Maximum size" when completion. | |
2153 | |
2154 Read type(2).... o | |
2155 Prompt for coordinates: Max size RET | |
2156 | |
2157 That's all for optional argument. Select quit. | |
2158 | |
2159 Read type(3).... q | |
2160 | |
2161 Then the generated option add-in function for \epsinput will be shown in | |
2162 the next window. | |
2163 | |
2164 | |
2165 Generating "argument add-in" | |
2166 ............................ | |
2167 | |
2168 Next, create the argument add-in. The arguments for \epsinput are EPS | |
2169 file name, framing style, and caption string in sequence. | |
2170 | |
2171 M-x YaTeX-generate-simple RET | |
2172 epsinput RET | |
2173 a | |
2174 | |
2175 Above key strokes bring the prompt that asks the number of argument. | |
2176 Answer it with 3. | |
2177 | |
2178 How many arguments?: 3 RET | |
2179 | |
2180 Then the generator asks the completion style and prompt for completion. | |
2181 Answer them. `f' for FileName and prompt string. | |
2182 | |
2183 Read type(1).... f | |
2184 Prompt for argument#1 EPS file name RET | |
2185 | |
2186 The second argument is one of selected symbol. So the completion type | |
2187 is `Completion'. | |
2188 | |
2189 Read type(2).... c | |
2190 Prompt for argument#2 Include style RET | |
2191 | |
2192 Then all the candidates ready to be read. Type single RET after | |
2193 entering all. | |
2194 | |
419 | 2195 Item[1](RET to exit): plain RET |
2196 Item[2](RET to exit): frame RET | |
2197 Item[3](RET to exit): dframe RET | |
2198 Item[4](RET to exit): RET | |
271 | 2199 |
2200 The following prompt asks whether the entered string must belong to | |
2201 candidates or not. In this case, since the argument must be one of | |
2202 `plain', `frame', and `dframe', type `y'. | |
2203 | |
2204 Require match? (y or n) y | |
2205 | |
2206 The last argument is the caption string for which any completion is | |
2207 needed. | |
2208 | |
2209 Read type(3).... s | |
2210 Prompt for argument#3 Caption RET | |
2211 default: Figure of RET | |
2212 | |
2213 Finally we'll get the argument add-in in the next window. | |
2214 | |
2215 | |
2216 Contribution | |
2217 ------------ | |
2218 | |
2219 If you get your own pretty function and you let it be in public, please | |
2220 steel yourself in the happy atmosphere and do not send me the function. I | |
2221 do know it is not fine because it is generated by yatexgen:-p. | |
2222 | |
2223 | |
2224 | |
2225 File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top | |
2226 | |
2227 Etcetera | |
2228 ******** | |
2229 | |
2230 The standard completion tables provided in `yatex.el' contain a few | |
2231 LaTeX commands I frequently use. This is to lessen the key strokes to | |
2232 complete entire word, because too many candidates rarely used often cause | |
2233 too many hits. Therefore always try to use completion in order to enrich | |
2234 your dictionary, and you will also find `Wild Bird' growing suitable for | |
2235 your LaTeX style. | |
2236 | |
2237 The package name `Wild Bird' is the English translation of Japanese | |
2238 title `Yachou', which is a trick on words of Japanese. | |
2239 | |
2240 | |
2241 | |
2242 File: yatexe, Node: Copying, Prev: Etcetera, Up: Top | |
2243 | |
2244 Copying | |
2245 ******* | |
2246 | |
2247 This program is distributed as a free software. You can | |
2248 use/copy/modify/redistribute this software freely but with NO warranty to | |
2249 anything as a result of using this software. Adopting code from this | |
2250 program is also free. But I would not do contract act. | |
2251 | |
2252 Any reports and suggestions are welcome as long as I feel interests in | |
2253 this software. My possible e-mail address is `yuuji@yatex.org'. (as of | |
2254 Jan.2004) And there is mailing list for YaTeX. Although the common | |
2255 language is Japanese, questions in English will be welcome. To join the | |
2256 ML, send the mail whose subject is `append' to the address | |
2257 `yatex@yatex.org. If you have some question, please ask to | |
2258 `yatex-admin@yatex.org'. | |
2259 | |
2260 The specification of this software will be surely modified (depending on | |
2261 my feelings) without notice :-p. | |
2262 | |
2263 | |
2264 HIROSE Yuuji | |
2265 | |
2266 Tag table: | |
419 | 2267 Node: Top256 |
2268 Node: What is YaTeX?1583 | |
2269 Node: Main features1956 | |
2270 Node: Installation3500 | |
2271 Node: Typesetting4277 | |
2272 Node: Calling typesetter5389 | |
2273 Node: Calling previewer7916 | |
2274 Node: Printing out8277 | |
2275 Node: %#notation8569 | |
2276 Node: Changing typesetter8940 | |
2277 Node: Splitting input files9304 | |
2278 Node: Static region for typesetting10729 | |
2279 Node: Lpr format11858 | |
2280 Node: Controlling which command to invoke12888 | |
2281 Node: Editing %# notation13845 | |
2282 Node: Completion14389 | |
2283 Node: Begin-type completion14904 | |
2284 Node: Section-type completion17758 | |
2285 Node: view-sectioning20179 | |
2286 Node: Large-type completion21759 | |
2287 Node: Maketitle-type completion22412 | |
2288 Node: Arbitrary completion22964 | |
2289 Node: End completion23354 | |
2290 Node: Accent completion23823 | |
2291 Node: Image completion24440 | |
2292 Node: Greek letters completion26695 | |
2293 Node: Inserting parentheses27451 | |
2294 Node: Local dictionaries27858 | |
2295 Node: Commenting out28795 | |
2296 Node: Cursor jump30254 | |
2297 Node: Jump to corresponding object30545 | |
2298 Node: Invoking image processor31945 | |
2299 Node: Jump to main file33288 | |
2300 Node: Jumping around the environment33654 | |
2301 Node: Jumping to last completion position34072 | |
2302 Node: Changing and Deleting34581 | |
2303 Node: Changing LaTeX commands34962 | |
2304 Node: Killing LaTeX commands36139 | |
2305 Node: Filling37324 | |
2306 Node: Updation of includeonly39179 | |
2307 Node: What column39976 | |
2308 Node: Intelligent newline41061 | |
2309 Node: Usepackage checker42714 | |
2310 Node: Online help43305 | |
2311 Node: Browsing file hierarchy44980 | |
2312 Node: Cooperation with other packages46717 | |
2313 Node: Customizations47422 | |
2314 Node: Lisp variables47718 | |
2315 Node: All customizable variables48677 | |
2316 Node: Sample definitions60640 | |
2317 Node: Hook variables61153 | |
2318 Node: Hook file61857 | |
2319 Node: Add-in functions62196 | |
2320 Node: How the add-in function works63034 | |
2321 Node: Defining option-add-in65220 | |
2322 Node: Defining argument-add-in65942 | |
2323 Node: Defining enclosing-add-in66823 | |
2324 Node: How the function is called67679 | |
2325 Node: Useful functions for creating add-in68355 | |
2326 Node: Contribution69765 | |
2327 Node: Add-in generator70039 | |
2328 Node: Etcetera75499 | |
2329 Node: Copying76104 | |
271 | 2330 |
2331 End tag table |