diff --git a/docs/yatexadd.doc b/docs/yatexadd.doc index d215f7b..6f70f2e 100644 --- a/docs/yatexadd.doc +++ b/docs/yatexadd.doc @@ -38,13 +38,19 @@ �y�֐���`�z �t���֐��ɂ́A�eLaTeX�R�}���h�̃I�v�V����������Ԃ��`���̂��́A - section�^�⊮�̈�����Ԃ����́A�̓��ނ�����܂��B + section�^�⊮�̈�����Ԃ����́A���W��������section�^�⊮�̈����Y�� + �����������邽�߂̂��́A�O��ނ�����܂��B�����ł͕֋X�セ�̎O�‚��A - �O�҂́A�ȉ��̗�̂悤�ɁAbegin�^�⊮�ł�\begin{�‹���}�̒���� - �t�����镶����Asection�^�⊮�ł� LaTeX �R�}���h���Ƒ������̊Ԃ� - �ʒu���镶����Amaketitle�^�⊮�ł� LaTeX �R�}���h���̒���Ɉʒu�� - �镶�����Ԃ��悤�Ȋ֐��ł��B�֋X�ケ�̌`�̕t���֐����A�lj��^�t�� - �֐��ƌĂԂ��Ƃɂ��܂��B + a. �lj��^�t���֐� + b. �����^�t���֐� + c. ����⊮���t���֐� + + �ƌĂԂ��Ƃɂ��܂��B + + a �́A�ȉ��̗�̂悤�ɁAbegin�^�⊮�ł�\begin{�‹���}�̒���ɕt + �����镶����Asection�^�⊮�ł� LaTeX �R�}���h���Ƒ������̊ԂɈ� + �u���镶����Amaketitle�^�⊮�ł� LaTeX �R�}���h���̒���Ɉʒu���� + �������Ԃ��悤�Ȋ֐��ł��B (��) \begin{table}[ht] (�t���֐��� YaTeX:table) ~~~~ @@ -56,8 +62,8 @@ �lj��^�t���֐��́wLaTeX�R�}���h���̑O�� YaTeX: ���‚������O�x�Œ� �`���܂��B - ��҂́A�ȉ��̂悤��section�^�R�}���h�̈����ƂȂ镶�����Ԃ� - �֐��ł��B���̌`�̕t���֐��������^�t���֐��ƌĂԂ��Ƃɂ��܂��B + b �́A�ȉ��̂悤��section�^�R�}���h�̈����ƂȂ镶�����Ԃ��֐� + �ł��B (��) \newcommand{\foo}{bar} (�t���֐��� YaTeX::newcommand) ~~~~ ~~~ @@ -68,6 +74,21 @@ �āA�����^�t���֐��͐����̈�������Ž����̂Ƃ��Ē�`���A���̈��� �̒l�ɂ�菈�������肷�邱�ƂɂȂ�܂��B + (yatex.1.72�̐V�@�\) + c �́A�����e�L�X�g�̈ꕔ��section�^�R�}���h�̈����Ƃ��Ċ���Ƃ� + �ɁA�w�肵����W�����̐擪�Ɩ����̊e�|�C���g�������Ƃ��ČĂ΂�܂��B + ���Ƃ��΁A + + 5/3 + + �Ƃ����e�L�X�g�����W�����w�肵�� [prefix] S �ŃZ�N�V�����^�R�}���h + �Ŋ��肽���Ƃ��ɁA������e�L�X�g�ɑ΂��ĂȂ�炩�̏������قǂ��� + �����Ƃ��ɌĂ΂�܂��B + + (��) 5/3 ��5/3�����W�����w�肵 \frac �Ŋ��� + \frac{5/3} ��5/3�̃|�C���g�ʒu�������ɌĂ΂�� + ~~~ (�t���֐� YaTeX::frac-region) + �y��`��z @@ -110,6 +131,30 @@ �Ȃ��A�����^�t���֐��� nil ��Ԃ����ꍇ�́A�ʏ�̈������͊֐����� �΂�܂��B + �Ō�Ɋ���⊮���t���֐��̗�Ƃ��āA�����e�L�X�g�� \frac �Ŋ� + ��ꍇ�̗�������܂��B\frac ��2�‚̈��������A\frac{a}{b} �̂� + ���ɂ��āA������\���Ƃ��ɗ��p����R�}���h�ł��B���w�I�ɂ� + + a + a/b �� ---- + b + + �ƒu�������”\�ȋL�@�ł��BLaTeX�\�[�X��a/b�Ə��������̂�쒹�̊� + ��⊮��\frac�Ɋ���ƁA�ȉ��̂悤�ɂȂ�܂��B + + \frac{a/b} + + /�̕����� }{ �ɒu��������ΐ��������������ɂȂ�܂��B���̂悤�� + ���Ƃ�Θb�I�ɔ������ōs�Ȃ��A�h�C���֐��͈ȉ��̂悤�ɂ��܂��B + + (defun YaTeX::frac-region (beg end) ;���W�����̐擪�Ɩ��� + (catch 'done + (while (search-forward "/" end t) ;/������ԌJ��Ԃ� + (goto-char (match-beginning 0)) ;/�̈ʒu�Ɉړ� + (if (y-or-n-p "Replace this slash(/) to `}{'") + (throw 'done (replace-match "}{"))) ;�u�������ďI�� + (goto-char (match-end 0))))) + �y�Ă΂���z @@ -118,7 +163,8 @@ \begin{�‹���} ���������͂��ꂽ����ɌĂяo����܂��Bsection�^�⊮ �ł͑������̕⊮�̒��O�Amaketitle�^�⊮�̏ꍇ�́A�R�}���h���̒� ��(��‚̃X�y�[�X��}�����钼�O)�ɌĂяo����܂��B�����^�t���֐��́A - section�^�R�}���h�̈����̓��͎��ɂ��̓s�x�Ă΂�܂��B + section�^�R�}���h�̈����̓��͎��ɂ��̓s�x�Ă΂�܂��B����⊮���t + ���֐��́ALaTeX�R�}���h��{}���e�L�X�g�ɑ}�����ꂽ����ɌĂ΂�܂��B �y�Q�l�z diff --git a/docs/yatexe.tex b/docs/yatexe.tex index ad38d1f..f1da05a 100644 --- a/docs/yatexe.tex +++ b/docs/yatexe.tex @@ -5,7 +5,7 @@ @iftex @c @syncodeindex fn cp -@c Last modified Fri Feb 2 12:39:12 2001 on firestorm +@c Last modified Fri Sep 12 12:04:11 2003 on firestorm @syncodeindex vr cp @end iftex @@ -15,7 +15,7 @@ @subtitle Yet Another tex-mode for emacs @title Wild Bird @subtitle // YaTeX // -@author @copyright{} 1991-1996 by HIROSE, Yuuji [yuuji@@yatex.org] +@author @copyright{} 1991-2003 by HIROSE, Yuuji [yuuji@@yatex.org] @end titlepage @node Top, What is YaTeX?, (dir), (dir) @@ -30,7 +30,7 @@ * Main features:: What YaTeX can do * Installation:: Guide to install * Typesetting:: Call typesetting processes -* %#notation:: +* %#notation:: Meta-keyword `%#' * Completion:: Input LaTeX commands with completion * Local dictionaries:: Directory dependent completion * Commenting out:: Commenting/uncommenting text @@ -40,6 +40,7 @@ * Updation of includeonly:: Free from maintaining includeonly * What column:: Check what table-column the cursor belong * Intelligent newline:: Guess requisites of new line +* Usepackage checker:: Selecting correct \usepackage is YaTeX's job * Online help:: On-line documentation of LaTeX * Browsing file hierarchy:: Walking through file hierarchy * Cooperation with other packages:: Work well with gmhist, min-out @@ -47,75 +48,6 @@ * Etcetera:: YaTeX is acquisitive. * Copying:: Redistribution - --- The Detailed Node Listing --- - -Typesetting - -* Calling typesetter:: -* Calling previewer:: -* Printing out:: - -%# notation - -* Changing typesetter:: -* Static region for typesetting:: -* Lpr format:: -* Editing %# notation:: - -Completion - -* Begin-type completion:: -* Section-type completion:: -* Large-type completion:: -* Maketitle-type completion:: -* Arbitrary completion:: -* End completion:: -* Accent completion:: -* Image completion:: -* Greek letters completion:: - -Section-type completion - -* 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 LaTeX commands:: -* Killing LaTeX commands:: - -Customizations - -* Lisp variables:: -* Add-in functions:: -* Add-in generator:: - -Lisp variables - -* All customizable variables:: -* Sample definitions:: -* Hook variables:: -* Hook file:: - -Procedure - -* How the add-in function works:: -* How the function is called:: -* Useful functions for creating add-in:: -* Contribution:: - -How the add-in function works - -* Defining option-add-in:: -* Defining argument-add-in:: -@end menu @node What is YaTeX?, Main features, Top, Top @comment node-name, next, previous, up @@ -1348,7 +1280,7 @@ in the minibuffer. Type @kbd{a} if you want to add the current file name to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list -by the current file, and type @kbd{%} to comment out the +with the current file, and type @kbd{%} to comment out the @code{\includeonly} line. @node What column, Intelligent newline, Updation of includeonly, Top @@ -1389,7 +1321,7 @@ virtual column headers by putting them in the first line and commenting that line with @code{%}. -@node Intelligent newline, Online help, What column, Top +@node Intelligent newline, Usepackage checker, What column, Top @comment node-name, next, previous, up @chapter Intelligent newline @cindex Intelligent newline @@ -1440,7 +1372,22 @@ useful. See the definition of the function @code{YaTeX-intelligent-newline-itemize} as an example. -@node Online help, Browsing file hierarchy, Intelligent newline, Top +@node Usepackage checker, Online help, Intelligent newline, Top +@comment node-name, next, previous, up +@chapter Usepackage checker +@cindex usepackage + +When you input begint-type, section-type, maketitle-type macros with +completion, and it requires some LaTeX2e package, YaTeX examines +the existence of correct @code{\usepackage}. If not, YaTeX inserts +the @code{\usepackage@{@}} declaration corresponding to input macro. + +To activate the package completion for your favarite package, +set the variable @code{YaTeX-package-alist-private} correctly. +Please refere the value of @code{YaTeX-package-alist-default} as an +example. + +@node Online help, Browsing file hierarchy, Usepackage checker, Top @comment node-name, next, previous, up @chapter Online help @cindex online help @@ -1631,6 +1578,17 @@ are to change some of these variables, see more detailed documentation of the variable by @kbd{M-x describe-variable}. +@defvar YaTeX-japan +Set this nil to produce all messages in English +(@code{Depends on Japanese feature of Emacs}) +@end defvar + +@defvar YaTeX-kanji-code +Default buffer-file-coding-system for YaTeX modes' buffer. +Set this 0 to no language conversion. Nil to preserve original +coding-system. (@code{1 or 2}) +@end defvar + @defvar YaTeX-prefix Prefix key stroke (@kbd{C-c}) @end defvar @@ -1831,6 +1789,28 @@ (@code{(featurep 'hilit19)} @end defvar +@defvar YaTeX-singlecmd-suffix +Suffix which is always inserted after maketitle-type macros. +@code{"{}"} is recommended. +@end defvar + +@defvar YaTeX-package-alist-private +Alist of LaTeX2e-package name vs. lists of macros in it. +Set this alist properly and YaTeX automatically check the declaratiion of +`usepackage' for corresponding macro, when you input that macro with +completion. If required `usepackage' is not found, YaTeX also +automatically inserts `\usepackage'. Alist is as follows; +@lisp + '((PackageName1 + (completionType ListOfMacro) + (completionType ListOfMacro)) + (PackageName2 + (completionType ListOfMacro) + (completionType ListOfMacro...))....) +@end lisp +completionType is one of @code{env, section, maketitle}. +Consult the value of @code{YaTeX-package-alist-default} as an example. +@end defvar @node Sample definitions, Hook variables, All customizable variables, Lisp variables @comment node-name, next, previous, up @@ -1919,7 +1899,18 @@ @comment node-name, next, previous, up @subsection How the add-in function works - There are two kinds of add-in. @dfn{Option add-in} returns the +There are three types of add-in. + +@enumerate +@item +Option add-in +@item +argument add-in +@item +enclosing add-in +@end enumerate + +@dfn{Option add-in} returns the La@TeX{}'s optional parameters such as optional strings after @code{\begin@{ENV@}}, optional strings between a section-type command and its first argument, and optional strings just after type @@ -1952,9 +1943,33 @@ command is being read. Thus the add-in should determine the job referring the value of its argument. + @dfn{enclosing add-in} is for modifying and/or checking the region that +will be enclosed by section-type commands via @kbd{[prefix] S}. An +enclosing add-in function will be called with two arguments, beginning of +the enclosed region and end of the region. Suppose you want to enclose +the existing text @code{(a+b)/c} by @code{\frac{}}. + +@display +a/c +| | +A B +@end display + +You do set-mark-command at point A and then move to point B. Typing +@kbd{[prefix] S} and input @code{frac} enclose the region like this; + +@display +\frac{a/c} +@end display + +Normally, the expression @code{a/c} is translated to +@code{\frac@{a@}@{c@}}. An enclosing add-in is useful for modifying +@code{/} to @code{@}@{}. + @menu * Defining option-add-in:: * Defining argument-add-in:: +* Defining enclosing-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 @@ -1984,7 +1999,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 enclosing-add-in, Defining option-add-in, How the add-in function works @comment node-name, next, previous, up @subsubsection Defining `argument add-in' @@ -2007,6 +2022,29 @@ Note that when the `argument add-in' function return `nil', normal argument reader will be called. +@node Defining enclosing-add-in, , Defining argument-add-in, How the add-in function works +@comment node-name, next, previous, up +@subsubsection Defining `enclosing add-in' + + This section describes how to define the add-in function for +text enclosed by @code{\frac@{@}}. + + When enclosing the text @code{5/3} by @code{\frac@{@}}, you might want to +replace @code{/} with @code{@}@{}. Enclosing function +@code{YaTeX::frac-region} is called with two arguments, beginning of +enclosed text and end of enclosed text. The function is expected to +replace @code{/} with @code{@}@{}. Here is an example expression. + +@lisp +(defun YaTeX::frac-region (beg end) + (catch 'done + (while (search-forward "/" end t) + (goto-char (match-beginning 0)) + (if (y-or-n-p "Replace this slash(/) with `}{'") + (throw 'done (replace-match "}{"))) + (goto-char (match-end 0))))) +@end lisp + @node How the function is called, Useful functions for creating add-in, How the add-in function works, Add-in functions @comment node-name, next, previous, up @subsection How the function is called @@ -2282,7 +2320,7 @@ as a result of using this software. However, any reports and suggestions are welcome as long as I feel interests in this software. My possible e-mail address is `yuuji@@yatex.org'. -(up to Dec.2000 at least) And there is mailing list for YaTeX. +(up to Sep.2003 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@@yatex.org. If you have some diff --git a/docs/yatexj.tex b/docs/yatexj.tex index cb31a42..6013a66 100644 --- a/docs/yatexj.tex +++ b/docs/yatexj.tex @@ -10,7 +10,7 @@ @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 -@c Last modified Fri Feb 2 10:03:49 2001 on firestorm +@c Last modified Fri Aug 29 01:55:00 2003 on firestorm @syncodeindex vr cp @end iftex @@ -20,7 +20,7 @@ @subtitle Yet Another tex-mode for emacs @title �w�쒹�x @subtitle // YaTeX // -@author @copyright{} 1991-2000 by HIROSE, Yuuji [yuuji@@yatex.org] +@author @copyright{} 1991-2003 by HIROSE, Yuuji [yuuji@@yatex.org] @end titlepage @node Top, Intro, (dir), (dir) @@ -42,6 +42,7 @@ * Includeonly:: ����� includeonly * What column:: �J�����ʒu�K�C�h * Intelligent newline:: ���܂������s +* Usepackage cheker:: ����usepackage * Changing mode of YaTeX:: �쒹���샂�[�h�ύX * Online help:: LaTeX�I�����C���w���v * Inclusion hierarchy browser:: �t�@�C�������K�w�\���̕\�� @@ -51,65 +52,6 @@ * Copying:: ��舵�� * Concept Index:: ���� - --- The Detailed Node Listing --- - -latex�R�}���h�N�� - -* Calling typesetter:: �^�C�v�Z�b�^�N�� -* Calling previewer:: �v�������[�A�N�� -* Print out:: �v�����g�A�E�g�p�R�}���h�̋N�� - -%#�L�@ - -* Changing typesetter:: �^�C�v�Z�b�g�p�R�}���h�̕ύX -* Splitting input files:: ���̓t�@�C������ -* Fix region for typesetting:: �̈�̌Œ� -* lpr format:: �v�����g�A�E�g�R�}���h�p�t�H�[�}�b�g -* Editing %# notation:: %#�L�@�̕ҏW - -�⊮���� - -* begin�^�⊮:: -* section�^�⊮:: -* large�^�⊮:: -* maketitle�^�⊮:: -* Arbitrary completion:: �����⊮ -* end�⊮:: -* Accent mark completion:: �A�N�Z���g�L���⊮ -* Image completion:: �����L���C���[�W�⊮ -* Greek letter completion:: �M���V�������⊮ - -section�^�⊮ - -* 2�ˆȏ�̈������Ƃ� section�^�R�}���h:: -* Enclose section-type command:: ����⊮ -* 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 -* Killing LaTeX command:: La@TeX{} �R�}���h�̍폜 - -�J�X�^�}�C�Y - -* Lisp variables:: lisp �ϐ� -* Add-in functions:: �t���֐�(�A�h�C���֐�) - -lisp �ϐ� - -* All customizable variables:: �J�X�^�}�C�Y�ϐ��ꗗ -* Sample definitions:: �J�X�^�}�C�Y�ϐ��ݒ�� -* Hook variables:: hook�ϐ� -* Hook file:: hook�p�t�@�C�� @end menu @node Intro, Terminology, Top, Top @@ -1566,7 +1508,7 @@ ���B�������ږ��Ƃ��ĕʂ̂��̂�\�����ė~�����ꍇ�́A�s����@code{%}�ɂ��ă_ �~�[�̍��ڕ��т�����Ă����Ɨǂ��ł��傤�B -@node Intelligent newline, Changing mode of YaTeX, What column, Top +@node Intelligent newline, Usepackage cheker, What column, Top @comment node-name, next, previous, up @chapter ���܂������s @cindex ���܂������s[���܂����������悤] @@ -1612,7 +1554,22 @@ ���ł��傤�B@file{yatexenv.el}���̊֐� @code{YaTeX-intelligent-newline-itemize} �̒�`�Ȃǂ��Q�l�ɂ��Ă��������B -@node Changing mode of YaTeX, Online help, Intelligent newline, Top +@node Usepackage cheker, Changing mode of YaTeX, Intelligent newline, Top +@comment node-name, next, previous, up +@chapter ����usepackage +@cindex ����usepackage[�����܂��] + + begin�^�Asection�^�Amaketitle�^�A�����ꂩ��LaTeX2e�}�N����⊮���͂���ƁA +���̃}�N���̗��p�ɊO���p�b�P�[�W��K�v�Ƃ���ꍇ�A���̃p�b�P�[�W�� +�{������ @code{\usepackage@{@}} ���Ă��邩�ǂ����𒲍����A�������Ă��Ȃ���� +�v���A���u���ɑΉ�����p�b�P�[�W�������ɂ��� @code{\usepackage} ���� +(�m�F���)�}�����܂��B + + ���������̋@�\���������߂ɂ́A�p�b�P�[�W���Ƃ��̒��Œ�`����Ă���}�N�� +�Q��alist�̌`���ŕϐ� @code{YaTeX-package-alist-private} �ɐݒ肵�Ă����K +�v������܂��B + +@node Changing mode of YaTeX, Online help, Usepackage cheker, Top @comment node-name, next, previous, up @chapter �쒹�̓��샂�[�h�؂�ւ� @cindex ���[�h�؂�ւ�[�����Ƃ��肩��] @@ -1841,7 +1798,9 @@ @end defvar @defvar YaTeX-kanji-code -�������쐬���鎞�̊����R�[�h 1=Shift JIS, 2=JIS, 3=EUC (2 (MS-DOS�ł�1)) +�������쐬���鎞�̊����R�[�h +nil=�����̃R�[�h�̂܂� 0=no-conversion1=Shift JIS, +2=JIS, 3=EUC (2 (MS-DOS�ł�1)) @end defvar @defvar tex-command @@ -2034,6 +1993,30 @@ (@code{(featurep 'hilit19)} @end defvar +@defvar YaTeX-singlecmd-suffix +�S�Ă�maketitle�^�R�}���h�̕⊮���͒���ɑ}�����镶����B +@code{"{}"} �Ȃǂ������߁B +@end defvar + +@defvar YaTeX-package-alist-private +LaTeX2e�̃p�b�P�[�W���Ƃ��̒��Ɋ܂܂��}�N���̃��X�g�B +�K�؂ɐݒ肵�Ă����Ɩ{�����͎��Ƀ}�N����⊮���͂���� +���̃}�N���ɕK�v�ȃp�b�P�[�W�� usepackage ���邩�����I�Ɍ������Ă����B +���Ă��Ȃ���� \usepackage �������lj����邱�Ƃ��ł���B +���X�g�� +@lisp + '((�p�b�P�[�W��1 + (�⊮�^�C�v �}�N���̃��X�g�c�c) + (�⊮�^�C�v �}�N���̃��X�g�c�c)) + (�p�b�P�[�W��2 + (�⊮�^�C�v �}�N���̃��X�g�c�c) + (�⊮�^�C�v �}�N���̃��X�g�c�c))�c�c�c) +@end lisp +�Ƃ����`���ɂ���B�⊮�^�C�v�� @code{env, section, maketitle} �̂ǂꂩ�B +��̗�͕ϐ� @code{YaTeX-package-alist-default} +�̒l�Q�ƁB +@end defvar + @node Sample definitions, Hook variables, All customizable variables, Lisp variables @comment node-name, next, previous, up @subsection �J�X�^�}�C�Y�ϐ��ݒ�� @@ -2125,7 +2108,7 @@ �������ƁA��҂͊��ŃT�|�[�g�ɗ�ނ��Ƃł��傤�B ���A��]�A�o�O�񍐁A���z���͊��}�������܂��B -�A���� yuuji@@yatex.org �܂�(2000�N12������)�B +�A���� yuuji@@yatex.org �܂�(2003�N9������)�B �p���I�Ɏg�p���Ă���������̓��C�����O���X�g�ufj�쒹�̉�v�� ����������Ă��������B�������@�ɂ‚��Ă͖{�p�b�P�[�W�� @file{docs/qanda} �t�@�C���́u���̑��v�̏͂��䗗���������B diff --git a/help/YATEXHLP.eng b/help/YATEXHLP.eng index 865111d..a099cab 100644 --- a/help/YATEXHLP.eng +++ b/help/YATEXHLP.eng @@ -1299,6 +1299,166 @@ Begin a new page and create the parbox-ed BOX whose width is \textwidth. This is useful to make a page-acrossing title in a twocolumn page. +breakbox +\begin{breakbox} ... \end{breakbox} +Make a surrounding frame extended across pages. +Useful for cite a long program list. +Requires `\usepackage{eclbkbox}' + +verbfile +\verbfile{FILE} +Include a FILE in verbatim format. +Requires `\usepackage{misc}' +See also \listing + +listing +\listing{FILE} +Include a FILE in verbatim format with line number. +Requires `\usepackage{misc}' +See also \verbfile + +ascmac +\usepackage{ascmac} +The `ascmac' package provides +* \boxnote environment notebook-like box +* \screen environment corner-rounded box suitable for screen output +* \itembox environment itemizing box +* \shadebox environment shaded box +* \keytop macro keytop +* \yen Yen mark +* \return-key +* \mask, \maskbox + +boxnote +\begin{boxnote} ... \end{boxnote} +Enclose with notebook-like square. +Defined in ascmac.sty. + + + +screen +\begin{screen} ... \end{screen} +Enclose with corner-rounded square which stands for screen output. +Requires `\usepackage{ascmac}' + + + +itembox +\begin{itembox}{ITEMSTRING} ... \end{itembox} +Enclose box with ITEMSTRING header. +Requires `\usepackage{ascmac}' + + +shadebox +\begin{shadebox} ... \end{shadebox} +Enclose shaded box. +Requires `\usepackage{ascmac}' + + +keytop +\keytop{KEY} +Output a keytop designed character. +Requires `\usepackage{ascmac}' + + +mask +\mask{STRING}{MASKTYPE} +Make a masked STRING. MASKTYPE is one of character A through K. + +eg.) \mask{This is a pen!}{C} + +Mask types are viewed at +http://www.yatex.org/help/ascmac-mask.jpg + +Defined in `\usepackage{ascmac}' + + + +maskbox +\maskbox{WIDTH}{HEIGHT}{MASKTYPE}{POS}{STRING} +Make a masked box of WIDTH x HEIGHT which contains STRING located in POS. +Masking type MASKTYPE is one of character A through K. + +eg.) \maskbox{5cm}{2.5em}{G}{c}{Year!} + +Mask types are viewed at +http://www.yatex.org/help/ascmac-mask.jpg + +Requires `\usepackage{ascmac}' + + +alltt +\begin{alltt} ... \end{alltt} +An environment like verbatim except in which TeX macro can be used. + +comment +\begin{comment} ... \end{comment} +Comment out enclosed environment. +But if \includeversion{comment} appears, enclosed part activated. +Putting \excludeversion{ENV} defines new environment ENV which +works equivalently to comment environment. + +Requires `\usepackage{version}' + +bou +\bou{STRING} +Put the emphasizing dot on each characters in STRING. + +Requires `\usepackage{plext}' + +url +\url{URL_STRING} +Put URL string with reasonable folding. + +Requires `\usepackage{url}' + +longtable +\begin{longtable}{POSSTRING} ... \end{longtable} +Same as table, but can be spreaded across pages. + +Requires `\usepackage{longtable}' + +fancybox +\usepackage{fancybox} +Provides some fancy boxes. +* \shadowbox{} +* \ovalbox{} +* \doublebox{} + +shadowbox +\shadowbox{STRING} +Surround a STRING by shadow box. + +Require `\usepackage{fancybox}` + + + +ovalbox +\ovalbox{STRING} +Surround a STRING by oval box + +Require `\usepackage{fancybox}` + + + +Ovalbox +\Ovalbox{STRING} +Surround a STRING by thick oval box. + +Require `\usepackage{fancybox}` + + + +doublebox +\doublebox{STRING} +Surround a STRING by double frame. + +Require `\usepackage{fancybox}` + + + + + YaTeX (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) The mode you are probably using now. diff --git a/help/YATEXHLP.jp b/help/YATEXHLP.jp index 02cffcb..6aaf7de 100644 --- a/help/YATEXHLP.jp +++ b/help/YATEXHLP.jp @@ -1,7 +1,11 @@ %%% %%% �쒹-LaTeX�w���v�t�@�C��(c)HIROSE Yuuji [yuuji@yatex.org] -%%% �@�B�I�ɕϊ����Ė쒹�ȊO�̃f�o�C�X�ŗ��p���邱�Ƃ����‚��܂��B -%%% ���̍ۂɃR�s�[���C�g�\���Ɗ܂܂�Ă��鍀�ڂ��폜���Ȃ��ł��������B +%%% ���̃w���v�t�@�C����쒹�ȊO�̃f�o�C�X�ŗ��p���邱�Ƃ����‚��܂��B +%%% ���ڂ̏C����lj��͎��R�ɍs�Ȃ��č\���܂��񂪁A���̂��Ƃ� +%%% �m�点�Ē�����Ƃ��肪�����ł��B +%%% ���̃f�o�C�X�ŗ��p����ꍇ�ł��擪�̃R�s�[���C�g�\���ƁA�����Ɋ܂܂�� +%%% LaiTeX, laitex, YaTeX, yatex �̊e���ڂ�(���̃w���v�t�@�C���ɂ‚��Ă� +%%% ���쌠�\�L�Ǝӎ����܂܂�Ă���̂�)�폜���Ȃ��ł��������B %%% textfloatsep @@ -1234,6 +1238,169 @@ �V�����y�[�W���J�n���A\textwidth��BOX��parbox�ō쐬����B ��i�g�݃y�[�W�łԂ������^�C�g�����쐬���鎞�ɗp����Ƃ悢�B +breakbox +\begin{breakbox} ... \end{breakbox} +�y�[�W���܂�����g�ň͂� +�v `\usepackage{eclbkbox}' + +verbfile +\verbfile{FILE} +FILE �� verbatim �‹��I�Ɏ�荞�ށB +�v `\usepackage{misc}' +cf) \listing + +listing +\listing{FILE} +FILE �� verbatim �‹��I�Ɏ�荞��(�s�ԍ��‚�)�B +�v `\usepackage{misc}' +cf) \verbfile + +ascmac +\usepackage{ascmac} +`ascmac' �p�b�P�[�W�Œ�`����Ă����\�I�ȃ}�N�� +* \boxnote �‹� ���ʕ��̃{�b�N�X +* \screen �‹� �X�N���[���o�͕��̘g +* \itembox �‹� �ڗ��˜g +* \shadebox �‹� �e�‚��{�b�N�X +* \keytop{} �L�[�g�b�v +* \yen �~�L�� +* \return-key ���^�[���L�[ +* \mask, \maskbox �Ԋ|������ + +boxnote +\begin{boxnote} ... \end{boxnote} +���ʕ��̘g�ň͂� +�v ascmac.sty + + + +screen +\begin{screen} ... \end{screen} +�X�N���[���o�͕��̘g�ň͂� +�v `\usepackage{ascmac}' + + + +itembox +\begin{itembox}{ITEMSTRING} ... \end{itembox} +���o��(ITEMSTRING)�‚��̘g�ň͂� +�v `\usepackage{ascmac}' + + +shadebox +\begin{shadebox} ... \end{shadebox} +�s�������ς��̉e�‚��̘g�ň͂� +�v `\usepackage{ascmac}' + + +keytop +\keytop{KEY} +�L�[�g�b�v���� KEY ���o�� +�v `\usepackage{ascmac}' + + +mask +\mask{������}{�Ԋ|���^�C�v} +�u������v���w�肵���Ԋ|���^�C�v�ő�������B +�Ԋ|���^�C�v�� A�`K �̂ǂꂩ�B + +��) \mask{��H�������o!}{C} + +�ǂ�Ȍ��f�����͈ȉ�������B +http://www.yatex.org/help/ascmac-mask.jpg + +�v `\usepackage{ascmac}' + + + +maskbox +\maskbox{WIDTH}{HEIGHT}{MASKTYPE}{POS}{STRING} +�w�肵����(WIDTH)�ƍ���(HEIGHT)�Ŏw�肵���Ԋ|���^�C�v(MASKTYPE) +�̃{�b�N�X�����A���̒��̎w�肵���ʒu(POS)��STRING��z�u����B +POS�� l c r�̂ǂꂩ�ŁA���ꂼ��A���񂹁A�����񂹁A�E�񂹁B + +�Ԋ|���^�C�v�� A�`K �̂ǂꂩ�B + +��) \maskbox{0.7\columnwidth}{6em}{A}{c}{\shortstack{�����\\�厖����!}} + +�}�X�N�^�C�vA�`K���ǂ�Ȍ��f�����͈ȉ�������B +http://www.yatex.org/help/ascmac-mask.jpg + +�v `\usepackage{ascmac}' + + +alltt +\begin{alltt} ... \end{alltt} +TeX�}�N���̎g����verbitam�‹��B + +comment +\begin{comment} ... \end{comment} +�‹����̑S�Ă��o�͂��Ȃ��悤�ɂ���B +�������A \includeversion{comment} �Ə����Ɗ‹����o�͂���悤�ɂȂ�B +�܂� \excludeversion{ENV} �Ƃ���ƐV�����‹� ENV �� +comment �‹� �Ɠ����@�\�����‚��̂Ƃ��Ďg����悤�ɂȂ�B + +�v `\usepackage{version}' + +bou +\bou{STRING} +�������‹��� STRING �ɖT�_��t����B + +�v `\usepackage{plext}' + +url +\url{URL_STRING} +overfull��������URL���撣���Đ܂�Ԃ��Ă����B + +�v `\usepackage{url}' + +longtable +\begin{longtable}{POSSTRING} ... \end{longtable} +�y�[�W���܂����\������B + +table�‹����Q�Ƃ���B + +fancybox +\usepackage{fancybox} +�e��̌��h���̗ǂ��{�b�N�X����`����Ă���B + +* \shadowbox{} +* \ovalbox{} +* \doublebox{} + +shadowbox +\shadowbox{STRING} +STRING�����̕��ʼne�‚��{�b�N�X�ň͂ށB + +�v `\usepackage{fancybox}` + + + +ovalbox +\ovalbox{STRING} +�p�̊ۂ��l�p�g�� STRING ���͂ށB + +�v `\usepackage{fancybox}` + + + +Ovalbox +\Ovalbox{STRING} +�p�̊ۂ��l�p�g�� STRING ���͂ށBovalbox�����������B + +�v `\usepackage{fancybox}` + + + +doublebox +\doublebox{STRING} +��d�l�p�g�� STRING ���͂ށB + +�v `\usepackage{fancybox}` + + + + LaiTeX a Little Assistant Interface for TeX on Vz �����炭���Ȃ����� Vz ��Ŏg���Ă��邱�̃��[�h�B @@ -1320,8 +1487,8 @@ ����܂����B���N��\�Z�΁B�ނɂ́A�쒹�����łȂ�������|�������� ���̃\�t�g�E�F�A����铮�@�A�Z���X���ӂ��R�����g�Ȃǂ𒸂��܂� ���B���݂̖쒹���F�l�Ɏx�������悤�Ɍ��₩�Ɉ�����͔̂ނ̂��� - ���ƌ����Ă��ߌ��ł͂���܂���B�쒹/����/����/�򒹂��g���Ƃ��� - �ނ̈��炩�Ȗ�������Ƌ��ɋF���ĉ������B + ���ƌ����Ă��ߌ��ł͂���܂���B�쒹/����/����/��/�Ԓ����g���� + ���ɔނ̈��炩�Ȗ�������Ƌ��ɋF���ĉ������B ��˂�������(asciinet) �肢�t�������ł��B diff --git a/yahtml.el b/yahtml.el index 308bb2a..a72485e 100644 --- a/yahtml.el +++ b/yahtml.el @@ -1,6 +1,6 @@ ;;; -*- Emacs-Lisp -*- -;;; (c ) 1994-2002 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Thu Nov 21 17:55:40 2002 on firestorm +;;; (c) 1994-2003 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Mon Nov 17 18:28:50 2003 on firestorm ;;; $Id$ (defconst yahtml-revision-number "1.70" @@ -202,9 +202,7 @@ (defvar yahtml-environment-indent 1 "*Indentation depth of HTML's listing environment") -(defvar YaTeX-japan (or (boundp 'NEMACS) (boundp 'MULE) YaTeX-emacs-20) - "Whether yatex mode is running on Japanese environment or not.") - +;; YaTeX-japan is defined in yatexlib.el (defvar yahtml-lint-program (if YaTeX-japan "jweblint" "weblint") "*Program name to lint HTML file") (defvar yahtml-hate-too-deep-indentation nil @@ -345,6 +343,9 @@ (yahtml-define-begend-key "ba" "a" map) (yahtml-define-begend-key "bf" "form" map) (yahtml-define-begend-key "bs" "select" map) + (yahtml-define-begend-key "bv" "div" map) + (yahtml-define-begend-key "bS" "div" map) + (yahtml-define-begend-key "bp" "pre" map) (YaTeX-define-key "b " 'yahtml-insert-begend map) (YaTeX-define-key "B " 'yahtml-insert-begend-region map) ) @@ -571,6 +572,7 @@ (set (make-local-variable 'yahtml-mode-old-mode) old-mm))) (let ((coding (or (yahtml-dir-default-charset) yahtml-kanji-code))) (cond + ((null coding) nil) ((and YaTeX-emacs-20 (boundp 'buffer-file-coding-system)) (setq buffer-file-coding-system (or (and (fboundp 'set-auto-coding) buffer-file-name diff --git a/yatex.el b/yatex.el index 7f17cb7..32a744d 100644 --- a/yatex.el +++ b/yatex.el @@ -1,30 +1,15 @@ ;;; -*- Emacs-Lisp -*- ;;; Yet Another tex-mode for emacs - //�쒹// -;;; yatex.el rev. 1.71 -;;; (c )1991-2003 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu May 1 22:36:40 2003 on firestorm +;;; yatex.el rev. 1.72 +;;; (c)1991-2003 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Thu Dec 25 13:10:42 2003 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; 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 -;; Software Foundation Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - (require 'comment) (require 'yatexlib) -(defconst YaTeX-revision-number "1.71" +(defconst YaTeX-revision-number "1.72" "Revision number of running yatex.el") ;---------- Local variables ---------- @@ -276,6 +261,7 @@ ("widetilde") ("widehat") ("overline") ("overrightarrow") ;; section types in mathmode ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") + ) (if YaTeX-use-LaTeX2e '(("documentclass") ("usepackage") @@ -287,6 +273,13 @@ ("rotatebox" 2) ("resizebox" 2) ("reflectbox") ("colorbox" 2) ("fcolorbox" 3) ("textcolor" 2) ("color") ("includegraphics") ("includegraphics*") + ("bou") ;defined in plext + ("url") ;defined in url + ("shadowbox") ("doublebox") ("ovalbox") ("Ovalbox") + ("fancyoval") ;defined in fancybox + ("keytop") ("mask" 2) ("maskbox" 5) ;defined in ascmac + ("bm") ;deined in bm + ("verbfile") ("listing") ;defined in misc ))) "Default completion table for section-type completion.") @@ -295,14 +288,21 @@ ; Set tex-environment possible completion (defvar env-table - '(("quote") ("quotation") ("center") ("verse") ("document") - ("verbatim") ("itemize") ("enumerate") ("description") - ("list") ("tabular") ("tabular*") ("table") ("tabbing") ("titlepage") - ("sloppypar") ("picture") ("displaymath") - ("eqnarray") ("figure") ("equation") ("abstract") ("array") - ("thebibliography") ("theindex") ("flushleft") ("flushright") - ("minipage") - ) + (append + '(("quote") ("quotation") ("center") ("verse") ("document") + ("verbatim") ("itemize") ("enumerate") ("description") + ("list") ("tabular") ("tabular*") ("table") ("tabbing") ("titlepage") + ("sloppypar") ("picture") ("displaymath") + ("eqnarray") ("figure") ("equation") ("abstract") ("array") + ("thebibliography") ("theindex") ("flushleft") ("flushright") + ("minipage") + ) + (if YaTeX-use-LaTeX2e + '(("comment") ;defined in version + ("longtable") ;defined in longtable + ("screen") ("boxnote") ("shadebox") ("itembox") ;in ascmac + ("alltt") ;defined in alltt + ("breakbox")))) ;defined in eclbkbox "Default completion table for begin-type completion.") (defvar user-env-table nil) @@ -352,7 +352,9 @@ ("varpi") ("rho") ("varrho") ("sigma") ("varsigma") ("tau") ("upsilon") ("phi") ("varphi") ("chi") ("psi") ("omega") ("Gamma") ("Delta") ("Theta") ("Lambda")("Xi") ("Pi") - ("Sigma") ("Upsilon") ("Phi") ("Psi") ("Omega")))) + ("Sigma") ("Upsilon") ("Phi") ("Psi") ("Omega"))) + (if YaTeX-use-LaTeX2e + '(("return") ("Return") ("yen")))) ;defined in ascmac "Default completion table for maketitle-type completion.") (defvar user-singlecmd-table nil) @@ -506,7 +508,12 @@ (defvar YaTeX-fontsize-name "large" "*Initial fontsize completion") (defvar YaTeX-single-command "maketitle" "*Initial LaTeX single command") (defvar YaTeX-kanji-code (if YaTeX-dos 1 2) - "*File kanji code used by Japanese TeX.") + "*File kanji code used by Japanese TeX. +nil: Do not care (Preserve coding-system) +0: no-converion (mule) +1: Shift JIS +2: JIS +3: EUC") (defvar YaTeX-coding-system nil "File coding system used by Japanese TeX.") (cond @@ -515,9 +522,7 @@ (cdr (assoc YaTeX-kanji-code YaTeX-kanji-code-alist)))) ((boundp 'MULE) (setq YaTeX-coding-system - (symbol-value (cdr (assoc YaTeX-kanji-code YaTeX-kanji-code-alist))))) - ((boundp 'NEMACS) - (setq YaTeX-latex-message-code latex-message-kanji-code))) + (symbol-value (cdr (assoc YaTeX-kanji-code YaTeX-kanji-code-alist)))))) (defvar YaTeX-mode-syntax-table nil "*Syntax table for yatex-mode") @@ -610,7 +615,9 @@ YaTeX-math-mode indent-line-function comment-line-break-function comment-start comment-start-skip )) - (cond ((boundp 'MULE) + (cond ((null YaTeX-kanji-code) + nil) + ((boundp 'MULE) (set-file-coding-system YaTeX-coding-system)) ((and YaTeX-emacs-20 (boundp 'buffer-file-coding-system)) (setq buffer-file-coding-system @@ -729,6 +736,8 @@ (autoload 'YaTeX-display-hierarchy-directly "yatexhie" "Same as YaTeX-display-hierarchy. Call from mouse." t) +;;autoload from yatexpkg.el +(autoload 'YaTeX-package-auto-usepackage "yatexpkg" "Auto \\usepackage" t) ;;; ;; YaTeX-mode functions @@ -780,6 +789,7 @@ (goto-char beg2) (YaTeX-intelligent-newline nil) (YaTeX-indent-line)) + (YaTeX-package-auto-usepackage env 'env) (if YaTeX-current-position-register (point-to-register YaTeX-current-position-register)))) @@ -813,7 +823,9 @@ (cond ((save-excursion (not (search-backward YaTeX-ec nil t))) (if YaTeX-use-LaTeX2e "documentclass" "documentstyle")) - ((progn (forward-char -1) (looking-at "�\\\|�}\\|��")) + ((progn + (if (= (char-after (1- (point))) ?~) (forward-char -1)) + (forward-char -1) (looking-at "�\\\|�}\\|��")) "ref") ((and (looking-at "[a-z \t]") (progn (skip-chars-backward "a-z \t") @@ -886,12 +898,15 @@ (enable-recursive-minibuffers t));;let (setq YaTeX-section-name section) (if beg - (let ((e (make-marker))) + (let*((e (make-marker)) + (ar2 (intern-soft (concat "YaTeX::" section "-region"))) + (arp (and ar2 (fboundp ar2)))) (goto-char end) (insert "}") (set-marker e (point)) (goto-char beg) (insert YaTeX-ec YaTeX-section-name "{") + (if arp (funcall ar2 (point) e)) (goto-char e) (set-marker e nil)) (use-global-map YaTeX-recursive-map) @@ -918,7 +933,8 @@ (if (string= (buffer-substring (- (point) 2) (point)) "{}") (forward-char -1)) (while (string= (buffer-substring (- (point) 3) (1- (point))) "{}") - (forward-char -2))) + (forward-char -2)) + (YaTeX-package-auto-usepackage section 'section)) (if (<= (minibuffer-depth) 0) (use-global-map global-map)) (insert ""))) ;insert dummy string to fontify(Emacs20) @@ -967,7 +983,8 @@ (if YaTeX-current-position-register (point-to-register YaTeX-current-position-register)) (save-excursion - (insert (YaTeX-addin YaTeX-fontsize-name)))))) + (insert (YaTeX-addin YaTeX-fontsize-name))) + (YaTeX-package-auto-usepackage YaTeX-fontsize-name 'large)))) (defun YaTeX-make-fontsize-region () "Call function:YaTeX-make-fontsize with ARG to specify region mode." @@ -1003,6 +1020,7 @@ (goto-char p) (forward-char -2) (if (looking-at "\\[\\]") (forward-char 1) (goto-char q))) + (YaTeX-package-auto-usepackage YaTeX-single-command 'maketitle) (if YaTeX-current-position-register (point-to-register YaTeX-current-position-register))) @@ -2019,26 +2037,42 @@ (defun YaTeX-kill-paren (kill-contents) "Kill parentheses leaving its contents. But kill its contents if the argument KILL-CONTENTS is non-nil." - (save-excursion - (let (p) - (if (looking-at "\\s(\\|\\(\\s)\\)") - (progn - (if (match-beginning 1) - (up-list -1)) - (setq p (point)) - (forward-list 1) - (if kill-contents (delete-region p (point)) - (backward-delete-char 1) - (goto-char p) - (if (looking-at - (concat "{" YaTeX-ec-regexp - YaTeX-command-token-regexp "+" - "\\s +")) - (delete-region - (point) - (progn (re-search-forward "\\s +" nil t) (point))) - (delete-char 1))) - t))))) + (interactive "P") + (let (p bsl (backslash-syntax (char-to-string (char-syntax ?\\))) + (md (match-data))) + (unwind-protect + (save-excursion + (modify-syntax-entry ?\\ " ") + (if (looking-at "\\s(\\|\\(\\s)\\)") + (progn + (if (match-beginning 1) + (up-list -1)) + (if (and (> (point) (point-min)) + (= (char-after (1- (point))) ?\\ )) + (setq p (1- (point)) bsl t) + (setq p (point))) + (forward-list 1) + ;(YaTeX-goto-open-paren t) + (if kill-contents (delete-region p (point)) + (backward-delete-char 1) + (cond + ((save-excursion + (forward-char -2) + (looking-at (concat YaTeX-ec-regexp "/"))) + (backward-delete-char 2)) + ((= (char-after (1- (point))) ?\\) + (backward-delete-char 1))) + (goto-char p) + (if (looking-at + (concat "{" YaTeX-ec-regexp + YaTeX-command-token-regexp "+" + "\\s +")) + (delete-region (point) (match-end 0)) + (delete-char 1) + (if bsl (delete-char 1)))) + t))) + (modify-syntax-entry ?\\ backslash-syntax) + (store-match-data md)))) (defvar YaTeX-read-environment-history nil "Holds history of environments.") (put 'YaTeX-read-environment-history 'no-default t) diff --git a/yatex.new b/yatex.new index 1441d82..74cd2d6 100644 --- a/yatex.new +++ b/yatex.new @@ -1,6 +1,14 @@ What's new in YaTeX/yahtml �쒹/yahtml - �e�o�[�W�����̕ύX�_�ɂ‚��� +1.72 === yatex === + YaTeX-kanji-code �� nil �Ȃ� coding-system �Ɋ��m���Ȃ� + �⊮�����}�N����LaTeX2e�̓����package�Ɉˑ����Ă���ꍇ + ����package�𔼎����� \usepackage ����(yatexpkg.el�V��) + {} �̖������C�^���b�N�␳ \/ �Ȃ炻������� + === yahtml == + yahtml-kanji-code �� nil �Ȃ� coding-system �Ɋ��m���Ȃ� + 1.71 === yatex === fill-prefix ���w�肵�Ă���ꍇ�AEmacs21�� \item �� auto-fill �� \item �̐[���ɂ�����炸 fill-prefix �ɂȂ��Ă��܂��̂���� diff --git a/yatex19.el b/yatex19.el index 09afed0..548c3ca 100644 --- a/yatex19.el +++ b/yatex19.el @@ -1,7 +1,7 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX facilities for Emacs 19 -;;; (c )1994-2003 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Fri Feb 21 01:35:19 2003 on firestorm +;;; (c)1994-2003 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:07:46 2003 on firestorm ;;; $Id$ ;(require 'yatex) diff --git a/yatexadd.el b/yatexadd.el index 804c0c9..ac4a4d4 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX add-in functions. -;;; yatexadd.el rev.15 -;;; (c )1991-2003 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Mon Mar 17 16:46:01 2003 on serow +;;; yatexadd.el rev.17 +;;; (c)1991-2003 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Thu Nov 27 11:11:30 2003 on firestorm ;;; $Id$ ;;; @@ -60,26 +60,28 @@ (concat (YaTeX:read-position "tb") "{" (read-string "Column format: ") "}")) -(defun YaTeX:read-oneof (oneof) +(defun YaTeX:read-oneof (oneof &optional quick allow-dup) (let ((pos "") loc (guide "")) (and (boundp 'name) name (setq guide (format "%s " name))) - (while (not (string-match - (setq loc (read-key-sequence - (format "%s position (`%s') [%s]: " - 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) - (if (not (string-match loc pos)) - (setq pos (concat pos loc)))) - ((and (string-match loc "\C-h\C-?") (> (length pos) 0)) - (setq pos (substring pos 0 (1- (length pos))))) - (t - (ding) - (message "Please input one of `%s'." oneof) - (sit-for 3)))) + (catch 'quick + (while (not (string-match + (setq loc (read-key-sequence + (format "%s position (`%s') [%s]: " + 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) + (if (or allow-dup (not (string-match loc pos))) + (setq pos (concat pos loc))) + (if quick (throw 'quick t))) + ((and (string-match loc "\C-h\C-?") (> (length pos) 0)) + (setq pos (substring pos 0 (1- (length pos))))) + (t + (ding) + (message "Please input one of `%s'." oneof) + (sit-for 3))))) (message "") pos)) @@ -218,7 +220,6 @@ (fset 'YaTeX:right 'YaTeX:left) - (defun YaTeX:read-coordinates (&optional mes varX varY) (concat "(" @@ -227,6 +228,9 @@ (read-string (format "%s %s: " (or mes "Dimension") (or varY "Y"))) ")")) +(defun YaTeX:itembox () + (concat "{" (read-string "Item heading string: ") "}")) + ;;; ;;Sample functions for maketitle-type command. ;;; @@ -1132,12 +1136,7 @@ ((equal 1 argp) (read-string "Number of columns: ")) ((equal 2 argp) - (let (c) - (while (not (string-match - (progn (message "Format(one of l,r,c): ") - (setq c (char-to-string (read-char)))) - "lrc"))) - c)) + (YaTeX:read-oneof "|lrc" nil t)) ((equal 3 argp) (read-string "Item: ")))) @@ -1373,6 +1372,59 @@ (setq YaTeX-section-name "label") nil) +(defvar YaTeX::usepackage-alist-default + '(("version") ("plext") ("url") ("fancybox") ("pifont") ("longtable") + ("ascmac") ("bm") ("graphics") ("graphicx") ("alltt") ("misc") ("eclbkbox") + ("amsmath") ("amssymb") ("xymtex") ("chemist") + ("a4j") ("array") ("epsf") ("color") ("epsfig") ("floatfig") + ("landscape") ("path") ("supertabular") ("twocolumn")) + "Default completion table for arguments of \usepackage") + +(defvar YaTeX::usepackage-alist-private nil + "*Private completion list of the argument for usepackage") + +(defvar YaTeX::usepackage-alist-local nil + "Directory local completion list of the argument for usepackage") + +(defun YaTeX::usepackage (&optional argp) + (cond + ((equal argp 1) + (setq YaTeX-env-name "document") + (YaTeX-cplread-with-learning + "Use package: " + 'YaTeX::usepackage-alist-default + 'YaTeX::usepackage-alist-private + 'YaTeX::usepackage-alist-local)))) + +(defun YaTeX::mask (argp) + (cond + ((equal argp 1) + (read-string "String: ")) + ((equal argp 2) + (let (c) + (while (not (memq c '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K))) + (message "Mask type(A..K): ") + (setq c (upcase (read-char)))) + (format "%c" c))))) + +(defun YaTeX::maskbox (argp) + (cond + ((equal argp 1) + (read-string "Width: ")) + ((equal argp 2) + (read-string "Height: ")) + ((equal argp 3) + (let (c) + (while (not (memq c '(?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K))) + (message "Mask type(A..K): ") + (setq c (upcase (read-char)))) + (format "%c" c))) + ((equal argp 4) + (YaTeX:read-oneof "lcr" 'quick)) + ((equal argp 5) + (read-string "String: ")) +)) + ;;; -------------------- math-mode stuff -------------------- (defun YaTeX::tilde (&optional pos) "For accent macros in mathmode" @@ -1418,6 +1470,44 @@ (fset 'YaTeX::overline 'YaTeX::widetilde) (fset 'YaTeX::overrightarrow 'YaTeX::widetilde) +; +; for \frac{}{} region +(defun YaTeX::frac-region (beg end) + (if (catch 'done + (while (re-search-forward "\\s *\\(\\\\over\\|/\\)\\s *" end t) + (goto-char (match-beginning 0)) + (if (y-or-n-p + (format "Replace this `%s' with `}{'" (YaTeX-match-string 0))) + (throw 'done t)) + (goto-char (match-end 0)))) + (let (p (b0 (match-beginning 0)) e0) + (replace-match "}{") + (setq e0 (point)) + (save-restriction + (narrow-to-region beg end) + (goto-char e0) + (skip-chars-forward " \t") + (setq p (point)) + (YaTeX-goto-corresponding-paren) + (forward-char 1) + (skip-chars-forward " \t\r\n") + (if (= end (1+ (point))) + (progn + (goto-char p) + (if (looking-at "\\\\") (forward-char 1)) + (YaTeX-kill-paren nil))) + (goto-char beg) + (skip-chars-forward " \t") + (setq p (point)) + (YaTeX-goto-corresponding-paren) + (forward-char 1) + (skip-chars-forward " \t\r\n") + (if (>= (point) b0) + (progn + (goto-char p) + (if (looking-at "\\\\") (forward-char 1)) + (YaTeX-kill-paren nil)))))) + (message "")) ;;; ;; Add-in functions for large-type command. diff --git a/yatexenv.el b/yatexenv.el index dc6f08a..7f57bc5 100644 --- a/yatexenv.el +++ b/yatexenv.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX environment-specific functions. ;;; yatexenv.el -;;; (c ) 1994-2003 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Mar 30 19:25:47 2003 on firestorm +;;; (c) 1994-2003 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:09:30 2003 on firestorm ;;; $Id$ ;;; diff --git a/yatexgen.el b/yatexgen.el index fced95c..ac069e4 100644 --- a/yatexgen.el +++ b/yatexgen.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX add-in function generator. ;;; yatexgen.el rev.5 -;;; (c )1991-1995,1999,2000 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Mon Dec 25 19:17:30 2000 on firestorm +;;; (c)1991-1995,1999,2000 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:09:37 2003 on firestorm ;;; $Id$ (require 'yatex) diff --git a/yatexhie.el b/yatexhie.el index b030e2a..5a0aa2c 100644 --- a/yatexhie.el +++ b/yatexhie.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX hierarchy browser. ;;; yatexhie.el -;;; (c )1995 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Wed Dec 1 23:41:01 1999 on firestorm +;;; (c)1995 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:09:49 2003 on firestorm ;;; $Id$ ;; ----- Customizable variables ----- diff --git a/yatexhlp.el b/yatexhlp.el index 0890733..90ace14 100644 --- a/yatexhlp.el +++ b/yatexhlp.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX helper with LaTeX commands and macros. ;;; yatexhlp.el -;;; (c )1994,1998 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu Aug 26 18:15:39 1999 on firestorm +;;; (c)1994,1998 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:09:58 2003 on firestorm ;;; $Id$ (let ((help-file (concat "YATEXHLP." diff --git a/yatexlib.el b/yatexlib.el index bfdd070..b436f1b 100644 --- a/yatexlib.el +++ b/yatexlib.el @@ -1,12 +1,13 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX and yahtml common libraries, general functions and definitions ;;; yatexlib.el -;;; (c )1994-2002 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed Oct 2 23:35:33 2002 on firestorm +;;; (c)1994-2002 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Tue Aug 19 22:20:40 2003 on firestorm ;;; $Id$ ;; General variables (defvar YaTeX-dos (memq system-type '(ms-dos windows-nt OS/2))) +(defvar YaTeX-macos (memq system-type '(darwin))) (defvar YaTeX-emacs-19 (>= (string-to-int emacs-version) 19)) (defvar YaTeX-emacs-20 (>= (string-to-int emacs-version) 20)) (defvar YaTeX-emacs-21 (>= (string-to-int emacs-version) 21)) @@ -21,7 +22,11 @@ window-system) ; falls down lazy check.. "Current display's capability of expressing colors.") -(defvar YaTeX-japan (or (boundp 'NEMACS) (boundp 'MULE) YaTeX-emacs-20) +(defvar YaTeX-japan + (or (boundp 'NEMACS) + (boundp 'MULE) + (and (boundp 'current-language-environment) + (string-match "[Jj]apanese" current-language-environment))) "Whether yatex mode is running on Japanese environment or not.") ;; autoload from yahtml.el @@ -33,14 +38,17 @@ (list '(0 . *noconv*) (cons 1 - (if YaTeX-dos (if (boundp '*sjis-dos*) *sjis-dos* *sjis*dos) - *sjis*)) + (cond + (YaTeX-dos (if (boundp '*sjis-dos*) *sjis-dos* *sjis*dos)) + (YaTeX-macos (if (boundp '*sjis-mac*) *sjis-mac* *sjis*mac)) + (t *sjis*))) '(2 . *junet*) '(3 . *euc-japan*))) (YaTeX-emacs-20 ;;(cdr-safe(assq 'coding-system (assoc "Japanese" language-info-alist))) (list '(0 . no-conversion) (cons 1 (cond (YaTeX-dos 'shift_jis-dos) + (YaTeX-macos 'shift_jis-mac) ((member 'shift_jis (coding-system-list)) 'shift_jis-unix) (t 'sjis))) '(2 . iso-2022-jp-unix) diff --git a/yatexm-o.el b/yatexm-o.el index d90ce03..368ecac 100644 --- a/yatexm-o.el +++ b/yatexm-o.el @@ -1,7 +1,7 @@ ;;; -*- Emacs-Lisp -*- ;;; Sample startup file to invoke yatex-mode with outline-minor mode. -;;; (c )1993 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Thu Aug 26 18:16:00 1999 on firestorm +;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:10:15 2003 on firestorm ;;; ;; outline-minor-mode(�g�p���Ȃ��ꍇ�͕s�v�ł�) diff --git a/yatexpkg.el b/yatexpkg.el index 3625656..7a93c04 100644 --- a/yatexpkg.el +++ b/yatexpkg.el @@ -1,12 +1,13 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX package manager ;;; yatexpkg.el -;;; (c )2003 by HIROSE, Yuuji [yuuji@yatex.org] -;;; Last modified Fri May 2 20:13:49 2003 on firestorm +;;; (c)2003 by HIROSE, Yuuji [yuuji@yatex.org] +;;; Last modified Thu Aug 28 18:24:33 2003 on firestorm ;;; $Id$ (defvar YaTeX-package-alist-default - '(("version" (env "comment")) ;by tsuchiya@pine.kuee.kyoto-u.ac.jp + '(("version" (env "comment") ;by tsuchiya@pine.kuee.kyoto-u.ac.jp + (section "includeversion" "excludeversion")) ("plext" (section "bou")) ;by yas.axis@ma.mni.ne.jp @@ -17,14 +18,21 @@ ("longtable" (env "longtable")) ("ascmac" (env "screen" "boxnote" "shadebox" "itembox") (maketitle "return" "Return" "yen") - (section "keytop")) + (section "keytop") ("mask") ("maskbox")) ("bm" (section "bm")) ;by aoyama@le.chiba-u.ac.jp ("graphicx" (section "includegraphics")) ("alltt" (env "alltt")) ("misc" (section "verbfile" "listing")) ("eclbkbox" (env "breakbox"))) - "Default package vs. macro list") + "Default package vs. macro list. +Alists contains '(PACKAGENAME . MACROLIST) +PACKAGENAME Basename of package(String). +MACROLIST List of '(TYPE . MACROS) +TYPE One of 'env, 'section or 'maketitle according to completion-type +MACROS List of macros + +An good example is the value of YaTeX-package-alist-default.") (defvar YaTeX-package-alist-private nil "*User defined package vs. macro list. See also YaTeX-package-alist-default") @@ -85,6 +93,7 @@ usepkgrx YaTeX-comment-prefix nil t) (setq mb0 (match-beginning 0)) (skip-chars-forward "^{") + (forward-char 1) (let ((pl pkglist)) (while pl ;(car pl)'s car is package, cdr is type (if (looking-at (regexp-quote (car (car pl)))) @@ -100,7 +109,11 @@ (setq pkg (completing-read "Load which package?(TAB for list): " - pkglist)) + pkglist nil nil + ;;initial input + (if (= (length pkglist) 1) + (let ((w (car (car pkglist)))) + (if YaTeX-emacs-19 (cons w 0) w))))) (set-buffer pb) (goto-char (point-min)) (if (YaTeX-re-search-active-forward diff --git a/yatexprc.el b/yatexprc.el index f006ccb..ba3310e 100644 --- a/yatexprc.el +++ b/yatexprc.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX process handler. ;;; yatexprc.el -;;; (c )1993-2003 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Thu May 1 22:37:31 2003 on firestorm +;;; (c)1993-2003 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Sun Nov 2 08:09:44 2003 on firestorm ;;; $Id$ ;(require 'yatex) @@ -27,15 +27,23 @@ "Shell option for command execution.") (defvar YaTeX-latex-message-code +;; (cond +;; (YaTeX-dos (cdr (assq 1 YaTeX-kanji-code-alist))) +;; ((and YaTeX-emacs-20 (member 'undecided (coding-system-list)) +;; 'undecided)) +;; ((featurep 'mule) +;; (or (and (boundp '*autoconv*) *autoconv*) +;; (and (fboundp 'coding-system-list) 'automatic-conversion))) +;; ((boundp 'NEMACS) +;; (cdr (assq (if YaTeX-dos 1 2) YaTeX-kanji-code-alist)))) (cond - (YaTeX-dos (cdr (assq 1 YaTeX-kanji-code-alist))) - ((and YaTeX-emacs-20 (member 'undecided (coding-system-list)) - 'undecided)) - ((featurep 'mule) - (or (and (boundp '*autoconv*) *autoconv*) - (and (fboundp 'coding-system-list) 'automatic-conversion))) + (YaTeX-emacs-20 + (cdr (assoc latex-message-kanji-code YaTeX-kanji-code-alist))) + ((boundp 'MULE) + (symbol-value + (cdr (assoc latex-message-kanji-code YaTeX-kanji-code-alist)))) ((boundp 'NEMACS) - (cdr (assq (if YaTeX-dos 1 2) YaTeX-kanji-code-alist)))) + latex-message-kanji-code)) "Process coding system for LaTeX.") (if YaTeX-typeset-buffer-syntax nil @@ -395,11 +403,11 @@ (concat (catch 'found-paper (mapcar (lambda (pair) - (if (member (car pair) opts) + (if (YaTeX-member (car pair) opts) (throw 'found-paper (cdr pair)))) YaTeX-paper-type-alist) YaTeX-default-paper-type) - (if (member "landscape" opts) "r" ""))))) + (if (YaTeX-member "landscape" opts) (if YaTeX-dos "L" "r") ""))))) (defvar YaTeX-preview-command-history nil "Holds minibuffer history of preview command.") @@ -415,7 +423,10 @@ "Preview command: " (YaTeX-replace-format (or (YaTeX-get-builtin "PREVIEW") dvi2-command) - "p" (concat "-paper " (YaTeX-get-paper-type))) + "p" (format (cond + (YaTeX-dos "-y:%s") + (t "-paper %s")) + (YaTeX-get-paper-type))) 'YaTeX-preview-command-history) (read-string-with-history "Preview file[.dvi]: " @@ -688,10 +699,13 @@ (defvar YaTeX-lpr-command-history nil "Holds command line history of YaTeX-lpr.") (put 'YaTeX-lpr-command-history 'no-default t) +(defvar YaTeX-lpr-ask-page-range-default t) (defun YaTeX-lpr (arg) - "Print out. If prefix arg ARG is non nil, call print driver without + "Print out. +If prefix arg ARG is non nil, call print driver without page range description." (interactive "P") + (or YaTeX-lpr-ask-page-range-default (setq arg (not arg))) (let*((cmd (or (YaTeX-get-builtin "LPR") dviprint-command-format)) from to (lbuffer "*dvi-printing*") dir) (setq diff --git a/yatexsec.el b/yatexsec.el index 514029c..17ffee3 100644 --- a/yatexsec.el +++ b/yatexsec.el @@ -1,8 +1,8 @@ ;;; -*- Emacs-Lisp -*- ;;; YaTeX sectioning browser. ;;; yatexsec.el -;;; (c ) 1994,1998,1999,2003 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Wed Mar 5 13:19:11 2003 on firestorm +;;; (c) 1994,1998,1999,2003 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Fri Jun 27 12:10:34 2003 on firestorm ;;; $Id$ (defvar YaTeX-sectioning-level