| 1 |
|
| 2 |
\documentclass[twoside,10pt,ragged]{article} |
| 3 |
\PassOptionsToPackage{% |
| 4 |
a4paper,% landscape,% |
| 5 |
bindingoffset=3mm,% |
| 6 |
left=20mm,% |
| 7 |
textwidth=110mm,% |
| 8 |
marginparsep=10mm,% |
| 9 |
marginparwidth=55mm,% |
| 10 |
top=20mm,% |
| 11 |
bottom=20mm,% |
| 12 |
headsep=1\baselineskip,% |
| 13 |
footskip = 2\baselineskip,% |
| 14 |
includeall} {geometry}% |
| 15 |
\usepackage {geometry} |
| 16 |
\RequirePackage[utf8]{inputenc}\usepackage[T1]{fontenc} |
| 17 |
\usepackage[alerton, per=none]{sidenotesplus} |
| 18 |
|
| 19 |
\RequirePackage[svgnames,dvipsnames]{xcolor} |
| 20 |
\usepackage{lipsum} |
| 21 |
\usepackage{xcolor} |
| 22 |
%\setlipsum{% |
| 23 |
% par-before = \begingroup\color{gray}, |
| 24 |
% par-after = \endgroup, |
| 25 |
% sentence-before = \begingroup\color{gray}, |
| 26 |
% sentence-after = \endgroup |
| 27 |
%} |
| 28 |
|
| 29 |
%auto generate the bib file |
| 30 |
\usepackage{filecontents} |
| 31 |
% |
| 32 |
\begin{filecontents}{\jobname.bib} |
| 33 |
@book{Tufte1990, |
| 34 |
author = {Edward R. Tufte}, |
| 35 |
title = {Envisioning Information}, |
| 36 |
publisher = {Graphics Press}, |
| 37 |
year = {1990}, |
| 38 |
isbn = {0-9613921-1-8} |
| 39 |
} |
| 40 |
|
| 41 |
@book{Tufte2006, |
| 42 |
author = {Edward R. Tufte}, |
| 43 |
title = {Beautiful Evidence}, |
| 44 |
year = {2006}, |
| 45 |
publisher = {Graphics Press, {LLC}}, |
| 46 |
isbn = {0-9613921-7-7} |
| 47 |
} |
| 48 |
|
| 49 |
@BOOK{bringhurst:2002, |
| 50 |
title = {{T}he {E}lements of {T}ypographic {S}tyle}, |
| 51 |
publisher = {Hartley \& Marks Publishers}, |
| 52 |
year = {2013}, |
| 53 |
author = {Robert Bringhurst}, |
| 54 |
series = {Version 4.0: 20th Anniversary Edition}, |
| 55 |
address = {Point Roberts, WA, USA} |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
@Article{Einstein_str, |
| 62 |
author = {A. Einstein}, |
| 63 |
journal = {Annalen der Physik}, |
| 64 |
title = {Zur Elektrodynamik bewegter Körper}, |
| 65 |
year = {1905}, |
| 66 |
number = {10}, |
| 67 |
pages = {891--921}, |
| 68 |
volume = {322}, |
| 69 |
doi = {10.1002/andp.19053221004}, |
| 70 |
file = {:Articles/Einstein_1905d - On the Electrodynamics of Moving Bodies.pdf:PDF;:Articles/Einstein_1905d - Zur Elektrodynamik Bewegter Körper.pdf:PDF}, |
| 71 |
groups = {Relativity}, |
| 72 |
publisher = {Wiley}, |
| 73 |
sorttitle = {a}, |
| 74 |
} |
| 75 |
|
| 76 |
@Article{Einstein_mc2, |
| 77 |
author = {A. Einstein}, |
| 78 |
journal = {Annalen der Physik}, |
| 79 |
title = {Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?}, |
| 80 |
year = {1905}, |
| 81 |
number = {13}, |
| 82 |
pages = {639--641}, |
| 83 |
volume = {323}, |
| 84 |
doi = {10.1002/andp.19053231314}, |
| 85 |
file = {:Articles/Einstein_1905e - Does the Inertia of a Body Depend upon its Energy-Content_.pdf:PDF;:Articles/Einstein_1905e - Ist Die Trägheit Eines Körpers Von Seinem Energieinhalt Abhängig_.pdf:PDF}, |
| 86 |
groups = {Relativity}, |
| 87 |
publisher = {Wiley}, |
| 88 |
sorttitle = {b}, |
| 89 |
} |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
\end{filecontents} |
| 94 |
\usepackage{mwe} |
| 95 |
% -- language: English -- |
| 96 |
% |
| 97 |
\usepackage[english]{babel} |
| 98 |
% -- biblatex -- |
| 99 |
\PassOptionsToPackage{% |
| 100 |
backend=bibtex,bibencoding=ascii,% |
| 101 |
language=auto,% |
| 102 |
style=verbose-ibid, |
| 103 |
bibstyle=authoryear,dashed=false, |
| 104 |
sorting = anyvt, |
| 105 |
maxbibnames=10, % default: 3, et al. |
| 106 |
natbib=true, % natbib compatibility mode (\citep and \citet still work) |
| 107 |
urldate=iso,date=iso, |
| 108 |
isbn=false, |
| 109 |
doi=false, |
| 110 |
url=false, |
| 111 |
eprint=false, |
| 112 |
}{biblatex} |
| 113 |
\usepackage{biblatex} |
| 114 |
|
| 115 |
\addbibresource{\jobname.bib} |
| 116 |
|
| 117 |
|
| 118 |
\usepackage{listings} |
| 119 |
\lstset{ |
| 120 |
basicstyle=\sffamily, |
| 121 |
lineskip=0pt, |
| 122 |
aboveskip= 3pt, |
| 123 |
belowskip= 0pt, |
| 124 |
} |
| 125 |
|
| 126 |
\usepackage{tabularx} |
| 127 |
\usepackage{amsmath} |
| 128 |
\usepackage{mathabx} |
| 129 |
\usepackage{tikz} |
| 130 |
\usetikzlibrary{calc} |
| 131 |
\usepackage{xspace} |
| 132 |
|
| 133 |
\captionsetup{font=small} % Requires Package{caption} loaded in sidenoteplus |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
% Author info |
| 139 |
\title{\textbf{\textsf{sidenotesplus}} Example Pages} |
| 140 |
\author{Anton Vrba} |
| 141 |
|
| 142 |
\date{ \today} |
| 143 |
|
| 144 |
\PassOptionsToPackage{osf,sc}{mathpazo}% |
| 145 |
\RequirePackage{mathpazo} |
| 146 |
\linespread{1.05} % a bit more for Palatino |
| 147 |
|
| 148 |
\let\OldTexttt\texttt |
| 149 |
\renewcommand{\texttt}[1]{\OldTexttt{\color{MidnightBlue}{#1}}} |
| 150 |
|
| 151 |
|
| 152 |
\newcommand{\someimage}[3]{% Width, height, label |
| 153 |
\begin{tikzpicture}[x=1pt,y=1pt]% 4x3 |
| 154 |
\path [fill=black!25] (0,0) rectangle (#1,#2); |
| 155 |
\draw [thick,black!40] |
| 156 |
(0,0) -- (#1,#2) |
| 157 |
(#1,0) -- (0,#2) |
| 158 |
(0.5*#1,0) -- (0.5*#1,#2) |
| 159 |
(0,0.5*#2) -- (#1,0.5*#2) |
| 160 |
; |
| 161 |
\path [draw,very thick] (0,0) rectangle (#1,#2); |
| 162 |
\node at (0.5*#1,0.5*#2) {\sffamily\Huge #3} |
| 163 |
; |
| 164 |
\end{tikzpicture}% |
| 165 |
} |
| 166 |
\newcommand \describe \paragraph |
| 167 |
|
| 168 |
|
| 169 |
\begin{document} |
| 170 |
|
| 171 |
|
| 172 |
\maketitle |
| 173 |
|
| 174 |
\begin{abstract} |
| 175 |
\noindent Here we demonstrate the features of \textsf{sidenotesplus}, |
| 176 |
a \LaTeX\xspace package to manage the margin notes, figures, tables and captions. |
| 177 |
Also body text can be extended into the margin for wide figures, tables and equation. |
| 178 |
Twoside symmetry is preserved. For biblatex users, routines for side references are |
| 179 |
provided. |
| 180 |
\end{abstract} |
| 181 |
|
| 182 |
|
| 183 |
Please first read \textsf{sidenotesplus.pdf} for the descriptions and usage of this package. |
| 184 |
This document served as a test platform while developing the package, and uses the standard |
| 185 |
\verb"article" \LaTeX\xspace class. The above right margin note list the first view |
| 186 |
lines\sidenote|-200pt|{% |
| 187 |
\ttfamily\upshape\textbackslash documentclass[twoside,10pt]\textbraceleft |
| 188 |
article\textbraceright\\ |
| 189 |
\textbackslash PassOptionsToPackage\textbraceleft\\ |
| 190 |
\makebox[2ex]{} a4paper,\\ |
| 191 |
\makebox[2ex]{} bindingoffset=3mm,\\ |
| 192 |
\makebox[2ex]{} left=20mm,\\ |
| 193 |
\makebox[2ex]{} textwidth=110mm,\\ |
| 194 |
\makebox[2ex]{} marginparsep=10mm,\\ |
| 195 |
\makebox[2ex]{} marginparwidth=55mm,\\ |
| 196 |
\makebox[2ex]{} top=20mm, bottom=20mm,\\ |
| 197 |
\makebox[2ex]{} headsep=1\textbackslash baselineskip,\\ |
| 198 |
\makebox[2ex]{} footskip = 2\textbackslash baselineskip,\\ |
| 199 |
\makebox[2ex]{} includeall\textbraceright \textbraceleft geometry\textbraceright\\ |
| 200 |
\textbackslash usepackage \textbraceleft geometry\textbraceright\\ |
| 201 |
\textbackslash usepackage[alerton]\textbraceleft sidenotesplus\textbraceright\\ |
| 202 |
} of the document preamble. |
| 203 |
|
| 204 |
Here we have three \sidenote<-15pt>{\textsf{\upshape\textbackslash sidenote<-15pt>} Test up}% |
| 205 |
\sidenote!Blue!{\textsf{\upshape\textbackslash sidenote!Blue!} Test colour}% |
| 206 |
\sidenote|-12mm|{\textsf{\upshape\textbackslash sidenote|-12mm|} but cannot float past \textsuperscript d above} |
| 207 |
and the commas are inserted automatically between the text markers. But, if a line break |
| 208 |
is between the two \verb"\sidenote " commands, then that requires a \% sign before the line break. |
| 209 |
|
| 210 |
In many environments the floating option fails thus the fixed option is used. Example, a side |
| 211 |
note used in an equation: |
| 212 |
|
| 213 |
\begin{equation} \label{eq:123} |
| 214 |
a=b\quad \text{see\sidenote<0pt>{test} } |
| 215 |
\end{equation} |
| 216 |
an was coded \verb+a=b\quad\text{see\sidenote<0pt>{test}}+. in \eqref{eq:123} Important here is |
| 217 |
the option \verb/<0pt>/ with any valid length. |
| 218 |
|
| 219 |
|
| 220 |
Side notes can be placed without \sidenotetext*|-20.pt|{A sidenotetext without a mark. Also |
| 221 |
testing if the command \emph{sidepar} works. |
| 222 |
\sidepar And here we have a new paragraph. And here we have a new paragraph. And here we have a |
| 223 |
new paragraph} references by using the \verb"\sidenote*" option |
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
Similar to \verb"\footnotemark" and \verb"\footnotetext" the package provides macros |
| 228 |
\verb"\sidenotemark", \verb"\sidenotetext" and \verb"\sidenotetextbefore" with the same option |
| 229 |
set. In usage \verb"\sidenotemark" is followed by \verb"\sidenotetext", whereas |
| 230 |
\verb"\sidenotetextbefore" is followed by \verb"\sidenotemark". The side not is placed relative |
| 231 |
to the \verb"\sidenotetext" commands. |
| 232 |
|
| 233 |
\sidecitet*{bringhurst:2002} expertise is in typography, and the famous expression $E=mc^2$ was |
| 234 |
first presented with these papers\sidecite{Einstein_mc2, Einstein_str}. |
| 235 |
|
| 236 |
~ |
| 237 |
|
| 238 |
\noindent The above paragraph was coded: |
| 239 |
\begin{verbatim} |
| 240 |
\sidecitet*{bringhurst:2002} expertise is in typography, |
| 241 |
and the famous expression $E=mc^2$ was first presented |
| 242 |
with these papers\sidecite{Einstein_mc2, Einstein_str}. |
| 243 |
\end{verbatim} |
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
The command \verb"\sidealert" provides a temporary margin notes rendered in red or |
| 249 |
by the user’s defined \verb"!colour!". The alert mark\sidealert{This paragraph needs to be |
| 250 |
expanded} has zero width so it does not alter the main text layout |
| 251 |
and is also rendered in colour The package option \verb"alerton" needs to |
| 252 |
be specified in the document preamble, if omitted the alerts are not printed. |
| 253 |
|
| 254 |
\newpage |
| 255 |
|
| 256 |
\subsection*{Figure demonstration page A} |
| 257 |
\begin{figure}[h] |
| 258 |
\centering |
| 259 |
\someimage{0.75*\textwidth}{70pt}{A}% |
| 260 |
\caption{A: Short caption} |
| 261 |
\label{imageA} |
| 262 |
\end{figure} |
| 263 |
|
| 264 |
\lipsum[3][4-8] |
| 265 |
|
| 266 |
\begin{figure}[h] |
| 267 |
\centering |
| 268 |
\someimage{0.75*\textwidth}{70pt}{B}% |
| 269 |
\caption[A: Long caption] {A: \emph{Long caption} \lipsum[3][1-3]} |
| 270 |
\label{imageB} |
| 271 |
\end{figure} |
| 272 |
% |
| 273 |
% |
| 274 |
\begin{marginfigure}|-500pt|% |
| 275 |
\someimage{\marginparwidth}{70pt}{C}%% |
| 276 |
\margincaption {A: small rectangle in the margin.\label{rectangle1}}% |
| 277 |
\end{marginfigure}% |
| 278 |
% |
| 279 |
% |
| 280 |
\begin{margintable}|-500pt| |
| 281 |
\upshape |
| 282 |
\begin{tabularx}{\marginparwidth}{c X} |
| 283 |
\hline |
| 284 |
\multicolumn{2}{c}{Long Table Heading}\\ |
| 285 |
Item&Description\\ |
| 286 |
\hline |
| 287 |
one& The width of this column depends on the |
| 288 |
width of the table.\\ |
| 289 |
\hline |
| 290 |
\end{tabularx} |
| 291 |
\vskip-1.8ex |
| 292 |
\margincaption{A: Some description \label{mtable1}} |
| 293 |
\end{margintable} |
| 294 |
% |
| 295 |
% |
| 296 |
\begin{marginfigure}|-500pt|% |
| 297 |
\someimage{\marginparwidth}{70pt}{D}%% |
| 298 |
\margincaption[A: Second margin]{A: Second margin figure with a very long label to take many |
| 299 |
lines.\label{rectangle2}}% |
| 300 |
\end{marginfigure}% |
| 301 |
% |
| 302 |
% |
| 303 |
\sidenote*|-40pt|{The gaps between the above floats can be increase by setting the length of {\upshape \textbackslash |
| 304 |
\textsf{marginparpush} }, e.g {\upshape 15pt}. The effect is visible on next page} |
| 305 |
\setlength{\marginparpush}{15pt} |
| 306 |
% |
| 307 |
% |
| 308 |
\begin{figure}[h] |
| 309 |
\raggedinner |
| 310 |
\sidecaption[A: Side caption]{A: \emph{Side caption} with raggedinner command in figure |
| 311 |
ennvironment with a lengthy text \lipsum[7][4-5] } |
| 312 |
\label{imageD} |
| 313 |
\someimage{0.75*\textwidth}{70pt}{E}% |
| 314 |
\end{figure} |
| 315 |
% |
| 316 |
% |
| 317 |
\begin{figure*}[h] |
| 318 |
\centering |
| 319 |
\someimage{\linewidth}{100pt}{Full width figure}% |
| 320 |
\caption[A: Full width] {\emph{Full width} \lipsum[12][1-5]} |
| 321 |
\label{imagefw} |
| 322 |
\end{figure*} |
| 323 |
\lipsum[3][4-6]\sidenote<-10pt>{\lipsum[3][1-2]}\par\lipsum[7][4-9] |
| 324 |
\newpage |
| 325 |
|
| 326 |
\subsection*{Figure demonstration page B} |
| 327 |
\begin{figure}[h] |
| 328 |
\centering |
| 329 |
\someimage{0.75*\textwidth}{70pt}{A}% |
| 330 |
\caption{B: Short caption} |
| 331 |
\label{imageA} |
| 332 |
\end{figure} |
| 333 |
|
| 334 |
\lipsum[3][4-8] |
| 335 |
|
| 336 |
\begin{figure}[h] |
| 337 |
\centering |
| 338 |
\someimage{0.75*\textwidth}{70pt}{B}% |
| 339 |
\caption[B: Long caption] {B: \emph{Long caption} \lipsum[3][1-3]} |
| 340 |
\label{imageB} |
| 341 |
\end{figure} |
| 342 |
% |
| 343 |
% |
| 344 |
\begin{marginfigure}|-500pt|% |
| 345 |
\someimage{\marginparwidth}{70pt}{C}%% |
| 346 |
\margincaption {B: small rectangle in the margin.\label{rectangle1}}% |
| 347 |
\end{marginfigure}% |
| 348 |
% |
| 349 |
% |
| 350 |
\begin{margintable}|-500pt| |
| 351 |
\upshape |
| 352 |
\begin{tabularx}{\marginparwidth}{c X} |
| 353 |
\hline |
| 354 |
\multicolumn{2}{c}{Long Table Heading}\\ |
| 355 |
Item&Description\\ |
| 356 |
\hline |
| 357 |
one& The width of this column depends on the |
| 358 |
width of the table.\\ |
| 359 |
\hline |
| 360 |
\end{tabularx} |
| 361 |
\vskip-1.8ex |
| 362 |
\margincaption{B: Some description \label{mtable1}} |
| 363 |
\end{margintable} |
| 364 |
% |
| 365 |
% |
| 366 |
\begin{marginfigure}|-500pt|% |
| 367 |
\someimage{\marginparwidth}{70pt}{D}%% |
| 368 |
\margincaption[B: Second margin]{B: Second margin figure with a very long label to take many |
| 369 |
lines.\label{rectangle2}}% |
| 370 |
\end{marginfigure}% |
| 371 |
% |
| 372 |
% |
| 373 |
\sidenote*|-40pt|{Note the larger gaps between the above floats as {\upshape \textbackslash |
| 374 |
\textsf{marginparpush} } was set to {\upshape 15pt}.} |
| 375 |
% |
| 376 |
% |
| 377 |
\begin{figure}[h] |
| 378 |
\raggedinner |
| 379 |
\sidecaption[B: Side caption]{B: \emph{Side caption} with raggedinner command in figure |
| 380 |
ennvironment \lipsum[7][4-5]} |
| 381 |
\label{imageD} |
| 382 |
\someimage{0.75*\textwidth}{70pt}{E}% |
| 383 |
\end{figure} |
| 384 |
% |
| 385 |
% |
| 386 |
\begin{figure*}[h] |
| 387 |
\centering |
| 388 |
\someimage{\linewidth}{100pt}{Full width figure}% |
| 389 |
\caption[B: Full width] {\emph{Full width} \lipsum[12][1-5]} |
| 390 |
\label{imagefw} |
| 391 |
\end{figure*} |
| 392 |
\lipsum[3][4-6]\sidenote<-10pt>{\lipsum[3][1-2]}\par\lipsum[7][4-9] |
| 393 |
\newpage |
| 394 |
|
| 395 |
|
| 396 |
\newpage |
| 397 |
And a final check |
| 398 |
\listoffigures |
| 399 |
\listoftables |
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
\end{document} |