| 1 |
%% |
| 2 |
%% This is file `np-test.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% notespages.dtx (with options: `example') |
| 8 |
%% |
| 9 |
%% Copyright 2016 Mike Kaufmann |
| 10 |
%% [email protected] |
| 11 |
%% |
| 12 |
%% This work may be distributed and/or modified under the |
| 13 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 14 |
%% of this license or (at your option) any later version. |
| 15 |
%% The latest version of this license is in |
| 16 |
%% http://www.latex-project.org/lppl.txt |
| 17 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 18 |
%% version 2005/12/01 or later. |
| 19 |
%% |
| 20 |
%% This work has the LPPL maintenance status `maintained'. |
| 21 |
%% |
| 22 |
%% The Current Maintainer of this work is Mike Kaufmann. |
| 23 |
%% |
| 24 |
%% This work consists of the files notespages.dtx and notespages.ins |
| 25 |
%% and the derived files notespages.sty and np-test.tex. |
| 26 |
%% |
| 27 |
%% \CharacterTable |
| 28 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 29 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 30 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 31 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 32 |
%% Dollar \$ Percent \% Ampersand \& |
| 33 |
%% Acute accent \' Left paren \( Right paren \) |
| 34 |
%% Asterisk \* Plus \+ Comma \, |
| 35 |
%% Minus \- Point \. Solidus \/ |
| 36 |
%% Colon \: Semicolon \; Less than \< |
| 37 |
%% Equals \= Greater than \> Question mark \? |
| 38 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 39 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 40 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 41 |
%% Right brace \} Tilde \~} |
| 42 |
%% |
| 43 |
%% this document is intended to be compiled with the class scrbook, other classes |
| 44 |
%% will not produce a logically correct result (some notes fills are missing, |
| 45 |
%% pages are different, a lot of overful hboxes, and so on), they where just |
| 46 |
%% used for testing |
| 47 |
%%\documentclass[11pt,a4paper]{article} |
| 48 |
%%\documentclass[11pt,a4paper]{report} |
| 49 |
%%\documentclass[11pt,a4paper]{book} |
| 50 |
\documentclass[11pt,a4paper]{scrbook} |
| 51 |
%%\documentclass[11pt,a4paper]{scrartcl} |
| 52 |
%%\documentclass[11pt,a4paper]{scrreprt} |
| 53 |
%%\documentclass[11pt,a4paper,article]{memoir} |
| 54 |
%%\documentclass[11pt,a4paper]{memoir} |
| 55 |
\usepackage{lmodern} |
| 56 |
\usepackage[T1]{fontenc} |
| 57 |
\usepackage[utf8]{inputenc} |
| 58 |
\usepackage{microtype} |
| 59 |
\usepackage[italian,ngerman,french,english]{babel} |
| 60 |
\usepackage[colorlinks,linkcolor=blue]{hyperref} |
| 61 |
\usepackage{lipsum} |
| 62 |
\usepackage[svgnames]{xcolor} |
| 63 |
\usepackage{tikz} |
| 64 |
\usepackage{afterpage} |
| 65 |
\usepackage{eso-pic} |
| 66 |
\usepackage{notespages} |
| 67 |
|
| 68 |
%% CAUTION: do not use this with the class memoir |
| 69 |
%% it will not work, because memoir has its |
| 70 |
%% own methods to set the header and footer |
| 71 |
%% this is meant to be used with KOMA-Script classes |
| 72 |
\usepackage{scrpage2} |
| 73 |
\lehead[]{\leftmark} |
| 74 |
\cehead[]{} |
| 75 |
\rehead[]{\rightmark} |
| 76 |
\lohead[]{\leftmark} |
| 77 |
\cohead[]{} |
| 78 |
\rohead[]{\rightmark} |
| 79 |
\lefoot[\pagemark]{\pagemark} |
| 80 |
\cefoot[]{} |
| 81 |
\refoot[]{\textsf{NotesPages}} |
| 82 |
\lofoot[]{\textsf{NotesPages}} |
| 83 |
\cofoot[]{} |
| 84 |
\rofoot[\pagemark]{\pagemark} |
| 85 |
\pagestyle{scrheadings} |
| 86 |
%% this is meant to be used with all other classes |
| 87 |
%%\pagestyle{headings} |
| 88 |
|
| 89 |
%% only use this for classes book, scrbook and memoir without option article |
| 90 |
\nppatchchapter{default,vacant,multiple=2, |
| 91 |
notestext={An empty page before a new chapter.}} |
| 92 |
|
| 93 |
%% this has to be used with classes article and scrartcl |
| 94 |
%%\let\secleveli{\section} |
| 95 |
%%\let\seclevelii\subsection |
| 96 |
%% this has to be used with all other classes |
| 97 |
\def\secleveli{\chapter} |
| 98 |
\let\seclevelii\section |
| 99 |
|
| 100 |
%%\tracingnpmarks1 |
| 101 |
|
| 102 |
\newcommand{\fillit}[1][]{\minisec{Fill it}\lipsum[#1]} |
| 103 |
|
| 104 |
\begin{document} |
| 105 |
\thispagestyle{empty} |
| 106 |
\begin{center} |
| 107 |
\vspace*{\fill} |
| 108 |
\textsf{\Huge The \textbf{NotesPages} Package}\\[5ex] |
| 109 |
\textsf{\textbf{\Large Example File}}\\[5ex] |
| 110 |
Mike Kaufmann\\[2ex] |
| 111 |
\href{mailto:[email protected]}{\texttt{[email protected]}}\\[2ex] |
| 112 |
2016/08/21 (v0.8.1)\\[10ex] |
| 113 |
\textsf{\textbf{\LARGE Warning: do not print!}}\\[2ex] |
| 114 |
You would waste over a hundred pages! |
| 115 |
\vspace*{\fill} |
| 116 |
\vspace*{\fill} |
| 117 |
\end{center} |
| 118 |
|
| 119 |
\tableofcontents |
| 120 |
|
| 121 |
\secleveli{Layout variations} |
| 122 |
\seclevelii{Default settings} |
| 123 |
First let's start with the default settings. The next three and a half pages are |
| 124 |
filled with \verb|\notesfill|, \verb|\notespage|, and \verb|\notespages|. The |
| 125 |
latter will produce two pages, in order to fill up the document to a multiple |
| 126 |
of 4 pages. |
| 127 |
|
| 128 |
Btw.: In the lower left corner of this page and the next three is a bit of text, |
| 129 |
put there with \textsf{eso-pic}, to check, if the bug from version 0.8 is gone. |
| 130 |
It's in yellow, so barely visible. |
| 131 |
|
| 132 |
The commands are: |
| 133 |
|
| 134 |
\begin{verbatim} |
| 135 |
\notesfill |
| 136 |
\notespage |
| 137 |
\notespages |
| 138 |
\end{verbatim} |
| 139 |
|
| 140 |
%% testing eso-pic |
| 141 |
\AddToShipoutPictureBG{\AtPageLowerLeft{\makebox(0,0)[bl]{\textcolor{yellow}{eos-pic test}}}} |
| 142 |
|
| 143 |
\notesfill |
| 144 |
\notespage |
| 145 |
\notespages |
| 146 |
|
| 147 |
%% testing eso-pic |
| 148 |
\ClearShipoutPictureBG |
| 149 |
|
| 150 |
\seclevelii{The options \textsf{startnotes} and \textsf{allowfloats}} |
| 151 |
To show the effect of these options, some text and a float, which doesn't fit on |
| 152 |
this page, is needed. For the float the positioning \verb|[htb]| was used. After |
| 153 |
the float \verb|\notespage| was used once. |
| 154 |
|
| 155 |
Test for referencing: \autoref{fig:rect} on \autopageref{fig:rect}. |
| 156 |
|
| 157 |
\fillit[1-3] |
| 158 |
|
| 159 |
\begin{figure}[htb] |
| 160 |
\centering |
| 161 |
\textcolor{lightgray}{\rule{0.8\textwidth}{0.5\textheight}} |
| 162 |
\caption{Just a rectangle}\label{fig:rect} |
| 163 |
\end{figure} |
| 164 |
|
| 165 |
\notespage |
| 166 |
|
| 167 |
Now let's do this again, but this time using \verb|\notespage[startnotes=newpage]|. |
| 168 |
|
| 169 |
Test for referencing: \autoref{fig:rect2} on \autopageref{fig:rect2}. |
| 170 |
|
| 171 |
\fillit[1-3] |
| 172 |
|
| 173 |
\begin{figure}[htb] |
| 174 |
\centering |
| 175 |
\textcolor{lightgray}{\rule{0.8\textwidth}{0.5\textheight}} |
| 176 |
\caption{Another rectangle}\label{fig:rect2} |
| 177 |
\end{figure} |
| 178 |
|
| 179 |
\notespage[startnotes=newpage] |
| 180 |
|
| 181 |
Ok, now lets add the option \textsf{allowfloats} and see what happens. This time |
| 182 |
\verb|\notespages| \verb|[startnotes=newpage,allowfloats]| is used, filling the document |
| 183 |
up to page 16. Note: the header is already changed on the next page. |
| 184 |
|
| 185 |
Test for referencing: \autoref{fig:rect3} on \autopageref{fig:rect3}. |
| 186 |
|
| 187 |
\begin{figure}[htb] |
| 188 |
\centering |
| 189 |
\textcolor{lightgray}{\rule{0.8\textwidth}{0.5\textheight}} |
| 190 |
\caption{A third rectangle}\label{fig:rect3} |
| 191 |
\end{figure} |
| 192 |
|
| 193 |
\notespages[startnotes=newpage,allowfloats] |
| 194 |
|
| 195 |
\seclevelii{The option \textsf{pagestyle}} |
| 196 |
The next 3 pages show notes pages with different page styles. The commands are: |
| 197 |
|
| 198 |
\begin{verbatim} |
| 199 |
\notespage[pagestyle=empty] |
| 200 |
\notespage[pagestyle=plain] |
| 201 |
\notespage[pagestyle=useheadings] |
| 202 |
\end{verbatim} |
| 203 |
|
| 204 |
Btw.: The pagestyle for this document was defined deliberately this way to see |
| 205 |
both header marks as often as possible. For this, the package \textsf{scrpage2} |
| 206 |
from \textsf{KOMA-Script} was used. |
| 207 |
|
| 208 |
\notespage[pagestyle=empty] |
| 209 |
\notespage[pagestyle=plain] |
| 210 |
\notespage[pagestyle=useheadings] |
| 211 |
|
| 212 |
\seclevelii{The option \textsf{notesstyle}} |
| 213 |
Up until now, the default \textsf{notesstyle} (\textsf{\textit{grid}}) was used. |
| 214 |
The next example shows the other four. The commands are: |
| 215 |
|
| 216 |
\begin{verbatim} |
| 217 |
\notespage[notesstyle=plain] |
| 218 |
\notespage[vparts=35,notesstyle=lines] |
| 219 |
\notespage[notesstyle=vlines] |
| 220 |
\notespage[notesstyle=text] |
| 221 |
\notespage[vacant] |
| 222 |
\end{verbatim} |
| 223 |
|
| 224 |
For the second page \texttt{vparts=35} was used, because the default is 0 and |
| 225 |
therefore the notes area would be empty. The fourth page doesn't realy make sense, |
| 226 |
because the notes style \textsf{text} was meant to be used for otherwise empty |
| 227 |
pages. For this the meta option \textsf{vacant} was introduced. Its effect can be |
| 228 |
seen on the fifth page. |
| 229 |
|
| 230 |
\notespage[notesstyle=plain] |
| 231 |
\notespage[vparts=35,notesstyle=lines] |
| 232 |
\notespage[notesstyle=vlines] |
| 233 |
\notespage[notesstyle=text] |
| 234 |
\notespage[vacant] |
| 235 |
|
| 236 |
\seclevelii{The options \textsf{hparts}, \textsf{vparts}, and \textsf{usenotesareaheight}} |
| 237 |
Now let's play around a little with the options \textsf{hparts} and \textsf{vparts}. |
| 238 |
As mentioned in the manual, a value of 1 will always draw two lines. Let's take a |
| 239 |
look. The commands are: |
| 240 |
|
| 241 |
\begin{verbatim} |
| 242 |
\notesfill[vparts=1,notesstyle=lines] |
| 243 |
\notespage[hparts=1,notesstyle=vlines] |
| 244 |
\notespage[hparts=1,vparts=1] |
| 245 |
\end{verbatim} |
| 246 |
|
| 247 |
\notesfill[vparts=1,notesstyle=lines] |
| 248 |
\notespage[hparts=1,notesstyle=vlines] |
| 249 |
\notespage[hparts=1,vparts=1] |
| 250 |
|
| 251 |
With the same values for both, one gets rectangles with the same aspect ratio |
| 252 |
as the text body. The command: |
| 253 |
|
| 254 |
\begin{verbatim} |
| 255 |
\notesfill[hparts=30,vparts=30] |
| 256 |
\end{verbatim} |
| 257 |
|
| 258 |
\notesfill[hparts=30,vparts=30] |
| 259 |
|
| 260 |
With the option \textsf{usenotesareaheight} the height of a vertical part will |
| 261 |
be calculated based on the height of the notes area instead of \verb|\textheight|. |
| 262 |
Thus, there will be the exact number of parts given to \textsf{vparts}. |
| 263 |
|
| 264 |
But first, lets see it without \textsf{usenotesareaheight}. The command: |
| 265 |
|
| 266 |
\begin{verbatim} |
| 267 |
\notesfill[hparts=2,vparts=2] |
| 268 |
\end{verbatim} |
| 269 |
|
| 270 |
\notesfill[hparts=2,vparts=2] |
| 271 |
|
| 272 |
And now, the same command, but this time with the option \textsf{usenotesareaheight}. |
| 273 |
The command is: |
| 274 |
|
| 275 |
\begin{verbatim} |
| 276 |
\notesfill[hparts=2,vparts=2,usenotesareaheight] |
| 277 |
\end{verbatim} |
| 278 |
|
| 279 |
\notesfill[hparts=2,vparts=2,usenotesareaheight] |
| 280 |
|
| 281 |
But with the same command the height of a vertical part can be different each |
| 282 |
time, as can be seen below. |
| 283 |
|
| 284 |
\fillit[1-2] |
| 285 |
|
| 286 |
\notesfill[hparts=2,vparts=2,usenotesareaheight] |
| 287 |
|
| 288 |
\seclevelii{The option \textsf{titlestyle}} |
| 289 |
The following pages show the possible \textsf{titlestyle}s. Since the top most |
| 290 |
rectangles for the default appearance of the notes area will only be shown, if they |
| 291 |
fit completely into the notes area, the latter was change to be just a rectangle. |
| 292 |
Without this, the real distance between notes title and notes area couldn't be seen. |
| 293 |
The choice \textsf{minisec} wasn't used here, so this file can be compiled with |
| 294 |
classes, which don't support the command \verb|\minisec|. The commands are: |
| 295 |
|
| 296 |
\begin{verbatim} |
| 297 |
\notesfill[hparts=1,vparts=1] |
| 298 |
\notespage[hparts=1,vparts=1,titlestyle=subsection] |
| 299 |
\notespage[hparts=1,vparts=1,titlestyle=subsubsection] |
| 300 |
\notespage[hparts=1,vparts=1,titlestyle=text] |
| 301 |
\notespage[hparts=1,vparts=1,titlestyle=none] |
| 302 |
\end{verbatim} |
| 303 |
|
| 304 |
\notesfill[hparts=1,vparts=1] |
| 305 |
\notespage[hparts=1,vparts=1,titlestyle=subsection] |
| 306 |
\notespage[hparts=1,vparts=1,titlestyle=subsubsection] |
| 307 |
\notespage[hparts=1,vparts=1,titlestyle=text] |
| 308 |
\notespage[hparts=1,vparts=1,titlestyle=none] |
| 309 |
|
| 310 |
\seclevelii{The option \textsf{titletext}} |
| 311 |
With the option \textsf{titletext} a new text for the notes title can be given. |
| 312 |
If the new text is not just a single word, it should be given in braces. And if |
| 313 |
it contains a comma or an equality sign it must be given in braces. |
| 314 |
|
| 315 |
The new text is also used as the text for the header mark, if the option |
| 316 |
\textsf{marktext} is not used. The commands are: |
| 317 |
|
| 318 |
\begin{verbatim} |
| 319 |
\notesfill[hparts=1,vparts=1,titletext={Please, make some notes here}] |
| 320 |
\notespage[hparts=1,vparts=1,titletext={Scribble page}] |
| 321 |
\end{verbatim} |
| 322 |
|
| 323 |
\notesfill[hparts=1,vparts=1,titletext={Please, make some notes here}] |
| 324 |
\notespage[hparts=1,vparts=1,titletext={Scribble page}] |
| 325 |
|
| 326 |
\seclevelii{The option \textsf{titleskip}} |
| 327 |
Especially if \texttt{titlestyle=text} is given, the option \textsf{titleskip} |
| 328 |
is useful. With it, some space can be put between the notes title and the notes |
| 329 |
area. This is shown here. Compare it to page 37. The command is: |
| 330 |
|
| 331 |
\begin{verbatim} |
| 332 |
\notesfill[hparts=1,vparts=1,titlestyle=text,titleskip=2ex] |
| 333 |
\end{verbatim} |
| 334 |
|
| 335 |
\notesfill[hparts=1,vparts=1,titlestyle=text,titleskip=2ex] |
| 336 |
|
| 337 |
\seclevelii{The option \textsf{titlenotesfill}} |
| 338 |
The option \textsf{titlenotesfill} will move the notes area down to the end of |
| 339 |
the page. This can only be shown with the \textsf{notesstyle} \textsf{\textit{text}}, |
| 340 |
for whitch it doesn't realy make sense. But if someone defines a custom notes style, |
| 341 |
which doesn't use the whole notes area, the option can be used to move it down. |
| 342 |
The command is: |
| 343 |
|
| 344 |
\begin{verbatim} |
| 345 |
\notesfill[notesstyle=text,filltopfill=false,titlenotesfill] |
| 346 |
\end{verbatim} |
| 347 |
|
| 348 |
\notesfill[notesstyle=text,filltopfill=false,titlenotesfill] |
| 349 |
|
| 350 |
\seclevelii{The option \textsf{mark}} |
| 351 |
Up unitl now, \textsf{mark} was set to \textsf{both}. The next pages will show |
| 352 |
the other choices. The commands are: |
| 353 |
|
| 354 |
\begin{verbatim} |
| 355 |
\notespage[mark=keep,titletext={Notes (keep)}] |
| 356 |
\notespage[mark=right,titletext={Notes (right)}] |
| 357 |
\notespage[mark=left,titletext={Notes (left)}] |
| 358 |
\notespage[mark=right,titletext={Notes (right)}] |
| 359 |
\notespage[titletext={Notes (both)}] |
| 360 |
\notespage[mark=left,titletext={Notes (left)}] |
| 361 |
\notespage[mark=right,titletext={Notes (right)}] |
| 362 |
\notespage[mark=left,titletext={Notes (left)}] |
| 363 |
\notespage[titletext={Notes (both)}] |
| 364 |
\notespage[mark=right,titletext={Notes (right)}] |
| 365 |
\notespage[mark=left,titletext={Notes (left)}] |
| 366 |
\end{verbatim} |
| 367 |
|
| 368 |
The additional pages were put in to test, if switching between the choices of |
| 369 |
\textsf{mark} works. |
| 370 |
|
| 371 |
\notespage[mark=keep,titletext={Notes (keep)}] |
| 372 |
\notespage[mark=right,titletext={Notes (right)}] |
| 373 |
\notespage[mark=left,titletext={Notes (left)}] |
| 374 |
\notespage[mark=right,titletext={Notes (right)}] |
| 375 |
\notespage[titletext={Notes (both)}] |
| 376 |
\notespage[mark=left,titletext={Notes (left)}] |
| 377 |
\notespage[mark=right,titletext={Notes (right)}] |
| 378 |
\notespage[mark=left,titletext={Notes (left)}] |
| 379 |
\notespage[titletext={Notes (both)}] |
| 380 |
\notespage[mark=right,titletext={Notes (right)}] |
| 381 |
\notespage[mark=left,titletext={Notes (left)}] |
| 382 |
|
| 383 |
\seclevelii{The options \textsf{marktext} and \textsf{markuppercase}} |
| 384 |
The option \textsf{marktext} is used the set a text for the header mark. This is |
| 385 |
useful, if the title text is to long for the header. Again, if the text contains |
| 386 |
more then one word it should be given in braces, and if it contains a comma or an |
| 387 |
equality sign it must be given in braces. |
| 388 |
|
| 389 |
Some classes set the header marks in uppercase letters. To do this for the header |
| 390 |
marks of a notes page, the option \textsf{markuppercase} exists. It is set |
| 391 |
automatically for the standard classes, the \textsf{KOMA-Script} classes and |
| 392 |
\textsf{memoir}. For other classes, the default is \textsf{\textit{false}}. |
| 393 |
The setting can be changed with this option, as shown in the next example. |
| 394 |
|
| 395 |
The command is: |
| 396 |
|
| 397 |
\begin{verbatim} |
| 398 |
\notespage[marktext=Scribbel,markuppercase,titlestyle=text, |
| 399 |
titletext={This is a very long text for a scribble page. And it |
| 400 |
doesn't just end after one sentence, so it is realy too long for |
| 401 |
the header.}] |
| 402 |
\end{verbatim} |
| 403 |
|
| 404 |
\notespage[marktext=Scribbel,markuppercase,titlestyle=text, |
| 405 |
titletext={This is a very long text for a scribble page. And it |
| 406 |
doesn't just end after one sentence, so it is realy too long for |
| 407 |
the header.}] |
| 408 |
|
| 409 |
\secleveli{Controlling the number of notes pages} |
| 410 |
\seclevelii{The options \textsf{multiple}, \textsf{minpages}, and \textsf{endpages}} |
| 411 |
The way to set these options is to think as follows: the number of pages must be |
| 412 |
a multiple of $d$, at least $m$ notes pages are needed, and at the end $e$ pages |
| 413 |
are needed for other purposes. Then just set \textsf{multiple} $=d$, \textsf{minpages} |
| 414 |
$=m$, and \textsf{endpages} $=e$. |
| 415 |
|
| 416 |
As an example, lets assume the number of pages should be a multiple of 4, at least |
| 417 |
one notes page should appear and one page is needed after the notes pages. The |
| 418 |
options for this are \verb|multiple=4,minpages=1,endpages=1| (\textsf{multiple} |
| 419 |
could be omitted, because 4 is the default value). |
| 420 |
|
| 421 |
Now this is page 57, therefore three pages are needed to fill the document to a |
| 422 |
multiple of 4. But there should be one page at the end for other stuff. So only |
| 423 |
two pages will be inserted to fulfill \verb|endpages=1|. Since there are already |
| 424 |
two notes pages, \verb|minpages=1| is fullfilled. |
| 425 |
|
| 426 |
If this would have been page 55, there would be 4 notes pages. Page 56 would be a |
| 427 |
notes page to fulfill \verb|minpages=1|, which would also fulfill \verb|multiple=4| |
| 428 |
but violate \verb|endpages=1|. Because of that, three additional notes pages would |
| 429 |
be inserted, so all three conditions are met. |
| 430 |
|
| 431 |
\notespages[multiple=4,minpages=1,endpages=1] |
| 432 |
|
| 433 |
Here we are on page 60, the page for other purposes (like for example contact |
| 434 |
information on the back of a manual). |
| 435 |
|
| 436 |
With \verb|minpages=0| nothing would change here. And with \verb|endpages=0| |
| 437 |
this page would be a notes page too. |
| 438 |
|
| 439 |
Besides the maximum and minimum values for the options, there are no limits on |
| 440 |
the values and there are no dependencies between them. For example, \textsf{endpages} |
| 441 |
may be greater than \textsf{multiple}. |
| 442 |
|
| 443 |
\seclevelii{Other examples} |
| 444 |
Since this is page 60 and it's a multiple of 4, a \verb|\notespages| here with |
| 445 |
the default setting (\verb|multiple=4,minpages=0,endpages=0|) will do nothing. |
| 446 |
Let's try it: |
| 447 |
|
| 448 |
\notespages |
| 449 |
|
| 450 |
Look into the source of this file, there is a \verb|\notespages| command between |
| 451 |
this paragraph and the former one. |
| 452 |
|
| 453 |
Inserting an exact number $n$ of notes pages can be done with |
| 454 |
\verb|multiple=1,minpages=|$n$. Here any value for \textsf{endpages} would have |
| 455 |
no effect. |
| 456 |
|
| 457 |
\secleveli{Controlling notes fills} |
| 458 |
\seclevelii{The option \textsf{fillminspace} and \textsf{fillmaxspace}} |
| 459 |
The length given to \textsf{fillminspace} is only used to decide, if a notes fill |
| 460 |
should appear on a page, while \textsf{fillmaxspace} only limits its height. They |
| 461 |
are indepentent from each other. so it's possible to set \textsf{fillminspace} to |
| 462 |
a value greater than \textsf{fillmaxspace}. For example, |
| 463 |
|
| 464 |
\begin{verbatim} |
| 465 |
\notesfill[fillmaxspace=0.4\textheight,fillminspace=0.5\textheight] |
| 466 |
\end{verbatim} |
| 467 |
|
| 468 |
\noindent |
| 469 |
will insert a notes fill on this page, but not on the next one. But |
| 470 |
|
| 471 |
\begin{verbatim} |
| 472 |
\notesfill[fillmaxspace=0.4\textheight,fillminspace=0.2\textheight] |
| 473 |
\end{verbatim} |
| 474 |
|
| 475 |
\noindent |
| 476 |
will insert a notes fill on the page after that, allthough it has the same amount |
| 477 |
of text. |
| 478 |
|
| 479 |
\notesfill[fillmaxspace=0.4\textheight,fillminspace=0.5\textheight] |
| 480 |
|
| 481 |
\fillit[1-3] |
| 482 |
|
| 483 |
\notesfill[fillmaxspace=0.4\textheight,fillminspace=0.5\textheight] |
| 484 |
|
| 485 |
\newpage |
| 486 |
\fillit[1-3] |
| 487 |
|
| 488 |
\notesfill[fillmaxspace=0.4\textheight,fillminspace=0.2\textheight] |
| 489 |
|
| 490 |
\seclevelii{The options \textsf{filltopskip}} |
| 491 |
The option \textsf{filltopskip} is used to get a minimum distance between the text |
| 492 |
and the notes fill. In order to show its effect the \textsf{titlestyle} is changed |
| 493 |
\textsf{\textit{text}}. The commands are |
| 494 |
|
| 495 |
\begin{verbatim} |
| 496 |
\notesfill[titlestyle=text] |
| 497 |
\notesfill[titlestyle=text,filltopskip=2ex] |
| 498 |
\end{verbatim} |
| 499 |
|
| 500 |
Just compare this page to the next one. |
| 501 |
|
| 502 |
\fillit[3] |
| 503 |
|
| 504 |
\notesfill[titlestyle=text] |
| 505 |
|
| 506 |
The different space between the notes title and the nots area here is due to |
| 507 |
the fact, that only full vertical parts are drawn. |
| 508 |
|
| 509 |
\fillit[3] |
| 510 |
|
| 511 |
\notesfill[titlestyle=text,filltopskip=2ex] |
| 512 |
|
| 513 |
\seclevelii{The option \textsf{filltopfill}} |
| 514 |
As can be seen on page 61, the notes fill is moved to the bottom of the page. |
| 515 |
This is due to the fact, that by default \textsf{filltopfill} is set to |
| 516 |
\textsf{\textit{true}}. With the command |
| 517 |
|
| 518 |
\begin{verbatim} |
| 519 |
\notesfill[fillmaxspace=0.4\textheight,filltopfill=false] |
| 520 |
\end{verbatim} |
| 521 |
|
| 522 |
\noindent |
| 523 |
the notes fill is not moved down, as can be seen here. |
| 524 |
|
| 525 |
\notesfill[fillmaxspace=0.4\textheight,filltopfill=false] |
| 526 |
|
| 527 |
\seclevelii{The restriction regarding \textsf{notesfill}} |
| 528 |
As mentioned in the manual, footnotes and bottom floats will appear below the |
| 529 |
notes fill, as shown here.\footnote{Unfortunately, this is not easy to fix.} |
| 530 |
But at least, it has the right height. |
| 531 |
|
| 532 |
\begin{figure}[b] |
| 533 |
\centering |
| 534 |
\textcolor{lightgray}{\rule{0.8\textwidth}{0.2\textheight}} |
| 535 |
\caption{Again, a rectangle}\label{fig:rect4} |
| 536 |
\end{figure} |
| 537 |
|
| 538 |
\notesfill |
| 539 |
|
| 540 |
\secleveli{Advanced commands} |
| 541 |
\seclevelii{The command \texttt{\textbackslash setnotespages}} |
| 542 |
This command is used to change the settings globally. It takes a key value list, |
| 543 |
where all options can be used. It is possible to use the command everywhere in the |
| 544 |
document, changing the settings from the point of its appearance on. For example, |
| 545 |
instead of writing |
| 546 |
|
| 547 |
\begin{verbatim} |
| 548 |
\notesfill[hparts=1,vparts=1,titlestyle=text,filltopskip=2ex, |
| 549 |
titletext=\textsf{\textbf{Scribble}},titleskip=1ex] |
| 550 |
\notespage[hparts=1,vparts=1,titlestyle=text,filltopskip=2ex, |
| 551 |
titletext=\textsf{\textbf{Scribble}},titleskip=1ex] |
| 552 |
\end{verbatim} |
| 553 |
|
| 554 |
\noindent |
| 555 |
it is easier to write |
| 556 |
|
| 557 |
\begin{verbatim} |
| 558 |
\setnotespages{hparts=1,vparts=1,titlestyle=text,filltopskip=2ex, |
| 559 |
titletext=\textsf{\textbf{Scribble}},titleskip=1ex} |
| 560 |
\notesfill |
| 561 |
\notespage |
| 562 |
\setnotespages{default} |
| 563 |
\end{verbatim} |
| 564 |
|
| 565 |
\noindent |
| 566 |
Note, that on the next page the formatting for the \textsf{titletext} is used |
| 567 |
for the header too. This can be circumvented by a) also setting \textsf{marktext} |
| 568 |
or b) defining your own title style (see \autoref{sec:deftitlestyle}). |
| 569 |
|
| 570 |
At the end, the package defaults are restored, so following examles start from |
| 571 |
there. |
| 572 |
|
| 573 |
\setnotespages{hparts=1,vparts=1,titlestyle=text,filltopskip=2ex, |
| 574 |
titletext=\textsf{\textbf{Scribble}},titleskip=1ex} |
| 575 |
\notesfill |
| 576 |
\notespage |
| 577 |
\setnotespages{default} |
| 578 |
|
| 579 |
\seclevelii{The command \texttt{\textbackslash definenotesoption}} |
| 580 |
This command is used to define a new meta option. It is similar to \verb|\setnotespages|, |
| 581 |
but instead of changing the settings, the settings are assigned to a name, which |
| 582 |
can then be used as an option for the commands of this package. With this, the |
| 583 |
last example can be realised with |
| 584 |
|
| 585 |
\begin{verbatim} |
| 586 |
\definenotesoption{scribblepage}{default,hparts=1,vparts=1, |
| 587 |
titlestyle=text,filltopskip=2ex,titletext=\textsf{\textbf{Scribble}}, |
| 588 |
titleskip=1ex,marktext=Scribble} |
| 589 |
\notesfill[scribblepage] |
| 590 |
\notespage[scribblepage] |
| 591 |
\end{verbatim} |
| 592 |
|
| 593 |
\noindent |
| 594 |
Here the option \textsf{default} was used, in order to always keep the same |
| 595 |
appearance, even if the settings were changed with \verb|\setnotespages|. And |
| 596 |
the problem with the header marks in the previous example was solved using |
| 597 |
\textsf{marktext}. |
| 598 |
|
| 599 |
After its definition, the new option \textsf{scribblepage} can also be used in |
| 600 |
\verb|\setnotespages| or another \verb|\definenotesoption|. |
| 601 |
|
| 602 |
\definenotesoption{scribblepage}{default,hparts=1,vparts=1, |
| 603 |
titlestyle=text,filltopskip=2ex,titletext=\textsf{\textbf{Scribble}}, |
| 604 |
titleskip=1ex,marktext=Scribble} |
| 605 |
\notesfill[scribblepage] |
| 606 |
\notespage[scribblepage] |
| 607 |
|
| 608 |
\seclevelii{The command \texttt{\textbackslash definetitlestyle}} |
| 609 |
\label{sec:deftitlestyle} |
| 610 |
With this command a new title style can be defined. The first argument is the |
| 611 |
name for the new style, which can be used as a new choice for the option |
| 612 |
\textsf{titlestyle} after the definition. The second argument contains the macros |
| 613 |
to format the title. |
| 614 |
|
| 615 |
In order to get the text set with the option \textsf{titletext} the command |
| 616 |
\verb|\notestitletext| must be used where the title should appear. But of course, |
| 617 |
it is possible to put in some text. If the indentation by \verb|\parindent| is |
| 618 |
unwanted, the definition should start with \verb|\noindent|. And finally, there |
| 619 |
has to be a \verb|\par| at the end. That said, if a predefined command is used, |
| 620 |
which somehow uses \verb|\noindent| and \verb|\par|, they are no longer necessary. |
| 621 |
For example, the title styles \textsf{\textit{section}} and \textsf{\textit{text}} |
| 622 |
could have been defined with |
| 623 |
\begin{verbatim} |
| 624 |
\definetitlestyle{section}{\section*{\notestitletext}} |
| 625 |
\definetitlestyle{text}{\noindent\notestitletext\par} |
| 626 |
\end{verbatim} |
| 627 |
Btw.: existing title styles should not be redifined, as this may cause problems. |
| 628 |
|
| 629 |
Now lets define a new title style. Here is the example from the manual: |
| 630 |
|
| 631 |
\begin{verbatim} |
| 632 |
\definetitlestyle{boldred}{\noindent\textcolor{red}% |
| 633 |
{\textbf{\notestitletext}}\par} |
| 634 |
\notesfill[scribblepage,titletext={Bold Red Note}, |
| 635 |
titlestyle=boldred,fillminspace=0.1\textheight] |
| 636 |
\end{verbatim} |
| 637 |
|
| 638 |
Here the option \textsf{scribblepage} from the last example was used. And then |
| 639 |
\textsf{titletext} and \textsf{titlestyle} were added, overwriting some of the |
| 640 |
settings done with \textsf{scribblepage}. This shows the importance of the order |
| 641 |
of options. Putting \textsf{scribblepage} at the end would have overwritten the |
| 642 |
other options. |
| 643 |
|
| 644 |
Now, it is possible to put some text directly into the definition. But keep in |
| 645 |
mind, this text will not appear in the headers. Here an example: |
| 646 |
|
| 647 |
\begin{verbatim} |
| 648 |
\definetitlestyle{prefix}{\noindent Note on: |
| 649 |
\textcolor{blue}{\notestitletext}\par} |
| 650 |
\notespage[hparts=1,vparts=1,titleskip=1ex,titletext={Title Styles}, |
| 651 |
titlestyle=prefix] |
| 652 |
\end{verbatim} |
| 653 |
|
| 654 |
\definetitlestyle{boldred}{\noindent\textcolor{red}% |
| 655 |
{\textbf{\notestitletext}}\par} |
| 656 |
\notesfill[scribblepage,titletext={Bold Red Note}, |
| 657 |
titlestyle=boldred,fillminspace=0.1\textheight] |
| 658 |
|
| 659 |
\definetitlestyle{prefix}{\noindent Note on: |
| 660 |
\textcolor{blue}{\notestitletext}\par} |
| 661 |
\notespage[hparts=1,vparts=1,titleskip=1ex,titletext={Title Styles}, |
| 662 |
titlestyle=prefix] |
| 663 |
|
| 664 |
\seclevelii{The command \texttt{\textbackslash definenotestyle}} |
| 665 |
\label{sec:defnotesstyle} |
| 666 |
The notes style provided with \textsf{NotesPages} are just basic ones. With this |
| 667 |
command it is possible to define your own styles, which can be quite fancy. But |
| 668 |
lets start with the simple example from the manual: |
| 669 |
|
| 670 |
\begin{verbatim} |
| 671 |
\definenotesstyle{yellow}{\color{LightYellow}% |
| 672 |
\rule{\textwidth}{\remainingtextheight}} |
| 673 |
\notesfill[notesstyle=yellow] |
| 674 |
\end{verbatim} |
| 675 |
|
| 676 |
Again, the first argument is the name of the new style, which can then be used as |
| 677 |
a new choice for the option \textsf{notesstyle}. And the second argument contains |
| 678 |
the macros to create the notes area. Here \verb|\remainingtextheight| has to be |
| 679 |
used to get the height of the notes area. |
| 680 |
|
| 681 |
\definenotesstyle{yellow}{\color{LightYellow}% |
| 682 |
\rule{\textwidth}{\remainingtextheight}} |
| 683 |
\notesfill[notesstyle=yellow] |
| 684 |
|
| 685 |
For the next example lets create a double frame around the notes area, using the |
| 686 |
\LaTeX\ \textsf{picture} environment: |
| 687 |
|
| 688 |
\begin{verbatim} |
| 689 |
\newdimen\innerwidth |
| 690 |
\newdimen\innerheight |
| 691 |
\definenotesstyle{dframe}{% |
| 692 |
\innerwidth\textwidth\advance\innerwidth-10mm\relax |
| 693 |
\innerheight\remainingtextheight\advance\innerheight-10mm\relax |
| 694 |
\let\unitlength\relax |
| 695 |
\begin{picture}(\textwidth,\remainingtextheight)(0pt,0pt) |
| 696 |
\color{lightgray} |
| 697 |
\put(0pt,0pt){\framebox(\textwidth,\remainingtextheight){}} |
| 698 |
\put(5mm,5mm){\framebox(\innerwidth,\innerheight){}} |
| 699 |
\end{picture}} |
| 700 |
\notesfill[notesstyle=dframe] |
| 701 |
\end{verbatim} |
| 702 |
|
| 703 |
Here first two dimens are needed to calculate the height and width of the inner |
| 704 |
frame. These length are calculated first. Then a trick is used to make the |
| 705 |
\textsf{picture} environment work with lengths: \verb|\unitlength| is set to |
| 706 |
\verb|\relax|, thus disabling it. Caution: this requires to give the optional |
| 707 |
argument for an offset as \verb|(0pt,0pt)|, otherwise an error will occur. |
| 708 |
Additionally, a color for the frames is set. Since the new notes style is used |
| 709 |
within a group, disabling \verb|\unitlength| and setting a color without resetting |
| 710 |
them has no repercussions outside the \verb|\notesfill|. |
| 711 |
|
| 712 |
\newdimen\innerwidth |
| 713 |
\newdimen\innerheight |
| 714 |
\definenotesstyle{dframe}{% |
| 715 |
\innerwidth\textwidth\advance\innerwidth-10mm\relax |
| 716 |
\innerheight\remainingtextheight\advance\innerheight-10mm\relax |
| 717 |
\let\unitlength\relax |
| 718 |
\begin{picture}(\textwidth,\remainingtextheight)(0pt,0pt) |
| 719 |
\color{lightgray} |
| 720 |
\put(0pt,0pt){\framebox(\textwidth,\remainingtextheight){}} |
| 721 |
\put(5mm,5mm){\framebox(\innerwidth,\innerheight){}} |
| 722 |
\end{picture}} |
| 723 |
\notesfill[notesstyle=dframe] |
| 724 |
|
| 725 |
It is also possible to use \textsf{TikZ} to define notes styles. Here the bounding |
| 726 |
box is used to keep the size of the picture to the exact size of the notes area. |
| 727 |
For the text \verb|\notesareatext| is used, thus using the text passed to the option |
| 728 |
\textsf{notestext}. |
| 729 |
|
| 730 |
\begin{verbatim} |
| 731 |
\definenotesstyle{slash}{% |
| 732 |
\begin{tikzpicture}[color=gray!25] |
| 733 |
\useasboundingbox (0,0) rectangle (\textwidth,\remainingtextheight); |
| 734 |
\clip (0,0) rectangle (\textwidth,\remainingtextheight); |
| 735 |
\draw[line width=2cm] |
| 736 |
(0,0) to node[color=black,sloped]{\textsf{\notesareatext}} |
| 737 |
(\textwidth,\remainingtextheight); |
| 738 |
\end{tikzpicture}} |
| 739 |
\notesfill[notesstyle=slash] |
| 740 |
\end{verbatim} |
| 741 |
|
| 742 |
\definenotesstyle{slash}{% |
| 743 |
\begin{tikzpicture}[color=gray!25] |
| 744 |
\useasboundingbox (0,0) rectangle (\textwidth,\remainingtextheight); |
| 745 |
\clip (0,0) rectangle (\textwidth,\remainingtextheight); |
| 746 |
\draw[line width=2cm] |
| 747 |
(0,0) to node[color=black,sloped]{\textsf{\notesareatext}} |
| 748 |
(\textwidth,\remainingtextheight); |
| 749 |
\end{tikzpicture}} |
| 750 |
\notesfill[notesstyle=slash] |
| 751 |
|
| 752 |
Here is another example using \textsf{TikZ}. It defines a mm graph paper, which |
| 753 |
always has a whole number of cm in both direction and is centered in the notes |
| 754 |
area. |
| 755 |
|
| 756 |
\begin{verbatim} |
| 757 |
\newdimen\xoffset |
| 758 |
\newdimen\yoffset |
| 759 |
\definenotesstyle{mmgp}{% |
| 760 |
\begin{tikzpicture}[color=gray!25] |
| 761 |
\pgfmathsetlength{\xoffset}{ |
| 762 |
(\textwidth-(floor(\textwidth/1cm+0.01)*1cm))/2} |
| 763 |
\pgfmathsetlength{\yoffset}{ |
| 764 |
(\remainingtextheight-(floor(\remainingtextheight/1cm+0.01)*1cm))/2} |
| 765 |
\useasboundingbox (0,0) rectangle (\textwidth,\remainingtextheight); |
| 766 |
\draw[xshift=\xoffset,yshift=\yoffset,very thin] |
| 767 |
(0,0) grid [step=1mm] |
| 768 |
(\textwidth-2\xoffset,\remainingtextheight-2\yoffset); |
| 769 |
\draw[xshift=\xoffset,yshift=\yoffset,line width=0.5pt] |
| 770 |
(0,0) grid [step=5mm] |
| 771 |
(\textwidth-2\xoffset,\remainingtextheight-2\yoffset); |
| 772 |
\draw[xshift=\xoffset,yshift=\yoffset,thick] |
| 773 |
(0,0) grid [step=1cm] |
| 774 |
(\textwidth-2\xoffset,\remainingtextheight-2\yoffset); |
| 775 |
\end{tikzpicture}} |
| 776 |
\notesfill[notesstyle=mmgp] |
| 777 |
\end{verbatim} |
| 778 |
|
| 779 |
\newdimen\xoffset |
| 780 |
\newdimen\yoffset |
| 781 |
\definenotesstyle{mmgp}{% |
| 782 |
\begin{tikzpicture}[color=gray!25] |
| 783 |
\pgfmathsetlength{\xoffset}{ |
| 784 |
(\textwidth-(floor(\textwidth/1cm+0.01)*1cm))/2} |
| 785 |
\pgfmathsetlength{\yoffset}{ |
| 786 |
(\remainingtextheight-(floor(\remainingtextheight/1cm+0.01)*1cm))/2} |
| 787 |
\useasboundingbox (0,0) rectangle (\textwidth,\remainingtextheight); |
| 788 |
\draw[xshift=\xoffset,yshift=\yoffset,very thin] |
| 789 |
(0,0) grid [step=1mm] |
| 790 |
(\textwidth-2\xoffset,\remainingtextheight-2\yoffset); |
| 791 |
\draw[xshift=\xoffset,yshift=\yoffset,line width=0.5pt] |
| 792 |
(0,0) grid [step=5mm] |
| 793 |
(\textwidth-2\xoffset,\remainingtextheight-2\yoffset); |
| 794 |
\draw[xshift=\xoffset,yshift=\yoffset,thick] |
| 795 |
(0,0) grid [step=1cm] |
| 796 |
(\textwidth-2\xoffset,\remainingtextheight-2\yoffset); |
| 797 |
\end{tikzpicture}} |
| 798 |
\notesfill[notesstyle=mmgp] |
| 799 |
|
| 800 |
The next example is just for showing the effect of the option \textsf{titlenotesfill}. |
| 801 |
It is not realy useful (unless you want to torture your readers for scribbling in |
| 802 |
your painfully worded masterpiece by making them write in circles). Here the |
| 803 |
bounding box is set to a square. |
| 804 |
|
| 805 |
Caution: since the height is fixed, this notes style is not realy suitable for a |
| 806 |
notes fill. If it doesn't fit on the page, it will be moved to the next. |
| 807 |
|
| 808 |
\begin{verbatim} |
| 809 |
\definenotesstyle{spiral}{% |
| 810 |
\begin{tikzpicture}[color=gray!25] |
| 811 |
\useasboundingbox (-0.5\textwidth,-0.5\textwidth) rectangle |
| 812 |
(0.5\textwidth,0.5\textwidth); |
| 813 |
\draw[domain=0:22*3.14159,smooth,variable=\t,samples=1000] plot |
| 814 |
({-0.1*\t*sin(\t r)},{0.1*\t*cos(\t r)}); |
| 815 |
\end{tikzpicture}} |
| 816 |
\notespage[notesstyle=spiral,titletext={Write in Circles}] |
| 817 |
\notespage[notesstyle=spiral,titletext={Write in Circles}, |
| 818 |
titlenotesfill] |
| 819 |
\end{verbatim} |
| 820 |
|
| 821 |
\definenotesstyle{spiral}{% |
| 822 |
\begin{tikzpicture}[color=gray!25] |
| 823 |
\useasboundingbox (-0.5\textwidth,-0.5\textwidth) rectangle |
| 824 |
(0.5\textwidth,0.5\textwidth); |
| 825 |
\draw[domain=0:22*3.14159,smooth,variable=\t,samples=1000] plot |
| 826 |
({-0.1*\t*sin(\t r)},{0.1*\t*cos(\t r)}); |
| 827 |
\end{tikzpicture}} |
| 828 |
\notespage[notesstyle=spiral,titletext={Write in Circles}] |
| 829 |
\notespage[notesstyle=spiral,titletext={Write in Circles}, |
| 830 |
titlenotesfill] |
| 831 |
|
| 832 |
\seclevelii{The command \texttt{\textbackslash nppatchchapter}} |
| 833 |
Page 68 (among others) would be empty here, if a book class is used. This is, |
| 834 |
because a new chapter normally starts on a right hand page and so a left hand page |
| 835 |
may be left empty. To put a notes page there, one could manually add a line like |
| 836 |
\begin{verbatim} |
| 837 |
\notespages[vacant,multiple=2, |
| 838 |
notestext={An empty page before a new chapter.}] |
| 839 |
\end{verbatim} |
| 840 |
before every new chapter. But with \verb|\nppatchchapter| this can be automated. |
| 841 |
It changes \verb|\chapter| so it behaves like |
| 842 |
\begin{verbatim} |
| 843 |
\notespages[...] |
| 844 |
\chapter |
| 845 |
\end{verbatim} |
| 846 |
The optional argument for \verb|\notespages| is the argument passed to |
| 847 |
\verb|\nppatchchapter|. And the new \verb|\chapter| can just be used like the |
| 848 |
original one. |
| 849 |
|
| 850 |
In the preamble of this document the lines |
| 851 |
\begin{verbatim} |
| 852 |
\nppatchchapter{default,vacant,multiple=2, |
| 853 |
notestext={An empty page before a new chapter.}} |
| 854 |
\end{verbatim} |
| 855 |
were added to make the empty pages before a new chapter into a notes pages. The |
| 856 |
option \textsf{default} asures, that no changes of the settings (this includes |
| 857 |
packages options and settings done with \verb|\setnotespages|) will change their |
| 858 |
apperance. And with \verb|multiple=2| there will be no more then one notes |
| 859 |
page before a new chapter instead of up to three with the default value of 4. |
| 860 |
|
| 861 |
The command \verb|\nppatchchapter| can be used multiple times in a document, |
| 862 |
enabling the user to change the apperance of a notes page before a new chapter. |
| 863 |
The command is: |
| 864 |
|
| 865 |
\begin{verbatim} |
| 866 |
\nppatchchapter{default,vacant,multiple=2, |
| 867 |
notestext={Another notes page\\ |
| 868 |
automatically inserted\\ |
| 869 |
before a new chapter.}} |
| 870 |
\end{verbatim} |
| 871 |
|
| 872 |
\nppatchchapter{default,vacant,multiple=2, |
| 873 |
notestext={Another notes page\\ |
| 874 |
automatically inserted\\ |
| 875 |
before a new chapter.}} |
| 876 |
|
| 877 |
\fillit[1-3] |
| 878 |
|
| 879 |
\secleveli{Colors and Languages} |
| 880 |
\seclevelii{Colors} |
| 881 |
The \textsf{NotesPages} package uses three colors. |
| 882 |
\begin{itemize} |
| 883 |
\item \textsf{NotesHColor} for horizontal lines in the notes styles |
| 884 |
\textsf{\textit{lines}} and \textsf{\textit{grid}}, |
| 885 |
\item \textsf{NotesVColor} for vertical lines in the notes styles |
| 886 |
\textsf{\textit{vlines}} and \textsf{\textit{grid}}, and |
| 887 |
\item \textsf{NotesTextColor} for the text in the notes style |
| 888 |
\textsf{\textit{text}}. |
| 889 |
\end{itemize} |
| 890 |
Colors can be redefined, so it's possible to change them at any time. To make the |
| 891 |
changes local, they are put in a group here. |
| 892 |
|
| 893 |
\begin{verbatim} |
| 894 |
{\definecolor{NotesHColor}{rgb}{0,0,1} |
| 895 |
\definecolor{NotesVColor}{rgb}{0,1,0} |
| 896 |
\definecolor{NotesTextColor}{rgb}{1,0,0} |
| 897 |
\notesfill |
| 898 |
\notespage[notestyle=text]} |
| 899 |
\end{verbatim} |
| 900 |
|
| 901 |
{\definecolor{NotesHColor}{rgb}{0,0,1} |
| 902 |
\definecolor{NotesVColor}{rgb}{0,1,0} |
| 903 |
\definecolor{NotesTextColor}{rgb}{1,0,0} |
| 904 |
\notesfill |
| 905 |
\notespage[notesstyle=text]} |
| 906 |
|
| 907 |
\seclevelii{Languages} |
| 908 |
So far, only English, French, and German are supported. Up unitl now English was |
| 909 |
used in this document. Here are examples for the other ones. |
| 910 |
|
| 911 |
\begin{verbatim} |
| 912 |
\selectlanguage{french} |
| 913 |
\notespage[notesstyle=text] |
| 914 |
\selectlanguage{ngerman} |
| 915 |
\notespage[notesstyle=text] |
| 916 |
\selectlanguage{english} |
| 917 |
\end{verbatim} |
| 918 |
|
| 919 |
New languages will be supported, as users provide the translations. But naturally, |
| 920 |
this will take some time. So if your language is not supported yet and you can't |
| 921 |
wait, you can add the following to the preamble of your document (of course with |
| 922 |
the correct translations): |
| 923 |
|
| 924 |
\begin{verbatim} |
| 925 |
\setnotespages{titletext={No Clue}, |
| 926 |
notestext={No clue what this is in your language.}} |
| 927 |
\end{verbatim} |
| 928 |
|
| 929 |
This is sufficient for documents in one language. But caution, using the option |
| 930 |
\textsf{default} will reset these texts. That can be solved by redefining |
| 931 |
\verb|\npnotesname| and \verb|\npnotestext| instead. For multilingual documents |
| 932 |
you can add for example |
| 933 |
\begin{verbatim} |
| 934 |
\addto{\extrasitalian}{\def\npnotesname{No Clue}% |
| 935 |
\def\npnotestext{No clue what this is in Italian.}} |
| 936 |
\end{verbatim} |
| 937 |
to the preamble (again, for your language and with the correct translations). |
| 938 |
After that you can use |
| 939 |
\begin{verbatim} |
| 940 |
\selectlanguage{italian} |
| 941 |
\notespage[notesstyle=text] |
| 942 |
\end{verbatim} |
| 943 |
to get a notes page in the new language. |
| 944 |
|
| 945 |
\selectlanguage{french} |
| 946 |
\notespage[notesstyle=text] |
| 947 |
\selectlanguage{ngerman} |
| 948 |
\notespage[notesstyle=text] |
| 949 |
\addto{\extrasitalian}{\def\npnotesname{No Clue}% |
| 950 |
\def\npnotestext{No clue what this is in Italian.}} |
| 951 |
\selectlanguage{italian} |
| 952 |
\notespage[notesstyle=text] |
| 953 |
\selectlanguage{english} |
| 954 |
|
| 955 |
\secleveli{Other Stuff} |
| 956 |
\seclevelii{The Package \textsf{afterpage}} |
| 957 |
\textsf{NotesPages} can be used with the package \textsf{afterpage}. This makes |
| 958 |
it possible to put a notes page on the next page without leaving the page it was |
| 959 |
invoked half empty. So here the line |
| 960 |
\begin{verbatim} |
| 961 |
\afterpage{\notespage[titletext={Notes on \textsl{afterpage}}, |
| 962 |
marktext=Notes]} |
| 963 |
\end{verbatim} |
| 964 |
is inserted to get a notes page on the next page, without wasting the remaining |
| 965 |
space on this one (look into the source, here it comes): |
| 966 |
|
| 967 |
\afterpage{\notespage[titletext={Notes on \textsl{afterpage}}, |
| 968 |
marktext=Notes]} |
| 969 |
|
| 970 |
Ok, lets fill this page, so the effect of the example can be seen. You could also |
| 971 |
start a new section here. |
| 972 |
|
| 973 |
\fillit[1-4] |
| 974 |
|
| 975 |
\seclevelii{The command \texttt{\textbackslash npunpatchchapter}} |
| 976 |
With \verb|\npunpatchchapter| the original meaning of \verb|\chapter| can be |
| 977 |
restored. After that, there may be the usual empty before a new chapter, as can |
| 978 |
be seen on the next page. The command: |
| 979 |
|
| 980 |
\begin{verbatim} |
| 981 |
\npunpatchchapter |
| 982 |
\end{verbatim} |
| 983 |
|
| 984 |
\npunpatchchapter |
| 985 |
|
| 986 |
\secleveli{The End} |
| 987 |
Now this is the end of this example file. But I just can't resist to add one more |
| 988 |
example: |
| 989 |
\begin{verbatim} |
| 990 |
\notespages[multiple=100,minpages=100,endpages=1] |
| 991 |
\end{verbatim} |
| 992 |
See you on page 200. |
| 993 |
|
| 994 |
\notespages[multiple=100,minpages=100,endpages=1] |
| 995 |
|
| 996 |
\noindent |
| 997 |
\vspace*{\fill} |
| 998 |
\begin{center} |
| 999 |
\sffamily\bfseries |
| 1000 |
Welcome on page 200.\\~\\ |
| 1001 |
You just scrolled through over a hundred notes pages.\\~\\ |
| 1002 |
Hey, come on, I had to test this. |
| 1003 |
\end{center} |
| 1004 |
\vspace*{\fill} |
| 1005 |
\vspace*{\fill} |
| 1006 |
\end{document} |
| 1007 |
\endinput |
| 1008 |
%% |
| 1009 |
%% End of file `np-test.tex'. |