วันพุธ, พฤศจิกายน 23, 2548

LaTeX comment tips

Comment

In addition to the built-in latex comment command %, I always define a comment command that can deal with comments spanning line breaks.

in the preamble:
\newcommand{\comment}[1]{}

usage example:
\comment{This is a comment and it won't show up in the output even if it spans more than one line of the input file or the line breaks move around.}

You can also use conditional comments, shown here being used to allow commenting out all figures (very useful for faster previewing).

in the preamble:
\usepackage{ifthen}
\newboolean{includefigs}
\setboolean{includefigs}{true}
\newcommand{\condcomment}[2]{\ifthenelse{#1}{#2}{}}

usage example:
\condcomment{\boolean{includefigs}}{
\begin{figure}
....
\end{figure}
}


From http://www.me.berkeley.edu/~mcmains/latex.html

1 ความคิดเห็น:

mink กล่าวว่า...

มันไม่มีแทบ ipod อะค่ะ ขั้นตอนแรกเลยอะ ทำงัยอะค่ะ