yatex

view docs/qanda.eng @ 84:73cba5ddd111

Converted from RCS of yatex
author yuuji
date Sun, 27 Sep 2009 13:04:14 +0000
parents 0aaebd07dad0
children 39548ee6e881
line source
1 %%
2 %% Q and A on YaTeX
3 %%
4 %% C-u C-x $ shows only questions. C-x $ shows all.
5 %%
6 (New Item
7 *It is bothering for me to determine I should call bibtex or latex...
8 *Filling a paragraph doesn't work as I expected.
10 [Installation]
11 ==============
12 *Installing the manual
14 Copy yatexe to the info directory where your Emacs is installed,
15 and add the next line to the dir file of the same directory.
17 * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs. (English).
19 (After that, M-x info [RET] m yatex [RET] will give you Wild
20 Bird's manual. Hitting ? will show how to use info)
22 *I'm a Meadow(Emacs on Win32) user. I don't have `make' utility
24 Make program is needed only for byte-compiling. So if you do
25 not care the subtle speed difference, you don't have to
26 byte-compile. You don't have to look for `make' utility. The
27 simplest way to install yatex without `make'.
29 1 Extract this yatex*tar.gz to your Meadow's site-lisp dir.
30 2 Add the yatex installed path to your load-path according to
31 `install' file in this package.
33 *I ain't got the privilege to write in the Info directory...
35 Get yourself made root. If you can't, have them install Mule2
36 and add
38 (setq Info-default-directory-list
39 (cons "YOUR INFO DIRECTORY"
40 Info-default-directory-list))
42 to your ~/.emacs. Now your personal files will be added to the
43 menu when you invoke info. By the way, Mule1 will not release
44 memories, so processes will pile up and be heavier on the system
45 compared to Mule2. Nemacs has already become obsolete by the
46 developers, so no further comments for usage of Nemacs. Get
47 yourself Mule2 with flying colors :-)
49 *Emacs can't find the help file.
51 The help file is set to be placed in $EMACS/etc/ for Nemacs,
52 Mule1 and $EMACS/site-lisp/ for Mule2. If you don't have the
53 privilege to put them in a public location, copy it to your home
54 directory and set YaTeX-help-file to that file name.
56 *I can't read info on Nemacs
58 The info file was formatted on Mule, so it can't be read
59 correctly on Nemacs (or Demacs based on Nemacs) because the
60 internal Japanese processing is different. Read it on Mule.
61 Use the Emacs-Lisp package in texinfo-3.1.tar.gz to format the
62 Texinfo file.
65 [Operations]
66 ============
67 *I accidentally learned in a wrong LaTeX command.
69 There should be a line with the wrong command in the .yatexrc
70 file in your home or current directory. Erase or fix that line,
71 and save the results with C-x C-s, then kill buffer with C-x k.
72 Once you make sure the current buffer is your LaTeX source, type
73 M-x YaTeX-reload-dictionary.
75 *I can't comment out the region.
77 Probably the point is on a line withe \begin{} or \end{}. Go up
78 or down a line and do C-c >.
80 *I was asked for a parent file when typesetting, and answered the wrong file.
82 Re-read the child file with C-x C-v RET or re-type the parent
83 file with C-u C-c ^.
85 *The typeset buffer is not shown when I get a typeset buffer on Demacs.
87 This happens on Demacs 1.2.0, when the child process returns an
88 error level of 1 or more. If you are calling jlatex from a
89 batch file, call a dummy command that always returns errorlevel
90 0 at the end.
92 *How can I enter "\underline{\makebox[4em][l]{x y}{\tt z}}" more easily?
94 Recursive completion can be used for inputting arguments in the
95 mini-buffer of a section type completion. Following is an
96 example showing the command in question.
98 PROMPT KEYs ENTERED
99 C-c s und SPC RET
100 \underline{???}: C-c s makeb SPC RET
101 Width: 4em RET
102 makebox position (`lr'): - l RET
103 \makebox{???}: x y RET
104 \underline{???}: \makebox[4em][l]{x y} C-c l tt RET
105 \underline{???}: \makebox[4em][l]{x y}{\tt } z RET
107 *How can I kill \footnote{} from \footnote{HOGE}
109 Put the point to \footnote and do C-c k. This will kill the
110 \footnote{}. If you want to kill the whole thing including
111 HOGE, do C-u C-c k.
113 *I want to make HONYARA into a footnote.
115 Mark HONYARA and do C-c S footnote RET. (S in uppercase)
117 *I want to make the verbatim environment I have now into verbatim*.
119 Do C-c c on the line with \begin{verbatim} or \end{verbatim}.
121 *I want to enclose a region with \verb.
123 \verb isn't a maketitle-type, so there aren't any quick commands.
124 But you can use C-c $ to do the same thing.
125 v v
126 WHAT YOU NEED to make \verb
127 \verbWHAT YOU NEED to make \verb (insert \verb)
128 ^(C-@) (mark W)
129 \verbWHAT YOU NEED to make \verb
130 ^C-c $ (move point to end enclose with $)
131 \verb$WHAT YOU NEED$ to make \verb (done!)
133 *I want to have commands defined on a upper level file to be read in
134 when doing a typeset-region on a child file.
136 When you are editing child files broken into sections and some
137 macros to be used are defined in upper level files, you'll need
138 them to do typeset-region. The macros needed will be copied to
139 the temporary file if you add %#REQUIRE to the end of the
140 macro's definition.
142 Say you had a grand-child file
143 +-- main.tex --+ +---- sub.tex ----+ +-- subsub.tex --+
144 | : | |%#jlatex main | |%#jlatex main |
145 |\include{sub} | |\include{macros} | |..... |
146 | : |<-| : |<-|%#BEGIN |
147 | : | | : | |TEXT YOU WANT |
148 | : | +-----------------+ |TYPESET IS |
149 +--------------+ ^ |HERE |
150 +-- macros.tex ---+ |%#END |
151 |\def\foo{bar} | |: |
152 |\def\hoge{hero} | +----------------+
153 +-----------------+
155 In this case you change the \include{macros} line in sub.tex to
157 \include{macros} %#REQUIRE
159 and add to subsub.tex
161 %#REQUIRE \include{macros}
163 If %#REQUIRE is at the top of the line, the following will be
164 copied to the temporary file. So, macros.tex will be included
165 only once whether you are typesetting all the files, or doing a
166 typeset-region on sub.tex or subsub.tex.
168 *I want to reuse ARGUMENTS I used in the last \foo{ARGUMENTS}
170 Use the gmhist package. YaTeX works fine with gmhist. When you
171 are asked \foo{???}: in the mini-buffer, hitting M-p (ESC p)
172 will get you a history of what you have inputted in reverse.
173 M-n will go forward in the history. This input history can be
174 used for begin-type completion, section-type completion, evoking
175 the previewer, and print out commands.
177 gmhist can be found at many Emacs-Lisp archive sights. For
178 example, ftp.ae.keio.ac.jp:pub/emacs-lisp/util/gmhist.tar.gz
180 Note that Emacs-19(Mule2) doesn't need gmhist for the feature of
181 minibuffer history.
183 *ref<->label jump doesn't work.
185 C-c g will start a forward search of ref/label. C-u C-c g will
186 start a backward search. If you want to continue searching for
187 \ref, hit C-s (C-r) twice and use the repeated search feature of
188 the incremental search. If the point to jump is in another
189 file, that file must be already opened. YaTeX-display-hierarchy
190 (C-c d) can be used to open all files at once.
192 *I get a % at the end of the line when I do a fill-paragraph or auto-fill.
194 NTT-jTeX will add an unnecessary space in the print out image if
195 the japanese paragraph is written with an indent. To avoid
196 this, you need to put a % at the end of the line. YaTeX will
197 automatically put a % so you can input indented text for
198 NTT-jTeX. But there may be a bug in the routine so please
199 report if you find any %s otherwise than at the end of a line.
201 *Isn't the indentation too deep in itemize environments?
203 Think so too? An alias Mr. K thought this was better and he
204 feels an ultimate ecstacy with hitting the TAB to indent a line.
205 Wasn't my idea! (still have a bit of a grudge) If you also
206 think it's too deep, hit TAB at the end of the line with
207 \begin{itemize} within the environment. Now it's too shallow?
208 Umm... time for me to take a break.
210 *Is it possible to include personal template file template.tex handily?
212 Try Emacs-19's standard package `autoinsert.el' please. Or its
213 upper compatible package auto-insert-tkld might also be good.
214 You can get auto-insert-tkld via anonymous ftp
215 ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/
216 ftp://archive.cis.ohio-state.edu/pub/gnu/elisp-archive/
218 *It is bothering for me to determine I should call bibtex or latex...
220 Why don't you try `latexmk' perl script, which is a TeX specific
221 tool as `make'? It detects the dependency among the TeX-related
222 files such as .tex, .bib, and so on, and will execute suitable
223 commands in a suitable sequence. You can find `latexmk' script
224 in a directory of supports/latexmk in some CTAN ftp directory.
226 *Can I inhibit auto-filling against very long <a href="..."> line?
228 If you use Emacs-19 or later, Yes. The variable
229 auto-fill-inhibit-regexp controls the filling behaviour. To set
230 this, use yatex-mode-hook as below.
232 (add-hook 'yahtml-mode-hook
233 '(lambda ()
234 (setq auto-fill-inhibit-regexp
235 "^[ ]*\\(<a href\\|<img src=\\)")))
237 *Filling a paragraph doesn't work as I expected.
239 It is because the indentation depth is different from default
240 depth. Please keep turning on auto-fill to make filling
241 function work well. If you bring some paragraph which has
242 different indentation from other part of document, you have to
243 re-indent it with the default indentation by typing TAB on each
244 line. If the paragraph is large, try the next operation;
246 (1)Type C-x . on the beginning of line
247 (2)Mark paragraph to be re-indented
248 (3)Type M-C-\
250 then fill the paragraph. If you want fill that paragraph with
251 current indentation depth, move the cursor on the first
252 appearance of non-white-space character on the line before
253 filling.
255 [About Emacs-19/Mule2]
256 ======================
257 *Equations are too dark to read when I use hilit19.
259 The default coloring of hilit19.el is too dark. Try putting the
260 next code in ~/.emacs or yatexhks.el.
262 (if (and (featurep 'hilit19) (eq hilit-background-mode 'dark))
263 (hilit-translate
264 string 'mediumspringgreen
265 formula 'khaki
266 label 'yellow-underlined))
268 *Can't I use font-lock?
270 Since v1.69, YES on XEmacs-21, Emacs-21, Emacs-20.7.
272 Before starting YaTeX, load font-lock to make it work. However,
273 YaTeX makes tricky patterns to fontifying logical area
274 independent from `line', changing of font-lock's specification
275 in the future will possibly disable YaTeX from fontifying. If
276 you are thinking of graduating from hilit19, it might be better
277 to keep old setting about it...
279 *It's sooo slow when I click YaTeX on the menu bar.
281 I don't know why. Probably a problem with Emacs-19. You'll
282 just have to bear with it. It won't be so slow the second time.
283 Anyway, you probably won't use the menu at all, do you?
285 *Is there any way of displaying `\it' strings in the italic font?
287 First, you should find the available italic font on your
288 system. In, *scratch* buffer,
289 (set-face-font 'italic "-*-*-medium-i-*--*-*-*-*-*-*-*-*")
290 or
291 (set-face-font 'italic "-*-*-medium-o-*--*-*-*-*-*-*-*-*")
292 and C-j (It takes very very long time!!).
293 If you get `No matches found', no way. (;_;)/~
294 If you get some font name,
295 "-adobe-courier-medium-i-normal--12-120-75-75-m-0-iso8859-1"
296 for example, write
297 (set-face-font 'italic
298 "-adobe-courier-medium-i-normal--12-120-75-75-m-0-iso8859-1")
299 in your `yatexhks.el'.
301 [Customization]
302 ===============
303 *I don't use C-c b i much, so it would be better if I can start
304 completion after hitting C-c b.
306 Put (setq YaTeX-no-begend-shortcut t) in your ~/.emacs.
308 *An open parenthesis always get entered in pairs.
310 This should be better, once you get used to it. If you still
311 don't like it, turn on modify-mode using C-c w m. Setting
312 YaTeX-close-paren-always to nil will give this feature from the
313 start.
315 *Funny things happen when I hit ;.
317 YaTeX think you are in math mode and evokes math-mode-image
318 completion. If you are writing a equation that TeX will not
319 give an error and YaTeX mistakes what mode you are in, report it
320 back to the author. For mistaken judgements or if you want to
321 enter a literal ;, hit ; twice. C-u ; to use ; as a
322 image-completion prefix.
324 *I want YaTeX to enter the option arguments for a newenvironment.
326 Read yatexadd.doc. If that's not enough, read yatexgen.doc and
327 try M-x YaTeX-generate.
329 *I first defined \foo as a macro taking 3 arguments. Later I changed it
330 to take 4 arguments, but the section-type completion will ask me for
331 only 3 arguments.
333 Use C-u 4 C-c s and tell it will take 4 arguments. You can
334 change the number of arguments anytime you want.
336 *I made a argument-type addin function, but can't do completion after
337 the first two arguments.
339 If you made a addin function like \foo{x}{y}{z} that takes 3
340 arguments, then you need to learn in the dictionary that \foo
341 will take 3 arguments. This can be done by C-u 3 C-c s foo.
342 You only need to do it once.
344 *My addin functions are overwritten by yatexadd.
346 Formally, all private functions were written in your own
347 yatexadd.el. Now, all private functions are put in yatexhks.el.
348 yatexhks.el will be read in at the end of YaTeX's
349 initialization, so you can overwrite definitions in yatexadd.el.
351 *Can I make intelligent newline work for my `mylist' environment?
353 Yes. See the section `Intelligent newline' in the info manual.
354 But if you want the same as the intelligent newline for itemize
355 environment which inserts simply `\item', the following code is
356 efficient.
358 (fset 'YaTeX-intelligent-newline-mylist
359 'YaTeX-intelligent-newline-itemize)
361 [ETC]
362 =====
363 *Mailing lists?
365 A question, so an answer. The mailing list for YaTeX (Wild Bird)
366 and it's implementation to Vz Editor; LaiTeX (Thunder Bird, by
367 KATSURAGAWA Naoki), implementation to Wz Editor; HackTeX (Swan,
368 by TAKENAKA Hiroshi), implementation to Hidemaru Editor; HiTeX
369 (Flying Bird, by YASUDA Haruyuki), implementation to xyzzy;
370 KaTeX (by MAEDA Manabu) is "fj Wild Bird Society".
371 Send a mail like
373 To: yatex@yatex.org
374 Subject: subscribe
375 -----
376 Hi!
377 My name is yuuji.
378 See any birds fly by?
380 and you're in. Once you're in, you'll get a reply with lists of
381 commands used in the mailing list. Join along and help adding
382 new feathers to Wild Bird. BTW, if you haven't guessed it yet,
383 yes, this mailing list is in Japanese. But give us a try
384 anyway. You're always welcome.
386 *How to get the up-to-date information on YaTeX?
388 If you can access WWW, try to see;
389 http://www.yatex.org/
390 And if you trace the link of `yatex-current', you can get the
391 really latest version of YaTeX. Since it collects the elisps in
392 the author's source directory, what you'll get may contain some
393 errors. The author cannot respond to your query about
394 yatex-current.
396 *Help, help HELP!!
398 Ways of getting answers in fastest order.
400 *Look for someone near you who knows what's he/she's doing.
401 *Post a question to the mailing list.
402 *Send mail to yuuji@yatex.org
404 take a pick.
406 *Picking a question in this file with C-u C-x $ and hitting C-x $ takes
407 me to a weird world.
409 You too? Try marking the question before C-x $ and to C-x C-x
410 to take you back to it. (Mule2 doesn't seem to have the same
411 problem)
414 Local Variables:
415 mode: indented-text
416 fill-column: 72
417 fill-prefix: " "
418 End: