changeset 28:0f8b77d22c8a

Add docs on intelligent-newline.
author yuuji
date Mon, 11 Jul 1994 14:56:13 +0000
parents c2ab8c69b118
children 23737513bf5f
files docs/yatexe.tex docs/yatexj.tex
diffstat 2 files changed, 111 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/docs/yatexe.tex	Mon Jul 11 14:51:41 1994 +0000
+++ b/docs/yatexe.tex	Mon Jul 11 14:56:13 1994 +0000
@@ -37,6 +37,7 @@
 * Local dictionaries::          
 * Updation of @code{\includeonly}::  
 * What column?::                
+* Intelligent newline::         
 * Online help::                 
 * Cooperation with other packages::  
 * Customizations::              
@@ -232,7 +233,7 @@
 * Editing %# notation::         
 @end menu
 
-@node Changing typesetter, Static region for typesetting, %# notation, %# notation
+@node Changing typesetter, Static region for typesetting,  , %# notation
 @comment  node-name,  next,  previous,  up
 @section To change the `latex' command or to split a source text.
 @cindex typesetter
@@ -409,7 +410,7 @@
 * Greek letters completion::    
 @end menu
 
-@node Begin-type completion, Section-type completion, Completion, Completion
+@node Begin-type completion, Section-type completion,  , Completion
 @comment  node-name,  next,  previous,  up
 @section Begin-type completion
 @cindex begin-type completion
@@ -621,7 +622,7 @@
 * view-sectioning::             
 @end menu
 
-@node view-sectioning,  , Section-type completion, Section-type completion
+@node view-sectioning,  ,  , Section-type completion
 @comment  node-name,  next,  previous,  up
 @subsection view-sectioning
 @cindex view sectioning
@@ -1078,7 +1079,7 @@
 by the current file, and type @kbd{%} to comment out the
 @code{\includeonly} line.
 
-@node What column?, Online help, Updation of @code{\includeonly}, Top
+@node What column?, Intelligent newline, Updation of @code{\includeonly}, Top
 @comment  node-name,  next,  previous,  up
 @chapter What column?
 @cindex what column
@@ -1116,7 +1117,56 @@
 virtual column  headers by  putting  them  in the  first line  and
 commenting that line with @code{%}.
 
-@node Online help, Cooperation with other packages, What column?, Top
+@node Intelligent newline, Online help, What column?, Top
+@comment  node-name,  next,  previous,  up
+@chapter Intelligent newline
+@cindex Intelligent newline
+@cindex ESC RET
+@cindex M-C-m
+
+  In tabular[*], array, itemize, enumerate or tabbing environment,
+
+@table @kbd
+@item ESC RET
+	@dots{} Intelligent newline
+@end table
+
+@noindent 
+inserts the contents corresponding to the current environment in the next
+line.  In @code{tabular} environment, for example, @kbd{ESC RET} inserts
+the certain number of @code{&} and trailing @code{\\}, and @code{\hline}
+if other @code{\hline} is found in backward.  Here are the list of
+contents v.s. environments.
+
+@itemize
+@item @code{tabular}, @code{tabular*}, @code{array}
+
+	Corresponding number of @code{&} and  @code{\\}.
+	And @code{\hline} if needed.
+
+@item @code{tabbing}
+
+	The same number of @code{\>} as @code{\=} in the first line.
+
+@item @code{itemize}, @code{enumerate}, @code{description}, @code{list}
+
+	@code{\item} or @code{item[]}.
+@end itemize
+
+  Note that since this function works seeing the contents of the first
+line, please call this after the second line if possible.
+
+  If you want to apply these trick to other environments, @code{foo}
+environment for example, define the function named
+@code{YaTeX-intelligent-newline-foo} to insert corresponding contents.
+That function will be called at the beginning of the next line after the
+newline is inserted to the current line.  Since the function
+@code{YaTeX-indent-line} is designed to indent the current line properly,
+calling this function before your code to insert certain contents must be
+useful.  See the definition of the function
+@code{YaTeX-intelligent-newline-itemize} as an example.
+
+@node Online help, Cooperation with other packages, Intelligent newline, Top
 @comment  node-name,  next,  previous,  up
 @chapter Online help
 @cindex online help
@@ -1203,7 +1253,7 @@
 * Add-in functions::            
 @end menu
 
-@node Lisp variables, Add-in functions, Customizations, Customizations
+@node Lisp variables, Add-in functions,  , Customizations
 @comment  node-name,  next,  previous,  up
 @section Lisp variables
 @cindex customizable variables
@@ -1229,7 +1279,7 @@
 * Hook file::                   
 @end menu
 
-@node All customizable variables, Sample definitions, Lisp variables, Lisp variables
+@node All customizable variables, Sample definitions,  , Lisp variables
 @comment  node-name,  next,  previous,  up
 @subsection All customizable variables
 @cindex all customizable variables
--- a/docs/yatexj.tex	Mon Jul 11 14:51:41 1994 +0000
+++ b/docs/yatexj.tex	Mon Jul 11 14:56:13 1994 +0000
@@ -1,5 +1,4 @@
 \input texinfo @c -*- texinfo -*-
-%#!bigjtex
 @setfilename yatexj
 @settitle Yet Another tex-mode for Emacs
 
@@ -34,6 +33,7 @@
 * Local dictionary - ローカル辞書(神経質な人へ)::  
 * Includeonly - 勝手にincludeonly::  
 * Where am I? - 今はどこ?::     
+* Intelligent newline - おまかせ改行::  
 * Online help - オンラインヘルプ::  
 * Cooperation with other packages - 他パッケージとの連携::  
 * Customizations - カスタマイズ::  
@@ -151,7 +151,7 @@
 * Print out - プリントアウト用コマンドの起動::  
 @end menu
 
-@node Calling typesetter - タイプセッタ起動, Print out - プリントアウト用コマンドの起動, Invocation - 外部コマンドの起動, Invocation - 外部コマンドの起動
+@node Calling typesetter - タイプセッタ起動, Print out - プリントアウト用コマンドの起動,  , Invocation - 外部コマンドの起動
 @comment  node-name,  next,  previous,  up
 @section タイプセッタ起動
 @cindex タイプセッタ起動
@@ -219,7 +219,7 @@
 * Editing %# notation - %#記法の編集::  
 @end menu
 
-@node Changing typesetter - タイプセット用コマンドの変更, Splitting input files - 入力ファイル分割, %#記法, %#記法
+@node Changing typesetter - タイプセット用コマンドの変更, Splitting input files - 入力ファイル分割,  , %#記法
 @comment  node-name,  next,  previous,  up
 @section タイプセット用コマンド変更
 
@@ -426,7 +426,7 @@
 * Greek letter completion - ギリシャ文字補完::  
 @end menu
 
-@node begin型補完, section型補完, Completion - 補完入力, Completion - 補完入力
+@node begin型補完, section型補完,  , Completion - 補完入力
 @comment  node-name,  next,  previous,  up
 @section begin型補完
 @cindex begin型補完[beginがたほかん]
@@ -604,7 +604,7 @@
 * view-sectioning - セクション区切りのアウトライン表示::  
 @end menu
 
-@node 2個以上の引数をとる section型コマンド, Input argument without copletion - 引数入力時に補完しない, section型補完, section型補完
+@node 2個以上の引数をとる section型コマンド, Input argument without copletion - 引数入力時に補完しない,  , section型補完
 @comment  node-name,  next,  previous,  up
 @subsection 2個以上の引数をとる section型コマンド
 @cindex 引数[ひきすう]
@@ -1177,7 +1177,7 @@
 @code{\includeonly} の行をコメントアウトして無効化したい時には、@kbd{%}を
 それぞれ押して下さい。
 
-@node Where am I? - 今はどこ?, Online help - オンラインヘルプ, Includeonly - 勝手にincludeonly, Top
+@node Where am I? - 今はどこ?, Intelligent newline - おまかせ改行, Includeonly - 勝手にincludeonly, Top
 @comment  node-name,  next,  previous,  up
 @chapter 今はどこ?
 @cindex 今はどこ?[いまはどこ]
@@ -1213,7 +1213,52 @@
 す。もし項目名として別のものを与えたい場合は、行頭を@code{%}にしてダミーの
 項目並びを作っておくと良いでしょう。
 
-@node Online help - オンラインヘルプ, Cooperation with other packages - 他パッケージとの連携, Where am I? - 今はどこ?, Top
+@node Intelligent newline - おまかせ改行, Online help - オンラインヘルプ, Where am I? - 今はどこ?, Top
+@comment  node-name,  next,  previous,  up
+@chapter おまかせ改行
+@cindex おまかせ改行[おまかせかいぎょう]
+@cindex &入力[&にゅうりょく]
+@cindex prefix &
+
+  tabular[*], array, itemize, enumerate, tabbing 環境で
+
+@table @kbd
+@item ESC RET
+	@dots{} おまかせ改行
+@end table
+
+@noindent 
+を押すと、その環境に応じた行エントリを次の行に挿入します。例えば、tabular
+環境では、その環境のカラム数に対応した個数の @code{&} にくわえ、行末の 
+@code{\\} を入れます。この時それ以前に @code{\hline} があればそれも付け加
+えます。環境とそれに応じて自動入力するものの対応は以下のようになります。
+
+@itemize
+@item @code{tabular}, @code{tabular*}, @code{array}
+
+	カラム数-1 だけの @code{&} と @code{\\}。必要に応じて @code{\hline}
+
+@item @code{tabbing}
+
+	一行目で定義している @code{\=} と同じ個数の @code{\>}。
+
+@item @code{itemize}, @code{enumerate}, @code{description}, @code{list}
+
+	@code{\item} または @code{item[]}
+@end itemize
+
+  tabular 環境の例のように、本機能は各環境の一行目の内容を参考にして動作す
+るので、なるべく二行目以降で呼び出すようにしてください。
+
+  もし、その他の環境、例えば @code{foo}、に対して@code{おまかせ改行}を動作
+させたい時は、@code{YaTeX-intelligent-newline-foo} という名前の関数を定義
+します。定義した関数は、現在の行に改行を挿入した直後の行頭の位置で呼ばれま
+す。関数 @code{YaTeX-indent-line} を呼ぶと現在の環境のネストに応じた深さに
+インデントされるので、これを呼んでから何かを挿入するようなコードを書くとよ
+いでしょう。関数 @code{YaTeX-intelligent-newline-itemize} の定義などを参考
+にしてください。
+
+@node Online help - オンラインヘルプ, Cooperation with other packages - 他パッケージとの連携, Intelligent newline - おまかせ改行, Top
 @comment  node-name,  next,  previous,  up
 @chapter オンラインヘルプ
 @cindex オンラインヘルプ[おんらいんへるぷ]
@@ -1296,7 +1341,7 @@
 * Add-in functions - 付加関数(アドイン関数)::  
 @end menu
 
-@node Lisp variables - lisp 変数, Add-in functions - 付加関数(アドイン関数), Customizations - カスタマイズ, Customizations - カスタマイズ
+@node Lisp variables - lisp 変数, Add-in functions - 付加関数(アドイン関数),  , Customizations - カスタマイズ
 @comment  node-name,  next,  previous,  up
 @section lisp 変数
 @cindex prefixキー変更[prefixきーへんこう]
@@ -1317,7 +1362,7 @@
 * Hook file - hook用ファイル::  
 @end menu
 
-@node All customizable variables - カスタマイズ変数一覧, Sample definitions - カスタマイズ変数設定例, Lisp variables - lisp 変数, Lisp variables - lisp 変数
+@node All customizable variables - カスタマイズ変数一覧, Sample definitions - カスタマイズ変数設定例,  , Lisp variables - lisp 変数
 @comment  node-name,  next,  previous,  up
 @subsection カスタマイズ変数一覧
 @cindex カスタマイズ変数一覧[かすたまいずへんすういちらん]

yatex.org