diff --git a/docs/yatex.ref b/docs/yatex.ref index 2a91c6d..72da127 100644 --- a/docs/yatex.ref +++ b/docs/yatex.ref @@ -8,7 +8,11 @@ �쒹�ł́Aprefix �L�[���J�X�^�}�C�Y�ł��邽��(�W���ł�C-c)����� [prefix] �ƕ\�L���܂��BC-c �̂܂ܕύX���Ă��Ȃ��ꍇ�A[prefix] a �� - C-c a ��\�킵�܂��B + C-c a ��\�킵�܂��Bbegin�^�R�}���h�Ƃ� \begin�`\end�̌`���̃R�} + ���h�Asection�^�R�}���h�Ƃ� \section{��}�̂悤�Ɉ��������R�}�� + �h�Alarge�^�R�}���h�Ƃ� {\tt } �̂悤�Ȓ����ʂň͂܂ꂽ�t�H���g/ + �T�C�Y�w��q�Amaketitle�^�R�}���h�Ƃ� \maketitle �̂悤�Ɉ����� + ����Ȃ��R�}���h���w���܂��B �y�⊮�z @@ -52,10 +56,10 @@ ���́AMS-DOS �ł͖����ł��B - [prefix] tr �̗̈�w��́A�������́A %#BEGIN �Ə����Ă���s����A - %#END �Ə����Ă���s�܂łł��B%#END ���ȗ�����ƁA%#BEGIN���當�� - ���܂ŁA�����ȗ�����ƁA�}�[�N�����ʒu����A�|�C���g�܂ł��w��̈� - �ƂȂ�܂��B + [prefix] tr �̗̈�w��́A�������́A %#BEGIN �Ə����Ă���s�� + ��A%#END �Ə����Ă���s�܂łł��B%#END ���ȗ�����ƁA%#BEGIN�� + �當�����܂ŁA�����ȗ�����ƃ}�[�N�����ʒu����A�|�C���g�܂ł��w + ��̈�ƂȂ�܂��B �y�J�[�\���W�����v�z @@ -110,7 +114,10 @@ ��item�̌����� [prefix] i ��LaTeX�R�}���h�ύX [prefix] c - \begin{}, \end{} �̊‹����𓯎��ɕύX���܂��B + \begin{}, \end{} �̍s�ŋN������Ɗ‹����𓯎��ɕύX���܂��B + section�^�R�}���h�̏�ŋN������ƃR�}���h��ύX���A�R�}���h�̈� + ���̈ʒu�ŋN������ƈ�����ύX���܂��Blarge�^�R�}���h�̏�ŋN�� + ����ƃt�H���g/�T�C�Y�w��q��ύX���܂��B ���R�}���h�폜 [prefix] k @@ -130,7 +137,7 @@ ��%# �L�@�̕ҏW [prefix] % ��tabular/array���ʒu�\�� [prefix] & ���I�����C���w���v [prefix] ? - ���I�����C���w���v [prefix] / + ���I�����C��apropos [prefix] / �����܂������s ESC RET �u���܂������s�v�� tabular, array, itemize, enumerate, list, diff --git a/docs/yatexadd.doc b/docs/yatexadd.doc index e90e188..1b7bb7e 100644 --- a/docs/yatexadd.doc +++ b/docs/yatexadd.doc @@ -5,14 +5,11 @@ �y�t���֐��Ƃ́z - begin �^�⊮�ŁA�utabular �‹�����͂��Ă��鎞�ɁA"{|c|c|c|}" �� - ���A�܂��Atable �‹��̓��͎���"[tbp]" �Ƃ����ꏏ�ɓ��͂���΂����� - �Ɂv�ȂǂƎv�����Ƃ͂���܂��񂩁B������񂱂���������͂���֐��� - �ȒP�ɃT�|�[�g�ł���ł��傤�B - - �������Atabular �‹��Ɍ��炸�ALaTeX �̊‹��̈����ɂ́A�e�l������ - ��̃t�H�[�}�b�g��������̂ł��B���Ƃ��΋Â����\���������� tabular - �‹��̈����́A���Ȃ蕡�G�Ȃ̂ŁA��̂悤�Ȏ������͊֐������A + begin �^�⊮�ŁA�utabular �‹�����͂��Ă��鎞�ɁA�킽���̍D�� + �̃X�^�C��������Ȃ��Ȃ��v�ȂǂƎv�����Ƃ͂���܂��񂩁Btabular + �‹��Ɍ��炸�ALaTeX �̊‹��̈����ɂ́A�e�l�����܂�̃t�H�[�}�b�g + ��������̂ł��B���Ƃ��΋Â����\���������� tabular�‹��̈����́A + ���Ȃ蕡�G�Ȃ̂ŁA�f�t�H���g�̎������͊֐������A "{@{\vrule width 1pt\ }|||@{\ \vrule width 1pt}}" diff --git a/docs/yatexe.tex b/docs/yatexe.tex index 3c6d5a6..03d3e27 100644 --- a/docs/yatexe.tex +++ b/docs/yatexe.tex @@ -31,11 +31,11 @@ * Typesetting:: * %# notation:: * Completion:: +* Local dictionaries:: * Commenting out:: * Cursor jump:: * Changing and Deleting:: * Filling an item:: -* Local dictionaries:: * Updation of @code{\includeonly}:: * What column?:: * Intelligent newline:: @@ -70,10 +70,16 @@ * view-sectioning:: +Changing and Deleting + +* Changing La@TeX{} commands:: +* Killing La@TeX{} commands:: + Customizations * Lisp variables:: * Add-in functions:: +* Add-in generator:: Lisp variables @@ -81,6 +87,18 @@ * Sample definitions:: * Hook variables:: * Hook file:: + +Procedure + +* How the add-in function works?:: +* How the function is called:: +* Useful functions for creating add-in:: +* Contribution:: + +How the add-in function works? + +* Defining `option add-in':: +* Defining `argument add-in':: @end menu @node What is YaTeX?, Main features, Top, Top @@ -108,6 +126,7 @@ (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) @item Enclosing text into La@TeX{} environments or commands (@kbd{C-u} @var{AboveKeyStrokes}) +@item Displaying the structure of text at entering sectioning delimiters @item Learning unknown/new La@TeX{} commands for the next completion @item Argument reading with a guide for complicated La@TeX{} commands @item Generating argument-readers for new/unsupported commands(@file{yatexgen}) @@ -216,7 +235,7 @@ skip this by invoking it with universal-argument as follows: @example -C-u [prefix] tl + C-u [prefix] tl @end example @node %# notation, Completion, Typesetting, Top @@ -391,7 +410,7 @@ When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are automatically erased. -@node Completion, Commenting out, %# notation, Top +@node Completion, Local dictionaries, %# notation, Top @comment node-name, next, previous, up @chapter Completion @cindex completion @@ -583,7 +602,7 @@ @cindex number of argument @example -C-u 2 [prefix] s (or ESC 2 [prefix] s) + C-u 2 [prefix] s (or ESC 2 [prefix] s) @end example @noindent @@ -603,12 +622,6 @@ arguments by calling the completion with different universal argument again. - The special number of argument 0 makes YaTeX use read-string to -read the first argument instead of completing-read. It is more -comfortable to enter first argument without completion when you -put section title which contains space character. Normally, such -sectioning commands as chapter, section, paragraph..., have -argument 0 in the completion table. Invoking section-type completion with @code{[Prefix] S} (Capital `S') includes the region as the first argument of section-type command. @@ -836,7 +849,36 @@ @kbd{;} or @kbd{/} after universal-argument(@kbd{C-u}) which forces @kbd{;} and @kbd{/} to work as math-prefix. -@node Commenting out, Cursor jump, Completion, Top +@node Local dictionaries, Commenting out, Completion, Top +@comment node-name, next, previous, up +@chapter Local dictionaries +@cindex local dictionaries +@cindex nervous users + + Tables for completion consist of three dictionaries; `standard +dictionary' built in @file{yatex.el}, `user dictionary' for your common +private commands, and `local dictionary' that is effective in a certain +directory. + + When you input the command unknown to YaTeX at a completion in the +minibuffer, YaTeX asks you with the following prompt; + +@example + `foo' is not in table. Register into: U)serTable L)ocal N)one +@end example + +@noindent +In this menu, typing `u' updates your `user dictionary', `l' updates your +local dictionary, and `n' updates no dictionary and throws the word away. + + If you find this switching feature meaningless and bothersome, put the +next expression into your @file{~/.emacs} + +@lisp + (setq YaTeX-nervous nil) +@end lisp + +@node Commenting out, Cursor jump, Local dictionaries, Top @comment node-name, next, previous, up @chapter Commenting out @cindex commenting out @@ -918,18 +960,20 @@ La@TeX{} command of last place. YaTeX recognize the followings as pairs that have relation each other. -@table +@itemize @bullet @item @code{\begin@{@}} <-> @code{\end@{@}} @item @code{%#BEGIN} <-> @code{%#END} @item @code{\label@{@}} <-> @code{\ref@{@}} @item @code{\include(\input)} -> included file @item @code{\bibitem@{@}} <-> @code{\cite@{@}} -@end table +@end itemize - On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} -moves the cursor to the corresponding @code{\end},@code{\begin} line, if -its partner really exists. The movement on the line @code{%#BEGIN} and -@code{%#END} are the same. + On a @code{\begin},@code{\end} line, typing @kbd{[prefix] g} moves the +cursor to the corresponding @code{\end},@code{\begin} line, if its partner +really exists. The behaviour on the line @code{%#BEGIN} and @code{%#END} +are the same. Note that if the correspondent of @code{label/ref} or +@code{cite/bibitem} exists in another file, that file have to be opend to +make a round trip between references by @kbd{[prefix] g}. If you type @code{[prefix] g} on the line of @code{\include@{chap1@}}, typically in the main text, YaTeX switches buffer to @file{chap1.tex}. @@ -978,17 +1022,58 @@ @cindex prefix c @cindex prefix k -@kbd{[prefix] c} can change the name of the corresponding environment -declaration. @kbd{[prefix] k} works as follows: +@menu +* Changing La@TeX{} commands:: +* Killing La@TeX{} commands:: +@end menu + +@node Changing La@TeX{} commands, Killing La@TeX{} commands, Changing and Deleting, Changing and Deleting +@comment node-name, next, previous, up +@section Changing La@TeX{} commands + +@kbd{[prefix] c} can change the various (La)@TeX{} commands. This can +change the followings. +@itemize @bullet +@item Environment names +@item Section-type commands +@item Argument of section-type commands +@item Optional parameters (enclosed by []) of section-type commands +@item Font/size designators +@end itemize + + Typing @kbd{[prefix] c} on one of above objects you want to change +brings a suitable reading function sometimes with completion. +Note: If you want to change the argument of section-type command that +contains other La@TeX{} commands, type @kbd{[prefix] c} either of +surrounding braces of the argument in order to make YaTeX ignore the +internal La@TeX{} sequences as an object of changing. Anyway, it is +very difficult to know which argument position the cursor belongs because +the La@TeX{} commands can be nested and braces can freely emerge. So keep +it mind to put the cursor on a brace when you are thinking of changing a +complicated argument. + +@node Killing La@TeX{} commands, , Changing La@TeX{} commands, Changing and Deleting +@comment node-name, next, previous, up +@section Killing La@TeX{} commands +@cindex Killing La@TeX{} commands + + @kbd{[prefix] k} kills the La@TeX{} commands sometimes with their +arguments. Following table illustrates the correspondence of the invoking +position and what is killed. @example [Invoking position] [action] -\begin,\end line kill \begin,\end pairs -%BEGIN, %END line kill %BEGIN,%END pairs +\begin, \end line kill \begin,\end pairs +%#BEGIN, %#END line kill %#BEGIN,%#END pairs on a Section-type command kill section-type command on a parenthesis kill parentheses @end example +Note that when killing @code{\begin, \end} or @code{%#BEGIN, %#END} pair, +the lines @code{\begin, \end} or @code{%#BEGIN, %#END} exist will be +killed entirely. So take care not to create any line that contains more +than one @code{\begin} or so. + While all operations above are to kill `containers' which surround some text, universal argument (@kbd{C-u}) for these commands kills not only `containers' but also `contents' of them. See below as a sample. @@ -999,7 +1084,7 @@ ~(cursor) @end example -@node Filling an item, Local dictionaries, Changing and Deleting, Top +@node Filling an item, Updation of @code{\includeonly}, Changing and Deleting, Top @comment node-name, next, previous, up @chapter Filling an item @cindex filling an item @@ -1029,36 +1114,7 @@ for Emacs-Lisp, name a newcommand for `itemize' beginning with @code{\item} such as @code{\itembf}, not @code{\bfitem}. -@node Local dictionaries, Updation of @code{\includeonly}, Filling an item, Top -@comment node-name, next, previous, up -@chapter Local dictionaries -@cindex local dictionaries -@cindex nervous users - - Tables for completion consist of three dictionaries; `standard -dictionary' built in @file{yatex.el}, `user dictionary' for your common -private commands, and `local dictionary' that is effective in a certain -directory. - - When you input the command unknown to YaTeX at a completion in the -minibuffer, YaTeX asks you with the following prompt; - -@example - `foo' is not in table. Register into: U)serTable L)ocal N)one -@end example - -@noindent -In this menu, typing `u' updates your `user dictionary', `l' updates your -local dictionary, and `n' updates no dictionary and throws the word away. - - If you find this switching feature meaningless and bothersome, put the -next expression into your @file{~/.emacs} - -@lisp - (setq YaTeX-nervous nil) -@end lisp - -@node Updation of @code{\includeonly}, What column?, Local dictionaries, Top +@node Updation of @code{\includeonly}, What column?, Filling an item, Top @comment node-name, next, previous, up @chapter Updation of @code{\includeonly} @cindex includeonly @@ -1262,6 +1318,7 @@ @menu * Lisp variables:: * Add-in functions:: +* Add-in generator:: @end menu @node Lisp variables, Add-in functions, Customizations, Customizations @@ -1297,7 +1354,9 @@ Here are the customizable variables of yatex-mode. Each value setq-ed in @file{~/.emacs} is preferred and that of defined in @file{yatex.el} is -neglected. Parenthesized contents stands for the default value. +neglected. Parenthesized contents stands for the default value. When you +are to change some of these variables, see more detailed documentation of +the variable by @kbd{M-x describe-variable}. @defvar YaTeX-prefix Prefix key stroke (@kbd{C-c}) @@ -1435,6 +1494,18 @@ Disable [prefix] b ?? shortcut (@code{nil)} @end defvar +@defvar YaTeX-hilit-pattern-adjustment-private +List of the list that contain the regular expression and the symbol of +logical meaning of the string that matches the pattern. See also the +value from @code{(assq 'yatex-mode hilit-patterns-alist)} and the value of +@code{YaTeX-hilit-pattern-adjustment-default} (and even the document of +hilit19.el). +@end defvar + +@defvar YaTeX-sectioning-level +Alist of LaTeX's sectioning command vs its height. +@end defvar + @node Sample definitions, Hook variables, All customizable variables, Lisp variables @comment node-name, next, previous, up @subsection Sample definitions @@ -1482,16 +1553,385 @@ this file at the initialization of itself. Using @file{yatexhks.el} makes @code{yatex-mode-load-hook} unnecessary. -@node Add-in functions, , Lisp variables, Customizations +@node Add-in functions, Add-in generator, Lisp variables, Customizations @comment node-name, next, previous, up @section Add-in functions @cindex add-in functions +@cindex yatexadd.el You can easily define a function to input detailed arguments -with completion according to La@TeX{} environments or commands. To -know the way to define these functions, see also @file{yatexadd.doc} in -this package please. +with completion according to La@TeX{} environments or commands. +@c @node What is add-in functions?, , Add-in functions, Add-in functions +@comment node-name, next, previous, up +@subsection What is add-in functions? +@cindex tabular + + When you input @code{tabular} environment, don't you think ``I want +YaTeX to complete its argument toward my favorite one such as +@code{@{|c|c|c|@}}...''? Yes, you can define the function to complete +arguments for any environment and any La@TeX{} commands. + +@subsection Procedure + + Here is the procedure to define add-in functions. +@enumerate +@item +Define the function +@item +Put the function into @file{yatexhks.el} +@end enumerate + +@menu +* How the add-in function works?:: +* How the function is called:: +* Useful functions for creating add-in:: +* Contribution:: +@end menu + +@node How the add-in function works?, How the function is called, Add-in functions, Add-in functions +@comment node-name, next, previous, up +@subsection How the add-in function works? + + There are two kinds of add-in. @dfn{Option add-in} returns the +La@TeX{}'s optional parameters such as optional strings after +@code{\begin@{ENV@}}, optional strings between a section-type command +and its first argument, and optional strings just after type +maketitle-type command. The following illustrates the name of add-in +functions, where underlined strings are generated by add-in functions. + +@display +\begin{table}[ht] (Function name: YaTeX:table) + ~~~~ +\put(100,200){} (Function name: YaTeX:put) + ~~~~~~~~~ +\sum_{i=0}^{n} (Function name: YaTeX:sum) + ~~~~~~~~~~ +@end display + + Obviously, the function name is decided by concatenating the prefix +`YaTeX:' and La@TeX{} command's name. + + Another add-in type is @dfn{argument add-in}, which completes arguments +for section-type commands. + +@display +\newcommand{\foo}{bar} (Function name: YaTeX::newcommand) + ~~~~ ~~~ +@end display + + When the section-type command is inputted, the function named by +concatenating `YaTeX::' and section-type command, is called automatically +with an integer argument which indicates which argument of section-type +command is being read. Thus the add-in should determine the +job refering the value of its argument. + +@menu +* Defining `option add-in':: +* Defining `argument add-in':: +@end menu + +@node Defining `option add-in', Defining `argument add-in', How the add-in function works?, How the add-in function works? +@comment node-name, next, previous, up +@subsubsection Defining `option add-in' + + If you want @code{@{|c|c|c|@}} for all @code{tabular} environment, + +@lisp + (defun YaTeX:tabular () + "{|c|c|c|}") +@end lisp + +@noindent +is enough. If you want more complicated format, define as below. + +@lisp + (defun YaTeX:tabular () + "@{@@@{\\vrule width 1pt\\ @}|||@@@{\\ \\vrule width 1pt@}@}") +@end lisp + +@noindent +Note that the character @code{\} must be described as @code{\\} in +Emacs-Lisp. The next example reads the tabular format from keyboard. +@lisp + (defun YaTeX:tabular () + (concat "{" (read-string "Rule: ") "}")) +@end lisp + +@node Defining `argument add-in', , Defining `option add-in', How the add-in function works? +@comment node-name, next, previous, up +@subsubsection Defining `argument add-in' + + This section describes how to define the add-in function for +@code{\newcommand}. + + The first argument of @code{\newcommand} begins always with @code{\}. +The second argument is usually so complex that we can not edit them in the +minibuffer. Here is the created function considering this. + +@lisp + (defun YaTeX::newcommand (n) ;n is argument position + (cond + ((= n 1) ;1st argument is macro name + (read-string "Command: " "\\")) ;initial input `\' + ((= n 2) "") ;do nothing when reading arg#2 + (t nil))) +@end lisp + + Note that when the `argument add-in' function return `nil', normal +argument reader will be called. + +@node How the function is called, Useful functions for creating add-in, How the add-in function works?, Add-in functions +@comment node-name, next, previous, up +@subsection How the function is called + + YaTeX calls the add-in functions for specified begin-type, section-type, +and maketitle-type command, if any. `Option add-in' functions for +begin-type are called when @code{\begin@{ENV@}} has been inserted, +functions for section-type are called just before input of the first +argument, and functions for maketitle-type is called after maketitle-type +command has been inserted. `Argument add-in' functions are called at each +entry of arguments for section-type commands. + +@node Useful functions for creating add-in, Contribution, How the function is called, Add-in functions +@comment node-name, next, previous, up +@subsection Useful functions for creating add-in + + Many add-in functions for typical La@TeX{} commands are defined in +@file{yatexadd.el}. Those are also useful as references. Here are the +short descriptions on useful functions, where [F] means function, [A] +means arguments, [D] means description. + +@itemize +@item [F] +YaTeX:read-position +@itemx [A] +Character list which can show up in the brackets +@itemx [D] + Return the location specifier such as `[htb]'. When +nothing is entered, omit [] itself. If the possible characters +are "htbp", call this function as +@code{(YaTeX:read-position "htbp")} + +@item [F] +YaTeX:read-coordinates +@itemx [A] +Base prompt, X-axis prompt, Y-axis prompt (each optional) +@itemx [D] + Read the coodinates with the prompt ``BasePrompt X-axisPrompt:'' for +X-axis, ``BasePrompt Y-axisPrompt:'' for Y-axis, and return it in the form +of ``(X,Y)''. The default prompts are @code{Dimention}, @code{X}, +@code{Y} respectively. + +@item [F] +YaTeX:check-comletion-type +@itemx [A] +One of the symbols: 'begin, 'section, or 'maketitle +@itemx [D] + Check the current completion type is specified one and cause error if +not. The variable @code{YaTeX-current-completion-type} holds the symbol +according to the current completion type. +@end itemize + +@node Contribution, , Useful functions for creating add-in, Add-in functions +@comment node-name, next, previous, up +@subsection Contribution + + If you make your own pretty function and you let it be in public, please +send me the function. I'm going to include it in the next release. + +@node Add-in generator, , Add-in functions, Customizations +@comment node-name, next, previous, up +@section Add-in generator + + First, don't forget to read the section of add-in functions @ref{Add-in +functions}. If you easily understand how to define them, there's no need +to read this section. But being not familiar with Emacs-Lisp, when you +don't have clear idea what to do, this section describes how to get YaTeX +make add-in function. + + There are two methods of generation. One is for fully interactive +generator for beginners and another requires little knowledge of +Emacs-Lisp. + +@subsection Generator for beginners + The former generator is called by +@center @kbd{M-x YaTeX-generate} + +@noindent +strokes. All you have to do is follow the guidances. Defying them may cases +the disaster (I wonder what is it???). So when you make some mistake, it +is recommendable to type @kbd{C-g} and start afresh. + +@subsection Simple generator + + The latter generator is invoked by the next sequence. +@center @kbd{M-x YaTeX-generate-simple} +This generator can make both ``option add-in'' and ``argument add-in'' +(@emph{refer the section add-in functions} +@ref{How the add-in function works?}), whereas @code{YaTeX-generate} +cannot make ``argument addin''. + + For example, assume you have the LaTeX command as follows. + +@example + \epsinput[t](250,50){hoge.eps}{plain}{Picture of foo} + (A) (B) (1) (2) (3) + (A)Optional parameter to specify the position + One of t(top), b(bottom), l(left), r(right) + (B)Maximum size of frame + (1)1st argument is filename of EPS file + (2)2nd argument indicates + plain do nothing + frame make frame around image + dframe make double-frame around image + for included EPS file. + (3)Caption for the picture +@end example + + Now get start with generation. Typing @kbd{M-x YaTeX-generate-simple} +brings the prompt: +@display + (O)ption? (A)rgument? +@end display + +@subsubsection Generating ``option add-in'' +@cindex option add-in + + Since (A), (B) above are optional argument, all we have to do to +complete them is define the option add-in for them. Let's generate the +function to complete (A). + +@display + M-x YaTeX-generate-simple RET + epsinput RET + o +@end display + +@noindent +Typing as above leads the next prompt. + +@display +Read type(1): (S)tring (C)omplete (F)ile ([)option (P)osition co(O)rd. (q)uit +@end display + +@noindent + This asks that ``Which type is the completion style of 1st argument?''. +Here are the possible completion style. + +@table @code +@item String +read plain string +@item Complete +read with completion +@item File +read file name +@item Option +read optional string (if string omitted, omit [] too) +@item Position +read positional option (like [htbp]) +@item Coord. +read coodinates +@item Quit +quit from genarating +@end table + + Since (A) is the optional argument to specify the location of included +EPS file, the completion style is @code{Position}, and the possible +characters are t, b, l, and r. To tell these information to generator, +operate as follows. + +@display + Read type(1).... p + Acceptable characters: tblr RET +@end display + + (B) is coordinate. So its completion style is coOrd. We want a prompt +meaning ``Maximum size'' when completion. + +@display + Read type(2).... o + Prompt for coordinates: Max size RET +@end display + + That's all for optional argument. Select quit. + +@display + Read type(3).... q +@end display + + Then the generated option add-in function for \epsinput will be shown in +the next window. + +@subsubsection Generating ``argument add-in'' +@cindex argument add-in + + Next, create the argument add-in. The arguments for \epsinput are EPS +file name, framing style, and caption string in sequence. + +@display + M-x YaTeX-generate-simple RET + epsinput RET + a +@end display + + Above key strokes bring the prompt that asks the number of argument. +Answer it with 3. + +@display + How many arguments?: 3 RET +@end display + + Then the generator asks the completion style and prompt for completion. +Answer them. @kbd{f} for FileName and prompt string. + +@display + Read type(1).... f + Prompt for argument#1 EPS file name RET +@end display + + The second argument is one of selected symbol. So the completion type +is @code{Completion}. + +@display + Read type(2).... c + Prompt for argument#2 Include style RET +@end display + + Then all the candidates ready to be read. Type single RET after +entering all. + +@display + Item[1](RET to exit): plain RET + Item[2](RET to exit): frame RET + Item[3](RET to exit): dframe RET + Item[4](RET to exit): RET +@end display + + The following prompt asks whether the entered string must belong to +candidates or not. In this case, since the argument must be one of +@code{plain}, @code{frame}, and @code{dframe}, type @code{y}. + +@display + Require match? (y or n) y +@end display + + The last argument is the caption string for which any completion is +needed. + +@display + Read type(3).... s + Prompt for argument#3 Caption RET + default: Figure of RET +@end display + + Finally we'll get the argument add-in in the next window. + +@subsection Contribution + + If you get your own pretty function and you let it be in public, please +steel yourself in the happy atomospher and do not send me the function. +I do know it is not fine because it is generated by yatexgen:-p. @node Etcetera, Copying, Customizations, Top @comment node-name, next, previous, up @@ -1514,7 +1954,7 @@ as a result of using this software. However, any reports and suggestions are welcome as long as I feel interests in this software. My possible e-mail address is `yuuji@@ae.keio.ac.jp'. -(up to Mar.1993 at least) +(up to Mar.1995 at least) The specification of this software will be surely modified (depending on my feelings) without notice :-p. diff --git a/docs/yatexj.tex b/docs/yatexj.tex index 197859c..db0f922 100644 --- a/docs/yatexj.tex +++ b/docs/yatexj.tex @@ -25,15 +25,15 @@ * Main features:: ��ȋ@�\ * Installation:: �C���X�g�[�� * Invocation:: �O���R�}���h�̋N�� -* %#�L�@:: +* %#notation :: %#�L�@ * Completion:: �⊮���� +* Local dictionary:: ���[�J������ * Commenting out:: �R�����g�A�E�g * Cursor jump:: �J�[�\���W�����v * Modifying/Deleting:: �ύX/�폜 * Filling item:: item�̌����� -* Local dictionary:: ���[�J������ * Includeonly:: �����includeonly -* Where am I?:: +* What column:: �����͂ǂ�? * Intelligent newline:: ���܂������s * Online help:: �I�����C���w���v * Cooperation with other packages:: ���p�b�P�[�W�Ƃ̘A�g @@ -57,6 +57,7 @@ �X�g�̕ҏW���x�����܂��B����� La@TeX{} �R�}���h�̃I�����C���w���v�� ���}�j���A���𒲂ׂ��Ԃ��y�����܂��B + English manual @xref{Top, , , yatexe,YaTeX English info} @node Main features, Installation, Intro, Top @comment node-name, next, previous, up @@ -71,7 +72,8 @@ �R�}���h�̕⊮���� (@kbd{C-c b}, @kbd{C-c s}, @kbd{C-c l}, @kbd{C-c m}) @item ���ɓ��͂����e�L�X�g���‹���R�}���h�����̒��Ɏ�荞�ފ���⊮ -(@kbd{C-u} �ʏ�⊮�L�[) +(@kbd{C-u} +�ʏ�⊮�L�[) +@item �Z�N�V������؂���͎��̕����\���A�E�g���C���\�� @item �⊮�����̊w�K @item La@TeX{} �̊‹���R�}���h�ɉ������K�C�h�t���������� @item �쒹�ɂȂ��K�C�h�t���������͊֐��̎�������(@file{yatexgen.el}) @@ -119,7 +121,7 @@ �ɕς��܂��B -@node Invocation, %#�L�@, Installation, Top +@node Invocation, %#notation , Installation, Top @comment node-name, next, previous, up @chapter latex�R�}���h�N�� @cindex prefix key @@ -164,9 +166,9 @@ �^�C�v�Z�b�^���N������ƁA�ҏW�E�B���h�E��2�‚ɕ�������A�Е��̃E�B���h �E�Ƀ^�C�v�Z�b�g��ʂ��\������܂��B�o�͂���郁�b�Z�[�W�ƘA�����^�C�v�Z�b �g�o�b�t�@�͎����I�ɃX�N���[�����܂��B�����A�r���ŃG���[���N�����Ď~�܂��� -���܂����ꍇ�ɂ̓^�C�v�Z�b�g�o�b�t�@�Ɉڂ�A(@kbd{^Xo}) �^�C�v�Z�b�^�̏o�� -�Ă��� ? �v�����v�g�ɑ΂��āA@kbd{x} (�����̒��f)�Ȃǂ̎w���𑗂邱�Ƃ��� -���܂��B�G���[���C������ꍇ�́A +���܂����ꍇ�ɂ̓^�C�v�Z�b�g�o�b�t�@�Ɉڂ�A(@kbd{C-x o}) �^�C�v�Z�b�^�̏o +���Ă��� ? �v�����v�g�ɑ΂��āA@kbd{x} (�����̒��f)�Ȃǂ̎w���𑗂邱�Ƃ� +�ł��܂��B�G���[���C������ꍇ�́A @table @kbd @item [prefix] ' @@ -207,7 +209,7 @@ @end table @cindex �y�[�W�m�F�ȗ�lpr�N��[�ւ��������ɂ񂵂悤��₭lpr���Ƃ�] -@node %#�L�@, Completion, Invocation, Top +@node %#notation , Completion, Invocation, Top @comment node-name, next, previous, up @chapter %#�L�@ @@ -222,7 +224,7 @@ * Editing %# notation:: %#�L�@�̕ҏW @end menu -@node Changing typesetter, Splitting input files, %#�L�@, %#�L�@ +@node Changing typesetter, Splitting input files, %#notation , %#notation @comment node-name, next, previous, up @section �^�C�v�Z�b�g�p�R�}���h�ύX @@ -238,7 +240,7 @@ @cindex �^�C�v�Z�b�^�̎g������[�����ӂ��‚��̂‚����킯] -@node Splitting input files, Fix region for typesetting, Changing typesetter, %#�L�@ +@node Splitting input files, Fix region for typesetting, Changing typesetter, %#notation @comment node-name, next, previous, up @section ���̓t�@�C������ @@ -259,7 +261,7 @@ @cindex ghostview @example - %#!jlatex main ; dvi2ps main.dvi > main + %#!jlatex main ; dvi2ps main.dvi > main @end example �Ȃ��A���̍s�̍Ō�̒P��̃s���I�h�ȑO���u���C���t�@�C���v�̃x�[�X @@ -284,7 +286,7 @@ -@node Fix region for typesetting, lpr format, Splitting input files, %#�L�@ +@node Fix region for typesetting, lpr format, Splitting input files, %#notation @comment node-name, next, previous, up @section �̈�̌Œ� @cindex �Œ�̈�̃^�C�v�Z�b�g[���Ă���悤�����̂����ӂ��‚�] @@ -296,9 +298,9 @@ �����A�K�����܂����̈���^�C�v�Z�b�g�������ꍇ�́A���̗̈�� @example - %#BEGIN - <�n�������̈�> - %#END + %#BEGIN + <�n�������̈�> + %#END @end example @noindent @@ -335,10 +337,10 @@ �̏����Y��ɂ͏\�������Ӊ������B @cindex �����t�@�C���̕ҏW[�Ȃ����ӂ�����̂ւ񂵂䂤] -@node Require, lpr format, Fix region for typesetting, %#�L�@ +@node Require, lpr format, Fix region for typesetting, %#notation @comment node-name, next, previous, up -@node lpr format, Editing %# notation, Fix region for typesetting, %#�L�@ +@node lpr format, Editing %# notation, Fix region for typesetting, %#notation @comment node-name, next, previous, up @section lpr�t�H�[�}�b�g @cindex lpr�ӂ��[�܂���[lpr�ӂ����܂‚�] @@ -383,7 +385,7 @@ @noindent �ȂǂƂ���̂��֗���������܂���B -@node Editing %# notation, , lpr format, %#�L�@ +@node Editing %# notation, , lpr format, %#notation @comment node-name, next, previous, up @section %#�L�@���̂̕ҏW @cindex %#���ق��������̂ւ񂵂イ[%#���ق��������̂ւ񂵂䂤] @@ -410,7 +412,7 @@ @code{%#BEGIN}, @code{%#END} �������I�ɏ�������܂��B @cindex lpr�t�H�[�}�b�g�̕ύX[lpr�ӂ����܂‚Ƃ̂ւ񂱂�] -@node Completion, Commenting out, %#�L�@, Top +@node Completion, Local dictionary, %#notation , Top @comment node-name, next, previous, up @chapter �⊮���� @@ -552,7 +554,7 @@ �Ŏ��s���܂��B@kbd{[prefix] s} ����͂���ƃ~�j�o�b�t�@�ɁA @example - (C-v for view) \???@{@} (default documentstyle): + (C-v for view-section) \???@{@} (default documentstyle): @end example @noindent @@ -562,7 +564,7 @@ ��⊮�@�\���L���ł��B ���ɁA@{@}�̒��g�̓��͂𑣂��A @example - \section@{???@}: + \section@{???@}: @end example @noindent @@ -570,30 +572,30 @@ ���Ƃ��΁A @example - (C-v for view) \???@{@} (default documentstyle): section - \section@{???@}: �ړI + (C-v for view-section) \???@{@} (default documentstyle): section + \section@{???@}: �ړI @end example @noindent �̂悤�ɓ��͂����ꍇ�́A���͒��� @example - \section@{�ړI@} + \section@{�ړI@} @end example @noindent ���}������A @example - (C-v for view) \???@{@} (default section): vspace* - \vspace*@{???@}: + (C-v for view-section) \???@{@} (default section): vspace* + \vspace*@{???@}: @end example @noindent �̂悤��@{@}�̒��g���ȗ������Ƃ��́A @example - \vspace*@{@} + \vspace*@{@} @end example @noindent @@ -601,13 +603,12 @@ @menu * 2�ˆȏ�̈������Ƃ� section�^�R�}���h:: -* Input argument without copletion:: �������͎��ɕ⊮���Ȃ� * Enclose region-type command:: * Recursive completion:: �ċA�⊮ * view-sectioning:: �Z�N�V������؂�̃A�E�g���C���\�� @end menu -@node 2�ˆȏ�̈������Ƃ� section�^�R�}���h, Input argument without copletion, section�^�⊮, section�^�⊮ +@node 2�ˆȏ�̈������Ƃ� section�^�R�}���h, Enclose region-type command, section�^�⊮, section�^�⊮ @comment node-name, next, previous, up @subsection 2�ˆȏ�̈������Ƃ� section�^�R�}���h @cindex ����[�Ђ�����] @@ -625,7 +626,7 @@ �� section �^�⊮���Ăяo������A @example - (Ctrl-v for view) \???@{@} (default vspace*): addtolength + (Ctrl-v for view-section) \???@{@} (default vspace*): addtolength \addtolength@{???@}: \topmargin Argument 2: 8mm @end example @@ -640,19 +641,8 @@ ���B @cindex �����̌���ς���[�Ђ������̂�������������] -@node Input argument without copletion, Enclose region-type command, 2�ˆȏ�̈������Ƃ� section�^�R�}���h, section�^�⊮ -@comment node-name, next, previous, up -@subsection �������͎��ɕ⊮���Ȃ� -@cindex �������͎��ɕ⊮���Ȃ�[�Ђ������ɂ䂤��悭���ɂق��񂵂Ȃ�] - �Ȃ��A���ʂȗ�Ƃ��Ĉ���0���w�肷��ƁA�������̓��͎��ɕ⊮���͂ł͂� -���A�P���ȕ�������͂��g�p����悤�ɂȂ�܂��B�i�����w�肷��@samp{chapter} -�� @samp{section}�Ȃǂ͑������̒i���^�C�g�����͎��ɁA�X�y�[�X���܂߂邱 -�Ƃ�����̂ŁA�⊮���͂͋p���Ă���܂ɂȂ�܂��B�W���ݒ�ł́A�����̒i�� -�w��R�}���h(chapter, section, paragraph �Ȃ�)�Ɉ���0�̎w�肪���ߍ��܂�� -���܂��B - -@node Enclose region-type command, Recursive completion, Input argument without copletion, section�^�⊮ +@node Enclose region-type command, Recursive completion, 2�ˆȏ�̈������Ƃ� section�^�R�}���h, section�^�⊮ @comment node-name, next, previous, up @subsection ���ɏ������e�L�X�g������ @cindex ����[������] @@ -705,7 +695,7 @@ ��large�^�⊮�̊J�n�ł��B@kbd{[prefix] l} �������ƁA�~�j�o�b�t�@�� @example - @{\??? @} (default large): + @{\??? @} (default large): @end example @noindent @@ -796,7 +786,7 @@ �������ƁA�~�j�o�b�t�@�� @example - 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b + 1:` 2:' 3:^ 4:" 5:~ 6:= 7:. u v H t c d b @end example @noindent @@ -804,14 +794,14 @@ ���ĉ������B����ƕҏW�o�b�t�@�ɁA @example - \`@{@} + \`@{@} @end example @noindent ��������A�J�[�\����@{@}���Ɉʒu����̂ŁA����Ɉꕶ�����͂��鎖�ŁA @example - \`@{o@} + \`@{o@} @end example @noindent @@ -859,15 +849,15 @@ �ɕ\�����ꂽ�Ȃ�A�����ŃC���[�W���͂��~�߂Ď��̕ҏW����Ɉڂ��Ă� �\���܂���B - �����‹�����@samp{;}���g����͂���ɂ�@kbd{};;�v�̂悤�ɂ��܂��B�C���[�W +@cindex ;���g[;������] + �����‹�����@samp{;}���g����͂���ɂ�@kbd{;;}�̂悤�ɂ��܂��B�C���[�W ���͂̓r����TAB�������ƁA����܂œ��͂��������Ŏn�܂���̈ꗗ���\������� ���B�����ŖړI�� La@TeX{} �R�}���h�܂ŃJ�[�\�����ړ����ēxTAB���������Ƃ� ���� La@TeX{} �R�}���h���o�b�t�@�ɑ}������܂��B -@cindex ;���g[;������] �ǂ̃L�[���͂ɂǂ̋L�����Ή����Ă��邩�S�Ēm�肽�����́A@kbd{;}�������� -����Ƀ��^�[���L�[�������Ă��������B�ȉ��̗�́A@kbd{;<}�Ɖ��������TAB -�����������̂ł��B +�����TAB�������Ă��������B�ȉ��̗�́A@kbd{;<}�Ɖ��������TAB������������ +�ł��B @example KEY LaTeX sequence sign @@ -900,8 +890,8 @@ ������A�����‹�����@kbd{/}�������ƃM���V���������̓��[�h�ɓ���܂��B @kbd{/}�������������@kbd{a}��������@code{\alpha}���A@kbd{g} �������� @code{\gamma}���A�ȂǃA���t�@�x�b�g�ɑΉ������M���V���������}������܂��B -������@��;�̐����L���⊮�Ƃ܂����������ł��B�܂���@kbd{/}�̒���Ƀ��^�[�� -�L�[�������Ăǂ̃A���t�@�x�b�g�ɂǂ̃M���V���������Ή����Ă��邩���ׂĂ݂� +������@��;�̐����L���⊮�Ƃ܂����������ł��B�܂���@kbd{/}�̒���� +TAB�������Ăǂ̃A���t�@�x�b�g�ɂǂ̃M���V���������Ή����Ă��邩���ׂĂ݂� ���������B @kbd{;}��@kbd{/}�𐔎��‹����ʼn����Ă���ɂ�������炸�A�C���[�W�⊮���� @@ -909,7 +899,42 @@ �Ƃɂ��A�����I�ɃC���[�W�⊮�ɓ��邱�Ƃ��ł��܂��B�܂��A���̎��ɂǂ̂悤 �ȏ�ԂŐ����‹�������Ɏ��s�����������A���������B -@node Commenting out, Cursor jump, Completion, Top +@node Local dictionary, Commenting out, Completion, Top +@comment node-name, next, previous, up +@chapter ���[�J������ +@cindex ���[�J������[�남���邵����] +@cindex .yatexrc +@cindex �ςȒP��[�ւ�Ȃ���] + + �⊮���͗p�̌��͎O��ނ̎�������\������Ă��܂��B��‚� +@file{yatex.el}�ɑg�ݍ��܂ꂽ�u�W�������v�A������‚̓��[�U���l�I�ɏ�p +����R�}���h��ۑ�����u���[�U�����v�A�����Ă����ЂƂ‚͂���f�B���N�g���� +�̂ݗL���ȃR�}���h��ۑ�����u���[�J�������v�ł��B + + �⊮���͎��ɐV�����P�����ꂽ�ꍇ�ɁA���̒P����ǂ̎����ɓ���邩������ +���܂��B + +@example + `foo' is not in table. Register into: U)serTable L)ocal N)one +@end example + +@noindent +�Ƃ����v�����v�g�ɑ΂��A@kbd{u}�Ɠ�����Ɓu���[�U�����v���A@kbd{l}�Ɠ����� +�ƃ��[�J���������X�V���邱�ƂɂȂ�A@kbd{n}�Ɠ�����ƐV���ȒP����w�K���� +�Ɏ̂Ă邱�ƂɂȂ�܂��B + + �����A���[�J�������̋@�\�͂��炸�A�S�ă��[�U�����̍X�V�݂̂ł悢�ƌ����� +���ɂ�@file{~/.emacs}�ȂǂŁA +@cindex YaTeX-nervous + +@lisp + (setq YaTeX-nervous nil) +@end lisp + +@noindent +�Ƃ��ĉ������B + +@node Commenting out, Cursor jump, Local dictionary, Top @comment node-name, next, previous, up @chapter �R�����g�A�E�g @cindex �R�����g�A�E�g[���߂�Ƃ�����] @@ -990,18 +1015,20 @@ ���������Ƃɂ��A�J�[�\���ʒu��La@TeX{}�R�}���h�ɑΉ�����ꏊ�ɃW�����v ���܂��B�Ή��֌W�����݂���Ɖ��߂����R�}���h�ɂ͈ȉ��̂��̂�����܂��B -@table +@itemize @bullet @item @code{\begin@{@}}����@code{\end@{@}} @item @code{%#BEGIN}����@code{%#END} @item @code{\label@{@}}����@code{\ref@{@}} @item @code{\include(\input)}���Ή�����t�@�C�� @item @code{\bibitem@{@}}����@code{\cite@{@}} -@end table +@end itemize - @code{\begin@{@}} �� @code{\end@{@}} �̍s��@kbd{[prefix] g} -���������Ƃɂ��A�Ή�����@code{end/begin}�̍s�ɃW�����v���܂��B�������� -��������̂��Ȃ��ꍇ�̓G���[�ɂȂ�܂��B�܂�����́A�̈�Œ�̂��߂� -@code{%#BEGIN} �� @code{%#END} �̃y�A�ɑ΂��Ă����l�ɓ��삵�܂��B + @code{\begin@{@}} �� @code{\end@{@}} �̍s��@kbd{[prefix] g}���������Ƃ� +���A�Ή�����@code{end/begin}�̍s�ɃW�����v���܂��B�������Ή�������̂� +�Ȃ��ꍇ�̓G���[�ɂȂ�܂��B�܂�����́A�̈�Œ�̂��߂� @code{%#BEGIN} �� +@code{%#END} �̃y�A�ɑ΂��Ă����l�ɓ��삵�܂��B�Ȃ��A@code{label/ref}�� +@code{cite/bibitem}�Ή�������̂��ʃt�@�C���ɂ��鎞�́A�W�����v��ƂȂ�t�@ +�C�����I�[�v������Ă��Ȃ���΂Ȃ�܂���B @xref{%#�L�@} ���C���� .tex �t�@�C���� @code{\include{chap1}} �ȂǂɃJ�[�\�������킹�A @@ -1020,6 +1047,12 @@ �I�[�v�����Ă��Ȃ��ꍇ�́A�J�����g�f�B���N�g������T���Ď����I�ɃI�[�v���� �܂��B����Ɍ��݂̊‹���P�ʂƂ��ċ@�\����R�}���h�Ɉȉ��̂��̂�����܂��B +@cindex �‹��̐擪��[���񂫂悤�̂���Ƃ���] +@cindex �‹��̖�����[���񂫂悤�̂܂‚Ђ�] +@cindex �‹����}�[�N[���񂫂悤���܂���] +@cindex M-C-a +@cindex M-C-e +@cindex M-C-@@ @table @kbd @item M-C-a @dots{} �‹��̐擪(@code{\begin})�փW�����v @@ -1028,12 +1061,6 @@ @item M-C-@@ @dots{} �‹��S�̂��}�[�N @end table -@cindex �‹��̐擪��[���񂫂悤�̂���Ƃ���] -@cindex �‹��̖�����[���񂫂悤�̂܂‚Ђ�] -@cindex �‹����}�[�N[���񂫂悤���܂���] -@cindex M-C-a -@cindex M-C-e -@cindex M-C-@@ ��L�̃R�}���h�͒ʏ��@kbd{[prefix]}�L�[�ł͂Ȃ�@kbd{META}�L�[���v���t�B�N �X�Ƃ��ċ@�\����̂ł����Ӊ������B @@ -1061,23 +1088,56 @@ �����̃R�}���h�́A�R�}���h���N������ꏊ�ɂ���ē�������肷��̂Œ��ӂ� �ĉ������B -@kbd{[prefix] c} �́A@code{\begin@{@}} �܂��� @code{\end@{@}} �̂���ꏊ�� -�N������ƁA�‹����̕ύX���s���܂��B@kbd{[prefix] k} �͋N������ʒu�ɂ�� -���̂悤�ȓ�����s���܂��B +@menu +* Changing LaTeX command:: La@TeX{} �R�}���h�̕ύX +* Killing LaTeX command:: La@TeX{} �R�}���h�̍폜 +@end menu + +@node Changing LaTeX command, Killing LaTeX command, Modifying/Deleting, Modifying/Deleting +@comment node-name, next, previous, up +@section La@TeX{} �R�}���h�̕ύX + +�ύX������ La@TeX{} �R�}���h�ɃJ�[�\�������킹�� @kbd{[prefix] c} +�������Ƃ��̃R�}���h��⊮���͂Ȃǂ�p���Ď�y�ɕς��邱�Ƃ��ł��܂��B +@kbd{[prefix] c} �ŕύX�ł���R�}���h�ɂ͈ȉ��̂��̂�����܂��B + +@itemize +@item @code{begin/end} �̊‹��� +@item section�^�R�}���h�̃R�}���h�� +@item section�^�R�}���h�̈��� +@item section�^�R�}���h�̃I�v�V�����p�����[�^([]�ň͂܂ꂽ����) +@item large�^�R�}���h +@end itemize + + �ς�����section�^�R�}���h�̈���������� La@TeX{} �R�}���h���܂ޏꍇ�́A +���̈������͂ޒ����ʂ̏�� @kbd{[prefix] c} ���������ƂŒ��̃R�}���h��ύX +�Ώ۔��肩�珜�O���邱�Ƃ��ł��܂��B + @cindex �‹����̕ύX[���񂫂悤�߂��̂ւ񂱂�] + +@node Killing LaTeX command, , Changing LaTeX command, Modifying/Deleting +@comment node-name, next, previous, up +@section La@TeX{} �R�}���h�̍폜 + +@kbd{[prefix] k} �͋N������ʒu�ɂ�� +���̂悤�ȓ�����s���܂��B @cindex �‹��̍폜[���񂫂悤�̂�������] @example �N���ʒu ���� -\begin\end�̍s @code{\begin\end}�y�A�̍폜 -%BEGIN, %END �̍s %BEGIN,%END�y�A�̍폜 +\begin, \end�̍s @code{\begin\end}�y�A�̍폜 +%#BEGIN, %#END �̍s %#BEGIN,%#END�y�A�̍폜 section�^�R�}���h�̏�(��) section�^�R�}���h�̍폜 �t�H���g�w�芇�ʂ̏� �t�H���g�w��̍폜 ���ʂ̏� �΂��Ȃ����ʂ̍폜 @end example @noindent +@code{\begin, \end} ����� @code{%#BEGIN, %#END} ���폜����ꍇ�A +@code{\begin, \end} �� @code{%#BEGIN, %#END} �̑��݂���s�� +�܂邲�ƍ폜�����̂ŁA�����̈�s�� @code{\begin} �Ȃǂ��ˆȏ�A�˂� +�����Ȃ��悤�ɒ��ӂ��Ă��������B ��L�̂��̂͂��ׂĖ{�����͂��u�e��v���폜����悤�ɓ����܂����A universal-argument (@kbd{C-u}) ��ł������@kbd{[prefix] k}���^�C�v����ƁA ���ꂼ��́u�e��v�Ɋ܂܂��u���g�v����C�ɍ폜���܂��B�ȉ��̗���Q�l�ɂ� @@ -1089,7 +1149,7 @@ ��(�J�[�\���ʒu) @end example -@node Filling item, Local dictionary, Modifying/Deleting, Top +@node Filling item, Includeonly, Modifying/Deleting, Top @comment node-name, next, previous, up @chapter item�̌����� @cindex item�̌�����[item�̂������낦] @@ -1103,17 +1163,17 @@ @dots{} item�̌����� @end table +@cindex NTT-jTeX[���ʂĂ����Ă����������Â�] @noindent �ɂ���āA���� item �̃C���f���g�̐[���ɉ����� fill ����܂��B�Ȃ��ANTT jTeX ���g�p���Ă���ꍇ�ɂ́ALisp �ϐ�@code{NTT-jTeX}��@code{t}�ɃZ�b�g�� �ĉ������B -@cindex NTT-jTeX[���ʂĂ����Ă����������Â�] +@cindex YaTeX-item-regexp ���̂Ƃ��A�ϐ�@code{YaTeX-item-regexp}�̒l(�W���ł� @code{"\\\\item"})�� ���ڎw��R�}���h�̐��K�\���Ƃ��Č����Ɏg�p���܂��Bitemize �‹��ŁA�Ǝ��̃R �}���h���`���č��ڂ�񋓂��Ă���ꍇ(�Ⴆ��@code{\underlineitem})�́A @file{~/.emacs} �Ŏ��̂悤�Ɏw�肵�ĉ������B -@cindex YaTeX-item-regexp @lisp (setq YaTeX-item-regexp @@ -1124,42 +1184,7 @@ ���̕ϐ��̎w��̎d�����悭������Ȃ��ꍇ�́A�Ǝ��̍��ڗ񋓃R�}���h�̖��O�� @code{@code{"\item"}�Ŏn�܂���̂ɂ��ĉ�����(�Ⴆ��"\itembf"})�B -@node Local dictionary, Includeonly, Filling item, Top -@comment node-name, next, previous, up -@chapter ���[�J������ -@cindex ���[�J������[�남���邵����] -@cindex .yatexrc -@cindex �ςȒP��[�ւ�Ȃ���] - - �⊮���͗p�̌��͎O��ނ̎�������\������Ă��܂��B��‚� -@file{yatex.el}�ɑg�ݍ��܂ꂽ�u�W�������v�A������‚̓��[�U���l�I�ɏ�p -����R�}���h��ۑ�����u���[�U�����v�A�����Ă����ЂƂ‚͂���f�B���N�g���� -�̂ݗL���ȃR�}���h��ۑ�����u���[�J�������v�ł��B - - �⊮���͎��ɐV�����P�����ꂽ�ꍇ�ɁA���̒P����ǂ̎����ɓ���邩������ -���܂��B - -@example - `foo' is not in table. Register into: U)serTable L)ocal N)one -@end example - -@noindent -�Ƃ����v�����v�g�ɑ΂��A@kbd{u}�Ɠ�����Ɓu���[�U�����v���A@kbd{l}�Ɠ����� -�ƃ��[�J���������X�V���邱�ƂɂȂ�A@kbd{n}�Ɠ�����ƐV���ȒP����w�K���� -�Ɏ̂Ă邱�ƂɂȂ�܂��B - - �����A���[�J�������̋@�\�͂��炸�A�S�ă��[�U�����̍X�V�݂̂ł悢�ƌ����� -���ɂ�@file{~/.emacs}�ȂǂŁA - -@lisp - (setq YaTeX-nervous nil) -@end lisp -@cindex YaTeX-nervous - -@noindent -�Ƃ��ĉ������B - -@node Includeonly, Where am I?, Local dictionary, Top +@node Includeonly, What column, Filling item, Top @comment node-name, next, previous, up @chapter �����includeonly @cindex �����includeonly[���‚Ă�includeonly] @@ -1181,9 +1206,9 @@ @end example @noindent -�Ə��������Ȃ���΂Ȃ�܂��񂪁A�쒹�ł͌��ݕҏW���Ă���t�@�C���������C�� -�t�@�C����@code{\includeonly}�ɂȂ��ꍇ�ɂ͎����I�ɂ�������o���A���̎w�� -���‚��܂��B +�Ə��������Ȃ���΂Ȃ炸��Ԃ�������܂��B�쒹�ł͌��ݕҏW���Ă���t�@�C�� +�������C���t�@�C����@code{\includeonly}�ɂȂ��ꍇ�ɂ͎����I�ɂ�������o���A +���̎w�����‚��܂��B @example A)dd R)eplace %)comment? @@ -1195,10 +1220,10 @@ @code{\includeonly} �̍s���R�����g�A�E�g���Ė��������������ɂ́A@kbd{%}�� ���ꂼ�ꉟ���ĉ������B -@node Where am I?, Intelligent newline, Includeonly, Top +@node What column, Intelligent newline, Includeonly, Top @comment node-name, next, previous, up -@chapter ���͂ǂ�? -@cindex ���͂ǂ�?[���܂͂Ƃ�] +@chapter �����͂ǂ�? +@cindex �����ǂ�?[�����͂Ƃ�] @cindex prefix & @cindex ���G��tabular[�ӂ����‚�tabular] @@ -1228,10 +1253,10 @@ �������ƃJ�[�\���ʒu�̃J�������ǂ̍��ڂɊY�����邩���~�j�o�b�t�@�ɕ\������ ���Btabular/array�‹��̑�1�s�ڂ����ږ��̕��тƂ݂Ȃ��đΉ�������̂�T���� -���B�������ږ��Ƃ��ĕʂ̂��̂�^�������ꍇ�́A�s����@code{%}�ɂ��ă_�~�[�� -���ڕ��т�����Ă����Ɨǂ��ł��傤�B +���B�������ږ��Ƃ��ĕʂ̂��̂�\�����ė~�����ꍇ�́A�s����@code{%}�ɂ��ă_ +�~�[�̍��ڕ��т�����Ă����Ɨǂ��ł��傤�B -@node Intelligent newline, Online help, Where am I?, Top +@node Intelligent newline, Online help, What column, Top @comment node-name, next, previous, up @chapter ���܂������s @cindex ���܂������s[���܂����������傤] @@ -1247,7 +1272,7 @@ @noindent �������ƁA���̊‹��ɉ������s�G���g�������̍s�ɑ}�����܂��B�Ⴆ�΁Atabular -�‹��ł́A���̊‹��̃J�������ɑΉ��������� @code{&} �ɂ��킦�A�s���� +�‹��ł́A���̊‹��̃J�������ɑΉ��������� @code{&} �ɉ����A�s���� @code{\\} �����܂��B���̎�����ȑO�� @code{\hline} ������΂�����t���� ���܂��B�‹��Ƃ���ɉ����Ď������͂�����̂̑Ή��͈ȉ��̂悤�ɂȂ�܂��B @@ -1298,6 +1323,8 @@ @section �I�����C���w���v @cindex �O���[�o���w���v[���남�͂�ւ��] @cindex �v���C�x�[�g�w���v[�ӂ炢�ւ��Ƃւ��] +@cindex YaTeX-help-file +@cindex YaTeX-help-file-private �u�I�����C���w���v�v�́A��ʓI�� La@TeX{} �R�}���h(�f�t�H���g�ŃJ�[�\�� �ʒu�̃R�}���h)�ɑ΂��������ׂ̃o�b�t�@�ɕ\�����܂��B���̎��Q�Ƃ����w @@ -1309,8 +1336,6 @@ �N����`�Ɋւ��������������Ă���t�@�C���ŁA�ϐ� @code{YaTeX-help-file-private}�̒l�Ŏw�肳��܂��B������̓��[�U�̃z�[���f�B ���N�g���̉��Ȃǂɒu����܂��B -@cindex YaTeX-help-file -@cindex YaTeX-help-file-private @section �I�����C��apropos @@ -1387,7 +1412,8 @@ yatex-mode �ɂ����鎟�̕ϐ����J�X�^�}�C�Y�”\�ł��B@file{~/.emacs} �� @code{setq} ���Ă����΁A������̒�`���D�悳��܂��B���ʂ̒��̓f�t�H���g�l -�ł��B +�ł��B���ۂɕϐ��̒l��ύX����ꍇ�� @kbd{M-x describe-variable} �� +�ϐ��̏ڍׂȐ������Q�Ƃ��Ă��������B @defvar YaTeX-prefix yatex-mode ���̃v���t�B�N�X�L�[(@kbd{C-c}) @@ -1529,6 +1555,14 @@ ���͂ɓ���(@kbd{nil}) @end defvar +@defvar YaTeX-hilit-pattern-adjustment-private +���K�\���Ƃ���Ƀ}�b�`������̘̂_���I�Ӗ����V���{���ł���킵�����̂� +���X�g�c�̃��X�g�Bhilit19 ��g�ݍ���ł��鎞�̂ݗL���B +�ڂ����� @code{(assq 'yatex-mode hilit-patterns-alist)} +�������ʂƁA�ϐ� @code{YaTeX-hilit-pattern-adjustment-default} �̒l(�Əꍇ +�ɂ���Ă� hilit19 �̃h�L�������g)���Q�Ƃ���B +@end defvar + @node Sample definitions, Hook variables, All customizable variables, Lisp variables @comment node-name, next, previous, up @subsection �J�X�^�}�C�Y�ϐ��ݒ�� @@ -1619,8 +1653,8 @@ ���܂���B�펯�I�Ɉ����Ă��������B�܂��A�g�p���Ă���|�����C���ł��m�点�� �������ƁA��҂͊��ŃT�|�[�g�ɗ�ނ��Ƃł��傤(�ق�Ƃ�)�B - ���A��]�A�o�O�񍐁A���z���A��҂��{�v���O�����ɋ����������Ă� -��ԂɌ���󂯕t���܂��B�A���� pcs39334@@asciinet.or.jp �܂��́A + ���A��]�A�o�O�񍐁A���z���͊��}�������܂��B +�A���� pcs39334@@asciinet.or.jp �܂��́A yuuji@@ae.keio.ac.jp�܂�(1995�N3������)�B �d�l�́A�\���Ȃ��m����(�C�������)�ύX����܂�:-p�B diff --git a/help/YATEXHLP.jp b/help/YATEXHLP.jp index ab35f0c..5a140af 100644 --- a/help/YATEXHLP.jp +++ b/help/YATEXHLP.jp @@ -1161,9 +1161,25 @@ �V�����y�[�W���J�n���A\textwidth��BOX��parbox�ō쐬����B ��i�g�݃y�[�W�łԂ������^�C�g�����쐬���鎞�ɗp����Ƃ悢�B +LaiTeX +a Little Assistant Interface for TeX +�����炭���Ȃ����� Vz ��Ŏg���Ă��邱�̃��[�h�B +LaTeX�������I�Ɏg�����߂̑����̋@�\�𐷂荞��ł��܂��B + +�y�����ɂ‚��āz + +laitex.def�Ȃǃv���O�������w�����́u�炢�Ă����v�A�V�X�e�����w�����́u�� +�����傤�v�Ɠǂ݂܂��B + +�y�⑫�z +�u�����v�̋����������́u�炢�Ă��v�������ł��B + +laitex + + YaTeX (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) -�����炭���Ȃ������g���Ă��邱�̃��[�h�B +�����炭���Ȃ����� Emacs �Ŏg���Ă��邱�̃��[�h�B LaTeX�������I�Ɏg�����߂̑����̋@�\�𐷂荞��ł��܂��B �y�����ɂ‚��āz diff --git a/yatex.el b/yatex.el index 8ae55e7..0e5f213 100644 --- a/yatex.el +++ b/yatex.el Binary files differ diff --git a/yatex.new b/yatex.new index 0e3a825..a17d297 100644 --- a/yatex.new +++ b/yatex.new @@ -1,13 +1,31 @@ - Yet Another tex-mode for Emacs - yatex.el �e�o�[�W�����̕ύX�_�ɂ‚��āB + What's new in YaTeX + yatex.el �e�o�[�W�����̕ύX�_�ɂ‚��� + +1.54 section �^�R�}���h�̈����̃f�t�H���g�̓��͂ɂ͒ʏ�̕�������͂� + �s���悤�ɂ��A�ϐ� user-article-table ��p�~�����B����ɂ�� + Emacs-19(Mule2) �ł̃f�t�H���g�̃w���v�t�@�C���̊i�[�ꏊ��etc�f�B + ���N�g������Asite-lisp �f�B���N�g���ɕύX����(����!!)�B + ~/.yatexrc �ɔC�ӂ� elisp �����Ă����Ă������Ȃ��悤�ɂȂ����B + documentstyle �̃A�h�C���֐����[�������A�X�^�C���I�v�V������X�^ + �C���̊w�K���s���悤�ɂ����B + ���[�U�������V�P��̓��͂Ɠ����ɍX�V����悤�ɂ��Akill-emacs �� + �g���b�v����̂���߂��B + [prefix] c �� section �^�R�}���h�Ƃ��̈���/�I�v�V�����Alarge�^ + �R�}���h��ύX�ł���悤�ɂ����B + �������[�h�������莞�ɃR�����g�A�E�g���ꂽ $ �͐����Ȃ��悤�ɂ� + ���B�܂��A�ϐ� YaTeX-verbatim-environments ��p�ӂ��ALaTeX �R�} + ���h�������ƂȂ�‹����̃��X�g��񋓂ł���悤�ɂ����B + YaTeX-hilit-pattern-adjustment-private �œƎ��J���[���`�”\�ɁB + YaTeX-sectioning-level �œƎ��ɒ�`�����Z�N�V������؂�R�}���h + ��o�^���Ă����܂����삷��悤�ɂ����B 1.53 Emacs-19�ŐV�P��̍X�V�����܂������Ȃ������̂����x�����������B ref/label�W�����v�ŕʂ̃o�b�t�@��ref/label�ɔ�ׂ�悤�ɂ����B ref/label�W�����v�Ɠ��`����cite/bibitem�ԂŔ�ׂ�悤�ɂ����B cite/bibitem�̃A�h�C���֐��̒lj��B -1.52 �O���v���Z�X�p�e���|�����o�b�t�@����frame�ɂ��鎞�ɂ͌�frame�Ƀe - ���|�����o�b�t�@��popup���Ȃ��悤�ɂ����B +1.52 �O���v���Z�X�p�e���|�����o�b�t�@���� frame �ɂ��鎞�ɂ͌� frame + �Ƀe���|�����o�b�t�@�� popup ���Ȃ��悤�ɂ����B Hilightening �ɓƎ��̃^�O�𓱓����AreverseVideo ��ON/OFF�̎����� �ɑΉ������B Emacs-19�ŐV�P��̍X�V�����܂������Ȃ������̂𒼂����B diff --git a/yatex19.el b/yatex19.el index 4ae85ef..7556c9b 100644 --- a/yatex19.el +++ b/yatex19.el @@ -1,13 +1,13 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX facilities for Emacs 19 ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Fri Sep 23 04:30:27 1994 on figaro +;;; Last modified Mon Nov 21 21:52:16 1994 on figaro ;;; $Id$ -;;; $B$H$j$"$($:(B hilit19 $B$r;H$C$F$$$k;~$K?'$,IU$/$h$&$K$7$F(B -;;; $B%a%K%e!<%P!<$G$4$K$g$4$K$g$G$-$k$h$&$K$7$?$@$1!#(B -;;; $B$$$C$?$$C/$,%a%K%e!<%P!<;H$C$F(BLaTeX$B%=!<%9=q$/$s$@$m$&$+(B? -;;; $B$^$"$$$$$dN}=,N}=,!#8e$m$NJ}$K$A$g$C$H%3%a%s%H$"$j!#(B +;;; �Ƃ肠���� hilit19 ���g���Ă��鎞�ɐF���t���悤�ɂ��� +;;; ���j���[�o�[�ł��ɂ傲�ɂ�ł���悤�ɂ��������B +;;; ���������N�����j���[�o�[�g����LaTeX�\�[�X�����񂾂낤��? +;;; �܂���������K���K�B���̕��ɂ�����ƃR�����g����B (require 'yatex) @@ -203,17 +203,21 @@ '(lambda (x y) (string< (car x) (car y)))))) ;; Highlightening -;; $B%m!<%+%k$J%^%/%m$rFI$_9~$s$@8e(B redraw $B$9$k$H(B -;; $B%m!<%+%k%^%/%m$r(B keyword $B$H$7$F8w$i$;$k(B(keyword$B$8$c$^$:$$$+$J!D(B)$B!#(B +;; ���[�J���ȃ}�N����ǂݍ��񂾌� redraw ����� +;; ���[�J���}�N���� keyword �Ƃ��Č��点��(keyword����܂������ȁc)�B (defvar YaTeX-hilit-pattern-adjustment (list - ;;\def $B$,(B define $B$J$s$@$+$i(B new* $B$b(B define $B$G$7$g$&!#(B + ;;\def �� define �Ȃ񂾂��� new* �� define �ł��傤�B '("\\\\\\(re\\)?new\\(environment\\|command\\){" "}" define) '("\\\\new\\(length\\|theorem\\|counter\\){" "}" define) - ;;$B%;%/%7%g%s%3%^%s%I$,C1$J$k%-!<%o!<%I$C$F$3$H$O$J$$$G$7$g$&!#(B + ;;�Z�N�V�����R�}���h���P�Ȃ�L�[���[�h���Ă��Ƃ͂Ȃ��ł��傤�B (list (concat "\\\\\\(" YaTeX-sectioning-regexp "\\){") "}" - 'sectioning)) + 'sectioning) + ;;eqnarray �Ȃǂ̐����‹��������ĂȂ��݂����c + '("\\\\begin{\\(eqnarray\\*?\\)\\|\\(equation\\*?\\)}" + "\\\\end{\\(eqnarray\\*?\\)\\|\\(equation\\*?\\)}" + formula)) "Adjustment for hilit19's LaTeX hilit pattern.") (defvar YaTeX-hilit-sectioning-face '(yellow/dodgerblue yellow/cornflowerblue)) @@ -269,10 +273,10 @@ (define-key YaTeX-mode-map key 'YaTeX-hilit-recenter))) (where-is-internal 'hilit-recenter))) -;;; reverseVideo $B$K$7$F(B hilit-background-mode $B$r(B 'dark -;;; $B$K$7$F$$$k?M$O?t<0$J$I$,0E$/$J$j$9$.$F8+$E$i$$$+$b$7$l$J$$!#(B -;;; $Bl=j$ND>8e$KCV$/$H$A$g$C(B -;;; $B$H$O$^$7!#(B +;;; reverseVideo �ɂ��� hilit-background-mode �� 'dark +;;; �ɂ��Ă���l�͐����Ȃǂ��Â��Ȃ肷���Č��Â炢��������Ȃ��B +;;; ���̃R�[�h�� hilit19 �����[�h���Ă���ꏊ�̒���ɒu���Ƃ���� +;;; �Ƃ͂܂��B ;;; (if (eq hilit-background-mode 'dark) ;;; (hilit-translate ;;; string 'mediumspringgreen diff --git a/yatexadd.el b/yatexadd.el index 3eabc1c..200bd53 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -2,7 +2,7 @@ ;;; YaTeX add-in functions. ;;; yatexadd.el rev.9 ;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Mon Oct 31 12:55:54 1994 on pajero +;;; Last modified Sat Nov 12 07:03:15 1994 on VFR ;;; $Id$ ;;; @@ -566,17 +566,22 @@ "Alist of LaTeX style parameters.") (defvar YaTeX:style-parameters-private nil "*User definable alist of style parameters.") -(defvar YaTeX:style-parameters-private nil - "Holds the union of LaTeX style parameters.") -(setq YaTeX:style-parameters - (append YaTeX:style-parameters-private YaTeX:style-parameters-default)) +(defvar YaTeX:style-parameters-local nil + "*User definable alist of local style parameters.") (defvar YaTeX:length-history nil "Holds history of length.") (defun YaTeX::setlength (&optional argp) "YaTeX add-in function for arguments of \\setlength." (cond ((equal 1 argp) - (completing-read "Length variable: " YaTeX:style-parameters nil nil "\\")) + ;;(completing-read "Length variable: " YaTeX:style-parameters nil nil "\\") + (YaTeX-cplread-with-learning + "Length variable: " + 'YaTeX:style-parameters-default + 'YaTeX:style-parameters-private + 'YaTeX:style-parameters-local + nil nil "\\") + ) ((equal 2 argp) (let ((minibuffer-history-symbol 'YaTeX:length-history)) (read-string "Length: ")))) @@ -587,7 +592,12 @@ "YaTeX add-in function for arguments of \\settowidth." (cond ((equal 1 argp) - (completing-read "Length variable: " YaTeX:style-parameters nil nil "\\")) + (YaTeX-cplread-with-learning + "Length variable: " + 'YaTeX:style-parameters-default + 'YaTeX:style-parameters-private + 'YaTeX:style-parameters-local + nil nil "\\")) ((equal 2 argp) (read-string "Text: "))) ) @@ -596,12 +606,14 @@ (cond ((equal argp 1) (let ((length (read-string "Length variable: " "\\"))) - (or (assoc length YaTeX:style-parameters-private) - (setq YaTeX:style-parameters-private - (cons (list length) YaTeX:style-parameters-private) - YaTeX:style-parameters - (cons (list length) YaTeX:style-parameters))) - length))) + (if (string< "" length) + (YaTeX-update-table + (list length) + 'YaTeX:style-parameters-default + 'YaTeX:style-parameters-private + 'YaTeX:style-parameters-local)) + length) + )) ) ;; \multicolumn's arguments @@ -621,5 +633,75 @@ (read-string "Item: "))) ) +(defvar YaTeX:documentstyles-default + '(("article") ("jarticle") ("j-article") + ("book") ("jbook") ("j-book") + ("report") ("jreport") ("j-report") + ("letter") ("ascjletter")) + "List of LaTeX documentstyles.") +(defvar YaTeX:documentstyles-private nil + "*User defined list of LaTeX documentstyles.") +(defvar YaTeX:documentstyles-local nil + "*User defined list of local LaTeX documentstyles.") +(defvar YaTeX:documentstyle-options-default + '(("a4j") ("a5j") ("b4j") ("b5j") + ("twocolumn") ("jtwocolumn") ("epsf") ("epsfig") ("epsbox") ("nfig")) + "List of LaTeX documentstyle options.") +(defvar YaTeX:documentstyle-options-private nil + "*User defined list of LaTeX documentstyle options.") +(defvar YaTeX:documentstyle-options-local nil + "List of LaTeX local documentstyle options.") + +(defvar YaTeX-minibuffer-completion-map nil + "Minibuffer completion key map that allows comma completion.") +(if YaTeX-minibuffer-completion-map nil + (setq YaTeX-minibuffer-completion-map + (copy-keymap minibuffer-local-completion-map)) + (define-key YaTeX-minibuffer-completion-map " " + 'YaTeX-minibuffer-complete) + (define-key YaTeX-minibuffer-completion-map "\t" + 'YaTeX-minibuffer-complete)) + +(defun YaTeX:documentstyle () + (let*((delim ",") + (dt (append YaTeX:documentstyle-options-local + YaTeX:documentstyle-options-private + YaTeX:documentstyle-options-default)) + (minibuffer-completion-table dt) + (opt (read-from-minibuffer + "Style options ([opt1,opt2,...]): " + nil YaTeX-minibuffer-completion-map)) + (substr opt) o) + (if (string< "" opt) + (progn + (while substr + (setq o (substring substr 0 (string-match delim substr))) + (or (assoc o dt) + (YaTeX-update-table + (list o) + 'YaTeX:documentstyle-options-default + 'YaTeX:documentstyle-options-private + 'YaTeX:documentstyle-options-local)) + (setq substr + (if (string-match delim substr) + (substring substr (1+ (string-match delim substr)))))) + (concat "[" opt "]")) + ""))) + +(defun YaTeX::documentstyle (&optional argp) + "YaTeX add-in function for arguments of \\socumentstyle." + (cond + ((equal argp 1) + (let ((sname + (YaTeX-cplread-with-learning + (format "Documentstyle (default %s): " + YaTeX-default-document-style) + 'YaTeX:documentstyles-default + 'YaTeX:documentstyles-private + 'YaTeX:documentstyles-local))) + (if (string= "" sname) (setq sname YaTeX-default-document-style)) + (setq YaTeX-default-document-style sname)))) +) + ;;; -------------------- End of yatexadd -------------------- (provide 'yatexadd) diff --git a/yatexenv.el b/yatexenv.el index c7c946a..b484e2d 100644 --- a/yatexenv.el +++ b/yatexenv.el @@ -2,7 +2,7 @@ ;;; YaTeX environment-specific functions. ;;; yatexenv.el ;;; (c ) 1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Tue Sep 20 01:35:46 1994 on figaro +;;; Last modified Thu Nov 24 04:33:18 1994 on 98fa ;;; $Id$ ;;; @@ -13,7 +13,8 @@ (defun YaTeX-array-what-column () "Show matching columne title of array environment. When calling from a program, make sure to be in array/tabular environment." - (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") (n 0) + (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") + (n 0) j (firsterr "This line might be the first row.")) (save-excursion (YaTeX-beginning-of-environment) @@ -46,24 +47,23 @@ -1))))) (message "%s" n) (goto-char (1- beg)) - (cond - ((= n 1) (message "Here is the FIRST column!")) - (t (while (> n 1) - (or (re-search-forward andptn p nil) - (error "This column exceeds the limit.")) - (setq n (1- n))) - (skip-chars-forward "\\s ") - (message - "Here is the column of: %s" - (buffer-substring - (point) - (progn - (re-search-forward (concat andptn "\\|" nlptn) eot) - (goto-char (match-beginning 0)) - (if (looking-at andptn) - (forward-char 1)) - (skip-chars-backward "\\s ") - (point)))))))) + (setq j n) + (while (> j 1) + (or (re-search-forward andptn p nil) + (error "This column exceeds the limit.")) + (setq j (1- j))) + (skip-chars-forward "\\s ") + (message + "This is the column(#%d) of: %s" n + (buffer-substring + (point) + (progn + (re-search-forward (concat andptn "\\|" nlptn) eot) + (goto-char (match-beginning 0)) + (if (looking-at andptn) + (forward-char 1)) + (skip-chars-backward "\\s ") + (point)))))) ) ;;;###autoload diff --git a/yatexgen.el b/yatexgen.el index a905872..0279555 100644 --- a/yatexgen.el +++ b/yatexgen.el @@ -2,7 +2,7 @@ ;;; YaTeX add-in function generator. ;;; yatexgen.el rev.3 ;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Tue Sep 20 01:34:46 1994 on figaro +;;; Last modified Thu Nov 17 03:54:56 1994 on VFR ;;; $Id$ (require 'yatex) @@ -587,7 +587,10 @@ singlecmd-table user-singlecmd-table tmp-singlecmd-table) nil nil) command (if (string= "" command) section-name command))) - (message "(o)�lj��^? (a)�����^? (yatexadd.doc���Q�Ƃ̂���) :") + (message + (cond + (YaTeX-japan "(o)�lj��^? (a)�����^? (yatexadd.doc���Q�Ƃ̂���) :") + (t "(O)ption? (A)rgument?"))) (YaTeX-showup-buffer (if (= (read-char) ?o) (YaTeX-generate-option-type command) diff --git a/yatexhlp.el b/yatexhlp.el index cdcf61f..89ebf0e 100644 --- a/yatexhlp.el +++ b/yatexhlp.el @@ -2,15 +2,16 @@ ;;; YaTeX helper with LaTeX commands and macros. ;;; yatexhlp.el ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Tue Sep 20 01:35:12 1994 on figaro +;;; Last modified Sat Nov 12 04:20:26 1994 on VFR ;;; $Id$ (let ((help-file (concat "YATEXHLP." (cond (YaTeX-japan "jp") (t "eng")))) (help-dir - (cond (YaTeX-emacs-19 (expand-file-name "../etc" exec-directory)) - (t exec-directory)))) + (cond + (YaTeX-emacs-19 (expand-file-name "../../site-lisp" exec-directory)) + (t exec-directory)))) (defvar YaTeX-help-file (expand-file-name help-file help-dir) "*Help file of LaTeX/TeX commands or macros.") diff --git a/yatexlib.el b/yatexlib.el index 757c3d8..52e5eba 100644 --- a/yatexlib.el +++ b/yatexlib.el @@ -2,7 +2,7 @@ ;;; YaTeX library of general functions. ;;; yatexlib.el ;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Mon Oct 10 22:14:14 1994 on VFR +;;; Last modified Thu Nov 24 02:20:45 1994 on VFR ;;; $Id$ ;;;###autoload @@ -11,7 +11,7 @@ Optional arguments after BOUND, ERR, CNT are passed literally to search-forward or search-backward. Optional sixth argument FUNC changes search-function." - (let ((sfunc (if func func 'search-forward)) found md) + (let ((sfunc (or func 'search-forward)) found md) (while (and (prog1 (setq found (funcall sfunc string bound err cnt)) (setq md (match-data))) @@ -122,7 +122,7 @@ "Make BUFFER show up in certain window (but current window) that gives the maximum value by the FUNC. FUNC should take an argument of its window object. Non-nil for optional third argument SELECT selects -that window." +that window. This function never selects minibuffer window." (or (and (if YaTeX-emacs-19 (get-buffer-window buffer t) (get-buffer-window buffer)) @@ -158,7 +158,8 @@ (switch-to-buffer buffer) (or select (select-window window))) ((= (length wlist) 2) - (other-window 1) + ;(other-window 1);This does not work properly on Emacs-19 + (select-window (get-lru-window)) (switch-to-buffer buffer) (or select (select-window window))) (t ;if one-window @@ -208,23 +209,33 @@ "Return (buffer-substring (match-beginning n) (match-beginning m))." (if (match-beginning n) (buffer-substring (match-beginning n) - (match-end (if m m n)))) + (match-end (or m n)))) ) ;;;###autoload (defun YaTeX-minibuffer-complete () - "Complete in minibuffer" + "Complete in minibuffer. +If the symbol 'delim is bound and is string, its value is assumed to be +the character class of delimiters. Completion will be performed on +the last field separated by those delimiters." (interactive) - (let (beg word compl) - (setq beg (if (and (boundp 'delim) delim) + (let (beg word compl (md (match-data))) + (setq beg (if (and (boundp 'delim) (stringp delim)) (save-excursion (skip-chars-backward (concat "^" delim)) - (1- (point))) + (point)) (point-min)) word (buffer-substring beg (point-max)) compl (try-completion word minibuffer-completion-table)) (cond - ((eq compl t) nil) + ((eq compl t) + (let ((p (point)) (max (point-max))) + (goto-char max) + (insert " [Sole completion]") + (goto-char p) + (sit-for 1) + (delete-region max (point-max)) + (goto-char p))) ((eq compl nil) (ding) (save-excursion @@ -240,7 +251,8 @@ (all-completions word minibuffer-completion-table)))) (t (delete-region beg (point-max)) (insert compl)) - )) + ) + (store-match-data md)) ) diff --git a/yatexprc.el b/yatexprc.el index 3e48929..5b328cd 100644 --- a/yatexprc.el +++ b/yatexprc.el @@ -2,7 +2,7 @@ ;;; YaTeX process handler. ;;; yatexprc.el ;;; (c )1993-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Thu Oct 20 16:48:41 1994 on figaro +;;; Last modified Fri Nov 25 03:31:46 1994 on VFR ;;; $Id$ (require 'yatex) @@ -19,6 +19,11 @@ (defvar YaTeX-current-TeX-buffer nil "Keeps the buffer on which recently typeset run.") +(defvar YaTeX-shell-command-option + (or (and (boundp 'shell-command-option) shell-command-option) + (if YaTeX-dos "/c" "-c")) + "Shell option for command execution.") + (if YaTeX-typeset-buffer-syntax nil (setq YaTeX-typeset-buffer-syntax (make-syntax-table (standard-syntax-table))) @@ -50,12 +55,14 @@ (cond (YaTeX-dos ;if MS-DOS (YaTeX-put-nonstopmode) - (call-process shell-file-name nil buffer nil "/c" command) + (call-process + shell-file-name nil buffer nil YaTeX-shell-command-option command) (YaTeX-remove-nonstopmode)) (t ;if UNIX (set-process-buffer (setq YaTeX-typeset-process - (start-process "LaTeX" buffer shell-file-name "-c" command)) + (start-process "LaTeX" buffer shell-file-name + YaTeX-shell-command-option command)) (get-buffer buffer)) (set-process-sentinel YaTeX-typeset-process 'YaTeX-typeset-sentinel))) (message (format "Calling `%s'..." command)) @@ -302,9 +309,11 @@ (set-buffer (get-buffer-create buffer)) (erase-buffer) (if YaTeX-dos - (call-process shell-file-name nil buffer nil "/c " command) + (call-process + shell-file-name nil buffer nil YaTeX-shell-command-option command) (set-process-buffer - (start-process "system" buffer shell-file-name "-c" command) + (start-process + "system" buffer shell-file-name YaTeX-shell-command-option command) (get-buffer buffer)))) ) @@ -330,21 +339,24 @@ (setq dvi2-command preview-command) ;`dvi2command' is buffer local (save-excursion (YaTeX-visit-main t) - (let ((pbuffer "*dvi-preview*")) + (let ((pbuffer "*dvi-preview*") (dir default-directory)) (YaTeX-showup-buffer pbuffer (function (lambda (x) (nth 3 (window-edges x))))) (set-buffer (get-buffer-create pbuffer)) (erase-buffer) + (setq default-directory dir) ;for 18 + (cd dir) ;for 19 (cond (YaTeX-dos ;if MS-DOS (send-string-to-terminal "\e[2J\e[>5h") ;CLS & hide cursor (call-process shell-file-name "con" "*dvi-preview*" nil - "/c " preview-command preview-file) + YaTeX-shell-command-option preview-command preview-file) (send-string-to-terminal "\e[>5l") ;show cursor (redraw-display)) (t ;if UNIX (set-process-buffer - (start-process "preview" "*dvi-preview*" shell-file-name "-c" + (start-process "preview" "*dvi-preview*" shell-file-name + YaTeX-shell-command-option (concat preview-command " " preview-file)) (get-buffer pbuffer)) (message @@ -594,14 +606,15 @@ (erase-buffer) (cond (YaTeX-dos - (call-process shell-file-name "con" "*dvi-printing*" nil "/c " cmd)) + (call-process shell-file-name "con" "*dvi-printing*" nil + YaTeX-shell-command-option cmd)) (t (set-process-buffer - (start-process "print" "*dvi-printing*" shell-file-name "-c" cmd) + (start-process "print" "*dvi-printing*" shell-file-name + YaTeX-shell-command-option cmd) (get-buffer lbuffer)) - (message (concat "Starting " cmd " to printing " - (YaTeX-get-preview-file-name))))) - )) + (message "Starting printing command: %s..." cmd))) + )) ) (defun YaTeX-main-file-p () diff --git a/yatexsec.el b/yatexsec.el index 2ee0a54..412c253 100644 --- a/yatexsec.el +++ b/yatexsec.el @@ -2,13 +2,25 @@ ;;; YaTeX sectioning browser. ;;; yatexsec.el ;;; (c ) 1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] -;;; Last modified Tue Sep 20 01:35:32 1994 on figaro +;;; Last modified Fri Nov 25 04:46:42 1994 on VFR ;;; $Id$ (defvar YaTeX-sectioning-level - '(("part" . 0) ("chapter" . 1) ("section" . 2) ("subsection" . 3) - ("subsubsection" . 4) ("paragraph" . 5) ("subparagraph" . 6)) - "Sectioning level.") + '(("part" . 0) + ("chapter" . 1) + ("section" . 2) + ("subsection" . 3) + ("subsubsection" . 4) + ("paragraph" . 5) + ("subparagraph" . 6)) + "*Alist of LaTeX's sectioning command and its level. +This value must be written in numerically ascending order and consecutive. +Needn't define the level of `*' commands such as `section*'.") + +(defvar YaTeX-sectioning-max-level + (cdr (nth (1- (length YaTeX-sectioning-level)) YaTeX-sectioning-level)) + "*The heighest(numerically) level of sectioning command. +This must be the heighest number in YaTeX-sectioning-level.") (defun YaTeX-sectioning-map-hide (map) (let ((ch ?0)) @@ -17,40 +29,40 @@ (setq ch (1+ ch)))) ) -(defvar YaTeX-minibuffer-sectioning-map nil +(defvar YaTeX-sectioning-minibuffer-map nil "Key map used in minibuffer for sectioning.") -(if YaTeX-minibuffer-sectioning-map nil - (setq YaTeX-minibuffer-sectioning-map +(if YaTeX-sectioning-minibuffer-map nil + (setq YaTeX-sectioning-minibuffer-map (copy-keymap minibuffer-local-completion-map)) - (define-key YaTeX-minibuffer-sectioning-map "\C-p" + (define-key YaTeX-sectioning-minibuffer-map "\C-p" 'YaTeX-sectioning-up) - (define-key YaTeX-minibuffer-sectioning-map "\C-e" + (define-key YaTeX-sectioning-minibuffer-map "\C-e" 'YaTeX-sectioning-up) - (define-key YaTeX-minibuffer-sectioning-map "\C-i" + (define-key YaTeX-sectioning-minibuffer-map "\C-i" 'YaTeX-minibuffer-complete) - (define-key YaTeX-minibuffer-sectioning-map " " + (define-key YaTeX-sectioning-minibuffer-map " " 'YaTeX-minibuffer-complete) - (define-key YaTeX-minibuffer-sectioning-map "\C-n" + (define-key YaTeX-sectioning-minibuffer-map "\C-n" 'YaTeX-sectioning-down) - (define-key YaTeX-minibuffer-sectioning-map "\C-x" + (define-key YaTeX-sectioning-minibuffer-map "\C-x" 'YaTeX-sectioning-down) - (define-key YaTeX-minibuffer-sectioning-map "\C-v" + (define-key YaTeX-sectioning-minibuffer-map "\C-v" 'YaTeX-sectioning-scroll-up) - (define-key YaTeX-minibuffer-sectioning-map "\C-c" + (define-key YaTeX-sectioning-minibuffer-map "\C-c" 'YaTeX-sectioning-scroll-up) - (define-key YaTeX-minibuffer-sectioning-map "\M-v" + (define-key YaTeX-sectioning-minibuffer-map "\M-v" 'YaTeX-sectioning-scroll-down) - (define-key YaTeX-minibuffer-sectioning-map "\C-r" + (define-key YaTeX-sectioning-minibuffer-map "\C-r" 'YaTeX-sectioning-scroll-down) - (define-key YaTeX-minibuffer-sectioning-map "\C-w" + (define-key YaTeX-sectioning-minibuffer-map "\C-w" '(lambda () (interactive) (YaTeX-sectioning-scroll-down 1))) - (define-key YaTeX-minibuffer-sectioning-map "\C-z" + (define-key YaTeX-sectioning-minibuffer-map "\C-z" '(lambda () (interactive) (YaTeX-sectioning-scroll-up 1))) - (define-key YaTeX-minibuffer-sectioning-map "\C-l" + (define-key YaTeX-sectioning-minibuffer-map "\C-l" 'YaTeX-sectioning-recenter) - (define-key YaTeX-minibuffer-sectioning-map "?" + (define-key YaTeX-sectioning-minibuffer-map "?" 'YaTeX-sectioning-help) - (YaTeX-sectioning-map-hide YaTeX-minibuffer-sectioning-map) + (YaTeX-sectioning-map-hide YaTeX-sectioning-minibuffer-map) ) (defvar YaTeX-sectioning-buffer-map nil @@ -85,13 +97,13 @@ "Hide sectioning commands under level N." (let ((cw (selected-window))) (YaTeX-showup-buffer YaTeX-sectioning-buffer nil t) - (if (>= n (1- (length YaTeX-sectioning-level))) + (if (>= n YaTeX-sectioning-max-level) (progn (set-selective-display nil) (message "Show all.")) (set-selective-display (1+ n)) - (if (nth n YaTeX-sectioning-level) - (message "Hide lower than %s" (car (nth n YaTeX-sectioning-level))) + (if (rassq n YaTeX-sectioning-level) + (message "Hide lower than %s" (car (rassq n YaTeX-sectioning-level))) (message ""))) (if (numberp selective-display) (setq mode-name (format "level %d" (1- selective-display))) @@ -118,9 +130,11 @@ C-n Down sectioning level. 1 and \\chapter, C-v Scroll up *Sectioning line* buffer. 2 and \\section, M-v Scroll down *Sectioning line* buffer. 3 and \\subsection, -SPC Complete word. 4 and \\subsubsection, -TAB Complete word. 5 and \\paragraph. -C-l Recenter recent line. 6 Show all. +C-z Scroll up by 1 line. 4 and \\subsubsection, +C-w Scroll down by 1 line. 5 and \\paragraph. +SPC Complete word. 6 Show all. +TAB Complete word. +C-l Recenter recent line. RET Select. ==== End of HELP ===== ") @@ -138,15 +152,18 @@ (interactive "p") (if (eq (selected-window) (minibuffer-window)) (let*((command (buffer-string)) + (aster (equal (substring command -1) "*")) + (command (if aster (substring command 0 -1) command)) (alist YaTeX-sectioning-level) - (level (cdr-safe (assoc command alist)))) - (or level (error "No such sectioning command.")) + (level 0)) + (or (assoc command alist) (error "No such sectioning command.")) + (while (not (string= (car (nth level alist)) command)) + (setq level (1+ level))) ;I want to use `member'.... (setq level (- level n)) (if (or (< level 0) (>= level (length alist))) (ding) (erase-buffer) - (insert (car (nth level alist)))) - )) + (insert (concat (car (nth level alist)) (if aster "*" "")))))) ) (defun YaTeX-sectioning-down (n) @@ -183,18 +200,19 @@ (progn (YaTeX-showup-buffer YaTeX-sectioning-buffer nil t) (or (search-forward "<<--" nil t) - (search-backward "<<--" nil t)) + (search-backward "<<--" nil)) (recenter (or arg (/ (window-height) 2)))) (select-window cw))) ) (defvar YaTeX-sectioning-minibuffer " *sectioning*" "Miniuffer used for sectioning") +;;;###autoload (defun YaTeX-read-section-in-minibuffer (prompt table &optional default delim) (interactive) (let ((minibuffer-completion-table table)) (read-from-minibuffer - prompt default YaTeX-minibuffer-sectioning-map)) + prompt default YaTeX-sectioning-minibuffer-map)) ) (defun YaTeX-get-sectioning-level () @@ -265,6 +283,7 @@ command)) ) +;;;###autoload (defun YaTeX-make-section-with-overview () "Input sectining command with previous overview." (interactive) @@ -278,4 +297,3 @@ ) (provide 'yatexsec) -;;(YaTeX-define-key "o" 'YaTeX-make-section-with-overview)