yuuji@271: Info file: yatexe, -*-Text-*- yuuji@271: produced by `texinfo-format-buffer' yuuji@271: from file `yatexe.tex' yuuji@419: using `texinfmt.el' version 2.42 of 7 Jul 2006. yuuji@271: yuuji@272: START-INFO-DIR-ENTRY yuuji@272: * YaTeX-e: (yatexe). Yet Another tex-mode for Emacs (English). yuuji@272: END-INFO-DIR-ENTRY yuuji@272: yuuji@271: yuuji@271: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Top, Next: What is YaTeX?, Prev: (dir), Up: (dir) yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * What is YaTeX?:: yuuji@271: * Main features:: What YaTeX can do yuuji@271: * Installation:: Guide to install yuuji@271: * Typesetting:: Call typesetting processes yuuji@271: * %#notation:: Meta-keyword `%#' yuuji@271: * Completion:: Input LaTeX commands with completion yuuji@271: * Local dictionaries:: Directory dependent completion yuuji@271: * Commenting out:: Commenting/uncommenting text yuuji@271: * Cursor jump:: Jumping to related position yuuji@271: * Changing and Deleting:: Changing/deleting certain unit of text yuuji@271: * Filling:: Filling an item or paragraph yuuji@271: * Updation of includeonly:: Free from maintaining includeonly yuuji@271: * What column:: Check what table-column the cursor belong yuuji@271: * Intelligent newline:: Guess requisites of new line yuuji@271: * Usepackage checker:: Selecting correct \usepackage is YaTeX's job yuuji@271: * Online help:: On-line documentation of LaTeX yuuji@271: * Browsing file hierarchy:: Walking through file hierarchy yuuji@271: * Cooperation with other packages:: Work well with gmhist, min-out yuuji@271: * Customizations:: How to breed `Wild Bird' yuuji@271: * Etcetera:: YaTeX is acquisitive. yuuji@271: * Copying:: Redistribution yuuji@271: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: What is YaTeX?, Next: Main features, Prev: Top, Up: Top yuuji@271: yuuji@271: What is YaTeX? yuuji@271: ************** yuuji@271: yuuji@271: YaTeX automates typesetting and previewing of LaTeX and enables yuuji@419: completing input of LaTeX mark-up command such as yuuji@419: `\begin{}'..`\end{}'. yuuji@271: yuuji@271: YaTeX also supports Demacs which runs on MS-DOS(386), Mule (Multi yuuji@271: Language Enhancement to GNU Emacs), and latex on DOS. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Main features, Next: Installation, Prev: What is YaTeX?, Up: Top yuuji@271: yuuji@271: Main features yuuji@271: ************* yuuji@271: yuuji@271: * Invocation of typesetter, previewer and related programs(`C-c t') yuuji@271: * Typesetting on static region which is independent from point yuuji@271: * Semiautomatic replacing of `\includeonly' yuuji@271: * Jumping to error line(`C-c '') yuuji@271: * Completing-read of LaTeX commands such as `\begin{}', `\section' etc. yuuji@471: (`C-c b', `C-c s', `C-c l', `C-c m') yuuji@409: * Enclosing text into LaTeX environments or commands (ABOVEKEYSTROKES yuuji@471: after region setting) yuuji@271: * Displaying the structure of text at entering sectioning commands yuuji@271: * Lump shifting of sectioning commands (*Note view-sectioning::) yuuji@271: * Learning unknown/new LaTeX commands for the next completion yuuji@271: * Argument reading with a guide for complicated LaTeX commands yuuji@271: * Generating argument-readers for new/unsupported commands(`yatexgen') yuuji@271: * Quick changing or deleting of LaTeX commands(`C-c c', `C-c k') yuuji@271: * Jumping from and to inter-file, begin<->end, ref<->label(`C-c g') yuuji@271: * Blanket commenting out or uncommenting (`C-c >', `C-c <', `C-c ,', yuuji@471: `C-c .') yuuji@271: * Easy input of accent mark, math-mode's commands and Greek letters yuuji@471: (`C-c a', `;', `:') yuuji@271: * Online help for the popular LaTeX commands (`C-c ?', `C-c /') yuuji@271: * Document files hierarchy browser (`C-c d') yuuji@271: * Adding automatically \usepackage corresponding to inputting LaTeX yuuji@471: macro with completion yuuji@271: * Allow you to forget creating \label{}s, \ref{} or \cite{} completion yuuji@471: automatically generate labels. yuuji@471: * \includegraphics by Drag&Drop of image file yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Installation, Next: Typesetting, Prev: Main features, Up: Top yuuji@271: yuuji@271: Installation yuuji@271: ************ yuuji@271: yuuji@271: Put next two expressions into your `~/.emacs'. yuuji@271: yuuji@271: (setq auto-mode-alist yuuji@271: (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) yuuji@271: (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) yuuji@271: yuuji@271: Next, add certain path name where you put files of YaTeX to your yuuji@271: load-path. If you want to put them in `~/src/emacs', write yuuji@271: yuuji@271: (setq load-path yuuji@271: (cons (expand-file-name "~/src/emacs") load-path)) yuuji@271: yuuji@271: in your `~/.emacs' yuuji@271: yuuji@271: Then, yatex-mode will be automatically loaded when you visit a file yuuji@271: which has extension `.tex'. If yatex-mode is successfully loaded, mode yuuji@271: string on mode line will be turned to "YaTeX". yuuji@271: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Typesetting, Next: %#notation, Prev: Installation, Up: Top yuuji@271: yuuji@271: Typesetting yuuji@271: *********** yuuji@271: yuuji@271: The prefix key stroke of yatex-mode is `C-c' (Press 'C' with Control yuuji@271: key) by default. If you don't intend to change the prefix key stroke, yuuji@271: assume all `[prefix]' as `C-c' in this document. These key strokes yuuji@271: execute typeset or preview command. yuuji@271: yuuji@271: `[prefix] t j' yuuji@409: ... invoke typesetter yuuji@271: `[prefix] t r' yuuji@409: ... invoke typesetter on region yuuji@271: `[prefix] t e' yuuji@409: ... `on-the-fly preview' on current environment or whole yuuji@471: portion of current formulas in math-mode yuuji@271: `[prefix] t d' yuuji@419: ... invoke dvipdfmx after successful typesetting yuuji@271: `[prefix] t k' yuuji@271: ... kill current typesetting process yuuji@271: `[prefix] t b' yuuji@271: ... invoke bibtex yuuji@271: `[prefix] t i' yuuji@271: ... invoke makeindex yuuji@271: `[prefix] t d' yuuji@271: ... invoke latex && dvipdfmx yuuji@271: `[prefix] t p' yuuji@271: ... preview yuuji@271: `[prefix] t l' yuuji@271: ... lpr dvi-file yuuji@271: `[prefix] t s' yuuji@271: ... search current string on xdvi-remote yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * Calling typesetter:: yuuji@419: * Calling previewer:: yuuji@419: * Printing out:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Calling typesetter, Next: Calling previewer, Prev: Typesetting, Up: Typesetting yuuji@271: yuuji@271: Calling typesetter yuuji@271: ================== yuuji@271: yuuji@271: Typing `[prefix] t j', the current editing window will be divided yuuji@271: horizontally when you invoke latex command, and log message of LaTeX yuuji@271: typesetting will be displayed in the other window; called typesetting yuuji@271: buffer. The typesetting buffer automatically scrolls up and traces LaTeX yuuji@271: warnings and error messages. If you see latex stopping by an error, you yuuji@271: can send string to latex in the typesetting buffer. yuuji@271: yuuji@271: If an error stops the LaTeX typesetting, this key stroke will move the yuuji@271: cursor to the line where LaTeX error is detected. yuuji@271: yuuji@271: `[prefix] '' yuuji@271: `([prefix]+single quotation)' yuuji@271: yuuji@271: ... jump to the previous error or warning yuuji@271: yuuji@271: If you find a noticeable error, move to the typesetting buffer and move yuuji@271: the cursor on the line of error message and type `SPACE' key. This makes yuuji@271: the cursor move to corresponding source line. yuuji@271: yuuji@271: YaTeX-typeset-region invoked by `[prefix] tr' call typesetter for yuuji@271: region. The region is specified by standard point and mark, or by yuuji@271: `%#BEGIN' and `%#END' marks. Selected region will be copied to the yuuji@271: temporary file `texput.tex' with the same preamble as the main file of yuuji@271: current editing sources. Be sure to put all local macro settings in yuuji@271: preamble, not after `\begin{document}'. The method of specification of yuuji@271: the region is shown in the section *Note %#notation::. yuuji@271: yuuji@271: The documentclass for typeset-region is the same as that of editing file yuuji@271: if you edit one file, and is the same as main file's if you edit splitting yuuji@271: files. yuuji@271: yuuji@271: The `[prefix] te' key automatically marks current inner environment or yuuji@409: inner math mode or paragraph, and then call typeset-region with marked yuuji@409: region. This is convenient to quick view of current tabular environment yuuji@409: or current editing formulas. If running Emacs has the ability of yuuji@409: displaying images, typeset image will be shown in the next window. yuuji@409: Further more, if you modify the content within that environment, YaTeX yuuji@409: performs `on-the-fly' preview that automatically update preview image as yuuji@409: you typed. yuuji@409: yuuji@409: If your Emacs does not supply on-the-fly preview, keeping previewer window yuuji@409: for `texput.dvi' is handy for debugging. Since `[prefix] te' selects the yuuji@409: inner-most environment as region, it is not suitable for partial yuuji@409: typesetting of doubly or more composed environment. If you want to do yuuji@409: partial typesetting for a nested environment, use `[prefix] tr' for yuuji@409: static-region, which is described in the section *Note %#notation::. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Calling previewer, Next: Printing out, Prev: Calling typesetter, Up: Typesetting yuuji@271: yuuji@271: Calling previewer yuuji@271: ================= yuuji@271: yuuji@271: `[prefix] t p' invokes the TeX previewer. And if you are using yuuji@271: xdvi-remote, which can be controled from other terminals, `[prefix] t s' yuuji@271: enables you to search current string at the cursor on the running xdvi yuuji@271: window. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Printing out, Prev: Calling previewer, Up: Typesetting yuuji@271: yuuji@271: Printing out yuuji@271: ============ yuuji@271: yuuji@271: When you type `[preifx] t l', YaTeX asks you the range of dvi-printing yuuji@271: by default. You can skip this by invoking it with universal-argument as yuuji@271: follows: yuuji@271: yuuji@271: C-u [prefix] tl yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: %#notation, Next: Completion, Prev: Typesetting, Up: Top yuuji@271: yuuji@271: %# notation yuuji@271: *********** yuuji@271: yuuji@271: You can control the typesetting process by describing `%#' notations in yuuji@271: the source text. yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * Changing typesetter:: yuuji@419: * Splitting input files:: yuuji@419: * Static region for typesetting:: yuuji@517: * Special Filtering Region:: yuuji@419: * Lpr format:: yuuji@419: * Controlling which command to invoke:: yuuji@419: * Editing %# notation:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Changing typesetter, Next: Splitting input files, Prev: %#notation, Up: %#notation yuuji@271: yuuji@271: To change the `latex' command or to split a source text. yuuji@271: ======================================================== yuuji@271: yuuji@271: To change the typesetting command, write yuuji@271: yuuji@271: %#!latex-big yuuji@271: yuuji@271: anywhere in the source text. This is useful for changing typesetter. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Splitting input files, Next: Static region for typesetting, Prev: Changing typesetter, Up: %#notation yuuji@271: yuuji@271: Splitting input files yuuji@271: ===================== yuuji@271: yuuji@271: And if you split the source text and edit subfile that should be yuuji@271: included from main text. yuuji@271: yuuji@271: %#!latex main.tex yuuji@271: yuuji@271: will be helpful to execute latex on main file from sub text buffer. Since yuuji@271: this command line after `%#!' will be sent to shell literally, next yuuji@271: description makes it convenient to use ghostview as dvi-previewer. yuuji@271: yuuji@271: %#!latex main && dvi2ps main.dvi > main yuuji@271: yuuji@271: Note that YaTeX assumes the component before the last period of the last yuuji@271: word in this line as base name of the main LaTeX source. The `%f' yuuji@271: notation in this line is replaced by main file name, and `%r' replaced by yuuji@271: root name of main file name. If you specify `%f' or `%r', YaTeX always yuuji@271: ask you the name of main file at the first typesetting. yuuji@271: yuuji@271: To make best use of the feature of inter-file jumping by `[prefix] g' yuuji@271: (see *Note Cursor jump::), take described below into consideration. yuuji@271: yuuji@271: * You can put split texts in sub directory, but not in sub directory of yuuji@471: sub directory. yuuji@271: * In the main text, specify the child file name with relative path name yuuji@471: such as \include{chap1/sub}, when you include the file in a yuuji@471: sub-directory. yuuji@271: * In a sub-text, write `%#!latex main.tex' even if `main.tex' is in the yuuji@471: parent directory(not %#!latex ../main.tex). yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Static region for typesetting, Next: Lpr format, Prev: Splitting input files, Up: %#notation yuuji@271: yuuji@271: Static region yuuji@271: ============= yuuji@271: yuuji@271: Typeset-region by `[prefix] tr' passes the region between point and mark yuuji@271: to typesetting command by default. But when you want to typeset static yuuji@271: region, enclose the region by `%#BEGIN' and `%#END' as follows. yuuji@271: yuuji@271: %#BEGIN yuuji@271: TheRegionYouWantToTypesetManyTimes yuuji@271: %#END yuuji@271: yuuji@271: This is the rule of deciding the region. yuuji@271: yuuji@271: 1. If there exists %#BEGIN before point, yuuji@271: yuuji@271: 1. If there exists %#END after %#BEGIN, yuuji@271: * From %#BEGIN to %#END. yuuji@271: yuuji@271: 2. If %#END does not exist after %#BEGIN, yuuji@271: * From %#BEGIN to the end of buffer. yuuji@271: yuuji@271: 2. If there does not exist %#BEGIN before point, yuuji@271: * Between point and mark(standard method of Emacs). yuuji@271: yuuji@271: It is useful to write `%#BEGIN' in the previous line of \begin and yuuji@271: `%#END' in the next line of \`end' when you try complex environment such yuuji@271: as `tabular' many times. It is also useful to put only `%#BEGIN' alone at yuuji@271: the middle of very long text. Do not forget to erase `%#BEGIN' `%#END' yuuji@271: pair. yuuji@271: yuuji@271: yuuji@271:  yuuji@517: File: yatexe, Node: Special Filtering Region, Next: Lpr format, Prev: Static region for typesetting, Up: %#notation yuuji@517: yuuji@517: Special Filtering Region yuuji@517: ======================== yuuji@517: A region like below will be passed to external filter command. yuuji@517: %#BEGIN FILTER{foo.pdf}{dot -T %t -o %o} yuuji@517: \if0 yuuji@517: ....blah blah blah... yuuji@517: ....blah blah blah... yuuji@517: ....blah blah blah... yuuji@517: \fi yuuji@517: %#END yuuji@517: yuuji@517: In this case, typing `[prefix] t e' send three `blah' lines yuuji@517: to "dot -T pdf -o foo.pdf" as standard-input. It is useful to yuuji@517: have source of text-origin graphic generated by such tools as yuuji@517: graphviz or blockdiag, in LaTeX source. This special form of region yuuji@517: can be inserted via feeding `.dot' into environment completion by yuuji@517: `[prefix] t b'. yuuji@517: yuuji@517: yuuji@517: yuuji@517: yuuji@517:  yuuji@471: File: yatexe, Node: Lpr format, Next: Controlling which command to invoke, Prev: Static region for typesetting, Up: %#notation yuuji@271: yuuji@271: Lpr format yuuji@271: ========== yuuji@271: yuuji@271: Lpr format is specified by three Lisp variables. Here are the default yuuji@271: values of them. yuuji@271: yuuji@271: `(1)dviprint-command-format' yuuji@271: `"dvi2ps %f %t %s | lpr"' yuuji@271: `(2)dviprint-from-format' yuuji@271: `"-f %b"' yuuji@271: `(3)dviprint-to-format' yuuji@271: `"-t %e"' yuuji@271: yuuji@271: On YaTeX-lpr, `%s' in (1) is replaced by the file name of main text, yuuji@271: `%f' by contents of (2), %t by contents of (3). At these replacements, yuuji@271: `%b' in (2) is also replaced by the number of beginning page, `%e' in (3) yuuji@271: is replaced by the number of ending page. But `%f' and `%t' are ignored yuuji@271: when you omit the range of print-out by `C-u [prefix] tl'. yuuji@271: yuuji@271: If you want to change this lpr format temporarily, put a command such as yuuji@271: follows somewhere in the text: yuuji@271: yuuji@271: %#LPR dvi2ps %f %t %s | 4up -page 4 | texfix | lpr -Plp2 yuuji@271: yuuji@271: And if you want YaTeX not to ask you the range of printing out, the next yuuji@271: example may be helpful. yuuji@271: yuuji@271: %#LPR dvi2ps %s | lpr yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Controlling which command to invoke, Next: Editing %# notation, Prev: Lpr format, Up: %#notation yuuji@271: yuuji@271: Controlling which command to invoke yuuji@271: =================================== yuuji@271: yuuji@271: These %# notation below can control which command to invoke for LaTeX yuuji@271: related process. yuuji@271: yuuji@419: `%#PREVIEW' yuuji@419: yuuji@419: ... Command line for DVI viewing ([prefix] t p) yuuji@419: `%#MAKEINDEX' yuuji@419: yuuji@419: ... Command line for makeindex ([prefix] t i) yuuji@271: `%#BIBTEX' yuuji@419: yuuji@419: ... Command line for bibtex ([prefix] t b) yuuji@330: `%#DVIPDF' yuuji@419: yuuji@419: ... Command line for dvipdf(mx) ([prefix] t b) yuuji@419: `%#LPR' yuuji@419: yuuji@419: ... Command line for printing out([prefix] t l) yuuji@419: `%#PDFVIEW' yuuji@419: yuuji@419: ... Command line for PDF viewing yuuji@419: `%#IMAGEDPI' yuuji@419: yuuji@419: ... DPI value for converting to on-the-fly prewview image yuuji@271: yuuji@271: If you want to invoke "makeidx hogehoge" to update index, put the next yuuji@271: line some upper place in the source, for example. yuuji@271: yuuji@271: %#MAKEINDEX makeidx hogehoge yuuji@271: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Editing %# notation, Prev: Controlling which command to invoke, Up: %#notation yuuji@271: yuuji@271: Editing %# notation yuuji@271: =================== yuuji@271: yuuji@271: To edit `%#' notation described above, type yuuji@271: yuuji@271: `[prefix] %' yuuji@271: ... editing %# notation menu yuuji@271: yuuji@271: and select one of the entry of the menu as follows. yuuji@271: yuuji@271: !)Edit-%#! B)EGIN-END-region L)Edit-%#LPR yuuji@271: yuuji@271: Type `!' to edit `%#!' entry, `b' to enclose the region with `%#BEGIN' and yuuji@271: `%#END', and `l' to edit `%#LPR' entry. When you type `b', all `%#BEGIN' yuuji@271: and `%#END' are automatically erased. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Completion, Next: Local dictionaries, Prev: %#notation, Up: Top yuuji@271: yuuji@271: Completion yuuji@271: ********** yuuji@271: yuuji@271: YaTeX makes it easy to input the LaTeX commands. There are several yuuji@271: kinds of completion type, begin-type, section-type, large-type, etc... yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@409: * Begin-type completion:: yuuji@409: * Section-type completion:: yuuji@471: * Label Generation:: yuuji@409: * Large-type completion:: yuuji@409: * Maketitle-type completion:: yuuji@409: * Arbitrary completion:: yuuji@409: * End completion:: yuuji@409: * Accent completion:: yuuji@409: * Image completion:: yuuji@409: * Greek letters completion:: yuuji@409: * Inserting parentheses:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Begin-type completion, Next: Section-type completion, Prev: Completion, Up: Completion yuuji@271: yuuji@271: Begin-type completion yuuji@271: ===================== yuuji@271: yuuji@271: "Begin-type completion" completes commands of `\begin{env}' ... yuuji@271: `\end{env}'. All of the begin-type completions begin with this key yuuji@271: sequence. yuuji@271: yuuji@271: `[prefix] b' yuuji@271: ... start begin-type completion yuuji@271: yuuji@271: An additional key stroke immediately completes a frequently used LaTeX yuuji@271: `\begin{}'...`\`end'{}' environment. yuuji@271: yuuji@271: `[prefix] b c' yuuji@271: ... `\begin{center}...\end{center}' yuuji@271: `[prefix] b d' yuuji@271: ... `\begin{document}...\end{document}' yuuji@271: `[prefix] b D' yuuji@271: ... `\begin{description}...\end{description}' yuuji@271: `[prefix] b e' yuuji@271: ... `\begin{enumerate}...\end{enumerate}' yuuji@271: `[prefix] b E' yuuji@271: ... `\begin{equation}...\end{equation}' yuuji@271: `[prefix] b i' yuuji@271: ... `\begin{itemize}...\end{itemize}' yuuji@271: `[prefix] b l' yuuji@271: ... `\begin{flushleft}...\end{flushleft}' yuuji@271: `[prefix] b m' yuuji@271: ... `\begin{minipage}...\end{minipage}' yuuji@271: `[prefix] b t' yuuji@271: ... `\begin{tabbing}...\end{tabbing}' yuuji@271: `[prefix] b T' yuuji@271: ... `\begin{tabular}...\end{tabular}' yuuji@271: `[prefix] b^T' yuuji@271: ... `\begin{table}...\end{table}' yuuji@271: `[prefix] b p' yuuji@271: ... `\begin{picture}...\end{picture}' yuuji@271: `[prefix] b q' yuuji@271: ... `\begin{quote}...\end{quote}' yuuji@271: `[prefix] b Q' yuuji@271: ... `\begin{quotation}...\end{quotation}' yuuji@271: `[prefix] b r' yuuji@271: ... `\begin{flushright}...\end{flushright}' yuuji@271: `[prefix] b v' yuuji@271: ... `\begin{verbatim}...\end{verbatim}' yuuji@271: `[prefix] b V' yuuji@271: ... `\begin{verse}...\end{verse}' yuuji@271: yuuji@271: Any other LaTeX environments are made by completing-read of the Emacs yuuji@271: function. yuuji@271: yuuji@271: `[prefix] b SPACE' yuuji@271: ... begin-type completion yuuji@271: yuuji@271: The next message will show up in the minibuffer yuuji@271: yuuji@419: Begin environment(default document): yuuji@271: yuuji@271: by typing `[prefix] b'. Put the wishing environment with completion in yuuji@271: the minibuffer, and `\begin{env}'...\`\end{env}' will be inserted in the yuuji@271: LaTeX source text. If the environment you want to put does not exist in yuuji@271: the YaTeX completion table, it will be registered in the user completion yuuji@271: table. YaTeX automatically saves the user completion table in the user yuuji@271: dictionary file at exiting of emacs. yuuji@271: yuuji@271: At the completion of certain environments, the expected initial entry will yuuji@271: automatically inserted such as `\item' for `itemize' environment. If you yuuji@271: don't want the entry, it can be removed by undoing. yuuji@271: yuuji@409: If you want to enclose some paragraphs which have already been written yuuji@409: into environment, invoke the begin-type completion right after region yuuji@409: marking. yuuji@409: yuuji@409: If you set `transient-mark-mode' to `nil' in your `~/.emacs', typing yuuji@409: `C-space' (`set-mark-command') twice turns `transient-mark-mode' on yuuji@409: temporarily. Then, type call begin-type completion to enclose text into a yuuji@409: environment. yuuji@409: yuuji@271: yuuji@271: yuuji@271:  yuuji@517: File: yatexe, Node: Section-type completion, Next: Label Generation, Prev: Begin-type completion, Up: Completion yuuji@271: yuuji@271: Section-type completion yuuji@271: ======================= yuuji@271: yuuji@271: "Section-type completion" completes section-type commands which take an yuuji@271: argument or more such as `\section{foo}'. To invoke section-type yuuji@271: completion, type yuuji@271: yuuji@271: `[prefix] s' yuuji@271: ... section-type completion yuuji@271: yuuji@271: then the prompt yuuji@271: yuuji@271: (C-v for view) \???{} (default documentclass): yuuji@271: yuuji@271: will show up in the minibuffer. Section-type LaTeX commands are completed yuuji@271: by space key, and the default value is selected when you type nothing in yuuji@271: the minibuffer. yuuji@271: yuuji@271: Next, yuuji@271: yuuji@271: \section{???}: yuuji@271: yuuji@271: prompts you the argument of section-type LaTeX command. For example, the yuuji@271: following inputs yuuji@271: yuuji@271: \???{} (default documentclass): section yuuji@271: \section{???}: Hello world. yuuji@271: yuuji@271: will insert the string yuuji@271: yuuji@271: \section{Hello world.} yuuji@271: yuuji@271: in your LaTeX source. When you neglect argument such as yuuji@271: yuuji@271: (C-v for view) \???{} (default section): vspace* yuuji@419: \vspace*{???}: yuuji@271: yuuji@271: YaTeX puts yuuji@271: yuuji@271: \vspace*{} yuuji@271: yuuji@271: and move the cursor in the braces. yuuji@271: yuuji@271: In LaTeX command, there are commands which take more than one arguments yuuji@271: such as `\addtolength{\topmargin}{8mm}'. To complete these commands, yuuji@271: invoke section-type completion with universal argument as, yuuji@271: yuuji@271: C-u 2 [prefix] s (or ESC 2 [prefix] s) yuuji@271: yuuji@271: and make answers in minibuffer like this. yuuji@271: yuuji@271: (C-v for view) \???{} (default vspace*): addtolength yuuji@271: \addtolength{???}: \topmargin yuuji@271: Argument 2: 8mm yuuji@271: yuuji@271: `\addtolength' and the first argument `\topmargin' can be typed easily by yuuji@271: completing read. Since YaTeX also learns the number of arguments of yuuji@271: section-type command and will ask that many arguments in future yuuji@271: completion, you had better tell the number of arguments to YaTeX at the yuuji@271: first completion of the new word. But you can change the number of yuuji@271: arguments by calling the completion with different universal argument yuuji@271: again. yuuji@271: yuuji@271: yuuji@271: Invoking section-type completion with `[Prefix] S' (Capital `S') yuuji@271: includes the region as the first argument of section-type command. yuuji@271: yuuji@271: The section/large/maketitle type completion can work at the prompt for yuuji@271: the argument of other section-type completion. Nested LaTeX commands are yuuji@271: efficiently read with the recursive completion by typing YaTeX's yuuji@271: completion key sequence in the minibuffer. yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * view-sectioning:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: view-sectioning, Prev: Section-type completion, Up: Section-type completion yuuji@271: yuuji@271: view-sectioning yuuji@271: --------------- yuuji@271: yuuji@271: In the minibuffer at the prompt of section-type command completion, yuuji@271: typing `C-v' shows a list of sectioning commands in source text(The line yuuji@271: with `<<--' mark is the nearest sectioning command). Then, default yuuji@271: sectioning command appears in the minibuffer. You can go up/down yuuji@271: sectioning command by typing `C-p'/`C-n', can scrolls up/down the listing yuuji@271: buffer by `C-v'/`M-v', and can hide sectioning commands under certain yuuji@271: level by 0 through 6. Type `?' in the minibuffer of sectioning prompt yuuji@271: for more information. yuuji@271: yuuji@271: You can generate this listing buffer (`*Sectioning Lines*' buffer) by yuuji@271: typing yuuji@271: `M-x YaTeX-section-overview' yuuji@271: ... Generate *Sectioning Lines* buffer yuuji@271: yuuji@419: from the LaTeX source buffer. In this listing buffer, typing `u' on yuuji@419: the sectioning command shifts up the corresponding sectioning command in yuuji@271: source text and `d' shifts down. After marking lines in the listing yuuji@419: buffer, typing `U' shifts up all sectioning commands in the region, yuuji@419: and `U' shifts down. Here are all the key bindings of yuuji@419: `*Sectioning Lines*' buffer. yuuji@271: yuuji@271: `SPC' yuuji@271: ... Jump to corresponding source line yuuji@271: `.' yuuji@271: ... Display corresponding source line yuuji@271: `u' yuuji@271: ... Shift up a sectioning line yuuji@271: `d' yuuji@271: ... Shift down a sectioning line yuuji@271: `U' yuuji@271: ... Shift up sectioning lines in region yuuji@271: `D' yuuji@271: ... Shift down sectioning lines in region yuuji@271: `0...6' yuuji@271: ... Hide sectioning commands whose level is lower than n yuuji@271: yuuji@271: yuuji@271:  yuuji@471: File: yatexe, Node: Label Generation, Next: Large-type completion, Prev: Section-type completion, Up: Completion yuuji@471: yuuji@471: Label Generation yuuji@471: ================ yuuji@471: yuuji@471: When you want to type-in references of `\ref' or `\cite', all you have to yuuji@471: do is type `[prefix] s ref' without adding labels beforehand. You will yuuji@471: see possible LaTeX-counters in the next window even if some counter does yuuji@471: not have `\label'. Selecting the counter will automatically set the label yuuji@471: to that counter. yuuji@471: yuuji@471: All possible counter list in the buffer tends to be large. You can reduce yuuji@471: the number of list by filtering type of counters by key-commands as yuuji@471: follows. yuuji@471: `M-a' yuuji@471: yuuji@471: ... Show all(disable filtering) yuuji@471: `M-c' yuuji@471: yuuji@471: ... Captions only yuuji@471: `M-e' yuuji@471: yuuji@471: ... equations (with counters) only yuuji@471: `M-i' yuuji@471: yuuji@471: ... numbers items only yuuji@471: `M-s' yuuji@471: yuuji@471: ... sections only yuuji@471: `M-m' yuuji@471: yuuji@471: ... other counters only yuuji@471: yuuji@471: yuuji@471: yuuji@471:  yuuji@471: File: yatexe, Node: Large-type completion, Next: Maketitle-type completion, Prev: Label Generation, Up: Completion yuuji@271: yuuji@271: Large-type completion yuuji@271: ===================== yuuji@271: yuuji@271: "Large-type completion" inputs the font or size changing descriptions yuuji@271: such as `{\large }'. When you type yuuji@271: yuuji@271: `[prefix] l' yuuji@271: ... large-type completion yuuji@271: yuuji@271: the message in the minibuffer yuuji@271: yuuji@419: {\??? } (default large): yuuji@271: yuuji@271: prompts prompts you large-type command with completing-read. There are yuuji@271: TeX commands to change fonts or sizes, `it', `huge' and so on, in the yuuji@271: completion table. yuuji@271: yuuji@409: Region-based completion is also invoked by calling completion after yuuji@409: region activated. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Maketitle-type completion, Next: Arbitrary completion, Prev: Large-type completion, Up: Completion yuuji@271: yuuji@271: Maketitle-type completion yuuji@271: ========================= yuuji@271: yuuji@271: We call it "maketitle-type completion" which completes commands such as yuuji@271: `\maketitle'. Take notice that maketitle-type commands take no arguments. yuuji@271: Then, typing yuuji@271: yuuji@271: `[prefix] m' yuuji@271: ... maketitle-type completion yuuji@271: yuuji@271: begins maketitle-completion. Above mentioned method is true for yuuji@271: maketitle-completion, and there are LaTeX commands with no arguments in yuuji@271: completion table. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Arbitrary completion, Next: End completion, Prev: Maketitle-type completion, Up: Completion yuuji@271: yuuji@271: Arbitrary completion yuuji@271: ==================== yuuji@271: yuuji@271: You can complete certain LaTeX command anywhere without typical yuuji@271: completing method as described, by typing yuuji@271: yuuji@271: `[prefix] SPC' yuuji@271: ... arbitrary completion yuuji@271: yuuji@271: after the initial string of LaTeX command that is preceded by `\'. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: End completion, Next: Accent completion, Prev: Arbitrary completion, Up: Completion yuuji@271: yuuji@271: End completion yuuji@271: ============== yuuji@271: yuuji@271: YaTeX automatically detects the opened environment and close it with yuuji@471: \`\end{environment}'. Though proficient YaTeX users never fail to make yuuji@271: environment with begin-type completion, some may begin an environment yuuji@271: manually. In that case, type yuuji@271: yuuji@271: `[prefix] e' yuuji@271: ... `end' completion yuuji@271: yuuji@271: at the end of the opened environment. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Accent completion, Next: Image completion, Prev: End completion, Up: Completion yuuji@271: yuuji@271: Accent completion yuuji@271: ================= yuuji@271: yuuji@271: When you want to write the European accent marks(like `\`{o}'), yuuji@271: yuuji@271: `[prefix] a' yuuji@271: ... accent completion yuuji@271: yuuji@271: shows the menu yuuji@271: yuuji@271: 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b yuuji@271: yuuji@271: in the minibuffer. Chose one character or corresponding numeric, and you yuuji@271: will see yuuji@271: yuuji@271: \`{} yuuji@271: yuuji@271: in the editing buffer with the cursor positioned in braces. Type one more yuuji@271: character `o' for example, then yuuji@271: yuuji@271: \`{o} yuuji@271: yuuji@271: will be completed, and the cursor gets out from braces. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Image completion, Next: Greek letters completion, Prev: Accent completion, Up: Completion yuuji@271: yuuji@271: Image completion of mathematical sign yuuji@271: ===================================== yuuji@271: yuuji@271: Arrow marks, sigma mark and those signs mainly used in the TeX's math yuuji@271: environment are completed by key sequences which imitate the corresponding yuuji@271: symbols graphically. This completion only works in the math environment. yuuji@271: YaTeX automatically detects whether the cursor located in math environment yuuji@271: or not, and change the behavior of key strokes `;' and `:'. yuuji@271: yuuji@271: By the way, we often express the leftarrow mark by `<-' for example. yuuji@419: Considering such image, you can write `\leftarrow' by typing `<-' yuuji@419: after `;' (semicolon) as a prefix. In the same way, yuuji@419: `\longleftarrow' (`<--') is completed by typing `;<--', yuuji@419: infinity mark which is imitated by `oo' is completed by typing yuuji@419: `;oo'. yuuji@271: yuuji@271: Here are the sample operations in YaTeX math-mode. yuuji@271: yuuji@271: INPUT Completed LaTeX commands yuuji@271: ; < - `\leftarrow' yuuji@271: ; < - - `\longleftarrow' yuuji@271: ; < - - > `\longleftrightarrow' yuuji@271: ; o `\circ' yuuji@271: ; o o `\infty' yuuji@271: yuuji@271: In any case, you can quit from image completion and can move to the next yuuji@271: editing operation if the LaTeX command you want is shown in the buffer. yuuji@271: yuuji@419: `;' itself in math-environment is inserted by `;;'. Typing yuuji@419: `TAB' in the midst of image completion shows all of the LaTeX yuuji@419: commands that start with the same name as string you previously typed in. yuuji@419: In this menu buffer, press `RET' after moving the cursor (by `n', yuuji@419: `p', `b', `f') to insert the LaTeX command. yuuji@271: yuuji@271: To know all of the completion table, type `TAB' just after `;'. And yuuji@271: here is the sample menu by `TAB' after `;<'. yuuji@271: yuuji@271: KEY LaTeX sequence sign yuuji@271: < \leq < yuuji@271: ~ yuuji@419: << \ll << yuuji@271: <- \leftarrow <- yuuji@271: <= \Leftarrow <= yuuji@271: yuuji@271: You can define your favorite key-vs-sequence completion table in the yuuji@271: Emacs-Lisp variable `YaTeX-math-sign-alist-private'. See also yuuji@271: `yatexmth.el' for the information of the structure of this variable. yuuji@271: yuuji@271: yuuji@271:  yuuji@409: File: yatexe, Node: Greek letters completion, Next: Inserting parentheses, Prev: Image completion, Up: Completion yuuji@271: yuuji@271: Greek letters completion yuuji@271: ======================== yuuji@271: yuuji@271: Math-mode of YaTeX provides another image completion, Greek letters yuuji@271: completion in the same method. After prefix `:', typing `a' makes yuuji@271: `\alpha', `b' makes `\beta' and `g' makes `\gamma' and so on. First, type yuuji@271: `:TAB' to know all the correspondence of alphabets vs. Greek letters. yuuji@271: yuuji@419: If you will find `;' or `:' doesn't work in correct position of yuuji@419: math environment, it may be a bug of YaTeX. Please send me a bug report yuuji@419: with the configuration of your text, and avoid it temporarily by typing yuuji@419: `;' or `:' after universal-argument(`C-u') which forces yuuji@419: `;' and `:' to work as math-prefix. yuuji@271: yuuji@271: yuuji@271:  yuuji@409: File: yatexe, Node: Inserting parentheses, Prev: Greek letters completion, Up: Completion yuuji@409: yuuji@409: Inserting parentheses yuuji@409: ===================== yuuji@409: yuuji@409: Typing opening parenthesis, one of `(', `{ and `['', automatically yuuji@409: inserts the closing one. If a opening bracket is typed after `\', `\]' is yuuji@409: automatically inserted with computed indentation. If you stop automatic yuuji@409: insertion, type `C-q' before opening parenthesis. yuuji@409: yuuji@409: yuuji@409:  yuuji@271: File: yatexe, Node: Local dictionaries, Next: Commenting out, Prev: Completion, Up: Top yuuji@271: yuuji@271: Local dictionaries yuuji@271: ****************** yuuji@271: yuuji@271: Tables for completion consist of three dictionaries; `standard yuuji@271: dictionary' built in `yatex.el', `user dictionary' for your common private yuuji@271: commands, and `local dictionary' that is effective in a certain directory. yuuji@271: yuuji@271: When you input the command unknown to YaTeX at a completion in the yuuji@271: minibuffer, YaTeX asks you with the following prompt; yuuji@271: yuuji@271: `foo' is not in table. Register into: U)serDic L)ocalDic N)one D)iscard yuuji@271: yuuji@271: In this menu, typing `u' updates your `user dictionary', `l' updates your yuuji@271: local dictionary, `n' updates only on-memory dictionary which go through yuuji@271: only current Emacs session, and `d' updates no dictionary and throws the yuuji@271: new word away. yuuji@271: yuuji@271: If you find this switching feature meaningless and bothersome, put the yuuji@271: next expression into your `~/.emacs' yuuji@271: yuuji@271: (setq YaTeX-nervous nil) yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Commenting out, Next: Cursor jump, Prev: Local dictionaries, Up: Top yuuji@271: yuuji@271: Commenting out yuuji@271: ************** yuuji@271: yuuji@271: You may want to comment out some region. yuuji@271: yuuji@271: `[prefix] >' yuuji@271: ... comment out region by % yuuji@271: `[prefix] <' yuuji@271: ... uncomment region yuuji@271: yuuji@271: cause an operation to the region between point and mark. yuuji@271: yuuji@271: `[prefix] .' yuuji@271: ... comment out current paragraph yuuji@271: `[prefix] ,' yuuji@271: ... uncomment current paragraph yuuji@271: yuuji@271: comments or uncomments the paragraph where the cursor belongs. This yuuji@271: `paragraph' means the region marked by the function mark-paragraph, bound yuuji@271: to `ESC h' by default. It is NOT predictable what will happen when you yuuji@271: continuously comment out some paragraph many times. yuuji@271: yuuji@419: You can also comment out an environment between `\begin' and yuuji@419: `\end', or a `\begin'-\`\end' pair themselves, by making the yuuji@419: following key strokes on the line where `\begin{}' or yuuji@419: `\end{}' exists. yuuji@271: yuuji@271: `[prefix] >' yuuji@271: ... comment out from \begin to \`end' yuuji@271: `[prefix] <' yuuji@271: ... uncomment from \begin to \`end' yuuji@271: yuuji@271: comment whole the contents of environment. Moreover, yuuji@271: yuuji@271: `[prefix] .' yuuji@271: ... comment out \begin and \`end' yuuji@271: `[prefix] ,' yuuji@271: ... uncomment \begin and \`end' yuuji@271: yuuji@271: (un)comments out only environment declaration: `\begin{}' and `\end{}'. yuuji@271: NOTE that even if you intend to comment out some region, invoking yuuji@271: `[prefix] >' on the `\begin',`\end' line decides to work in `commenting yuuji@271: out from `\begin' to `\end'' mode. yuuji@271: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Cursor jump, Next: Changing and Deleting, Prev: Commenting out, Up: Top yuuji@271: yuuji@271: Cursor jump yuuji@271: *********** yuuji@271: yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * Jump to corresponding object:: yuuji@419: * Invoking image processor:: yuuji@419: * Jump to main file:: yuuji@419: * Jumping around the environment:: yuuji@419: * Jumping to last completion position:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Jump to corresponding object, Next: Invoking image processor, Prev: Cursor jump, Up: Cursor jump yuuji@271: yuuji@271: Jump to corresponding object yuuji@271: ============================ yuuji@271: yuuji@271: Typing yuuji@271: yuuji@271: `[prefix] g' yuuji@271: ... go to corresponding object yuuji@271: yuuji@271: in a certain place move the cursor to the place corresponding to the LaTeX yuuji@271: command of last place. YaTeX recognize the followings as pairs that have yuuji@271: relation each other. yuuji@271: yuuji@271: * `\begin{}' <-> `\end{}' yuuji@271: * `%#BEGIN' <-> `%#END' yuuji@271: * On the image-including line -> corresponding viewer or drawing tool yuuji@271: * `\label{}' <-> `\ref{}' yuuji@271: * `\include(\input)' -> included file yuuji@271: * `\bibitem{}' <-> `\cite{}' yuuji@271: yuuji@271: On a `\begin',`\end' line, typing `[prefix] g' moves the cursor to the yuuji@271: corresponding `\end',`\begin' line, if its partner really exists. The yuuji@271: behavior on the line `%#BEGIN' and `%#END' are the same. Note that if the yuuji@271: correspondent of `label/ref' or `cite/bibitem' exists in another file, yuuji@271: that file have to be opened to make a round trip between references by yuuji@271: `[prefix] g'. yuuji@271: yuuji@271: If you type `[prefix] g' on the line of `\include{chap1}', typically in yuuji@271: the main text, YaTeX switches buffer to `chap1.tex'. yuuji@271: yuuji@271: `[prefix] 4 g' yuuji@271: ... go to corresponding object in other window yuuji@271: yuuji@419: do the same job as `[prefix] g' except it's done in other window. yuuji@419: Note that this function doesn't work on `begin/end', yuuji@419: `%#BEGIN/%#END' pairs because it is meaningless. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Invoking image processor, Next: Jump to main file, Prev: Jump to corresponding object, Up: Cursor jump yuuji@271: yuuji@271: Invoking image processor yuuji@271: ======================== yuuji@271: yuuji@271: yuuji@271: `image-including line' described above means such lines as yuuji@271: `\epsfile{file=foo.ps}'. If you type `[prefix] g' on that line, YaTeX yuuji@271: automatically searches source of `foo.ps' and invokes image viewer or yuuji@271: drawing tool correspoinding to it. For example; if you draw an image yuuji@271: foo.obj with Tgif and enclose its product named foo.eps by `\epsfile' yuuji@271: command. Typing `[prefix] g' on `\epsfile' line make YaTeX invoke `tgif yuuji@271: foo.obj'. How a processor is choosen is as follows. yuuji@271: yuuji@271: 1. If there is an expression matching with one of the pattern defined in yuuji@271: `YaTeX-processed-file-regexp-alist', extract file name from regexp yuuji@271: group surrounded by \\(\\). (Which group corresponds is written in yuuji@271: the cdr part of each list.) If no matches were found, do nothing. yuuji@271: 2. If there is a pattern as `%PROCESSOR' which is defined in the yuuji@271: variable `YaTeX-file-processor-alist', call that processor giving the yuuji@271: file name with corresponding extension. yuuji@271: 3. If not, check the existence of each file which is supplied the yuuji@271: extension in the cdr part of each list of yuuji@271: `YaTeX-file-processor-alist'. If any, call the corresponding image yuuji@271: viewer or drawing tool. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Jump to main file, Next: Jumping around the environment, Prev: Invoking image processor, Up: Cursor jump yuuji@271: yuuji@271: Jump to main file yuuji@271: ================= yuuji@271: yuuji@271: Typing yuuji@271: yuuji@271: `[prefix] ^' yuuji@271: ... visit main file yuuji@271: `[prefix] 4^' yuuji@271: ... visit main file in other buffer yuuji@271: yuuji@419: in a sub text switch the buffer to the main text specified by yuuji@419: `%#!' notation. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Jumping around the environment, Next: Jumping to last completion position, Prev: Jump to main file, Up: Cursor jump yuuji@271: yuuji@271: Jumping around the environment yuuji@271: ============================== yuuji@271: yuuji@271: And these are the functions which work on the current LaTeX environment: yuuji@271: yuuji@271: `M-C-a' yuuji@271: ... beginning of environment yuuji@271: `M-C-e' yuuji@271: ... `end' of environment yuuji@271: `M-C-@' yuuji@271: ... mark environment yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Jumping to last completion position, Prev: Jumping around the environment, Up: Cursor jump yuuji@271: yuuji@271: Jumping to last completion position yuuji@271: =================================== yuuji@271: yuuji@271: YaTeX always memorize the position of completion into register `3'. So yuuji@271: every time you make a trip to any other part of text other than you are yuuji@271: writing, you can return to the editing paragraph by calling yuuji@271: register-to-point with argument YaTeX-current-position-register, which is yuuji@271: achieved by typing `C-x j 3'(by default). yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Changing and Deleting, Next: Filling, Prev: Cursor jump, Up: Top yuuji@271: yuuji@271: Changing and Deleting yuuji@271: ********************* yuuji@271: yuuji@271: These functions are for change or deletion of LaTeX commands already yuuji@271: entered. yuuji@271: yuuji@271: `[prefix] c' yuuji@271: ... change LaTeX command yuuji@271: `[prefix] k' yuuji@271: ... kill LaTeX command yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * Changing LaTeX commands:: yuuji@419: * Killing LaTeX commands:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Changing LaTeX commands, Next: Killing LaTeX commands, Prev: Changing and Deleting, Up: Changing and Deleting yuuji@271: yuuji@271: Changing LaTeX commands yuuji@271: ======================= yuuji@271: yuuji@271: `[prefix] c' can change the various (La)TeX commands. This can change the yuuji@271: followings. yuuji@271: * Environment names yuuji@271: * Section-type commands yuuji@271: * Argument of section-type commands yuuji@271: * Optional parameters (enclosed by []) of section-type commands yuuji@271: * Font/size designators yuuji@271: * Math-mode's maketitle-type commands that can be inputted with image yuuji@271: completion yuuji@271: yuuji@271: Typing `[prefix] c' on one of above objects you want to change brings a yuuji@271: suitable reading function sometimes with completion. Note: If you want to yuuji@271: change the argument of section-type command that contains other LaTeX yuuji@271: commands, type `[prefix] c' either of surrounding braces of the argument yuuji@271: in order to make YaTeX ignore the internal LaTeX sequences as an object of yuuji@271: changing. Anyway, it is very difficult to know which argument position yuuji@271: the cursor belongs because the LaTeX commands can be nested and braces can yuuji@271: freely emerge. So keep it mind to put the cursor on a brace when you are yuuji@271: thinking of changing a complicated argument. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Killing LaTeX commands, Prev: Changing LaTeX commands, Up: Changing and Deleting yuuji@271: yuuji@271: Killing LaTeX commands yuuji@271: ====================== yuuji@271: yuuji@271: `[prefix] k' kills the LaTeX commands sometimes with their arguments. yuuji@271: Following table illustrates the correspondence of the invoking position yuuji@271: and what is killed. yuuji@271: yuuji@271: [Invoking position] [action] yuuji@271: \begin, \end line kill \begin,\end pairs yuuji@271: %#BEGIN, %#END line kill %#BEGIN,%#END pairs yuuji@271: on a Section-type command kill section-type command yuuji@271: on a parenthesis kill parentheses yuuji@271: yuuji@271: Note that when killing `\begin, \end' or `%#BEGIN, %#END' pair, the lines yuuji@271: `\begin, \end' or `%#BEGIN, %#END' exist will be killed entirely. So take yuuji@271: care not to create any line that contains more than one `\begin' or so. yuuji@271: yuuji@271: While all operations above are to kill `containers' which surround some yuuji@271: text, universal argument (`C-u') for these commands kills not only yuuji@271: `containers' but also `contents' of them. See below as a sample. yuuji@271: yuuji@271: Original text: [prefix] k C-u [prefix] k yuuji@271: Main \footnote{note} here. Main note here. Main here. yuuji@271: ~(cursor) yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Filling, Next: Updation of includeonly, Prev: Changing and Deleting, Up: Top yuuji@271: yuuji@271: Filling yuuji@271: ******* yuuji@271: yuuji@271: yuuji@271: Filling an item yuuji@271: =============== yuuji@271: yuuji@271: To fill a term (descriptive sentences) of `\item', type yuuji@271: yuuji@271: `M-q' yuuji@271: ... fill item yuuji@271: yuuji@271: on that item. yuuji@271: yuuji@271: YaTeX uses the value of the variable `YaTeX-item-regexp' as the regular yuuji@271: expression to search item header in itemize environment. If you make a yuuji@271: newcommand to itemize terms(e.g. `\underlineitem'), put yuuji@271: yuuji@271: (setq YaTeX-item-regexp yuuji@271: "\\(\\\\\\(sub\\)*item\\)\\|\\(\\\\underlineitem\\)") yuuji@271: yuuji@419: in your `~/.emacs'. If you are not familiar with regular expression yuuji@419: for Emacs-Lisp, name a newcommand for `itemize' beginning with yuuji@419: `\item' such as `\itembf', not `\bfitem'. yuuji@271: yuuji@271: This function reformats the `\item' into `hang-indented' style. For yuuji@271: example: yuuji@271: yuuji@271: itemize, enumerate environment: yuuji@271: > yuuji@271: >\item[foo] `foo' is the typical word for describing an yuuji@271: > arbitrarily written.... yuuji@271: description environment: yuuji@271: > \item[bar] When the word `for' is used as an arbitrarily yuuji@271: > word, `bar' is bound to follow it. yuuji@271: yuuji@271: Note that the indent depth of an `\item' word and its descriptive yuuji@271: paragraph are the same in latter case. If you want to use different yuuji@271: depth, invoke fill-paragraph at the beginning of non-whitespace yuuji@271: character(see below). yuuji@271: yuuji@271: yuuji@271: Filling paragraph yuuji@271: ================= yuuji@271: yuuji@271: Fill-paragraph is little bit adapted for LaTeX sources. It retains from yuuji@271: filling in certain environments where formatting leads to a disaster such yuuji@271: as verbatim, tabular, or so. And it protects `\verb' expressions from yuuji@271: being folded (The variable `YaTeX-verb-regexp' controls this). Besides, yuuji@271: putting cursor on the first occurrence of non-whitespace character on a yuuji@271: line changes the fill-prefix temporarily to the depth of the line. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Updation of includeonly, Next: What column, Prev: Filling, Up: Top yuuji@271: yuuji@271: Updation of `\includeonly' yuuji@271: ************************** yuuji@271: yuuji@271: When you edit splitting source texts, the notation yuuji@271: yuuji@271: \includeonly{CurrentEditingFileName} yuuji@271: yuuji@271: in the main file reduces the time of typesetting. If you want to hack yuuji@271: other file a little however, you have to rewrite it to yuuji@271: yuuji@271: \includeonly{OtherFileNameYouWantToFix} yuuji@271: yuuji@271: in the main file. YaTeX automatically detects that the current edited yuuji@271: text is not in includeonly list and prompts you yuuji@271: yuuji@271: A)dd R)eplace %)comment? yuuji@271: yuuji@419: in the minibuffer. Type `a' if you want to add the current file name yuuji@419: to `\includeonly' list, `r' to replace \`includeonly' list yuuji@419: with the current file, and type `%' to comment out the yuuji@419: `\includeonly' line. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: What column, Next: Intelligent newline, Prev: Updation of includeonly, Up: Top yuuji@271: yuuji@271: What column? yuuji@271: ************ yuuji@271: yuuji@271: We are often get tired of finding the corresponding column in large yuuji@271: tabulars. For example, yuuji@271: yuuji@271: \begin{tabular}{|c|c|c|c|c|c|c|c|}\hline yuuji@271: Name&Position&Post No.&Addr.&Phone No.&FAX No.& yuuji@271: Home Addr.&Home Phone\\ \hline yuuji@271: Thunder Bird & 6 & 223 & LA & xxx-yyy & yuuji@271: zzz-www & Japan & 9876-54321 \\ yuuji@271: & 2 & \multicolumn{2}{c|}{Unknown} yuuji@271: &&&(???) yuuji@271: \\ \hline yuuji@271: \end{tabular} yuuji@271: yuuji@271: Suppose you have the cursor located at `(???)' mark, can you tell which yuuji@271: column it is belonging at once? Maybe no. In such case, type yuuji@271: yuuji@271: `[prefix] &' yuuji@271: ... What column yuuji@271: yuuji@271: in that position. YaTeX tells you the column header of the current field. yuuji@271: Since YaTeX assumes the first line of tabular environment as a row of yuuji@271: column headers, you can create a row of virtual column headers by putting yuuji@271: them in the first line and commenting that line with `%'. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Intelligent newline, Next: Usepackage checker, Prev: What column, Up: Top yuuji@271: yuuji@271: Intelligent newline yuuji@271: ******************* yuuji@271: yuuji@271: At the end of begin-type completion of tabular[*], array, itemize, yuuji@271: enumerate or tabbing environment, or typing yuuji@271: yuuji@271: `ESC RET' yuuji@271: ... Intelligent newline yuuji@271: yuuji@271: in these environments inserts the contents corresponding to the current yuuji@271: environment in the next line. (At the begin-type completion, this yuuji@271: contents can be removed by `undo'.) In `tabular' environment, for yuuji@271: example, `ESC RET' inserts the certain number of `&' and trailing `\\', yuuji@271: and `\hline' if other `\hline' is found in backward. Here are the list of yuuji@271: contents vs. environments. yuuji@271: yuuji@271: * `tabular', `tabular*', `array' yuuji@271: yuuji@271: Corresponding number of `&' and `\\'. And `\hline' if yuuji@471: needed. yuuji@271: yuuji@271: * `tabbing' yuuji@271: yuuji@271: The same number of `\>' as `\=' in the first line. yuuji@271: yuuji@271: * `itemize', `enumerate', `description', `list' yuuji@271: yuuji@271: `\item' or `item[]'. yuuji@271: yuuji@271: Note that since this function works seeing the contents of the first yuuji@271: line, please call this after the second line if possible. yuuji@271: yuuji@271: If you want to apply these trick to other environments, `foo' yuuji@271: environment for example, define the function named yuuji@419: `YaTeX-intelligent-newline-foo' to insert corresponding contents. yuuji@419: That function will be called at the beginning of the next line after the yuuji@271: newline is inserted to the current line. Since the function yuuji@271: `YaTeX-indent-line' is designed to indent the current line properly, yuuji@271: calling this function before your code to insert certain contents must be yuuji@271: useful. See the definition of the function yuuji@271: `YaTeX-intelligent-newline-itemize' as an example. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Usepackage checker, Next: Online help, Prev: Intelligent newline, Up: Top yuuji@271: yuuji@271: Usepackage checker yuuji@271: ****************** yuuji@271: yuuji@271: When you input begint-type, section-type, maketitle-type macros with yuuji@271: completion, and it requires some LaTeX2e package, YaTeX examines the yuuji@271: existence of correct `\usepackage'. If not, YaTeX inserts the yuuji@271: `\usepackage{}' declaration corresponding to input macro. yuuji@271: yuuji@271: To activate the package completion for your favarite package, set the yuuji@271: variable `YaTeX-package-alist-private' correctly. Please refere the value yuuji@271: of `YaTeX-package-alist-default' as an example. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Online help, Next: Browsing file hierarchy, Prev: Usepackage checker, Up: Top yuuji@271: yuuji@271: Online help yuuji@271: *********** yuuji@271: yuuji@271: YaTeX provides you the online help with popular LaTeX commands. yuuji@271: yuuji@271: Here are the key strokes for the online help. yuuji@271: yuuji@271: `[prefix] ?' yuuji@271: ... Online help yuuji@271: `[prefix] /' yuuji@271: ... Online apropos yuuji@271: yuuji@271: yuuji@271: Online help yuuji@271: =========== yuuji@271: yuuji@271: `Online help' shows the documentation for the popular LaTeX yuuji@271: commands(defaults to the commands on the cursor) in the next buffer. yuuji@271: There are two help file, `global help' and `private help'. The former yuuji@271: file contains the descriptions on the standard LaTeX command and is yuuji@271: specified its name by variable `YaTeX-help-file'. Usually, the global yuuji@271: help file should be located in public space (`$EMACSEXECPATH' by default) yuuji@271: and should be world writable so that anyone can update it to enrich its yuuji@271: contents. The latter file contains descriptions on non-standard or yuuji@271: personal command definitions and is specified by yuuji@271: `YaTeX-help-file-private'. This file should be put into private yuuji@271: directory. yuuji@271: yuuji@271: yuuji@271: Online apropos yuuji@271: ============== yuuji@271: yuuji@271: `Online apropos' is an equivalent of GNU Emacs's apropos. It shows all yuuji@271: the documentations that contains the keyword entered by the user. yuuji@271: yuuji@271: yuuji@271: When no descriptions are found... yuuji@271: ================================= yuuji@271: yuuji@271: If there is no description on a command in help files, YaTeX requires yuuji@271: you to write a description on that command. If you are willing to do, yuuji@271: determine which help file to add and write the description on it referring yuuji@271: your manual of (La)TeX. Please send me your additional descriptions if yuuji@271: you describe the help on some standard commands. I might want to include yuuji@271: it in the next distribution. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Browsing file hierarchy, Next: Cooperation with other packages, Prev: Online help, Up: Top yuuji@271: yuuji@271: Browsing file hierarchy yuuji@271: *********************** yuuji@271: yuuji@271: When you are editing multi-file source, typing yuuji@271: yuuji@271: `[prefix] d' yuuji@271: ... browse file hierarchy yuuji@271: yuuji@271: asks you the parent-most file (which may be defaulted) and displays the yuuji@271: documentation hierarchy in the next window. In this buffer, the following yuuji@271: commands are available. yuuji@271: yuuji@271: `n' yuuji@271: ... move to the next line and show its contents yuuji@271: `p' yuuji@271: ... move to the previous line and show its contents yuuji@271: `N' yuuji@271: ... move to the next file in the same inclusion level yuuji@271: `P' yuuji@271: ... move to the previous file in the same inclusion level yuuji@271: `j' yuuji@271: ... move to the next line yuuji@271: `k' yuuji@271: ... move to the previous line yuuji@271: `u' yuuji@271: ... move to the parent file yuuji@271: `.' yuuji@271: ... show the current files contents in the next window yuuji@271: `SPC' yuuji@271: ... scroll up the current file window yuuji@271: `DEL, b' yuuji@271: ... scroll down the current file window yuuji@271: `<' yuuji@271: ... show the beginning of the current file yuuji@271: `>' yuuji@271: ... show the end of the current file yuuji@271: `>' yuuji@271: ... return to the previous postion after `<' or `>' yuuji@271: `RET, g' yuuji@271: ... open the current file in the next window yuuji@271: `mouse-2' yuuji@271: ... same as RET(available only with window system) yuuji@271: `o' yuuji@271: ... other window yuuji@271: `1' yuuji@271: ... delete other windows yuuji@271: `-' yuuji@271: ... shrink hierarchy buffer window yuuji@271: `+' yuuji@271: ... enlarge hierarchy buffer window yuuji@271: `?' yuuji@271: ... describe mode yuuji@271: `q' yuuji@271: ... quit yuuji@271: yuuji@271: Note that operations on the file contents in the next window do not work yuuji@271: correctly when you close the corresponding file. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Cooperation with other packages, Next: Customizations, Prev: Browsing file hierarchy, Up: Top yuuji@271: yuuji@271: Cooperation with other packages yuuji@271: ******************************* yuuji@271: yuuji@271: YaTeX works better with other brilliant packages. yuuji@271: yuuji@271: yuuji@271: gmhist yuuji@271: ====== yuuji@271: yuuji@271: When you are loading `gmhist.el' and `gmhist-mh.el', you can use yuuji@271: independent command history list at the prompt of preview command yuuji@271: (`[prefix] tp') and print command (`[prefix] tl'). On each prompt, you yuuji@271: can enter the previous command line string repeatedly by typing `M-p'. yuuji@271: yuuji@271: yuuji@271: min-out yuuji@271: ======= yuuji@271: yuuji@271: `min-out', the outline minor mode, can be used in yatex-mode buffers. yuuji@271: If you want to use it with YaTeX, please refer the file `yatexm-o.el' as yuuji@271: an example. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Customizations, Next: Etcetera, Prev: Cooperation with other packages, Up: Top yuuji@271: yuuji@271: Customizations yuuji@271: ************** yuuji@271: yuuji@271: You can customize YaTeX by setting Emacs-Lisp variables and by making yuuji@271: add-in functions. yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * Lisp variables:: yuuji@419: * Add-in functions:: yuuji@419: * Add-in generator:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Lisp variables, Next: Add-in functions, Prev: Customizations, Up: Customizations yuuji@271: yuuji@271: Lisp variables yuuji@271: ============== yuuji@271: yuuji@271: You can change the key assignments or make completion more comfortable yuuji@271: by setting the values of various variables which control the movement of yuuji@271: yatex-mode. yuuji@271: yuuji@271: For example, if you want to change the prefix key stroke from `C-c' to yuuji@271: any other sequence, set YaTeX-prefix to whatever you want to use. If you yuuji@271: don't want to use the key sequence `C-c letter' which is assumed to be the yuuji@271: user reserved sequence in Emacs world, set `YaTeX-inhibit-prefix-letter' yuuji@271: to `t', and all of the default key bind of `C-c letter' will turn to the yuuji@271: corresponding `C-c C-letter' (but the region based completions that is yuuji@271: invoked with `C-c Capital-letter' remain valid, if you want to disable yuuji@271: those bindings, set that variable to 1 instead of `t'). yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * All customizable variables:: yuuji@419: * Sample definitions:: yuuji@419: * Hook variables:: yuuji@419: * Hook file:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: All customizable variables, Next: Sample definitions, Prev: Lisp variables, Up: Lisp variables yuuji@271: yuuji@271: All customizable variables yuuji@271: -------------------------- yuuji@271: yuuji@271: Here are the customizable variables of yatex-mode. Each value setq-ed yuuji@271: in `~/.emacs' is preferred and that of defined in `yatex.el' is neglected. yuuji@271: Parenthesized contents stands for the default value. When you are to yuuji@271: change some of these variables, see more detailed documentation of the yuuji@271: variable by `M-x describe-variable'. yuuji@271: yuuji@271: -- Variable: YaTeX-japan yuuji@271: Set this nil to produce all messages in English (`Depends on Japanese yuuji@271: feature of Emacs') yuuji@271: yuuji@271: -- Variable: YaTeX-kanji-code yuuji@271: Default buffer-file-coding-system for YaTeX modes' buffer. Set this yuuji@271: 0 to no language conversion. Nil to preserve original yuuji@271: coding-system. 1=Shift JIS, 2=JIS, 3=EUC, 4=UTF-8 (`1 or 2') yuuji@271: yuuji@271: -- Variable: YaTeX-prefix yuuji@271: Prefix key stroke (`C-c') yuuji@271: yuuji@271: -- Variable: YaTeX-inhibit-prefix-letter yuuji@271: Change key stroke from `C-c letter' to `C-c C-letter' (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-fill-prefix yuuji@271: Fill-prefix used in yatex-mode (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-user-completion-table yuuji@271: Name of user dictionary where learned completion table will be yuuji@271: stored. (`"~/.yatexrc"') yuuji@271: yuuji@271: -- Variable: tex-command yuuji@271: LaTeX typesetter command (`"latex"') yuuji@271: yuuji@271: -- Variable: dvi2-command yuuji@271: Preview command (`"xdvi -geo +0+0 -s 4"') yuuji@271: yuuji@271: -- Variable: dviprint-command-format yuuji@271: Command format to print dvi file (`"dvi2ps %f %t %s | lpr"') yuuji@271: yuuji@271: -- Variable: dviprint-from-format yuuji@271: Start page format of above %f. %b will turn to start page (`"-f %b"') yuuji@271: yuuji@271: -- Variable: dviprint-to-format yuuji@271: End page format of above %t. %e will turn to `end' page (`"-t %e"') yuuji@271: yuuji@271: -- Variable: makeindex-command yuuji@271: Default makeindex command (`"makeindex"' (`"makeind"' on MS-DOS)) yuuji@271: yuuji@271: -- Variable: YaTeX-dvipdf-command yuuji@271: Default command name to convert .dvi to PDF (`"dvipdfmx"') yuuji@271: yuuji@384: -- Variable: YaTeX-on-the-fly-preview-interval yuuji@384: Interval time in seconds of idle to trigger on-the-fly preview of yuuji@419: environment by `[prefix] t e'(0.9). yuuji@419: `Nil' disables on-the-fly preview. yuuji@384: yuuji@409: -- Variable: YaTeX-on-the-fly-math-preview-engine yuuji@409: Function symbol to use on-the-fly preview of MATH environment started yuuji@409: by `[prefix] t e' (`'YaTeX-typeset-environment-by-lmp' which calls yuuji@409: latex-math-preview-expression function if latex-math-preview is yuuji@409: available, otherwise `'YaTeX-typeset-environment-by-builtin' which yuuji@409: alls built-in function). yuuji@409: yuuji@409: `Nil' disables on-the-fly preview. yuuji@409: yuuji@363: -- Variable: YaTeX-cmd-gimp yuuji@363: Command name of GIMP (code{"gimp"}) yuuji@363: -- Variable: YaTeX-cmd-tgif yuuji@363: Command name of tgif (code{"tgif"}) yuuji@363: -- Variable: YaTeX-cmd-inkscape yuuji@363: Command name of Inkscape (code{"inkscape"}) yuuji@363: -- Variable: YaTeX-cmd-dia yuuji@363: Command name of Dia (code{"dia"}) yuuji@363: -- Variable: YaTeX-cmd-ooo yuuji@363: Command name of OpenOffice.org/LibreOffice (code{"soffice"}) yuuji@363: -- Variable: YaTeX-cmd-gs yuuji@363: Command name of Ghostscript (code{"gs"}) yuuji@363: -- Variable: YaTeX-cmd-dvips yuuji@363: Command name of dvips (code{"dvips"}) yuuji@363: -- Variable: YaTeX-cmd-displayline yuuji@363: Command name of displayline yuuji@363: (code{"/Applications/Skim.app/Contents/SharedSupport/displayline"}) yuuji@363: -- Variable: YaTeX-cmd-edit-ps yuuji@363: Command name for editing PostScript files(Value of yuuji@363: code{"YaTeX-cmd-gimp"}) yuuji@363: -- Variable: YaTeX-cmd-edit-pdf yuuji@363: Command name for editing PDF files(Value of code{"YaTeX-cmd-ooo"}) yuuji@363: -- Variable: YaTeX-cmd-edit-ai yuuji@363: Command name for editing `.ai' files(Value of yuuji@363: code{"YaTeX-cmd-inkscape"}) yuuji@363: -- Variable: YaTeX-cmd-edit-svg yuuji@363: Command name for editing SVG files(Value of yuuji@363: code{"YaTeX-cmd-inkscape"}) yuuji@363: -- Variable: YaTeX-cmd-edit-images yuuji@363: Command name for editing image files(Value of code{"YaTeX-cmd-gimp"}) yuuji@363: yuuji@271: -- Variable: YaTeX-need-nonstop yuuji@271: Put `\nonstopmode{}' or not (`nil') yuuji@271: yuuji@271: -- Variable: latex-warning-regexp yuuji@271: Regular expression of warning message latex command puts out yuuji@271: (`"line.* [0-9]*"') yuuji@271: yuuji@271: -- Variable: latex-error-regexp yuuji@271: Regular expression of error message (`"l\\.[1-9][0-9]*"') yuuji@271: yuuji@271: -- Variable: latex-dos-emergency-message yuuji@271: Message latex command running on DOS puts at abort (`"Emergency yuuji@271: stop"') yuuji@271: yuuji@271: -- Variable: YaTeX-item-regexp yuuji@271: Regular expression of item command (`"\\\\item"') yuuji@271: yuuji@271: -- Variable: YaTeX-verb-regexp yuuji@271: Regexp of verb family. Omit \\\\. (`"verb\\*?\\|path"') yuuji@271: yuuji@271: -- Variable: YaTeX-nervous yuuji@271: T for using local dictionary (`t') yuuji@271: yuuji@271: -- Variable: YaTeX-sectioning-regexp yuuji@271: Regexp of LaTeX sectioning command yuuji@271: (`"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"') yuuji@271: yuuji@271: -- Variable: YaTeX-fill-inhibit-environments yuuji@271: Inhibit fill in these environments (`'("tabular" "tabular*" "array" yuuji@471: "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" yuuji@471: "verbatim" "verbatim*")') yuuji@271: yuuji@271: -- Variable: YaTeX-uncomment-once yuuji@271: T for deleting all preceding `%' (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-close-paren-always yuuji@271: T for always close all parenthesis automatically, `nil' for only eol yuuji@271: (`t') yuuji@271: yuuji@271: -- Variable: YaTeX-auto-math-mode yuuji@271: Switch math-mode automatically (`t') yuuji@271: yuuji@271: -- Variable: YaTeX-math-key-list-private yuuji@271: User defined alist, math-mode-prefix vs completion alist used in yuuji@271: image completion (`nil'). See `yatexmth.el' for the information yuuji@271: about how to define a completion alist. yuuji@271: yuuji@271: -- Variable: YaTeX-default-pop-window-height yuuji@271: Initial height of typesetting buffer when one-window. Number for the yuuji@271: lines of the buffer, numerical string for the percentage of the yuuji@271: screen-height. `nil' for half height (10) yuuji@271: yuuji@271: -- Variable: YaTeX-help-file yuuji@271: Global online help file name yuuji@271: (`$doc-directory/../../site-lisp/YATEXHLP.eng') yuuji@271: yuuji@271: -- Variable: YaTeX-help-file-private yuuji@271: Private online help file name (`"~/YATEXHLP.eng"') yuuji@271: yuuji@271: -- Variable: YaTeX-no-begend-shortcut yuuji@271: Disable [prefix] b ?? shortcut (`nil)' yuuji@271: yuuji@271: -- Variable: YaTeX-hilit-pattern-adjustment-private yuuji@271: List of the list that contain the regular expression and the symbol yuuji@271: of logical meaning of the string that matches the pattern. See also yuuji@271: the value from `(assq 'yatex-mode hilit-patterns-alist)' and the yuuji@271: value of `YaTeX-hilit-pattern-adjustment-default' (and even the yuuji@271: document of hilit19.el). yuuji@271: yuuji@271: -- Variable: YaTeX-sectioning-level yuuji@271: Alist of LaTeX's sectioning command vs its height. yuuji@271: yuuji@271: -- Variable: YaTeX-hierarchy-ignore-heading-regexp yuuji@271: `YaTeX-display-hierarchy' searches for sectioning command first, and yuuji@271: comment line secondary as a file headings. In latter case, ignore lines yuuji@271: that match with regular expression of this variable. Default value of yuuji@419: this variable is RCS header expressions and mode specifying line `-*- xxxx yuuji@271: -*'. yuuji@271: yuuji@271: -- Variable: YaTeX-skip-default-reader yuuji@271: Non-nil for this variable skips the default argument reader of yuuji@271: section-type command when add-in function for it is not defined yuuji@271: (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-create-file-prefix-g yuuji@271: When typing `prefix g' on the `\include' line, open the target file yuuji@271: even if the file doesn't exist (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-simple-messages yuuji@271: Simplyfy messages of various completions (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-hilit-sectioning-face yuuji@271: When hilit19 and yatex19 is active, YaTeX colors the sectioning yuuji@271: commands. This variable specifies the foreground and background yuuji@271: color of `\part' macro. The default value is `'(yellow/dodgerblue yuuji@271: yellow/slateblue)'. The first element of this list is for the screen yuuji@271: when `hilit-background-mode' is `'light', and the second element is yuuji@271: for `'dark'. You should specify both color as `forecolor/backcolor'. yuuji@271: yuuji@271: -- Variable: YaTeX-hilit-sectioning-attenuation-rate yuuji@271: When color mode, this variable specifies how much attenuate the color yuuji@271: density of `\subparagraph' compared with that of `\chapter' (`'(15 yuuji@271: 40)') See also `YaTeX-hilit-sectioning-face'. yuuji@271: yuuji@271: -- Variable: YaTeX-use-AMS-LaTeX yuuji@271: If you use AMS-LaTeX, set to `t' (`nil') yuuji@271: yuuji@271: -- Variable: YaTeX-use-LaTeX2e yuuji@271: If you use LaTeX2e, set to `t' (`t') yuuji@271: yuuji@271: -- Variable: YaTeX-template-file yuuji@271: File name which is automatically inserted at creation yuuji@271: (`~/work/template.tex') yuuji@271: yuuji@271: -- Variable: YaTeX-search-file-from-top-directory yuuji@271: Non-nil means to search input-files from the directory where main yuuji@271: file exists (`t') yuuji@271: yuuji@271: -- Variable: YaTeX-use-font-lock yuuji@271: Use font-lock to fontify buffer or not (`(featurep 'font-lock)' yuuji@271: yuuji@271: -- Variable: YaTeX-use-hilit19 yuuji@271: Use hilit19 to highlight buffer or not (`(featurep 'hilit19)' yuuji@271: yuuji@271: -- Variable: YaTeX-use-italic-bold yuuji@271: YaTeX tries to search italic, bold fontsets or not (`t' if Emacs-20 yuuji@271: or later). This variable is effective only when font-lock is used. yuuji@271: (`(featurep 'hilit19)' yuuji@271: yuuji@271: -- Variable: YaTeX-singlecmd-suffix yuuji@419: Suffix which is always inserted after maketitle-type macros. yuuji@419: `"{}"' is recommended. yuuji@271: yuuji@271: -- Variable: YaTeX-package-alist-private yuuji@271: Alist of LaTeX2e-package name vs. lists of macros in it. Set this yuuji@271: alist properly and YaTeX automatically check the declaratiion of yuuji@271: `usepackage' for corresponding macro, when you input that macro with yuuji@271: completion. If required `usepackage' is not found, YaTeX also yuuji@271: automatically inserts `\usepackage'. Alist is as follows; yuuji@271: '((PackageName1 (completionType ListOfMacro) (completionType yuuji@271: ListOfMacro)) (PackageName2 (completionType ListOfMacro) yuuji@271: (completionType ListOfMacro...))....) completionType is one of `env, yuuji@271: section, maketitle'. Consult the value of yuuji@271: `YaTeX-package-alist-default' as an example. yuuji@271: yuuji@271: -- Variable: YaTeX-tabular-indentation yuuji@271: At indentation by `C-i' in tabular or array environment, YaTeX put yuuji@271: the additional spaces to the normail indentation depth. The number yuuji@271: of additional spaces is the product of YaTeX-tabular-indentation and yuuji@271: the number of column position in tabular. yuuji@271: yuuji@271: -- Variable: YaTeX-noindent-env-regexp yuuji@271: Regexp of environment names that should begin with no indentation. yuuji@271: All verbatime-like environment name should match with. yuuji@271: yuuji@419: -- Variable: YaTeX-electric-indent-mode yuuji@419: Emacs 24.4 introduces automatic indentation of current and new lines. yuuji@419: This might be annoying for some people. Pass this value to the yuuji@419: function 'electric-indent-local-mode. If you prefer to stop yuuji@419: electric-indent-mode in yatex-mode, set `-1' to this variable. yuuji@419: yuuji@271: -- Variable: YaTeX-ref-default-label-string yuuji@271: Default \\ref time string format. This format is like strftime(3) yuuji@271: but allowed conversion char are as follows; %y -> Last 2 digit of yuuji@271: year, %b -> Month name, %m -> Monthe number(1-12), %d -> Day, %H -> yuuji@271: Hour, %M -> Minute, %S -> Second, %qx -> alphabetical-decimal yuuji@271: conversion of yymmdd. %qX -> alphabetical-decimal conversion of yuuji@271: HHMMSS. Beware defualt label-string should be always unique. So yuuji@271: this format string should have both time part (%H+%M+%S or %qX) and yuuji@271: date part (%y+(%b|%m)+%d or %qx). yuuji@271: yuuji@271: -- Variable: YaTeX-ref-generate-label-function yuuji@271: Function to generate default label string for unnamed \\label{}s. yuuji@271: The function pointed to this value should take two arguments. First yuuji@271: argument is LaTeX macro's name, second is macro's argument. Here is yuuji@271: an example for using this value. yuuji@271: (setq YaTeX-ref-generate-label-function 'my-yatex-generate-label) yuuji@271: (defun my-yatex-generate-label (command value) yuuji@271: (and (string= command "caption") yuuji@271: (re-search-backward "\\\\begin{\\(figure\\|table\\)}" nil t) yuuji@271: (setq command (match-string 1))) yuuji@271: (let ((alist '(("chapter" . "chap") yuuji@271: ("section" . "sec") yuuji@271: ("subsection" . "subsec") yuuji@271: ("figure" . "fig") yuuji@271: ("table" . "tbl")))) yuuji@271: (if (setq command (cdr (assoc command alist))) yuuji@271: (concat command ":" value) yuuji@271: (YaTeX::ref-generate-label nil nil)))) yuuji@271: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Sample definitions, Next: Hook variables, Prev: All customizable variables, Up: Lisp variables yuuji@271: yuuji@271: Sample definitions yuuji@271: ------------------ yuuji@271: yuuji@271: For instance, to change the prefix key stroke to `ESC', and name of the yuuji@271: user dictionary `~/src/emacs/yatexrc', and set `fill-prefix' to single TAB yuuji@271: character, add the following `setq' to `~/.emacs'. yuuji@271: yuuji@271: (setq YaTeX-prefix "\e" yuuji@271: YaTeX-user-completion-table "~/src/emacs/yatexrc" yuuji@271: YaTeX-fill-prefix " ") yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Hook variables, Next: Hook file, Prev: Sample definitions, Up: Lisp variables yuuji@271: yuuji@271: Hook variables yuuji@271: -------------- yuuji@271: yuuji@271: More customizations will be done by the hook-function defined in yuuji@271: hook-variable `yatex-mode-hook'. This is useful to define a shortcut key yuuji@271: sequence to enter some environments other than `document' and `enumerate' yuuji@271: etc. The following statement defines `[prefix] ba' to enter yuuji@271: `\begin{abstract}' ... `=end{abstract}' immediately. yuuji@271: yuuji@271: (setq yatex-mode-hook yuuji@271: '(lambda() (YaTeX-define-begend-key "ba" "abstract"))) yuuji@271: yuuji@271: You should use functions `YaTeX-define-key', or yuuji@271: `YaTeX-define-begend-key' to define all the key sequences of yatex-mode. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Hook file, Prev: Hook variables, Up: Lisp variables yuuji@271: yuuji@271: Hook file yuuji@271: --------- yuuji@271: yuuji@271: You can stuff all of YaTeX related expressions into a file named yuuji@271: `yatexhks.el' if you have a lot of codes. YaTeX automatically load this yuuji@271: file at the initialization of itself. Using `yatexhks.el' makes yuuji@271: `yatex-mode-load-hook' unnecessary. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Add-in functions, Next: Add-in generator, Prev: Lisp variables, Up: Customizations yuuji@271: yuuji@271: Add-in functions yuuji@271: ================ yuuji@271: yuuji@271: You can easily define a function to input detailed arguments with yuuji@271: completion according to LaTeX environments or commands. yuuji@271: yuuji@271: yuuji@271: What is add-in functions? yuuji@271: ------------------------- yuuji@271: yuuji@271: When you input `tabular' environment, don't you think "I want YaTeX to yuuji@271: complete its argument toward my favorite one such as `{|c|c|c|}'..."? yuuji@271: Yes, you can define the function to complete arguments for any environment yuuji@271: and any LaTeX commands. yuuji@271: yuuji@271: yuuji@271: Procedure yuuji@271: --------- yuuji@271: yuuji@271: Here is the procedure to define add-in functions. yuuji@271: 1. Define the function yuuji@271: 2. Put the function into `yatexhks.el' yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * How the add-in function works:: yuuji@419: * How the function is called:: yuuji@419: * Useful functions for creating add-in:: yuuji@419: * Contribution:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: How the add-in function works, Next: How the function is called, Prev: Add-in functions, Up: Add-in functions yuuji@271: yuuji@271: How the add-in function works yuuji@271: ----------------------------- yuuji@271: yuuji@271: There are three types of add-in. yuuji@271: yuuji@271: 1. Option add-in yuuji@271: 2. argument add-in yuuji@271: 3. enclosing add-in yuuji@271: yuuji@271: "Option add-in" returns the LaTeX's optional parameters such as optional yuuji@271: strings after `\begin{ENV}', optional strings between a section-type yuuji@271: command and its first argument, and optional strings just after type yuuji@271: maketitle-type command. The following illustrates the name of add-in yuuji@271: functions, where underlined strings are generated by add-in functions. yuuji@271: yuuji@271: \begin{table}[ht] (Function name: YaTeX:table) yuuji@271: ~~~~ yuuji@271: \put(100,200){} (Function name: YaTeX:put) yuuji@271: ~~~~~~~~~ yuuji@271: \sum_{i=0}^{n} (Function name: YaTeX:sum) yuuji@271: ~~~~~~~~~~ yuuji@271: yuuji@271: Obviously, the function name is decided by concatenating the prefix yuuji@271: `YaTeX:' and LaTeX command's name. yuuji@271: yuuji@271: Another add-in type is "argument add-in", which completes arguments for yuuji@271: section-type commands. yuuji@271: yuuji@271: \newcommand{\foo}{bar} (Function name: YaTeX::newcommand) yuuji@271: ~~~~ ~~~ yuuji@271: yuuji@271: When the section-type command is inputted, the function named by yuuji@271: concatenating `YaTeX::' and section-type command, is called automatically yuuji@271: with an integer argument which indicates which argument of section-type yuuji@271: command is being read. Thus the add-in should determine the job referring yuuji@271: the value of its argument. yuuji@271: yuuji@271: "enclosing add-in" is for modifying and/or checking the region that will yuuji@271: be enclosed by section-type commands via `[prefix] S'. An enclosing yuuji@271: add-in function will be called with two arguments, beginning of the yuuji@271: enclosed region and end of the region. Suppose you want to enclose the yuuji@271: existing text `(a+b)/c' by `\frac{}'. yuuji@271: yuuji@271: a/c yuuji@271: | | yuuji@271: A B yuuji@271: yuuji@271: You do set-mark-command at point A and then move to point B. Typing yuuji@271: `[prefix] S' and input `frac' enclose the region like this; yuuji@271: yuuji@271: \frac{a/c} yuuji@271: yuuji@419: Normally, the expression `a/c' is translated to yuuji@419: `\frac{a}{c}'. An enclosing add-in is useful for modifying yuuji@419: `/' to `}{'. yuuji@271: yuuji@271: * Menu: yuuji@271: yuuji@419: * Defining option-add-in:: yuuji@419: * Defining argument-add-in:: yuuji@419: * Defining enclosing-add-in:: yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Defining option-add-in, Next: Defining argument-add-in, Prev: How the add-in function works, Up: How the add-in function works yuuji@271: yuuji@271: Defining `option add-in' yuuji@271: ........................ yuuji@271: yuuji@271: If you want `{|c|c|c|}' for all `tabular' environment, yuuji@271: yuuji@271: (defun YaTeX:tabular () yuuji@271: "{|c|c|c|}") yuuji@271: yuuji@271: is enough. If you want more complicated format, define as below. yuuji@271: yuuji@271: (defun YaTeX:tabular () yuuji@271: "{@{\\vrule width 1pt\\ }|||@{\\ \\vrule width 1pt}}") yuuji@271: yuuji@271: Note that the character `\' must be described as `\\' in Emacs-Lisp. The yuuji@271: next example reads the tabular format from keyboard. yuuji@271: (defun YaTeX:tabular () yuuji@271: (concat "{" (read-string "Rule: ") "}")) yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Defining argument-add-in, Next: Defining enclosing-add-in, Prev: Defining option-add-in, Up: How the add-in function works yuuji@271: yuuji@271: Defining `argument add-in' yuuji@271: .......................... yuuji@271: yuuji@271: This section describes how to define the add-in function for yuuji@271: `\newcommand'. yuuji@271: yuuji@271: The first argument of `\newcommand' begins always with `\'. The second yuuji@271: argument is usually so complex that we can not edit them in the yuuji@271: minibuffer. Here is the created function considering this. yuuji@271: yuuji@271: (defun YaTeX::newcommand (n) ;n is argument position yuuji@271: (cond yuuji@271: ((= n 1) ;1st argument is macro name yuuji@419: (read-string "Command: " "\\")) ;initial input `\' yuuji@271: ((= n 2) "") ;do nothing when reading arg#2 yuuji@271: (t nil))) yuuji@271: yuuji@271: Note that when the `argument add-in' function return `nil', normal yuuji@271: argument reader will be called. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Defining enclosing-add-in, Prev: Defining argument-add-in, Up: How the add-in function works yuuji@271: yuuji@271: Defining `enclosing add-in' yuuji@271: ........................... yuuji@271: yuuji@271: This section describes how to define the add-in function for text yuuji@271: enclosed by `\frac{}'. yuuji@271: yuuji@271: When enclosing the text `5/3' by `\frac{}', you might want to replace yuuji@271: `/' with `}{'. Enclosing function `YaTeX::frac-region' is called with two yuuji@271: arguments, beginning of enclosed text and end of enclosed text. The yuuji@271: function is expected to replace `/' with `}{'. Here is an example yuuji@271: expression. yuuji@271: yuuji@271: (defun YaTeX::frac-region (beg end) yuuji@271: (catch 'done yuuji@271: (while (search-forward "/" end t) yuuji@271: (goto-char (match-beginning 0)) yuuji@271: (if (y-or-n-p "Replace this slash(/) with `}{'") yuuji@419: (throw 'done (replace-match "}{"))) yuuji@271: (goto-char (match-end 0))))) yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: How the function is called, Next: Useful functions for creating add-in, Prev: How the add-in function works, Up: Add-in functions yuuji@271: yuuji@271: How the function is called yuuji@271: -------------------------- yuuji@271: yuuji@271: YaTeX calls the add-in functions for specified begin-type, section-type, yuuji@271: and maketitle-type command, if any. `Option add-in' functions for yuuji@271: begin-type are called when `\begin{ENV}' has been inserted, functions for yuuji@271: section-type are called just before input of the first argument, and yuuji@271: functions for maketitle-type is called after maketitle-type command has yuuji@271: been inserted. `Argument add-in' functions are called at each entry of yuuji@271: arguments for section-type commands. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Useful functions for creating add-in, Next: Contribution, Prev: How the function is called, Up: Add-in functions yuuji@271: yuuji@271: Useful functions for creating add-in yuuji@271: ------------------------------------ yuuji@271: yuuji@271: Many add-in functions for typical LaTeX commands are defined in yuuji@271: `yatexadd.el'. Those are also useful as references. Here are the short yuuji@271: descriptions on useful functions, where [F] means function, [A] means yuuji@271: arguments, [D] means description. yuuji@271: yuuji@271: `[F]' yuuji@271: YaTeX:read-position yuuji@271: `[A]' yuuji@271: Character list which can show up in the brackets yuuji@271: `[D]' yuuji@419: Return the location specifier such as `[htb]'. When yuuji@419: nothing is entered, omit [] itself. If the possible characters yuuji@419: are "htbp", call this function as yuuji@419: `(YaTeX:read-position "htbp")' yuuji@271: yuuji@271: `[F]' yuuji@271: YaTeX:read-coordinates yuuji@271: `[A]' yuuji@271: Base prompt, X-axis prompt, Y-axis prompt (each optional) yuuji@271: `[D]' yuuji@271: Read the coordinates with the prompt "BasePrompt X-axisPrompt:" for yuuji@419: X-axis, "BasePrompt Y-axisPrompt:" for Y-axis, and return it in the form yuuji@419: of "(X,Y)". The default prompts are `Dimension', `X', yuuji@419: `Y' respectively. yuuji@271: yuuji@271: `[F]' yuuji@271: YaTeX:check-completion-type yuuji@271: `[A]' yuuji@271: One of the symbols: 'begin, 'section, or 'maketitle yuuji@271: `[D]' yuuji@271: Check the current completion type is specified one and cause error yuuji@271: if not. The variable `YaTeX-current-completion-type' holds the symbol yuuji@271: according to the current completion type. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Contribution, Prev: Useful functions for creating add-in, Up: Add-in functions yuuji@271: yuuji@271: Contribution yuuji@271: ------------ yuuji@271: yuuji@271: If you make your own pretty function and you let it be in public, please yuuji@271: send me the function. I'm going to include it in the next release. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Add-in generator, Prev: Add-in functions, Up: Customizations yuuji@271: yuuji@271: Add-in generator yuuji@271: ================ yuuji@271: yuuji@271: First, don't forget to read the section of add-in functions *Note Add-in yuuji@271: functions::. If you easily understand how to define them, there's no need yuuji@271: to read this section. But being not familiar with Emacs-Lisp, when you yuuji@271: don't have clear idea what to do, this section describes how to get YaTeX yuuji@271: make add-in function. yuuji@271: yuuji@271: There are two methods of generation. One is for fully interactive yuuji@271: generator for beginners and another requires little knowledge of yuuji@271: Emacs-Lisp. yuuji@271: yuuji@271: yuuji@271: Generator for beginners yuuji@271: ----------------------- yuuji@271: The former generator is called by yuuji@271: `M-x YaTeX-generate' yuuji@271: yuuji@271: strokes. All you have to do is follow the guidances. Defying them may yuuji@271: cases the disaster (I wonder what is it???). So when you make some yuuji@271: mistake, it is recommendable to type `C-g' and start afresh. yuuji@271: yuuji@271: yuuji@271: Simple generator yuuji@271: ---------------- yuuji@271: yuuji@271: The latter generator is invoked by the next sequence. `M-x yuuji@471: YaTeX-generate-simple' This generator can make both yuuji@471: "option add-in" and "argument add-in" (*refer the yuuji@471: section add-in functions* *Note How the add-in yuuji@471: function works::), whereas `YaTeX-generate' cannot yuuji@471: make "argument addin". yuuji@271: yuuji@271: For example, assume you have the LaTeX command as follows. yuuji@271: yuuji@419: \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} yuuji@419: (A) (B) (1) (2) (3) yuuji@419: (A)Optional parameter to specify the position yuuji@419: One of t(top), b(bottom), l(left), r(right) yuuji@419: (B)Maximum size of frame yuuji@419: (1)1st argument is filename of EPS file yuuji@419: (2)2nd argument indicates yuuji@419: plain do nothing yuuji@419: frame make frame around image yuuji@419: dframe make double-frame around image yuuji@419: for included EPS file. yuuji@419: (3)Caption for the picture yuuji@271: yuuji@271: Now get start with generation. Typing `M-x YaTeX-generate-simple' yuuji@271: brings the prompt: yuuji@271: (O)ption? (A)rgument? yuuji@271: yuuji@271: yuuji@271: Generating "option add-in" yuuji@271: .......................... yuuji@271: yuuji@271: Since (A), (B) above are optional argument, all we have to do to yuuji@271: complete them is define the option add-in for them. Let's generate the yuuji@271: function to complete (A). yuuji@271: yuuji@271: M-x YaTeX-generate-simple RET yuuji@271: epsinput RET yuuji@271: o yuuji@271: yuuji@271: Typing as above leads the next prompt. yuuji@271: yuuji@271: Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit yuuji@271: yuuji@271: This asks that "Which type is the completion style of 1st argument?". yuuji@271: Here are the possible completion style. yuuji@271: yuuji@271: `String' yuuji@271: read plain string yuuji@271: `Complete' yuuji@271: read with completion yuuji@271: `File' yuuji@271: read file name yuuji@271: `Option' yuuji@271: read optional string (if string omitted, omit [] too) yuuji@271: `Position' yuuji@271: read positional option (like [htbp]) yuuji@271: `Coord.' yuuji@271: read coordinates yuuji@271: `Quit' yuuji@271: quit from generating yuuji@271: yuuji@271: Since (A) is the optional argument to specify the location of included yuuji@271: EPS file, the completion style is `Position', and the possible characters yuuji@271: are t, b, l, and r. To tell these information to generator, operate as yuuji@271: follows. yuuji@271: yuuji@419: Read type(1).... p yuuji@271: Acceptable characters: tblr RET yuuji@271: yuuji@271: (B) is coordinate. So its completion style is coOrd. We want a prompt yuuji@271: meaning "Maximum size" when completion. yuuji@271: yuuji@271: Read type(2).... o yuuji@271: Prompt for coordinates: Max size RET yuuji@271: yuuji@271: That's all for optional argument. Select quit. yuuji@271: yuuji@271: Read type(3).... q yuuji@271: yuuji@271: Then the generated option add-in function for \epsinput will be shown in yuuji@271: the next window. yuuji@271: yuuji@271: yuuji@271: Generating "argument add-in" yuuji@271: ............................ yuuji@271: yuuji@271: Next, create the argument add-in. The arguments for \epsinput are EPS yuuji@271: file name, framing style, and caption string in sequence. yuuji@271: yuuji@271: M-x YaTeX-generate-simple RET yuuji@271: epsinput RET yuuji@271: a yuuji@271: yuuji@271: Above key strokes bring the prompt that asks the number of argument. yuuji@271: Answer it with 3. yuuji@271: yuuji@271: How many arguments?: 3 RET yuuji@271: yuuji@271: Then the generator asks the completion style and prompt for completion. yuuji@271: Answer them. `f' for FileName and prompt string. yuuji@271: yuuji@271: Read type(1).... f yuuji@271: Prompt for argument#1 EPS file name RET yuuji@271: yuuji@271: The second argument is one of selected symbol. So the completion type yuuji@271: is `Completion'. yuuji@271: yuuji@271: Read type(2).... c yuuji@271: Prompt for argument#2 Include style RET yuuji@271: yuuji@271: Then all the candidates ready to be read. Type single RET after yuuji@271: entering all. yuuji@271: yuuji@419: Item[1](RET to exit): plain RET yuuji@419: Item[2](RET to exit): frame RET yuuji@419: Item[3](RET to exit): dframe RET yuuji@419: Item[4](RET to exit): RET yuuji@271: yuuji@271: The following prompt asks whether the entered string must belong to yuuji@271: candidates or not. In this case, since the argument must be one of yuuji@271: `plain', `frame', and `dframe', type `y'. yuuji@271: yuuji@271: Require match? (y or n) y yuuji@271: yuuji@271: The last argument is the caption string for which any completion is yuuji@271: needed. yuuji@271: yuuji@271: Read type(3).... s yuuji@271: Prompt for argument#3 Caption RET yuuji@271: default: Figure of RET yuuji@271: yuuji@271: Finally we'll get the argument add-in in the next window. yuuji@271: yuuji@271: yuuji@271: Contribution yuuji@271: ------------ yuuji@271: yuuji@271: If you get your own pretty function and you let it be in public, please yuuji@271: steel yourself in the happy atmosphere and do not send me the function. I yuuji@271: do know it is not fine because it is generated by yatexgen:-p. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Etcetera, Next: Copying, Prev: Customizations, Up: Top yuuji@271: yuuji@271: Etcetera yuuji@271: ******** yuuji@271: yuuji@271: The standard completion tables provided in `yatex.el' contain a few yuuji@271: LaTeX commands I frequently use. This is to lessen the key strokes to yuuji@271: complete entire word, because too many candidates rarely used often cause yuuji@271: too many hits. Therefore always try to use completion in order to enrich yuuji@271: your dictionary, and you will also find `Wild Bird' growing suitable for yuuji@271: your LaTeX style. yuuji@271: yuuji@271: The package name `Wild Bird' is the English translation of Japanese yuuji@271: title `Yachou', which is a trick on words of Japanese. yuuji@271: yuuji@271: yuuji@271:  yuuji@271: File: yatexe, Node: Copying, Prev: Etcetera, Up: Top yuuji@271: yuuji@271: Copying yuuji@271: ******* yuuji@271: yuuji@271: This program is distributed as a free software. You can yuuji@271: use/copy/modify/redistribute this software freely but with NO warranty to yuuji@271: anything as a result of using this software. Adopting code from this yuuji@271: program is also free. But I would not do contract act. yuuji@271: yuuji@472: This software can be treated with: "The 2-Clause BSD License" (since yuuji@472: 2017-09-09, yatex 1.80). yuuji@472: yuuji@271: Any reports and suggestions are welcome as long as I feel interests in yuuji@271: this software. My possible e-mail address is `yuuji@yatex.org'. (as of yuuji@472: Sep.2017) And there is mailing list for YaTeX. Although the common yuuji@271: language is Japanese, questions in English will be welcome. To join the yuuji@271: ML, send the mail whose subject is `append' to the address yuuji@271: `yatex@yatex.org. If you have some question, please ask to yuuji@271: `yatex-admin@yatex.org'. yuuji@271: yuuji@271: The specification of this software will be surely modified (depending on yuuji@271: my feelings) without notice :-p. yuuji@271: yuuji@271: yuuji@271: HIROSE Yuuji yuuji@271:  yuuji@271: Tag table: yuuji@419: Node: Top256 yuuji@419: Node: What is YaTeX?1583 yuuji@419: Node: Main features1956 yuuji@471: Node: Installation3591 yuuji@471: Node: Typesetting4368 yuuji@471: Node: Calling typesetter5489 yuuji@471: Node: Calling previewer8016 yuuji@471: Node: Printing out8377 yuuji@471: Node: %#notation8669 yuuji@517: Node: Changing typesetter9069 yuuji@517: Node: Splitting input files9433 yuuji@517: Node: Static region for typesetting10862 yuuji@517: Node: Special Filtering Region11991 yuuji@517: Node: Lpr format12723 yuuji@517: Node: Controlling which command to invoke13796 yuuji@517: Node: Editing %# notation14753 yuuji@517: Node: Completion15297 yuuji@517: Node: Begin-type completion15833 yuuji@517: Node: Section-type completion18687 yuuji@517: Node: view-sectioning21103 yuuji@517: Node: Label Generation22682 yuuji@517: Node: Large-type completion23582 yuuji@517: Node: Maketitle-type completion24228 yuuji@517: Node: Arbitrary completion24780 yuuji@517: Node: End completion25170 yuuji@517: Node: Accent completion25640 yuuji@517: Node: Image completion26257 yuuji@517: Node: Greek letters completion28512 yuuji@517: Node: Inserting parentheses29268 yuuji@517: Node: Local dictionaries29675 yuuji@517: Node: Commenting out30612 yuuji@517: Node: Cursor jump32071 yuuji@517: Node: Jump to corresponding object32362 yuuji@517: Node: Invoking image processor33762 yuuji@517: Node: Jump to main file35105 yuuji@517: Node: Jumping around the environment35471 yuuji@517: Node: Jumping to last completion position35889 yuuji@517: Node: Changing and Deleting36398 yuuji@517: Node: Changing LaTeX commands36779 yuuji@517: Node: Killing LaTeX commands37956 yuuji@517: Node: Filling39141 yuuji@517: Node: Updation of includeonly40996 yuuji@517: Node: What column41793 yuuji@517: Node: Intelligent newline42878 yuuji@517: Node: Usepackage checker44539 yuuji@517: Node: Online help45130 yuuji@517: Node: Browsing file hierarchy46805 yuuji@517: Node: Cooperation with other packages48542 yuuji@517: Node: Customizations49247 yuuji@517: Node: Lisp variables49543 yuuji@517: Node: All customizable variables50502 yuuji@517: Node: Sample definitions62467 yuuji@517: Node: Hook variables62980 yuuji@517: Node: Hook file63684 yuuji@517: Node: Add-in functions64023 yuuji@517: Node: How the add-in function works64861 yuuji@517: Node: Defining option-add-in67047 yuuji@517: Node: Defining argument-add-in67769 yuuji@517: Node: Defining enclosing-add-in68650 yuuji@517: Node: How the function is called69506 yuuji@517: Node: Useful functions for creating add-in70182 yuuji@517: Node: Contribution71592 yuuji@517: Node: Add-in generator71866 yuuji@517: Node: Etcetera77442 yuuji@517: Node: Copying78047 yuuji@271:  yuuji@271: End tag table