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 \

                          headpre.txs headpost.txs foot.txs \
                          Makefile
          cat headpre.txs $(LANG).txs headpost.txs $< foot.txs > $@
    
    %.dvi : %.tex %.dvi : %.texdoc Makefile
          $(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}