yatex

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