In the memoir
manual there is a snippet for making draft notes that uses the entire paper when printing drafts on pages bigger than the trimmed papers. Is it possible to get the more fancy notes of the todonotes
package to use that margin space as well? I think the readability of white on magenta as in this example is much higher and I really like to have the line provided by the todonotes
package as well.
If the todonotes
package can't do it, is there some other alternative in order to get my dream-behavior? 🙂
\documentclass[svgnames,showtrims, 10pt, draft]{memoir}
\usepackage[textsize=small, linecolor=magenta, bordercolor=magenta,
backgroundcolor=magenta]{todonotes}
\usepackage{letltxmacro}
\usepackage{lipsum}
\LetLtxMacro{\oldtodo}{\todo}
\renewcommand{\todo}[1]{{\color{white}\oldtodo{\textsf{#1}}}}
\stockaiv
\settrims{30mm}{25mm}
\trimFrame
\settrimmedsize{242mm}{165mm}{*}
\settypeblocksize{*}{25pc}{1.618}
\setlrmargins{*}{*}{1.5}
\setulmarginsandblock{5.5pc}{6pc}{*}
\setcolsepandrule{1pc}{0pt}
\setmarginnotes{12pt}{6pc}{24pt}
\setsidecaps{2pt}{6.5pc}
\sidecapmargin{outer}
\sideparmargin{outer}
\strictpagecheck
\checkandfixthelayout
%% A new command that allows you to note down ideas or annotations in
%% the margin of the draft. If you are printing on a stock that is wider
%% than the final page width, we will go to some length to utilise the
%% paper that would otherwise be trimmed away, assuming you will not be
%% trimming the draft. These notes will not be printed when we are not
%% in draft mode.
\makeatletter
\ifdraftdoc
\newlength{\draftnotewidth}
\newlength{\draftnotesignwidth}
\newcommand{\draftnote}[1]{\@bsphack%
{%% do not interfere with settings for other marginal notes
\strictpagecheck%
\checkoddpage%
\setlength{\draftnotewidth}{\foremargin}%
\addtolength{\draftnotewidth}{\trimedge}%
\addtolength{\draftnotewidth}{-3\marginparsep}%
\ifoddpage
\setlength{\marginparwidth}{\draftnotewidth}%
\marginpar{\flushleft\textbf{\textit{\HUGE !\ }}\small #1}%
\else
\settowidth{\draftnotesignwidth}{\textbf{\textit{\HUGE\ !}}}%
\addtolength{\draftnotewidth}{-\draftnotesignwidth}%
\marginpar{\raggedleft\makebox[0pt][r]{%% hack around
\parbox[t]{\draftnotewidth}{%%%%%%%%% funny behaviour
\raggedleft\small\hspace{0pt}#1%
}}\textbf{\textit{\HUGE\ !}}%
}%
\fi
}\@esphack}
\else
\newcommand{\draftnote}[1]{\@bsphack\@esphack}
\fi
\makeatother
\begin{document}
\section*{Lorem ipsum}%
\sidepar{\textit{Lorem ipsum dolor sit amet}}
\lipsum[1]
\todo{Fix the: Nam dui ligula, fringilla}
\lipsum[2]
\draftnote{Fix the: Nulla malesuada porttitor diam}
\lipsum[3-5]
\sidepar{\textit{Lorem ipsum dolor sit amet}}
\lipsum[6]
\todo{Fix the: Nam dui ligula, fringilla}
\lipsum[7]
\draftnote{Fix the: Nulla malesuada porttitor diam}
\lipsum[8]
\end{document}
EDIT:
- Added more lipsum to make it two pages
- Added
\sidepar
to show that margin notes that are not draft notes should be on the trimmed page
Best Answer
You can use the
textwidth
option of thetodonotes
package to specify the size of the margin note. Usually would just increase the size of marginpars, after your page set-up formemoir
, but if you don't want to change that dimension, it is possible to rewrite some of the internals from thetodo
package, hiding the width of thetodo
notes: