Page LayoutTo-Do Notes in a two-sided Document

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

To-Do Notes in a two-sided Document

Post by Cham »

I'm experiencing a problem with the todonotes package. The to-do notes aren't well balanced in their two-side pages margins. Here's a working example showing the problem.

Code: Select all

\documentclass[12pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{lipsum}
\usepackage[french,bordercolor=none,backgroundcolor=pink,linecolor=none,textsize=footnotesize,textwidth=0.75in,shadow]{todonotes}

%\reversemarginpar

\begin{document}

\tableofcontents

\chapter{Test chapter one}
\todo{This is just another test!}
\lipsum[1-7]\todo{This is again just another lame test!}\clearpage

\chapter{Test chapter one}
\lipsum[1-30]

\end{document}
The first to-do note is at the right place, but I had to add the textwidth=0.75in command since the default is too large. Why ?

The second to-do note is not at a proper place. Why ?

Also, is it possible to draw to-dos without rounded corners ?

How can I change the default text style ? I would prefer to have the default to-do text displayed in sans serif text.

Lastly, how can I reduce the shadow intensity? It's too dark for my taste.

The documentation doesn't say anything about these.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

To-Do Notes in a two-sided Document

Post by Cham »

I'm very surprised that there isn't any basic options to toggle ON/OFF the rounded corners and to change the default text style, with the todonotes package. Or is there any, not described in the documentation ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

To-Do Notes in a two-sided Document

Post by localghost »

Cham wrote:I'm very surprised that there isn't any basic options to toggle ON/OFF the rounded corners and to change the default text style, with the todonotes package. Or is there any, not described in the documentation ?
These things are hard-coded. The style for the result of \todo is indirectly documented in Section 2 of the package manual. On page 23 you will find the following setup.

Code: Select all

\tikzstyle{notestyleraw}=[
  draw=\@todonotes@currentbordercolor,
  fill=\@todonotes@currentbackgroundcolor,
  line width=0.5pt,
  text width=\@todonotes@textwidth-1.6ex-1pt,
  inner sep=0.8ex,
  rounded corners=4pt
]
How to turn off the rounded corners should be self-explanatory. Just delete (or comment) rounded corners=4pt. Note that you have to put this into the preamble of your document and enclose it with \makeatletter and \makeatother.

Code: Select all

\makeatletter
\tikzstyle{notestyleraw}=[
  draw=\@todonotes@currentbordercolor,
  fill=\@todonotes@currentbackgroundcolor,
  line width=0.5pt,
  text width=\@todonotes@textwidth-1.6ex-1pt,
  inner sep=0.8ex
]
\makeatother
For the text style I can't offer a solution at the moment. Perhaps somebody else can. This could be worth a note to the package author with a feature suggestion.


Thorsten
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: To-Do Notes in a two-sided Document

Post by Cham »

Thanks for the explanation.

Yes indeed, we should ask the developper to add more options. Its current implementation is incomplete.

But what about the notes placement on double-page layouts ? There's an horrible offset on one of the pages.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

To-Do Notes in a two-sided Document

Post by Cham »

About the previous issue (unbalanced notes on double-page layouts), I just found that adding a command line solves the issue. For example :

Code: Select all

\usepackage[bordercolor=gray!20,backgroundcolor=blue!10,linecolor=none,textsize=footnotesize,textwidth=0.8in]{todonotes}
\setlength{\marginparwidth}{0.8in}
Post Reply