yuuji@54: %% yuuji@54: %% Q and A on YaTeX yuuji@54: %% yuuji@56: %% C-u C-x $ shows only questions. C-x $ shows all. yuuji@54: %% yuuji@60: (New Item yuuji@60: *It is bothering for me to determine I should call bibtex or latex... yuuji@60: *Filling a paragraph doesn't work as I expected. yuuji@54: yuuji@54: [Installation] yuuji@56: ============== yuuji@54: *Installing the manual yuuji@56: yuuji@56: Copy yatexe to the info directory where your Emacs is installed, yuuji@56: and add the next line to the dir file of the same directory. yuuji@54: yuuji@72: * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs. (English). yuuji@54: yuuji@56: (After that, M-x info [RET] m yatex [RET] will give you Wild yuuji@56: Bird's manual. Hitting ? will show how to use info) yuuji@54: yuuji@70: *I'm a Meadow(Emacs on Win32) user. I don't have `make' utility yuuji@70: yuuji@70: Make program is needed only for byte-compiling. So if you do yuuji@70: not care the subtle speed difference, you don't have to yuuji@70: byte-compile. You don't have to look for `make' utility. The yuuji@70: simplest way to install yatex without `make'. yuuji@70: yuuji@70: 1 Extract this yatex*tar.gz to your Meadow's site-lisp dir. yuuji@70: 2 Add the yatex installed path to your load-path according to yuuji@70: `install' file in this package. yuuji@70: yuuji@54: *I ain't got the privilege to write in the Info directory... yuuji@56: yuuji@387: Get yourself made root. If you can't, write this: yuuji@54: yuuji@54: (setq Info-default-directory-list yuuji@54: (cons "YOUR INFO DIRECTORY" yuuji@54: Info-default-directory-list)) yuuji@54: yuuji@56: to your ~/.emacs. Now your personal files will be added to the yuuji@387: menu when you invoke info. yuuji@54: yuuji@54: *Emacs can't find the help file. yuuji@54: yuuji@387: If you don't have the privilege to put them in a public yuuji@387: location, copy it to your home directory and set YaTeX-help-file yuuji@387: to that file name. yuuji@54: yuuji@54: yuuji@54: [Operations] yuuji@56: ============ yuuji@387: *I accidentally learned in a wrong LaTeX macro in my dictionary. yuuji@54: yuuji@58: There should be a line with the wrong command in the .yatexrc yuuji@58: file in your home or current directory. Erase or fix that line, yuuji@58: and save the results with C-x C-s, then kill buffer with C-x k. yuuji@58: Once you make sure the current buffer is your LaTeX source, type yuuji@58: M-x YaTeX-reload-dictionary. yuuji@54: yuuji@54: *I can't comment out the region. yuuji@54: yuuji@56: Probably the point is on a line withe \begin{} or \end{}. Go up yuuji@56: or down a line and do C-c >. yuuji@54: yuuji@54: *I was asked for a parent file when typesetting, and answered the wrong file. yuuji@54: yuuji@56: Re-read the child file with C-x C-v RET or re-type the parent yuuji@56: file with C-u C-c ^. yuuji@54: yuuji@54: *The typeset buffer is not shown when I get a typeset buffer on Demacs. yuuji@54: yuuji@56: This happens on Demacs 1.2.0, when the child process returns an yuuji@56: error level of 1 or more. If you are calling jlatex from a yuuji@56: batch file, call a dummy command that always returns errorlevel yuuji@56: 0 at the end. yuuji@54: yuuji@54: *How can I enter "\underline{\makebox[4em][l]{x y}{\tt z}}" more easily? yuuji@54: yuuji@56: Recursive completion can be used for inputting arguments in the yuuji@56: mini-buffer of a section type completion. Following is an yuuji@56: example showing the command in question. yuuji@54: yuuji@56: PROMPT KEYs ENTERED yuuji@56: C-c s und SPC RET yuuji@56: \underline{???}: C-c s makeb SPC RET yuuji@56: Width: 4em RET yuuji@56: makebox position (`lr'): - l RET yuuji@56: \makebox{???}: x y RET yuuji@56: \underline{???}: \makebox[4em][l]{x y} C-c l tt RET yuuji@56: \underline{???}: \makebox[4em][l]{x y}{\tt } z RET yuuji@54: yuuji@54: *How can I kill \footnote{} from \footnote{HOGE} yuuji@54: yuuji@56: Put the point to \footnote and do C-c k. This will kill the yuuji@56: \footnote{}. If you want to kill the whole thing including yuuji@56: HOGE, do C-u C-c k. yuuji@54: yuuji@54: *I want to make HONYARA into a footnote. yuuji@54: yuuji@54: Mark HONYARA and do C-c S footnote RET. (S in uppercase) yuuji@54: yuuji@54: *I want to make the verbatim environment I have now into verbatim*. yuuji@54: yuuji@54: Do C-c c on the line with \begin{verbatim} or \end{verbatim}. yuuji@54: yuuji@54: *I want to enclose a region with \verb. yuuji@54: yuuji@54: \verb isn't a maketitle-type, so there aren't any quick commands. yuuji@54: But you can use C-c $ to do the same thing. yuuji@56: v v yuuji@54: WHAT YOU NEED to make \verb yuuji@56: \verbWHAT YOU NEED to make \verb (insert \verb) yuuji@56: ^(C-@) (mark W) yuuji@56: \verbWHAT YOU NEED to make \verb yuuji@56: ^C-c $ (move point to end enclose with $) yuuji@56: \verb$WHAT YOU NEED$ to make \verb (done!) yuuji@54: yuuji@54: *I want to have commands defined on a upper level file to be read in yuuji@54: when doing a typeset-region on a child file. yuuji@54: yuuji@56: When you are editing child files broken into sections and some yuuji@56: macros to be used are defined in upper level files, you'll need yuuji@56: them to do typeset-region. The macros needed will be copied to yuuji@56: the temporary file if you add %#REQUIRE to the end of the yuuji@56: macro's definition. yuuji@54: yuuji@54: Say you had a grand-child file yuuji@54: +-- main.tex --+ +---- sub.tex ----+ +-- subsub.tex --+ yuuji@54: | : | |%#jlatex main | |%#jlatex main | yuuji@54: |\include{sub} | |\include{macros} | |..... | yuuji@54: | : |<-| : |<-|%#BEGIN | yuuji@54: | : | | : | |TEXT YOU WANT | yuuji@54: | : | +-----------------+ |TYPESET IS | yuuji@54: +--------------+ ^ |HERE | yuuji@54: +-- macros.tex ---+ |%#END | yuuji@56: |\def\foo{bar} | |: | yuuji@56: |\def\hoge{hero} | +----------------+ yuuji@56: +-----------------+ yuuji@54: yuuji@54: In this case you change the \include{macros} line in sub.tex to yuuji@54: yuuji@54: \include{macros} %#REQUIRE yuuji@54: yuuji@54: and add to subsub.tex yuuji@54: yuuji@54: %#REQUIRE \include{macros} yuuji@54: yuuji@56: If %#REQUIRE is at the top of the line, the following will be yuuji@56: copied to the temporary file. So, macros.tex will be included yuuji@56: only once whether you are typesetting all the files, or doing a yuuji@56: typeset-region on sub.tex or subsub.tex. yuuji@54: yuuji@54: *I want to reuse ARGUMENTS I used in the last \foo{ARGUMENTS} yuuji@54: yuuji@56: Use the gmhist package. YaTeX works fine with gmhist. When you yuuji@56: are asked \foo{???}: in the mini-buffer, hitting M-p (ESC p) yuuji@56: will get you a history of what you have inputted in reverse. yuuji@56: M-n will go forward in the history. This input history can be yuuji@56: used for begin-type completion, section-type completion, evoking yuuji@56: the previewer, and print out commands. yuuji@54: yuuji@56: gmhist can be found at many Emacs-Lisp archive sights. For yuuji@56: example, ftp.ae.keio.ac.jp:pub/emacs-lisp/util/gmhist.tar.gz yuuji@56: yuuji@56: Note that Emacs-19(Mule2) doesn't need gmhist for the feature of yuuji@56: minibuffer history. yuuji@54: yuuji@54: *ref<->label jump doesn't work. yuuji@54: yuuji@56: C-c g will start a forward search of ref/label. C-u C-c g will yuuji@56: start a backward search. If you want to continue searching for yuuji@56: \ref, hit C-s (C-r) twice and use the repeated search feature of yuuji@56: the incremental search. If the point to jump is in another yuuji@56: file, that file must be already opened. YaTeX-display-hierarchy yuuji@56: (C-c d) can be used to open all files at once. yuuji@54: yuuji@54: *I get a % at the end of the line when I do a fill-paragraph or auto-fill. yuuji@54: yuuji@56: NTT-jTeX will add an unnecessary space in the print out image if yuuji@56: the japanese paragraph is written with an indent. To avoid yuuji@56: this, you need to put a % at the end of the line. YaTeX will yuuji@56: automatically put a % so you can input indented text for yuuji@56: NTT-jTeX. But there may be a bug in the routine so please yuuji@56: report if you find any %s otherwise than at the end of a line. yuuji@54: yuuji@54: *Isn't the indentation too deep in itemize environments? yuuji@54: yuuji@56: Think so too? An alias Mr. K thought this was better and he yuuji@56: feels an ultimate ecstacy with hitting the TAB to indent a line. yuuji@56: Wasn't my idea! (still have a bit of a grudge) If you also yuuji@56: think it's too deep, hit TAB at the end of the line with yuuji@56: \begin{itemize} within the environment. Now it's too shallow? yuuji@56: Umm... time for me to take a break. yuuji@54: yuuji@57: *Is it possible to include personal template file template.tex handily? yuuji@57: yuuji@387: Put your template.tex into your ~/work directory where YaTeX yuuji@387: seeks by default. If you change the location to another place, yuuji@387: set the lisp-variable as below. yuuji@387: (setq YaTeX-template-file "~/other/location/template.tex") yuuji@57: yuuji@60: *It is bothering for me to determine I should call bibtex or latex... yuuji@60: yuuji@387: Since version 1.76, YaTeX automatically call bibtex/latex twice yuuji@387: if needed. In most case, you don't have to repeat to call yuuji@387: typesetter or bibtex. If you use `latexmk' described below, yuuji@387: YaTeX's auto rerun functionality should be disabled by setting yuuji@387: like this: yuuji@387: (setq YaTeX-typeset-auto-rerun nil) yuuji@387: yuuji@387: The `latexmk' perl script, which is a TeX specific tool to yuuji@387: automate generation of LaTeX document. You can find `latexmk' yuuji@387: some CTAN ftp directory. yuuji@387: (eg. http://www.ctan.org/pkg/latexmk/) yuuji@60: yuuji@69: *Can I inhibit auto-filling against very long line? yuuji@69: yuuji@69: If you use Emacs-19 or later, Yes. The variable yuuji@69: auto-fill-inhibit-regexp controls the filling behaviour. To set yuuji@69: this, use yatex-mode-hook as below. yuuji@69: yuuji@69: (add-hook 'yahtml-mode-hook yuuji@69: '(lambda () yuuji@69: (setq auto-fill-inhibit-regexp yuuji@69: "^[ ]*\\(