├── demo.pdf ├── demo.001.png ├── demo.002.png ├── demo.003.png ├── demo.004.png ├── demo.005.png ├── demo.006.png ├── images └── kenkyu_woman_seikou.png ├── README.md ├── .github └── workflows │ └── demo-file-generation.yml ├── LICENSE ├── demo.md └── themes └── academic.css /demo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.pdf -------------------------------------------------------------------------------- /demo.001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.001.png -------------------------------------------------------------------------------- /demo.002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.002.png -------------------------------------------------------------------------------- /demo.003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.003.png -------------------------------------------------------------------------------- /demo.004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.004.png -------------------------------------------------------------------------------- /demo.005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.005.png -------------------------------------------------------------------------------- /demo.006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/demo.006.png -------------------------------------------------------------------------------- /images/kenkyu_woman_seikou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kaisugi/marp-theme-academic/HEAD/images/kenkyu_woman_seikou.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # marp-theme-academic 2 | 3 | ![](./demo.001.png) 4 | ![](./demo.002.png) 5 | ![](./demo.003.png) 6 | ![](./demo.004.png) 7 | ![](./demo.005.png) 8 | ![](./demo.006.png) -------------------------------------------------------------------------------- /.github/workflows/demo-file-generation.yml: -------------------------------------------------------------------------------- 1 | name: generate demo files 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: generate pdf 16 | run: | 17 | docker run --rm --init -v $PWD:/home/marp/app/ -e LANG="ja_JP.UTF-8" -e MARP_USER="$(id -u):$(id -g)" marpteam/marp-cli demo.md --theme themes/academic.css --pdf --allow-local-files 18 | 19 | - name: generate png 20 | run: | 21 | docker run --rm --init -v $PWD:/home/marp/app/ -e LANG="ja_JP.UTF-8" -e MARP_USER="$(id -u):$(id -g)" marpteam/marp-cli demo.md --theme themes/academic.css --images --allow-local-files 22 | 23 | - name: commit & push 24 | run: | 25 | if ! git diff --exit-code --quiet 26 | then 27 | git add -A 28 | git config user.name github-actions 29 | git config user.email github-actions@github.com 30 | git add . 31 | git commit -m "update demo files" 32 | git push 33 | fi 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Kaito Sugimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /demo.md: -------------------------------------------------------------------------------- 1 | --- 2 | marp: true 3 | theme: academic 4 | paginate: true 5 | math: katex 6 | --- 7 | 8 | 9 | 10 | # Marpで研究室の発表スライドを作る 11 | 12 | #### 〜Beamerを卒業しよう〜 13 | 14 |
15 | 16 | **著者 太郎** 17 | ほげほげ研究室 M2 18 | YYYY/MM/DD 19 | 20 | --- 21 | 22 | 23 | 24 | 1. はじめに 25 | 1. コードブロック 26 | 1. 数式 27 | 1. 図 28 | 29 | --- 30 | 31 | 32 | 33 | - Marp とは **Markdown** で**スライド**を作成するためのソフトウェアである。 34 | - 基本的な Markdown のシンタックスがサポートされている。 35 | - Markdown 上で `---` という区切り線を入れるだけで、次のページに移動することができる。$^1$ 36 | 37 | > 1: Marp は CommonMark という Markdown の仕様に沿って開発されているため、CommonMark に含まれていない「脚注」の文法(`[^1]` を使うもの)が提供されていない。そこで、https://github.com/marp-team/marp/discussions/150#discussioncomment-1302384 を参照して擬似的に脚注を実現した。 38 | 39 | --- 40 | 41 | 42 | 43 | ```python 44 | import torch 45 | print(torch.cuda.is_available()) 46 | ``` 47 | 48 | こんな感じでコードブロックを書くことができる。 49 | 50 | ```python 51 | from transformers import AutoModelForMaskedLM, AutoTokenizer 52 | model = AutoModelForMaskedLM.from_pretrained("cl-tohoku/bert-base-japanese-whole-word-masking") 53 | tokenizer = AutoTokenizer.from_pretrained("cl-tohoku/bert-base-japanese-whole-word-masking") 54 | 55 | inputs = tokenizer.encode_plus("私はとても[MASK]です。", return_tensors='pt') 56 | outputs = model(**inputs) 57 | tokenizer.convert_ids_to_tokens(outputs.logits[0][1:-1].argmax(axis=-1)) 58 | ``` 59 | 60 | 横幅は自動調整される(ドキュメントの[Auto-scaling](https://github.com/marp-team/marp-core#auto-scaling-features)を参照)。 61 | 62 | --- 63 | 64 | 65 | 66 | $$ I_{xx}=\int\int_Ry^2f(x,y)\cdot{}dydx $$ 67 | 68 | $$ 69 | f(x) = \int_{-\infty}^\infty 70 | \hat f(\xi)\,e^{2 \pi i \xi x} 71 | \,d\xi 72 | $$ 73 | 74 | こんな感じで数式を書くことができる。もちろんインラインの $\LaTeX$ も使える。 75 | ついでに絵文字も使える:smile: 76 | 77 | --- 78 | 79 | 80 | 81 | 1. まず[このいらすとやのリンク](https://www.irasutoya.com/2018/10/blog-post_723.html)から画像(`kenkyu_woman_seikou.png`)を右クリックでダウンロードしてください。 82 | 2. この Markdown のあるディレクトリの中に `images` という名前のディレクトリを作り、先ほどダウンロードした画像を配置してください。これで準備が整いました。 83 | 84 | ![w:300 center](./images/kenkyu_woman_seikou.png) 85 | -------------------------------------------------------------------------------- /themes/academic.css: -------------------------------------------------------------------------------- 1 | /* @theme academic */ 2 | 3 | @import 'gaia'; 4 | @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap'); 5 | @import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap'); 6 | 7 | :root { 8 | --color-background: #fff; 9 | --color-foreground: #333; 10 | --color-highlight: #800000; 11 | } 12 | 13 | section { 14 | background-image: none; 15 | font-family: 'Noto Sans JP', sans-serif; 16 | padding-top: 90px; 17 | padding-left: 40px; 18 | padding-right: 40px; 19 | } 20 | 21 | /* https://github.com/marp-team/marpit/issues/271 */ 22 | section::after { 23 | font-weight: 700; 24 | content: attr(data-marpit-pagination) '/' attr(data-marpit-pagination-total); 25 | } 26 | 27 | ul ul { 28 | font-size: 0.9em; 29 | } 30 | 31 | section.lead h1 { 32 | color: #800000; 33 | text-align: left; 34 | } 35 | section.lead h1 strong { 36 | -webkit-text-stroke: 1px #800000; 37 | } 38 | section.lead h2 { 39 | color: #800000; 40 | text-align: left; 41 | } 42 | section.lead h2 strong { 43 | -webkit-text-stroke: 1px #800000; 44 | } 45 | section.lead h3 { 46 | color: #800000; 47 | text-align: left; 48 | } 49 | section.lead h3 strong { 50 | -webkit-text-stroke: 1px #800000; 51 | } 52 | section.lead h4 { 53 | color: #800000; 54 | text-align: left; 55 | } 56 | section.lead h4 strong { 57 | -webkit-text-stroke: 1px #800000; 58 | } 59 | section.lead h5 { 60 | color: #800000; 61 | text-align: left; 62 | } 63 | section.lead h5 strong { 64 | -webkit-text-stroke: 1px #800000; 65 | } 66 | section.lead p { 67 | text-align: right; 68 | } 69 | 70 | header { 71 | background-color: #800000; 72 | color: #fff; 73 | font-size: 1em; 74 | font-weight: 700; 75 | } 76 | 77 | blockquote { 78 | max-width: 90%; 79 | border-top: 0.1em dashed #555; 80 | font-size: 60%; 81 | position: absolute; 82 | bottom: 20px; 83 | } 84 | blockquote::before { 85 | content: ""; 86 | } 87 | blockquote::after { 88 | content: ""; 89 | } 90 | 91 | img[alt~="center"] { 92 | display: block; 93 | margin: 0 auto; 94 | } 95 | 96 | code { 97 | font-family: 'Source Code Pro', monospace; 98 | } 99 | --------------------------------------------------------------------------------