LaTeX forum ⇒ Graphics, Figures & TablesInline Todonote

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

Inline Todonote

Postby Pierrotdu18 » Wed Apr 02, 2014 1:14 am

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}\\

\noindent
Donc, $\forall x\in D, f\left(x+2\pi\right)=f\left(x\right)$\\
$f$ est donc $2\pi$ périodique.


\end{document} 



Thanks for your future help! :D

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Wed Apr 02, 2014 3:53 pm

I am in a bit of a hurry... Pleaseee... :?

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Wed Apr 02, 2014 4:10 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

Postby esdd » Thu Apr 03, 2014 12:38 am

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*}

\noindent
Donc, $\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

Postby Pierrotdu18 » Sun Apr 06, 2014 8:30 pm

Thank you, it works :)
But I found another way to create a non-inline todonote ;)

User avatar
Johannes_B
Site Moderator
Posts: 4185
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Apr 07, 2014 8:55 am

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.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 12 guests