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