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