23
24

More than 5 years have passed since last update.

kobitoでmarkdownを書いてそれをpdfに変換出来たので、メモしときます。

kobito使い始めました。
便利ですね。
即時プレビユーが気持ちいいです。

kobitoで書いたmarkdown記法のドキュメントをpdf化したかったので調べました。
pdf化は結構環境依存なので、同じ通りには行かないと思いますので、参考程度に。

pandocのインストール

pandocインストールします。
homebrewに入ってるかと思ったのですが、入ってなかったので、ここを参考にインストールしました。

markdown -> tex

次に、markdown記法のドキュメントをtexに変換します。
これは簡単で、

$ pandoc -s hoge.md -o hoge.tex

でいいです。

texファイル調整

自動で生成されるtexが気に入らないので、毎回以下のものを挿入してます。

\setlength{\topmargin}{-0.3in}
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
\setlength{\textheight}{46\baselineskip}
\setlength{\textwidth}{47zw}

tex -> pdf

これには、TexShopを使いました。
普通に生成されたtexを開いて、いつも通りタイプセットするとpdfが生成されたので簡単です。

ちなみにこの記事もkobitoで書いてみました。
kobitoいいですね。

23
24
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
23
24