
我剛剛讀過
解釋它如何才能\begin{comment} etc. \end{comment}
發揮作用,需要進入「脆弱」框架。但如果我想要框外評論怎麼辦?評論包是否有一些解決方法,或者俱有相同效果的另一個包,我們可以說,對於它的使用位置更加寬容?
答案1
This is Text
\iffalse
This is Text, too, but not printed
\fi
Another text
答案2
我錯過了什麼還是你可以簡單地做:
\documentclass{beamer}
\usepackage{comment}
\begin{document}
\begin{frame}
random text
\end{frame}
\begin{comment}
hidden text
\end{comment}
\end{document}
(在 TeXlive 2015、2016 和 2017 的 pdflatex 上運行沒有錯誤,我沒有測試過其他引擎。)
或者,您可以使用ignorenonframetext
投影機選項:
\documentclass[ignorenonframetext]{beamer}
\begin{document}
\begin{frame}
random text
\end{frame}
hidden text
\end{document}