diff --git a/docs/htmlqa b/docs/htmlqa index c09558b..b823ecb 100644 --- a/docs/htmlqa +++ b/docs/htmlqa @@ -36,7 +36,7 @@ �̋@�\������ auto-insert-tkld ���g���܂��傤�B��҂́A ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/auto-inset-tkld.tar.Z �œ���ł��܂��B - http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/elisp-tips.html#yahtml-mode-hook + http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/elisp/yahtml-mode.html �ɐݒ�Ⴊ�����Ă���܂��B �����̑� diff --git a/docs/yatexe.tex b/docs/yatexe.tex index 4424985..012b7c6 100644 --- a/docs/yatexe.tex +++ b/docs/yatexe.tex @@ -29,7 +29,7 @@ * Main features:: What YaTeX can do * Installation:: Guide to install * Typesetting:: Call typesetting processes -* %# notation:: Quick notation of controlling YaTeX +* %#notation:: * Completion:: Input LaTeX commands with completion * Local dictionaries:: Directory dependent completion * Commenting out:: Commenting/uncommenting text @@ -77,10 +77,18 @@ * view-sectioning:: +Cursor jump + +* Jump to corresponding object:: +* Invoking image processor:: +* Jump to main file:: +* Jumping around the environment:: +* Jumping to last completion position:: + Changing and Deleting -* Changing La@TeX{} commands:: -* Killing La@TeX{} commands:: +* Changing LaTeX commands:: +* Killing LaTeX commands:: Customizations @@ -104,8 +112,8 @@ How the add-in function works -* Defining `option add-in':: -* Defining `argument add-in':: +* Defining option-add-in:: +* Defining argument-add-in:: @end menu @node What is YaTeX?, Main features, Top, Top @@ -181,7 +189,7 @@ loaded, mode string on mode line will be turned to "YaTeX". -@node Typesetting, %# notation, Installation, Top +@node Typesetting, %#notation, Installation, Top @comment node-name, next, previous, up @chapter Typesetting @cindex typesetting @@ -220,7 +228,7 @@ @node Calling typesetter, Calling previewer, Typesetting, Typesetting @comment node-name, next, previous, up -@section{Calling typesetter} +@section Calling typesetter Typing @kbd{[prefix] t j}, the current editing window will be divided horizontally when you invoke latex command, and log message of La@TeX{} @@ -246,7 +254,7 @@ Since @kbd{[prefix] tr} pastes the region into the file @file{texput.tex} in the current directory, you should be careful of overwriting. The method of specification of the region is shown in the -section @xref{%#NOTATION}. +section @xref{%#notation}. The documentstyle for typeset-region is the same as that of editing file if you edit one file, and is the same as main file's if you @@ -254,7 +262,7 @@ @node Calling previewer, Printing out, Calling typesetter, Typesetting @comment node-name, next, previous, up -@section{Calling previewer} +@section Calling previewer @kbd{[prefix] t p} invokes the TeX previewer. And if you are using xdvi-remote, which can be controled from other terminals, @kbd{[prefix] t @@ -264,7 +272,7 @@ @node Printing out, , Calling previewer, Typesetting @comment node-name, next, previous, up -@section{Printing out} +@section Printing out When you type @code{[preifx] t l}, YaTeX asks you the range of dvi-printing by default. You can skip this by invoking it with @@ -274,7 +282,7 @@ C-u [prefix] tl @end example -@node %# notation, Completion, Typesetting, Top +@node %#notation, Completion, Typesetting, Top @comment node-name, next, previous, up @chapter %# notation @cindex %# notation @@ -289,7 +297,7 @@ * Editing %# notation:: @end menu -@node Changing typesetter, Static region for typesetting, %# notation, %# notation +@node Changing typesetter, Static region for typesetting, %#notation, %#notation @comment node-name, next, previous, up @section To change the `latex' command or to split a source text. @cindex typesetter @@ -304,7 +312,7 @@ anywhere in the source text. This is useful for changing typesetter. -@node Splitting input files, Static region for typesetting, Changing typesetter, %# notation +@node Splitting input files, Static region for typesetting, Changing typesetter, %#notation @comment node-name, next, previous, up And if you split the source text and @@ -341,7 +349,7 @@ is in the parent directory(not %#!latex ../main.tex). @end itemize -@node Static region for typesetting, Lpr format, Changing typesetter, %# notation +@node Static region for typesetting, Lpr format, Changing typesetter, %#notation @comment node-name, next, previous, up @section Static region @cindex static region @@ -391,7 +399,7 @@ @code{%#BEGIN} alone at the middle of very long text. Do not forget to erase @code{%#BEGIN} @code{%#END} pair. -@node Lpr format, Editing %# notation, Static region for typesetting, %# notation +@node Lpr format, Editing %# notation, Static region for typesetting, %#notation @comment node-name, next, previous, up @section Lpr format @cindex lpr format @@ -429,7 +437,7 @@ %#LPR dvi2ps %s | lpr @end example -@node Editing %# notation, , Lpr format, %# notation +@node Editing %# notation, , Lpr format, %#notation @comment node-name, next, previous, up @section Editing %# notation @@ -453,7 +461,7 @@ When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are automatically erased. -@node Completion, Local dictionaries, %# notation, Top +@node Completion, Local dictionaries, %#notation, Top @comment node-name, next, previous, up @chapter Completion @cindex completion @@ -725,7 +733,7 @@ @dots{} Shift up sectioning lines in region @item D @dots{} Shift down sectioning lines in region -@item 0$B!A(B6 +@item 0@dots{}6 @dots{} Hide sectioning commands whose level is lower than n @end table @@ -1029,6 +1037,17 @@ @cindex cursor jump @cindex prefix g + +@menu +* Jump to corresponding object:: +* Invoking image processor:: +* Jump to main file:: +* Jumping around the environment:: +* Jumping to last completion position:: +@end menu + +@node Jump to corresponding object, Invoking image processor, Cursor jump, Cursor jump +@comment node-name, next, previous, up @section Jump to corresponding object Typing @@ -1072,7 +1091,9 @@ Note that this function doesn't work on @code{begin/end}, @code{%#BEGIN/%#END} pairs because it is meaningless. -@section{Invoking image processor} +@node Invoking image processor, Jump to main file, Jump to corresponding object, Cursor jump +@comment node-name, next, previous, up +@section Invoking image processor @cindex{Drawing tool invocation} `image-including line' described above means such lines as @@ -1102,6 +1123,8 @@ image viewer or drawing tool. @end enumerate +@node Jump to main file, Jumping around the environment, Invoking image processor, Cursor jump +@comment node-name, next, previous, up @section Jump to main file Typing @@ -1118,7 +1141,9 @@ in a sub text switch the buffer to the main text specified by @code{%#!} notation. -@section Other jumping features +@node Jumping around the environment, Jumping to last completion position, Jump to main file, Cursor jump +@comment node-name, next, previous, up +@section Jumping around the environment And these are the functions which work on the current La@TeX{} environment: @@ -1135,6 +1160,16 @@ @cindex M-C-e @cindex M-C-@@ +@node Jumping to last completion position, , Jumping around the environment, Cursor jump +@comment node-name, next, previous, up +@section Jumping to last completion position + +YaTeX always memorize the position of completion into register @code{3}. +So every time you make a trip to any other part of text other than you are +writing, you can return to the editing paragraph by calling +register-to-point with argument YaTeX-current-position-register, which is +achieved by typing @kbd{C-x j 3}(by default). + @node Changing and Deleting, Filling, Cursor jump, Top @comment node-name, next, previous, up @chapter Changing and Deleting @@ -1152,11 +1187,11 @@ @cindex prefix k @menu -* Changing La@TeX{} commands:: -* Killing La@TeX{} commands:: +* Changing LaTeX commands:: +* Killing LaTeX commands:: @end menu -@node Changing La@TeX{} commands, Killing La@TeX{} commands, Changing and Deleting, Changing and Deleting +@node Changing LaTeX commands, Killing LaTeX commands, Changing and Deleting, Changing and Deleting @comment node-name, next, previous, up @section Changing La@TeX{} commands @@ -1183,7 +1218,7 @@ 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 +@node Killing LaTeX commands, , Changing LaTeX commands, Changing and Deleting @comment node-name, next, previous, up @section Killing La@TeX{} commands @cindex Killing La@TeX{} commands @@ -1908,11 +1943,11 @@ job referring the value of its argument. @menu -* Defining `option add-in':: -* Defining `argument add-in':: +* 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 +@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' @@ -1939,7 +1974,7 @@ (concat "{" (read-string "Rule: ") "}")) @end lisp -@node Defining `argument add-in', , Defining `option add-in', How the add-in function works +@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' @@ -2050,7 +2085,7 @@ @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} +@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. diff --git a/docs/yatexj.tex b/docs/yatexj.tex index a3f7797..44170e2 100644 --- a/docs/yatexj.tex +++ b/docs/yatexj.tex @@ -6,8 +6,9 @@ @iftex @c @syncodeindex fn cp @c ���‚��Y���̂ł����ɏ����Ƃ����B -@c �m�[�h���������� C-l C-u C-e -@c ���j���[���₵���� C-l C-u C-m +@c �m�[�h���������� C-l C-u C-n �S���̃m�[�h�X�V C-l C-u C-e +@c ���j���[���₵���� C-l C-u C-m �S���̃��j���[�X�V C-l C-u C-a +@c �t�H�[�}�b�g����Ƃ��� C-l C-e C-b @syncodeindex vr cp @end iftex @@ -83,6 +84,14 @@ * Recursive completion:: �ċA�⊮ * view-sectioning:: �Z�N�V������؂�̃A�E�g���C���\�� +�J�[�\���W�����v + +* �Ή��I�u�W�F�N�g�ւ̃W�����v:: +* ���G�`���c�[���N��:: +* ���C���t�@�C���ւ̃W�����v:: +* �‹���P�ʂƂ����W�����v:: +* �Ō�̕⊮�ʒu�ւ̃W�����v:: + �ύX/�폜 * Changing LaTeX command:: La@TeX{} �R�}���h�̕ύX @@ -288,7 +297,7 @@ @node Calling typesetter, Calling previewer, Invocation, Invocation @comment node-name, next, previous, up @section �^�C�v�Z�b�^�N�� -@cindex �^�C�v�Z�b�^�N�� +@cindex �^�C�v�Z�b�^�N��[�����ӂ��‚����Ƃ�] @cindex �^�C�v�Z�b�g�G���[[�����ӂ��‚Ƃ��炠] @cindex �G���[�C��[���炠���䂤����] @@ -317,7 +326,7 @@ @subsection �̈�^�C�v�Z�b�g �|�C���g�ƃ}�[�N�̊ԁA���邢�̓e�L�X�g���ɖ��ߍ��� @code{%#BEGIN} �� -@code{%#END}�̊Ԃ̗̈�(@ref{%#�L�@})������؂����ă^�C�v�Z�b�g���邱�Ƃ� +@code{%#END}�̊Ԃ̗̈�(@ref{%#notation})������؂����ă^�C�v�Z�b�g���邱�Ƃ� �ł��܂��B���̏ꍇ�� documentstyle �́A�P��t�@�C���� La@TeX{} �\�[�X�̕� �W���ɂ͂��̃t�@�C���� documentstyle ���A�ʃt�@�C������ include ���Ă���� ���ɂ̓��C���t�@�C���� documentstyle �������I�ɑI������܂��B�w��̈�́A @@ -534,7 +543,7 @@ @node Editing %# notation, , lpr format, %#notation @comment node-name, next, previous, up @section %#�L�@���̂̕ҏW -@cindex %#���ق��������̂ւ񂵂イ[%#���ق��������̂ւ񂵂䂤] +@cindex %#�L�@���̂̕ҏW[%#���ق��������̂ւ񂵂䂤] �ȏ�̂悤��@code{%#}�Ŏn�܂�e�퐧��L�@��ҏW���邽�߂ɂ� @@ -824,12 +833,14 @@ �����܂�(���ۂɂ���Č���Ε�����܂�)�B @code{*Sectioning Lines*}�o�b�t�@�́A + @table @kbd @item M-x YaTeX-section-overview @dots{} �Z�N�V������؂�ꗗ�o�b�t�@�𐶐� @end table -@cindex �Z�N�V������؂�ꗗ�o�b�t�@[��������񂭂��肢�����͂‚�] -�ō쐬���邱�Ƃ��ł��܂��B���̃o�b�t�@����I�����C�ӂ̍s�ŃX�y�[�X�������ƁA + +@cindex �Z�N�V������؂�ꗗ�o�b�t�@[��������񂭂��肢�����͂‚ӂ�] +�ō쐬���邱�Ƃ��ł��܂��B���̃o�b�t�@��I�����C�ӂ̍s�ŃX�y�[�X�������ƁA �Y������Z�N�V������؂�̂���{�����̏ꏊ�ɃW�����v���܂��B����ɁA���o�b �t�@�� @kbd{u} �������ƁA�\�[�X�e�L�X�g�̑Ή�����Z�N�V�����R�}���h����K �w�オ��(��: subsection �� section �ɕς��)�A@kbd{d}�������ƈ�K�w������ @@ -1185,6 +1196,17 @@ @cindex �J�[�\���W�����v[�������邵����] @cindex prefix g + +@menu +* �Ή��I�u�W�F�N�g�ւ̃W�����v:: +* ���G�`���c�[���N��:: +* ���C���t�@�C���ւ̃W�����v:: +* �‹���P�ʂƂ����W�����v:: +* �Ō�̕⊮�ʒu�ւ̃W�����v:: +@end menu + +@node �Ή��I�u�W�F�N�g�ւ̃W�����v, ���G�`���c�[���N��, Cursor jump, Cursor jump +@comment node-name, next, previous, up @section �Ή��I�u�W�F�N�g�ւ̃W�����v �������̂��낢��ȏꏊ�� @@ -1212,7 +1234,7 @@ �Ȃ��ꍇ�̓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�����I�[�v������Ă��Ȃ���΂Ȃ�܂���B@xref{%#notation} ���C���� .tex �t�@�C���� @code{\include{chap1}} �ȂǂɃJ�[�\�������킹�A @kbd{[prefix] g} �������ƁA@file{chap1.tex} �ɃW�����v���܂��B @@ -1228,8 +1250,10 @@ ���̋@�\�� @code{begin/end}, @code{%#BEGIN/%#END} �Ԃ̃W�����v�ɑ΂��Ă� (�Ӗ����Ȃ��Ǝv����̂�)�@�\���Ȃ��̂Œ��ӂ��Ă��������B -@section{���G�`���c�[���N��} -@cindex ���G�`���c�[���N��[���������[�邫�Ƃ�] +@node ���G�`���c�[���N��, ���C���t�@�C���ւ̃W�����v, �Ή��I�u�W�F�N�g�ւ̃W�����v, Cursor jump +@comment node-name, next, previous, up +@section ���G�`���c�[���N�� +@cindex ���G�`���c�[���N��[���������‚��邫�Ƃ�] ��L�́u�摜�t�@�C���̎�荞�݃}�N���v�Ƃ́A�Ⴆ�� @code{\epsfile@{file=foo@}} �̂悤�ȑ}�G��荞�݃R�}���h�̂��ƂŁA���̍s�� @@ -1262,6 +1286,8 @@ ���ɂ����炸�A�C�ӂ̌`���̃t�@�C����C�ӂ̃v���Z�b�T�ŏ�������R�}���h���� �P�ɌĂяo�����Ƃ��ł��܂��B +@node ���C���t�@�C���ւ̃W�����v, �‹���P�ʂƂ����W�����v, ���G�`���c�[���N��, Cursor jump +@comment node-name, next, previous, up @section ���C���t�@�C���ւ̃W�����v @file{chap1.tex}�̂悤�ȃT�u�t�@�C���ŁA @@ -1278,6 +1304,8 @@ �I�[�v�����Ă��Ȃ��ꍇ�́A�J�����g�f�B���N�g������T���Ď����I�ɃI�[�v���� �܂��B +@node �‹���P�ʂƂ����W�����v, �Ō�̕⊮�ʒu�ւ̃W�����v, ���C���t�@�C���ւ̃W�����v, Cursor jump +@comment node-name, next, previous, up @section �‹���P�ʂƂ����W�����v ����Ɍ��݂̊‹���P�ʂƂ��ċ@�\����R�}���h�Ɉȉ��̂��̂�����܂��B @@ -1300,7 +1328,14 @@ ��L�̃R�}���h�͒ʏ��@kbd{[prefix]}�L�[�ł͂Ȃ�@kbd{META}�L�[���v���t�B�N �X�Ƃ��ċ@�\����̂ł����Ӊ������B - +@node �Ō�̕⊮�ʒu�ւ̃W�����v, , �‹���P�ʂƂ����W�����v, Cursor jump +@comment node-name, next, previous, up +@section �Ō�̕⊮�ʒu�ւ̃W�����v + +�쒹�͕⊮���͂����ʒu����Ƀ��W�X�^ @code{3}�ɕۑ����Ă��܂��B +���͓r���Ŕ@���Ȃ�t�@�C���̔@���Ȃ�ʒu�ɍs�����Ƃ��Ă��A +@kbd{C-x j 3}(@code{jump-to-register})���g���Ē����ɍŌ�̕⊮���͈ʒu�ɖ� +�邱�Ƃ��ł��܂��B @node Modifying/Deleting, Filling, Cursor jump, Top @comment node-name, next, previous, up @@ -1486,14 +1521,14 @@ @noindent ���ݕҏW���̃t�@�C���� @code{\includeonly} �̃��X�g�ɉ����������ɂ�@kbd{a} -���A���ݕҏW���̃t�@�C�������� @code{\includeonly} �ɂ���������@kbd{R}���A +���A���ݕҏW���̃t�@�C�������� @code{\includeonly} �ɂ���������@kbd{r}���A @code{\includeonly} �̍s���R�����g�A�E�g���Ė��������������ɂ́A@kbd{%}�� ���ꂼ�ꉟ���ĉ������B @node What column, Intelligent newline, Includeonly, Top @comment node-name, next, previous, up @chapter �����͂ǂ�? -@cindex �����ǂ�?[�����͂Ƃ�] +@cindex �����͂ǂ�?[�����͂Ƃ�?] @cindex prefix & @cindex ���G��tabular[�ӂ����‚�tabular] @@ -1531,7 +1566,6 @@ @chapter ���܂������s @cindex ���܂������s[���܂����������悤] @cindex &����[&�ɂ䂤��悭] -@cindex prefix & tabular[*], array, itemize, enumerate, tabbing �‹���begin�^�⊮�œ��͂� �����A�܂��͊e�‹����� @@ -1576,7 +1610,7 @@ @node Changing mode of YaTeX, Online help, Intelligent newline, Top @comment node-name, next, previous, up @chapter �쒹�̓��샂�[�h�؂�ւ� -@cindex ���[�h�؂�ւ�[���[�Ƃ��肩��] +@cindex ���[�h�؂�ւ�[�����Ƃ��肩��] @cindex prefix w @table @kbd diff --git a/help/YATEXHLP.eng b/help/YATEXHLP.eng index 56d479a..a2d6dcc 100644 --- a/help/YATEXHLP.eng +++ b/help/YATEXHLP.eng @@ -800,7 +800,8 @@ spacing is suppressed. *{N}{PRE} : equivalent to writing N copies of PRE in the preamble. PRE may contain *{N'}{EXP'} expressions. - p{LEN} : makes entry in parbox of width LEN. + p{LEN} : makes entry in parbox of width LEN. This is useful when + each column contains long sentences. [[Usable commands in array, tabular environment]] \multicolumn @@ -815,7 +816,7 @@ -See below as sample. +See below as an example. \LaTeX Expression Printed image \begin{array}{ccr} @@ -833,6 +834,18 @@ \end{array} \right)\] +\begin{tabular}{lp{0.7\textwidth} + \hline ---------------------------- + \verb|.| & Period matches with . Period matches with any + any single character.\\ single character. + \verb|*| & Asterisk matches with * Asterisk matches with 0 + 0 or more repetition or more repetition of + of preceding regexp. preceding regexp. +\\ \hline ---------------------------- +\end{tabular} + +(End of example) + \right(, \left) or \right{, left} or \right[, \left] or \right|, \left| can enclose whole of array environment by parentheses, braces, brackets, norm respectively. The number of `\right's and `\left's should be the diff --git a/help/YATEXHLP.jp b/help/YATEXHLP.jp index daf13f7..613d254 100644 --- a/help/YATEXHLP.jp +++ b/help/YATEXHLP.jp @@ -801,6 +801,7 @@ \arraycolsep �� \tabcolsep �̃X�y�[�V���O�͗}������� *{N}{PRE} PRE�� N �񏑂����̂Ɠ��l�̍�p p{LEN} ���̃J������LEN�̒�����parbox�G���g���Ƃ��č쐬���� + �\�̍��ڂɒ������������܂܂��ꍇ�ɗp����Ɨǂ��B �yarray, tabular �‹��Ŏg����R�}���h�z \multicolumn @@ -833,6 +834,17 @@ \end{array} \right)\] +\begin{tabular}{lp{0.7\textwidth} + \hline ---------------------------- + \verb|.| & �s���I�h�͔C�ӂ� . �s���I�h�͔C�ӂ̈ꕶ�� + �ꕶ���Ƀ}�b�`���܂��B\\ �Ƀ}�b�`���܂��B + \verb|*| & �A�X�^���X�N�͒��O�� * �A�X�^���X�N�͒��O�̐��K + ���K�\����0��ȏ�J��Ԃ� �\������ȏ�J��Ԃ����� + ����邱�Ƃ��Ӗ����܂��B �邱�Ƃ��Ӗ����܂��B +\\ \hline ---------------------------- +\end{tabular} + + array�‹��� \right( \left) �ň͂ނƔz�񎩑̂�傫�Ȋ��ʂŊ���B���l�ɁA \right\{ \left\} �Ŕz��𒆊��ʂŁA\right[ \left] �Ŕz���劇�ʂŁA \right| \left| �Ŕz����m�����L��(��Βl�L��)�Ŋ��邱�Ƃ��ł���B @@ -1405,6 +1417,17 @@ �쒹���g��Tips���܂Ƃ߂��u���Ȃ����킽�����쒹�́c�v�Ƃ���WWW�y�[ �W���쐬���ĉ������܂����B +�������C����(�_�ˑ�w) + AMS-LaTeX�ł̐����‹��̕s������`�ƁA\[ .. \] �ł�fill���Ȃ����� + �w�E���Ē����܂����B + +�|�� �t�Ⴓ��(�d�ʑ�) + YaTeX-section-overview �̕s����C������p�b�`�𑗂��Ē����܂����B + +�F���� Kousuke����() + �������[�h�ł̃Z�N�V�����^�}�N���Ή��̗v�]�Ƒ����ׂ��}�N���ꗗ�� + �����܂����B + yatex (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) diff --git a/yahtml.el b/yahtml.el index 756d5ca..a41c45c 100644 --- a/yahtml.el +++ b/yahtml.el @@ -1,7 +1,9 @@ ;;; -*- Emacs-Lisp -*- ;;; (c ) 1994-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] -;;; Last modified Tue Dec 16 21:10:05 1997 on crx +;;; Last modified Mon Oct 26 19:57:36 1998 on firestorm ;;; $Id$ +(defconst yahtml-revision-number "1.65.5" + "Revision number of running yatex.el") ;;;[Installation] ;;; @@ -121,8 +123,7 @@ ;;; (lisp�ϐ� yahtml-www-browser �̐ݒ�����Y��� ;;; ���B�����߂� "netscape" �ŁA�˂����̏ꍇ���ɂ˂� ;;; �����N������Ă����ꍇ���̂˂����� Reload ���߂� -;;; ����Ƃ����|�����o���܂��B���������̂Ƃ���X�ł� -;;; �˂�������񂾂�) +;;; ����Ƃ����|�����o���܂�) ;;; * [prefix] a YaTeX �̃A�N�Z���g�L���⊮�Ɠ����ł��B ;;; < > �������͂ł��܂��B ;;; @@ -340,7 +341,7 @@ (defvar yahtml-typeface-table (append - '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp") + '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp") ("strike") ("strong") ("var") ("b") ("i") ("tt") ("u") ("address") ("font")) yahtml-env-table) "Default completion table of typeface designator") @@ -380,13 +381,14 @@ (interactive) (cond ((and YaTeX-emacs-20 (fboundp 'coding-system-equal)) - (if t (or (coding-system-equal - yahtml-coding-system buffer-file-coding-system) - (set-buffer-file-coding-system yahtml-coding-system)) - ;;^v which is better? - (let ((bmp (buffer-modified-p))) + (let ((mp (buffer-modified-p)) + (ud (memq buffer-file-coding-system + '(undecided undecided-unix undecided-dos undecided-mac)))) + (if (coding-system-equal + yahtml-coding-system buffer-file-coding-system) + nil ; if coding-system is the same, do nothing (set-buffer-file-coding-system yahtml-coding-system) - (set-buffer-modified-p bmp)))) + (if ud (set-buffer-modified-p mp))))) ((featurep 'mule) (set-file-coding-system yahtml-coding-system)) ((boundp 'NEMACS) @@ -636,7 +638,7 @@ (defvar yahtml-completing-buffer nil) (defun yahtml-collect-labels (&optional file) - "Collect current buffers label (). + "Collect current buffers label (). If optional argument FILE is specified collect labels in FILE." (let (list bound) (save-excursion @@ -645,10 +647,10 @@ (set-buffer (find-file-noselect file)))) (save-excursion (goto-char (point-min)) - (while (re-search-forward "" nil t) - (if (and (re-search-backward "\\(name\\|id\\)=" bound t) + (if (and (re-search-backward "\\(name\\|id\\)\\s *=" bound t) (progn (goto-char (match-end 0)) (skip-chars-forward " \t\n") @@ -863,7 +865,9 @@ (defun yahtml:font () "Add-in function for `font'" - (yahtml-make-optional-argument "color" (read-string "color="))) + (concat + (yahtml-make-optional-argument "color" (read-string "color=")) + (yahtml-make-optional-argument "size" (read-string "size=")))) ;;; ---------- Simple tag ---------- (defun yahtml-insert-tag (region-mode &optional tag) @@ -920,9 +924,9 @@ "Convenient function to insert

