LaTeXで複数行からなるブロックの表示・非表示を切り替えるには、commentパッ ケージを使うのがよさそう。自分で書くのは避けたほうがいい。
文書
\documentclass{article}
\usepackage{comment}
\begin{document}
\begin{comment}
Frogs and snails, and puppy-dogs' tails.
\end{comment}
かえるにかたつむり、子犬のしっぽ。
\end{document}
出力
かえるにかたつむり、子犬のしっぽ。
ビルドスクリプト
Makefile:
... LANG = ja ... $(DOC)-$(LANG).pdf : $(DOC)-$(LANG).texdoc
$(DOC)-$(LANG).texdoc : $(DOC).tex $(LANG).txs \
%.dvi : %.tex %.dvi : %.texdoc Makefileheadpre.txs headpost.txs foot.txs \ Makefile cat headpre.txs $(LANG).txs headpost.txs $< foot.txs > $@
...$(LATEX) $<headpre.txs:
\documentclass{article}
ja.txs:
\newenvironment{en}{
}{\begin{comment}
}\end{comment}enja.txs:
\newenvironment{en}{}{}
headpost.txs:
\begin{document}
foot.txs:
\end{document}
Other Articles
- 12 May 2011 : onlispja ebook
- 07 May 2011 : 文字校正用ユーティリティ
- 28 Apr 2011 : htdigest設定支援スクリプト
- 15 Apr 2011 : HudsonからJenkinsへの移行
- 11 Apr 2011 : Emacs Lispでert.elを使ってユニットテスト
- 25 Mar 2011 : Jenkins導入
- 11 Mar 2011 : 地震 / Earthquake in Japan