Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Markdown to LaTeX
Search
Kaneko Tatsuya
April 14, 2013
Technology
1
1.5k
Markdown to LaTeX
Markdown to LaTeX
Kaneko Tatsuya
April 14, 2013
Tweet
Share
More Decks by Kaneko Tatsuya
See All by Kaneko Tatsuya
キャリアを充実させる『カギ』に!PR TIMES CTO金子達哉から学ぶアウトプット術 / output_method
catatsuy
0
600
ISUCONの情報共有にはこれ!notify_slack!/isucon_notify_slack
catatsuy
1
1k
ISUCON6本選のベンチマークでconsulを使用してクラスタを構築した話 / isucon6-night
catatsuy
2
1.2k
ユニクロの レジから学ぶ Goroutine #yapc8oji #yapc8ojiA /uniqlo_golang
catatsuy
6
2.3k
社内ISUCONオープニング/private-isu-opening
catatsuy
0
10k
ピクシブ社内広告サーバーでのGoの開発・運用 #gocon /p_ads_server_gocon2015
catatsuy
10
11k
fluentdで大量のログを Google BigQueryに送ってみた #fluentdmeetup /send_a_log_to_bigquery_with_fluentd
catatsuy
1
4.2k
『pixivエンジニアが教えるプログラミング入門』出版記念特別編基調講演
catatsuy
3
1.9k
ピクシブ広告サーバー開発・運用の軌跡 2015春インターン講義資料
catatsuy
17
11k
Other Decks in Technology
See All in Technology
未経験者・初心者に贈る!40分でわかるAndroidアプリ開発の今と大事なポイント
operando
6
770
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
10
3.2k
まずはマネコンでちゃちゃっと作ってから、それをCDKにしてみよか。
yamada_r
2
120
ブロックテーマ時代における、テーマの CSS について考える Toro_Unit / 2025.09.13 @ Shinshu WordPress Meetup
torounit
0
130
2つのフロントエンドと状態管理
mixi_engineers
PRO
3
170
Claude Code でアプリ開発をオートパイロットにするためのTips集 Zennの場合 / Claude Code Tips in Zenn
wadayusuke
5
2.5k
20250910_障害注入から効率的復旧へ_カオスエンジニアリング_生成AIで考えるAWS障害対応.pdf
sh_fk2
3
280
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
680
エンジニアが主導できる組織づくり ー 製品と事業を進化させる体制へのシフト
ueokande
1
120
Unlocking the Power of AI Agents with LINE Bot MCP Server
linedevth
0
120
Modern Linux
oracle4engineer
PRO
0
170
Snowflake Intelligence × Document AIで“使いにくいデータ”を“使えるデータ”に
kevinrobot34
1
120
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
We Have a Design System, Now What?
morganepeng
53
7.8k
How GitHub (no longer) Works
holman
315
140k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Rails Girls Zürich Keynote
gr2m
95
14k
Producing Creativity
orderedlist
PRO
347
40k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
4 Signs Your Business is Dying
shpigford
184
22k
The Invisible Side of Design
smashingmag
301
51k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
Markdown to L ATEX ۚࢠୡ࠸ (id:catatsuy) April 14, 2013
ࣗݾհ • ۚࢠୡ࠸ • 〤〛〟 ID: catatsuy • twitter: catatsuy
URL: • http://www.catatsuy.org • http://blog.catatsuy.org • https://matw.co
ॴଐ • ౦ژۀେֶʢʺి௨େʣ • ใֶՊ 4 ʢ9 ݄ଔۀ༧ఆʣ • ٢ݚڀࣨ
• ぢアゃゔがのぎがずふぜばを • C++11 ্〜まがへげこぎهड़〣てゎゔ゛がてゖアぇ『 DSL ぇఏڙ『ぐゅ゙ぇߴԽ『ݚڀぇ「〛 ⿶〳『ʢ。〟〣〜ུʣ
ब৬׆ಈ • 〤〛〟ぐアのがア 2012 • pixiv ぐアのがア
10 ݄〾 〭ʂ
લճ〣 Dentoo.LT Acme::MorningMusume 〣ぇ「〳「〔 http://blog.catatsuy.org/a/256
ଔۀ「〔⿶
ଔۀจ ʢ8 ݄ఏग़〣〔〶ʣ ઈࢍ⿶ࠐ〴〟⿸ˑ
ಥવ〣ࢮܐએࠂ
ଔ〝⿶⿺〥. . . I ♡ L ATEX
L ATEX • \verb/gcc/ 〝ॻ。〣໘ • \begin{} - \end{} 〜ғ⿸〣໘
• ࠷ॳ〣ゆ゙ぎアゅ゚⿸》⿶
࣌〤ܰྔろがぜぎひゆ〭 L ATEX HTML ⇒ Markdown wiki ه๏ 〤〛〟ه๏
I ♡ Markdown • Github 〟〞〜࠾༻ • ిࢠゐが゚〾〣০〾ண • ւ֎〣ਓ〠〤ײత〾「⿶
• てアゆ゚〠ॻ々 • ֤ݴޠ〜むがつが࣮《ぁ〛⿶
ࠓճ〣のぐぷ゚ Markdown to L ATEX
Pandoc • ろがぜぎひゆݴޠ〣૬ޓมびが゚ • ؔܕݴޠ haskell 〜࣮ • ػೳ〉〝〠៉ྷ〠ゑでゔが゚Խ《ぁ〛⿶ •
ଟ࠼〟やさがろひぷ〠ରԠ • Markdown ⇒ L A TEX 〷Մೳ
Pandoc ぐアとぷが゚ Ubuntu: sudo apt-get install haskell-platform Mac: brew install
ghc brew install haskell-platform common: cabal update cabal install pandoc # ~/.cabal/bin/ ぶく゛ぜぷ゙ҎԼ〠 PATH ぇ௨『
Pandoc 〣⿶ํ # ຊจ〣〴 pandoc input.md -o output.tex # ふアゆ゛がぷࠐ〴
pandoc -s input.md -o output.tex # beamerʢゆ゛にアʣग़ྗ pandoc -t beamer input.md -o output.tex # มࢦఆ pandoc -V fontsize=12Q input.md -o output.tex
Pandoc 〣 • ‘gcc‘ 〝ॻ。〝 \texttt{gcc} 〠《ぁ〛「〳⿸ • ຊ〤 \verb+gcc+
〝〠「〛ཉ「⿶ • ふアゆ゛がぷຊ〣 L A TEX 々〜〤〟⿶
Github 〜 Fork 「〳「〔ʂ git clone git://github.com/catatsuy/pandoc.git cd pandoc git
submodule init git submodule update # git://github.com/catatsuy/pandoc-templates.git # data/templates ҎԼ〠 clone 《ぁ
‘ ‘ 〣ڍಈぇม⿺ src/Text/Pandoc/Writers/LaTeX.hs - rawCode = liftM (text .
(\s -> "\\texttt{" ++ s ++ "}")) - $ stringToLaTeX False str + rawCode = liftM (text . (\s -> "\\verb‘" ++ s ++ "‘")) + $ stringToLaTeX True str
ふアゆ゛がぷ • ผ゙れでぷ゙ʢgit submoduleʣ • data/templates ҎԼ〣 default.latex • $
. . . $ 〜มల։ • ม〤 -V ざゆてゖア〜『
ふアゆ゛がぷ࡞れぐアぷ • ಡ〴ࠐ〵むひたがで〟〞〤࠷খݶ〠 • --include-in-header header.tex 〝「〛Ճ むひたがで〹༨നઃఆ〟〞ぇผやきぐ゚〠〜
cabal-dev • cabal 〤 ~/.cabal/ ҎԼ〠ぐアとぷが゚『 • 『〜〠ຊՈ〣 pandoc 〤ぐアとぷが゚ࡁ〴
• じ゛アぷぶく゛ぜぷ゙্〜ぢアむぐ゚「〔⿶ cabal install cabal-dev cd pandoc cabal-dev install --sandbox=. # pandoc/bin/ ҎԼ〠࣮ߦやきぐ゚ग़ྗ《ぁ
〘〛〴〛〘〔 • গ「〜〷ෳࡶ〟〷〣〤 L A TEX 〜ॻ。ඞཁ • Emacs 〣৭々
L A TEX ෦〜ޮ〟⿶ • yatex 〣ڧྗ〟ิػೳ⿺〟⿶ • վߦ「〔〝〈あ〜とらがとೖ〈〝⿴
վળҊ • Markdown 〜 L A TEX 〣จষぇॻ。〣〜〤〟。 L A
TEX 〣จষ্〜 Markdown ه๏ぇ෦త〠⿸〮 • とらがとೖ〘〛〷〣〟⿶ॴ〜վߦ『 # ⿶〣〜 Makefile ࡞ਪ pandoc -f markdown input.tex -o output.tex # yatex 〤ぶやさ゚ぷ〜ࣗಈվߦ「〛「〳⿸〣〜 .emacs 〠Ճ (add-hook ’ yatex-mode-hook ’(lambda () (auto-fill-mode -1)))
վળҊ〣ॴ • 〈ぁ࠷దղ〘〲⿶ • L A TEX やきぐ゚『〘 〿『 • yatex
〷⿺ • Markdown 〠ิ〹৭々⿶〾〟⿶
ܽ • ग़ྗぇҙࣝ「〟〾ॻ。ඞཁ • L A TEX 〣ॻ ํ〠〷ඞཁ • L
A TEX ぇ७ਮ〠ॻ。〟〾ੜ」〟⿶ແବ〟〴ൃੜ
ඞཁ〟 • \\ ॻ々〟⿶ • \linebreak 〹 \newline 〟〞ぇ⿸ඞཁ •
ぢゐアぷぎげぷ % 〜〜 〟⿶ • comment.sty \if0 \fi ぇ⿸
つアゆ゚ ࠓճ〣Ұ࿈〣ྲྀぁぇ࠶ݱ『つアゆ゚ github.com/catatsuy/mdtolatex_sample Makefile 〟〞ࢀߟ〠「〛。〕《⿶
ࠓޙ〣༧ఆ • ଔぇ Markdown 〜ॻ 〳『 • 〒〣্〜〘〔ぇڞ༗「〛⿶ 〳『 • Markdown 〜ଔॻ 〳「〼⿸