diff --git a/docs/yatex.ref b/docs/yatex.ref index f9bcef3..7e1ea18 100644 --- a/docs/yatex.ref +++ b/docs/yatex.ref @@ -8,11 +8,12 @@ �쒹�ł́Aprefix �L�[���J�X�^�}�C�Y�ł��邽��(�W���ł�C-c)����� [prefix] �ƕ\�L���܂��BC-c �̂܂ܕύX���Ă��Ȃ��ꍇ�A[prefix] a �� - 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 + C-c a ��\�킵�܂��B + begin�^�R�}���h�Ƃ� \begin�`\end�̌`���̃R�}���h�Asection�^�R + �}���h�Ƃ� \section{��}�̂悤�Ɉ��������R�}���h�Alarge�^�R�}�� + �h�Ƃ� {\tt } �̂悤�Ȓ����ʂň͂܂ꂽ�t�H���g/�T�C�Y�w��q�A + maketitle�^�R�}���h�Ƃ� \maketitle �̂悤�Ɉ����𔺂�Ȃ��R�}�� + �h���w���܂��B �y�⊮�z @@ -30,25 +31,27 @@ ��section�^�⊮(�̈�w��) [prefix] S �������⊮ [prefix] SPC - ����begin�^�⊮�́A�‹����̓������̑Ή��ɂ‚��ẮAyatex.doc �� - �������������B�̈�w�胂�[�h�ł́A�}�[�N�����ʒu�ƃ|�C���g�̊Ԃ� - \begin{center}�c\end{center} �� {\large } �ȂǂŊ���܂��B + ����begin�^�⊮�́A�‹����̓������̑Ή��ɂ‚��ẮAInfo �}�j�� + �A�����������������B�̈�w�胂�[�h�ł́A�}�[�N�����ʒu�ƃ|�C���g + �̊Ԃ�\begin{center}�c\end{center} �� {\large } �ȂǂŊ���܂��B �������L���C���[�W�⊮ ; - ���M���V�������C���[�W�⊮ / + ���M���V�������C���[�W�⊮ : ���2�‚�TeX�̐����‹��̒��ʼn������ꍇ�̂ݗL���ł��B�����I�ɕ� - ���@�\���g���ꍇ�́AC-u �������Ă��� ; / �������܂��B + ���@�\���g���ꍇ�́AC-u �������Ă��� ; �� : �������܂��B �y�v���Z�X�N���z ��jbibtex�N�� [prefix] tb ��jlatex�N�� [prefix] tj - ��jlatex��~ [prefix] tk �� + ��makeindex�N�� [prefix] ti + ��jlatex��kill [prefix] tk �� ���v�����g�A�E�g [prefix] tl ���v�����g�A�E�g(�S�y�[�W) C-u [prefix] tl ���v���r���[�A�N�� [prefix] tp + ��lpq�N�� [prefix] tq ��jlatex�N��(�̈�w��) [prefix] tr [prefix] t �������΃��j���[���o��̂ŁA[prefix] t �̎��ɉ����L�[ @@ -70,6 +73,7 @@ ������� jlatex �ŃG���[���������ꍇ�̂ݗL���ł��B ���Ή�����I�u�W�F�N�g�W�����v [prefix] g + ���ʃE�B���h�E�� �V [prefix] 4g �J�[�\���W�����v�́A[prefix] g ���������̃J�[�\���̈ʒu�ɂ��A �W�����v���ׂ��ꏊ�𔻒f���܂��B @@ -112,12 +116,17 @@ �y���̑��z ��item�̌����� [prefix] i + + \item ���g���‹����̂ݗL���ł��B + ��LaTeX�R�}���h�ύX [prefix] c \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 + ����ƃt�H���g/�T�C�Y�w��q��ύX���܂��B�C���[�W�⊮�œ��͂��� + �������[�h�R�}���h�̏�ŋN������Ɗm�蒼�O�̃C���[�W�⊮����ɖ� + ��܂��B ���R�}���h�폜 [prefix] k @@ -132,7 +141,7 @@ �����[�h�؂�ւ� [prefix] w - �V�K�쐬/�X�V���[�h�A�������[�h�̐؂�ւ����j���[���o�܂��B + �V�K�쐬/�C�����[�h�A�������[�h�̐؂�ւ����j���[���o�܂��B ��%# �L�@�̕ҏW [prefix] % ��tabular/array���ʒu�\�� [prefix] & diff --git a/docs/yatexadd.doc b/docs/yatexadd.doc index 1b7bb7e..33ab609 100644 --- a/docs/yatexadd.doc +++ b/docs/yatexadd.doc @@ -135,9 +135,20 @@ ���� htbp �Ɍ����Ă���Ȃ�A(YaTeX:read-position "htbp") �ƌĂяo���܂��B - �E�֐� YaTeX:read-coordinates - ���� ��{�v�����v�g, X���W�v�����v�g, Y���W�v�����v�g(�S�ďȗ���) - ���� �u��{�v�����v�g X���W�v�����v�g:�v�Ƃ����v�����v�g���o�� + �E�֐� YaTeX-cplread-with-learning + ���� �v�����v�g + �f�t�H���g�⊮�e�[�u���ϐ��V���{�� + ���[�U�⊮�e�[�u���ϐ��V���{�� + ���[�J���⊮�e�[�u���ϐ��V���{�� + ���� �u�v�����v�g�v�Ƃ����v�����v�g���o���A�⊮���͂��s���܂��B + �O�‚̕ϐ��̃e�[�u���̒l�������������̂��⊮���Ƃ��ėp + �����A�V�����P�����͂���Ǝ����I�Ɋw�K����܂��B�w�K + ���ʂ� ~/.yatexrc �� ./.yatexrc �ɕۑ�����܂��B�g�p��� + ���� YaTeX::documentstyle �֐��̒�`������񂭂������B + + �E�֐� YaTeX:check-comletion-type + ���� 'begin �܂��́A'section �܂��́A'maketitle + ���� �t���֐����Ă΂�鎞�ɁA�s���Ă���⊮�̌`�����A�����ŗ^ �āAX���W��ǂݍ��݁A�u��{�v�����v�g Y���W�v�����v�g:�v�� �o���āAY���W��ǂݍ��݁A(X���W,Y���W) �̗l�Ȍ`�����쐬���܂��B �������͂������^�[���������Ă��A(,)���Ԃ���܂��B diff --git a/docs/yatexe.tex b/docs/yatexe.tex index 08cb1f6..0c6fcbc 100644 --- a/docs/yatexe.tex +++ b/docs/yatexe.tex @@ -135,7 +135,7 @@ @item Blanket commenting out or uncommenting (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .}) @item Easy input of accent mark, math-mode's commands and Greek letters - (@kbd{C-c a}, @kbd{;}, @kbd{/}) + (@kbd{C-c a}, @kbd{;}, @kbd{:}) @item Online help for the popular La@TeX{} commands (@kbd{C-c ?}, @kbd{C-c /})(English help is not yet supported) @end itemize @@ -792,7 +792,7 @@ imitate the corresponding symbols graphically. This completion only works in the math environment. YaTeX automatically detects whether the cursor located in math environment or not, and -change the behavior of key strokes @kbd{;} and @kbd{/}. +change the behavior of key strokes @kbd{;} and @kbd{:}. By the way, we often express the leftarrow mark by `<-' for example. Considering such image, you can write @code{\leftarrow} by typing @kbd{<-} @@ -842,19 +842,19 @@ @comment node-name, next, previous, up @section Greek letters completion @cindex Greek letters completion -@cindex / +@cindex : Math-mode of YaTeX provides another image completion, Greek letters -completion in the same method. After prefix @kbd{/}, typing @kbd{a} makes +completion in the same method. After prefix @kbd{:}, typing @kbd{a} makes @code{\alpha}, @kbd{b} makes @code{\beta} and @kbd{g} makes @code{\gamma} and so on. First, type @kbd{/TAB} to know all the correspondence of alphabets v.s. Greek letters. - If you will find @kbd{;} or @kbd{/} doesn't work in correct position of + If you will find @kbd{;} or @kbd{:} doesn't work in correct position of math environment, it may be a bug of YaTeX. Please send me a bug report with the configuration of your text, and avoid it temporarily by typing -@kbd{;} or @kbd{/} after universal-argument(@kbd{C-u}) which forces -@kbd{;} and @kbd{/} to work as math-prefix. +@kbd{;} or @kbd{:} after universal-argument(@kbd{C-u}) which forces +@kbd{;} and @kbd{:} to work as math-prefix. @node Local dictionaries, Commenting out, Completion, Top @comment node-name, next, previous, up @@ -1065,6 +1065,8 @@ @item Argument of section-type commands @item Optional parameters (enclosed by []) of section-type commands @item Font/size designators +@item Math-mode's maketitle-type commands that can be inputted with +image completion @end itemize Typing @kbd{[prefix] c} on one of above objects you want to change @@ -1157,11 +1159,11 @@ > > \item bar > - > When the word `for' is used as an arbitrarily word, `bar' - > is bound to follow it. + > When the word `for' is used as an arbitrarily word, `bar' + > is bound to follow it. @end example - Note that the indent depth of the @code{\item} and its descriptive + Note that the indent depth of an @code{\item} word and its descriptive paragraph are the same in latter case. If you want to use different depth, invoke fill-paragraph at the beginning of non-whitespace character(see below). @@ -2031,7 +2033,11 @@ 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.1995 at least) +(up to Mar.1995 at least) And there is mailing list for YaTeX. +Although the common language is Japanese, questions in English will be +welcome. To join the ML, send the mail whose subject is `append' to +the address `yatex-control@@harvest.jaist.ac.jp'. If you have some +question, please ask to `yatex-request@@harvest.jaist.ac.jp'. 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 112bcda..e4a25e4 100644 --- a/docs/yatexj.tex +++ b/docs/yatexj.tex @@ -22,6 +22,7 @@ @menu * Intro:: �͂��߂� +* Termnology:: �}�j���A���Q�Ə�̒��� * Main features:: ��ȋ@�\ * Installation:: �C���X�g�[�� * Invocation:: �v���Z�X�N�� @@ -35,6 +36,7 @@ * Includeonly:: ����� includeonly * What column:: �J�����ʒu�K�C�h * Intelligent newline:: ���܂������s +* Changing mode of YaTeX:: �쒹���샂�[�h�ύX * Online help:: LaTeX�I�����C���w���v * Cooperation with other packages:: ���p�b�P�[�W�Ƃ̘A�g * Customizations:: �J�X�^�}�C�Y @@ -94,7 +96,7 @@ * Hook file:: hook�p�t�@�C�� @end menu -@node Intro, Main features, Top, Top +@node Intro, Termnology, Top, Top @comment node-name, next, previous, up @chapter �͂��߂� @cindex Demacs @@ -110,7 +112,45 @@ English manual @xref{Top, , , yatexe,YaTeX English info} -@node Main features, Installation, Intro, Top +@node Termnology, Main features, Intro, Top +@comment node-name, next, previous, up +@chapter �{�}�j���A���Q�Ə�̒��� + + �{�}�j���A���ł͈ȉ��̕\�L��p���܂��B + +@itemize @bullet +@item +begin�^�R�}���h + +@code{\begin@{�‹�@} �` \end@{�‹�@}}�Ƃ����`����LaTeX�R�}���h���w���܂��B +begin�^�R�}���h��⊮���͂��邱�Ƃ�begin�^�⊮�ƌĂт܂��B + +@item +section�^�R�}���h + +@code{\section@{�^�C�g��@}}��@code{\mbox@{���e@}}�̂悤�� +���������LaTeX�R�}���h���w���܂��B + +@item +maketitle�^�R�}���h + +@code{\maketitle}��@code{\tableofcontents}�̂悤�Ɉ��������Ȃ�LaTeX�R�} +���h���w���܂��B + +@item +large�^�R�}���h + +@code{@{\large ...@}} �� @code{@{\tt ...@}} �̂悤�ȃt�H���g/�T�C�Y�w��q +���w���܂��B + +@item @kbd{[prefix]} + +�쒹�̋@�\���Ăяo�����߂̃v���t�B�N�X�L�[�B�f�t�H���g�ł�@kbd{C-c}�Ɋ��� +���Ă��Ă���̂ŁA���ɕύX���Ă��Ȃ��ꍇ�{�}�j���A���� @kbd{[prefix]} �� +�����\�L�́A@kbd{C-c} �Ɠǂ݊����Ă��������B +@end itemize + +@node Main features, Installation, Termnology, Top @comment node-name, next, previous, up @chapter ��ȋ@�\ @@ -135,7 +175,7 @@ @item �ꊇ�R�����g�A�E�g/�A���R�����g�A�E�g (@kbd{C-c >}, @kbd{C-c <}, @kbd{C-c ,}, @kbd{C-c .}) @item �A�N�Z���g�L��/�����‹��p�R�}���h/�M���V�������̓��͎x�� - (@kbd{C-c a}, @code{;}, @code{/}) + (@kbd{C-c a}, @kbd{;}, @kbd{/}) @item tabular/array�‹��̃J�����ʒu�K�C�h @item �W���I La@TeX{} �R�}���h�̃I�����C���w���v(@kbd{C-c ?}, @kbd{C-c /}) @end itemize @@ -148,6 +188,7 @@ @cindex .emacs @cindex auto-mode-alist @cindex autoload +@section �쒹�N���̂��߂̐ݒ� ~/.emacs�ɉ���2���ڂ������܂��B @@ -171,6 +212,32 @@ ���[�h����܂��B�쒹������ɋN���ł����Ƃ��̓��[�h���C���̕\�����u��ĂӁv �ɕς��܂��B +@section �^�C�v�Z�b�^/�v�������[�A�‹��̐ݒ� + + ���p����O���v���O�����Ɋւ���ȉ��̕ϐ����m�F���A�K�v�Ȃ琳�����l�ɕύX +���܂��B +@table @code +@item tex-command + @dots{} �N������^�C�v�Z�b�^�̃R�}���h�� +@item dvi2-command + @dots{} �N������v�������[�A�̃R�}���h�� +@item NTT-jTeX + @dots{} NTT jTeX ���g�p����Ȃ� t +@item YaTeX-kanji-code + @dots{} �������쐬���鎞�̊����R�[�h +@item dviprint-command-format + @dots{} �t�@�C���̈���Ɏg����R�}���h��̏��� +@item makeindex-command + @dots{} makeindex�R�}���h +@end table + +������ύX����ꍇ�́A��͂�@file{~/.emacs}�ɂāA���Ƃ��� +@lisp +(setq tex-command "bigjlatex") +@end lisp +�̂悤�ɂ��Ă��������B�ǂ̂悤�Ȓl���Z�b�g����Ηǂ����ɂ‚��ẮA +@ref{All customizable variables}���Q�Ƃ��Ă��������B + @node Invocation, %#notation , Installation, Top @comment node-name, next, previous, up @@ -182,10 +249,8 @@ @cindex jlatex @cindex �v�����g�A�E�g[�ӂ��Ƃ�����] - yatex-mode �� prefix �L�[�́A�W����Ԃ� @kbd{C-c} (Ctrl�L�[�������Ȃ���c) -�ł��B�ȉ��A�W���̃L�[�����̏ꍇ�A@kbd{[prefix]} �� @kbd{C-c} �Ɠǂ݊����� -�������B�܂��A���̃L�[���͂ɂ��Ajlatex �Ȃǂ̃^�C�v�Z�b�g�v���O����(�Ȍ� -�^�C�v�Z�b�^�ƌĂ�)�A�v�������[�A�Ȃǂ̋N�����ł��܂��B +LaTeX�\�[�X�̕ҏW���A���̃L�[���͂ɂ��Ajlatex �Ȃǂ̃^�C�v�Z�b�g�v���O�� +��(�Ȍ�^�C�v�Z�b�^�ƌĂ�)�A�v�������[�A�Ȃǂ̋N�����ł��܂��B @table @kbd @item [prefix] t j @@ -236,30 +301,36 @@ ���[�̕\������Ă���s�ɃJ�[�\�������킹�X�y�[�X�L�[�������� La@TeX{} �\�[�X�̑Ή�����s�ɃW�����v���܂��B - �Ȃ��A�̈�w��̃^�C�v�Z�b�g�ł́A�P��t�@�C���� La@TeX{} �\�[�X�̕ҏW�� -�ɂ͂��̃t�@�C���� documentstyle ���A�ʃt�@�C������ include ���Ă���ꍇ�� -�̓��C���t�@�C���� documentstyle �������I�ɑI������܂��B�w��̈�́A���C -���t�@�C���̂���f�B���N�g����@file{texput.tex}�Ƃ����Վ��t�@�C���ɏo�͂� -��܂��̂ŁA�㏑���ɂ͒��ӂ��Ă��������B�̈�̎w����@��@ref{%#�L�@}�̍��� -�Q�Ƃ��Ă��������B +@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���邱�Ƃ� +�ł��܂��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 +���C���t�@�C���̂���f�B���N�g����@file{texput.tex}�Ƃ����Վ��t�@�C���ɏo +�͂���܂��̂ŁA�㏑���ɂ͒��ӂ��Ă��������B @node Print out, , Calling typesetter, Invocation @comment node-name, next, previous, up @section �v�����g�A�E�g - �v�����g�A�E�g���鎞�́A�o�͊J�n/�I���y�[�W�𕷂��Ă��܂����A�� -����ȗ����������́Auniversal-argument ���‚��ĉ������B + @kbd{[prefix] t l}�������ăv�����g�A�E�g���w������ƁA�o�͊J�n/�I���y�[ +�W�𕷂��Ă���̂ŁA���ꂼ��ɓ����܂��B������ȗ����������́A +universal-argument ���‚��A @cindex �o�͊J�n�y�[�W[����‚�悭�������ւ���] @cindex �o�͏I���y�[�W[����‚�悭���䂤��悤�ւ���] - @table @kbd @item C-u [prefix] t l @dots{} �y�[�W�m�F�ȗ�lpr�N�� @end table @cindex �y�[�W�m�F�ȗ�lpr�N��[�ւ��������ɂ񂵂悤��₭lpr���Ƃ�] +@noindent +�̂悤�ɋN�����Ă��������B + @node %#notation , Completion, Invocation, Top @comment node-name, next, previous, up @chapter %#�L�@ @@ -817,7 +888,7 @@ @end table @noindent - �Ƃ��邱�ƂŁA���݊J���Ă���‹����� \end{} ������܂��B +�Ƃ��邱�ƂŁA���݊J���Ă���‹����� \end{} ������܂��B @node Accent mark completion, Image completion, end�⊮, Completion @comment node-name, next, previous, up @@ -873,7 +944,7 @@ ��ɐ������[�h�Ŏg�p�����A���⃰�Ȃǂ̋L�����[���I�ɕ\������L�[���� �ŁALa@TeX{} �R�}���h����͂ł��܂��B����͖쒹���g�́u�������[�h�v�ł̂� ���삵�܂��B�쒹�̓J�[�\����@TeX{}�̐����‹��̒��ɂ��鎞��@kbd{;}��A -@kbd{/}�ɓ���ȋ@�\���������܂��B +@kbd{:}�ɓ���ȋ@�\���������܂��B ���āA�Ⴆ�΁A��(leftarrow)��ASCII���������ŕ\������ꍇ�A��ʓI�ɂ́u<-�v �̂悤�ɂ��܂����A����𗘗p���āA�����L���C���[�W���̓��[�h�� @@ -936,16 +1007,16 @@ @comment node-name, next, previous, up @section �M���V�������⊮ @cindex �M���V�������⊮[���肵������ق���] -@cindex / +@cindex : - ������A�����‹�����@kbd{/}�������ƃM���V���������̓��[�h�ɓ���܂��B -@kbd{/}�������������@kbd{a}��������@code{\alpha}���A@kbd{g} �������� + ������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���⊮�Ƃ܂����������ł��B�܂���@kbd{:}�̒���� TAB�������Ăǂ̃A���t�@�x�b�g�ɂǂ̃M���V���������Ή����Ă��邩���ׂĂ݂� ���������B - @kbd{;}��@kbd{/}�𐔎��‹����ʼn����Ă���ɂ�������炸�A�C���[�W�⊮���� + @kbd{;}��@kbd{:}�𐔎��‹����ʼn����Ă���ɂ�������炸�A�C���[�W�⊮���� ���Ȃ��ꍇ�́A@kbd{C-u ;}�̂悤�� universal-argument ���‚��ăL�[�������� �Ƃɂ��A�����I�ɃC���[�W�⊮�ɓ��邱�Ƃ��ł��܂��B�܂��A���̎��ɂǂ̂悤 �ȏ�ԂŐ����‹�������Ɏ��s�����������A���������B @@ -985,11 +1056,6 @@ @noindent �Ƃ��ĉ������B -@cindex �ςȒP��[�ւ�Ȃ���] - �����A�Ԃ̊Ԉ�������̂ȂǁA�ςȒP�ꂪ�w�K����Ă��܂����ꍇ�� - - - @node Commenting out, Cursor jump, Local dictionary, Top @comment node-name, next, previous, up @chapter �R�����g�A�E�g @@ -1182,6 +1248,7 @@ @item section�^�R�}���h�̈��� @item section�^�R�}���h�̃I�v�V�����p�����[�^([]�ň͂܂ꂽ����) @item large�^�R�}���h +@item (�C���[�W�⊮�œ��͉”\��)�������[�h��p��maketitle�^�R�}���h @end itemize �ς�����section�^�R�}���h�̈���������� La@TeX{} �R�}���h���܂ޏꍇ�́A @@ -1275,13 +1342,13 @@ �ʏ�C���f���g: > \item �ւ�ւ� > - > �u�ق��ق��v���ł���߂��P��Ƃ��Ďg�������ɁA��2�̂ł���߂� - > �P��Ƃ��āu�ւ�ւ�v���g���邱�Ƃ������悤�ł��B + > �u�ق��ق��v���ł���߂��P��Ƃ��Ďg�������ɁA��2�̂ł��� + > �߂ȒP��Ƃ��āu�ւ�ւ�v���g���邱�Ƃ������悤�ł��B @end example - ��̒ʏ�C���f���g�̏ꍇ�A�����p���O���t�̃C���f���g�� \item �Ɠ����[�� -�Ƃ���K�v������܂��B�������A@kbd{M-q}���s�̍ŏ��̔�󔒕����̈ʒu�ʼn��� -���Ƃɂ��[����ς��邱�Ƃ��ł��܂�(��q)�B + ��̒ʏ�C���f���g�̏ꍇ�A�����p���O���t�̃C���f���g�� \item �̌��o���� +�����[���Ƃ���K�v������܂��B�������A@kbd{M-q}���s�̍ŏ��̔�󔒕����̈� +�u�ʼn������Ƃɂ��[����ς��邱�Ƃ��ł��܂�(��q)�B @section �p���O���t�̌����� @cindex �p���O���t�̌�����[�͂炭��ӂ̂������낦] @@ -1367,7 +1434,7 @@ ���B�������ږ��Ƃ��ĕʂ̂��̂�\�����ė~�����ꍇ�́A�s����@code{%}�ɂ��ă_ �~�[�̍��ڕ��т�����Ă����Ɨǂ��ł��傤�B -@node Intelligent newline, Online help, What column, Top +@node Intelligent newline, Changing mode of YaTeX, What column, Top @comment node-name, next, previous, up @chapter ���܂������s @cindex ���܂������s[���܂����������傤] @@ -1412,7 +1479,37 @@ ���ł��傤�B�֐� @code{YaTeX-intelligent-newline-itemize} �̒�`�Ȃǂ��Q�l �ɂ��Ă��������B -@node Online help, Cooperation with other packages, Intelligent newline, Top +@node Changing mode of YaTeX, Online help, Intelligent newline, Top +@comment node-name, next, previous, up +@chapter �쒹�̓��샂�[�h�؂�ւ� +@cindex ���[�h�؂�ւ�[���[�Ƃ��肩��] +@cindex prefix w + +@table @kbd +@item [prefix] w + @dots{} �쒹���샂�[�h�؂�ւ����j���[ +@end table + +@noindent +�Ŗ쒹���g�̓�������肷��ȉ��̃��[�h��؂�ւ��܂��B + +@itemize @bullet +@item �C�����[�h +@item �쒹�������[�h +@end itemize + +�C�����[�h�́A�J�����ʓ��͎��̏������R���g���[�����A�C�����[�hON�̎��͊J�� +���ʂ̓��͂͊J�����ʂ݂̂̓��͂ɂȂ�A�C�����[�hOFF�̎��͊J�����ʂ̓��͂� +���ŕ‚����ʂ܂œ��͂��܂��B�f�t�H���g(�N����)�̐ݒ��@emph{OFF}�ł��B + + �쒹�������[�h�́A�ϐ� @code{YaTeX-auto-math-mode} �� @code{nil} �̎��� +�ݗL���ŁA���̂Ƃ�@kbd{;}��@kbd{:}����������(@ref{Image completion}�Q��)�ɁA +�ǂ̂悤�ȃC���[�W�⊮���@�\�����邩�A�ʏ�̃L�[�Ƃ��ċ@�\�����邩���蓮�� +�؂�ւ��܂��B�������肪�x���}�V���ł�@code{YaTeX-auto-math-mode} +@code{nil}�ɃZ�b�g���A�쒹�������[�h���蓮�Ő؂�ւ���Ɨǂ��ł��傤�B + + +@node Online help, Cooperation with other packages, Changing mode of YaTeX, Top @comment node-name, next, previous, up @chapter �I�����C���w���v @cindex �I�����C���w���v[����炢��ւ��] @@ -1581,6 +1678,10 @@ (@code{"-t %e"}) @end defvar +@defvar makeindex-command +makeindex�R�}���h(@code{"makeindex"} (MS-DOS�ł�@code{"makeind"})) +@end defvar + @defvar section-name �ŏ���section�^�⊮�̋K��l(@code{"documentstyle"}) @end defvar @@ -1777,6 +1878,9 @@ ���A��]�A�o�O�񍐁A���z���͊��}�������܂��B �A���� yuuji@@ae.keio.ac.jp �܂��́A pcs39334@@asciinet.or.jp �܂�(1995�N3������)�B +�p���I�Ɏg�p���Ă���������̓��C�����O���X�g�ufj�쒹�̉�v�� +����������Ă��������B�������@�ɂ‚��Ă͖{�p�b�P�[�W�� @file{docs/qanda} +�t�@�C���́u���̑��v�̏͂��䗗���������B �d�l�́A�\���Ȃ��m����(�C�������)�ύX����܂�:-p�B diff --git a/help/YATEXHLP.eng b/help/YATEXHLP.eng index a400830..b734653 100644 --- a/help/YATEXHLP.eng +++ b/help/YATEXHLP.eng @@ -775,9 +775,10 @@ \pushtabs ����܂ŗp���Ă����^�u�X�g�b�v�ʒu��S��push \poptabs ����܂ŗp���Ă����^�u�X�g�b�v�ʒu��S��pop. \pushtabs �� \poptabs �͕K���΂ɂȂ��Ă��Ȃ���΂Ȃ�Ȃ�. ����q�� -\aX X�� = �� ' �� ` tabbing�‹��łȂ��ʏ�̃A�N�Z���g�� +\aX +X�� = �� ' �� ` tabbing�‹��łȂ��ʏ�̃A�N�Z���g�� \a= \a' \a` �ŕ\�킷 -\kill ���ݍs�̃e�L�X�g�͏o�͂����^�u�ݒ肾�����߂��� +\kill Without outputting text, parse tabbing definition. array \begin{array}{PREAMBLE} C1 & C2 & .. & Cn \\ D1 ... \end{array} @@ -856,7 +857,7 @@ allow this. tabular* -\begin{tabular*}{��}{�v���A���u��} ... \end{tabular*} +\begin{tabular*}{WIDTH}{PREAMBLE} ... \end{tabular*} Make tabular environment with specifying its width. To fill this width, use \extracolsep{} of preamble as below: \begin{tabular*}{10em}[b]{|c@{\extracolsep{\fill}}|c|c|} diff --git a/help/YATEXHLP.jp b/help/YATEXHLP.jp index 1d8b57c..ffde2d9 100644 --- a/help/YATEXHLP.jp +++ b/help/YATEXHLP.jp @@ -528,11 +528,13 @@ raggedright \raggedright -�i�����E�񂹂��đg�ł���B +�i���̉E�[��s�����ɂ��đg�ŁB +���ʂƂ��č��񂹂ɂȂ�B raggedleft \raggedleft -�i�������񂹂��đg�ł���B +�i���̍��[��s�����ɂ��đg�ŁB +���ʂƂ��ĉE�񂹂ɂȂ�B raggedbottom \raggedbottom @@ -1205,6 +1207,7 @@ �u�����v�̋����������́u�炢�Ă��v�������ł��B laitex +a Little Assistant Interface for TeX YaTeX @@ -1244,16 +1247,21 @@ �j�쒼�Ȃ���(�}�g��) �����؂�Ȃ��o�O���|�[�g�Ɨv�]�𒸂��܂����B�܂�Vz�ւ̈ڐA�łł� - �� laitex(����) ���쐬����܂����B + �� laitex(����) ���쐬����܂����B�܂��A�u����ȋ@�\�͂ǂ����낤?�v + �Ƒ��k����ƁA�u�����v�ƈ�R���A���΂炭�o���Ă���u����ς�~ + �����v�ƌ����ȂǁA�����̍������������Ă��������܂����B -�O���P�Y����(�c����) +��˂�������(asciinet) + �肢�t�������ł��B + +�O���P�Y����(�c���) �J�����ʂ̓��͎��̏����̃��[�h�����̃A�C�f�A�𒸂��܂����B -���됒����(�c����) +���됒����(�c���) begin�^�⊮�̓����ɕ������������ꍇ�������C���f���g���Ăق��� �Ƃ����v�]�𒸂��܂����B -�c�������Y����(�c����) +�c�������Y����(�c���) �^�C�v�Z�b�g���ɖ��Z�[�u��Ԃ̊֘A�t�@�C�����Z�[�u���ė~�����Ƃ� ���v�]�𒸂��܂����B @@ -1275,17 +1283,36 @@ �p���O���t���E��LaTeX�p�ɐݒ肵�Ȃ����v�]�Ȃǂ𒸂��܂����B TUSK����(asciinet) - Texinfo�h�L�������g(����)���쐬���Ē����܂����B + Texinfo�h�L�������g(����)���쐬���Ē����A���łɊւ���R�����g + �ƓY������Ē����܂����B ���c�a�炳��(asciinet) dviout�N�����̍H�v�̈āA�~�j�o�b�t�@�œǂݍ��ނ��̂̃q�X�g���� - ����A�C�f�A�̂������������������A�w���v�t�@�C���̍��ڂ̒񋟂��� - �Ē����܂����B + ����A�C�f�A�̂��������𒸂��A�w���v�t�@�C���̍��ڂ̒񋟂����Ē� + ���܂����B -kanbai-an����(asciinet) - ���{����̓��[�h����֐��̃o�O�𒼂��p�b�`�Ȃǂ𒸂��܂����B +Nop.M����(asciinet) + �قȂ�‹��ł̐ݒ�̕s����̃��|�[�g�𐔑��������܂����B +���R������(������w) + ���{����̓��[�h����֐��̃o�O�𒼂��p�b�`�Asection-view �̃o�O + �񍐁A* �t���Z�N�V�����R�}���h�Ή��̗v�]�A\right, \left �̃A�h�C + ���֐��쐬�Ɋւ���L�p�ȏ��Ȃǂ𒸂��܂����B + +�_����(niftyserve) + dviout�N���I�v�V�����Ɋւ���R�����g�A�w���v�t�@�C���̃o�O�񍐓� + �𒸂��܂����B + +���}�a�G����(JAIST) + �쒹/������ Mailing List ��ݗ����Ē����܂����B + +���{���F����(�����w�|��w) + �}�j���A���̃o�O���w�E���Ē����܂����B + +���{�R�N�q����(������w) + \item[] �Ȃǂ̕⊮�� [] �̒��ɃJ�[�\����u���v�]�𒸂��܂����B yatex +(setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist))  diff --git a/yatex.el b/yatex.el index f84388d..631d782 100644 --- a/yatex.el +++ b/yatex.el Binary files differ diff --git a/yatex.new b/yatex.new index f469ad4..7b24d6f 100644 --- a/yatex.new +++ b/yatex.new @@ -1,6 +1,13 @@ What's new in YaTeX yatex.el �e�o�[�W�����̕ύX�_�ɂ‚��� +1.56 [prefix] d �� YaTeX-display-hierarchy ��lj��B + �ϐ� indent-line-function �� YaTeX-indent-line ��ݒ肵���B + YaTeX-generate-simple �̏C��(1.51���獡�܂őS�R�����Ȃ������̂Ɂc)�B + NTT-jTeX �𗘗p���鎞�ɕ������C���f���g���Ă��ǂ��悤�� + auto-fill �� fill-paragraph �𒲐������B + maketitle �^�R�}���h�� [] �ŏI����Ă��鎞�ɂ̓J�[�\�������ʓ��ɁB + 1.55 {}�̏�� [prefix] k �������ɒ��O�̃R�}���h�� maketitle �^������ �����Ă���� {} �̂�(�t�H���g�w��q������΂����)�������悤�ɂ����B �V�P����͎��ɁAN)one ��I�ԂƁA����Emacs�ł̂ݗL���ɂ���悤�� diff --git a/yatex19.el b/yatex19.el index da63c53..ec2281a 100644 --- a/yatex19.el +++ b/yatex19.el @@ -1,7 +1,7 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX facilities for Emacs 19 -;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Mon Dec 19 02:55:36 1994 on VFR +;;; (c )1994-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:15:56 1995 on landcruiser ;;; $Id$ ;;; �Ƃ肠���� hilit19 ���g���Ă��鎞�ɐF���t���悤�ɂ��� @@ -92,6 +92,11 @@ YaTeX-mode-map [menu-bar yatex] '(what "What column in tabular" YaTeX-what-column)) +;; Document hierarchy ------------------------------------------------------ +(YaTeX-19-define-sub-menu + YaTeX-mode-map [menu-bar yatex] + '(hier "Display document hierarchy" YaTeX-display-hierarchy-directly)) + ;; Jump cursor --------------------------------------------------------------- (define-key YaTeX-mode-map [menu-bar yatex jump] (cons "Jump cursor" @@ -214,9 +219,9 @@ '("\\\\\\(re\\)?new\\(environment\\|command\\){" "}" define) '("\\\\new\\(length\\|theorem\\|counter\\){" "}" define) ;;�Z�N�V�����R�}���h���P�Ȃ�L�[���[�h���Ă��Ƃ͂Ȃ��ł��傤�B - (list - (concat "\\\\\\(" YaTeX-sectioning-regexp "\\){") "}" - 'sectioning) + ;;(list + ;;(concat "\\\\\\(" YaTeX-sectioning-regexp "\\){") "}" + ;;'sectioning) ;;eqnarray �Ȃǂ̐����‹��������ĂȂ��݂����c '("\\\\begin{\\(eqnarray\\*?\\|equation\\*?\\)}" "\\\\end{\\(eqnarray\\*?\\|equation\\*?\\)}" @@ -227,9 +232,54 @@ (defvar YaTeX-hilit-sectioning-face '(yellow/dodgerblue yellow/cornflowerblue) "*Hilightening face for sectioning unit. '(FaceForLight FaceForDark)") +(defvar YaTeX-sectioning-patterns-alist nil + "Hilightening patterns for sectioning units.") (defvar YaTeX-hilit-singlecmd-face '(slateblue2 aquamarine) "*Hilightening face for maketitle type. '(FaceForLight FaceForDark)") + +;;; �Z�N�V�����R�}���h���A�\�����x���̍����ɉ����ĐF�̔Z�x��ς��� +;;; �w�i�����łȂ��Ɖ����������̂�������Ȃ��ɈႢ�Ȃ�. +(let*((sectface + (car (if (eq hilit-background-mode 'dark) + (cdr YaTeX-hilit-sectioning-face) + YaTeX-hilit-sectioning-face))) + (sectcol (symbol-name sectface)) + sect-pat-alist) + (if (string-match "/" sectcol) + (let (colorvalue fR fG fB bR bG bB list pat fg bg level from face) + (require 'yatexsec) + (setq fg (substring sectcol 0 (string-match "/" sectcol)) + bg (substring sectcol (1+ (string-match "/" sectcol))) + colorvalue (x-color-values fg) + fR (/ (nth 0 colorvalue) 256) + fG (/ (nth 1 colorvalue) 256) + fB (/ (nth 2 colorvalue) 256) + colorvalue (x-color-values bg) + bR (/ (nth 0 colorvalue) 256) + bG (/ (nth 1 colorvalue) 256) + bB (/ (nth 2 colorvalue) 256) + list YaTeX-sectioning-level) + (while list + (setq pat (concat YaTeX-ec-regexp (car (car list)) "\\*?{") + level (cdr (car list)) + fg (format "hex-%02x%02x%02x" + (- fR (/ (* level fR) 40)) ;40 musn't be constant + (- fG (/ (* level fG) 40)) + (- fB (/ (* level fB) 40))) + bg (format "hex-%02x%02x%02x" + (- bR (/ (* level bR) 15)) ;20 musn't be constant + (- bG (/ (* level bG) 15)) + (- bB (/ (* level bB) 15))) + from (intern (format "sectioning-%d" level)) + face (intern (concat fg "/" bg))) + (hilit-translate from face) + (setq sect-pat-alist + (cons (list pat "}" face) + sect-pat-alist)) + (setq list (cdr list))) + (setq YaTeX-sectioning-patterns-alist sect-pat-alist)))) + (defun YaTeX-19-collect-macro () (cond ((and (featurep 'hilit19) (fboundp 'hilit-translate)) @@ -246,7 +296,7 @@ ((eq hilit-background-mode 'dark) (car (cdr table))) (t nil)))))) (hilit-translate - sectioning (funcall get-face YaTeX-hilit-sectioning-face) + ;;sectioning (funcall get-face YaTeX-hilit-sectioning-face) macro (funcall get-face YaTeX-hilit-singlecmd-face))) (setq hilit-patterns-alist ;Remove at first. (delq 'yatex-mode hilit-patterns-alist) @@ -254,6 +304,7 @@ (cons (cons 'yatex-mode (append + YaTeX-sectioning-patterns-alist YaTeX-hilit-pattern-adjustment-private YaTeX-hilit-pattern-adjustment-default YaTeX-hilit-patterns-alist diff --git a/yatexadd.el b/yatexadd.el index 5e51852..c1681a2 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX add-in functions. -;;; yatexadd.el rev.11 -;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Mon Dec 19 03:07:01 1994 on landcruiser +;;; yatexadd.el rev.12 +;;; (c )1991-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:15:48 1995 on landcruiser ;;; $Id$ ;;; @@ -286,6 +286,11 @@ (concat "[" label "]"))) ) +(defun YaTeX:item () " ") +(fset 'YaTeX:item\[\] 'YaTeX:item) +(fset 'YaTeX:subitem 'YaTeX:item) +(fset 'YaTeX:subsubitem 'YaTeX:item) + ;;; ;;Subroutine ;;; diff --git a/yatexgen.el b/yatexgen.el index e4b7583..f9df033 100644 --- a/yatexgen.el +++ b/yatexgen.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX add-in function generator. -;;; yatexgen.el rev.4 -;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Sun Dec 11 05:38:35 1994 on VFR +;;; yatexgen.el rev.5 +;;; (c )1991-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:15:34 1995 on landcruiser ;;; $Id$ (require 'yatex) @@ -142,6 +142,11 @@ (defvar YaTeX-generate-message-height 10 "Window height of YaTeX-generate-message-buffer") +;; Do you need learning for generated function? +;; If you need, please tell me (yuuji@ae.keio.ac.jp) +;;(defvar YaTeX-generate-variables-for-learning nil) +;;(defvar YaTeX-generate-current-completion-table nil) + ;;; ;Generate mode. ;;; @@ -437,7 +442,7 @@ (insert cand "\n")) (kill-buffer buf))) ;;(set-buffer cb) - (concat cands ")")) + (setq YaTeX-generate-current-completion-table (concat cands ")"))) ) (defun YaTeX-generate-corresponding-paren (left) (cond @@ -457,19 +462,27 @@ ")\n") ) (defun YaTeX-generate-create-completing-read (&optional nth) - (concat - "(completing-read \"" - (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) - ": \"\n" - (format "'%s\n" (YaTeX-generate-read-completion-table)) - "nil " - (format "%s)" (y-or-n-p "Require match? "))) + (prog1 + (concat + "(completing-read \"" + (read-string + (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) + ": \"\n" + (format "'%s\n" (YaTeX-generate-read-completion-table)) + "nil " + (format "%s)" (y-or-n-p "Require match? "))) + (if nil ;;;(y-or-n-p "Do you need learning for this completion?") + (setq YaTeX-generate-variables-for-learning + (cons + (cons (format "YaTeX-%s-%d" command (or nth 0)) + YaTeX-generate-current-completion-table) + YaTeX-generate-variables-for-learning)))) ) (defun YaTeX-generate-create-read-file-name (&optional nth) (concat "(read-file-name \"" (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) - ": \" "" nil t \"\")\n") + ": \" "" \"\" t \"\")\n") ) (defun YaTeX-generate-create-read-oneof (&optional nth readpos) (concat @@ -491,24 +504,23 @@ (cond ;;Read string ((eq type 'string) - (concat \"\" (setq leftp (read-string "Left parenthesis: " "{")) - \""\n" + (concat "\"" (setq leftp (read-string "Left parenthesis: " "(")) + "\"\n" (YaTeX-generate-create-read-string) - \"\" (YaTeX-generate-corresponding-paren leftp) \"\" - )) - + "\"" (YaTeX-generate-corresponding-paren leftp) "\"") + ) ;;Completing-read ((eq type 'completion) - (concat \"\" (setq leftp (read-string "Left parenthesis: " "{")) - \""\n" + (concat "\"" (setq leftp (read-string "Left parenthesis: " "{")) + "\"\n" (YaTeX-generate-create-completing-read) - \"\" (YaTeX-generate-corresponding-paren leftp) \"\") + "\"" (YaTeX-generate-corresponding-paren leftp) "\"") ) ((eq type 'file) - (concat \"\" (setq leftp (read-string "Left parenthesis: " "{")) - \""\n" + (concat "\"" (setq leftp (read-string "Left parenthesis: " "(")) + "\"\n" (YaTeX-generate-create-read-file-name) - \"\" (YaTeX-generate-corresponding-paren leftp) \"\") + "\"" (YaTeX-generate-corresponding-paren leftp) "\"") ) ((eq type 'oneof) (YaTeX-generate-create-read-oneof nil t) @@ -521,7 +533,6 @@ " (concat \"[\" op \"]\")\n" " \"\"))\n") ) - ((eq type 'coord) (concat "(YaTeX:read-coordinates \"" (read-string "Prompt for coordinates: ") @@ -576,13 +587,13 @@ (defun YaTeX-generate-simple (&optional command) "Simple but requiring some elisp knowledge add-in generator." (interactive) + (setq YaTeX-generate-variables-for-learning nil) (or command (setq command (completing-read (format "Making add-in function for (default %s): " section-name) (append section-table user-section-table tmp-section-table - article-table user-article-table env-table user-env-table tmp-env-table singlecmd-table user-singlecmd-table tmp-singlecmd-table) nil nil) diff --git a/yatexhie.el b/yatexhie.el new file mode 100644 index 0000000..e2b8db3 --- /dev/null +++ b/yatexhie.el @@ -0,0 +1,361 @@ +;;; -*- Emacs-Lisp -*- +;;; YaTeX hierarchy browser. +;;; yatexhie.el +;;; (c )1995 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:15:25 1995 on landcruiser +;;; $Id$ + +;; ----- Customizable variables ----- +(defvar YaTeX-hierarchy-inspect-mode t + "*Non-nil inspects the contents of file of cursor position.") + + +;; ----- General variables ----- +(defvar YaTeX-default-TeX-extensions "\\.\\(tex\\|sty\\)") +(defvar YaTeX-hierarchy-current-main nil) +(defvar YaTeX-hierarchy-buffer-message + (concat + "n)ext p)rev N)extsamelev P)revsamelev u)p K)ill-buffer RET)select" + (if (and YaTeX-emacs-19 window-system) " Mouse2)select" ""))) +(defvar YaTeX-hierarchy-saved-wc nil "Saved window configuration.") + +;; ----- Functions for parsing hierarchy ----- + +(defun YaTeX-all-included-files (&optional file) + "Return all included files from FILE as a list. +If FILE is nil, use current buffer." + (save-excursion + (let ((include-regex (concat YaTeX-ec-regexp + "\\(\\(input\\)\\|" ;match#2 + "\\(include\\)\\)\\b")) ;match#3 + list file (cb (current-buffer))) + (if file (set-buffer (YaTeX-switch-to-buffer file t))) + (goto-char (point-min)) + (while (YaTeX-re-search-active-forward + include-regex YaTeX-comment-prefix nil t) + (cond + ((match-beginning 2) ;\input, {} is optional, 1 argument + (skip-chars-forward " {") + (setq file (buffer-substring + (point) + (progn + (skip-chars-forward + (concat "^ \t\n\r" YaTeX-ec-regexp "{}")) + (point))))) + ((match-beginning 3) + (skip-chars-forward "{") + (setq file (buffer-substring + (point) + (progn + (forward-char -1) (forward-list 1) (1- (point))))))) + (or (string-match YaTeX-default-TeX-extensions file) + (setq file (concat file ".tex"))) + (setq list (cons file list))) + (set-buffer cb) + (nreverse list)))) + +(defun YaTeX-document-hierarchy (&optional file) + "Return the document hierarchy beginning from FILE as a list. +If FILE is nil, beginning with current buffer's file." + (setq file (or file buffer-file-name)) + (message "Parsing [%s]..." (file-name-nondirectory file)) + (prog1 + (save-excursion + (if (or (file-exists-p file) (null file)) + (progn + (if file + (let ((parent buffer-file-name)) + (YaTeX-switch-to-buffer file t) ;set buffer to file + (or YaTeX-parent-file + (YaTeX-get-builtin "!") + (setq YaTeX-parent-file parent)))) + (cons (buffer-file-name (current-buffer)) + (mapcar 'YaTeX-document-hierarchy ;return value + (YaTeX-all-included-files)))))) + (message "Parsing [%s]...done" (file-name-nondirectory file)))) + +;; ----- Functions for displaying hierarchy ----- + +(defun YaTeX-hierarchy-get-file-heading (file) + "Get a FILE's heading." + (save-excursion + (set-buffer (find-file-noselect file)) + (save-excursion + (goto-char (point-min)) + (cond + ((and + (YaTeX-re-search-active-forward + (concat YaTeX-ec-regexp YaTeX-sectioning-regexp) + YaTeX-comment-prefix nil t) + (re-search-forward "{\\([^}]+\\)}" nil t)) + (goto-char (match-beginning 1)) + (skip-chars-forward " \t\n") + (buffer-substring (point) + (min (point-end-of-line) + (match-end 1)))) + ((re-search-forward "^ *%\\([^#]\\)" nil t) + (goto-char (match-beginning 1)) + (skip-chars-forward " \t") + (buffer-substring (point) (point-end-of-line))) + (t ""))))) + +(defun YaTeX-display-a-hierachy (hier level) + "Put a HIER of document hierarchy. +LEVEL is including depth." + (message "Formatting hierarchy buffer...") + (let ((lastatomcol 0) list i p) + (cond + ((listp hier) + (setq list hier) + (while list + (YaTeX-display-a-hierachy (car list) (1+ level)) + (setq list (cdr list)))) + ((stringp hier) ;is an atom + (insert " ") + (setq i level) + (while (> i 2) + (insert "| ") + (setq i (1- i))) + (if (> level 1) (insert "+---")) + (setq p (point)) + (insert (or (buffer-name (get-file-buffer hier)) + (file-name-nondirectory hier))) + (if (and window-system YaTeX-emacs-19) + (put-text-property p (point) 'mouse-face 'underline)) + (insert " ") + (indent-to-column (1- (/ (window-width) 2))) + (insert "% " (YaTeX-hierarchy-get-file-heading hier)) + (insert "\n")))) + (message "Formatting hierarchy buffer...")) + +(defun YaTeX-display-hierarchy (file &optional use-default) + "Display document hierarchy that is beginning from FILE." + (interactive "P") + (setq YaTeX-hierarchy-saved-wc + (list (current-window-configuration) + (and (featurep 'windows) + (boundp 'win:current-config) + win:current-config))) + (let*((b-in (YaTeX-get-builtin "!")) + (default (or YaTeX-parent-file + (and b-in (YaTeX-guess-parent b-in)) + buffer-file-name))) + ;;$B$`!<$s"-$3$N$X$s$N;EMM$I$&$7$?$i$$$$$+NI$/J,$+$i$s(B... + (if default (setq default (expand-file-name default))) + (YaTeX-visit-main t) ;move to parent file + (setq file + (or (if use-default default file) + (read-file-name + (format + "Main .tex file%s: " + (if default + (format "(default %s)"(file-name-nondirectory default)) + "")) + "" default 1)))) + (setq file (expand-file-name file)) + (setq YaTeX-hierarchy-current-main file) + (let ((dbuf "*document hierarchy*")) + (YaTeX-showup-buffer dbuf nil t) + (set-buffer (get-buffer dbuf)) + (setq truncate-lines t) + (let ((buffer-read-only nil)) + (erase-buffer) + (YaTeX-display-a-hierachy (YaTeX-document-hierarchy file) 0)) + (goto-char (point-min)) + (YaTeX-hierarchy-next 0) + (set-buffer-modified-p nil) + (YaTeX-hierarchy-mode) + )) + +(defun YaTeX-display-hierarchy-directly () + "Same as YaTeX-display-hierarchy. Call from mouse." + (interactive) + (YaTeX-display-hierarchy nil t)) + +(defun YaTeX-hierarchy-mode () + "Major mode to browse and select document hierarchy. + +\\[YaTeX-hierarchy-next] next line +\\[YaTeX-hierarchy-prev] previous line +\\[YaTeX-hierarchy-forward] move forward in same level +\\[YaTeX-hierarchy-backward] move backward in same level +\\[YaTeX-hierarchy-up-document] move to parent file +\\[delete-other-windows] delete other windows +\\[other-window] other window +\\[YaTeX-hierarchy-show] show buffer contents in the next window +\\[YaTeX-hierarchy-select] select file +\\[YaTeX-hierarchy-mouse-select] select +" + (setq major-mode 'YaTeX-hierarchy-mode + mode-name "YaTeX hier") + (use-local-map YaTeX-hierarchy-mode-map) + (setq buffer-read-only t) + (message YaTeX-hierarchy-buffer-message)) + +;; ----- Subfunctions for interactive functions ----- +(defun YaTeX-hierarchy-get-current-file-buffer () + "Return the buffer associated with current line's file." + (let ((file (buffer-substring + (point) + (save-excursion + (skip-chars-forward "^ \t" (point-end-of-line)) (point)))) + (hilit-auto-highlight) buffer) + (set-buffer (find-file-noselect YaTeX-hierarchy-current-main)) + (if (get-buffer file) ;buffer is active + (setq buffer (get-buffer file)) ;may contain `<2>' + (if (string-match "<[2-9]>$" file) + (setq file (substring file 0 -3))) + (save-excursion + (setq buffer (YaTeX-switch-to-buffer file t)))))) ; open it! + +;; ----- Interactive functions ----- +(defun YaTeX-hierarchy-next (arg &optional quiet) + "Move to next line's file in YaTeX document hierarchy buffer." + (interactive "p") + (forward-line arg) + (skip-chars-forward "- +\\|") + (if (and (/= arg 0) YaTeX-hierarchy-inspect-mode (not quiet)) + (YaTeX-hierarchy-select t)) + (message YaTeX-hierarchy-buffer-message)) + +(defun YaTeX-hierarchy-prev (arg) + "Move to previous line's file in YaTeX document hierarchy buffer." + (interactive "p") + (YaTeX-hierarchy-next (- arg))) + +(defun YaTeX-hierarchy-next-line (arg) + (interactive "p") + (YaTeX-hierarchy-next arg t)) + +(defun YaTeX-hierarchy-prev-line (arg) + (interactive "p") + (YaTeX-hierarchy-next (- arg) t)) + +(defun YaTeX-hierarchy-forward (arg) + "Move to forward file in same hierarchy level." + (interactive "p") + (YaTeX-hierarchy-next 0) + (let ((p (point))(column (current-column)) (i (if (> arg 0) arg (- arg)))) + (if (= column 0) (error "Not on file line.")) + (while (> i 0) + (if (catch 'found + (while (and (not (eobp)) (not (bobp))) + (forward-line (if (> arg 0) 1 -1)) + (move-to-column column) + (if (looking-at "[- +\\|]") nil + (YaTeX-hierarchy-next 0) + (if (= (current-column) column) (throw 'found t))) + (beginning-of-line))) + nil + (goto-char p) + (error "No same level file.")) + (setq i (1- i))))) + +(defun YaTeX-hierarchy-backward (arg) + "Move to backward file in same hierarchy level." + (interactive "p") + (YaTeX-hierarchy-forward (- arg))) + +(defun YaTeX-hierarchy-up-document () + "Up level, that is, move to parent file position." + (interactive) + (YaTeX-hierarchy-next 0) ;adjust column + (let ((p (point)) (line (count-lines (point-min) (point))) column) + (if (or (<= line 1) (< (current-column) 6)) + (message "No more parent") + (backward-char 1) + (or (= (char-after (point)) ?-) (error "Unexpected hierarchy buffer")) + (setq column (current-column)) + (while (and (> line 1) (looking-at "[- +\\|]")) + (forward-line -1) + (move-to-column column)) + (YaTeX-hierarchy-next 0) + (push-mark p t) + (message "Mark set to last position")))) + +(defun YaTeX-hierarchy-kill-buffer (arg) + "Kill buffer associated with current line's file." + (interactive "p") + (YaTeX-hierarchy-next 0) ;move to file name column + (if (bolp) (error "Not on file name line")) + (let ((file (buffer-substring (point) (point-end-of-line)))) + (YaTeX-hierarchy-next arg) + (cond + ((get-buffer file) + (kill-buffer (get-buffer file)) + (message "Buffer [%s] was killed" file)) + (t (message "Buffer [%s] is not active." file))))) + +(defun YaTeX-hierarchy-select (arg) + "Select current line's file in YaTeX document hierarchy buffer. +If ARG is non-nil, show the buffer in the next window." + (interactive "P") + (beginning-of-line) + (skip-chars-forward "- +\\|") + (or (eolp) + (let ((buffer (YaTeX-hierarchy-get-current-file-buffer))) + (if buffer ;if file was found + (if arg + (YaTeX-showup-buffer buffer nil) + (if (and YaTeX-emacs-19 window-system + (get-buffer-window buffer t)) + (goto-buffer-window buffer) ;select currently displaying + (YaTeX-switch-to-buffer-other-window buffer))))))) + +(defun YaTeX-hierarchy-show () + "Show current line's file in the next window." + (interactive) + (YaTeX-hierarchy-select t)) + +(defun YaTeX-hierarchy-mouse-select (event) + (interactive "e") + (mouse-set-point event) + (YaTeX-hierarchy-select nil)) + +(defun YaTeX-hierarchy-quit () + "Quit from YaTeX-hierarchy buffer and restore window configuration." + (interactive) + (if (or (not (featurep 'windows)) + (car YaTeX-hierarchy-saved-wc) + (and (= (car (cdr YaTeX-hierarchy-saved-wc)) win:current-config))) + (set-window-configuration (car YaTeX-hierarchy-saved-wc)) + (bury-buffer nil))) + +(defun YaTeX-hierarchy-toggle-inspection (arg) + "Toggle inspection mode of YaTeX-hierarchy buffer." + (interactive "P") + (setq YaTeX-hierarchy-inspect-mode + (or arg (not YaTeX-hierarchy-inspect-mode))) + (message "YaTeX hierarchy inspection mode %s" + (if YaTeX-hierarchy-inspect-mode "ON" "OFF"))) + +;; ----- Setting up keymap ----- +(defvar YaTeX-hierarchy-mode-map nil "Keymap used in YaTeX-hierarchy-mode.") +(if YaTeX-hierarchy-mode-map nil + (setq YaTeX-hierarchy-mode-map (make-sparse-keymap)) + (define-key YaTeX-hierarchy-mode-map "n" 'YaTeX-hierarchy-next) + (define-key YaTeX-hierarchy-mode-map "p" 'YaTeX-hierarchy-prev) + (define-key YaTeX-hierarchy-mode-map "j" 'YaTeX-hierarchy-next-line) + (define-key YaTeX-hierarchy-mode-map "k" 'YaTeX-hierarchy-prev-line) + (substitute-all-key-definition + 'next-line 'YaTeX-hierarchy-next-line YaTeX-hierarchy-mode-map) + (substitute-all-key-definition + 'previous-line 'YaTeX-hierarchy-prev-line YaTeX-hierarchy-mode-map) + (define-key YaTeX-hierarchy-mode-map "N" 'YaTeX-hierarchy-forward) + (define-key YaTeX-hierarchy-mode-map "P" 'YaTeX-hierarchy-backward) + (define-key YaTeX-hierarchy-mode-map "u" 'YaTeX-hierarchy-up-document) + (define-key YaTeX-hierarchy-mode-map "K" 'YaTeX-hierarchy-kill-buffer) + (define-key YaTeX-hierarchy-mode-map "1" 'delete-other-windows) + (define-key YaTeX-hierarchy-mode-map "o" 'other-window) + (define-key YaTeX-hierarchy-mode-map "." 'YaTeX-hierarchy-show) + (define-key YaTeX-hierarchy-mode-map "\C-m" 'YaTeX-hierarchy-select) + (define-key YaTeX-hierarchy-mode-map ";" 'YaTeX-hierarchy-toggle-inspection) + (define-key YaTeX-hierarchy-mode-map "q" 'YaTeX-hierarchy-quit) + (define-key YaTeX-hierarchy-mode-map "?" 'describe-mode) + (if (and YaTeX-emacs-19 window-system) + (define-key YaTeX-hierarchy-mode-map + [mouse-2] 'YaTeX-hierarchy-mouse-select)) + ) + +(provide 'yatexhie) +;;end of yatexhie.el diff --git a/yatexlib.el b/yatexlib.el index b6e94bf..8a239d0 100644 --- a/yatexlib.el +++ b/yatexlib.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX library of general functions. ;;; yatexlib.el -;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Wed Dec 21 05:58:06 1994 on landcruiser +;;; (c )1994-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:15:03 1995 on landcruiser ;;; $Id$ ;;;###autoload @@ -46,17 +46,19 @@ "Switch to buffer if buffer exists, find file if not. Optional second arg SETBUF t make use set-buffer instead of switch-to-buffer." (interactive "Fswitch to file: ") - (let (buf) - (if (setq buf (get-file-buffer file)) - (progn - (funcall (if setbuf 'set-buffer 'switch-to-buffer) - (get-file-buffer file)) - buf) - (if (file-exists-p file) - (or ;find-file returns nil but set current-buffer... - (funcall (if setbuf 'find-file-noselect 'find-file) file) - (current-buffer)) - (message "%s was not found in this directory." file) + (if (bufferp file) (setq file (buffer-file-name file))) + (let (buf (hilit-auto-highlight (not setbuf))) + (cond + ((setq buf (get-file-buffer file)) + (funcall (if setbuf 'set-buffer 'switch-to-buffer) + (get-file-buffer file)) + buf) + ((or YaTeX-create-file-prefix-g (file-exists-p file)) + (or ;find-file returns nil but set current-buffer... + (if setbuf (set-buffer (find-file-noselect file)) + (find-file file)) + (current-buffer))) + (t (message "%s was not found in this directory." file) nil))) ) @@ -64,11 +66,14 @@ (defun YaTeX-switch-to-buffer-other-window (file) "Switch to buffer if buffer exists, find file if not." (interactive "Fswitch to file: ") - (if (get-file-buffer file) - (progn (switch-to-buffer-other-window (get-file-buffer file)) t) - (if (file-exists-p file) - (progn (find-file-other-window file) t) - (message "%s was not found in this directory." file) + (if (bufferp file) (setq file (buffer-file-name file))) + (cond + ((get-file-buffer file) + (switch-to-buffer-other-window (get-file-buffer file)) + t) + ((or YaTeX-create-file-prefix-g (file-exists-p file)) + (find-file-other-window file) t) + (t (message "%s was not found in this directory." file) nil)) ) @@ -293,6 +298,7 @@ (defun goto-buffer-window (buffer) "Select window which is bound to BUFFER. If no such window exist, switch to buffer BUFFER." + (interactive "BGoto buffer: ") (if (stringp buffer) (setq buffer (or (get-file-buffer buffer) (get-buffer buffer)))) (if (get-buffer buffer) diff --git a/yatexmth.el b/yatexmth.el index 9e875af..ce91838 100644 --- a/yatexmth.el +++ b/yatexmth.el @@ -1,14 +1,14 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX math-mode-specific functions. -;;; yatexmth.el rev.2 -;;; (c )1993-1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] -;;; Last modified Fri Dec 2 17:03:30 1994 on VFR +;;; yatexmth.el rev.3 +;;; (c )1993-1995 by HIROSE Yuuji [yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:14:51 1995 on landcruiser ;;; $Id$ ;;; [Customization guide] ;;; ;;; By default, you can use two completion groups in YaTeX math -;;; mode, `;' for mathematical signs and `/' for greek letters. But +;;; mode, `;' for mathematical signs and `:' for greek letters. But ;;; you can add other completion groups by defining the alist of ;;; `prefix key' vs `completion list' into the variable ;;; YaTeX-math-key-list-private. If you wish to accomplish the @@ -50,7 +50,7 @@ ;;; �y�C���[�W�⊮�̒lj����@�z ;;; -;;; �W���̃C���[�W�⊮�ł́A�u;�v�Ŏn�܂鐔���L���⊮�ƁA�u/�v�Ŏn +;;; �W���̃C���[�W�⊮�ł́A�u;�v�Ŏn�܂鐔���L���⊮�ƁA�u:�v�Ŏn ;;; �܂�M���V�������⊮���g�p�”\�ł����A����ȊO�̕����Ŏn�܂�⊮ ;;; �V���[�Y����`���邱�Ƃ��ł��܂��B�Ⴆ�΁A�u,�v�Ŏn�܂鎟�̂悤 ;;; �ȕ⊮�V���[�Y���`����ꍇ���l���Ă݂܂��B @@ -108,7 +108,7 @@ (YaTeX-setq-math-sym YaTeX-image-flat "��" "��") (YaTeX-setq-math-sym YaTeX-image-sqrt "��" "��") -(setq +(defvar YaTeX-math-sign-alist-default '( ;frequently used @@ -258,15 +258,15 @@ ("D" "diamondsuit" "/\\\n\\/") ("H" "heartsuit" "<^^>\n \\/") ("S" "spadesuit" " /\\\n<++>\n /\\") - - )) + ) + "Default LaTeX-math-command alist.") (defvar YaTeX-math-sign-alist-private nil "*User definable key vs LaTeX-math-command alist.") (defvar YaTeX-math-quit-with-strict-match nil "*T for quitting completion as soon as strict-match is found.") -(setq YaTeX-math-sign-alist +(defvar YaTeX-math-sign-alist (append YaTeX-math-sign-alist-private YaTeX-math-sign-alist-default)) ;;(defun YaTeX-math-alist2array (alist array) @@ -278,7 +278,7 @@ ;; array)) ;;) -(setq YaTeX-greek-key-alist-default +(defvar YaTeX-greek-key-alist-default '( ("a" "alpha" ("a" "��")) ("b" "beta" ("|>\n|>\n|" "��")) @@ -326,19 +326,18 @@ ("W" "Omega" ("(~)\n~ ~" "��")) ("f" "foo") ) -) + "Default LaTeX-math-command alist.") (defvar YaTeX-greek-key-alist-private nil "*User definable key vs LaTeX-math-command alist.") -(setq YaTeX-greek-key-alist +(defvar YaTeX-greek-key-alist (append YaTeX-greek-key-alist-private YaTeX-greek-key-alist-default)) ;;(mapcar (function (lambda (x) (YaTeX-math-alist2array x))) ;; YaTeX-math-key-list) -(setq YaTeX-math-indicator - "KEY\tLaTeX sequence\t\tsign") +(defvar YaTeX-math-indicator "KEY\tLaTeX sequence\t\tsign") (defvar YaTeX-math-need-image t "*T for displaying pseudo image momentarily.") @@ -585,14 +584,15 @@ (setq buffer-file-name name) (set-buffer-modified-p modified))))) -(defun YaTeX-math-insert-sequence (&optional force) +(defun YaTeX-math-insert-sequence (&optional force initial) "Insert math-mode sequence with image completion." (interactive "P") - (let*((key "") regkey str last-char list i + (let*((key (or initial "")) regkey str last-char list i (case-fold-search nil) match sign (this-key (char-to-string last-command-char)) (alist (symbol-value (cdr (assoc this-key YaTeX-math-key-list)))) (n (length alist)) (beg (point)) result) + (if initial (insert YaTeX-ec (car (cdr (assoc initial alist))))) (setq result (catch 'complete (if (and (not force) @@ -669,7 +669,7 @@ (message "Abort.")) ((eq result 'escape) (delete-region beg (point)) - (insert this-key)) + (call-interactively (global-key-binding this-key))) ((eq result 'select) (message "Done.")) ((eq result 'exit) @@ -680,6 +680,21 @@ (setq key (concat "^" (regexp-quote (substring key 0 -1)))) (insert (YaTeX-math-show-menu key))))) ) + +;; ----- Change image completion types ----- +(defun YaTeX-math-member-p (item) + "Check if ITEM is a member of image completion. +If so return the cons of its invocation key and image-string." + (let ((lists YaTeX-math-key-list) list) + (catch 'found + (while lists + (setq list (symbol-value (cdr (car lists)))) + (while list + (if (string= item (nth 1 (car list))) + (throw 'found (cons (car (car lists)) (nth 0 (car list))))) + (setq list (cdr list))) + (setq lists (cdr lists)))))) + ;; (provide 'yatexmth) diff --git a/yatexprc.el b/yatexprc.el index 7ee18da..9d25398 100644 --- a/yatexprc.el +++ b/yatexprc.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX process handler. ;;; yatexprc.el -;;; (c )1993-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] -;;; Last modified Wed Dec 14 16:58:15 1994 on 98fa +;;; (c )1993-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] +;;; Last modified Sun Jan 22 23:14:44 1995 on landcruiser ;;; $Id$ (require 'yatex) @@ -142,8 +142,8 @@ ) (defun YaTeX-typeset-region () - "Paste the region to the file `texput.tex' and execute jlatex (or other) -to LaTeX typeset. The region is specified by the rule: + "Paste the region to the file `texput.tex' and execute typesetter. +The region is specified by the rule: (1)If keyword `%#BEGIN' is found in the upper direction from (point). (1-1)if the keyword `%#END' is found after `%#BEGIN', ->Assume the text between `%#BEGIN' and `%#END' as region. @@ -161,7 +161,7 @@ (cmd (concat (YaTeX-get-latex-command nil) " " texput)) (buffer (current-buffer)) opoint preamble (subpreamble "") main (hilit-auto-highlight nil) ;for Emacs19 with hilit19 - reg-begin reg-end) + reg-begin reg-end lineinfo) (save-excursion (if (search-backward "%#BEGIN" nil t) @@ -173,8 +173,10 @@ (setq reg-end (match-beginning 0) end "END ---") (setq reg-end (point-max)))) - (setq typeout "=== Region from (point) to (mark) ===") - (setq reg-begin (point) reg-end (mark))) + (setq typeout "=== Region from (point) to (mark) ===" + reg-begin (point) reg-end (mark))) + (goto-char (min reg-begin reg-end)) + (setq lineinfo (count-lines (point-min) (point-end-of-line))) (goto-char (point-min)) (while (search-forward "%#REQUIRE" nil t) (setq subpreamble @@ -201,12 +203,14 @@ "\\begin{document}"))) (goto-char opoint) ;;(set-buffer buffer) ;for clarity - (set-buffer (find-file-noselect texput)) + (let ((hilit-auto-highlight nil)) + (set-buffer (find-file-noselect texput))) ;;(find-file YaTeX-texput-file) (erase-buffer) (if YaTeX-need-nonstop (insert "\\nonstopmode{}\n")) (insert preamble "\n" subpreamble "\n") + (setq lineinfo (list (count-lines 1 (point-end-of-line)) lineinfo)) (insert-buffer-substring buffer reg-begin reg-end) (insert "\\typeout{" typeout end "}\n") ;Notice the selected method. (insert "\n\\end{document}\n") @@ -215,7 +219,10 @@ (set-buffer main) ;return to parent file or itself. (YaTeX-typeset cmd YaTeX-typeset-buffer) (switch-to-buffer buffer) ;for Emacs-19 - (put 'dvi2-command 'region t))) + (put 'dvi2-command 'region t) + (put 'dvi2-command 'file buffer) + (put 'dvi2-command 'offset lineinfo) + )) ) (defun YaTeX-typeset-buffer () @@ -379,6 +386,17 @@ " to preview " preview-file)))))) ) +(defun YaTeX-set-virtual-error-position (file-sym line-sym) + "Replace the value of FILE-SYM, LINE-SYM by virtual error position." + (cond + ((and (get 'dvi2-command 'region) + (> (symbol-value line-sym) (car (get 'dvi2-command 'offset)))) + (set file-sym (get 'dvi2-command 'file)) + (set line-sym + (+ (- (apply '- (get 'dvi2-command 'offset))) + (symbol-value line-sym) + -1))))) + (defun YaTeX-prev-error () "Visit previous typeset error. To avoid making confliction of line numbers by editing, jump to @@ -404,10 +422,11 @@ (buffer-substring (point) (progn (skip-chars-forward "0-9" (match-end 0)) (point)))) - error-buffer (YaTeX-get-error-file cur-buf) - error-win (get-buffer-window error-buffer)) + error-buffer (YaTeX-get-error-file cur-buf)) (if (or (null error-line) (equal 0 error-line)) (error "Can't detect error position.")) + (YaTeX-set-virtual-error-position 'error-buffer 'error-line) + (setq error-win (get-buffer-window error-buffer)) (select-window cur-win) (cond (error-win (select-window error-win)) @@ -442,12 +461,13 @@ (goto-char (match-beginning 0)) (setq error-line (string-to-int (buffer-substring (match-beginning 1) (match-end 1))) - error-file (YaTeX-get-error-file YaTeX-current-TeX-buffer) - error-buf (YaTeX-switch-to-buffer error-file t)) + error-file (YaTeX-get-error-file YaTeX-current-TeX-buffer)) + (YaTeX-set-virtual-error-position 'error-file 'error-line) + (setq error-buf (YaTeX-switch-to-buffer error-file t))) (if (null error-buf) (error "`%s' is not found in this directory." error-file)) (YaTeX-showup-buffer error-buf nil t) - (goto-line error-line))) + (goto-line error-line)) ) (defun YaTeX-send-string () @@ -585,7 +605,7 @@ page range description." (interactive "P") (let*((cmd (or (YaTeX-get-builtin "LPR") dviprint-command-format)) - from to (lbuffer "*dvi-printing*")) + from to (lbuffer "*dvi-printing*") dir) (setq cmd (YaTeX-replace-format @@ -616,10 +636,12 @@ 'YaTeX-lpr-command-history)) (save-excursion (YaTeX-visit-main t) ;;change execution directory + (setq dir default-directory) (YaTeX-showup-buffer lbuffer (function (lambda (x) (nth 3 (window-edges x))))) (set-buffer (get-buffer-create lbuffer)) (erase-buffer) + (cd dir) ;for 19 (cond (YaTeX-dos (call-process shell-file-name "con" "*dvi-printing*" nil @@ -636,6 +658,8 @@ (defun YaTeX-main-file-p () "Return if current buffer is main LaTeX source." (cond + (YaTeX-parent-file + (eq (get-file-buffer YaTeX-parent-file) (current-buffer))) ((YaTeX-get-builtin "!") (string-match (YaTeX-guess-parent (YaTeX-get-builtin "!")) (buffer-name))) (t