Twitterでふぁぼったものをひたすら試します

latexのパッケージいろいろ

LaTeX Coffee Stains

要するにLaTeX Coffee Stains | hanno-rein.deのこと。.styがあるので、これをなんとかして入れなくちゃいけない。

kpsewhich --expand-path='$TEXMF'
kpsewhich --progname=platex jarticle.cls

と聞いてみたら

/usr/local/texlive/2014/texmf-config:/usr/local/texlive/2014/texmf-var:/usr/local/texlive/texmf-local:/usr/local/texlive/2014/texmf-dist
/usr/local/texlive/2014/texmf-dist/tex/platex/base/jarticle.cls

と返事があった。texliveさんだ。

  • /usr/local/texlive/2014/texmf-config
  • /usr/local/texlive/2014/texmf-var
  • /usr/local/texlive/texmf-local
  • /usr/local/texlive/2014/texmf-dist

のうちtex/platex/があったのがtexmf-distだけだったので、ここにmisc/coffee/をつくって

/usr/local/texlive/2014/texmf-dist/tex/platex/misc/coffee

にcoffee.styを入れる。このあとは

sudo texhash

するといいらしい。やると、ちゃんと↑の4箇所を見てくれる。

ここまでの話はemath.styの置き場所 - PukiWikiTeX Forumを参考にしたよ。

で、最低限コーヒーの染みをつくるやつだけ書いたところ

Package pgf Warning: Your graphic driver pgfsys-dvips.def does not support marking the current position. This warning is given only once on input line 10.

と言われた。tikz関係のエラーらしい。 → tikz pgf - How to use \tikzmark with pLaTeX? - TeX - LaTeX Stack Exchange
というのも含めると、

\documentclass[11pt,a4paper,titlepage,dvipdfmx]{jarticle}
\usepackage[utf8]{inputenc}
\usepackage{pxfonts}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{pxpgfmark}
\usepackage{coffee4}
\begin{document}

\title{タイトル}
\author{ちょしゃ}
\maketitle

\pagenumbering{roman}
\tableofcontents
\newpage
\pagenumbering{arabic}

\cofeAm{1}{1.0}{0}{5.5cm}{3cm}
\section{せくしょん}
Hello
\subsection{さぶせくしょん}
,
\subsubsection{さぶさぶせくしょん}
World!

\end{document}

だいたいこんな感じ(usepackage、いらないやつも入れちゃってるような……)
これで

platex template.tex
dvipdfmx template

とやると、Hello, worldのついでにコーヒーもつく。
f:id:S_Shimotori:20150810151811p:plain

印刷したらプリンターの性能がダメなので微妙だった。


tondol.hatenablog.jp mizchi.hatenablog.com

pandoc

brew install pandoc
pandoc -o hoge.tex hoge.md

とやることで、マークダウンで書かれたファイルhoge.mdをもとにhoge.texが生成される。
かんたんだね。
Pandoc ユーザーズガイド 日本語版 - Japanese Pandoc User's Association

Cacoo

図をつくるやつ。フローチャートとかUMLとかデータベースとか。
わたしのパソコン、容量空いてないしweb上でさくっと作れるのはありがたい…
f:id:S_Shimotori:20150810230846p:plain

うーん、秘伝のタレ…


使ってはいけない LaTeX のコマンド・パッケージ・作法 - Ichiro Maruta Homepage

amsmath

数式書く機会が…あるのかなあ……
これを読んでおくといいらしい。そして英語なので読めない。
User’s Guide for the amsmath Package