muse(emacs-wiki) に対する、もうひとつの html パブリッシングモードである bhl のインフォ リーディングメモ
bhl-mode manual を読みながら書いた。
#!subtitle!My subtile subtitle
`num' 1.<SPC>A section 1.1.<SPC>A subsection 1.1.1.<SPC>A subsubsection `alpha' A.<SPC>A section A.A.<SPC>A subsection A.A.A.<SPC>A subsubsection `aster' *<SPC>A section **<SPC>A subsection ***<SPC>A subsubsection `equal-sign' =<SPC>A section ==<SPC>A subsection ===<SPC>A subsubsection
ひとつのバッファに複数のセクションスタイルを混在させてはいけない
*,_
はバックスラッシュエスケープする。
*this*
を強調したい時は *\*this\**
とすればいい。
*a word* :: ボールド _a word_ :: 強調 HTMLと LaTex では下線 _*a word*_ ボールドイタリック __a word__ アンダースコアが前後二個ずつで下線 ==a word== トゥルータイプフォント
Put some words here. Put some words here. Put some words here. Put some words here.
二連続ダッシュだけの行でかこむ
※4連続ダッシュは水平線になることに注意
-- Put some words here. --
%%%[12cm] This minipage (12cm) will be centered without border. %%% <%%[10cm] This minipage (10cm) will be put on the left without border. %%% >-% This minipage will be put on the right with borders. %%%
↓のようにミニページ同様の規則で、左右寄せやサイズを指定できる
----[12cm] <---[12cm] >---[12cm]
特殊文字 *_#\
はバックスラッシュでエスケープできる。
URL または WikiWord 上で RET もしくは mouse-2 クリックすると URL なら関数bhl-browse-url-function、WikiName ならWikiName.bhl なファイルが呼ばれる。
:C-c C-/( bhl-show-lol):リンクのリスト :C-c C-c l (bhl-insert-lol):リンクのリストを挿入 :C-<TAB> (bhl-goto-next-url-or-wiki):リンク先をブラウズ
ベタ書きの http:// ftp://, file:///
なリンクを html なリンクに変換する関数
HTML への変換の例
'http://site.org' <a href="http://site.org">http://site.org</a> `url:mypage.html' <a href="mypage.html">mypage.html</a> `[[http://site.org][SITE]]' <a href="http://site.org">SITE</a> `mailto:bb@site.fr' <a href="mailto:bb@site.org>bb@site.org</a> `[[mailto:bb@site.fr][BB]]' <a href="mailto:bb@site.org>BB</a>
TXT フォーマットへの変換の例
`http://site.org' http://site.org `url:mypage.html' mypage.html `[[http://site.org][SITE]' http://site.org (SITE) `mailto:bb@fardeau.fr' bb@fardeau.fr `[[mailto:bb@fardeau.fr][BB]]' bb@fardeau.fr (BB)
bhl は、non-ordered lists, ordered lists ,descriptive (or definition) lists の三種のリストを使うことができる。
-,*,o
のいずれかをつけて、空白文字
descriptive lists : :
以下 info の記述を引用
`<TAB(S)>[,-,o]<SPC>' item of a non-ordered list `<TAB(S)>[0-9].<SPC>' item of an ordered list (enumerate) `<TAB(S)>A term<SPC>--<SPC>' item of a definition list
http://www.nongnu.org/bhl に例がある。
表は、パイプ'|'でセルを区切る。
muse とちがって、両端にもパイプが必要であることに注意
行頭と左端のパイプの前にタブや空白文字を置いてはいけない
| @Name@ | @First name@ | @Age@ | | Jean | Luc-Henri | 123 | | Paul | Matthieu | 2 |
上の例のように、ヘッダ行のセル要素は @ で囲む。
[][]
htmlでは表を出すけれど、LaTeX では出さない、といった制御をするらしい。
Specification の例
#!html!prefix:check:caption:toc #!latex!noprefix:nocheck:nocaption:notoc #!date!It's %H:%M.
Specification 行はコメント行
Specification 行は感嘆符'!'で区切った接頭辞とその後に続く、コロンで区切られたラベルからなる。
上の例では、html が接頭辞で、その後に ラベル、prefix が指定され、と読む
ラベル先頭に 'no-' をつけるとそのラベルの否定として働く。
以下、ウエブパブリッシュに関係ありそうな奴を抜粋
`#!author!' The name of the author for the current document. `#!title!' The title of the document. This specification overrides any other title (the first line of the buffer or any `#!xxx-title!' specification). `#!xxx-title!' The title of the document for the `xxx' conversion. `xxx' may be `html', `sgml', `texi' or `latex'. This specification is overriden by the `#!title!' specification, and overrides the first line of the buffer. `#!subtitle!' The subtitle of the document. The subtitle conversion is supported only for the HTML, Texinfo and TXT output. `#!lang!' The language of the document. This override the value of BHL-I18N-CONVENTIONS. In the Texinfo output, it sets the value of `@documentlanguage'. `#!encoding!' The encoding of the document. This information is relevant for the Texinfo and HTML conversion. In the Texinfo output, it sets the value of `@documentencoding'. In the HTML output, it overrides the value of BHL-HTML-CONTENT-TYPE. `#!date!' The date of the current document. Since the column has no special meaning here, you can use the Emacs time-formatting conventions. For example, `#!date!%H:%M' will set `date' to the current time (hours:minutes). *note (Elisp)Time Conversion::. `#!html!' The prefix concerning `bhl2html' specifications. Here is a complete list of available labels: `prefix' Insert the prefix of (sub)sections. `check' Check for dubious HTML tags/comments before converting. `caption' Ask for a caption when converting a table. `i18n' Use i18n conventions. `toc' Insert the table of content in the HTML output. `#!html-style!' The CSS file to refer to as the style for the HTML output. `#!sgml!' The prefix of `bhl2sgml' specifications. Here is a complete list of available labels: `check' Check for dubious SGML tags/comments before converting. `caption' Ask for a caption when converting a table. `i18n' Use i18n conventions. `#!txt!' The prefix of `bhl2txt' specifications. Here is a complete list of available labels: `center' Center the title and (sub)sections' titles. `toc' Insert the table of content in the TXT output. `tas' tabs are spaces: convert tabs to whitespaces in the TXT output.
*toc*
バッファを生成して、目次を表示<br>数引数で深さ
*lol*
バッファを生成してリンクリスト表示
'_'
で挟む(強調)
'__'
で挟む(下線)
気になるものだけ抜粋
(("author" . "you")) と書くと<META name="author" content="you">に対応
:bhl-html-doctype:
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1>