LoginSignup
9
9

More than 5 years have passed since last update.

Ubuntu 14.04 で Pandoc を使った Markdown から pdf の生成

Last updated at Posted at 2014-12-09

概要

Markdown から PDF を生成したい。
が、 Mac とかのドキュメントばかりで、 Ubuntu 14.04 で動かすには色々問題があったのでメモ。

手順

インストール

sudo apt-get install texlive-luatex pandoc #必須
sudo apt-get install texlive-fonts-recommended texlive-fonts-extra # いるかも。

myjsarticle.cls の作成

下記 URL
http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?Pandoc#h2f8de68
を参照して、myjsarticle.cls を作る。

以下抜粋

$ cp `kpsewhich ltjsarticle.cls` .
$ patch -p0 < ltjsarticle.cls.patch
$ mv ltjsarticle.cls myltjsarticle.cls
$ sudo mktexlsr

foo.md から foo.pdf を作る

pandoc foo.md -o foo.pdf -V documentclass=myltjsarticle --latex-engine=lualatex

閲覧

Google Chrome とか evince を使おう

残された課題

luatex のコンパイルなんか遅くないですか?気のせい?

おしまい。

参考資料

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9