texlive[74143] Master/texmf-dist: sidenotesplus (19feb25)

commits+karl at tug.org commits+karl at tug.org
Wed Feb 19 21:40:09 CET 2025


Revision: 74143
          https://tug.org/svn/texlive?view=revision&revision=74143
Author:   karl
Date:     2025-02-19 21:40:09 +0100 (Wed, 19 Feb 2025)
Log Message:
-----------
sidenotesplus (19feb25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/sidenotesplus/README.txt
    trunk/Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf
    trunk/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf
    trunk/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.tex
    trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx
    trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins
    trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty

Modified: trunk/Master/texmf-dist/doc/latex/sidenotesplus/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sidenotesplus/README.txt	2025-02-19 20:39:57 UTC (rev 74142)
+++ trunk/Master/texmf-dist/doc/latex/sidenotesplus/README.txt	2025-02-19 20:40:09 UTC (rev 74143)
@@ -1,8 +1,8 @@
 LaTeX package sidenotesplus
-Copyright (c) Anton Vrba, 2022
+Copyright (c) Anton Vrba, 2022-2025
 -------------------------------------------------------------------
 Version:
-  2023/12/19 1.04  fixed bug in \sidecite (Trailing comma replaced by trailing period)
+  2025/02/18 1.05 added package option per=page, section, chapter or none
 Licence:
   This work may be distributed and/or modified under the conditions
   of the LaTeX Project Public License, version 1.3c of the license.
@@ -18,6 +18,7 @@
 -------------------------------------------------------------------
 
 Previous Versions: 
+  2023/12/19 1.04  fixed bug in \sidecite (Trailing comma replaced by trailing period)
   2023/10/05 1.03  added \sidecitebefore and \sidecitemark
   2022/07/09 1.02  Added Ragged option
   2022/05/31 1.01  Minor bug fix

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

Modified: trunk/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.tex	2025-02-19 20:39:57 UTC (rev 74142)
+++ trunk/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.tex	2025-02-19 20:40:09 UTC (rev 74143)
@@ -14,7 +14,7 @@
      includeall}   {geometry}%
 \usepackage  {geometry}
 \RequirePackage[utf8]{inputenc}\usepackage[T1]{fontenc}
-\usepackage[alerton]{sidenotesplus}
+\usepackage[alerton, per=none]{sidenotesplus}
 
 \RequirePackage[svgnames,dvipsnames]{xcolor}
 \usepackage{lipsum}
@@ -100,7 +100,7 @@
   backend=bibtex,bibencoding=ascii,%
   language=auto,%
  style=verbose-ibid,
-  bibstyle=authoryear,dashed=false, 
+  bibstyle=authoryear,dashed=false,
   sorting = anyvt,
   maxbibnames=10, % default: 3, et al.
   natbib=true, % natbib compatibility mode (\citep and \citet still work)
@@ -205,8 +205,7 @@
 \sidenote!Blue!{\textsf{\upshape\textbackslash sidenote!Blue!} Test colour}%
 \sidenote|-12mm|{\textsf{\upshape\textbackslash sidenote|-12mm|} but cannot float past \textsuperscript d above}
  and the commas are inserted automatically between the text markers. But, if a line break
- is between the two \verb"\sidenote " commands, then that requires a \% sign before the line
- break.
+ is between the two \verb"\sidenote " commands, then that requires a \% sign before the line  break.
 
 In many environments the floating option fails thus the fixed option is used. Example, a side
 note used in an equation:

Modified: trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx	2025-02-19 20:39:57 UTC (rev 74142)
+++ trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx	2025-02-19 20:40:09 UTC (rev 74143)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2022/23 by Anton Vrba
+% Copyright (C) 2022-2025 by Anton Vrba
 %
 % Home Page: https://github.com/anton-vrba/sidenotesplus
 %    Issues: https://github.com/anton-vrba/sidenotesplus/issues
@@ -36,7 +36,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
 %<package>\ProvidesPackage{sidenotesplus}
 %<*package>
