%20%E3%82%92%E9%9D%9E%E8%A1%A8%E7%A4%BA%E3%81%AB%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8B%3F%20.png)
\phantom
次のような環境の内容を非表示にする方法はありますかitemize
?
これは実行されません:
\phantom{\begin{itemize}
\item Hi!
\end{itemize}}
出力でコンテンツを強調表示したくないので、テキストを白に変更するだけでは十分ではありません。
答え1
いいえ、そのようには使えません\phantom
。\parbox
中身を隠すために内部の\phantomを使うことはできますが、その中身が占めるスペースは確保しておく必要があります。comment
あるいは、comment
スペースを完全に抑制して内容を非表示にするパッケージ:
\documentclass[draft]{article}
\usepackage{comment}
\begin{document}
a
\begin{comment}
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\end{comment}
b
a\par
\noindent\phantom{\parbox{\linewidth}{%
\begin{itemize}
\item First.
\item Second.
\end{itemize}}}\par
b
\end{document}