view docs/qanda.eng @ 566:2ef9f21dd13b

Add note on YaTeX::usepackage-alist-default
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 24 Jan 2019 15:19:32 +0900
parents 04ee01ddb7ab
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, write this:
37 (setq Info-default-directory-list
39 Info-default-directory-list))
41 to your ~/.emacs. Now your personal files will be added to the
42 menu when you invoke info.
44 *Emacs can't find the help file.
46 If you don't have the privilege to put them in a public
47 location, copy it to your home directory and set YaTeX-help-file
48 to that file name.
51 [Operations]
52 ============
53 *I accidentally learned in a wrong LaTeX macro in my dictionary.
55 There should be a line with the wrong command in the .yatexrc
56 file in your home or current directory. Erase or fix that line,
57 and save the results with C-x C-s, then kill buffer with C-x k.
58 Once you make sure the current buffer is your LaTeX source, type
59 M-x YaTeX-reload-dictionary.
61 *I can't comment out the region.
63 Probably the point is on a line withe \begin{} or \end{}. Go up
64 or down a line and do C-c >.
66 *I was asked for a parent file when typesetting, and answered the wrong file.
68 Re-read the child file with C-x C-v RET or re-type the parent
69 file with C-u C-c ^.
71 *The typeset buffer is not shown when I get a typeset buffer on Demacs.
73 This happens on Demacs 1.2.0, when the child process returns an
74 error level of 1 or more. If you are calling jlatex from a
75 batch file, call a dummy command that always returns errorlevel
76 0 at the end.
78 *How can I enter "\underline{\makebox[4em][l]{x y}{\tt z}}" more easily?
80 Recursive completion can be used for inputting arguments in the
81 mini-buffer of a section type completion. Following is an
82 example showing the command in question.
85 C-c s und SPC RET
86 \underline{???}: C-c s makeb SPC RET
87 Width: 4em RET
88 makebox position (`lr'): - l RET
89 \makebox{???}: x y RET
90 \underline{???}: \makebox[4em][l]{x y} C-c l tt RET
91 \underline{???}: \makebox[4em][l]{x y}{\tt } z RET
93 *How can I kill \footnote{} from \footnote{HOGE}
95 Put the point to \footnote and do C-c k. This will kill the
96 \footnote{}. If you want to kill the whole thing including
97 HOGE, do C-u C-c k.
99 *I want to make HONYARA into a footnote.
101 Mark HONYARA and do C-c S footnote RET. (S in uppercase)
103 *I want to make the verbatim environment I have now into verbatim*.
105 Do C-c c on the line with \begin{verbatim} or \end{verbatim}.
107 *I want to enclose a region with \verb.
109 \verb isn't a maketitle-type, so there aren't any quick commands.
110 But you can use C-c $ to do the same thing.
111 v v
112 WHAT YOU NEED to make \verb
113 \verbWHAT YOU NEED to make \verb (insert \verb)
114 ^(C-@) (mark W)
115 \verbWHAT YOU NEED to make \verb
116 ^C-c $ (move point to end enclose with $)
117 \verb$WHAT YOU NEED$ to make \verb (done!)
119 *I want to have commands defined on a upper level file to be read in
120 when doing a typeset-region on a child file.
122 When you are editing child files broken into sections and some
123 macros to be used are defined in upper level files, you'll need
124 them to do typeset-region. The macros needed will be copied to
125 the temporary file if you add %#REQUIRE to the end of the
126 macro's definition.
128 Say you had a grand-child file
129 +-- main.tex --+ +---- sub.tex ----+ +-- subsub.tex --+
130 | : | |%#jlatex main | |%#jlatex main |
131 |\include{sub} | |\include{macros} | |..... |
132 | : |<-| : |<-|%#BEGIN |
133 | : | | : | |TEXT YOU WANT |
134 | : | +-----------------+ |TYPESET IS |
135 +--------------+ ^ |HERE |
136 +-- macros.tex ---+ |%#END |
137 |\def\foo{bar} | |: |
138 |\def\hoge{hero} | +----------------+
139 +-----------------+
141 In this case you change the \include{macros} line in sub.tex to
143 \include{macros} %#REQUIRE
145 and add to subsub.tex
147 %#REQUIRE \include{macros}
149 If %#REQUIRE is at the top of the line, the following will be
150 copied to the temporary file. So, macros.tex will be included
151 only once whether you are typesetting all the files, or doing a
152 typeset-region on sub.tex or subsub.tex.
154 *I want to reuse ARGUMENTS I used in the last \foo{ARGUMENTS}
156 Use the gmhist package. YaTeX works fine with gmhist. When you
157 are asked \foo{???}: in the mini-buffer, hitting M-p (ESC p)
158 will get you a history of what you have inputted in reverse.
159 M-n will go forward in the history. This input history can be
160 used for begin-type completion, section-type completion, evoking
161 the previewer, and print out commands.
163 gmhist can be found at many Emacs-Lisp archive sights. For
164 example, ftp.ae.keio.ac.jp:pub/emacs-lisp/util/gmhist.tar.gz
166 Note that Emacs-19(Mule2) doesn't need gmhist for the feature of
167 minibuffer history.
169 *ref<->label jump doesn't work.
171 C-c g will start a forward search of ref/label. C-u C-c g will
172 start a backward search. If you want to continue searching for
173 \ref, hit C-s (C-r) twice and use the repeated search feature of
174 the incremental search. If the point to jump is in another
175 file, that file must be already opened. YaTeX-display-hierarchy
176 (C-c d) can be used to open all files at once.
178 *I get a % at the end of the line when I do a fill-paragraph or auto-fill.
180 NTT-jTeX will add an unnecessary space in the print out image if
181 the japanese paragraph is written with an indent. To avoid
182 this, you need to put a % at the end of the line. YaTeX will
183 automatically put a % so you can input indented text for
184 NTT-jTeX. But there may be a bug in the routine so please
185 report if you find any %s otherwise than at the end of a line.
187 *Isn't the indentation too deep in itemize environments?
189 Think so too? An alias Mr. K thought this was better and he
190 feels an ultimate ecstacy with hitting the TAB to indent a line.
191 Wasn't my idea! (still have a bit of a grudge) If you also
192 think it's too deep, hit TAB at the end of the line with
193 \begin{itemize} within the environment. Now it's too shallow?
194 Umm... time for me to take a break.
196 *Is it possible to include personal template file template.tex handily?
198 Put your template.tex into your ~/work directory where YaTeX
199 seeks by default. If you change the location to another place,
200 set the lisp-variable as below.
201 (setq YaTeX-template-file "~/other/location/template.tex")
203 *It is bothering for me to determine I should call bibtex or latex...
205 Since version 1.76, YaTeX automatically call bibtex/latex twice
206 if needed. In most case, you don't have to repeat to call
207 typesetter or bibtex. If you use `latexmk' described below,
208 YaTeX's auto rerun functionality should be disabled by setting
209 like this:
210 (setq YaTeX-typeset-auto-rerun nil)
212 The `latexmk' perl script, which is a TeX specific tool to
213 automate generation of LaTeX document. You can find `latexmk'
214 some CTAN ftp directory.
215 (eg. http://www.ctan.org/pkg/latexmk/)
217 *Can I inhibit auto-filling against very long <a href="..."> line?
219 If you use Emacs-19 or later, Yes. The variable
220 auto-fill-inhibit-regexp controls the filling behaviour. To set
221 this, use yatex-mode-hook as below.
223 (add-hook 'yahtml-mode-hook
224 '(lambda ()
225 (setq auto-fill-inhibit-regexp
226 "^[ ]*\\(<a href\\|<img src=\\)")))
228 *Filling a paragraph doesn't work as I expected.
230 It is because the indentation depth is different from default
231 depth. Please keep turning on auto-fill to make filling
232 function work well. If you bring some paragraph which has
233 different indentation from other part of document, you have to
234 re-indent it with the default indentation by typing TAB on each
235 line. If the paragraph is large, try the next operation;
237 (1)Type C-x . on the beginning of line
238 (2)Mark paragraph to be re-indented
239 (3)Type M-C-\
241 then fill the paragraph. If you want fill that paragraph with
242 current indentation depth, move the cursor on the first
243 appearance of non-white-space character on the line before
244 filling.
246 [About Emacs-19/Mule2]
247 ======================
248 *Equations are too dark to read when I use hilit19.
250 The default coloring of hilit19.el is too dark. Try putting the
251 next code in ~/.emacs or yatexhks.el.
253 (if (and (featurep 'hilit19) (eq hilit-background-mode 'dark))
254 (hilit-translate
255 string 'mediumspringgreen
256 formula 'khaki
257 label 'yellow-underlined))
259 *Can't I use font-lock?
261 Since v1.69, YES on XEmacs-21, Emacs-21, Emacs-20.7.
263 Before starting YaTeX, load font-lock to make it work. However,
264 YaTeX makes tricky patterns to fontifying logical area
265 independent from `line', changing of font-lock's specification
266 in the future will possibly disable YaTeX from fontifying. If
267 you are thinking of graduating from hilit19, it might be better
268 to keep old setting about it...
270 *Is there any way of displaying `\it' strings in the italic font?
272 First, you should find the available italic font on your
273 system. In, *scratch* buffer,
274 (set-face-font 'italic "-*-*-medium-i-*--*-*-*-*-*-*-*-*")
275 or
276 (set-face-font 'italic "-*-*-medium-o-*--*-*-*-*-*-*-*-*")
277 and C-j (It takes very very long time!!).
278 If you get `No matches found', no way. (;_;)/~
279 If you get some font name,
280 "-adobe-courier-medium-i-normal--12-120-75-75-m-0-iso8859-1"
281 for example, write
282 (set-face-font 'italic
283 "-adobe-courier-medium-i-normal--12-120-75-75-m-0-iso8859-1")
284 in your `yatexhks.el'.
286 [Customization]
287 ===============
288 *I don't use C-c b i much, so it would be better if I can start
289 completion after hitting C-c b.
291 Put (setq YaTeX-no-begend-shortcut t) in your ~/.emacs.
293 *An open parenthesis always get entered in pairs.
295 This should be better, once you get used to it. If you still
296 don't like it, turn on modify-mode using C-c w m. Setting
297 YaTeX-close-paren-always to nil will give this feature from the
298 start.
300 *Funny things happen when I hit ;.
302 YaTeX think you are in math mode and evokes math-mode-image
303 completion. If you are writing a equation that TeX will not
304 give an error and YaTeX mistakes what mode you are in, report it
305 back to the author. For mistaken judgements or if you want to
306 enter a literal ;, hit ; twice. C-u ; to use ; as a
307 image-completion prefix.
309 *I want YaTeX to enter the option arguments for a newenvironment.
311 Read yatexadd.doc. If that's not enough, read yatexgen.doc and
312 try M-x YaTeX-generate.
314 *I first defined \foo as a macro taking 3 arguments. Later I changed it
315 to take 4 arguments, but the section-type completion will ask me for
316 only 3 arguments.
318 Use C-u 4 C-c s and tell it will take 4 arguments. You can
319 change the number of arguments anytime you want.
321 *I made a argument-type addin function, but can't do completion after
322 the first two arguments.
324 If you made a addin function like \foo{x}{y}{z} that takes 3
325 arguments, then you need to learn in the dictionary that \foo
326 will take 3 arguments. This can be done by C-u 3 C-c s foo.
327 You only need to do it once.
329 *My addin functions are overwritten by yatexadd.
331 Formally, all private functions were written in your own
332 yatexadd.el. Now, all private functions are put in yatexhks.el.
333 yatexhks.el will be read in at the end of YaTeX's
334 initialization, so you can overwrite definitions in yatexadd.el.
336 *Can I make intelligent newline work for my `mylist' environment?
338 Yes. See the section `Intelligent newline' in the info manual.
339 But if you want the same as the intelligent newline for itemize
340 environment which inserts simply `\item', the following code is
341 efficient.
343 (fset 'YaTeX-intelligent-newline-mylist
344 'YaTeX-intelligent-newline-itemize)
346 [ETC]
347 =====
348 *Mailing lists?
350 A question, so an answer. The mailing list for YaTeX (Wild Bird)
351 and it's implementation to Vz Editor; LaiTeX (Thunder Bird, by
352 KATSURAGAWA Naoki), implementation to Wz Editor; HackTeX (Swan,
353 by TAKENAKA Hiroshi), implementation to Hidemaru Editor; HiTeX
354 (Flying Bird, by YASUDA Haruyuki), implementation to xyzzy;
355 KaTeX (by MAEDA Manabu) is "fj Wild Bird Society".
356 Send a mail like
358 To: yatex@yatex.org
359 Subject: subscribe
360 -----
361 Hi!
362 My name is yuuji.
363 See any birds fly by?
365 and you're in. Once you're in, you'll get a reply with lists of
366 commands used in the mailing list. Join along and help adding
367 new feathers to Wild Bird. BTW, if you haven't guessed it yet,
368 yes, this mailing list is in Japanese. But give us a try
369 anyway. You're always welcome.
371 *How to get the up-to-date information on YaTeX?
373 If you can access WWW, try to see;
374 http://www.yatex.org/
375 And if you trace the link of `yatex-current', you can get the
376 really latest version of YaTeX. Since it collects the elisps in
377 the author's source directory, what you'll get may contain some
378 errors. The author cannot respond to your query about
379 yatex-current.
381 If you want to catch up to latest version, using yatex-current
382 is inefficient. Use yatex's mercurial repository instead.
384 hg clone https://www.yatex.org:/hgrepos/yatex
385 cd yatex
386 hg up -C dev
388 Then, getting all updates by `hg pull'.
390 hg pull -uv
392 Okay to set load-path of yatex to local copy of repository.
393 Two branch names are mostly in use. The `default' branch is for
394 release versions, the `dev' branch is for development.
397 *Help, help HELP!!
399 Ways of getting answers in fastest order.
401 *Look for someone near you who knows what's he/she's doing.
402 *Post a question to the mailing list.
403 *Send mail to yuuji@yatex.org
405 take a pick.
407 *Picking a question in this file with C-u C-x $ and hitting C-x $ takes
408 me to a weird world.
410 You too? Try marking the question before C-x $ and to C-x C-x
411 to take you back to it. (Mule2 doesn't seem to have the same
412 problem)
415 Local Variables:
416 mode: indented-text
417 fill-column: 72
418 fill-prefix: " "
419 End: