yatex

diff docs/yatexe.tex @ 79:0734be649cb8

Do not care file-coding-system when YaTeX-kanji-code is nil. New completion yatexpkg.el is introduced.
author yuuji
date Thu, 25 Dec 2003 04:10:32 +0000
parents f41b01fef5d6
children 9b4354af748c
line diff
     1.1 --- a/docs/yatexe.tex	Wed May 22 04:57:42 2002 +0000
     1.2 +++ b/docs/yatexe.tex	Thu Dec 25 04:10:32 2003 +0000
     1.3 @@ -5,7 +5,7 @@
     1.4  
     1.5  @iftex
     1.6  @c @syncodeindex fn cp
     1.7 -@c Last modified Fri Feb  2 12:39:12 2001 on firestorm
     1.8 +@c Last modified Fri Sep 12 12:04:11 2003 on firestorm
     1.9  @syncodeindex vr cp
    1.10  @end iftex
    1.11  
    1.12 @@ -15,7 +15,7 @@
    1.13  @subtitle Yet Another tex-mode for emacs
    1.14  @title Wild Bird
    1.15  @subtitle // YaTeX //
    1.16 -@author @copyright{} 1991-1996 by    HIROSE, Yuuji [yuuji@@yatex.org]
    1.17 +@author @copyright{} 1991-2003 by    HIROSE, Yuuji [yuuji@@yatex.org]
    1.18  @end titlepage
    1.19  
    1.20  @node Top, What is YaTeX?, (dir), (dir)
    1.21 @@ -30,7 +30,7 @@
    1.22  * Main features::               What YaTeX can do
    1.23  * Installation::                Guide to install
    1.24  * Typesetting::                 Call typesetting processes
    1.25 -* %#notation::                  
    1.26 +* %#notation::                  Meta-keyword `%#'
    1.27  * Completion::                  Input LaTeX commands with completion
    1.28  * Local dictionaries::          Directory dependent completion
    1.29  * Commenting out::              Commenting/uncommenting text
    1.30 @@ -40,6 +40,7 @@
    1.31  * Updation of includeonly::     Free from maintaining includeonly
    1.32  * What column::                 Check what table-column the cursor belong
    1.33  * Intelligent newline::         Guess requisites of new line
    1.34 +* Usepackage checker::          Selecting correct \usepackage is YaTeX's job
    1.35  * Online help::                 On-line documentation of LaTeX
    1.36  * Browsing file hierarchy::     Walking through file hierarchy
    1.37  * Cooperation with other packages::  Work well with gmhist, min-out
    1.38 @@ -47,75 +48,6 @@
    1.39  * Etcetera::                    YaTeX is acquisitive.
    1.40  * Copying::                     Redistribution
    1.41  
    1.42 - --- The Detailed Node Listing ---
    1.43 -
    1.44 -Typesetting
    1.45 -
    1.46 -* Calling typesetter::          
    1.47 -* Calling previewer::           
    1.48 -* Printing out::                
    1.49 -
    1.50 -%# notation
    1.51 -
    1.52 -* Changing typesetter::         
    1.53 -* Static region for typesetting::  
    1.54 -* Lpr format::                  
    1.55 -* Editing %# notation::         
    1.56 -
    1.57 -Completion
    1.58 -
    1.59 -* Begin-type completion::       
    1.60 -* Section-type completion::     
    1.61 -* Large-type completion::       
    1.62 -* Maketitle-type completion::   
    1.63 -* Arbitrary completion::        
    1.64 -* End completion::              
    1.65 -* Accent completion::           
    1.66 -* Image completion::            
    1.67 -* Greek letters completion::    
    1.68 -
    1.69 -Section-type completion
    1.70 -
    1.71 -* view-sectioning::             
    1.72 -
    1.73 -Cursor jump
    1.74 -
    1.75 -* Jump to corresponding object::  
    1.76 -* Invoking image processor::    
    1.77 -* Jump to main file::           
    1.78 -* Jumping around the environment::  
    1.79 -* Jumping to last completion position::  
    1.80 -
    1.81 -Changing and Deleting
    1.82 -
    1.83 -* Changing LaTeX commands::     
    1.84 -* Killing LaTeX commands::      
    1.85 -
    1.86 -Customizations
    1.87 -
    1.88 -* Lisp variables::              
    1.89 -* Add-in functions::            
    1.90 -* Add-in generator::            
    1.91 -
    1.92 -Lisp variables
    1.93 -
    1.94 -* All customizable variables::  
    1.95 -* Sample definitions::          
    1.96 -* Hook variables::              
    1.97 -* Hook file::                   
    1.98 -
    1.99 -Procedure
   1.100 -
   1.101 -* How the add-in function works::  
   1.102 -* How the function is called::  
   1.103 -* Useful functions for creating add-in::  
   1.104 -* Contribution::                
   1.105 -
   1.106 -How the add-in function works
   1.107 -
   1.108 -* Defining option-add-in::      
   1.109 -* Defining argument-add-in::    
   1.110 -@end menu
   1.111  
   1.112  @node What is YaTeX?, Main features, Top, Top
   1.113  @comment  node-name,  next,  previous,  up
   1.114 @@ -1348,7 +1280,7 @@
   1.115  
   1.116  in the minibuffer.  Type @kbd{a} if you want to add the current file name
   1.117  to @code{\includeonly} list, @kbd{r} to replace \@code{includeonly} list
   1.118 -by the current file, and type @kbd{%} to comment out the
   1.119 +with the current file, and type @kbd{%} to comment out the
   1.120  @code{\includeonly} line.
   1.121  
   1.122  @node What column, Intelligent newline, Updation of includeonly, Top
   1.123 @@ -1389,7 +1321,7 @@
   1.124  virtual column  headers by  putting  them  in the  first line  and
   1.125  commenting that line with @code{%}.
   1.126  
   1.127 -@node Intelligent newline, Online help, What column, Top
   1.128 +@node Intelligent newline, Usepackage checker, What column, Top
   1.129  @comment  node-name,  next,  previous,  up
   1.130  @chapter Intelligent newline
   1.131  @cindex Intelligent newline
   1.132 @@ -1440,7 +1372,22 @@
   1.133  useful.  See the definition of the function
   1.134  @code{YaTeX-intelligent-newline-itemize} as an example.
   1.135  
   1.136 -@node Online help, Browsing file hierarchy, Intelligent newline, Top
   1.137 +@node Usepackage checker, Online help, Intelligent newline, Top
   1.138 +@comment  node-name,  next,  previous,  up
   1.139 +@chapter Usepackage checker
   1.140 +@cindex usepackage
   1.141 +
   1.142 +When you input begint-type, section-type, maketitle-type macros with
   1.143 +completion, and it requires some LaTeX2e package, YaTeX examines
   1.144 +the existence of correct @code{\usepackage}.  If not, YaTeX inserts
   1.145 +the @code{\usepackage@{@}} declaration corresponding to input macro.
   1.146 +
   1.147 +To activate the package completion for your favarite package,
   1.148 +set the variable @code{YaTeX-package-alist-private} correctly.
   1.149 +Please refere the value of @code{YaTeX-package-alist-default} as an
   1.150 +example.
   1.151 +
   1.152 +@node Online help, Browsing file hierarchy, Usepackage checker, Top
   1.153  @comment  node-name,  next,  previous,  up
   1.154  @chapter Online help
   1.155  @cindex online help
   1.156 @@ -1631,6 +1578,17 @@
   1.157  are to change some of these variables,  see more detailed documentation of
   1.158  the variable by @kbd{M-x describe-variable}.
   1.159  
   1.160 +@defvar YaTeX-japan
   1.161 +Set this nil to produce all messages in English
   1.162 +(@code{Depends on Japanese feature of Emacs})
   1.163 +@end defvar
   1.164 +
   1.165 +@defvar YaTeX-kanji-code
   1.166 +Default buffer-file-coding-system for YaTeX modes' buffer.
   1.167 +Set this 0 to no language conversion.  Nil to preserve original 
   1.168 +coding-system. (@code{1 or 2})
   1.169 +@end defvar
   1.170 +
   1.171  @defvar YaTeX-prefix
   1.172  Prefix key stroke (@kbd{C-c})
   1.173  @end defvar
   1.174 @@ -1831,6 +1789,28 @@
   1.175  (@code{(featurep 'hilit19)}
   1.176  @end defvar
   1.177  
   1.178 +@defvar YaTeX-singlecmd-suffix
   1.179 +Suffix which is always inserted after maketitle-type macros.
   1.180 +@code{"{}"} is recommended.
   1.181 +@end defvar
   1.182 +
   1.183 +@defvar YaTeX-package-alist-private
   1.184 +Alist of LaTeX2e-package name vs. lists of macros in it.
   1.185 +Set this alist properly and YaTeX automatically check the declaratiion of
   1.186 +`usepackage' for corresponding macro, when you input that macro with
   1.187 +completion.  If required `usepackage' is not found, YaTeX also
   1.188 +automatically inserts `\usepackage'.  Alist is as follows;
   1.189 +@lisp
   1.190 +   '((PackageName1
   1.191 +        (completionType ListOfMacro)
   1.192 +        (completionType ListOfMacro))
   1.193 +     (PackageName2
   1.194 +        (completionType ListOfMacro)
   1.195 +        (completionType ListOfMacro...))....)
   1.196 +@end lisp
   1.197 +completionType is one of @code{env, section, maketitle}.
   1.198 +Consult the value of @code{YaTeX-package-alist-default} as an example.
   1.199 +@end defvar
   1.200  
   1.201  @node Sample definitions, Hook variables, All customizable variables, Lisp variables
   1.202  @comment  node-name,  next,  previous,  up
   1.203 @@ -1919,7 +1899,18 @@
   1.204  @comment  node-name,  next,  previous,  up
   1.205  @subsection How the add-in function works
   1.206  
   1.207 -  There are two kinds of add-in.  @dfn{Option add-in} returns the
   1.208 +There are three types of add-in.
   1.209 +
   1.210 +@enumerate
   1.211 +@item
   1.212 +Option add-in
   1.213 +@item
   1.214 +argument add-in
   1.215 +@item
   1.216 +enclosing add-in
   1.217 +@end enumerate
   1.218 +
   1.219 +@dfn{Option add-in} returns the
   1.220  La@TeX{}'s optional parameters such as optional strings after
   1.221  @code{\begin@{ENV@}}, optional strings between a section-type command
   1.222  and its first argument, and optional strings just after type
   1.223 @@ -1952,9 +1943,33 @@
   1.224  command is being read.  Thus the add-in should determine the
   1.225  job referring the value of its argument.
   1.226  
   1.227 +  @dfn{enclosing add-in} is for modifying and/or checking the region that
   1.228 +will be enclosed by section-type commands via @kbd{[prefix] S}.  An
   1.229 +enclosing add-in function will be called with two arguments, beginning of
   1.230 +the enclosed region and end of the region.  Suppose you want to enclose
   1.231 +the existing text @code{(a+b)/c} by @code{\frac{}}.
   1.232 +
   1.233 +@display
   1.234 +a/c
   1.235 +|  |
   1.236 +A  B
   1.237 +@end display
   1.238 +
   1.239 +You do set-mark-command at point A and then move to point B.  Typing
   1.240 +@kbd{[prefix] S} and input @code{frac} enclose the region like this;
   1.241 +
   1.242 +@display
   1.243 +\frac{a/c}
   1.244 +@end display
   1.245 +
   1.246 +Normally, the expression @code{a/c} is translated to
   1.247 +@code{\frac@{a@}@{c@}}. An enclosing add-in is useful for modifying
   1.248 +@code{/} to @code{@}@{}.
   1.249 +
   1.250  @menu
   1.251  * Defining option-add-in::      
   1.252  * Defining argument-add-in::    
   1.253 +* Defining enclosing-add-in::   
   1.254  @end menu
   1.255  
   1.256  @node Defining option-add-in, Defining argument-add-in, How the add-in function works, How the add-in function works
   1.257 @@ -1984,7 +1999,7 @@
   1.258            (concat "@{" (read-string "Rule: ") "@}"))
   1.259  @end lisp
   1.260  
   1.261 -@node Defining argument-add-in,  , Defining option-add-in, How the add-in function works
   1.262 +@node Defining argument-add-in, Defining enclosing-add-in, Defining option-add-in, How the add-in function works
   1.263  @comment  node-name,  next,  previous,  up
   1.264  @subsubsection Defining `argument add-in'
   1.265  
   1.266 @@ -2007,6 +2022,29 @@
   1.267    Note that when the `argument add-in' function return `nil', normal
   1.268  argument reader will be called.
   1.269  
   1.270 +@node Defining enclosing-add-in,  , Defining argument-add-in, How the add-in function works
   1.271 +@comment  node-name,  next,  previous,  up
   1.272 +@subsubsection Defining `enclosing add-in'
   1.273 +
   1.274 +  This section describes how to define the add-in function for
   1.275 +text enclosed by @code{\frac@{@}}.
   1.276 +
   1.277 +  When enclosing the text @code{5/3} by @code{\frac@{@}}, you might want to
   1.278 +replace @code{/} with @code{@}@{}.  Enclosing function
   1.279 +@code{YaTeX::frac-region} is called with two arguments, beginning of
   1.280 +enclosed text and end of enclosed text.  The function is expected to
   1.281 +replace @code{/} with @code{@}@{}.  Here is an example expression.
   1.282 +
   1.283 +@lisp
   1.284 +(defun YaTeX::frac-region (beg end)
   1.285 +  (catch 'done
   1.286 +    (while (search-forward "/" end t)
   1.287 +      (goto-char (match-beginning 0))
   1.288 +      (if (y-or-n-p "Replace this slash(/) with `}{'")
   1.289 +	  (throw 'done (replace-match "}{")))
   1.290 +      (goto-char (match-end 0)))))
   1.291 +@end lisp
   1.292 +
   1.293  @node How the function is called, Useful functions for creating add-in, How the add-in function works, Add-in functions
   1.294  @comment  node-name,  next,  previous,  up
   1.295  @subsection How the function is called
   1.296 @@ -2282,7 +2320,7 @@
   1.297  as a result  of using this  software.   However, any  reports  and
   1.298  suggestions are  welcome as  long as I   feel  interests in   this
   1.299  software.   My possible  e-mail address is  `yuuji@@yatex.org'.
   1.300 -(up to Dec.2000 at least)  And there is mailing list for YaTeX.
   1.301 +(up to Sep.2003 at least)  And there is mailing list for YaTeX.
   1.302  Although the common language is Japanese, questions in English will be
   1.303  welcome.  To join the ML, send the mail whose subject is `append' to
   1.304  the address `yatex@@yatex.org.  If you have some