% タイトル % 著者名 % 日付
ka
Website: kaosfield
Twitter: ka
GitHub: kaosf
Copyright (C) 2019 ka
文章
文章
ヘッダ1で改ページ
文章
文章
- リスト表示1
- リスト表示2
- リスト表示3
- リスト表示1
- リスト表示2
- リスト表示3
1. 順序付きリスト表示1
2. 順序付きリスト表示2
3. 順序付きリスト表示3
- 順序付きリスト表示1
- 順序付きリスト表示2
- 順序付きリスト表示3
バージョン2.1.0から即時表示をデフォルトにした
以下のようなHTMLから無理矢理クラスを削るようにしてある
<ul class="incremental"></ul>
順次表示の方がデフォルトなのが段々嫌になってきたため
なので大変面倒ではあるが生成後のHTMLにこれを手動で追加してやる
C言語
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello, world!\n");
return 0;
}
Ruby
def m
puts 'Hello, world!'
end
m
> これは引用文です
これは引用文です
When
LaTeXで書ける
$$1 + 2 = 3$$
When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
$$f(a) = \frac{1}{2\pi i}\oint_C\frac{f(z)}{z-a}dz$$
$$f(x) = \sum^\infty_{n=0} \frac{f^{(n)}(a)}{n!}(x - a)^n$$
即時表示の文章は
- 後から
- こちらが
- 表示される
順次表示のリストの後にあっても即時表示される
ヘッダ1に何も書かない場合の文章の位置(ちょっと上にずれる)
- Pandoc, inotify-tools, [Slidy Builder](https://github.com/kaosf/slidy-builder), [Bash Watch](https://github.com/kaosf/bash-watch)をインストール
- README.mdを用意する
- 以下のコマンドを走らせる ```sh watchb 'slidybuild < README.md > index.html' 'index\.html' ```
- ブラウザでindex.htmlを開きREADME.mdを編集しつつ更新
README.mdに書いておけばGitHub上などでリポジトリのトップページに
スライドの内容がざっと表示されることになるので便利そう.
オフラインで動作・見た目を確認を出来る状態にしたい場合
以下のコマンドを走らせる
watchb 'slidybuild -l < README.md > index.html' 'index\.html'
※先ほどと同様だがslidybuildコマンドに-lオプションを渡す
必要なJavaScript,CSS,PNGファイルが一度だけローカルにダウンロードされる
※MathJax.jsが176MBくらいあるので注意
生成されるindex.htmlもそれを使うようになる
index.htmlの末尾にコメントとして
pandoc --version
の結果を再現性担保のために埋め込む
念の為その際に環境固有の情報を消すようにしてある
index.htmlを生成するコマンドをinotifywaitコマンドで随時実行する
inotifywaitコマンドを生で使うのは大変なので補助ツールとしてBash Watchを使う