In a LaTeX document I'm writing, I'm using the Comment package to write personal notes that I can enable and disable at will, as in the next example:
\documentclass[12pt]{article}
\usepackage{color}
\definecolor{note_text}{rgb}{0.7,0,0}
\usepackage{comment}
\specialcomment{note}{\begingroup\color{note_text}}{\endgroup}
% Uncomment the next line for public version without personal notes
%\excludecomment{note}
\begin{document}
This is a serious sentence.
\begin{note}
This is a personal note
\end{note}
\end{document}
Then by toggling between \excludecomment{note}
and %\excludecomment{note}
in the preamble, I can choose whether the document includes my personal notes or not. So far, so good.
Now comes my question: how can I do something similar with inline text within a paragraph? I would like to do something like the following:
This is a serious \note{(or not??)} sentence.
But of course that doesn't work as "note" has been defined as an environment through the \specialcomment
command. So, is there any way I can use the Comment package to do this? Or some other solution?