## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Inline Todonote

Information and discussion about graphics, figures & tables in LaTeX documents.
Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

### Inline Todonote

Hello everybody,

I would need your help to change the width of my inline todonote...
Indeed, it takes the whole width, and I didn't find any tip in other forums, websites and even in the documentation.

Package needed : todonote

Here's a MWE (a bit long, cause I kept the equations) :

\documentclass[a4paper, 12pt, fleqn]{article}\usepackage{todonotes}\usepackage[utf8]{inputenc}\usepackage{amsmath}\usepackage[frenchb]{babel} \usepackage[a4paper]{geometry}\geometry{top=2cm, bottom=2cm, left=3cm, right=3cm}\setlength{\marginparwidth}{2.5cm} \begin{document} \begin{tabular}{rcl}$f\left(x + 2\pi\right)$&=&$\dfrac {3\cos^2\left(x + 2\pi\right)+1}{\cos^3\left(x + 2\pi\right)+1}$\\\\         &$=$& $\dfrac {3\times \cos\left(x + 2\pi\right)\times \cos\left(x + 2\pi\right)+1}{\cos\left(x + 2\pi\right)\times \cos\left(x + 2\pi\right)\times \cos\left(x + 2\pi\right)+1}$ \\\\         && \todo[inline]{Car $\cos\left(x + 2\pi\right)=\cos\left(x\right)$} \\         &$=$& $\dfrac {3\times \cos\left(x\right)\times \cos\left(x\right)+1}{\cos\left(x\right)\times \cos\left(x\right)\times \cos\left(x\right)+1}$\\\\         &$=$& $\dfrac {3\cos^2\left(x\right)+1}{\cos^3\left(x\right)+1}$\end{tabular}\\ \noindentDonc, $\forall x\in D, f\left(x+2\pi\right)=f\left(x\right)$\\$f$ est donc $2\pi$ périodique.  \end{document}

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm
I am in a bit of a hurry... Pleaseee...

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm
Hmm.... In the doc, it is said that "The width of inline todonotes will always be the same as the current line width."...
So, would you have an idea?...

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm
Why do you use a table for the math environment?

To change the linewidth for your inline todonote put it in a \parbox.

\documentclass[a4paper, 12pt, fleqn]{article}\usepackage{todonotes}\usepackage[utf8]{inputenc}\usepackage{amsmath}\usepackage[frenchb]{babel} \usepackage[a4paper]{geometry}\geometry{top=2cm, bottom=2cm, left=3cm, right=3cm}\setlength{\marginparwidth}{2.5cm} \usepackage{amsmath} \begin{document} \begin{align*}f\left(x + 2\pi\right)&= \dfrac {3\cos^2\left(x + 2\pi\right)+1}{\cos^3\left(x + 2\pi\right)+1}\\         &=\dfrac {3\times \cos\left(x + 2\pi\right)\times \cos\left(x + 2\pi\right)+1}{\cos\left(x + 2\pi\right)\times \cos\left(x + 2\pi\right)\times \cos\left(x + 2\pi\right)+1} \\         &\quad\,\text{\parbox{0.4\linewidth}{\todo[inline]{Car $\cos\left(x + 2\pi\right)=\cos\left(x\right)$}}}\\         &=\dfrac {3\times \cos\left(x\right)\times \cos\left(x\right)+1}{\cos\left(x\right)\times \cos\left(x\right)\times \cos\left(x\right)+1}\\         &=\dfrac {3\cos^2\left(x\right)+1}{\cos^3\left(x\right)+1}\end{align*} \noindentDonc, $\forall x\in D, f\left(x+2\pi\right)=f\left(x\right)$\\$f$ est donc $2\pi$ périodique. \end{document}

Best regards
Elke

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm
Thank you, it works
But I found another way to create a non-inline todonote

Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm
Are you willing to share this other method with us? Might be handy some time.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.