General ⇒ a simple \todo tag
a simple \todo tag
I realize there's many libraries out there with a \todo tag already. Some even with really cool floating boxes that don't disturb the text flow and stuff. I'm just learning LaTeX myself and so I'm trying to build a few of these tools on my own, just to learn.
What I would like is a simple \todo[1] command that places the argument text in a box and bolds it. At the moment I've got:
\newcommand{\todo}[1]{\mbox{}\\\fbox{\parbox{\textwidth}{\textbf{Todo: #1}}}\\}
which I found somewhere on the net. The problem is that this box is always the full width of the page and regardless of if I use \textwidth or \linewidth. If I place a todo in a table it completely disrupts the table.
I've tried taking out the \parbox, \fbox or \mbox but then I receive tons of errors further down the line which seem like I've got brackets missing or something.
thanks in advance for any advice,
eknight
P.S. what does the \\} mean at the end of the above statement? I can't seem to find a reference to explain what that is?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: a simple \todo tag
\newcommand{\todo}[1]{\marginnote{\fbox{\bfseries #1}}}%
You can set the \marginnotetextwidth parameter in the preamble and several other parameters (see the doc of the package).
As for \\, this is basic LaTeX: it denotes a newline.
B.A.
Re: a simple \todo tag

Thanks I'll try out the package you mentioned.
Re: a simple \todo tag
Does anyone have any suggestions for a simple todo command that doesn't require any additional packages?
Ideally it would simply add the text "TODO:", bold and draw a box around the entire todo text. Other than that it would remain consistent within the flow of the text. Ie. it wouldn't create it's own line. It would wrap (either as a complete box or break the box). It would flow current paragraph conventions (ie. if it's in a list or not).
Thanks again in advance
Re: a simple \todo tag
Anyway, it is strange that the compiler doesn't find marginnote.sty. Did you install marginnote manually or with MiKTeX's package manager? In the first case,did you think of refreshing the filename database? That might be the reason.
B.A.