-    [2023/12/19 1.04 rich text marginal notes, tables and figures ]
+    [2025/2/18 1.05 rich text marginal notes, tables and figures ]
 %</package>
 %<package>\RequirePackage{marginnote} % provides an offset option for the marginals instead of a float
 %<package>\RequirePackage{caption} % handles the captions (in the margin)
@@ -99,6 +99,7 @@
 % \changes{1.02}{2022/07/09}{added Ragged option}
 % \changes{1.03}{2023/10/05}{added commands sidecitebefore, sideciteafter and sidcitemark}
 % \changes{1.04}{2023/12/19}{fixed bug in the sidecite commands (Trailing comma replaced by trailing period}
+% \changes{1.05}{2025/2/18}{resetting sidenote counter per page, section, chapter or none}
 %
 % \begin{abstract}
 %  \noindent A package to manage the margin notes, figures, tables and captions.
@@ -131,6 +132,7 @@
 %  |classic| & switches to a classic look\\
 %  |sepdiff=| & |1em|, or a valid length within reason \\
 %  |alerton| & switches on the rendering of the margin alerts \\
+%  |per=| & |page, section, chapter, none| defaults to counter per page  \\
 % \end{tabularx}
 %
 % ~
@@ -403,6 +405,7 @@
 \bool_new:N \l at snp@Ragged
 \bool_new:N \l at snp@symmetric
 \bool_new:N \l at snp@page
+\bool_new:N \l at snp@counterset
 
 \bool_set_false:N \l at snp@margincaption
 \bool_set_false:N \l at snp@alerton
@@ -410,6 +413,7 @@
 \bool_set_false:N \l at snp@ragged
 \bool_set_false:N \l at snp@Ragged
 \bool_set_true:N \l at snp@symmetric
+\bool_set_false:N \l at snp@counterset
 
 
 %
@@ -442,6 +446,21 @@
          {up}{\RenewDocumentCommand \snp at shape{}{\upshape}}%
          {it}{\RenewDocumentCommand \snp at shape{}{\itshape}}%
         {Other}{} },
