Giter Club home page Giter Club logo

slidy-example's Introduction

% タイトル % 著者名 % 日付

Author

ka

Gravatar

Website: kaosfield

Twitter: ka

GitHub: kaosf

License

CC BY-NC-SA 4.0

Copyright (C) 2019 ka

ヘッダ

文章

文章

ヘッダ1

ヘッダ1で改ページ

ヘッダ2

文章

ヘッダ3

文章

リスト表示

- リスト表示1
- リスト表示2
- リスト表示3
  • リスト表示1
  • リスト表示2
  • リスト表示3

順序付きリスト表示

1. 順序付きリスト表示1
2. 順序付きリスト表示2
3. 順序付きリスト表示3
  1. 順序付きリスト表示1
  2. 順序付きリスト表示2
  3. 順序付きリスト表示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

引用文

> これは引用文です

これは引用文です

数式

$$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$$

数式ソース

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に何も書かない場合の文章の位置(ちょっと上にずれる)

スライドの作り方

  1. Pandoc, inotify-tools, [Slidy Builder](https://github.com/kaosf/slidy-builder), [Bash Watch](https://github.com/kaosf/bash-watch)をインストール
  2. README.mdを用意する
  3. 以下のコマンドを走らせる ```sh watchb 'slidybuild < README.md > index.html' 'index\.html' ```
  4. ブラウザで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もそれを使うようになる

スライドの作られ方(1)

index.htmlの末尾にコメントとして

pandoc --version

の結果を再現性担保のために埋め込む

念の為その際に環境固有の情報を消すようにしてある

スライドの作られ方(2)

index.htmlを生成するコマンドをinotifywaitコマンドで随時実行する

inotifywaitコマンドを生で使うのは大変なので補助ツールとしてBash Watchを使う

このスライドのリポジトリ

kaosf/slidy-example

おしまい

slidy-example's People

Contributors

kaosf avatar

Stargazers

Yuichi Nishiwaki avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.