summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-10 21:18:19 +0000
committerKarl Berry <karl@freefriends.org>2022-02-10 21:18:19 +0000
commit0cc3b9e766d5a223ba2e8c5f3580a08accf94db6 (patch)
tree3fa432116f9382dc770b519c8a562b670391f30a /Master/texmf-dist
parent3a17c1d60ed7a89b17f5e89110c1777a987b02fd (diff)
snotez (10feb22)
git-svn-id: svn://tug.org/texlive/trunk@61968 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/snotez/README8
-rw-r--r--Master/texmf-dist/doc/latex/snotez/snotez-manual.pdfbin0 -> 459024 bytes
-rw-r--r--Master/texmf-dist/doc/latex/snotez/snotez-manual.tex (renamed from Master/texmf-dist/doc/latex/snotez/snotez_en.tex)37
-rw-r--r--Master/texmf-dist/doc/latex/snotez/snotez_en.pdfbin446647 -> 0 bytes
-rw-r--r--Master/texmf-dist/tex/latex/snotez/snotez.sty87
5 files changed, 61 insertions, 71 deletions
diff --git a/Master/texmf-dist/doc/latex/snotez/README b/Master/texmf-dist/doc/latex/snotez/README
index 75671c058b3..8382efb0265 100644
--- a/Master/texmf-dist/doc/latex/snotez/README
+++ b/Master/texmf-dist/doc/latex/snotez/README
@@ -1,14 +1,14 @@
--------------------------------------------------------------------------
-the SNOTEZ package v0.5a 2020/12/14
+the SNOTEZ package v0.6 2022/02/10
Sidenotes for LaTeX2e
--------------------------------------------------------------------------
Clemens Niederberger
-Web: https://bitbucket.org/cgnieder/snotez/
-E-Mail: contact@mychemistry.eu
+Web: https://github.com/cgnieder/snotez/
+E-Mail: clemens@cnltx.de
--------------------------------------------------------------------------
-Copyright 2012--2020 Clemens Niederberger
+Copyright 2012--2022 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/Master/texmf-dist/doc/latex/snotez/snotez-manual.pdf b/Master/texmf-dist/doc/latex/snotez/snotez-manual.pdf
new file mode 100644
index 00000000000..80470bfd002
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/snotez/snotez-manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/snotez/snotez_en.tex b/Master/texmf-dist/doc/latex/snotez/snotez-manual.tex
index c488fd49bb9..1cc9061ab27 100644
--- a/Master/texmf-dist/doc/latex/snotez/snotez_en.tex
+++ b/Master/texmf-dist/doc/latex/snotez/snotez-manual.tex
@@ -5,10 +5,10 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: https://bitbucket.org/cgnieder/snotez/
-% E-Mail: contact@mychemistry.eu
+% Web: https://github.com/cgnieder/snotez/
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
-% Copyright 2012--2020 Clemens Niederberger
+% Copyright 2012--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -30,8 +30,8 @@
\setcnltx{
package = snotez ,
authors = Clemens Niederberger ,
- email = contact@mychemistry.eu ,
- url = https://bitbucket.org/cgnieder/snotez ,
+ email = clemens@cnltx.de ,
+ url = https://github.com/cgnieder/snotez ,
info = sidenote support for \LaTeXe ,
add-cmds = {
newsnotezfloat ,
@@ -116,12 +116,6 @@
\section{License and Requirements}\label{sec:license}
\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}\label{sec:motivation}
This has just been an exercise on a lazy
afternoon\sidenote{\url{https://www.youtube.com/watch?v=OU6EyXcFBxA}}. Well,
@@ -293,14 +287,13 @@ Available options are these:
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.
+ counter per page. It uses package \pkg{zref-perpage}'s~\cite{bnd:zref}
+ for the task. This documentation is an example for the use of the option.
+ \keybool{perchapter}\Default{false}
+ \emph{This option can only be set in the preamble}.\sinceversion{0.6} If
+ your document class has defined a counter \code{chapter} and if you set
+ this to \code{true} the \code{sidenote} counter will be added to the reset
+ list of the \code{chapter} counter.
\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}}
@@ -337,12 +330,12 @@ As a short example this is how the sidenotes for this document are formatted:
\section{Implementation}
-In the following code the lines 1--30 have been omitted. They only repeat the
+In the following code the lines 1--24 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,
+ linerange={25-344},
+ firstnumber=25,
basicstyle=\ttfamily\footnotesize
]{snotez.sty}
diff --git a/Master/texmf-dist/doc/latex/snotez/snotez_en.pdf b/Master/texmf-dist/doc/latex/snotez/snotez_en.pdf
deleted file mode 100644
index 54b0b73423b..00000000000
--- a/Master/texmf-dist/doc/latex/snotez/snotez_en.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/snotez/snotez.sty b/Master/texmf-dist/tex/latex/snotez/snotez.sty
index 0891f93dfe5..f6e9b7a7465 100644
--- a/Master/texmf-dist/tex/latex/snotez/snotez.sty
+++ b/Master/texmf-dist/tex/latex/snotez/snotez.sty
@@ -5,10 +5,10 @@
%
% --------------------------------------------------------------------------
% Clemens Niederberger
-% Web: https://bitbucket.org/cgnieder/enotez/
-% E-Mail: contact@mychemistry.eu
+% Web: https://github.com/cgnieder/snotez/
+% E-Mail: clemens@cnltx.de
% --------------------------------------------------------------------------
-% Copyright 2012--2020 Clemens Niederberger
+% Copyright 2012--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -22,17 +22,14 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-\def\snotez@date{2020/12/14}
-\def\snotez@version{v0.5a}
+\def\snotez@date{2022/02/10}
+\def\snotez@version{v0.6}
\def\snotez@description{sidenote support for LaTeX 2e (CN)}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{snotez}[\snotez@date\space \snotez@version\space \snotez@description]
\RequirePackage{etoolbox,pgfopts,marginnote}
-\@ifpackageloaded{zref-abspage}
- {\RequirePackage{perpage}}
- {\AtEndPreamble{\RequirePackage{perpage}}}
% --------------------------------------------------------------------------
% package options:
@@ -40,6 +37,7 @@
\newbool{snotez@perpage}
\newbool{snotez@footnote}
\newbool{snotez@dblarg}
+\newbool{snotez@perchapter}
\newcommand*\snotez@note@mark@sep{\space}
\newcommand*\snotez@note@mark@format[1]{\@textsuperscript{\normalfont#1}}
@@ -59,6 +57,8 @@
\expandafter{\snotez@format#1} ,
% make sidenotes counted per page:
perpage/.is if = snotez@perpage ,
+ % count sidenotes per chapter:
+ perchapter/.is if = snotez@perchapter ,
% formatting of the note mark:
note-mark-sep/.code = \renewcommand*\snotez@note@mark@sep{#1} ,
note-mark-format/.code = \renewcommand*\snotez@note@mark@format[1]{#1} ,
@@ -82,14 +82,10 @@
% --------------------------------------------------------------------------
% the \sidenote command
-\ifbool{snotez@dblarg}{
- \newrobustcmd*\sidenote{%
- \snotez@sidenote@dblarg
- }
-}{
- \newrobustcmd*\sidenote{%
- \snotez@sidenote@nodblarg
- }
+\AtBeginDocument{%
+ \ifbool{snotez@dblarg}
+ {\newrobustcmd*\sidenote{\snotez@sidenote@dblarg}}
+ {\newrobustcmd*\sidenote{\snotez@sidenote@nodblarg}}%
}
% syntax:
@@ -160,9 +156,12 @@
\hbox{\snotez@text@mark@format{\@the@snotez@mark}}}%
}
-\ifltxcounter{chapter}
- {\newcounter{sidenote}[chapter]}
- {\newcounter{sidenote}}
+\newcounter{sidenote}
+\AtBeginDocument{%
+ \ifltxcounter{chapter}{%
+ \ifbool{snotez@perchapter}{\counterwithin*{sidenote}{chapter}}{}%
+ }{}
+}
% --------------------------------------------------------------------------
% the \sidenotemark command
@@ -170,16 +169,12 @@
% --------------------------------------------------------------------------
% the \sidenotetext command
-\ifbool{snotez@dblarg}{
- \newrobustcmd*\sidenotetext{%
- \snotez@sidenotetext@dblarg
- }
-}{
- \newrobustcmd*\sidenotetext{%
- \snotez@sidenotetext@nodblarg
- }
+\AtBeginDocument{
+ \ifbool{snotez@dblarg}
+ {\newrobustcmd*\sidenotetext{\snotez@sidenotetext@dblarg}}
+ {\newrobustcmd*\sidenotetext{\snotez@sidenotetext@nodblarg}}
}
-
+
% syntax:
% - \sidenotetext{text}
% - \sidenotetext[mark]{text}
@@ -263,18 +258,16 @@
\newsavebox\snotez@sidefloat@box
\newcommand*\snotez@sidefloat@format{\raggedright}
-\newenvironment{snotez@sidefloat}[2]
- {%
- \def\@captype{#1}%
- \begin{lrbox}{\snotez@sidefloat@box}%
- \minipage{\marginparwidth}%
- \snotez@sidefloat@format#2%
- }
- {
- \endminipage
- \end{lrbox}%
- \marginpar{\unhbox\snotez@sidefloat@box}%
- }
+\newenvironment{snotez@sidefloat}[2]{%
+ \def\@captype{#1}%
+ \begin{lrbox}{\snotez@sidefloat@box}%
+ \minipage{\marginparwidth}%
+ \snotez@sidefloat@format#2%
+}{%
+ \endminipage
+ \end{lrbox}%
+ \marginpar{\unhbox\snotez@sidefloat@box}%
+}
\newrobustcmd*\snotez@new@sidefloat[2]{%
\newenvironment{side#1}
@@ -311,13 +304,15 @@
{}
}
-\AtEndPreamble{%
- % if option `perpage=true' count notes per page:
- \ifbool{snotez@perpage}
- {\MakeSortedPerPage{sidenote}}
- {\MakeSorted{sidenote}}%
+\AddToHook{begindocument/before}{%
+ \ifbool{snotez@perpage}{%
+ \RequirePackage{zref-perpage}%
+ \zmakeperpage{sidenote}%
+ \@ifpackageloaded{hyperref}{\def\theHsidenote{\theHsection.\thesidenote}}{}
+ }{}%
}
+
\endinput
% --------------------------------------------------------------------------
@@ -338,3 +333,5 @@
- use cnltx-base
2020/01/12 v0.5 - remove dependency on `cnltx-base'
2020/12/14 v0.5a - fix issue #1
+2022/02/10 v0.6 - fix issue #2
+ - add option `perchapter'