% arara: pdflatex % arara: makeindex: { sort: true, style: enotez_en.ist } % arara: biber % arara: pdflatex % arara: pdflatex % -------------------------------------------------------------------------- % the ENOTEZ package % % Endnotes for LaTeX2e % % -------------------------------------------------------------------------- % Clemens Niederberger % Web: https://bitbucket.org/cgnieder/enotez/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- % Copyright 2011-2012 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Clemens Niederberger. % -------------------------------------------------------------------------- % The enotez package consists of the files % - enotez.sty, enotez_en.tex, enotez_en.pdf, README % -------------------------------------------------------------------------- % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % -------------------------------------------------------------------------- \documentclass[toc=bib,toc=index]{cnpkgdoc} \docsetup{ pkg = enotez , code-box = { backgroundcolor = gray!7!white , skipbelow = .6\baselineskip plus .5ex minus .5ex , skipabove = .6\baselineskip plus .5ex minus .5ex , roundcorner = 3pt , } , gobble = 1 , subtitle = {Endnotes for \LaTeXe} } \addcmds{ appendix, chapter, cmd, DeclareInstance, DeclareTemplateInterface, endnote, endnotemark, endnotetext, enmark, kant, phantomsection, printendnotes, setenotez, splitendnotes, textsuperscript } \DeclareInstance{enotez-list}{addsec}{paragraph}{heading=\addsec{#1}} % Layout: \usepackage[osf]{libertine} \cnpkgcolors{ main => cnpkgred , key => yellow!40!brown , module => cnpkgblue , link => black!90 } \renewcommand*\othersectionlevelsformat[3]{% \textcolor{main}{#3\autodot}\enskip} \renewcommand*\partformat{% \textcolor{main}{\partname~\thepart\autodot}} \usepackage{fnpct} \AdaptNote\endnote\multendnote \usepackage{embrac}[2012/06/29] \ChangeEmph{[}[,.02em]{]}[.055em,-.08em] \ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em] \ExplSyntaxOn \NewDocumentCommand \Default {g} { \hfill\llap { \IfNoValueTF { #1 } {(initially~empty)} {Default:~\code{#1}} } \newline } \ExplSyntaxOff \usepackage[backend=biber,style=alphabetic]{biblatex} \addbibresource{\jobname.bib} % rudimentary solution for a `maintainer' field: \DeclareFieldFormat{authortype}{\mkbibparens{#1}} % \DeclareFieldAlias{maintainer}{author} \DeclareBibliographyAlias{package}{misc} \renewbibmacro*{author}{% \ifboolexpr{ test \ifuseauthor and not test {\ifnameundef{author}} } {\printnames{author}% \iffieldundef{authortype} {} {\setunit{\space}% \usebibmacro{authorstrg}}} {}} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @package{endnotes, title = {endnotes}, author = {Robin Fairbairns}, authortype = {current maintainer}, date = {2003-01-15}, version = {NA}, url = {http://www.ctan.org/pkg/endnotes}, urldate = {2012-07-03} } @package{sepfootnotes, title = {sepfootnotes}, author = {Eduardo C. Louren\c{c}o de Lima}, date = {2012-03-06}, version = {0.1}, url = {http://www.ctan.org/pkg/sepfootnotes}, urldate = {2012-07-03} } \end{filecontents*} \usepackage{makeidx} \begin{filecontents*}{\jobname.ist} heading_prefix "{\\bfseries " heading_suffix "\\hfil}\\nopagebreak\n" headings_flag 1 delim_0 "\\dotfill " delim_1 "\\dotfill " delim_2 "\\dotfill " delim_r "\\textendash" suffix_2p "\\nohyperpage{\\,f.}" suffix_3p "\\nohyperpage{\\,ff.}" \end{filecontents*} \makeindex \usepackage{kantlipsum} \usepackage{etoolbox} \AtBeginEnvironment{beispiel}{\setfnpct{dont-mess-around}} \usepackage{enumitem} \begin{document} \section{Licence and Requirements} Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). The package has the status ``maintained.'' \enotez needs and loads the following packages: \paket{expl3}, \paket{xparse}, \paket{xtemplate} and \paket{l3keys2e}. If you're using \paket{memoir}, a \paket[http://www.ctan.org/pkg/koma-script]{KOMA-Script} class or the package \paket{caption} \enotez also needs and loads \paket{etoolbox}. \section{Motivation} \enotez is a new implementation of endnotes for \LaTeXe\ since the \paket{endnotes} package~\cite{endnotes} has some deficiencies. Nested endnotes, for example, are not supported, neither is \paket{hyperref}. The \paket{sepfootnotes} package~\cite{sepfootnotes} also provides means for endnotes but actually has a different purpose: to separate input and usage both of footnotes and endnotes. So it might not be the best solution in every case\footnote{You have to write the actual notes in the preamble or a separate file and reference them in the text.}. It also does not allow nested endnotes. \enotez enables nested endnotes properly and has another mechanism of customizing the list of endnotes which is easily extendable. One of the main features of \enotez is a split list of endnotes in which the notes are automatically separated by the sections or chapters they were set in, see section~\ref{sec:split} for more information. As an aside: \enotez is nicely compatible with the \paket{fnpct} package% \footnote{You'll have to use \cmd*{AdaptNote} for the time being, though.}. \section{Usage} \subsection{Placing the Notes} The usage is simple: use \cmd{endnote} in the text where you want to place the note mark. \begin{beschreibung} \befehl{endnote}[]{} Add an endnote in the text. \end{beschreibung} \begin{beispiel} This is some text.\endnote{With an endnote.} \end{beispiel} There's not really much more to it. It is possible to add a custom mark by using the optional argument but that shouldn't be needed too often. \cmd{endnote} works fine inside tables, minipages, floats and captions\footnote{This has been tested with the standard classes, \paket*{memoir}, and the \paket*{KOMA-Script} classes, with and without the \paket*{caption} package. If you're using another package that redefines \cmd*{caption} it might not work.}. Endnotes can also be nested. Since that seemed making a pair \cmd{endnotemark}/\cmd{endnotetext} superfluous they are \emph{not} defined by \enotez. \begin{beispiel} This is some text.\endnote{With another endnote.\endnote{This is a nested\endnote{And another level deeper\ldots} endnote!}} % uses package `kantlipsum': Of course you can have several paragraphs\endnote{\kant[1-3]} in an endnote. \end{beispiel} \subsection{Printing the Notes} The notes are printed by using the command \cmd{printendnotes}. \begin{beschreibung} \befehl{printendnotes}*[