yatex
changeset 446:778525798ef4
merged with 1.79
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 05 Jan 2017 20:45:19 +0900 |
parents | e37af485338a a3ba09c1e8e9 |
children | 59459111e042 |
files | |
diffstat | 14 files changed, 431 insertions(+), 254 deletions(-) [+] |
line diff
1.1 --- a/docs/yahtmle Sun Jul 12 14:21:20 2015 +0900 1.2 +++ b/docs/yahtmle Thu Jan 05 20:45:19 2017 +0900 1.3 @@ -1,7 +1,7 @@ 1.4 Info file: yahtmle, -*-Text-*- 1.5 produced by `texinfo-format-buffer' 1.6 from file `yahtmle.tex' 1.7 -using `texinfmt.el' version 2.38 of 3 July 1998. 1.8 +using `texinfmt.el' version 2.42 of 7 Jul 2006. 1.9 1.10 START-INFO-DIR-ENTRY 1.11 * yahtml-e: (yahtmle). Yet Another html-mode for Emacs (English). 1.12 @@ -49,9 +49,9 @@ 1.13 ***************** 1.14 * Menu: 1.15 1.16 -* Setting up yahtml:: 1.17 -* Setting environments for weblint browsers and image viewers:: 1.18 -* Setting environment variables for WWW pages:: 1.19 +* Setting up yahtml:: 1.20 +* Setting environments for weblint browsers and image viewers:: 1.21 +* Setting environment variables for WWW pages:: 1.22 1.23 1.24 1.25 @@ -110,7 +110,8 @@ 1.26 ... list of matching path name on file system and URLs 1.27 `yahtml-directory-index' 1.28 ... index file displayed when none is given in URL. Usually 1.29 - `index.html' on NCSA type httpd and `Welcome.html' on CERN types. 1.30 + `index.html' on NCSA type httpd and `Welcome.html' on CERN 1.31 + types. 1.32 1.33 Examples for `yahtml-path-url-alist'. If `/home/yuuji/http/' is 1.34 `http://localhost/~yuuji' at home and `/usr/home/yuuji/www/' is 1.35 @@ -213,10 +214,10 @@ 1.36 1.37 * Menu: 1.38 1.39 -* Changing tags in pairs:: 1.40 -* Changing entities:: 1.41 -* URLencoding of strings within region:: 1.42 -* td-enclosure/tr-enclosure:: 1.43 +* Changing tags in pairs:: 1.44 +* Changing entities:: 1.45 +* URLencoding of strings within region:: 1.46 +* td-enclosure/tr-enclosure:: 1.47 1.48 1.49 1.50 @@ -252,7 +253,7 @@ 1.51 ... convert char to special entity in marked region 1.52 `[prefix] :' 1.53 ... convert special entity to original char in marked region 1.54 - (reverse of [prefix] ;) 1.55 + (reverse of [prefix] ;) 1.56 1.57 1.58 1.59 @@ -263,7 +264,7 @@ 1.60 ==================================== 1.61 1.62 `[prefix] #' 1.63 - ... encode chars that needs to be URLencoded within region 1.64 + ... encode chars that needs to be URLencoded within region 1.65 1.66 1.67 1.68 @@ -275,15 +276,16 @@ 1.69 table element, td-enclosure or tr-enclosure is convenient. 1.70 1.71 `[prefix] }' 1.72 - 1.73 - ... Enclose each field in a region into <td>...</td>'s. 1.74 + 1.75 + ... Enclose each field in a region into <td>...</td>'s. 1.76 `[prefix] ]' 1.77 - 1.78 - ... Enclose each line in a region into <tr>...</tr>'s, with every 1.79 -line converted to <td>...</td> repetition. They presume white space as 1.80 -field separator by default. To change this, enter other delimiting 1.81 -character for a query. You can convert CSV, for example, into table by 1.82 -specifying comma(,) as a delimiter. 1.83 + 1.84 + ... Enclose each line in a region into <tr>...</tr>'s, with every 1.85 + line converted to <td>...</td> repetition. They presume 1.86 + white space as field separator by default. To change this, 1.87 + enter other delimiting character for a query. You can 1.88 + convert CSV, for example, into table by specifying comma(,) 1.89 + as a delimiter. 1.90 1.91 If you want to enclose fields with th, call with universal-argument 1.92 (`C-u'). Enter `th' to enclose fields with <th>...</th>. The special 1.93 @@ -299,8 +301,8 @@ 1.94 1.95 * Menu: 1.96 1.97 -* CSS-class completion:: 1.98 -* Reread CSS definition:: 1.99 +* CSS-class completion:: 1.100 +* Reread CSS definition:: 1.101 1.102 1.103 1.104 @@ -322,8 +324,8 @@ 1.105 .caution { font-size: 120%; background-color: 0xc00000;} 1.106 1.107 when you input any tags via completing-read, yahtml prompts you to input 1.108 -class name. If this is bothering, typing `C-j' instead of `RET' (or 1.109 -`C-m') cancels the next prompt to class name completion. 1.110 +class name. If this is bothering, typing `C-j' instead of 1.111 +`RET' (or `C-m') cancels the next prompt to class name completion. 1.112 1.113 1.114 1.115 @@ -366,8 +368,8 @@ 1.116 1.117 -- Variable: yahtml-kanji-code 1.118 Default kanji code. 1=sjis, 2=jis, 3=euc, 4=utf-8 (2) If AddType 1.119 - "text/html; charset=xxx" .html is written in .htaccess, this will 1.120 - override yahtml-kanji-code. 1.121 + "text/html; charset=xxx" .html is written in .htaccess, this 1.122 + will override yahtml-kanji-code. 1.123 1.124 -- Variable: yahtml-fill-column 1.125 Columns to auto-fill (72) 1.126 @@ -498,39 +500,35 @@ 1.127 1.128 * Menu: 1.129 1.130 -* Customize: Customizations. 4. 1.131 -* Demacs: Intro. 4. 1.132 -* Key Assign: Customizations. 4. 1.133 -* LaTeX: Intro. 4. 1.134 -* Mule: Intro. 4. 1.135 -* yahtml: Intro. 4. 1.136 - 1.137 - 1.138 - 1.139 - 1.140 +* Customize: Customizations. (line 5) 1.141 +* Demacs: Intro. (line 5) 1.142 +* Key Assign: Customizations. (line 5) 1.143 +* LaTeX: Intro. (line 5) 1.144 +* Mule: Intro. (line 5) 1.145 +* yahtml: Intro. (line 5) 1.146 1.147 Tag table: 1.148 -Node: Top256 1.149 -Node: Intro833 1.150 -Node: Installation1231 1.151 -Node: Setting up yahtml1512 1.152 -Node: Setting environments for weblint browsers and image viewers2303 1.153 -Node: Setting environment variables for WWW pages2999 1.154 -Node: Command Invocation3970 1.155 -Node: Completion4398 1.156 -Node: Jump5914 1.157 -Node: Changing and Deleting6394 1.158 -Node: Changing tags in pairs6678 1.159 -Node: Changing entities7173 1.160 -Node: URLencoding of strings within region7709 1.161 -Node: td-enclosure/tr-enclosure8010 1.162 -Node: CSS Support8976 1.163 -Node: CSS-class completion9202 1.164 -Node: Reread CSS definition10055 1.165 -Node: Customizations10330 1.166 -Node: All customizable variables10606 1.167 -Node: Hook variables14374 1.168 -Node: Copying14500 1.169 -Node: Concept Index15291 1.170 +Node: Top259 1.171 +Node: Intro836 1.172 +Node: Installation1234 1.173 +Node: Setting up yahtml1500 1.174 +Node: Setting environments for weblint browsers and image viewers2291 1.175 +Node: Setting environment variables for WWW pages2987 1.176 +Node: Command Invocation3979 1.177 +Node: Completion4407 1.178 +Node: Jump5923 1.179 +Node: Changing and Deleting6403 1.180 +Node: Changing tags in pairs6665 1.181 +Node: Changing entities7160 1.182 +Node: URLencoding of strings within region7704 1.183 +Node: td-enclosure/tr-enclosure8007 1.184 +Node: CSS Support9032 1.185 +Node: CSS-class completion9243 1.186 +Node: Reread CSS definition10096 1.187 +Node: Customizations10371 1.188 +Node: All customizable variables10647 1.189 +Node: Hook variables14427 1.190 +Node: Copying14553 1.191 +Node: Concept Index15344 1.192 1.193 End tag table
2.1 --- a/docs/yahtmlj Sun Jul 12 14:21:20 2015 +0900 2.2 +++ b/docs/yahtmlj Thu Jan 05 20:45:19 2017 +0900 2.3 @@ -1,7 +1,7 @@ 2.4 Info file: yahtmlj, -*-Text-*- 2.5 produced by `texinfo-format-buffer' 2.6 from file `yahtmlj.tex' 2.7 -using `texinfmt.el' version 2.38 of 3 July 1998. 2.8 +using `texinfmt.el' version 2.42 of 7 Jul 2006. 2.9 2.10 START-INFO-DIR-ENTRY 2.11 * yahtml: (yahtmlj). Yet Another html-mode for Emacs (Japanese). 2.12 @@ -35,10 +35,11 @@ 2.13 はじめに 2.14 ******** 2.15 2.16 -yahtmlは GNU Emacs 上で HTML文書を作成する時に、繁雑なHTMLタグの入力を補完 2.17 -機能によってスムーズに行えるようにするだけでなく、weblintなどの構文チェッ 2.18 -クプログラム、カーソル位置のURLやファイル名に依存したブラウザ/イメージヴュー 2.19 -アの起動などを Emacs 編集画面中から行えるようにするパッケージです。 2.20 +yahtmlは GNU Emacs 上で HTML文書を作成する時に、繁雑なHTMLタグの入力を 2.21 +補完機能によってスムーズに行えるようにするだけでなく、weblintなどの構 2.22 +文チェックプログラム、カーソル位置のURLやファイル名に依存したブラウザ/ 2.23 +イメージヴューアの起動などを Emacs 編集画面中から行えるようにするパッ 2.24 +ケージです。 2.25 2.26 (このInfoは未完成です(__)…) 2.27 2.28 @@ -68,17 +69,17 @@ 2.29 (cons (cons "\\.html$" 'yahtml-mode) auto-mode-alist)) 2.30 (autoload 'yahtml-mode "yahtml" "Yet Another HTML mode" t) 2.31 2.32 -次にyahtmlに必要なファイル(`yahtml.el', `yatexlib.el', `yatexprc.el') を置 2.33 -くディレクトリを load-path に加えます。たとえば、 `~/src/emacs/yahtml'に置 2.34 -くのであれば、 2.35 +次にyahtmlに必要なファイル(`yahtml.el', `yatexlib.el', 2.36 +`yatexprc.el') を置くディレクトリを load-path に加えます。たとえば、 2.37 +`~/src/emacs/yahtml'に置くのであれば、 2.38 2.39 (setq load-path (cons (expand-file-name "~/src/emacs/yahtml") load-path)) 2.40 2.41 などとします。 2.42 2.43 以上の設定により、拡張子が .html であるファイルを編集すると自動的に 2.44 -yahtml がロードされます。yahtmlが正常に起動できたときはモードラインの表示 2.45 -が「yahtml」に変わります。 2.46 +yahtml がロードされます。yahtmlが正常に起動できたときはモードラインの 2.47 +表示が「yahtml」に変わります。 2.48 2.49 2.50 2.51 @@ -87,8 +88,8 @@ 2.52 lintプログラム/ブラウザ/イメージヴューア環境等の設定 2.53 ==================================================== 2.54 2.55 -利用する外部プログラムなどに関する以下の変数を確認し、必要なら正しい値に変 2.56 -更します(括弧内はデフォルト値)。 2.57 +利用する外部プログラムなどに関する以下の変数を確認し、必要なら正しい値 2.58 +に変更します(括弧内はデフォルト値)。 2.59 `yahtml-www-browser' 2.60 ... 起動するブラウザのコマンド名(netscape) 2.61 `yahtml-image-viewer' 2.62 @@ -110,13 +111,13 @@ 2.63 ... ファイルシステム上のPATH名と、URLの対応表 2.64 `yahtml-directory-index' 2.65 ... URL指定でファイル名を省略したときに表示されるインデックス 2.66 - ファイル名(NCSA系httpdなら `index.html', CERN系なら`Welcome.html'が一 2.67 - 般的) 2.68 + ファイル名(NCSA系httpdなら `index.html', CERN系なら 2.69 + `Welcome.html'が一般的) 2.70 2.71 変数 `yahtml-path-url-alist' の設定例を示します。例えば、自宅では、 2.72 -`/home/yuuji/http/' が `http://localhost/~yuuji' で参照でき、職場では 2.73 -`/usr/home/yuuji/www/' が`http://www.keio.ac.jp/~yuuji/' で参照できるよう 2.74 -になっている場合は以下のように設定します。 2.75 +`/home/yuuji/http/' が `http://localhost/~yuuji' で参照でき、職場では 2.76 +`/usr/home/yuuji/www/' が`http://www.keio.ac.jp/~yuuji/' で参照できる 2.77 +ようになっている場合は以下のように設定します。 2.78 2.79 (setq yahtml-path-url-alist 2.80 '(("/home/yuuj/http" . "http://localhost/~yuuji") 2.81 @@ -146,26 +147,27 @@ 2.82 補完入力 2.83 ******** 2.84 2.85 -「野鳥」で利用できる、「begin型補完」、「section型補完」、「large型補完」、 2.86 -「maketitle型補完」、「アクセント補完」と全く同じキー操作で対応するHTMLタ 2.87 -グの補完入力ができます。それぞれの型の補完は順に、「複数行に渡るタグ入力」、 2.88 -「空要素タグ(imgなど)の補完」、「一行内での開始/終了タグの入力」、「空要素 2.89 -空属性タグの入力」、「文字参照入力」に対応しています。具体的には 2.90 +「野鳥」で利用できる、「begin型補完」、「section型補完」、「large型補 2.91 +完」、「maketitle型補完」、「アクセント補完」と全く同じキー操作で対応 2.92 +するHTMLタグの補完入力ができます。それぞれの型の補完は順に、「複数行に 2.93 +渡るタグ入力」、「空要素タグ(imgなど)の補完」、「一行内での開始/終了タ 2.94 +グの入力」、「空要素空属性タグの入力」、「文字参照入力」に対応していま 2.95 +す。具体的には 2.96 2.97 `[prefix] b (野鳥のbegin補完に対応)' 2.98 ... 2.99 <ul> 2.100 </ul> 2.101 2.102 - のように開始タグと終了タグを二行に渡って書きたい場合の補完を指します。 2.103 - おもにブロック型タグが補完候補に含まれます。 2.104 + のように開始タグと終了タグを二行に渡って書きたい場合の補完を指し 2.105 + ます。おもにブロック型タグが補完候補に含まれます。 2.106 2.107 `[prefix] s (野鳥のsection型補完に対応)' 2.108 ... 2.109 <img src="foo.gif" alt="photo"> 2.110 2.111 - のように終了タグを持たず、かつ属性値のみで機能を指定するタグを補完し 2.112 - ます。補完候補としては、img, input が存在します。 2.113 + のように終了タグを持たず、かつ属性値のみで機能を指定するタグを補 2.114 + 完します。補完候補としては、img, input が存在します。 2.115 2.116 `[prefix] l (野鳥のlarge型補完に対応)' 2.117 ... begin型補完とほぼ同じですが、 2.118 @@ -175,13 +177,13 @@ 2.119 のように一行内に開始/終了タグを入れたいときに利用します。 2.120 2.121 `[prefix] m (野鳥のmaketitle型補完に対応)' 2.122 - ... 要素も属性値も持たないタグを補完入力します。<br> 2.123 + ... 要素も属性値も持たないタグを補完入力します。<br> 2.124 などが補完候補に相当します。 2.125 2.126 `[prefix] a (野鳥のアクセント補完に対応)' 2.127 ... エンティティ参照による文字表記を入力するときに用います。 2.128 - デフォルトでは < (<), > (>), & (&), " ("), ' ('), 2.129 - ブランク ( ) の補完入力が行えます。 2.130 + デフォルトでは < (<), > (>), & (&), " ("), ' 2.131 + ('),ブランク ( ) の補完入力が行えます。 2.132 2.133 2.134 2.135 @@ -194,8 +196,8 @@ 2.136 `[prefix] g' 2.137 ... 対応するオブジェクトにジャンプ 2.138 2.139 -を押すことにより、カーソル位置のHTML構文に対応する場所にジャンプします。対 2.140 -応関係が存在すると解釈されるコマンドには以下のものがあります。 2.141 +を押すことにより、カーソル位置のHTML構文に対応する場所にジャンプします。 2.142 +対応関係が存在すると解釈されるコマンドには以下のものがあります。 2.143 2.144 * `<TAG>' ←→ `</TAG>' 2.145 * `<img src="画像ファイル">' → 対応するviewer起動 2.146 @@ -227,8 +229,8 @@ 2.147 `[prefix] c' 2.148 ... 対応するタグ等を変更 2.149 2.150 -を押すことにより、カーソル位置のHTML構文に応じた記述内容の変更を行います。 2.151 -カーソル位置と変更する内容の対応は以下の通りです。 2.152 +を押すことにより、カーソル位置のHTML構文に応じた記述内容の変更を行いま 2.153 +す。カーソル位置と変更する内容の対応は以下の通りです。 2.154 2.155 * `<TAG>'〜`</TAG>' 2.156 ... `TAG' の変更 2.157 @@ -241,15 +243,16 @@ 2.158 2.159 文字参照への変更 2.160 ================ 2.161 -文字としての < や > を表現するときは、文字参照を用いて< や > と表記 2.162 -する必要がありますが、HTML以外のファイルからこれらの文字を含むテキストを張 2.163 -り込んだ場合などに、これらの文字を一括して文字参照形式に変換できます。 2.164 +文字としての < や > を表現するときは、文字参照を用いて< や > と 2.165 +表記する必要がありますが、HTML以外のファイルからこれらの文字を含むテキ 2.166 +ストを張り込んだ場合などに、これらの文字を一括して文字参照形式に変換で 2.167 +きます。 2.168 2.169 `[prefix] ;' 2.170 ... 指定した領域の文字参照に置き換えるべき文字の置換 2.171 `[prefix] :' 2.172 - ... 指定した領域の文字参照を参照文字そのものに置換([prefix] ; 2.173 - の逆変換) 2.174 + ... 指定した領域の文字参照を参照文字そのものに置換 2.175 + ([prefix] ; の逆変換) 2.176 2.177 2.178 2.179 @@ -259,9 +262,9 @@ 2.180 リジョン内文字のURLencode 2.181 ========================= 2.182 `[prefix] #' 2.183 - 2.184 - ... 指定した領域内に URLencode すべき文字があればそれらをエン 2.185 - コード表記に置換。 2.186 + 2.187 + ... 指定した領域内に URLencode すべき文字があればそれらを 2.188 + エンコード表記に置換。 2.189 2.190 2.191 2.192 @@ -269,23 +272,25 @@ 2.193 2.194 td括り/tr括り 2.195 ============= 2.196 -空白区切りで書いた表形式の行レコードを <td> 括りの並び,あるいはそれらをさ 2.197 -らに <tr> で括った行並びに変換できます。 2.198 +空白区切りで書いた表形式の行レコードを <td> 括りの並び,あるいはそれら 2.199 +をさらに <tr> で括った行並びに変換できます。 2.200 `[prefix] }' 2.201 - 2.202 - ... 現在のリジョンにあるデータを空白区切りごとに 2.203 + 2.204 + ... 現在のリジョンにあるデータを空白区切りごとに 2.205 <td>...</td> で括る 2.206 `[prefix] ]' 2.207 - 2.208 - ... 現在のリジョンにある行を上記td括りをほどこしてからさらに行ごと 2.209 -に <tr>...</tr> で括るデフォルトでは空白区切りですが,これを変えるときは 2.210 -Delimiter: の問い合わせに区切り文字を指定します。たとえばカンマ(,) を指定 2.211 -するとCSVから表を作ることができます。 2.212 2.213 -td以外の要素,具体的には th で括りたい場合は universal-argument (`C-u') を 2.214 -つけて上記2つのコマンドを呼びます。どの要素で括るかの質問が増えるのでそれ 2.215 -に th と入れれば,各フィールドを <th>...</th> で括ります。もし,第1フィー 2.216 -ルドのみ th で,残りを全部 td 括りにしたいときは thd と入力して下さい。 2.217 + ... 現在のリジョンにある行を上記td括りをほどこしてからさらに行 2.218 + ごとに <tr>...</tr> で括るデフォルトでは空白区切りですが, 2.219 + これを変えるときはDelimiter: の問い合わせに区切り文字を指 2.220 + 定します。たとえばカンマ(,)を指定するとCSVから表を作るこ 2.221 + とができます。 2.222 + 2.223 +td以外の要素,具体的には th で括りたい場合は universal-argument 2.224 +(`C-u') をつけて上記2つのコマンドを呼びます。どの要素で括るかの質問が 2.225 +増えるのでそれに th と入れれば,各フィールドを <th>...</th>で括ります。 2.226 +もし,第1フィールドのみ th で,残りを全部 td 括りにしたいときは thd と 2.227 +入力して下さい。 2.228 2.229 2.230 2.231 @@ -305,34 +310,34 @@ 2.232 2.233 CSSクラス名補完 2.234 =============== 2.235 -HTML屋はCSS(Cascading Style Sheets)のクラス名を補完入力することができます。 2.236 -スタイル定義として 2.237 +HTML屋はCSS(Cascading Style Sheets)のクラス名を補完入力することができ 2.238 +ます。スタイル定義として 2.239 2.240 h1.foo, h2.foo { background-color: 0xffffff; } 2.241 h1.bar, h2.bar { font-size: 120%; } 2.242 2.243 -のようなものがあった場合に、h1またはh2タグを [prefix] b や [prefix] l で補 2.244 -完入力した場合に、それらに有効な class 名である foo, bar を候補として補完 2.245 -入力することが可能です。また 2.246 +のようなものがあった場合に、h1またはh2タグを [prefix] b や [prefix] l 2.247 +で補完入力した場合に、それらに有効な class 名である foo, bar を候補と 2.248 +して補完入力することが可能です。また 2.249 2.250 .caution { font-size: 120%; background-color: 0xc00000;} 2.251 2.252 -のような全てのエレメントに働くclassが定義されていた場合は、全てのタグの補 2.253 -完入力時にclass参照入力を求められます。これが煩わしい場合はエレメント名入 2.254 -力確定のときにリターンキー(またはC-m)ではなく、C-jを押せばclass補完入力を 2.255 -キャンセルできます。たとえば 2.256 +のような全てのエレメントに働くclassが定義されていた場合は、全てのタグ 2.257 +の補完入力時にclass参照入力を求められます。これが煩わしい場合はエレメ 2.258 +ント名入力確定のときにリターンキー(またはC-m)ではなく、C-jを押せば 2.259 +class補完入力をキャンセルできます。たとえば 2.260 2.261 - `[prefix] l' 行内タグ補完を起動 2.262 - (または`[prefix] l SPC') 2.263 + [prefix] l 行内タグ補完を起動 2.264 + (または[prefix] l SPC) 2.265 tt <tt></tt>をいれたいのでttと入力 2.266 - `C-m' 2.267 + C-m 2.268 2.269 とした場合は続いて class= と補完プロンプトが出ますが、 2.270 2.271 - `[prefix] l' 行内タグ補完を起動 2.272 - (または`[prefix] l SPC') 2.273 + [prefix] l 行内タグ補完を起動 2.274 + (または[prefix] l SPC) 2.275 tt <tt></tt>をいれたいのでttと入力 2.276 - `C-j' 2.277 + C-j 2.278 2.279 と最後を `C-j' で入力した場合は class 補完プロンプトは出ません。 2.280 2.281 @@ -342,9 +347,9 @@ 2.282 2.283 CSS定義ファイルの読み直し 2.284 ========================= 2.285 -htmlファイルを編集中にCSS定義ファイルを修正し、追加したclassを補完候補とし 2.286 -て直ちに読み込ませたい場合は、`M-x yahtml-mode' として再起動を行ってくださ 2.287 -い。 2.288 +htmlファイルを編集中にCSS定義ファイルを修正し、追加した 2.289 +classを補完候補として直ちに読み込ませたい場合は、 2.290 +`M-x yahtml-mode' として再起動を行ってください。 2.291 2.292 2.293 2.294 @@ -371,7 +376,8 @@ 2.295 yahtml-mode 中のプリフィクスキー (`\C-c') 2.296 2.297 -- Variable: yahtml-image-viewer 2.298 - imgで参照している画像ファイルを表示するときに起動するコマンド (xv) 2.299 + imgで参照している画像ファイルを表示するときに起動するコマンド 2.300 + (xv) 2.301 2.302 -- Variable: yahtml-www-browser 2.303 `[prefix]g' で外部ページを表示するときに起動するブラウザ (netscape) 2.304 @@ -379,8 +385,8 @@ 2.305 -- Variable: yahtml-kanji-code 2.306 デフォルトの漢字コード。1=sjis, 2=jis, 3=euc, 4=utf-8 (2) 2.307 .htaccess ファイルに 2.308 - AddType "text/html; charset=xxx" .html の記述があった場合はそれ 2.309 - に従う 2.310 + AddType "text/html; charset=xxx" .htmlの記述があった場合は 2.311 + それに従う 2.312 2.313 -- Variable: yahtml-fill-column 2.314 auto-fillするときのカラム数 (72) 2.315 @@ -389,17 +395,19 @@ 2.316 yahtml-mode 固有のfill-prefix (`nil') 2.317 2.318 -- Variable: yahtml-path-url-alist 2.319 - OSのファイルシステム上でのフルパス名と、その外部公開時のURLの対応表。 2.320 + OSのファイルシステム上でのフルパス名と、その外部公開時のURLの対応 2.321 + 表。 2.322 2.323 -- Variable: yahtml-directory-index 2.324 - サーバアクセス時ファイル名を省略したときにデフォルトで開かれるインデッ 2.325 - クスファイルの名前。多くの場合 index.html。(`"index.html"') 2.326 + サーバアクセス時ファイル名を省略したときにデフォルトで開かれるイ 2.327 + ンデックスファイルの名前。多くの場合 index.html。(`"index.html"') 2.328 2.329 -- Variable: yahtml-lint-program 2.330 HTML構文チェックプログラム。(`"jweblint"') 2.331 2.332 -- Variable: yahtml-hate-too-deep-indentation 2.333 - ネストした列挙系環境でのインデントが深すぎるときにtにする。(`nil') 2.334 + ネストした列挙系環境でのインデントが深すぎるときにtにする。 2.335 + (`nil') 2.336 2.337 -- Variable: yahtml-always-/p 2.338 `<p>' をいれたら必ず `</p>' したい人向け。`nil' 2.339 @@ -423,26 +431,27 @@ 2.340 ./.htaccess を参照するかどうかを決定する。`'apache' 2.341 2.342 -- Variable: yahtml-apache-access-file 2.343 - `yahtml-server-type' が `'apache' のときにアクセス制限ファイル名を指 2.344 - 定。`".htaccess"' 2.345 + `yahtml-server-type' が `'apache' のときにアクセス制限ファイル名 2.346 + を指定。`".htaccess"' 2.347 2.348 -- Variable: yahtml-shell-command-option 2.349 シェルで別コマンドを起動するときのオプション。 2.350 2.351 -- Variable: yahtml-translate-hyphens-when-comment-region 2.352 - 領域コメントアウトをするときに既に存在するハイフンを `-' に変更す 2.353 - るかどうか。(`t') 2.354 + 領域コメントアウトをするときに既に存在するハイフンを `-' に変 2.355 + 更するかどうか。(`t') 2.356 2.357 -- Variable: yahtml-entity-reference-chars-alist 2.358 - エンティティ参照(Entity Reference)で記述すべき文字群を`'(?文字 . "エ 2.359 - ンティティ表記")' という形式を列挙したalistで並べる。デフォルトで 2.360 - `<', `>', `&', `'', `"' に対するalistが設定されているので、追加したい 2.361 - 分だけを記述すれば良い。cdr部 `"エンティティ表記"' は、先頭の `&' と 2.362 - 末尾の`;' は含めずに書く。 2.363 + エンティティ参照(Entity Reference)で記述すべき文字群を`'(?文 2.364 + 字 . "エンティティ表記")' という形式を列挙したalistで並べる。デ 2.365 + フォルトで `<', `>', `&', `'', `"' に対するalistが設定されている 2.366 + ので、追加したい分だけを記述すれば良い。cdr部 `"エンティティ表記 2.367 + "' は、先頭の `&' と 末尾の`;'は含めずに書く。 2.368 2.369 -- Variable: yahtml-faithful-to-htmllint 2.370 - 構文チェッカとして htmllint を利用する場合ちょっとした余計な空白など 2.371 - に対しても警告を示すので、これを回避するときにはこの変数を`t'にする。 2.372 + 構文チェッカとして htmllint を利用する場合ちょっとした余計な空白 2.373 + などに対しても警告を示すので、これを回避するときにはこの変数を`t' 2.374 + にする。 2.375 2.376 -- Variable: yahtml-use-css 2.377 CSSの補完機能を使うかどうか (`t') 2.378 @@ -451,12 +460,12 @@ 2.379 画像ファイルのサイズを調べるときに読み込むバイト数 (`10000') 2.380 2.381 -- Variable: yahtml:img-default-alt-format 2.382 - <img src...>のALT属性のデフォルト文字列の書式。%xは画像の幅、%yは画像 2.383 - の高さ、%sはファイルサイズに置換される (`"%xx%y(%sbytes)"') 2.384 + <img src...>のALT属性のデフォルト文字列の書式。%xは画像の幅、%yは 2.385 + 画像の高さ、%sはファイルサイズに置換される (`"%xx%y(%sbytes)"') 2.386 2.387 -- Variable: yahtml-escape-chars 2.388 - href補完などのときに予約文字をURLエンコードするか; 'askのときは確認し 2.389 - てから置換する (`'ask') 2.390 + href補完などのときに予約文字をURLエンコードするか; 'askのときは確 2.391 + 認してから置換する (`'ask') 2.392 2.393 -- Variable: yahtml-use-font-lock 2.394 ソースの色づけパッケージとして font-lock を利用するか(`(featurep 2.395 @@ -467,7 +476,8 @@ 2.396 'hilit19)') 2.397 2.398 -- Variable: yahtml-indentation-boundary 2.399 - インデント計算を打ち切ってよい境界となる正規表現(`"^\\s *<h[1-3]>"') 2.400 + インデント計算を打ち切ってよい境界となる正規表現(`"^\\s 2.401 + *<h[1-3]>"') 2.402 2.403 2.404 2.405 @@ -484,19 +494,19 @@ 2.406 取り扱い 2.407 ******** 2.408 2.409 - 本プログラムはフリーソフトウェアです。本プログラムを使用して生じたいかな 2.410 -る結果に対しても作者は責任を負わないこととします。転載等に関しては制限いた 2.411 -しません。常識的に扱ってください。また、使用している旨をメイルでお知らせい 2.412 -ただくと、作者は喜んでサポートに励むことでしょう。 2.413 + 本プログラムはフリーソフトウェアです。本プログラムを使用して生じたい 2.414 +かなる結果に対しても作者は責任を負わないこととします。転載等に関しては 2.415 +制限いたしません。常識的に扱ってください。また、使用している旨をメイル 2.416 +でお知らせいただくと、作者は喜んでサポートに励むことでしょう。 2.417 2.418 - 苦情、希望、バグ報告、感想等は歓迎いたします。連絡は yuuji@yatex.org ま 2.419 -で(2000年12月現在)。継続的に使用してくださる方はメイリングリスト「fj野鳥の 2.420 -会」に是非加入してください。加入方法については本パッケージの `docs/htmlqa' 2.421 -ファイルの「その他」の章を御覧ください。 2.422 + 苦情、希望、バグ報告、感想等は歓迎いたします。連絡は yuuji@yatex.org 2.423 +まで(2000年12月現在)。継続的に使用してくださる方はメイリングリスト「fj 2.424 +野鳥の会」に是非加入してください。加入方法については本パッケージの 2.425 +`docs/htmlqa'ファイルの「その他」の章を御覧ください。 2.426 2.427 仕様は、予告なく確実に(気分次第で)変更されます:-p。 2.428 2.429 - 広瀬雄二 2.430 + 広瀬雄二 2.431 2.432 2.433 2.434 @@ -508,39 +518,35 @@ 2.435 2.436 * Menu: 2.437 2.438 -* カスタマイズ[かすたまいす]: Customizations. 4. 2.439 -* キーアサイン[きいあさいん]: Customizations. 4. 2.440 -* Demacs: Intro. 4. 2.441 -* HTMLョ[HTMLや]: Intro. 4. 2.442 -* LaTeX: Intro. 4. 2.443 -* Mule: Intro. 4. 2.444 - 2.445 - 2.446 - 2.447 - 2.448 +* キーアサイン[きいあさいん]: Customizations. (line 5) 2.449 +* カスタマイズ[かすたまいす]: Customizations. (line 5) 2.450 +* Demacs: Intro. (line 5) 2.451 +* HTML屋[HTMLや]: Intro. (line 5) 2.452 +* LaTeX: Intro. (line 5) 2.453 +* Mule: Intro. (line 5) 2.454 2.455 Tag table: 2.456 -Node: Top257 2.457 -Node: Intro726 2.458 -Node: Installation1005 2.459 -Node: yahtml起動のための設定1193 2.460 -Node: lintプログラム/ブラウザ/イメージヴューア環境等の設定1847 2.461 -Node: WWWページ環境用変数の設定2347 2.462 -Node: Command Invocation3118 2.463 -Node: Completion3445 2.464 -Node: Jump4429 2.465 -Node: Changing and Deleting4828 2.466 -Node: 対タグの変更5002 2.467 -Node: 文字参照への変更5352 2.468 -Node: リジョン内文字のURLencode5735 2.469 -Node: td括り/tr括り5969 2.470 -Node: CSS Support6598 2.471 -Node: CSS-class completion6796 2.472 -Node: Reread CSS file7792 2.473 -Node: Customizations8014 2.474 -Node: All customizable variables8238 2.475 -Node: Hook variables11236 2.476 -Node: Copying11348 2.477 -Node: Concept Index11851 2.478 +Node: Top260 2.479 +Node: Intro729 2.480 +Node: Installation1009 2.481 +Node: yahtml起動のための設定1197 2.482 +Node: lintプログラム/ブラウザ/イメージヴューア環境等の設定1849 2.483 +Node: WWWページ環境用変数の設定2349 2.484 +Node: Command Invocation3151 2.485 +Node: Completion3478 2.486 +Node: Jump4460 2.487 +Node: Changing and Deleting4859 2.488 +Node: 対タグの変更5033 2.489 +Node: 文字参照への変更5383 2.490 +Node: リジョン内文字のURLencode5775 2.491 +Node: td括り/tr括り6014 2.492 +Node: CSS Support6688 2.493 +Node: CSS-class completion6886 2.494 +Node: Reread CSS file7869 2.495 +Node: Customizations8091 2.496 +Node: All customizable variables8315 2.497 +Node: Hook variables11343 2.498 +Node: Copying11455 2.499 +Node: Concept Index11951 2.500 2.501 End tag table
3.1 --- a/makefile Sun Jul 12 14:21:20 2015 +0900 3.2 +++ b/makefile Thu Jan 05 20:45:19 2017 +0900 3.3 @@ -48,7 +48,7 @@ 3.4 # make clean to delete all producted files 3.5 # make ci to check in all 3.6 # make co to check out all 3.7 -MVER = 1.78 3.8 +MVER = 1.79 3.9 LISP = ${LISP18} ${LISP19} ${LISP23} 3.10 YAHTML = yahtml.el 3.11 COMMON = yatexlib.el yatexprc.el 3.12 @@ -241,10 +241,6 @@ 3.13 dostci: 3.14 ci -l${MVER}.0 -Ncurrent @rcsfile 3.15 3.16 -gohome: 3.17 - zip -u -r /com/okoma/yuuji/tmp/dosconv/yatex.zip . \ 3.18 - -x '*RCS/*' -x 'texinfo/*' 3.19 - 3.20 RSYNCDIR = ${HOME}/http/yatex/rsync/yatex 3.21 #sync: 3.22 # @-mkdir ${PACKDIR}
4.1 --- a/yahtml.el Sun Jul 12 14:21:20 2015 +0900 4.2 +++ b/yahtml.el Thu Jan 05 20:45:19 2017 +0900 4.3 @@ -1,9 +1,9 @@ 4.4 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- 4.5 -;;; (c) 1994-2015 by HIROSE Yuuji [yuuji(@)yatex.org] 4.6 -;;; Last modified Wed Feb 11 12:17:03 2015 on firestorm 4.7 +;;; (c) 1994-2017 by HIROSE Yuuji [yuuji(@)yatex.org] 4.8 +;;; Last modified Thu Jan 5 17:45:36 2017 on firestorm 4.9 ;;; $Id$ 4.10 4.11 -(defconst yahtml-revision-number "1.78.1" 4.12 +(defconst yahtml-revision-number "1.79" 4.13 "Revision number of running yahtml.el") 4.14 4.15 ;;; Commentary: 4.16 @@ -369,6 +369,7 @@ 4.17 (yahtml-define-begend-key "b3" "h3" map) 4.18 (yahtml-define-begend-key "ba" "a" map) 4.19 (yahtml-define-begend-key "bf" "form" map) 4.20 + (yahtml-define-begend-key "bl" "label" map) 4.21 (yahtml-define-begend-key "bs" "select" map) 4.22 (yahtml-define-begend-key "bv" "div" map) 4.23 (yahtml-define-begend-key "bS" "span" map) 4.24 @@ -382,7 +383,7 @@ 4.25 (YaTeX-define-key "k" 'yahtml-kill-* map) 4.26 (YaTeX-define-key "c" 'yahtml-change-* map) 4.27 (YaTeX-define-key "t" 'yahtml-browse-menu map) 4.28 - (YaTeX-define-key "a" 'yahtml-complete-mark map) 4.29 + (YaTeX-define-key "a" 'yahtml-char-entity-ref map) 4.30 (YaTeX-define-key "'" 'yahtml-prev-error map) 4.31 (YaTeX-define-key ";" 'yahtml-translate-region map) 4.32 (YaTeX-define-key ":" 'yahtml-translate-reverse-region map) 4.33 @@ -424,7 +425,7 @@ 4.34 4.35 ;;; Completion tables for `form' 4.36 (defvar yahtml-form-table 4.37 - '(("img") ("input") ("link") ("meta"))) 4.38 + '(("img") ("input") ("link") ("meta") ("label") ("source"))) 4.39 (defvar yahtml-user-form-table nil) 4.40 (defvar yahtml-tmp-form-table nil) 4.41 (defvar yahtml-last-form "img") 4.42 @@ -441,7 +442,9 @@ 4.43 ("h1") ("h2") ("h3") ("h4") ("h5") ("h6") 4.44 ;; ("p") ;This makes indentation screwed up! 4.45 ("style") ("script") ("noscript") ("div") ("object") ("ins") ("del") 4.46 - ("option") 4.47 + ("option") ("datalist") 4.48 + ;;HTML5 4.49 + ("video") ("audio") 4.50 )) 4.51 4.52 (if yahtml-html4-strict 4.53 @@ -473,7 +476,7 @@ 4.54 (append 4.55 '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp") ("caption") 4.56 ("strong") ("var") ("b") ("i") ("tt") ("big") ("small") 4.57 - ("sup") ("sub") ("span") ("abbr")) 4.58 + ("sup") ("sub") ("span") ("abbr") ("label")) 4.59 (if (not yahtml-html4-strict) 4.60 '(("strike") ("s") ("u") ("font"))) 4.61 yahtml-env-table) 4.62 @@ -563,7 +566,7 @@ 4.63 (defun yahtml-dir-default-charset () 4.64 (let*((fn (file-name-nondirectory (or buffer-file-name ""))) 4.65 (ext (substring fn (or (string-match "\\.[a-z0-9]+$" fn) 0))) 4.66 - (ptn (format "^\\s *AddType.*charset=\\(.*\\)\\%s$" ext)) 4.67 + (ptn (format "^\\s *AddType.*charset=\\(.*\\)\\%s\\>" ext)) 4.68 (case-fold-search t) 4.69 line 4.70 charset) 4.71 @@ -869,7 +872,7 @@ 4.72 (insert "\n") 4.73 (indent-to-column cc) 4.74 (insert (format "</%s>" cmd))) 4.75 - (if (string-match "^a\\|p$" cmd) ;aとp決め打ちってのが美しくない… 4.76 + (if (string-match "^[ap]$" cmd) ;aとp決め打ちってのが美しくない… 4.77 (newline) 4.78 (yahtml-intelligent-newline nil)) 4.79 (yahtml-indent-line)))) 4.80 @@ -940,7 +943,7 @@ 4.81 (and (setq a (yahtml-css-get-element-completion-alist form)) 4.82 (not (equal (YaTeX-last-key) ?\C-j)) 4.83 (memq yahtml-current-completion-type '(multiline inline)) 4.84 - (not (string-match "#" form)) 4.85 + (not (string-match "#\\|source" form)) 4.86 (yahtml-make-optional-argument ;should be made generic? 4.87 "class" (yahtml-read-css a form))) 4.88 (if (and (intern-soft addin) (fboundp (intern-soft addin)) 4.89 @@ -950,18 +953,20 @@ 4.90 "")))) 4.91 4.92 (defvar yahtml-completing-buffer nil) 4.93 -(defun yahtml-collect-labels (&optional file) 4.94 +(defun yahtml-collect-labels (&optional file ptn withouthash) 4.95 "Collect current buffers label (<?? name=...>). 4.96 If optional argument FILE is specified collect labels in FILE." 4.97 - (let (list end) 4.98 + (let ((attrptn (concat "\\(" (or ptn "name\\|id") "\\)\\s *=")) 4.99 + (hash (if withouthash "" "#")) 4.100 + list end) 4.101 (save-excursion 4.102 - (set-buffer yahtml-completing-buffer) 4.103 + (set-buffer (or yahtml-completing-buffer (current-buffer))) 4.104 (if file (let (hilit-auto-highlight) 4.105 (set-buffer (find-file-noselect file)))) 4.106 (save-excursion 4.107 (goto-char (point-min)) 4.108 (while ;(re-search-forward "<\\w+\\b" nil t) 4.109 - (re-search-forward "\\(name\\|id\\)\\s *=" nil t) 4.110 + (re-search-forward attrptn nil t) 4.111 ;(setq bound (match-end 0)) 4.112 ;(search-forward ">" nil t) 4.113 (setq end (match-end 0)) 4.114 @@ -972,10 +977,13 @@ 4.115 (skip-chars-forward " \t\n") 4.116 (looking-at "\"?#?\\([^\">]+\\)\"?\\b"))) 4.117 (setq list (cons 4.118 - (list (concat "#" (YaTeX-match-string 1))) 4.119 + (list (concat hash (YaTeX-match-string 1))) 4.120 list)))) 4.121 list)))) 4.122 4.123 +(defun yahtml-collect-ids (&optional file) 4.124 + (yahtml-collect-labels file "id" 'withouthash)) 4.125 + 4.126 (defvar yahtml-url-completion-map nil "Key map used in URL completion buffer") 4.127 (if yahtml-url-completion-map nil 4.128 (setq yahtml-url-completion-map 4.129 @@ -1151,7 +1159,7 @@ 4.130 '(("align" ("top") ("middle") ("bottom") ("left") ("right") ("center")) 4.131 ("clear" ("left") ("right") ("center") ("all") ("none")) 4.132 ("lang" ("ja") ("en") ("kr") ("ch") ("fr")) 4.133 - ("src" . file) ("file" . file) 4.134 + ("src" . file) ("file" . file) ("poster" . file) 4.135 ("background" . file) 4.136 ("class file name" . file) ("data" . file) 4.137 ("method" ("POST") ("GET")) 4.138 @@ -1175,7 +1183,7 @@ 4.139 ("image/jpeg") ("image/gif") ("image/tiff") ("image/png") ("video/mpeg")) 4.140 "Alist of content-types") 4.141 4.142 -(defun yahtml-read-parameter (par &optional default alist) 4.143 +(defun yahtml-read-parameter (par &optional default alist predicate) 4.144 (let* ((alist 4.145 (cdr-safe (assoc (downcase par) 4.146 (or alist yahtml-parameters-completion-alist)))) 4.147 @@ -1184,7 +1192,7 @@ 4.148 (cond 4.149 ((eq alist 'file) 4.150 (let ((insert-default-directory)) 4.151 - (read-file-name prompt "" default nil ""))) 4.152 + (read-file-name prompt "" default nil "" predicate))) 4.153 ((eq alist 'command) 4.154 (if (fboundp 'read-shell-command) 4.155 (read-shell-command prompt) 4.156 @@ -1196,6 +1204,17 @@ 4.157 (completing-read-with-history prompt alist nil nil default)) 4.158 (t 4.159 (read-string-with-history prompt default))))) 4.160 + 4.161 +(defun yahtml-read-file-name-regexp 4.162 + (prompt regexp &optional dir default-filename mustmatch initial) 4.163 + (let ((pred 4.164 + (function 4.165 + (lambda (f) 4.166 + (or (file-name-directory f) 4.167 + (string-match regexp f))))) 4.168 + (insert-default-directory nil)) 4.169 + (read-file-name prompt dir default-filename mustmatch initial pred))) 4.170 + 4.171 4.172 (defun yahtml-make-optional-argument (opt arg) 4.173 "Make optional argument string." 4.174 @@ -1416,9 +1435,15 @@ 4.175 4.176 (defun yahtml:select () 4.177 "Add-in function for `select' input format" 4.178 - (setq yahtml-last-single-cmd "option") 4.179 + (setq yahtml-last-single-cmd "option" ;;<- it's old 4.180 + yahtml-last-typeface-cmd "option") 4.181 (concat " " (if yahtml-prefer-upcase-attributes "NAME" "name") "=\"" 4.182 (read-string-with-history "name: ") "\"")) 4.183 +(defun yahtml:label () 4.184 + "Add-in function for `<label>'" 4.185 + (yahtml-make-optional-argument 4.186 + "for" 4.187 + (YaTeX-completing-read-or-skip "for=" (yahtml-collect-ids) nil t))) 4.188 4.189 (defun yahtml:ol () 4.190 "Add-in function for <ol>" 4.191 @@ -1447,22 +1472,31 @@ 4.192 4.193 (defun yahtml:input () 4.194 "Add-in function for `input' form" 4.195 - (let ((size "") name type value checked (maxlength "") 4.196 + (let ((size "") name type value id (maxlength "") 4.197 (l yahtml-prefer-upcase-attributes)) 4.198 (setq name (read-string-with-history "name: ") 4.199 type (YaTeX-completing-read-or-skip "type (default=text): " 4.200 yahtml-input-types nil t) 4.201 - value (YaTeX-read-string-or-skip "value: ")) 4.202 - (if (string-match "text\\|password\\|^$" type) 4.203 + value (YaTeX-read-string-or-skip "value: ") 4.204 + id (YaTeX-read-string-or-skip "id: ")) 4.205 + (if (string-match "text\\|password\\|^$" typxe) 4.206 (setq size (YaTeX-read-string-or-skip "size: ") 4.207 maxlength (YaTeX-read-string-or-skip "maxlength: "))) 4.208 (concat 4.209 (if l "NAME" "name") "=\"" name "\"" 4.210 (yahtml-make-optional-argument "type" type) 4.211 (yahtml-make-optional-argument "value" value) 4.212 + (yahtml-make-optional-argument "id" id) 4.213 (yahtml-make-optional-argument "size" size) 4.214 (yahtml-make-optional-argument "maxlength" maxlength)))) 4.215 4.216 +(defun yahtml:datalist () 4.217 + "Add-in function for `datalist' form" 4.218 + (setq yahtml-last-typeface-cmd "option") 4.219 + (let ((ids (yahtml-collect-ids))) 4.220 + (yahtml-make-optional-argument 4.221 + "id" (YaTeX-completing-read-or-skip "id: " ids nil t)))) 4.222 + 4.223 (defun yahtml:textarea () 4.224 "Add-in function for `textarea'" 4.225 (interactive) 4.226 @@ -1479,8 +1513,9 @@ 4.227 (defun yahtml:table () 4.228 "Add-in function for `table'" 4.229 (let ((b (read-string-with-history "border=")) 4.230 - (a (yahtml-read-parameter 4.231 - "align" nil '(("align" ("right")("center")))))) 4.232 + (a (if yahtml-html4-strict "" 4.233 + (yahtml-read-parameter 4.234 + "align" nil '(("align" ("right")("center"))))))) 4.235 (if yahtml-html4-strict 4.236 (yahtml-make-optional-argument 4.237 "style" 4.238 @@ -1758,6 +1793,38 @@ 4.239 (format "cmd=\"%s\"--" 4.240 (yahtml-read-parameter "cmd" "" '(("cmd" . command))))) 4.241 4.242 +(defun yahtml:media-read-options (&optional opts-alist) 4.243 + (let*((delim " ") 4.244 + (minibuffer-completion-table 4.245 + (or opts-alist '(("autoplay") ("controls") ("loop") ("preload")))) 4.246 + (quotekey (substitute-command-keys "\\[quoted-insert]"))) 4.247 + (read-from-minibuffer-with-history 4.248 + (format "Media Opts(`%s SPC' for more options): " quotekey) 4.249 + "controls" YaTeX-minibuffer-completion-map))) 4.250 + 4.251 +(defun yahtml:audio () 4.252 + ;preload autoplay loop controls: `src' be specified via `source' 4.253 + (yahtml:media-read-options)) 4.254 + 4.255 +(defun yahtml:video () 4.256 + ;`src' be specified via `source' 4.257 + (let ((poster (yahtml-make-optional-argument 4.258 + "poster" 4.259 + (yahtml-read-file-name-regexp 4.260 + "Poster: " "\\.\\(gif\\|png\\|jpg\\|w?bmp\\|pict\\|tif\\)" 4.261 + ""))) 4.262 + (opts (yahtml:media-read-options))) 4.263 + (concat poster (if (string< "" opts) (concat " " opts))))) 4.264 + 4.265 +(defvar yahtml-media-file-regexp 4.266 + "\\.\\(mp[0-9]\\|wav\\|og[gv]\\|opus\\|aac\\)" 4.267 + "*Default filename regexp of media files.") 4.268 + 4.269 +(defun yahtml:source () 4.270 + ;; source element must have src attribute 4.271 + (format "src=\"%s\"" (yahtml-read-file-name-regexp 4.272 + "source: " yahtml-media-file-regexp "" "" nil ""))) 4.273 + 4.274 ;;; ---------- Jump ---------- 4.275 (defun yahtml-on-href-p () 4.276 "Check if point is on href clause." 4.277 @@ -2836,6 +2903,11 @@ 4.278 4.279 (fset 'yahtml-intelligent-newline-ol 'yahtml-intelligent-newline-ul) 4.280 4.281 +(defun yahtml-intelligent-newline-datalist () 4.282 + (interactive) 4.283 + (yahtml-insert-form "option") 4.284 + (save-excursion (yahtml-insert-form "/option"))) 4.285 + 4.286 (defun yahtml-intelligent-newline-dl () 4.287 (interactive) 4.288 (let ((case-fold-search t)) 4.289 @@ -2960,6 +3032,22 @@ 4.290 (goto-char (+ 8 cp)) 4.291 (yahtml-indent-line))))))) 4.292 4.293 +(defun yahtml-intelligent-newline-audio () 4.294 + (let (b e) 4.295 + (if (save-excursion 4.296 + (goto-char (setq b (get 'YaTeX-inner-environment 'point))) 4.297 + (forward-list 1) 4.298 + (setq e (point)) 4.299 + (catch 'src 4.300 + (while (re-search-forward "\\s src\\>" e t) 4.301 + (skip-chars-forward " \t\n") 4.302 + (and (looking-at "=") (throw 'src t))))) 4.303 + ;; if src= attribute found, do nothing 4.304 + (setq yahtml-last-begend "p") 4.305 + (yahtml-insert-single "source") 4.306 + ))) 4.307 +(fset 'yahtml-intelligent-newline-video 'yahtml-intelligent-newline-audio) 4.308 + 4.309 ;;; ---------- Marking ---------- 4.310 (defun yahtml-mark-begend () 4.311 "Mark current tag" 4.312 @@ -2975,18 +3063,19 @@ 4.313 (if (eolp) (forward-char 1))) 4.314 4.315 ;;; ---------- complete marks ---------- 4.316 -(defun yahtml-complete-mark () 4.317 - "Complete >, <, &ersand, and "e." 4.318 +(defun yahtml-char-entity-ref () 4.319 + "Complete >, <, &, and "." 4.320 (interactive) 4.321 (message "1:< 2:> 3:& 4:\" 5:' 6:nbsp") 4.322 - (let ((c (read-char))) 4.323 - (setq c (if (or (< c ?0) (> c ?7)) 4.324 - (string-match (regexp-quote (char-to-string c)) "<>&\"") 4.325 + (let ((c (read-char)) d) 4.326 + (setq d (if (or (< c ?0) (> c ?7)) 4.327 + (string-match (regexp-quote (char-to-string c)) "<>&\"' ") 4.328 (- c ?1))) 4.329 - (if (or (< c 0) (> c 6)) 4.330 - nil 4.331 + (cond 4.332 + ((null d) (insert (format "&#x%x;" c))) 4.333 + ((and (>= d 0) (<= d 6)) 4.334 (insert (format "&%s;" 4.335 - (nth c '("lt" "gt" "amp" "quot" "apos" "nbsp"))))))) 4.336 + (nth d '("lt" "gt" "amp" "quot" "apos" "nbsp")))))))) 4.337 4.338 4.339 ;;; ---------- jump to error line ----------
5.1 --- a/yatex.el Sun Jul 12 14:21:20 2015 +0900 5.2 +++ b/yatex.el Thu Jan 05 20:45:19 2017 +0900 5.3 @@ -1,6 +1,6 @@ 5.4 ;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*- 5.5 -;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 5.6 -;;; Last modified Wed Jul 8 13:41:17 2015 on duke 5.7 +;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org] 5.8 +;;; Last modified Thu Jan 5 17:45:40 2017 on firestorm 5.9 ;;; $Id$ 5.10 ;;; The latest version of this software is always available at; 5.11 ;;; http://www.yatex.org/ 5.12 @@ -8,7 +8,7 @@ 5.13 ;;; Code: 5.14 (require 'comment) 5.15 (require 'yatexlib) 5.16 -(defconst YaTeX-revision-number "1.78.9" 5.17 +(defconst YaTeX-revision-number "1.79" 5.18 "Revision number of running yatex.el") 5.19 5.20 ;---------- Local variables ---------- 5.21 @@ -283,7 +283,7 @@ 5.22 ("footnote") ("footnotetext") ("index") 5.23 ("hspace*") ("vspace*") ("bibliography") ("bibitem") ("cite") 5.24 ("input") ("include") ("includeonly") ("mbox") ("hbox") ("caption") 5.25 - ("arabic") 5.26 + ("arabic") ("cetering") ("uline") 5.27 ("newcounter") 5.28 ("newlength") ("setlength" 2) ("addtolength" 2) ("settowidth" 2) 5.29 ("setcounter" 2) ("addtocounter" 2) ("stepcounter" 2) 5.30 @@ -299,13 +299,15 @@ 5.31 ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") 5.32 ;;cleveref 5.33 ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref") 5.34 + ;; beamer 5.35 + ("frametitle") ("framesubtitle") 5.36 ) 5.37 (if YaTeX-use-LaTeX2e 5.38 '(("documentclass") ("usepackage") 5.39 ("textbf") ("textgt") ("textit") ("textmc") ("textmd") ("textnormal") 5.40 ("textrm") ("textsc") ("textsf") ("textsl") ("texttt") ("textup") 5.41 ("mathbf") ("mathcal") ("mathit") ("mathnormal") ("mathrm") 5.42 - ("mathsf") ("mathtt") 5.43 + ("mathsf") ("mathtt") ("text") 5.44 ("textcircled") 5.45 ("scalebox" 1) ;is faking of argument position 5.46 ("rotatebox" 2) ("resizebox" 3) ("reflectbox") 5.47 @@ -359,6 +361,7 @@ 5.48 ("minipage") 5.49 ("supertabular") 5.50 ("wrapfigure") ("wraptable") 5.51 + ("frame") ("block") ("example") ("columns") ("column") ;beamer 5.52 ) 5.53 (if YaTeX-use-LaTeX2e 5.54 '(("comment") ;defined in version 5.55 @@ -410,6 +413,7 @@ 5.56 ("linebreak") ("pagebreak") ("noindent") ("indent") 5.57 ("left") ("right") ("dots") ("smallskip") ("medskip") ("bigskip") 5.58 ("displaystyle") 5.59 + ("onslide") ("pause") ;beamer 5.60 ) 5.61 (if YaTeX-greek-by-maketitle-completion 5.62 '(("alpha") ("beta") ("gamma") ("delta") ("epsilon")
6.1 --- a/yatex.new Sun Jul 12 14:21:20 2015 +0900 6.2 +++ b/yatex.new Thu Jan 05 20:45:19 2017 +0900 6.3 @@ -12,8 +12,9 @@ 6.4 タイプセットでPDF出力がありそうなときは次回previewをPDFヴューアに。 6.5 === yahtml === 6.6 領域活性時に呼び出す補完は領域括りになるようにした。 6.7 - ... 6.8 - 6.9 + audio, video, label要素対応 6.10 + datalistでidを補完対象に 6.11 + 文字実体参照補完([prefix] a)でタイプした文字を入力できるようにした。 6.12 6.13 1.78 Drag&Dropサポートを追加。 6.14 tabular環境内で2連続以上Tabで、1カラム進む機能を追加。
7.1 --- a/yatex19.el Sun Jul 12 14:21:20 2015 +0900 7.2 +++ b/yatex19.el Thu Jan 05 20:45:19 2017 +0900 7.3 @@ -1,6 +1,6 @@ 7.4 ;;; yatex19.el -- YaTeX facilities for Emacs 19 or later -*- coding: sjis -*- 7.5 -;;; (c)1994-2015 by HIROSE Yuuji.[yuuji@yatex.org] 7.6 -;;; Last modified Fri Jan 16 15:03:58 2015 on firestorm 7.7 +;;; (c)1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 7.8 +;;; Last modified Thu Jan 5 17:45:46 2017 on firestorm 7.9 ;;; $Id$ 7.10 7.11 ;;; Code:
8.1 --- a/yatex23.el Sun Jul 12 14:21:20 2015 +0900 8.2 +++ b/yatex23.el Thu Jan 05 20:45:19 2017 +0900 8.3 @@ -1,8 +1,9 @@ 8.4 ;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*- 8.5 -;;; (c)2014-2015 by HIROSE Yuuji.[yuuji@yatex.org] 8.6 -;;; Last modified Sun Jan 18 21:12:27 2015 on firestorm 8.7 +;;; (c)2014-2017 by HIROSE Yuuji.[yuuji@yatex.org] 8.8 +;;; Last modified Thu Jan 5 17:45:48 2017 on firestorm 8.9 ;;; $Id$ 8.10 8.11 +(require 'yatex19) 8.12 ;;; Code: 8.13 (defvar YaTeX-dnd-auto-figure "figure" 8.14 "*If set, include dropped \\includegraphcs{} into that environment.
9.1 --- a/yatexadd.el Sun Jul 12 14:21:20 2015 +0900 9.2 +++ b/yatexadd.el Thu Jan 05 20:45:19 2017 +0900 9.3 @@ -1,6 +1,6 @@ 9.4 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 9.5 -;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 9.6 -;;; Last modified Wed Jul 8 09:15:15 2015 on firestorm 9.7 +;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org] 9.8 +;;; Last modified Thu Jan 5 17:45:50 2017 on firestorm 9.9 ;;; $Id$ 9.10 9.11 ;;; Code: 9.12 @@ -2105,6 +2105,85 @@ 9.13 ((memq c '(?c ?C)) (setq left "{\\scriptsize " right "}"))) 9.14 (format "%s%s%s" left char right))))) 9.15 9.16 +;;; -------------------- beamer stuff -------------------- 9.17 +(defvar YaTeX:frame-option-alist-default 9.18 + '(("plain") ("containsverbatim") ("shrink") ("squeeze") 9.19 + ("allowframebreaks") ("label="))) 9.20 +(defvar YaTeX:frame-option-alist-private nil 9.21 + "*Alist for completion list of the argument for `frame' environemnt") 9.22 +(defvar YaTeX:frame-option-alist 9.23 + (append YaTeX:frame-option-alist-private YaTeX:frame-option-alist-default)) 9.24 + 9.25 +(defun YaTeX:frame () 9.26 + (let*((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 9.27 + (delim ",") 9.28 + (opt (YaTeX-completing-read-or-skip 9.29 + "Frame option: " YaTeX:frame-option-alist)) 9.30 + (title (YaTeX-read-string-or-skip "Title: ")) 9.31 + (subtitle (YaTeX-read-string-or-skip "Subtitle: "))) 9.32 + (setq YaTeX-env-name "columns") 9.33 + (concat 9.34 + (if (string< "" opt) (concat "[" opt "]")) 9.35 + (if (string< "" title) (concat "{" title "}")) 9.36 + (if (string< "" subtitle) (concat "{" subtitle "}"))))) 9.37 + 9.38 +(defun YaTeX:column-read-width () 9.39 + "Completing function for column environment/macro of Beamer" 9.40 + (let ((md (match-data)) (colsinf (YaTeX-quick-in-environment-p "columns")) 9.41 + (totalw (float 1)) restw (ww "\\textwidth") defw cw) 9.42 + (unwind-protect 9.43 + (progn 9.44 + (if (save-excursion 9.45 + (YaTeX-re-search-active-backward 9.46 + "totalwidth=\\([.0-9]+\\)\\(\\\\.*width\\)" 9.47 + YaTeX-comment-prefix (cdr colsinf) t)) 9.48 + (setq totalw (float (string-to-number (YaTeX-match-string 1))) 9.49 + ww (YaTeX-match-string 2))) 9.50 + (setq restw totalw) 9.51 + (save-excursion 9.52 + (while (YaTeX-re-search-active-backward 9.53 + (concat 9.54 + "\\\\begin{column}{\\([.0-9]+\\)\\(\\\\.*width\\)}" 9.55 + "\\|" 9.56 + "\\\\column{\\([.0-9]+\\)\\(\\\\.*width\\)}") 9.57 + YaTeX-comment-prefix 9.58 + (cdr colsinf) t) 9.59 + (setq restw (- restw (string-to-number 9.60 + (or (YaTeX-match-string 1) 9.61 + (YaTeX-match-string 3))))))) 9.62 + (setq defw (format "%.2f%s" 9.63 + (if (= totalw restw) (/ totalw 2) restw) 9.64 + (or (YaTeX-match-string 2) 9.65 + (YaTeX-match-string 4) 9.66 + ww)) 9.67 + cw (YaTeX:read-length 9.68 + (format "Column width(default: %s): " defw))) 9.69 + (if (string= "" cw) (setq cw defw)) 9.70 + (prog1 9.71 + cw 9.72 + (setq YaTeX-section-name "column"))) 9.73 + (store-match-data md)))) 9.74 + 9.75 +(defun YaTeX:column () 9.76 + (if (eq YaTeX-current-completion-type 'begin) 9.77 + (concat "{" (YaTeX:column-read-width) "}"))) 9.78 +(defun YaTeX::column (argp) 9.79 + (cond 9.80 + ((= argp 1) (YaTeX:column-read-width)))) 9.81 +(defvar YaTeX:columns-option-alist 9.82 + '(("t") ("T") ("b") ("c") ("onlytextwidth") ("totalwidth=0.9\\textwidth")) 9.83 + "*Default option alist for completing columns environment of Beamer") 9.84 + 9.85 +(defun YaTeX:columns () 9.86 + (setq YaTeX-section-name "column" 9.87 + YaTeX-env-name "column") 9.88 + (let*((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 9.89 + (delim ",=") 9.90 + (tbl (append YaTeX:columns-option-alist)) ;XX 9.91 + (opt (YaTeX-completing-read-or-skip "columns option: " tbl))) 9.92 + (if (string< "" opt) 9.93 + (concat "[" opt "]")))) 9.94 + 9.95 ;;; -------------------- math-mode stuff -------------------- 9.96 (defun YaTeX::tilde (&optional pos) 9.97 "For accent macros in mathmode"
10.1 --- a/yatexenv.el Sun Jul 12 14:21:20 2015 +0900 10.2 +++ b/yatexenv.el Thu Jan 05 20:45:19 2017 +0900 10.3 @@ -1,6 +1,6 @@ 10.4 ;;; yatexenv.el --- YaTeX environment-specific functions 10.5 -;;; (c) 1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] 10.6 -;;; Last modified Mon Dec 22 12:49:03 2014 on firestorm 10.7 +;;; (c) 1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 10.8 +;;; Last modified Thu Jan 5 17:45:53 2017 on firestorm 10.9 ;;; $Id$ 10.10 10.11 ;;; Code:
11.1 --- a/yatexlib.el Sun Jul 12 14:21:20 2015 +0900 11.2 +++ b/yatexlib.el Thu Jan 05 20:45:19 2017 +0900 11.3 @@ -1,7 +1,7 @@ 11.4 ;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis -*- 11.5 ;;; 11.6 -;;; (c)1994-2015 by HIROSE Yuuji.[yuuji@yatex.org] 11.7 -;;; Last modified Fri Jan 16 10:32:31 2015 on firestorm 11.8 +;;; (c)1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 11.9 +;;; Last modified Thu Jan 5 17:46:13 2017 on firestorm 11.10 ;;; $Id$ 11.11 11.12 ;;; Code:
12.1 --- a/yatexmth.el Sun Jul 12 14:21:20 2015 +0900 12.2 +++ b/yatexmth.el Thu Jan 05 20:45:19 2017 +0900 12.3 @@ -1,7 +1,7 @@ 12.4 ;;; yatexmth.el --- YaTeX math-mode-specific functions -*- coding: sjis -*- 12.5 ;;; 12.6 -;;; (c)1993-2015 by HIROSE Yuuji [yuuji@yatex.org] 12.7 -;;; Last modified Sun Jul 12 10:02:36 2015 on firestorm 12.8 +;;; (c)1993-2017 by HIROSE Yuuji [yuuji@yatex.org] 12.9 +;;; Last modified Thu Jan 5 17:46:22 2017 on firestorm 12.10 ;;; $Id$ 12.11 12.12 ;;; Commentary:
13.1 --- a/yatexpkg.el Sun Jul 12 14:21:20 2015 +0900 13.2 +++ b/yatexpkg.el Thu Jan 05 20:45:19 2017 +0900 13.3 @@ -1,7 +1,7 @@ 13.4 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 13.5 ;;; 13.6 -;;; (c)2003-2015 by HIROSE, Yuuji [yuuji@yatex.org] 13.7 -;;; Last modified Fri Feb 13 22:45:46 2015 on firestorm 13.8 +;;; (c)2003-2017 by HIROSE, Yuuji [yuuji@yatex.org] 13.9 +;;; Last modified Thu Jan 5 17:46:30 2017 on firestorm 13.10 ;;; $Id$ 13.11 13.12 ;;; Code: 13.13 @@ -27,6 +27,7 @@ 13.14 13.15 ("alltt" (env "alltt")) 13.16 ("misc" (section "verbfile" "listing")) 13.17 + ("verbatim" (section "verbatiminput")) 13.18 ("eclbkbox" (env "breakbox")) 13.19 ("supertabular" (env "supertabular")) 13.20 ("amsmath" (env . YaTeX-package-ams-envs)
14.1 --- a/yatexprc.el Sun Jul 12 14:21:20 2015 +0900 14.2 +++ b/yatexprc.el Thu Jan 05 20:45:19 2017 +0900 14.3 @@ -1,7 +1,7 @@ 14.4 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- 14.5 ;;; 14.6 -;;; (c)1993-2015 by HIROSE Yuuji.[yuuji@yatex.org] 14.7 -;;; Last modified Fri Feb 13 08:07:20 2015 on firestorm 14.8 +;;; (c)1993-2017 by HIROSE Yuuji.[yuuji@yatex.org] 14.9 +;;; Last modified Thu Jan 5 17:46:36 2017 on firestorm 14.10 ;;; $Id$ 14.11 14.12 ;;; Code: 14.13 @@ -617,6 +617,7 @@ 14.14 'YaTeX-typeset-environment-by-builtin for using yatex-builtin.") 14.15 14.16 (defun YaTeX-typeset-environment-1 () 14.17 + (require 'yatex23) 14.18 (let*((math (YaTeX-in-math-mode-p)) 14.19 (dpi (or (YaTeX-get-builtin "IMAGEDPI") (if math "300" "200"))) 14.20 (opoint (point)) 14.21 @@ -1068,7 +1069,8 @@ 14.22 (save-excursion (YaTeX-visit-main t) (buffer-file-name)))) 14.23 (pdir (file-name-directory pf)) 14.24 (bnr (substring pf 0 (string-match "\\....$" pf))) 14.25 - (cf (file-relative-name (buffer-file-name) pdir)) 14.26 + ;(cf (file-relative-name (buffer-file-name) pdir)) 14.27 + (cf (buffer-file-name)) ;2016-01-08 14.28 (buffer (get-buffer-create " *preview-jump-line*")) 14.29 (line (count-lines (point-min) (point-end-of-line))) 14.30 (previewer (YaTeX-preview-default-previewer))