texlive[57147] Master/texmf-dist: snotez (14dec20)

commits+karl at tug.org commits+karl at tug.org
Tue Dec 15 23:21:35 CET 2020


Revision: 57147
          http://tug.org/svn/texlive?view=revision&revision=57147
Author:   karl
Date:     2020-12-15 23:21:35 +0100 (Tue, 15 Dec 2020)
Log Message:
-----------
snotez (14dec20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/snotez/README
    trunk/Master/texmf-dist/doc/latex/snotez/snotez_en.pdf
    trunk/Master/texmf-dist/doc/latex/snotez/snotez_en.tex
    trunk/Master/texmf-dist/tex/latex/snotez/snotez.sty

Modified: trunk/Master/texmf-dist/doc/latex/snotez/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/snotez/README	2020-12-15 22:21:20 UTC (rev 57146)
+++ trunk/Master/texmf-dist/doc/latex/snotez/README	2020-12-15 22:21:35 UTC (rev 57147)
@@ -1,5 +1,5 @@
 --------------------------------------------------------------------------
-the SNOTEZ package v0.3 2013/04/21
+the SNOTEZ package v0.5a 2020/12/14
 
   Sidenotes for LaTeX2e
 
@@ -8,15 +8,15 @@
 Web:    https://bitbucket.org/cgnieder/snotez/
 E-Mail: contact at mychemistry.eu
 --------------------------------------------------------------------------
-Copyright 2012--2013 Clemens Niederberger
+Copyright 2012--2020 Clemens Niederberger
 
 This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
 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.
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008/05/04 or later.
 
 This work has the LPPL maintenance status `maintained'.
 
@@ -27,4 +27,4 @@
 --------------------------------------------------------------------------
 If you have any ideas, questions, suggestions or bugs to report, please
 feel free to contact me.
---------------------------------------------------------------------------
\ No newline at end of file
+--------------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/doc/latex/snotez/snotez_en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/snotez/snotez_en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/snotez/snotez_en.tex	2020-12-15 22:21:20 UTC (rev 57146)
+++ trunk/Master/texmf-dist/doc/latex/snotez/snotez_en.tex	2020-12-15 22:21:35 UTC (rev 57147)
@@ -1,7 +1,3 @@
-% arara: pdflatex
-% arara: biber
-% arara: pdflatex
-% arara: pdflatex
 % --------------------------------------------------------------------------
 % the SNOTEZ package
 % 
@@ -12,401 +8,348 @@
 % Web:    https://bitbucket.org/cgnieder/snotez/
 % E-Mail: contact at mychemistry.eu
 % --------------------------------------------------------------------------
-% Copyright 2012--2013 Clemens Niederberger
+% Copyright 2012--2020 Clemens Niederberger
 % 
 % This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
 % 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.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
 % 
 % This work has the LPPL maintenance status `maintained'.
 % 
 % The Current Maintainer of this work is Clemens Niederberger.
 % --------------------------------------------------------------------------
-% The snotez package consists of the files
-%  - snotez.sty, snotez_en.tex, snotez_en.pdf, README
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-% in order to compile this documentation you need the document class
-% `cnpkgdoc' which you can get here:
-%   https://bitbucket.org/cgnieder/cnpkgdoc/
-%
-\PassOptionsToPackage{supstfm=libertinesups}{superiors}
-\documentclass[toc=index,toc=bib,mpinclude]{cnpkgdoc}
+\documentclass[load-preamble+]{cnltx-doc}
+\setlength\textwidth{\dimexpr\textwidth-1.2\marginparwidth\relax}
 \setlength{\marginparwidth}{2\marginparwidth}
-\docsetup{
-  pkg={[footnote,perpage,dblarg]snotez},
-  subtitle=sidenote support for \LaTeXe
-}
-\addcmds{
-  RaggedRight,
-  sidenote,setsidenotes,superiors at spaced,
-  textsu
-}
-% Layout:
-\cnpkgusecolorscheme{friendly}
-\renewcommand*\othersectionlevelsformat[3]{%
-  \textcolor{main}{#3\autodot}\enskip}
-\renewcommand*\partformat{%
-  \textcolor{main}{\partname~\thepart\autodot}}
-\usepackage{fnpct}
-\AdaptNoteOpt\sidenote\multsidenote
-\pagestyle{headings}
 
-\usepackage[biblatex]{embrac}[2013/03/22]
-\ChangeEmph{[}[,.02em]{]}[.055em,-.08em]
-\ChangeEmph{(}[-.01em,.04em]{)}[.04em,-.05em]
-
-\robustify\snotez
-
-\usepackage{libertinehologopatch}
-\usepackage{ragged2e}
-
-\normalmarginpar
-
-% Index:
-\usepackage{imakeidx}
-\usepackage{filecontents}
-\begin{filecontents*}{\jobname.ist}
- heading_prefix "{\\bfseries "
- heading_suffix "\\hfil}\\nopagebreak\n"
- headings_flag  1
- delim_0 "\\dotfill\\hyperpage{"
- delim_1 "\\dotfill\\hyperpage{"
- delim_2 "\\dotfill\\hyperpage{"
- delim_r "}\\textendash\\hyperpage{"
- delim_t "}"
- suffix_2p "\\nohyperpage{\\,f.}"
- suffix_3p "\\nohyperpage{\\,ff.}"
-\end{filecontents*}
-\indexsetup{othercode=\footnotesize}
-\makeindex[options={-s \jobname.ist},intoc,columns=3]
-
-\usepackage[backend=biber,style=alphabetic]{biblatex}
-\addbibresource{\jobname.bib}
-\begin{filecontents}{\jobname.bib}
- at package{pkg:chngcntr,
-  title   = {\paket*{chngcntr}},
-  author  = {Peter Wilson and Will Robertson},
-  date    = {2009-09-02},
-  version = {1.0a},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/chngcntr}
+\usepackage[footnote,perpage]{snotez}
+\setcnltx{
+  package  = snotez ,
+  authors  = Clemens Niederberger ,
+  email    = contact at mychemistry.eu ,
+  url      = https://bitbucket.org/cgnieder/snotez ,
+  info     = sidenote support for \LaTeXe ,
+  add-cmds = {
+    newsnotezfloat ,
+    setsidenotes ,
+    sidenote ,
+    sidenotemark ,
+    sidenotetext ,
+    thesidenote ,
+  } ,
+  add-silent-cmds = {
+    @captype, @car , at cdr , @currentlabel , @nil ,
+    @the at snotez@mark ,
+    @x at sf ,
+    cnltx at create@generic at message ,
+    ifltxcounter ,
+    MakeSorted , MakeSortedPerPage ,
+    marginnote ,
+    pgfkeys , pgfqkeys ,
+    protected at edef , protected at xdef ,
+    RaggedRight ,
+    snotez at date ,
+    snotez at description ,
+    snotez at error ,
+    snotez at error@message ,
+    snotez at format ,
+    snotez at if@nblskip ,
+    snotez at marginnote , snotez at marginpar ,
+    snotez at mark ,
+    snotez at new@sidefloat ,
+    snotez at note@mark at format ,
+    snotez at note@mark at sep ,
+    snotez at sidefloat@box ,
+    snotez at sidefloat@format ,
+    snotez at sidenote@aux ,
+    snotez at sidenote@dblarg ,
+    snotez at sidenote@dblarg at aux ,
+    snotez at sidenote@nodblarg ,
+    snotez at sidenote@nodblarg at aux ,
+    snotez at sidenotetext@aux ,
+    snotez at sidenotetext@dblarg ,
+    snotez at sidenotetext@dblarg at aux ,
+    snotez at sidenotetext@nodblarg ,
+    snotez at sidenotetext@nodblarg at aux ,
+    snotez at text ,
+    snotez at text@mark at format ,
+    snotez at version ,
+    snotez at write@mark ,
+    snotez at warning ,
+    textsu
+  } ,
+  makeindex-setup = {columns=3, columnsep=1em}
 }
- at package{pkg:etoolbox,
-  title   = {\paket*{etoolbox}},
-  author  = {Philipp Lehman},
-  date    = {2011-01-21},
-  version = {2.1},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/etoolbox}
-}
- at package{pkg:fnpct,
-  title   = {\paket*{fnpct}},
-  author  = {Clemens Niederberger},
-  date    = {2013-04-07},
-  version = {0.2k},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/fnpct}
-}
- at package{pkg:marginnote,
-  title   = {\paket*{marginnote}},
-  author  = {Markus Kohm},
-  date    = {2012-03-29},
-  version = {1.1i},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/marginnote}
-}
- at package{cls:memoir,
-  title   = {\klasse{memoir}},
-  author  = {Lars Madsen and Peter Wilson},
-  date    = {2011-03-06},
-  version = {3.6j patch 6.0g},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/memoir}
-}
- at package{pkg:perpage,
-  title   = {\paket*{perpage}},
-  author  = {David Kastrup},
-  date    = {2006-07-15},
-  version = {1.12},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/perpage}
-}
- at package{pkg:pgfopts,
-  title   = {\paket*{pgfopts}},
-  author  = {Joseph Wright},
-  date    = {2011-06-02},
-  version = {2.1},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/pgfopts}
-}
- at package{pkg:ragged2e,
-  title   = {\paket*{ragged2e}},
-  author  = {Martin Schröder},
-  date    = {2009-05-21},
-  version = {2.1},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/ragged2e}
-}
- at package{pkg:sidenotes,
-  title   = {\paket*{sidenotes}},
-  author  = {Andy Thomas and Oliver Schebaum},
-  date    = {2012-11-09},
-  version = {0.92},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/sidenotes}
-}
- at package{pkg:superiors,
-  title   = {\paket*{superiors}},
-  author  = {Michael Sharpe},
-  date    = {2012-08-13},
-  version = {1.02},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/superiors}
-}
- at package{cls:tufte,
-  title   = {\klasse{tufte-latex}},
-  author  = {Kevin Godby and Bil Kleb and Bill Wood},
-  date    = {2009-12-11},
-  version = {3.5.0},
-  url     = {http://mirror.ctan.org/macros/latex/contrib/sidenotes}
-}
-\end{filecontents}
 
-\newcommand*\Default[1]{%
-  \hfill\llap{%
-    \ifblank{#1}
-      {(initially~empty)}
-      {Default:~\code{#1}}%
-    }\newline
-}
+\defbibheading{bibliography}[\bibname]{\addsec{References}}
 
 \makeatletter
-\providecommand*\sinceversion[1]{%
-  \@bsphack
-  \marginnote{%
-    \footnotesize\sffamily\RaggedRight
-    \textcolor{black!75}{Introduced in version~#1}}%
-  \@esphack}
-\providecommand*\changedversion[1]{%
-  \@bsphack
-  \marginnote{%
-    \footnotesize\sffamily\RaggedRight
-    \textcolor{black!75}{Changed in version~#1}}%
-  \@esphack}
-
 \newcommand*\defaultsidenotes{%
   \setsidenotes{
-    note-mark-format = \@textsuperscript{\normalfont##1},
-    text-format      = \footnotesize
+    note-mark-format = \@textsuperscript{\normalfont\normalcolor##1},
+    text-format      = \normalfont\normalcolor\footnotesize
   }}
+\makeatother
 \setsidenotes{
   note-mark-format=#1.,
-  text-mark-format=\textsu{\hspace*{\superiors at spaced}#1},
+  text-mark-format=\textsu{\hspace*{.04em}#1},
   text-format+=\RaggedRight
 }
-\makeatother
 
+\renewrobustcmd*\sinceversion[1]{%
+  \sidenote{\GetTranslation{cnltx-introduced}~#1}%
+}
+\renewrobustcmd*\changedversion[1]{%
+  \sidenote{\GetTranslation{cnltx-changed}~#1}%
+}
+
+\newname\kohm{Markus Kohm}
+\newname\tennent{Bob Tennent}
+\newname\thomas{Andy Thomas}
+
 \begin{document}
 
-\section{License and Requirements}\label{sec:license}\secidx{License}
-\snotez is placed under the terms of the \LaTeX{} Project Public License,
-version 1.3 or later (\url{http://www.latex-project.org/lppl.txt}). It has the
-status ``maintained.''
+\section{License and Requirements}\label{sec:license}
+\license
 
-\snotez needs and loads the packages
-\paket*{etoolbox}\sidenote[*-2][]{\textcite{pkg:etoolbox}},
-\paket*{pgfopts}\sidenote[*-][]{\textcite{pkg:pgfopts}},
-\paket*{marginnote}\sidenote{\textcite{pkg:marginnote}} and
-\paket*{perpage}\sidenote{\textcite{pkg:perpage}}.
-\secidx*{License}
+\snotez\ needs and loads the packages
+\pkg{etoolbox}\sidenote(*-2){\textcite{pkg:etoolbox}},
+\pkg{pgfopts}\sidenote(*-1){\textcite{pkg:pgfopts}},
+\pkg{marginnote}\sidenote{\textcite{pkg:marginnote}} and
+\pkg{perpage}\sidenote{\textcite{pkg:perpage}}.
 
-\section{Motivation}
+\section{Motivation}\label{sec:motivation}
 This has just been an exercise on a lazy
-afternoon\sidenote[*-2][]{\url{http://www.youtube.com/watch?v=PPRiaYH1iTk}}.
-Well, more or less at least. Since there already is Andy Thomas' \paket*{sidenotes}
-package\sidenote[*-][]{\textcite{pkg:sidenotes}} there is probably
-no real need for \snotez. Moreover, the tufte classes\sidenote{\textcite{cls:tufte}}
-as well as \klasse{memoir}\sidenote{\textcite{cls:memoir}} also provide corresponding
-mechanisms. Besides the fun I had my motivation was also based on the fact that
-I didn't like some smaller things (\emph{not} bugs) done by the \paket{sidenotes}
-package such as inserting kerns and superscripted commas for multiple marks. I
-prefer to let my \paket*{fnpct}\sidenote{\textcite{pkg:fnpct}} package handle
-these things. Anyways, here it is and it seems to be working as intended so I
-don't see a reason why it shouldn't be available for use.
+afternoon\sidenote{\url{https://www.youtube.com/watch?v=OU6EyXcFBxA}}.  Well,
+in the beginning at least.  Since there already is \thomas' \pkg{sidenotes}
+package\sidenote{\textcite{pkg:sidenotes}} there is probably no real need for
+\snotez.  Moreover, the tufte classes\sidenote{\textcite{cls:tufte}} as well
+as \cls{memoir}\sidenote{\textcite{cls:memoir}} also provide corresponding
+mechanisms.  Besides the fun I had my motivation was also based on the fact
+that I didn't like some things done by the \pkg{sidenotes} package such as
+inserting kerns and superscripted commas for multiple marks.  I prefer to let
+my \pkg{fnpct}\sidenote{\textcite{pkg:fnpct}} package handle these things.
+Anyways, here it is and it seems to be working as intended so I don't see a
+reason why it shouldn't be available for use.
 
-By the way: the \paket*{fnpct} package v0.2k and later knows about \snotez and
-automatically adapts the note commands. Please note that you need to enable
-the \key{dblarg} option (see page~\pageref{key:dblarg}) when you're using
-\paket*{fnpct} together with \snotez!
+By the way: the \pkg{fnpct} package~v0.2k and later knows about \snotez\ and
+automatically adapts the note commands!
 
-\section{Introduction}\secidx{Introduction}
-The \snotez Package introduces a \cmd{sidenote} command%
+\section{Introduction}\label{sec:introduction}
+The \snotez\ package introduces a \cs{sidenote} command%
 \begingroup\defaultsidenotes
 \sidenote{This is an example demonstrating the default appearance.}
 \endgroup
-that typesets sidenotes the
-same way \cmd{footnote} typesets footnotes. It provides some options that allow
-formatting the appearance of the sidenotes\sidenote[*][]{In all sidenotes in this
-document the mark is typeset on the baseline and the text is set ragged right.}.
-As a default sidenotes are typeset in a \cmd{marginpar} but there are possibilities
-using Markus Kohm's \paket{marginnote}~\cite{pkg:marginnote} package as well.
+that typesets sidenotes the same way \cs*{footnote} typesets footnotes.  It
+provides some options that allow formatting the appearance of the
+sidenotes\sidenote{In all sidenotes in this document the mark is typeset
+  on the baseline and the text is set ragged right.}.  As a default sidenotes
+are typeset in a \cs*{marginpar} but there are possibilities using \kohm's
+\pkg{marginnote}~\cite{pkg:marginnote} package as well.
 
 As with footnotes it is possible to set mark and text separately using the
-equivalent commands \cmd{sidenotemark} and \cmd{sidenotetext}, respectively.
-Instead of lots of code examples this documentation will use the \cmd{sidenote}
-macro itself extensively. It is assumend you know how to use \cmd{footnote} and
-are able to transfer your knowledge.
-\secidx*{Introduction}
+equivalent commands \cs{sidenotemark} and \cs{sidenotetext}, respectively.
+Instead of lots of code examples this documentation will use the \cs{sidenote}
+macro itself extensively.  It is assumend you know how to use \cs*{footnote}
+and are able to transfer your knowledge.
 
-\section{Usage}\secidx{Usage}
-The basic usage is the very same as with \LaTeX's \cmd{footnote}, \cmd{footnotemark}
-and \cmd{footnotetext}. Unsurprisingly the presented commands are these:
-\begin{beschreibung}
- \Befehl{sidenote}\oa{<mark>}\ma{<text>}\newline
-   The basic command. The syntax is the very same as for \cmd{footnote}.
- \Befehl{sidenote}\oa{<offset>}\oa{<mark>}\ma{<text>}\newline
-   Actually I lied: \cmd{sidenote} has a second option that smuggles itself
-   before the \oa{<mark>} option if you use it: an argument for a vertical offset
-   that takes a length. An empty second option assumes you want the automatic
-   mark. If you use this argument the note is set with the \cmd{marginnote}
-   command\sidenote[*-3][]{From the \paket{marginnote} package}.
-   Please see its documentation\sidenote[*-2][]{For example with \texttt{texdoc
-   marginnote} on your command line.}~\cite{pkg:marginnote} for the \da{<offset>}
-   argument. \snotez only passes the value on.\par
-   \sinceversion{0.3} Actually, this is only part of the truth: while typing this
-   documentation I repeatedly found myself shifting notes by multiples of
-   \cmd{baselineskip} so the argument accepts a shortcut for this. A star \code{*}
-   followed by a (positive or negative) number denotes a multiple of \cmd{baselineskip}.
-   By the way: a positive value shifts the note \emph{down}.\par
-   When you're using the \key{dblarg}{false} option this second optional argument
-   has parentheses instead of square brackets!
- \Befehl{sidenotemark}\oa{<text>}\newline
-   This command has the same purpose as \cmd{footnotemark} but for sidenotes.
- \Befehl{sidenotetext}\oa{<mark>}\ma{<text>}\newline
-   The same as \cmd{footnotetext} but for sidenotes. Beware where you place it:
-   it calls \cmd{marginpar} or \cmd{marginnote} and thus determines where the
-   actual note is placed.
- \Befehl{sidenotetext}\oa{<offset>}\oa{<mark>}\ma{<text>}\newline
-   I lied again: \cmd{sidenotetext} also has the second optional argument
-   \oa{<offset>} that again smuggles itself before the \oa{<mark>} option if you
-   use it. For details see the second description of the \cmd{sidenote} command.
-\end{beschreibung}
+\section{Usage}\label{sec:usage}
+The basic usage is the very same as with \LaTeX's \cs*{footnote},
+\cs*{footnotemark} and \cs*{footnotetext}.  Unsurprisingly the presented
+commands are these:
+\begin{commands}
+  \command{sidenote}[\oarg{mark}\marg{text}]
+    The basic command.  The syntax is the very same as for \cs*{footnote}.
+  \command{sidenote}[\darg{offset}\oarg{mark}\marg{text}]
+    Actually I lied: \cs{sidenote} has a second option that smuggles itself
+    before the \meta{mark} option if you use it: an argument for a vertical
+    offset that takes a length. An empty second option assumes you want the
+    automatic mark.  If you use this argument the note is set with the
+    \cs*{marginnote} command\sidenote(*-1){From the \pkg{marginnote}
+      package}.  Please see its documentation\sidenote{For example with
+      \code{texdoc marginnote} on your command line.}~\cite{pkg:marginnote}
+    for the \meta{offset} argument.  \snotez\ only passes the value on.
+    
+    Actually, this is only part of the truth: while typing this documentation
+    I repeatedly found myself shifting notes by multiples of
+    \cs*{baselineskip} so the argument accepts a shortcut for this.  A star
+    \code{*} followed by a (positive or negative) number denotes a multiple of
+    \cs*{baselineskip}.  By the way: a positive value shifts the note
+    \emph{down}.
+    
+    When you're using the \keyis{dblarg}{true} option the \meta{offset}
+    argument has square brackets instead of parentheses!
+  \command{sidenotemark}[\oarg{marg}]
+    This command has the same purpose as \cs*{footnotemark} but for
+    sidenotes.
+  \command{sidenotetext}[\oarg{mark}\marg{text}]
+    The same as \cs*{footnotetext} but for sidenotes.  Beware where you place
+    it: it calls \cs*{marginpar} or \cs*{marginnote} and thus determines where
+    the actual note is placed.
+  \command{sidenotetext}[\darg{offset}\oarg{mark}\marg{text}]
+    I lied again: \cs{sidenotetext} also has the second optional argument
+    \meta{offset} that again smuggles itself before the \meta{mark} option if
+    you use it.  For details see the second description of the \cs{sidenote}
+    command.
+\end{commands}
 
 Here is one short example of the usage.
 
-\begin{beispiel}[code only]
- % produces a sidenote with automatic number in a
- % \marginpar:
- \sidenote{A note}
+\begin{sourcecode}
+  % produces a sidenote with automatic number in a
+  % \marginpar:
+  \sidenote{A note}
+ 
+  % produces a sidenote with mark `a' in a
+  % \marginpar:
+  \sidenote[a]{A note}
+ 
+  % produces a sidenote with automatic number in a
+  % \marginnote:
+  \sidenote(){A note}
+  % alternative syntax (dblarg=true):
+  \sidenote[][]{A note}
+ 
+  % produces a sidenote with automatic number in a
+  % \marginnote shifted down by \baselineskip:
+  \sidenote(*){A note}
+  % alternative syntax (dblarg=true):
+  \sidenote[*][]{A note}
+ 
+  % produces a sidenote with automatic number in a
+  % \marginnote shifted up by 2ex:
+  \sidenote(-2ex){A note}
+  % alternative syntax (dblarg=true):
+  \sidenote[-2ex][]{A note}
+ 
+  % produces a sidenote with mark `a' in a
+  % \marginnote shifted down by 2\baselineskip:
+  \sidenote(*2)[a]{A note}
+  % alternative syntax (dblarg=true):
+  \sidenote[*2][a]{A note}
+\end{sourcecode}
 
- % produces a sidenote with mark `a' in a
- % \marginpar:
- \sidenote[a]{A note}
+\section{Figures in the Margin}\label{sec:figures-margin}
+In the case of small figures or tables one might want to place them in the
+margin, too.  Especially in a document with a larger margin than it is in the
+standard classes.
 
- % produces a sidenote with automatic number in a
- % \marginnote:
- \sidenote[][]{A note}
- % alternative syntax (dblarg=false):
- \sidenote(){A note}
+For these cases \snotez\ provides\sinceversion{0.5} these environments:
+\begin{environments}
+  \environment{sidefigure}
+    Places a figure in the margin within a \cs*{marginpar}.  \cs*{caption} can
+    be used in the usual way.
+  \environment{sidetable}
+    Places a table in the margin within a \cs*{marginpar}.  \cs*{caption} can
+    be used in the usual way.
+\end{environments}
 
- % produces a sidenote with automatic number in a
- % \marginnote shifted down by \baselineskip:
- \sidenote[*][]{A note}
- % alternative syntax (dblarg=false):
- \sidenote(*){A note}
+In order to be able to place other floats in the margin, too, \snotez\
+provides the following command:
+\begin{commands}
+  \command{newsnotezfloat}[\oarg{code}\marg{name}]
+    This defines a new environment \code{side}\meta{name}.  \meta{code} would
+    be placed after the formatting from \option{sidefloat-format} but before
+    the environment's contents.
+\end{commands}
+Both existing environments have been defined with this command.
+\begin{sourcecode}
+  \newsnotezfloat{figure}
+  \newsnotezfloat{table}
+\end{sourcecode}
 
- % produces a sidenote with automatic number in a
- % \marginnote shifted up by 2ex:
- \sidenote[-2ex][]{A note}
- % alternative syntax (dblarg=false):
- \sidenote(-2ex){A note}
-
- % produces a sidenote with mark `a' in a
- % \marginnote shifted down by 2\baselineskip:
- \sidenote[*2][a]{A note}
- % alternative syntax (dblarg=false):
- \sidenote(*2)[a]{A note}
-\end{beispiel}
-\secidx*{Usage}
-
-\section{Options}\secidx{Options}
+\section{Options}\label{sec:options}
 Although all options can be used as package option you can also set all options
 (locally) with a setup command:
-\begin{beschreibung}
- \Befehl{setsidenotes}{<options>}
-\end{beschreibung}
+\begin{commands}
+  \command{setsidenotes}[\marg{options}]
+    Set options as a comma-separated list of key/value pairs.
+\end{commands}
 Available options are these:
-\begin{beschreibung}
- \Option{dblarg}{\default{true}|false}\Default{true}
-   \sinceversion{0.3}\emph{This option can only be used as a package option!}
-   Prior to version~0.3 \snotez' \cmd{sidenote} and \cmd{sidenotetext} had both
-   their optional arguments with square brackets where the use of one argument
-   referred to the mark but when both were used the first argument referred to
-   the offset and the second to the mark. This syntax is kept with this option.
-   Setting it to \code{false} changes the \oa{<offset>} argument syntax into
-   \da{<offset>}.\par
-   \emph{If you're using \snotez together with the \paket*{fnpct} package~\cite{pkg:fnpct}
-   you cannot set \key{dblarg} to \code{false}. Otherwise the \da{<offset>}
-   argument get's lost!}
- \Option{marginnote}{\default{true}|false}\Default{false}
-   Use \paket{marginnote}'s \cmd{marginnote}~\cite{pkg:marginnote} for all
-   \cmd{sidenote}s. In the default setting \cmd{sidenote} uses \cmd{marginpar}s
-   to set the sidenote unless you use the \oa{<offset>} argument. If you use
-   this option \emph{all} sidenotes are set with \cmd{marginnote}. \emph{This
-   option can only be used in the preamble}.
- \Option{text-format}{<code>}\Default{\cmd*{footnotesize}}
-   The format of the sidenote text.
- \Option{text-format+}{<code>}\Default{}
-   Code to be appended to the format set with \key{text-format}\sidenote{This
-   document, for example, appends \paket*{ragged2e}'s \cmd*{RaggedRight}~\cite{pkg:ragged2e}
-   to the sidenote's format.}.
- \Option{perpage}{\default{true}|false}\Default{false}
-   Make sidenotes counter per page. \emph{This option can only be set in the
-   preamble}. It uses package \paket{perpage}'s~\cite{pkg:perpage}
-   \cmd{MakeSortedPerPage} macro for the task. Otherwise the macro
-   \cmd{MakeSorted} is used. In the default setting sidenotes are counted per
-   chapter. If you want sidenotes counted document-wise together with a class
-   that defines a counter \code{chapter} then use for example the package
-   \paket*{chngcntr}~\cite{pkg:chngcntr} and issue
-   \cmd*{counterwithout}{sidenote}\ma{chapter} after loading \snotez.
-   This documentation is an example for the use of the option.
- \Option{note-mark-sep}{<code>}\Default{\cmd*{space}}
-   The separator between sidenote mark and sidenote text in the sidenote.
- \Option{note-mark-format}{<code>}\Default{\cmd*{@textsuperscript}\{\cmd*{normalfont}\#1\}}
-   The format of the sidenote mark in the sidenote. Please refer to the actual
-   mark with \code{\#1}.
- \Option{text-mark-format}{<code>}\Default{\cmd*{@textsuperscript}\{\cmd*{normalfont}\#1\}}
-   The format of the sidenote mark in the text\sidenote[*-][]{This document uses
-   Michael Sharpe's \paket*{superiors} package~\cite{pkg:superiors} and redefines
-   the mark formats to use its \cmd*{textsu} command.}. Please refer to the actual
-   mark with \code{\#1}.
- \Option{footnote}{\default{true}|false}\Default{false}
-   Let\sidenote[*][]{In the sense of \cmd*{let}} \cmd{footnote} to be \cmd{sidenote},
-   \cmd{footnotemark} to be \cmd{sidenotemark} and \cmd{footnotetext} to be
-   \cmd{sidenotetext}. \emph{This option can only be used in the preamble}.
-\end{beschreibung}
+\begin{options}
+  \keybool{dblarg}\Default{false}\label{key:dblarg}%
+    Prior to version~0.3 \snotez' \cs{sidenote} and \cs{sidenotetext} had both
+    their optional arguments with square brackets where the use of one argument
+    referred to the mark but when both were used the first argument referred
+    to the offset and the second to the mark.  This syntax is kept with this
+    option.  Setting it to \code{true} changes the \darg{offset} argument
+    syntax into \oarg{offset}.
+  \keybool{marginnote}\Default{false}
+    Use \pkg{marginnote}'s \cs*{marginnote}~\cite{pkg:marginnote} for all
+    \cs{sidenote}s.  In the default setting \cs{sidenote} uses
+    \cs*{marginpar}s to set the sidenote unless you use the \meta{offset}
+    argument.  If you use this option \emph{all} sidenotes are set with
+    \cs*{marginnote}.  \emph{This option can only be used in the preamble}.
+  \keyval{text-format}{code}\Default{\cs*{normalfont}\cs*{footnotesize}}
+    The format of the sidenote text.
+  \keyval{text-format+}{code}\Default
+    Code to be appended to the format set with
+    \option{text-format}\sidenote{This document, for example, appends
+      \pkg{ragged2e}'s \cs*{RaggedRight}~\cite{pkg:ragged2e} to the
+      sidenote's format.}.
+  \keybool{perpage}\Default{false}
+    \emph{This option can only be set in the preamble}.  Make sidenotes
+    counter per page.  It uses package \pkg{perpage}'s~\cite{pkg:perpage}
+    \cs*{MakeSortedPerPage} macro for the task.  Otherwise the macro
+    \cs*{MakeSorted} is used.  In the default setting sidenotes are counted 
+    per chapter.  If you want sidenotes counted document-wise together with a
+    class that defines a counter \code{chapter} then use for example the
+    package \pkg{chngcntr}~\cite{pkg:chngcntr} and issue
+    \cs*{counterwithout}\Marg{sidenote}\Marg{chapter} after loading \snotez.
+    This documentation is an example for the use of the option.
+  \keyval{note-mark-sep}{code}\Default{\cs*{space}}
+    The separator between sidenote mark and sidenote text in the sidenote.
+  \keyval{note-mark-format}{code}\Default{\cs*{@textsuperscript}\Marg{\cs*{normalfont}\#1}}
+    The format of the sidenote mark in the sidenote.  Please refer to the
+    actual mark with \code{\#1}.
+  \keyval{text-mark-format}{code}\Default{\cs*{@textsuperscript}\Marg{\cs*{normalfont}\#1}}
+    The format of the sidenote mark in the text\sidenote(*-1){This document
+      uses \tennent's \pkg{libertine} package~\cite{pkg:libertine} and
+      redefines the mark formats to use its \cs*{textsu} command.}.  Please
+    refer to the actual mark with \code{\#1}.
+  \keybool{footnote}\Default{false}
+    \emph{This option can only be used in the preamble}. Let\sidenote{In
+      the sense of \cs*{let}} \cs*{footnote} to be \cs{sidenote},
+    \cs*{footnotemark} to be \cs{sidenotemark} and \cs*{footnotetext} to be
+    \cs{sidenotetext}.
+  \keyval{sidefloat-format}{code}\Default{\cs*{raggedright}}
+    The format of the contents of a sidefloat environment
+    text\sinceversion{0.5}.
+  \keyval{sidefloat-format+}{code}
+    Code to be appended to the format set with
+    \option{sidefloat-format}\sinceversion{0.5}.
+\end{options}
 
+\clearpage
 As a short example this is how the sidenotes for this document are formatted:
-\begin{beispiel}[code only]
-\setsidenotes{
-  note-mark-format=#1.,
-  text-mark-format=\textsu{\hspace*{\superiors at spaced}#1},
-  text-format+=\RaggedRight,
-  perpage=true
-}
-\end{beispiel}
-\secidx*{Options}
+\begin{sourcecode}
+  \setsidenotes{
+    note-mark-format=#1.,
+    text-mark-format=\textsu{\hspace*{.04em}#1},
+    text-format+=\RaggedRight,
+    perpage=true
+  }
+\end{sourcecode}
 
-\setlength{\linewidth}{\dimexpr\textwidth+.5\marginparwidth}
-\printbibliography
 
 \section{Implementation}
 In the following code the lines 1--30 have been omitted. They only repeat the
 license statement which has already been mentioned in section~\ref{sec:license}.
 
-\implementation[linerange={31-1000},firstnumber=31]
+\implementation[
+  linerange={31-1000},
+  firstnumber=31,
+  basicstyle=\ttfamily\footnotesize
+]{snotez.sty}
 
-\indexprologue{\noindent Section titles are indicated \textbf{bold}, packages
-\textsf{sans serif}, commands \code{\textbackslash\textcolor{code}{brown}}
- and options \textcolor{key}{\code{yellow}}.\par\bigskip}
+\indexprologue{\noindent Package names are indicated {\packageformat sans
+    serif}, commands \code{\textbackslash\textcolor{cs}{brown}} and options
+  \textcolor{option}{\code{yellow}}.\par\bigskip}
  
-\printindex
+% \printindex
 
-\end{document}
\ No newline at end of file
+\end{document}

Modified: trunk/Master/texmf-dist/tex/latex/snotez/snotez.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/snotez/snotez.sty	2020-12-15 22:21:20 UTC (rev 57146)
+++ trunk/Master/texmf-dist/tex/latex/snotez/snotez.sty	2020-12-15 22:21:35 UTC (rev 57147)
@@ -8,28 +8,22 @@
 % Web:    https://bitbucket.org/cgnieder/enotez/
 % E-Mail: contact at mychemistry.eu
 % --------------------------------------------------------------------------
-% Copyright 2012--2013 Clemens Niederberger
+% Copyright 2012--2020 Clemens Niederberger
 % 
 % This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
 % 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.
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008/05/04 or later.
 % 
 % This work has the LPPL maintenance status `maintained'.
 % 
 % The Current Maintainer of this work is Clemens Niederberger.
 % --------------------------------------------------------------------------
-% The snotez package consists of the files
-%  - snotez.sty, snotez_en.tex, snotez_en.pdf, README
-% --------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% --------------------------------------------------------------------------
-\def\snotez at date{2013/04/21}
-\def\snotez at version{v0.3}
+\def\snotez at date{2020/12/14}
+\def\snotez at version{v0.5a}
 \def\snotez at description{sidenote support for LaTeX 2e (CN)}
 
 \NeedsTeXFormat{LaTeX2e}
@@ -41,49 +35,45 @@
   {\AtEndPreamble{\RequirePackage{perpage}}}
 
 % --------------------------------------------------------------------------
-% message handling
-\def\snotez at create@message#1{%
-  \ifstrequal{#1}{Error}
-    {%
-      \lowercase{\csdef{snotez@#1}}##1##2{%
-        \csuse{Package#1}{snotez}{##1}{##2}}%
-    }{%
-      \lowercase{\csdef{snotez@#1}}##1{%
-        \csuse{Package#1}{snotez}{##1}}%
-    }}
-\snotez at create@message{Error}
-\snotez at create@message{Warning}
-\snotez at create@message{WarningNoLine}
-\snotez at create@message{Info}
-
-% --------------------------------------------------------------------------
 % package options:
 \newbool{snotez at marginnote}
 \newbool{snotez at perpage}
 \newbool{snotez at footnote}
 \newbool{snotez at dblarg}
-\booltrue{snotez at dblarg}
 
-\def\snotez at note@mark at sep{\space}
-\def\snotez at note@mark at format#1{\@textsuperscript{\normalfont#1}}
-\def\snotez at format{\footnotesize}
-\def\snotez at text@mark at format#1{\@textsuperscript{\normalfont#1}}
+\newcommand*\snotez at note@mark at sep{\space}
+\newcommand*\snotez at note@mark at format[1]{\@textsuperscript{\normalfont#1}}
+\newcommand*\snotez at format{\normalfont\footnotesize}
+\newcommand*\snotez at text@mark at format[1]{\@textsuperscript{\normalfont#1}}
 
 \pgfkeys{
   snotez/.cd,
     % all sidenotes use \marginnote:
     marginnote/.is if       = snotez at marginnote ,
-    text-format/.code       = \def\snotez at format{#1} ,
+    % formatting of the note text:
+    text-format/.code       = \renewcommand*\snotez at format{#1} ,
     text-format+/.code      =
-      \expandafter\def\expandafter\snotez at format\expandafter{\snotez at format#1} ,
+      \expandafter\renewcommand
+      \expandafter*%
+      \expandafter\snotez at format
+      \expandafter{\snotez at format#1} ,
     % make sidenotes counted per page:
     perpage/.is if          = snotez at perpage ,
-    note-mark-sep/.code     = \def\snotez at note@mark at sep{#1} ,
-    note-mark-format/.code  = \def\snotez at note@mark at format##1{#1} ,
-    text-mark-format/.code  = \def\snotez at text@mark at format##1{#1} ,
+    % formatting of the note mark:
+    note-mark-sep/.code     = \renewcommand*\snotez at note@mark at sep{#1} ,
+    note-mark-format/.code  = \renewcommand*\snotez at note@mark at format[1]{#1} ,
+    text-mark-format/.code  = \renewcommand*\snotez at text@mark at format[1]{#1} ,
     % make all footnotes sidenotes:
     footnote/.is if         = snotez at footnote ,
-    dblarg/.is if           = snotez at dblarg
+    % change optional argument input:
+    dblarg/.is if           = snotez at dblarg ,
+    % formmatting of the sidefloats' contents:
+    sidefloat-format/.code  = \renewcommand*\snotez at sidefloat@format{#1} ,
+    sidefloat-format+/.code =
+      \expandafter\renewcommand
+      \expandafter*%
+      \expandafter\snotez at sidefloat@format
+      \expandafter{\snotez at sidefloat@format#1}
 }
 
 \ProcessPgfOptions*
@@ -93,54 +83,62 @@
 % --------------------------------------------------------------------------
 % the \sidenote command
 \ifbool{snotez at dblarg}{
-  % syntax:
-  % - \sidenote{text}
-  % - \sidenote[mark]{text}
-  % - \sidenote[offset][mark]{text}
   \newrobustcmd*\sidenote{%
-    \@ifnextchar[%
-      {\snotez at sidenote@aux at i}
-      {\snotez at sidenote@aux at ii{}[]}% no option
+    \snotez at sidenote@dblarg
   }
-
-  \def\snotez at sidenote@aux at i[#1]{%
-    \@ifnextchar[%
-      {\snotez at sidenote@aux at ii{#1}}% two options
-      {\snotez at sidenote@aux at ii{}[{#1}]}% one option
-  }
 }{
-  % syntax:
-  % - \sidenote{text}
-  % - \sidenote[mark]{text}
-  % - \sidenote(offset){text}
-  % - \sidenote(offset)[mark]{text}
   \newrobustcmd*\sidenote{%
-    \@ifnextchar(%
-      {\snotez at sidenote@aux at i}% offset
-      {%
-        \@ifnextchar[
-          {\snotez at sidenote@aux at ii{}}% no offset nut mark
-          {\snotez at sidenote@aux at ii{}[]}% no offset and no mark
-      }%
+    \snotez at sidenote@nodblarg
   }
+}
 
-  \def\snotez at sidenote@aux at i(#1){%
-    \@ifnextchar[%
-      {\snotez at sidenote@aux at ii{#1}}% mark
-      {\snotez at sidenote@aux at ii{#1}[]}% no mark
-  }
+% syntax:
+% - \sidenote{text}
+% - \sidenote[mark]{text}
+% - \sidenote[offset][mark]{text}
+\newrobustcmd*\snotez at sidenote@dblarg{%
+  \@ifnextchar[%
+    {\snotez at sidenote@dblarg at aux}
+    {\snotez at sidenote@aux{}[]}% no option
 }
 
+\protected\def\snotez at sidenote@dblarg at aux[#1]{%
+  \@ifnextchar[%
+    {\snotez at sidenote@aux{#1}}% two options
+    {\snotez at sidenote@aux{}[{#1}]}% one option
+}
+
+% syntax:
+% - \sidenote{text}
+% - \sidenote[mark]{text}
+% - \sidenote(offset){text}
+% - \sidenote(offset)[mark]{text}
+\newrobustcmd*\snotez at sidenote@nodblarg{%
+  \@ifnextchar(%
+    {\snotez at sidenote@nodblarg at aux}% offset
+    {%
+      \@ifnextchar[
+        {\snotez at sidenote@aux{}}% no offset but mark
+        {\snotez at sidenote@aux{}[]}% no offset and no mark
+    }%
+}
+
+\protected\def\snotez at sidenote@nodblarg at aux(#1){%
+  \@ifnextchar[%
+    {\snotez at sidenote@aux{#1}}% mark
+    {\snotez at sidenote@aux{#1}[]}% no mark
+}
+
 % #1: offset
 % #2: mark
 % #3: text
-\long\def\snotez at sidenote@aux at ii#1[#2]#3{%
+\long\def\snotez at sidenote@aux#1[#2]#3{%
   \snotez at mark{#2}%
   \snotez at text{#1}{#3}%
 }
 
 % this one is very much \@footnotemark from latex.ltx:
-\def\snotez at write@mark#1{%
+\newrobustcmd*\snotez at write@mark[1]{%
   \leavevmode
   \ifhmode\edef\@x at sf{\the\spacefactor}\nobreak\fi
   #1%
@@ -148,17 +146,23 @@
   \relax
 }
 
-\def\snotez at mark#1{%
+\newrobustcmd*\snotez at mark[1]{%
   \ifblank{#1}% or \ifstrempty?
-    {\refstepcounter{sidenote}\protected at xdef\@the at snotez@mark{\thesidenote}}
-    {\protected at edef\@currentlabel{#1}\protected at xdef\@the at snotez@mark{#1}}%
-  \snotez at write@mark{\hbox{\snotez at text@mark at format{\@the at snotez@mark}}}%
+    {%
+      \refstepcounter{sidenote}%
+      \protected at xdef\@the at snotez@mark{\thesidenote}%
+    }
+    {%
+      \protected at edef\@currentlabel{#1}%
+      \protected at xdef\@the at snotez@mark{#1}%
+    }%
+  \snotez at write@mark{%
+    \hbox{\snotez at text@mark at format{\@the at snotez@mark}}}%
 }
 
-\ifcsdef{c at chapter}
+\ifltxcounter{chapter}
   {\newcounter{sidenote}[chapter]}
-  {\newcounter{sidenote}%
-}
+  {\newcounter{sidenote}}
 
 % --------------------------------------------------------------------------
 % the \sidenotemark command
@@ -167,48 +171,56 @@
 % --------------------------------------------------------------------------
 % the \sidenotetext command
 \ifbool{snotez at dblarg}{
-  % syntax:
-  % - \sidenotetext{text}
-  % - \sidenotetext[mark]{text}
-  % - \sidenotetext[offset][mark]{text}
   \newrobustcmd*\sidenotetext{%
-    \@ifnextchar[%
-      {\snotez at sidenotetext@aux at i}
-      {\snotez at sidenotetext@aux at ii{}[]}% no option
+    \snotez at sidenotetext@dblarg
   }
-
-  \def\snotez at sidenotetext@aux at i[#1]{%
-    \@ifnextchar[%
-      {\snotez at sidenotetext@aux at ii{#1}}% two options
-      {\snotez at sidenotetext@aux at ii{}[{#1}]}% one option
-  }
 }{
-  % syntax:
-  % - \sidenotetext{text}
-  % - \sidenotetext[mark]{text}
-  % - \sidenotetext(offset){text}
-  % - \sidenotetext(offset)[mark]{text}
   \newrobustcmd*\sidenotetext{%
-    \@ifnextchar(%
-      {\snotez at sidenotetext@aux at i}% offset
-      {%
-        \@ifnextchar[
-          {\snotez at sidenotetext@aux at ii{}}% no offset nut mark
-          {\snotez at sidenotetext@aux at ii{}[]}% no offset and no mark
-      }%
+    \snotez at sidenotetext@nodblarg
   }
+}
 
-  \def\snotez at sidenotetext@aux at i(#1){%
-    \@ifnextchar[%
-      {\snotez at sidenotetext@aux at ii{#1}}% mark
-      {\snotez at sidenotetext@aux at ii{#1}[]}% no mark
-  }
+% syntax:
+% - \sidenotetext{text}
+% - \sidenotetext[mark]{text}
+% - \sidenotetext[offset][mark]{text}
+\newrobustcmd*\snotez at sidenotetext@dblarg{%
+  \@ifnextchar[%
+    {\snotez at sidenotetext@dblarg at aux}
+    {\snotez at sidenotetext@aux{}[]}% no option
 }
 
+\protected\def\snotez at sidenotetext@dblarg at aux[#1]{%
+  \@ifnextchar[%
+    {\snotez at sidenotetext@aux{#1}}% two options
+    {\snotez at sidenotetext@aux{}[{#1}]}% one option
+}
+
+% syntax:
+% - \sidenotetext{text}
+% - \sidenotetext[mark]{text}
+% - \sidenotetext(offset){text}
+% - \sidenotetext(offset)[mark]{text}
+\newrobustcmd*\snotez at sidenotetext@nodblarg{%
+  \@ifnextchar(%
+    {\snotez at sidenotetext@nodblarg at aux}% offset
+    {%
+      \@ifnextchar[
+        {\snotez at sidenotetext@aux{}}% no offset nut mark
+        {\snotez at sidenotetext@aux{}[]}% no offset and no mark
+    }%
+}
+
+\protected\def\snotez at sidenotetext@nodblarg at aux(#1){%
+  \@ifnextchar[%
+    {\snotez at sidenotetext@aux{#1}}% mark
+    {\snotez at sidenotetext@aux{#1}[]}% no mark
+}
+
 % #1: offset
 % #2: mark
 % #3: text
-\long\def\snotez at sidenotetext@aux at ii#1[#2]#3{%
+\long\protected\def\snotez at sidenotetext@aux#1[#2]#3{%
   \ifblank{#2}{}{\protected at xdef\@the at snotez@mark{#2}}%
   \snotez at text{#1}{#3}%
 }
@@ -215,7 +227,7 @@
 
 % #1: offset
 % #2: text
-\def\snotez at text#1#2{%
+\newrobustcmd*\snotez at text[2]{%
   \ifblank{#1}
     {%
       \snotez at marginpar{%
@@ -228,16 +240,19 @@
         \snotez at format
         \snotez at write@mark{\snotez at note@mark at format{\@the at snotez@mark}}%
         \snotez at note@mark at sep#2%
-      }[\snotez at if@nblskip{#1}{\@cdr#1\@nil\baselineskip}{#1}]%
+      }[\snotez at if@nblskip{#1}]%
     }%
 }
 
-\def\snotez at if@nblskip#1{%
+\newcommand*\snotez at if@nblskip[1]{%
+  % if #1 starts with * gobble it and add \baselineskip:
   \expandafter\ifx\@car#1\@nil*%
     \expandafter\@firstoftwo
   \else
     \expandafter\@secondoftwo
   \fi
+  {\@cdr#1\@nil\baselineskip}%
+  {#1}%
 }
 
 \let\snotez at marginpar\marginpar
@@ -244,6 +259,35 @@
 \let\snotez at marginnote\marginnote
 
 % --------------------------------------------------------------------------
+% margin floats with captions, based on an idea in tufte-latex
+\newsavebox\snotez at sidefloat@box
+\newcommand*\snotez at sidefloat@format{\raggedright}
+
+\newenvironment{snotez at sidefloat}[2]
+  {%
+    \def\@captype{#1}%
+    \begin{lrbox}{\snotez at sidefloat@box}%
+      \minipage{\marginparwidth}%
+      \snotez at sidefloat@format#2%
+  }
+  {
+      \endminipage
+    \end{lrbox}%
+    \marginpar{\unhbox\snotez at sidefloat@box}%
+  }
+
+\newrobustcmd*\snotez at new@sidefloat[2]{%
+  \newenvironment{side#1}
+    {\snotez at sidefloat{#1}{#2}}
+    {\endsnotez at sidefloat}%
+}
+
+\newrobustcmd*\newsnotezfloat[2][]{\snotez at new@sidefloat{#2}{#1}}
+
+\newsnotezfloat{figure}
+\newsnotezfloat{table}
+
+% --------------------------------------------------------------------------
 % process preamble options:
 \AtBeginDocument{
   % if option `footnote=true' let \footnote to \sidenote:
@@ -252,13 +296,17 @@
       \let\footnote\sidenote
       \let\footnotemark\sidenotemark
       \let\footnotetext\sidenotetext
+      \ifdef\multfootnote{%
+        \let\multfootnote\multsidenote
+      }{}%
     }{}
   % if option `marginnote=true' use \marginnote for all notes:
   \ifbool{snotez at marginnote}
     {%
       \let\snotez at marginpar\marginnote
-      \snotez at info{All sidenotes are now using \string\marginnote^^J
-      instead of \string\marginpar}%
+      \PackageInfo{snotez}
+        {All sidenotes are now using \string\marginnote^^J
+         instead of \string\marginpar}%
     }%
     {}
 }
@@ -268,19 +316,6 @@
   \ifbool{snotez at perpage}
     {\MakeSortedPerPage{sidenote}}
     {\MakeSorted{sidenote}}%
-  \@ifpackageloaded{fnpct}
-    {%
-      \ifbool{snotez at dblarg}
-        {}
-        {%
-          \snotez at error
-            {When you're using the `fnpct' package together with^^J
-            `snotez' you need to enable the `dblarg' option!}
-            {When you're using the `fnpct' package together with^^J
-            `snotez' you need to enable the `dblarg' option!}%
-        }%
-    }
-    {}%
 }
 
 \endinput
@@ -296,4 +331,10 @@
                  - allow `*' syntax for offsets that are multiples of
                    \baselineskip
                  - syntax change in optional arguments; option `dblarg'
-                   provides previous syntax
+                   provides previous syntax >> this is the default
+2013/06/13 v0.3a - better separation of definition of \sidenote and
+                   \sidenotetext commands and the internal commands
+2013/11/21 v0.4  - robustify commands where appropriate
+                 - use cnltx-base
+2020/01/12 v0.5  - remove dependency on `cnltx-base'
+2020/12/14 v0.5a - fix issue #1



More information about the tex-live-commits mailing list.