LaTeX 환경(itemize)을 숨기기 위해 phantom을 사용할 수 있습니까?

LaTeX 환경(itemize)을 숨기기 위해 phantom을 사용할 수 있습니까?

\phantom와 같은 환경의 콘텐츠를 숨기는 데 사용할 수 있는 방법이 있습니까 itemize?

다음은 실행되지 않습니다.

\phantom{\begin{itemize}
          \item Hi!
         \end{itemize}}

나는 출력에서 ​​내용을 강조 표시하는 것을 원하지 않기 때문에 텍스트를 흰색으로 변경하려는 것이 아닙니다.

답변1

\phantom아니요, 그렇게 사용할 수는 없습니다 . 내부 \phantom 을 사용하여 내용을 숨길 수 있지만 \parbox차지하는 공간을 예약하거나 환경을 사용할 수 있습니다 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}

여기에 이미지 설명을 입력하세요

관련 정보