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