Similar to Doing something only when the draft option is on? I wonder whether I can typeset a code only if the final option is declared within the documentclass line.
\documentclass[final]{article}
How would I go about doing this?
Similar to Doing something only when the draft option is on? I wonder whether I can typeset a code only if the final option is declared within the documentclass line.
\documentclass[final]{article}
How would I go about doing this?
Sorry for the necessity of \makeatletter, but the document class option list is an "internal" command.
\documentclass[final]{article}
\makeatletter \usepackage[\@classoptionslist]{optional}
\begin{document}
test \opt{final}{FFF}\opt{draft}{DDD}\opt{x}{XXX}.
\end{document}
You can, of course, specify specific options to the optional package with
\makeatletter \usepackage[x, \@classoptionslist]{optional}