" (interactive "P") (if arg (yahtml-insert-tag nil "p") - (insert "

") - (save-excursion - (insert "

")))) + (save-excursion ;insert "/p" first to memorize "p" + (yahtml-insert-single "/p")) ;in the last-completion variable + (yahtml-insert-single "p"))) ;;; ---------- Jump ---------- (defun yahtml-on-href-p () @@ -1028,7 +1032,7 @@ (defun yahtml-jump-to-name (name) "Jump to html's named tag." - (setq name (format "name\\s *=\\s *\"?%s\"?" name)) + (setq name (format "\\(name\\|id\\)\\s *=\\s *\"?%s\"?" name)) (or (and (re-search-forward name nil t) (goto-char (match-beginning 0))) (and (re-search-backward name nil t) (goto-char (match-beginning 0))) (message "Named tag `%s' not found" (substring href 1)))) @@ -1110,6 +1114,61 @@ (concat yahtml-image-viewer " " image)) (message "Invoking %s %s...Done" yahtml-image-viewer image))))) +(defun yahtml-get-attrvalue (attr) + "Extract current tag's attribute value from buffer." + (let (e (case-fold-search t)) + (save-excursion + (or (looking-at "<") + (progn (skip-chars-backward "^<") (backward-char 1))) + (setq e (save-excursion (forward-list 1) (point))) + (if (and + (re-search-forward (concat "\\b" attr "\\b") e t) + (progn (skip-chars-forward " \t\n=") + (looking-at "\"?\\([^\"> \t\n]+\\)\"?"))) + (YaTeX-match-string 1))))) + +(defun yahtml-goto-corresponding-source (&optional other) + "Goto applet's source." + (let ((env (yahtml-current-tag)) s (p (point))) + (cond + ((string-match "applet" env) + (if (setq s (yahtml-get-attrvalue "code")) + (progn + (setq s (YaTeX-match-string 1) + s (concat + (substring s 0 (string-match "\\.[A-Za-z]+$" s)) + ".java")) + (if other (YaTeX-switch-to-buffer-other-window s) + (YaTeX-switch-to-buffer s)) + s) ;return source file name + (message "No applet source specified") + (sit-for 1) + nil)) + ((string-match "!--#include" env) + (cond + ((setq s (yahtml-get-attrvalue "file")) ; + (if other (YaTeX-switch-to-buffer-other-window s) + (YaTeX-switch-to-buffer s)) + s) + ((setq s (yahtml-get-attrvalue "virtual")); + (setq s (yahtml-url-to-path s)) + (if other (YaTeX-switch-to-buffer-other-window s) + (YaTeX-switch-to-buffer s)) + s))) + ((and (string-match "!--#exec" env) + (setq s (yahtml-get-attrvalue "cmd"))) + (setq s (substring s 0 (string-match " \t\\?" s))) ;get argv0 + (let ((b " *yahtmltmp*")) ;peek a little + (unwind-protect + (progn + (set-buffer (get-buffer-create b)) + (insert-file-contents s nil 0 100) + (if (looking-at "#!") + (if other (YaTeX-switch-to-buffer-other-window s) + (YaTeX-switch-to-buffer s)))) + (kill-buffer (get-buffer b))) + (get-file-buffer s)))))) + (defun yahtml-goto-corresponding-* (&optional other) "Go to corresponding object." (interactive) @@ -1117,6 +1176,7 @@ ((yahtml-goto-corresponding-href other)) ((yahtml-goto-corresponding-img)) ((yahtml-goto-corresponding-begend)) + ((yahtml-goto-corresponding-source other)) (t (message "I don't know where to go.")) )) @@ -1132,7 +1192,7 @@ ;;; ---------- killing ---------- (defun yahtml-kill-begend (&optional whole) - (let ((tag (yahtml-on-begend-p)) p q r) + (let ((tag (yahtml-on-begend-p)) p q r bbolp) (if tag (save-excursion (or (looking-at "<") @@ -1147,23 +1207,26 @@ (setq q (point))) ;now q has end-line's (point) (if (not whole) (kill-region - (progn (skip-chars-backward " \t") (if (bolp) (point) q)) + (progn (skip-chars-backward " \t") + (if (setq bbolp (bolp)) (point) q)) (progn (forward-list 1) (setq r (point)) (skip-chars-forward " \t") - (if (and (eolp) (not (eobp))) (1+ (point)) r)))) + (if (and bbolp (eolp) (not (eobp))) (1+ (point)) r)))) (goto-char p) (skip-chars-backward " \t") (if (not whole) (progn (kill-append (buffer-substring - (setq p (if (bolp) (point) p)) + (setq p (if (setq bbolp (bolp)) (point) p)) (setq q (progn (forward-list 1) (setq r (point)) (skip-chars-forward " \t") - (if (and (eolp) (not (eobp))) (1+ (point)) r)))) + (if (and bbolp (eolp) (not (eobp))) + (1+ (point)) + r)))) t) (delete-region p q)) (kill-region @@ -1271,6 +1334,7 @@ (setq tag (if yahtml-prefer-upcases (upcase tag) (downcase tag))) (insert (format "%s%s" tag (yahtml-addin tag))) (goto-char q) + (set-marker q nil) (delete-region (point) (progn (skip-chars-forward "^>") (point))) (insert tag)))) t)))) @@ -1305,6 +1369,8 @@ 'yahtml-tmp-form-table))) (delete-region beg end) (goto-char beg) + (set-marker beg nil) + (set-marker end nil) (insert new) t) (goto-char p) @@ -1388,8 +1454,10 @@ (defun yahtml-fill-paragraph (arg) (interactive "P") - (let*((case-fold-search t) (p (point)) + (let*((case-fold-search t) (p (point)) fill-prefix (e (or (yahtml-inner-environment-but "^\\(a\\|p\\)\\b" t) "html")) + indent + (startp (get 'YaTeX-inner-environment 'point)) (prep (string-match "^pre$" e)) (ps1 (if prep (default-value 'paragraph-start) paragraph-start)) @@ -1401,6 +1469,12 @@ (progn (if prep (fset 'move-to-column 'yahtml-move-to-column)) + (save-excursion + (beginning-of-line) + (indent-to-column (yahtml-this-indent)) + (setq fill-prefix + (buffer-substring (point) (point-beginning-of-line))) + (delete-region (point) (point-beginning-of-line))) (fill-region-as-paragraph (progn (re-search-backward paragraph-start nil t) (or (save-excursion @@ -1414,7 +1488,9 @@ (point))) (progn (goto-char p) (re-search-forward ps2 nil t) - (match-beginning 0)))) + (match-beginning 0) + + ))) (fset 'move-to-column yahtml-saved-move-to-column))))) ;(defun yahtml-indent-new-commnet-line () @@ -1450,9 +1526,8 @@ (and (bolp) (skip-chars-forward " \t"))) (yahtml-indent-line-real)))) -(defun yahtml-indent-line-real () - (interactive) - (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir") +(defun yahtml-this-indent () + (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir\\|font") (itemizing-envs "^\\([uod]l\\|menu\\|dir\\)$") (itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)\\b") inenv p col peol (case-fold-search t)) @@ -1471,17 +1546,16 @@ (skip-chars-forward " \t") (cond ;lookup current line's tag ((looking-at (concat "")) - (YaTeX-reindent col)) + col) ((looking-at itms) - (YaTeX-reindent (+ col yahtml-environment-indent))) + (+ col yahtml-environment-indent)) ((and yahtml-hate-too-deep-indentation (looking-at (concat "<\\(" envs "\\)"))) - (YaTeX-reindent (+ col (* 2 yahtml-environment-indent)))) + (+ col (* 2 yahtml-environment-indent))) ((and (< p (point)) (string-match itemizing-envs inenv) (save-excursion (and - ;;(re-search-backward itms p t) (setq op (point)) (goto-char p) (re-search-forward itms op t) @@ -1492,22 +1566,28 @@ (setq col (if (looking-at "$") (+ col yahtml-environment-indent) (current-column))))))) - (YaTeX-reindent col)) + col) (t - (YaTeX-reindent (+ col yahtml-environment-indent))))))) - (and (bolp) (skip-chars-forward " \t")) - (if (and (setq inenv (yahtml-on-begend-p)) - (string-match - (concat "^\\<\\(" yahtml-struct-name-regexp "\\)") inenv)) - (save-excursion - (setq peol (point-end-of-line)) - (or (= (char-after (point)) ?<) - (progn (skip-chars-backward "^<") (forward-char -1))) - (setq col (current-column)) - (if (and (yahtml-goto-corresponding-begend t) - (> (point) peol)) ;if on the different line - (YaTeX-reindent col))))) - (and (bolp) (skip-chars-forward " \t")))) + (+ col yahtml-environment-indent))))) + (t col))))) + +(defun yahtml-indent-line-real () + "Indent current line." + (interactive) + (YaTeX-reindent (yahtml-this-indent)) + (if (bolp) (skip-chars-forward " \t")) + (let (peol col) + (if (and (setq inenv (yahtml-on-begend-p)) + (string-match + (concat "^\\<\\(" yahtml-struct-name-regexp "\\)") inenv)) + (save-excursion + (setq peol (point-end-of-line)) + (or (= (char-after (point)) ?<) + (progn (skip-chars-backward "^<") (forward-char -1))) + (setq col (current-column)) + (if (and (yahtml-goto-corresponding-begend t) + (> (point) peol)) ;if on the different line + (YaTeX-reindent col)))))) ;(defun yahtml-fill-item () ; "Fill item HTML version" @@ -1768,7 +1848,7 @@ ;; include&exec ("" include) ;; string - (hilit-string-find 39 string) + (hilit-string-find ?\\ string) (yahtml-hilit-region-tag "\\(em\\|strong\\)" bold) ("" 0 decl) ("<\\(di\\|dt\\|li\\|dd\\)>" 0 label) @@ -1799,6 +1879,7 @@ (cons (cons 'yahtml-mode yahtml-hilit-patterns-alist) hilit-patterns-alist)))) +(run-hooks 'yahtml-load-hook) (provide 'yahtml) ; Local variables: diff --git a/yatex.el b/yatex.el index 533d741..523becf 100644 --- a/yatex.el +++ b/yatex.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; Yet Another tex-mode for emacs. -;;; yatex.el rev. 1.65 -;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Tue Dec 16 22:15:26 1997 on crx +;;; yatex.el rev. 1.66 +;;; (c )1991-1998 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Mon Oct 26 21:05:14 1998 on firestorm ;;; $Id$ ;; This program is free software; you can redistribute it and/or modify @@ -16,22 +16,16 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with this program; see the file COPYING. If not, write to the +;; Software Foundation Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. (require 'comment) (require 'yatexlib) -(defconst YaTeX-revision-number "1.65" +(defconst YaTeX-revision-number "1.66" "Revision number of running yatex.el" ) ;---------- Local variables ---------- -;;; -;; Initialize local variable for yatex-mode. -;; Preserving user preferred definitions. -;; ** Check all of these defvar-ed values ** -;; ** and setq other values more suitable ** -;; ** for your site, if needed. ** -;;; (defvar YaTeX-prefix "\C-c" "*Prefix key to call YaTeX functions. You can select favorite prefix key by setq in your ~/.emacs." @@ -139,7 +133,7 @@ "*Regular expression of item command." ) (defvar YaTeX-sectioning-regexp - "\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b" + "part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\(\\*?\\|\\b\\)" "*LaTeX sectioning commands regexp." ) (defvar YaTeX-paragraph-start @@ -155,6 +149,7 @@ (concat "^[ \t]*%\\|^[ \t]*$\\|^\C-l\\|\\\\\\\\$\\|^[ \t]*\\\\\\(" YaTeX-sectioning-regexp ;sectioning commands "\\|begin{\\|end{" ;special declaration + "\\|\\[\\|\\]" "\\|newpage\\b\\|vspace\\b" "\\)") "*Paragraph delimiter regexp of common LaTeX source. Use this value @@ -182,6 +177,7 @@ (concat "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|" ;LaTeX "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|" ;AMS-LaTeX + "[bpvV]?matrix\\|smallmatrix\\|cases\\|" ;AMS-LaTeX "xalignat\\*?\\|xxalignat\\*?") ;AMS-LaTeX "*Regexp of environments where `&' becomes field delimiter.") (defvar YaTeX-uncomment-once t @@ -241,8 +237,13 @@ ("newcommand" 2) ("renewcommand" 2) ("setcounter" 2) ("newenvironment" 3) ("newtheorem" 2) ("cline") ("framebox") ("savebox" 2) ("sbox" 2) ("newsavebox") ("usebox") - ("date") ("put") ("ref") - ("frac" 2) ("multicolumn" 3) ("shortstack") + ("date") ("put") ("ref") ("pageref") + ("multicolumn" 3) ("shortstack") + ;; for mathmode accent + ("tilde") ("hat") ("check") ("bar") ("dot") ("ddot") ("vec") + ("widetilde") ("widehat") ("overline") ("overrightarrow") + ;; section types in mathmode + ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") ) "Default completion table for section-type completion." ) @@ -278,13 +279,14 @@ (defvar singlecmd-table (append - '(("maketitle") ("sloppy") ("protect") + '(("maketitle") ("makeindex") ("sloppy") ("protect") ("LaTeX") ("TeX") ("item") ("item[]") ("appendix") ("hline") ;;("rightarrow") ("Rightarrow") ("leftarrow") ("Leftarrow") - ("pagebreak") ("newpage") ("clearpage") ("cleardoublepage") + ("pagebreak") ("nopagebreak") + ("newpage") ("clearpage") ("cleardoublepage") ("footnotemark") ("verb") ("verb*") ("linebreak") ("pagebreak") ("noindent") ("indent") - ("left") ("right") + ("left") ("right") ("dots") ) (if YaTeX-greek-by-maketitle-completion '(("alpha") ("beta") ("gamma") ("delta") ("epsilon") @@ -460,13 +462,14 @@ (setq YaTeX-latex-message-code latex-message-kanji-code))) (defvar YaTeX-mode-syntax-table nil + "*Syntax table for yatex-mode") (if YaTeX-mode-syntax-table nil (setq YaTeX-mode-syntax-table (make-syntax-table (standard-syntax-table))) - (modify-syntax-entry ?\< "(>" YaTeX-mode-syntax-table) - (modify-syntax-entry ?\> ")<" YaTeX-mode-syntax-table) (modify-syntax-entry ?\n " " YaTeX-mode-syntax-table) + (modify-syntax-entry ?\{ "(}" YaTeX-mode-syntax-table) + (modify-syntax-entry ?\} "){" YaTeX-mode-syntax-table) ) ;---------- Provide YaTeX-mode ---------- @@ -547,9 +550,15 @@ (cond ((boundp 'MULE) (set-file-coding-system YaTeX-coding-system)) ((and YaTeX-emacs-20 (fboundp 'coding-system-equal)) - (or (coding-system-equal - YaTeX-coding-system buffer-file-coding-system) - (set-buffer-file-coding-system YaTeX-coding-system))) + (let ((mp (buffer-modified-p)) + (ud (memq + buffer-file-coding-system + '(undecided undecided-unix undecided-dos undecided-mac)))) + (if (coding-system-equal + YaTeX-coding-system buffer-file-coding-system) + nil ; if coding-system is the same, do nothing + (set-buffer-file-coding-system YaTeX-coding-system) + (if ud (set-buffer-modified-p mp))))) ((featurep 'mule) (set-file-coding-system YaTeX-coding-system)) ((boundp 'NEMACS) @@ -744,6 +753,7 @@ Optional 4th arg CMD is LaTeX command name, for non-interactive use." (interactive "P") (setq YaTeX-current-completion-type 'section) + (if (equal arg '(4)) (setq beg (region-beginning) end (region-end))) (unwind-protect (let* ((source-window (selected-window)) @@ -755,12 +765,12 @@ (if (> (minibuffer-depth) 0) (format "%s???{} (default %s)%s: " YaTeX-ec section-name (format "[level:%d]" (minibuffer-depth))) - (format "(C-v for view-section) %s???{} (default %s): " - YaTeX-ec section-name))) + (format "(C-v for view-section) %s???{%s} (default %s): " + YaTeX-ec (if beg "region" "") section-name))) nil))) (section (if (string= section "") section-name section)) (numarg ;; The number of section-type command's argument - (or arg + (or (and (numberp arg) arg) (nth 1 (YaTeX-lookup-table section 'section)) 1)) (arg-reader (intern-soft (concat "YaTeX::" section))) @@ -776,7 +786,8 @@ (set-marker e (point)) (goto-char beg) (insert YaTeX-ec section-name "{") - (goto-char (marker-position e))) + (goto-char e) + (set-marker e nil)) (use-global-map YaTeX-recursive-map) (if (= numarg 0) (YaTeX-make-singlecmd section-name) (progn (insert YaTeX-ec section-name) @@ -830,6 +841,7 @@ nil nil)))) (if (string= fontsize "") (setq fontsize fontsize-name)) + (setq YaTeX-current-completion-type 'large) (setq fontsize-name fontsize) (YaTeX-update-table (list fontsize-name) @@ -840,10 +852,11 @@ (insert "{\\" fontsize-name " ") (exchange-point-and-mark) (insert "}")) - (insert "{\\" fontsize-name " }") + (insert "{\\" fontsize-name " ") (if YaTeX-current-position-register (point-to-register YaTeX-current-position-register)) - (forward-char -1))) + (save-excursion + (insert (YaTeX-addin fontsize-name) "}")))) ) (defun YaTeX-make-fontsize-region () @@ -1171,7 +1184,7 @@ (interactive "P") (message (concat "J)latex R)egion B)ibtex mk(I)ndex " - (if (not YaTeX-dos) "K)ill-latex ") + (if (fboundp 'start-process) "K)ill-latex ") "P)review " (and (boundp 'window-system) window-system "S)earch ") "V)iewerr L)pr")) @@ -1227,12 +1240,14 @@ (while (re-search-forward "^%#\\(BEGIN\\)\\|\\(END\\)$" nil t) (beginning-of-line) (delete-region (point) (progn (forward-line 1) (point)))) - (goto-char (marker-position b)) + (goto-char b) (open-line 1) (delete-region (point) (progn (beginning-of-line)(point)));for 19 :-< (insert "%#BEGIN") - (goto-char (marker-position e)) - (insert "%#END\n")) + (goto-char e) + (insert "%#END\n") + (set-marker b nil) + (set-marker e nil)) ))) ) @@ -1251,28 +1266,30 @@ If optional second argument OTHERWIN is non-nil, move to other window." (let ((scmd "") label direc string blist (p (point)) (cb (current-buffer)) - (refcommands "label\\|ref\\|cite\\|bibitem") + (refcommands "label\\|\\(page\\)?ref\\|cite\\|bibitem") (func (function (lambda (string sfunc) (or (funcall sfunc string nil t) - (funcall (if (eq sfunc 'search-forward) - 'search-backward 'search-forward) + (funcall (if (eq sfunc 're-search-forward) + 're-search-backward 're-search-forward) string nil t)))))) (cond ((YaTeX-on-section-command-p refcommands) (setq scmd (cdr (assoc (YaTeX-match-string 1) - '(("label" . "ref") ("ref" . "label") + '(("label" . "\\(page\\)?ref") ("ref" . "label") + ("pageref" . "label") ("cite" . "bibitem") ("bibitem" . "cite"))))) (goto-char (match-end 0)) (let ((label (buffer-substring (1- (point)) (progn (backward-list 1) (1+ (point)))))) - (setq string (concat "\\" scmd "{" label "}")) + ;(setq string (concat "\\" scmd "{" label "}")) + (setq string (concat "\\\\" scmd "{" (regexp-quote label) "}")) (setq direc (if (string-match "ref\\|cite" scmd) - 'search-forward 'search-backward)) + 're-search-forward 're-search-backward)) (if YaTeX-current-position-register (point-to-register YaTeX-current-position-register)) - (if reverse (setq direc (if (eq direc 'search-forward) - 'search-backward 'search-forward))) + (if reverse (setq direc (if (eq direc 're-search-forward) + 're-search-backward 're-search-forward))) (if (funcall func string direc) ;label/ref found! (progn (if otherwin @@ -1322,8 +1339,9 @@ (setq blist (cdr blist))))) ) (if YaTeX-emacs-19 - (setq search-ring (cons string search-ring)) - (setq search-last-string string))) + (setq regexp-search-ring + (cons string (delete string regexp-search-ring))) + (setq search-last-regexp string))) (t nil))) ) @@ -1459,6 +1477,7 @@ ("\\\\postscriptbox{[^}]*}{[^}]*}{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 1) ("\\\\\\(epsfbox\\|includegraphics\\|epsfig\\)\\*?{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 2) ;\epsfbox{hoge.ps} or \includegraphics{hoge.eps} ("\\\\\\(psbox\\)\\(\\[[^]]+\\]\\)?{\\(\\([^,} ]*/\\)?[^} ]+\\)\\(\\.e?ps\\)}" 3) ;\psbox[options...]{hoge.eps} (97/1/11) + ("\\\\input{\\([^} ]+\\)\\(\\.tps\\)}" 1) ;tgif2tex (1998/9/16) ) "See the documentation of YaTeX-processed-file-regexp-alist." ) @@ -1706,7 +1725,7 @@ (if (> p (point)) (setq beg (1+ beg)) (forward-char 1)) (funcall func YaTeX-comment-prefix beg (point) YaTeX-uncomment-once))) (message "%sommented out current environment." - (if (eq func 'comment-region) "C" "Un-c")) + (if (eq func 'comment-out-region) "C" "Un-c")) ) (defun YaTeX-beginning-of-environment (&optional limit-search-bound end) @@ -1781,12 +1800,12 @@ (interactive) (save-excursion (if (YaTeX-on-begin-end-p) - (let ((p (make-marker))) - (set-marker p (point)) + (let ((p (point-marker))) (YaTeX-goto-corresponding-environment) (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once) - (goto-char (marker-position p)) - (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once)) + (goto-char p) + (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once) + (set-marker p nil)) (if (YaTeX-on-comment-p) (let*((fill-prefix "") ;;append `^%' to head of paragraph delimiter. @@ -1835,11 +1854,11 @@ (kill-region (progn (goto-char b2) - (skip-chars-backward " \t") + (skip-chars-backward " \t%") (if (bolp) (point) b2)) e2)) (goto-char b1) - (skip-chars-backward " \t") + (skip-chars-backward " \t%") (if (not kill-contents) (progn (kill-append @@ -1876,12 +1895,14 @@ (skip-chars-forward "^{") (forward-list 1) (set-marker end (point)) - (if kill-all (delete-region beg end) + (if kill-all (kill-region beg end) (goto-char beg) - (delete-region + (kill-region (point) (progn (skip-chars-forward "^{" end) (1+ (point)))) (goto-char end) - (backward-delete-char 1)))) + (set-marker end nil) + (kill-append (buffer-substring (point) (1- (point))) nil) + (delete-backward-char 1)))) ) (defun YaTeX-kill-paren (kill-contents) @@ -1985,10 +2006,10 @@ ((string= newenv env) (message "No need to change.")) (t (search-forward (concat "{" env) (point-end-of-line) t) - (replace-match (concat "{" newenv)) + (replace-match (concat "{" newenv) t) (exchange-point-and-mark) (search-forward (concat "{" env) (point-end-of-line) t) - (replace-match (concat "{" newenv)))) + (replace-match (concat "{" newenv) t))) t))) ) @@ -2323,6 +2344,7 @@ (cond ((not (eq major-mode 'yatex-mode)) (fill-paragraph arg)) ((YaTeX-quick-in-environment-p YaTeX-fill-inhibit-environments) nil) + ((YaTeX-in-math-mode-p) nil) (t (save-excursion (let ((verbrex (concat YaTeX-ec-regexp @@ -2362,7 +2384,8 @@ ;;(fill-paragraph arg) (fill-region-as-paragraph (point-min) (point-max) arg) (while spacelist - (goto-char (marker-position (car poslist))) + (goto-char (car poslist)) + (set-marker (car poslist) nil) (delete-char 1) (insert (car spacelist)) (setq spacelist (cdr spacelist) poslist (cdr poslist))) @@ -2480,7 +2503,7 @@ (+ (YaTeX-current-indentation) (or additional 0) YaTeX-environment-indent))))) - depth iteminfo (p (point)) pp (peol (point-end-of-line)) + sect depth iteminfo (p (point)) pp (peol (point-end-of-line)) ;;inenv below is sometimes defined in YaTeX-indent-new-comment-line (inenv (or (and (boundp 'inenv) inenv) (YaTeX-inner-environment t)))) ;;(if NTT-jTeX ;;Do you need this section? @@ -2498,11 +2521,9 @@ (or inenv (setq inenv "document")) ;is the default environment (cond ((and (YaTeX-on-begin-end-p) (match-beginning 2)) ;if \end - (save-excursion - (beginning-of-line) - (YaTeX-reindent (YaTeX-current-indentation)))) + (YaTeX-reindent (YaTeX-current-indentation))) ((string-match YaTeX-equation-env-regexp inenv) - (YaTeX-indent-line-equation)) ;autoload-ed from yatex.env + (YaTeX-indent-line-equation)) ;autoload-ed from yatexenv (;(YaTeX-in-environment-p '("itemize" "enumerate" "description" "list")) (string-match YaTeX-itemizing-env-regexp inenv) ;;(YaTeX-on-item-p) ?? @@ -2510,15 +2531,16 @@ (if (save-excursion (beginning-of-line) (re-search-forward YaTeX-item-regexp peol t)) - (save-excursion - (goto-char (1+ (match-beginning 0))) - (setq depth - (* YaTeX-environment-indent - (cond - ((looking-at "subsubsub") 3) - ((looking-at "subsub") 2) - ((looking-at "sub") 1) - (t 0)))) + (progn + (save-excursion + (goto-char (1+ (match-beginning 0))) + (setq depth + (* YaTeX-environment-indent + (cond + ((looking-at "subsubsub") 3) + ((looking-at "subsub") 2) + ((looking-at "sub") 1) + (t 0))))) (funcall indent-relative depth)) (YaTeX-reindent (or (car (cdr (YaTeX-get-item-info nil inenv))) (+ (save-excursion @@ -2532,10 +2554,13 @@ (funcall indent-relative)) ((YaTeX-on-section-command-p YaTeX-sectioning-regexp) (require 'yatexsec) ;to know YaTeX-sectioning-level + (setq sect (YaTeX-match-string 1)) + (if (string-match "\\*$" sect) + (setq sect (substring sect 0 -1))) (YaTeX-reindent (* (max (1- ;I want chapter to have indentation 0 - (or (cdr (assoc (YaTeX-match-string 1) YaTeX-sectioning-level)) + (or (cdr (assoc sect YaTeX-sectioning-level)) 0)) 0) YaTeX-environment-indent))) diff --git a/yatex.new b/yatex.new index 5e7042d..a9caf69 100644 --- a/yatex.new +++ b/yatex.new @@ -1,6 +1,19 @@ What's new in YaTeX �쒹/yahtml - �e�o�[�W�����̕ύX�_�ɂ‚��� +1.66 \section*{} �Ȃǂ�*�‚��Z�N�V�����R�}���h�ŃC���f���g�������� + ���C���B + [prefix] g �ł�label/ref������re-search�ɂ�pageref�ɂ���ׂ�悤 + �ɂ����B�܂�search-ring�ł͂Ȃ�regexp-search-ring���X�V����̂� + �p�������� M-C-s or M-C-r �ōs���悤�ɂȂ����B + XEmacs�ł̃��x���⊮�̃o�O�t�B�N�X�B + tgif2tex(*.tps) �ւ� [prefix] g ��lj��B + Emacs20��suppress-keymap�̎d�l���ς�����̂őΏ��B + Emacs20+yahtml �ŃA�C�e�����^�O�ł�fill�����܂��s���Ȃ������̂��C���B + yahtml�� �Ƃ����ʒu�� [prefix] g �����Ƃ��� + foo.java �ցA#include �ł͂��̃t�@�C���A#exec�ł�CGI�X�N���v�g�t�@ + �C���փW�����v����悤�ɂ����B + 1.65 yahtml�̂��C�����s�̃o�O�t�B�N�X�B a, body, img �^�O�̃I�v�V�����������̓A�h�C���̋����B section�^�}�N���̑����������s�ɂ���ĕ��f����Ă��Ă������� diff --git a/yatex19.el b/yatex19.el index 59a7161..65ee2c9 100644 --- a/yatex19.el +++ b/yatex19.el @@ -1,7 +1,7 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX facilities for Emacs 19 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Sun Dec 14 21:51:14 1997 on firestorm +;;; Last modified Thu Jan 29 10:55:12 1998 on crx ;;; $Id$ ;;; �Ƃ肠���� hilit19 ���g���Ă��鎞�ɐF���t���悤�ɂ��� @@ -314,8 +314,8 @@ ;; formulas ("[^\\]\\\\(" "\\\\)" formula) ; \( \) ("[^\\]\\\\\\[" "\\\\\\]" formula) ; \[ \] - ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\)" - "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\).*}" + ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\)" + "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\).*}" formula) ("[^\\$]\\($\\($[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula); '$...$' or '$$...$$' diff --git a/yatexadd.el b/yatexadd.el index c0508f0..f99b0ce 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX add-in functions. -;;; yatexadd.el rev.13 +;;; yatexadd.el rev.14 ;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Wed Jun 25 21:21:13 1997 on domani +;;; Last modified Mon Sep 28 13:03:37 1998 on firestorm ;;; $Id$ ;;; @@ -67,7 +67,9 @@ (while (not (string-match (setq loc (read-key-sequence (format "%s position (`%s') [%s]: " - guide oneof pos)));name is in YaTeX-addin + guide oneof pos));name is in YaTeX-addin + loc (if (fboundp 'events-to-keys) + (events-to-keys loc) loc)) "\r\^g\n")) (cond ((string-match loc oneof) @@ -91,7 +93,8 @@ (defun YaTeX:table () "YaTeX add-in function for table environment." - (setq env-name "tabular") + (setq env-name "tabular" + section-name "caption") (YaTeX:read-position "htbp") ) @@ -345,7 +348,8 @@ (defun YaTeX::label-setup-key-map () (if YaTeX-label-select-map nil (message "Setting up label selection mode map...") - (setq YaTeX-label-select-map (copy-keymap global-map)) + ;(setq YaTeX-label-select-map (copy-keymap global-map)) + (setq YaTeX-label-select-map (make-keymap)) (suppress-keymap YaTeX-label-select-map) (substitute-all-key-definition 'previous-line 'YaTeX::label-previous YaTeX-label-select-map) @@ -379,7 +383,8 @@ (interactive) (forward-line -1) (message YaTeX-label-guide-msg)) (defun YaTeX::label-search-tag () (interactive) - (let ((case-fold-search t) (tag (regexp-quote (this-command-keys)))) + (let ((case-fold-search t) + (tag (regexp-quote (char-to-string last-command-char)))) (cond ((save-excursion (forward-char 1) @@ -447,6 +452,7 @@ (use-local-map YaTeX-label-select-map) (message YaTeX-label-guide-msg) (goto-line (1+ initl)) ;goto recently defined label line + (switch-to-buffer (current-buffer)) (unwind-protect (progn (recursive-edit) @@ -834,5 +840,64 @@ (if (string= "" sname) (setq sname YaTeX-default-documentclass)) (setq YaTeX-default-documentclass sname))))) +(defun YaTeX:caption () + (setq section-name "label") + nil) + +;;; -------------------- math-mode stuff -------------------- +(defun YaTeX::tilde (&optional pos) + "For accent macros in mathmode" + (cond + ((equal pos 1) + (message "Put accent on variable: ") + (let ((v (char-to-string (read-char))) (case-fold-search nil)) + (message "") + (cond + ((string-match "i\\|j" v) + (concat "\\" v "math")) + ((string-match "[\r\n\t ]" v) + "") + (t v)))) + (nil ""))) + +(fset 'YaTeX::hat 'YaTeX::tilde) +(fset 'YaTeX::check 'YaTeX::tilde) +(fset 'YaTeX::bar 'YaTeX::tilde) +(fset 'YaTeX::dot 'YaTeX::tilde) +(fset 'YaTeX::ddot 'YaTeX::tilde) +(fset 'YaTeX::vec 'YaTeX::tilde) + +(defun YaTeX::widetilde (&optional pos) + "For multichar accent macros in mathmode" + (cond + ((equal pos 1) + (let ((m "Put over chars[%s ]: ") v v2) + (message m " ") + (setq v (char-to-string (read-char))) + (message "") + (if (string-match "[\r\n\t ]" v) + "" + (message m v) + (setq v2 (char-to-string (read-char))) + (message "") + (if (string-match "[\r\n\t ]" v2) + v + (concat v v2))))) + (nil ""))) + +(fset 'YaTeX::widehat 'YaTeX::widetilde) +(fset 'YaTeX::overline 'YaTeX::widetilde) +(fset 'YaTeX::overrightarrow 'YaTeX::widetilde) + + +;;; +;; Add-in functions for large-type command. +;;; +(defun YaTeX:em () + (cond + ((eq YaTeX-current-completion-type 'large) "\\/") + (t nil))) +(fset 'YaTeX:it 'YaTeX:em) + ;;; -------------------- End of yatexadd -------------------- (provide 'yatexadd) diff --git a/yatexenv.el b/yatexenv.el index 4f205f7..0d166e6 100644 --- a/yatexenv.el +++ b/yatexenv.el @@ -2,7 +2,7 @@ ;;; YaTeX environment-specific functions. ;;; yatexenv.el ;;; (c ) 1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Wed Jun 25 21:30:45 1997 on domani +;;; Last modified Wed Jan 14 16:44:36 1998 on firestorm ;;; $Id$ ;;; @@ -230,7 +230,7 @@ (looking-at "\\\\right\\b")) (progn (YaTeX-reindent (save-excursion (YaTeX-goto-corresponding-leftright) - (current-column)))) + (1- (current-column))))) (save-excursion (forward-line -1) (while (and (not (bobp)) (YaTeX-on-comment-p)) @@ -250,7 +250,7 @@ (setq depth (+ (YaTeX-current-indentation) mp))) ((> l-r 0) (beginning-of-line) - (search-forward "\\left" peol) + (search-forward "\\left" peol nil l-r) (goto-char (1+ (match-beginning 0))) (setq depth (current-column))) ((< l-r 0) @@ -258,7 +258,8 @@ (YaTeX-goto-corresponding-leftright) (beginning-of-line) (skip-chars-forward " \t") - (setq depth (+ (current-column) mp))) ;+mp is good? + ;(setq depth (+ (current-column) mp)) ;+mp is good? + (setq depth (current-column))) (t ;if \left - \right = 0 (cond ((re-search-forward "\\\\\\\\\\s *$" peol t) diff --git a/yatexhie.el b/yatexhie.el index d2ede23..b836e5f 100644 --- a/yatexhie.el +++ b/yatexhie.el @@ -2,7 +2,7 @@ ;;; YaTeX hierarchy browser. ;;; yatexhie.el ;;; (c )1995 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] -;;; Last modified Thu Feb 2 23:55:59 1995 on figaro +;;; Last modified Thu Sep 17 21:46:29 1998 on firestorm ;;; $Id$ ;; ----- Customizable variables ----- @@ -43,7 +43,7 @@ (skip-chars-forward (concat "^ \t\n\r" YaTeX-ec-regexp "{}")) (point))))) - ((match-beginning 3) + ((and (match-beginning 3) (looking-at "{")) (skip-chars-forward "{") (setq file (buffer-substring (point) diff --git a/yatexhlp.el b/yatexhlp.el index 3d10353..20bb833 100644 --- a/yatexhlp.el +++ b/yatexhlp.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX helper with LaTeX commands and macros. ;;; yatexhlp.el -;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Mon Apr 1 03:34:23 1996 on NSR +;;; (c )1994,1998 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Thu Mar 12 11:10:07 1998 on crx ;;; $Id$ (let ((help-file (concat "YATEXHLP." @@ -10,6 +10,7 @@ (t "eng")))) (help-dir (cond + ((and (boundp 'site-directory) site-directory) site-directory) (YaTeX-emacs-19 (expand-file-name "../../site-lisp" doc-directory)) (t exec-directory)))) (defvar YaTeX-help-file @@ -17,8 +18,8 @@ "*Help file of LaTeX/TeX commands or macros.") (defvar YaTeX-help-file-private (expand-file-name (concat "~/" help-file)) - "*Private help file of LaTeX/TeX macros.") -) + "*Private help file of LaTeX/TeX macros.")) + (defvar YaTeX-help-delimiter "\C-_" "Delimiter of each help entry.") (defvar YaTeX-help-entry-map (copy-keymap YaTeX-mode-map) "Key map used in help entry.") diff --git a/yatexlib.el b/yatexlib.el index 80f72b3..888a7a1 100644 --- a/yatexlib.el +++ b/yatexlib.el @@ -2,7 +2,7 @@ ;;; YaTeX and yahtml common libraries, general functions and definitions ;;; yatexlib.el ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Tue Dec 16 14:48:22 1997 on firestorm +;;; Last modified Mon Oct 19 13:41:29 1998 on firestorm ;;; $Id$ ;; General variables @@ -30,8 +30,8 @@ 1 (cond (YaTeX-dos 'shift_jis-dos) ((member 'shift_jis (coding-system-list)) 'shift_jis-unix) (t 'sjis))) - '(2 . iso-2022-7bit-unix) - '(3 . euc-japan)))) + '(2 . iso-2022-jp-unix) + '(3 . euc-jp-unix)))) "Kanji-code expression translation table.") (defvar YaTeX-inhibit-prefix-letter nil "*T for changing key definitions from [prefix] Letter to [prefix] C-Letter.") @@ -190,11 +190,11 @@ (message (cond (YaTeX-japan - "`%s'$B$NEPO?@h(B: U)$B%f!<%6<-=q(B L)$B%m!<%+%k<-=q(B N)$B%a%b%j(B D)$B$7$J$$(B") + "`%s'�̓o�^��: U)���[�U���� L)���[�J������ N)������ D)���Ȃ�") (t "Register `%s' into: U)serDic L)ocalDic N)one D)iscard")) (if (> (length car-v) 23) - (concat (substring car-v 0 10) "..." (substring car-v -10)) + (concat (substring car-v 0 10) "..." (substring car-v -9)) car-v)) (setq answer (char-to-string (read-char)))) (cond @@ -486,10 +486,11 @@ "Replace recursively OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. In other words, OLDDEF is replaced with NEWDEF where ever it appears." - (mapcar - (function (lambda (key) (define-key keymap key newdef))) - (where-is-internal olddef keymap)) -) + (if YaTeX-emacs-19 + (substitute-key-definition olddef newdef keymap global-map) + (mapcar + (function (lambda (key) (define-key keymap key newdef))) + (where-is-internal olddef keymap)))) ;;;###autoload (defun YaTeX-match-string (n &optional m) @@ -798,11 +799,17 @@ bindlist)))) +;;; +;; Functions for the Installation time +;;; (defun bcf-and-exit () "Byte compile rest of argument and kill-emacs." (if command-line-args-left - (progn + (let ((load-path (cons "." load-path))) + (and (fboundp 'set-language-environment) + (featurep 'mule) + (set-language-environment "Japanese")) (mapcar 'byte-compile-file command-line-args-left) (kill-emacs)))) diff --git a/yatexmth.el b/yatexmth.el index fa9cb61..b4f13c4 100644 --- a/yatexmth.el +++ b/yatexmth.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX math-mode-specific functions. ;;; yatexmth.el -;;; (c )1993-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] -;;; Last modified Tue Nov 25 12:33:05 1997 on firestorm +;;; (c )1993-1998 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] +;;; Last modified Wed Sep 30 21:26:29 1998 on firestorm ;;; $Id$ ;;; [Customization guide] @@ -124,6 +124,7 @@ ("!" "neg" ("--+\n |" YaTeX-image-neg)) ("oo" "infty" ("oo" "��")) ("\\" "backslash" ("\\" "�_")) + ("..." "cdots" ("..." "�c")) ;;binary operators ("+-" "pm" ("+\n-" "�}")) @@ -232,12 +233,36 @@ ;;left and right ("left" "left" "(leftmark)") ("right" "right" "(rightmark)") - ;other marks + ;;accent marks + ("tilde" "tilde" "~\n?") + ("T" "tilde" "~\n?") + ("wtilde" "widetilde" "~\n?") + ("hat" "hat" "^\n?") + ("what" "widehat" "/\\\n??") + ("w^" "widehat" "/\\\n?") + ("check" "check" "v\n?") + ("bar" "bar" "_\n?") + ("overline" "overline" "_\n?") + ("wbar" "overline" "--\n??") + ("dot" "dot" ".\n?") + ("ddot" "ddot" "..\n??") + ("vec" "vec" ("->\n??" "��\n??")) + ("~>" "overrightarrow" ("-->\nAB" "��\nAB")) + ("VEC" "overrightarrow" ("-->\nAB" "��\nAB")) + ;;rage-aware stuffs + ("prod" "prod" ("-+--+-\n | |" "��")) + ("CUP" "bigcup" "|~~|\n| |\n| |") + ("union" "bigcup" "|~~|\n| |\n| |") + ("CAP" "bigcap" "| |\n| |\n|__|") + ("isc" "bigcap" "| |\n| |\n|__|") + ("O+" "bigoplus" "/~~~\\\n| + |\n\\___/") + ("Ox" "bigotimes" "/~~~\\\n| X |\n\\___/") + ;;other marks ("Z" "aleph" "|\\|") ("|\\|" "aleph" "|\\|") ("h-" "hbar" "_\nh") - ("i" "imath" "i") - ("j" "jmath" "j") + ; ("i" "imath" "i") ;These chars are appeared only + ; ("j" "jmath" "j") ;as section-type arguments ("l" "ell" "l") ("wp" "wp" "???") ("R" "Re" ")R") @@ -674,31 +699,25 @@ ) nil) ))) + (delete-region beg (point)) (cond - ((eq result t) - (setq YaTeX-current-completion-type 'maketitle) - - ;;;(sit-for 1) - (setq unread-command-char last-char) - (insert (YaTeX-addin single-command))) + ((memq result '(t select)) + (if (eq result t) + (setq unread-command-char last-char) + (message "Done.")) + (if (assoc single-command section-table) + (YaTeX-make-section nil nil nil single-command) + (setq YaTeX-current-completion-type 'maketitle) + (YaTeX-make-singlecmd single-command))) ((eq result 'abort) - (delete-region beg (point)) (message "Abort.")) ((eq result 'escape) - (delete-region beg (point)) (call-interactively (global-key-binding this-key))) - ((eq result 'select) - (message "Done.") - (setq YaTeX-current-completion-type 'maketitle) - (insert (YaTeX-addin single-command))) ((eq result 'exit) - (delete-region beg (point)) (YaTeX-toggle-math-mode)) ((eq result 'menu) - (delete-region beg (point)) (setq key (concat "^" (regexp-quote (substring key 0 -1)))) - (insert (YaTeX-math-show-menu key))))) -) + (insert (YaTeX-math-show-menu key)))))) ;; ----- Change image completion types ----- (defun YaTeX-math-member-p (item) diff --git a/yatexprc.el b/yatexprc.el index 56ad255..5c2bc59 100644 --- a/yatexprc.el +++ b/yatexprc.el @@ -2,7 +2,7 @@ ;;; YaTeX process handler. ;;; yatexprc.el ;;; (c )1993-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Thu Dec 11 16:16:21 1997 on crx +;;; Last modified Mon Mar 9 11:44:29 1998 on crx ;;; $Id$ ;(require 'yatex) @@ -22,6 +22,7 @@ (defvar YaTeX-shell-command-option (or (and (boundp 'shell-command-option) shell-command-option) + (and (boundp 'shell-command-switch) shell-command-switch) (if YaTeX-dos "/c" "-c")) "Shell option for command execution.") @@ -329,8 +330,8 @@ "Kill process PROC after sending signal to PROC. PROC should be process identifier." (cond - (YaTeX-dos - (error "MS-DOS can't have concurrent process.")) + ((not (fboundp 'start-process)) + (error "This system can't have concurrent process.")) ((or (null proc) (not (eq (process-status proc) 'run))) (message "Typesetting process is not running.")) (t @@ -477,7 +478,7 @@ nil t) nil (select-window cur-win) - (error "No more erros on %s" cur-buf)) + (error "No more errors on %s" cur-buf)) (goto-char (match-beginning 0)) (skip-chars-forward "^0-9" (match-end 0)) (setq error-line diff --git a/yatexsec.el b/yatexsec.el index 5bcf36e..615b904 100644 --- a/yatexsec.el +++ b/yatexsec.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX sectioning browser. ;;; yatexsec.el -;;; (c ) 1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] -;;; Last modified Mon Feb 17 11:26:44 1997 on supra +;;; (c ) 1994, 1998 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] +;;; Last modified Wed Sep 30 20:09:35 1998 on firestorm ;;; $Id$ (defvar YaTeX-sectioning-level @@ -290,7 +290,7 @@ (set-buffer cb) (YaTeX-showup-buffer YaTeX-sectioning-buffer) ;show buffer (goto-char (point-min)) - (with-output-to-temp-buffer YaTeX-sectioning-buffer + (let ((standard-output (get-buffer YaTeX-sectioning-buffer))) (while (re-search-forward pattern nil t) (goto-char (1+ (match-beginning 0))) (setq level (YaTeX-get-sectioning-level) @@ -373,8 +373,8 @@ (if (and YaTeX-sectioning-buffer-parent (get-buffer YaTeX-sectioning-buffer-parent) (save-excursion - (or (= (char-after (point)) ?\\ ) - (skip-chars-backward "^\\\\" (point-beginning-of-line))) + (beginning-of-line) + (skip-chars-forward "^\\\\" (point-end-of-line)) (YaTeX-on-section-command-p YaTeX-sectioning-regexp))) (save-excursion (or (buffer-name (get-buffer YaTeX-sectioning-buffer-parent)) @@ -460,10 +460,13 @@ nsc (YaTeX-shifted-section (YaTeX-match-string 1) n)) (goto-char (match-beginning 0)) (let (buffer-read-only) - (delete-region (point) (progn (beginning-of-line) (point))) + ;(delete-region (point) (progn (beginning-of-line) (point))) + (delete-region (progn (beginning-of-line) (point)) + (progn (skip-chars-forward " \t") (point))) (indent-to-column (cdr (assoc nsc YaTeX-sectioning-level))) (delete-region - (1+ (point)) (progn (skip-chars-forward "^*{") (point))) + (progn (skip-chars-forward "%\\\\") (point)) + (progn (skip-chars-forward "^*{") (point))) (insert nsc)) (YaTeX-on-section-command-p YaTeX-sectioning-regexp) (setq to (YaTeX-match-string 0)