yatex

changeset 387:04ee01ddb7ab dev

Simplify installation step. Update Q&A.
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 06 Jan 2015 23:22:15 +0900
parents 8d17b1902bdd
children ad62fb00a393
files docs/qanda docs/qanda.eng install makefile yatex.new
diffstat 5 files changed, 77 insertions(+), 155 deletions(-) [+]
line diff
     1.1 --- a/docs/qanda	Tue Jan 06 23:20:53 2015 +0900
     1.2 +++ b/docs/qanda	Tue Jan 06 23:22:15 2015 +0900
     1.3 @@ -5,9 +5,8 @@
     1.4  %%
     1.5  
     1.6  (新項目:・RefTeXは使えますか?
     1.7 +	・bibtexとlatexとかを交互にかけるのが面倒なんですけど
     1.8  	・自分で定義したカウンタを\ref補完でのラベル候補対象として認識させたい
     1.9 -	・font-lock はどうやって使えばいいんでしょ?
    1.10 -	・XEmacsでも色は着きますか?
    1.11  	・{\it }内部では斜体に {\bf }では太字になるという噂を聞いたんですが…)
    1.12  
    1.13  ■インストール関連
    1.14 @@ -36,38 +35,18 @@
    1.15  	
    1.16  ・まだしたっぱなので Info ディレクトリに書き込む権利がないっすう…
    1.17  	
    1.18 -	rootにしてもらいましょう。それがだめなときは Mule2 をインストー
    1.19 -	ルしてもらいましょう。してくれない時は、ホームディレクトリにイン
    1.20 -	ストールして、ほーらディスクの無駄遣いだよ〜んといって脅せば入れ
    1.21 -	てくれるはずです。Mule2 なら、~/.emacs に
    1.22 +	rootにしてもらいましょう。それがだめなときは以下のようにして個人
    1.23 +	所有の Info ディレクトリをEmacsに認識させましょう。
    1.24  	
    1.25  		(setq Info-default-directory-list
    1.26  		      (cons "自分のInfoディレクトリ"
    1.27  			    Info-default-directory-list))
    1.28  	
    1.29 -	と書くことで、info を起動した時に個人用のファイルもメニューに加
    1.30 -	わります。それでもMule2をなかなか入れてくれない時は、新しいinfo
    1.31 -	ファイルを拾って来るたびに管理者に「入れてくださーい。あ、すみま
    1.32 -	せーん毎度。でもMule2なら自分のディレクトリを追加できるんですけ
    1.33 -	どねぇ…」を繰り返しましょう。
    1.34 -	
    1.35  ・LaTeXのヘルプファイルがないといわれる。
    1.36  	
    1.37 -	Nemacs, Mule1 では $EMACS/etc/, Mule2 では $EMACS/site-lisp/ に
    1.38 -	置かれているとみなすようになっています。もし公共の場所に置く権限
    1.39 -	がない時は、ホームディレクトリの下のどこかに置いて、変数 
    1.40 -	YaTeX-help-file にそのファイル名を設定して下さい。
    1.41 -	
    1.42 -・Nemacsで info が読めない。
    1.43 -	
    1.44 -	Muleでformatしているので、内部日本語処理の異なるNemacs(または
    1.45 -	NemacsベースのDemacs)では(バイト数がずれるため)正しく読むことが
    1.46 -	できません。Muleで御覧ください。なお、Texinfoファイルのフォーマッ
    1.47 -	トには texinfo-3.1.tar.gz にある Emacs-Lisp ファイルを用いてくだ
    1.48 -	さい。
    1.49 -	
    1.50 -	また、九州大学の井上さんによると、Info の dir 画面で,M-x
    1.51 -	Info-tagify とやると info ファイルのコンバートができるそうです。
    1.52 +	もし公共の場所に置く権限がない時は、ホームディレクトリの下のどこ
    1.53 +	かに置いて、変数 YaTeX-help-file にそのファイル名を設定して下さ
    1.54 +	い。
    1.55  	
    1.56  ■操作関連
    1.57  ・間違って変なLaTeXコマンドを学習させてしまった。
    1.58 @@ -174,20 +153,12 @@
    1.59  	
    1.60  ・直前に入れた \foo{引数だよ} の「引数だよ」をもう一回使いたい。
    1.61  	
    1.62 -	gmhist というパッケージを導入しましょう。野鳥は gmhist に対応し
    1.63 -	ています。ミニバッファで \foo{???}: と聞かれた時に M-p (ESC p)を
    1.64 +	ミニバッファで \foo{???}: と聞かれた時に M-p (ESC p)を
    1.65  	押すと今まで入力した文字の履歴を逆方向にたどって表示します。M-n 
    1.66  	と押すと順方向にたどります。これらの入力履歴は begin 型補完、
    1.67  	section 型補完、プレヴューア起動、プリントアウトコマンド起動それ
    1.68  	ぞれに対し独立に設定されます。
    1.69  	
    1.70 -	gmhist は多くの Emacs-Lisp アーカイブサイトに置いてあります。
    1.71 -	ftp.ae.keio.ac.jp:pub/emacs-lisp/util/gmhist.tar.gz
    1.72 -	にもあります。
    1.73 -
    1.74 -	ただし、Mule2 以降を用いている場合は、gmhistを用いなくてもミニバッ
    1.75 -	ファでのヒストリが使えます。
    1.76 -	
    1.77  ・ref←→label間ジャンプで存在するはずのref/labelにジャンプしない。
    1.78  	
    1.79  	C-c g とだけ打つと対応するref/labelの前方検索から始めます。
    1.80 @@ -216,24 +187,30 @@
    1.81  	
    1.82  ・いつも雛型として使っている template.tex を簡単に入れたい
    1.83  	
    1.84 -	autoinsert.el (Emacs19/Mule2付属)を使いましょう。もしくは、それ
    1.85 -	の機能強化版 auto-insert-tkld を使いましょう。後者は、
    1.86 -	ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/auto-inset-tkld.tar.Z
    1.87 -	で入手できます。
    1.88 +	~/work/template.tex に置きましょう。置き場所を変えたい場合は
    1.89 +	(setq YaTeX-template-file "~/hogehoge/fugafuga.tex")
    1.90 +	のようにして変更できます。
    1.91  	
    1.92  ・bibtexとlatexとかを交互にかけるのが面倒なんですけど
    1.93  	
    1.94 -	latexmk というスグレもののツールがあります。これは、.tex,
    1.95 -	.bib, .idx などのファイル間の依存関係をドキュメントを走査して調
    1.96 -	べ、自動的に bibtex, makeindex, jlatex などを必要な順序で必要な
    1.97 -	回数起動してくれます。これをインストールし、各ドキュメントの先頭
    1.98 -	に
    1.99 -		%#!latexmk
   1.100 +	yatex1.76からラベルやbibtexでの文献番号不整合を自動的に検知して、
   1.101 +	再処理が必要なときは自動的に再起動するようになりました(auto rerun)。
   1.102 +	ほとんどの場合、野鳥の auto rerun で対処できるはずです。ただし、
   1.103 +	以下で述べるlatexmkを利用する場合は重複処理になるため野鳥の
   1.104 +	auto rerun を無効化してください。無効化は
   1.105 +	(setq YaTeX-typeset-auto-rerun nil)
   1.106 +	します。
   1.107  	
   1.108 -	などと書いてタイプセッタとして latexmk を指定すれば複雑な依存関
   1.109 -	係に悩んだ日々とはおさらばです。なお、latexmk は CTAN サイトの
   1.110 -	support/latexmk/ ディレクトリに置いてあります。
   1.111 -	(例えば ftp.kdd.lab.kdd.co.jp:/CTAN/)
   1.112 +	同じ目的のツールに latexmk というツールがあります。これは、.tex,
   1.113 +	.bib, .idx などのファイル間の依存関係を調べ、自動的に bibtex,
   1.114 +	makeindex, platex などを必要な順序で必要な回数起動してくれます。
   1.115 +	これをインストールし、各ドキュメントの先頭に
   1.116 +	
   1.117 +	%#!latexmk
   1.118 +	
   1.119 +	などと書いてタイプセッタとして latexmk を指定することで利用でき
   1.120 +	ます。なお、latexmk は CTAN サイトにあります。
   1.121 +	(http://www.ctan.org/pkg/latexmk/)
   1.122  	
   1.123  ・タイプセットとプレヴューでキーが違うのが面倒ですね?
   1.124  	
   1.125 @@ -413,13 +390,6 @@
   1.126  	ん。光らないだけで実害はないので、気にしないか、あるいは次の
   1.127  	Meadow が登場するまで hilit19 を利用して下さい。
   1.128  	
   1.129 -・メニューバーの YaTeX をクリックした時にハングしたかと思うほど遅い。
   1.130 -	
   1.131 -	わかりません、Emacs のせいです。我慢してください。二回目からは遅
   1.132 -	くありません。ふつ〜メニューなんか使わないでしょ? サルのようにメ
   1.133 -	ニューバーを使う友達に野鳥を勧めてはいけません。言いすぎでした、
   1.134 -	ごめんなさいごめんなさい。
   1.135 -	
   1.136  ・\it をイタリック表示できませんか?(Mule2)
   1.137  	
   1.138  	まず、普段使用しているサイズの斜体フォントを探します。
   1.139 @@ -611,7 +581,7 @@
   1.140  	  境に括り入れます。
   1.141  	  「じゃあpreviewしてみよっか、でもこの部分だけでいいやね」と
   1.142  	  いってもっぺんcenter環境全体をマーク(ESC C-@)して
   1.143 -	  [prefix] % b してcenter環境を %#BEGIN〜%#ENDで括ってから
   1.144 +	  [prefix] % B してcenter環境を %#BEGIN〜%#ENDで括ってから
   1.145  	  領域タイプセットします。[prefix] t r。
   1.146  	  「さてpreviewじゃ」
   1.147  	  といいつつ [prefix] t p します。
   1.148 @@ -622,22 +592,23 @@
   1.149  	  めます。
   1.150  	  「はい、次の行」
   1.151  	  と言いながら ESC RET します。また適当に埋めて
   1.152 -	  領域タイプセットして xdvi をraiseします。muleに戻りcenter環境
   1.153 -	  の外に『この表は重要ネ〜』と書きます。
   1.154 +	  今度は [prefix] t e で隣のバッファに on-the-fly preview を出し、
   1.155 +	  表の中味を書き換えては自動的に隣のpreview画像が書き変わる様を
   1.156 +	  眺めます。
   1.157 +	  続いて、center環境の外に『この表は重要ネ〜』と書きます。
   1.158  	  「うむ、『重要』にはアンダーラインを引こう」
   1.159  	  といって『重要』をリジョン指定して [prefix] S(大文字) で
   1.160 -	  underline を補完入力し、またpreviewします。
   1.161 +	  underline を補完入力し、悩んだふりをして
   1.162  	  「やっぱアンダーラインはやめ」と言いながら
   1.163  	  \underline または { か } にカーソルを合わせて [prefix] k して
   1.164 -	  \underline{} を消します。またpreviewして、
   1.165 +	  \underline{} を消します。さらに悩むふりをして
   1.166  	  「やっぱセンタリングは要らんかもしれんなあ…」と言いつつ
   1.167  	  \end{center} にカーソルを合わせて [prefix] . を押します。
   1.168 -	  すると \begin{center}, \end{center} に % がつくのでまた
   1.169 -	  previewします。
   1.170 +	  すると \begin{center}, \end{center} に % がつきます。
   1.171  	  「うむ、やっぱりセンタリングはぽいっ」と言って
   1.172  	  \end{center}の行で [prefix] k をおして begin/end 対を消します。
   1.173  	  「さて、ファイルがでかくなって来たので分割するか」と言って
   1.174 -	  \include{foo} などを補完入力します。
   1.175 +	  \include{foo} などを [prefix] s で補完入力します。
   1.176  	  「じゃあ foo.tex を作らなきゃ…」と言って [prefix] g します。
   1.177  	  foo.tex が勝手に作られるので適当にごちゃごちゃ書いて
   1.178  	  [prefix] t j でタイプセットします。
   1.179 @@ -649,7 +620,7 @@
   1.180  	
   1.181  	こんな感じですかね。
   1.182  	あとは、イメージ補完、数式モード自動判定、先回りusepackageなんて
   1.183 -	のもAUCにはありません。
   1.184 +	のもアドバンテージでしょう。
   1.185  	
   1.186  ・なんで構成ファイルがいまさらSJISなの? だっせー。
   1.187  	
     2.1 --- a/docs/qanda.eng	Tue Jan 06 23:20:53 2015 +0900
     2.2 +++ b/docs/qanda.eng	Tue Jan 06 23:22:15 2015 +0900
     2.3 @@ -32,39 +32,25 @@
     2.4  	
     2.5  *I ain't got the privilege to write in the Info directory...
     2.6  	
     2.7 -	 Get yourself made root.  If you can't, have them install Mule2
     2.8 -	and add
     2.9 +	 Get yourself made root.  If you can't, write this:
    2.10  	
    2.11  		(setq Info-default-directory-list
    2.12  		      (cons "YOUR INFO DIRECTORY"
    2.13  			    Info-default-directory-list))
    2.14  	
    2.15  	to your ~/.emacs.  Now your personal  files will be added to the
    2.16 -	menu when you  invoke info.  By the way,  Mule1 will not release
    2.17 -	memories, so processes will pile up and be heavier on the system
    2.18 -	compared to Mule2.   Nemacs  has already become obsolete  by the
    2.19 -	developers,  so no further  comments for  usage  of Nemacs.  Get
    2.20 -	yourself Mule2 with flying colors :-)
    2.21 +	menu when you  invoke info.
    2.22  	
    2.23  *Emacs can't find the help file.
    2.24 -       
    2.25 -	The help  file is  set to  be placed  in $EMACS/etc/ for Nemacs,
    2.26 -	Mule1  and $EMACS/site-lisp/ for Mule2.    If you don't have the
    2.27 -	privilege to put them in a public location, copy it to your home
    2.28 -	directory and set YaTeX-help-file to that file name.
    2.29  	
    2.30 -*I can't read info on Nemacs
    2.31 +	If  you  don't have  the  privilege  to  put  them in  a  public
    2.32 +	location, copy it to your home directory and set YaTeX-help-file
    2.33 +	to that file name.
    2.34  	
    2.35 -	The  info file  was  formatted  on  Mule,  so it can't  be  read
    2.36 -	correctly on Nemacs  (or  Demacs based  on Nemacs)  because  the
    2.37 -	internal Japanese processing   is different.  Read  it on  Mule.
    2.38 -	Use the Emacs-Lisp  package in texinfo-3.1.tar.gz to format  the
    2.39 -	Texinfo file.
    2.40 -
    2.41  	
    2.42  [Operations]
    2.43  ============
    2.44 -*I accidentally learned in a wrong LaTeX command.
    2.45 +*I accidentally learned in a wrong LaTeX macro in my dictionary.
    2.46  	
    2.47  	There should be  a line with  the wrong command in the  .yatexrc
    2.48  	file in your home or current directory.  Erase or fix that line,
    2.49 @@ -209,19 +195,24 @@
    2.50  	
    2.51  *Is it possible to include personal template file template.tex handily?
    2.52  	
    2.53 -	Try Emacs-19's standard package `autoinsert.el' please.  Or its
    2.54 -	upper compatible package auto-insert-tkld might also be good.
    2.55 -	You can get auto-insert-tkld via anonymous ftp
    2.56 -	ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/
    2.57 -	ftp://archive.cis.ohio-state.edu/pub/gnu/elisp-archive/
    2.58 +	Put your template.tex into your ~/work directory where YaTeX
    2.59 +	seeks by default.  If you change the location to another place,
    2.60 +	set the lisp-variable as below.
    2.61 +	(setq YaTeX-template-file "~/other/location/template.tex")
    2.62  	
    2.63  *It is bothering for me to determine I should call bibtex or latex...
    2.64  	
    2.65 -	Why don't you try `latexmk' perl script, which is a TeX specific 
    2.66 -	tool as `make'?  It detects the dependency among the TeX-related 
    2.67 -	files such as .tex, .bib, and so on, and will execute suitable
    2.68 -	commands in a suitable sequence.  You can find `latexmk' script
    2.69 -	in a directory of supports/latexmk in some CTAN ftp directory.
    2.70 +	Since version 1.76, YaTeX  automatically call bibtex/latex twice
    2.71 +	if  needed.  In  most case,  you don't  have to  repeat to  call
    2.72 +	typesetter  or bibtex.   If you  use `latexmk'  described below,
    2.73 +	YaTeX's auto  rerun functionality should be  disabled by setting
    2.74 +	like this:
    2.75 +	(setq YaTeX-typeset-auto-rerun nil)
    2.76 +	
    2.77 +	The  `latexmk' perl  script, which  is  a TeX  specific tool  to
    2.78 +	automate generation  of LaTeX document.  You  can find `latexmk'
    2.79 +	some CTAN ftp directory.
    2.80 +	(eg. http://www.ctan.org/pkg/latexmk/)
    2.81  	
    2.82  *Can I inhibit auto-filling against very long <a href="..."> line?
    2.83  	
    2.84 @@ -276,12 +267,6 @@
    2.85  	you are thinking of graduating from hilit19,  it might be better
    2.86  	to keep old setting about it...
    2.87  	
    2.88 -*It's sooo slow when I click YaTeX on the menu bar.
    2.89 -	
    2.90 -	I  don't know  why.  Probably  a  problem with Emacs-19.  You'll
    2.91 -	just have to bear with it.  It won't be so slow the second time.
    2.92 -	Anyway, you probably won't use the menu at all, do you?
    2.93 -	
    2.94  *Is there any way of displaying `\it' strings in the italic font?
    2.95  	
    2.96  	First, you should find the available italic font on your
     3.1 --- a/install	Tue Jan 06 23:20:53 2015 +0900
     3.2 +++ b/install	Tue Jan 06 23:22:15 2015 +0900
     3.3 @@ -3,30 +3,25 @@
     3.4  Installation of YaTeX / 野鳥のインストール
     3.5  ******************************************
     3.6  
     3.7 -Put these expressions into your ~/.emacs
     3.8 -まず ~/.emacsに下の2項目を加えます。
     3.9 -
    3.10 -      (setq auto-mode-alist
    3.11 -           (cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
    3.12 -      (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
    3.13 -
    3.14 -Then, add certain path name where you put files of YaTeX to your
    3.15 -load-path.  If you want to put them in `~/src/emacs', write
    3.16 -次に野鳥の emacs-lisp ファイル群を置くディレクトリを load-path に加えます。
    3.17 -たとえば、`~/src/emacs/yatex'に置くのであれば、
    3.18 -
    3.19 -     (setq load-path (cons (expand-file-name "~/src/emacs/yatex") load-path))
    3.20 -
    3.21 -in your ~/.emacs.
    3.22 -などとします。
    3.23 -
    3.24 -Then edit makefile and exec the next command.
    3.25 -続いて makefile を編集し、
    3.26 +First, take a look at makefile to confirm or modify EMACS= and PREFIX=
    3.27 +lines and exec the next command.
    3.28 +このディレクトリにある makefile の EMACS= と PREFIX= の行を確認し、
    3.29 +必要なら修正した後に以下のコマンドを起動してください。
    3.30  
    3.31  	% make install 
    3.32  	(or "sudo make install")
    3.33  
    3.34 -でインストールを行ってください。
    3.35 +Then, type `make show-init' on the shell in this directory as below
    3.36 +and ou will get elisp expressions.  Add the expressions to your ~/.emacs.
    3.37 +続いて以下のようにコマンドを起動し、得られた結果出力を ~/.emacs
    3.38 +に足してください。
    3.39 +
    3.40 +	% make show-init
    3.41 +
    3.42 +After copying output from make command to your ~/.emacs, you will be able to
    3.43 +use yatex-mode for *.tex files.
    3.44 +以上で、初期設定は終わりです。
    3.45 +
    3.46  
    3.47  Without installing to default-dir, you can use yatex by adding the elisp
    3.48  obtained by below to ~/.emacs.
    3.49 @@ -36,36 +31,6 @@
    3.50  	% make show-init2
    3.51  
    3.52  
    3.53 -If `make install' fails, do as follows;
    3.54 -もし `make install' でうまく行かない時は下記のように手動でインストール
    3.55 -を行ってください。
    3.56 -
    3.57 -First, copy `*.el' to suitable directory.
    3.58 -最初に、野鳥の emacs-lisp ファイル群を適当なディレクトリにコピーします。
    3.59 -
    3.60 -Then copy `help/YATEXHLP.eng' to $EMACS/etc directory, which is
    3.61 -displayed by typin `exec-directory C-j' in the *scratch* buffer
    3.62 -(on Emacs19, $exec-directory/../../site-lisp).
    3.63 -つぎに、help/YATEXHLP.jp を Emacs の etc ディレクトリに入れます。
    3.64 -(*scratch* バッファで「exec-directory C-j」とうって示されるところです
    3.65 - Emacs19以降の場合 doc-directory の ../../site-lisp)
    3.66 -
    3.67 -
    3.68 -Finally, copy `docs/yatexe' and `docs/yahtmle' to Info directory and
    3.69 -append the contents of `dir' in this directory to `dir' of Info directory.
    3.70 -最後に、info ディレクトリに docs/yatexj, docs/yatexe, docs/yahtmlj,
    3.71 -docs/yahtmle をコピーし、info ディレクトリの dir というファイルにこのディ
    3.72 -レクトリの dir ファイルの中身を追加します。
    3.73 -
    3.74 -Note that when you byte-compile yatex19.el, do it on window system.
    3.75 -This file cannot be compiled on terminal Emacs because it requires
    3.76 -hilit19.el, which cannot be loaded on terminal Emacs.  But you don't
    3.77 -have to byte-compile it.
    3.78 -注意: yatex19.el をバイトコンパイルする時はウィンドウシステム上の emacs 
    3.79 -で行って下さい。emacs -nw では、hilit19.el がロードできず、正常にコンパ
    3.80 -イルできません。うまくいかない場合はバイトコンパイルしなくて構いません。
    3.81 -
    3.82 -
    3.83  About yahtml / yahtmlについて
    3.84  *****************************
    3.85  
     4.1 --- a/makefile	Tue Jan 06 23:20:53 2015 +0900
     4.2 +++ b/makefile	Tue Jan 06 23:22:15 2015 +0900
     4.3 @@ -135,11 +135,12 @@
     4.4  	done
     4.5  
     4.6  show-init:
     4.7 -	@printf '%s\n%s\n%s\n%s\n' \
     4.8 +	@printf '%s\n' \
     4.9  	  '(setq auto-mode-alist' \
    4.10  	  "  (cons (cons \"\\.tex$$\" 'yatex-mode) auto-mode-alist))" \
    4.11  	  "(autoload 'yatex-mode \"yatex\" \"Yet Another LaTeX mode\" t)" \
    4.12 -	  "(add-to-list 'load-path \"${LISPDIR}\")"
    4.13 +	  "(add-to-list 'load-path \"${LISPDIR}\")" \
    4.14 +	  "(setq YaTeX-help-file \"${LISPDIR}/help/YATEXHLP.eng\")"
    4.15  	@printf '(setq tex-command "%s")%s\n' \
    4.16  	 `CMDS='platex pdflatex ptex2pdf lualatex' DFLT=latex \
    4.17  	  make search-cmd`
     5.1 --- a/yatex.new	Tue Jan 06 23:20:53 2015 +0900
     5.2 +++ b/yatex.new	Tue Jan 06 23:22:15 2015 +0900
     5.3 @@ -3,7 +3,7 @@
     5.4  
     5.5  1.79	=== yatex ===
     5.6  	数式環境など特定環境内の [prefix] t e で On-the-fly preview 発動。
     5.7 -	YaTeX-help-file のデフォルト位置を site-lisp/yatex/help に変更。
     5.8 +	YaTeX-help-file のデフォルト位置を site-lisp/yatex/help/ に変更。
     5.9  	...
    5.10  
    5.11