+ per .code:n = \str_case:nn {#1}%
+      {  {page}{ \newcounter{sidenote}[page] % make a counter%
+                 \newcounter{sidealert}[page]
+                 \bool_set_true:N \l at snp@counterset }  % init the counter%
+         {section}{ \newcounter{sidenote}[section] %
+                    \newcounter{sidealert}[section]
+                    \bool_set_true:N \l at snp@counterset }%
+         {chapter}{ \newcounter{sidenote}[chapter] %
+                    \newcounter{sidealert}[chapter]
+                    \bool_set_true:N \l at snp@counterset } %
+         {none}{ \newcounter{sidenote}%
+                    \newcounter{sidealert}
+                    \bool_set_true:N \l at snp@counterset } %
+         {Other}{}  %
+      },
  sepdiff .code:n = \setlength{\snp at marginsepdiff}{#1},
  classic .code:n = \bool_set_false:N \l at snp@symmetric,
  ragged .code:n = { \RenewDocumentCommand \snp at leftmarginstyle {}{\raggedleft}
@@ -464,9 +483,14 @@
      {\setlength{\snp at marginsepdiff}{0pt} \bool_set_false:N \l at snp@symmetric}
      {\relax}
 \bool_if:NTF \l at snp@symmetric {\setlength{\snp at marginsepdiff}{0pt}}{\relax}
- \newcounter{sidenote}[page] % make a counter
-\setcounter{sidenote}{0} % init the counter
- \newcounter{sidealert}[page] % make a counter
+
+\bool_if:NTF \l at snp@counterset
+    {\relax}
+    {\newcounter{sidenote}[page] % make a counter%
+     \newcounter{sidealert}[page]
+     \bool_set_true:N \l at snp@counterset }
+
+\setcounter{sidenote}{0}  % init the counter%
 \setcounter{sidealert}{0} % init the counter
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins	2025-02-19 20:39:57 UTC (rev 74142)
+++ trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins	2025-02-19 20:40:09 UTC (rev 74143)
@@ -4,11 +4,11 @@
 %%    Issues: https://github.com/anton-vrba/sidenotesplus/issues
 %% --------------------------------------------------------------------------
 %% 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
+%% and version 1.3c or later is part of all distributions of LaTeX
 %% version 2005/12/01 or later.
 %%
 %% This work has the LPPL maintenance status `maintained'.
@@ -25,11 +25,11 @@
 
 \preamble
 
- Copyright (C) 2022 by Anton Vrba
+ Copyright (C) 2022-2025 by Anton Vrba
  --------------------------------
 
  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

Modified: trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty	2025-02-19 20:39:57 UTC (rev 74142)
+++ trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty	2025-02-19 20:40:09 UTC (rev 74143)
@@ -6,11 +6,11 @@
 %%
 %% sidenotesplus.dtx  (with options: `package')
 %% 
-%%  Copyright (C) 2022 by Anton Vrba
+%%  Copyright (C) 2022-2025 by Anton Vrba
 %%  --------------------------------
 %% 
 %%  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
@@ -25,7 +25,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \ProvidesPackage{sidenotesplus}
-    [2023/12/19 1.04 rich text marginal notes, tables and figures ]
+    [2025/2/18 1.05 rich text marginal notes, tables and figures ]
 \RequirePackage{marginnote} % provides an offset option for the marginals instead of a float
 \RequirePackage{caption} % handles the captions (in the margin)
 \RequirePackage{xparse} % new LaTeX3 syntax to define macros and environments
@@ -75,6 +75,7 @@
 \bool_new:N \l at snp@Ragged
 \bool_new:N \l at snp@symmetric
 \bool_new:N \l at snp@page
+\bool_new:N \l at snp@counterset
 
 \bool_set_false:N \l at snp@margincaption
 \bool_set_false:N \l at snp@alerton
@@ -82,6 +83,7 @@
 \bool_set_false:N \l at snp@ragged
 \bool_set_false:N \l at snp@Ragged
 \bool_set_true:N \l at snp@symmetric
+\bool_set_false:N \l at snp@counterset
 
 \newlength{\snp at marginsepdiff}
 \setlength{\snp at marginsepdiff}{1ex}
@@ -109,6 +111,21 @@
          {up}{\RenewDocumentCommand \snp at shape{}{\upshape}}%
          {it}{\RenewDocumentCommand \snp at shape{}{\itshape}}%
         {Other}{} },
+ per .code:n = \str_case:nn {#1}%
+      {  {page}{ \newcounter{sidenote}[page] % make a counter%
+                 \newcounter{sidealert}[page]
+                 \bool_set_true:N \l at snp@counterset }  % init the counter%
+         {section}{ \newcounter{sidenote}[section] %
+                    \newcounter{sidealert}[section]
+                    \bool_set_true:N \l at snp@counterset }%
+         {chapter}{ \newcounter{sidenote}[chapter] %
+                    \newcounter{sidealert}[chapter]
+                    \bool_set_true:N \l at snp@counterset } %
+         {none}{ \newcounter{sidenote}%
+                    \newcounter{sidealert}
+                    \bool_set_true:N \l at snp@counterset } %
+         {Other}{}  %
+      },
  sepdiff .code:n = \setlength{\snp at marginsepdiff}{#1},
  classic .code:n = \bool_set_false:N \l at snp@symmetric,
  ragged .code:n = { \RenewDocumentCommand \snp at leftmarginstyle {}{\raggedleft}
@@ -131,9 +148,14 @@
      {\setlength{\snp at marginsepdiff}{0pt} \bool_set_false:N \l at snp@symmetric}
      {\relax}
 \bool_if:NTF \l at snp@symmetric {\setlength{\snp at marginsepdiff}{0pt}}{\relax}
- \newcounter{sidenote}[page] % make a counter
-\setcounter{sidenote}{0} % init the counter
- \newcounter{sidealert}[page] % make a counter
+
+\bool_if:NTF \l at snp@counterset
+    {\relax}
+    {\newcounter{sidenote}[page] % make a counter%
+     \newcounter{sidealert}[page]
+     \bool_set_true:N \l at snp@counterset }
+
+\setcounter{sidenote}{0}  % init the counter%
 \setcounter{sidealert}{0} % init the counter
 \NewDocumentCommand \snp at putmarkintext { m }
 {



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