texlive[63458] Master/texmf-dist: sidenotesplus (31may22)

commits+karl at tug.org commits+karl at tug.org
Tue May 31 21:45:07 CEST 2022


Revision: 63458
          http://tug.org/svn/texlive?view=revision&revision=63458
Author:   karl
Date:     2022-05-31 21:45:07 +0200 (Tue, 31 May 2022)
Log Message:
-----------
sidenotesplus (31may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/sidenotesplus/README.txt
    trunk/Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf
    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	2022-05-31 19:44:55 UTC (rev 63457)
+++ trunk/Master/texmf-dist/doc/latex/sidenotesplus/README.txt	2022-05-31 19:45:07 UTC (rev 63458)
@@ -2,7 +2,7 @@
 Copyright (c) Anton Vrba, 2022
 -------------------------------------------------------------------
 Version:
-  2022/05/20 1.00  Initial release
+  2022/05/31 1.01  
 Licence:
   This work may be distributed and/or modified under the conditions
   of the LaTeX Project Public License, version 1.3c of the license.
@@ -15,4 +15,7 @@
    Also body text can be extended into the margin for wide figures, 
    tables and equation. Twoside symmetry is preserved. 
    For biblatex users, routines for side references are provided.
--------------------------------------------------------------------
\ No newline at end of file
+-------------------------------------------------------------------
+
+Previous Versions:
+  2022/05/15 1.00  Initial release

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

Modified: trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx	2022-05-31 19:44:55 UTC (rev 63457)
+++ trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx	2022-05-31 19:45:07 UTC (rev 63458)
@@ -36,7 +36,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
 %<package>\ProvidesPackage{sidenotesplus}
 %<*package>
-    [2022/05/20 1.00 rich text marginal notes, tables and figures ]
+    [2022/05/31 v1.01 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)
@@ -94,7 +94,8 @@
 %
 % \maketitle
 %
-% \changes{1.0}{2022/05/15}{Initial Release}
+% \changes{v1.0}{2022/05/15}{Initial Release}
+% \changes{v1.01}{2022/05/31}{Environment text* improved}
 %
 % \begin{abstract}
 %  \noindent A package to manage the margin notes, figures, tables and captions.
@@ -1146,10 +1147,15 @@
 }
 %    \end{macrocode}
 %
+%
+%
 % \begin{environment}{text*}
 % --
 %
+% \changes{v1.01}{2022/5/31}{added newsavebox and minipage}
+%
 %    \begin{macrocode}
+\newsavebox{\b at snp@textbox}
 \NewDocumentEnvironment{text*}{ o }%
 { % begin part
  \begin{adjustwidth}{0pt}{0pt}
@@ -1157,19 +1163,21 @@
  {
   \if at twoside
      \snp at isoddpage{\begin{adjustwidth}{0pt}{-\d at snp@extrawidth}}%
-        {\begin{adjustwidth}{-\d at snp@extrawidth*}{0pt}}
+        {\begin{adjustwidth}{-\d at snp@extrawidth}{0pt}}
   \else
-     \begin{adjustwidth}{0pt}{-\d at snp@extrawidth*}
+     \begin{adjustwidth}{0pt}{-\d at snp@extrawidth}
   \fi
   }
   {
   \if at twoside
-     \snp at isoddpage{\begin{adjustwidth}{0pt}{-\d at snp@extrawidth*#1}}%
-        {\begin{adjustwidth}{-\d at snp@extrawidth*#1}{0pt}}
+     \snp at isoddpage{\begin{adjustwidth}{0pt}{-#1\d at snp@extrawidth}}%
+        {\begin{adjustwidth}{-#1\d at snp@extrawidth}{0pt}}
   \else
-     \begin{adjustwidth}{0pt}{-\d at snp@extrawidth*#1}
+     \begin{adjustwidth}{0pt}{-#1\d at snp@extrawidth}
   \fi
   }
+  \begin{lrbox}{\b at snp@textbox}
+  \begin{minipage}[]{\linewidth+1ex}
 }
 %    \end{macrocode}
 % \end{environment}
@@ -1176,6 +1184,9 @@
 %
 %    \begin{macrocode}
 {  % end part
+\end{minipage}
+\end{lrbox}
+\usebox{\b at snp@textbox}
 \end{adjustwidth}\end{adjustwidth} \snp at placemarginal{}{}
 }
 %    \end{macrocode}
@@ -1269,24 +1280,23 @@
 %
 %%
 %    \begin{macrocode}
-\newlength\marginparsepodd
-\newlength\marginparsepeven
+\newlength\snp at marginparsepodd
+\newlength\snp at marginparsepeven
 
-\setlength{\marginparsepodd}{\marginparsep}
-\setlength{\marginparsepeven}{\marginparsep-\snp at marginsepdiff}
 
+\setlength{\snp at marginparsepodd}{\marginparsep}
+\setlength{\snp at marginparsepeven}{\marginparsep-\snp at marginsepdiff}
+
 \makeatletter
-% First we patch \@addmarginpar
-% The \patchcmd command does a search and replace.
 \patchcmd{\@addmarginpar}                 % In this command
          {\mph at orig@addmarginpar}         % ... replace this...
          {\if at twoside\ifodd\c at page\relax  % ... with this
-              \marginparsep=\marginparsepodd  % Page is odd
+              \marginparsep=\snp at marginparsepodd  % Page is odd
             \else
-              \marginparsep=\marginparsepeven  % Page is even
+              \marginparsep=\snp at marginparsepeven  % Page is even
             \fi
           \else
-            \marginparsep=\marginparsepodd
+            \marginparsep=\snp at marginparsepodd
           \fi
           \mph at orig@addmarginpar}
          {}                                           % success
@@ -1293,7 +1303,6 @@
          {\message{Error! Couldn't hook into command  % failure
              `\string\@addmarginpar'}}
 
-% Now we patch \@mn@@@marginnote
 {%% Group to keep patching commands local
   %
   % Here we use a little trick to repeatedly patch the \@mn@@@marginnote
@@ -1312,12 +1321,12 @@
              {\kern\marginparsep}                  % ... replace this...
              {\ifx\@mn at currpage\relax\else         % ... with this
                 \if at twoside\ifodd\@mn at currpage\relax
-                    \kern\marginparsepodd
+                    \kern\snp at marginparsepodd
                   \else
-                    \kern\marginparsepeven
+                    \kern\snp at marginparsepeven
                   \fi
                 \else
-                  \kern\marginparsepodd
+                  \kern\snp at marginparsepodd
                 \fi
               \fi}
              {\message{Patched!}\patchok}          % success (recurse)
@@ -1330,8 +1339,6 @@
 \makeatother
 \endinput
 %    \end{macrocode}
-
-
 %
 % \iffalse
 %</package>

Modified: trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins	2022-05-31 19:44:55 UTC (rev 63457)
+++ trunk/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins	2022-05-31 19:45:07 UTC (rev 63458)
@@ -21,8 +21,8 @@
 
 \input docstrip.tex
 \keepsilent
+\askforoverwritefalse
 
-
 \preamble
 
  Copyright (C) 2022 by Anton Vrba

Modified: trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty	2022-05-31 19:44:55 UTC (rev 63457)
+++ trunk/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty	2022-05-31 19:45:07 UTC (rev 63458)
@@ -25,7 +25,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \ProvidesPackage{sidenotesplus}
-    [2022/05/20 1.00 rich text marginal notes, tables and figures ]
+    [2022/05/31 v1.01 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
@@ -578,6 +578,7 @@
 { % end part
    \end{adjustwidth}\end{adjustwidth}
 }
+\newsavebox{\b at snp@textbox}
 \NewDocumentEnvironment{text*}{ o }%
 { % begin part
  \begin{adjustwidth}{0pt}{0pt}
@@ -585,21 +586,26 @@
  {
   \if at twoside
      \snp at isoddpage{\begin{adjustwidth}{0pt}{-\d at snp@extrawidth}}%
-        {\begin{adjustwidth}{-\d at snp@extrawidth*}{0pt}}
+        {\begin{adjustwidth}{-\d at snp@extrawidth}{0pt}}
   \else
-     \begin{adjustwidth}{0pt}{-\d at snp@extrawidth*}
+     \begin{adjustwidth}{0pt}{-\d at snp@extrawidth}
   \fi
   }
   {
   \if at twoside
-     \snp at isoddpage{\begin{adjustwidth}{0pt}{-\d at snp@extrawidth*#1}}%
-        {\begin{adjustwidth}{-\d at snp@extrawidth*#1}{0pt}}
+     \snp at isoddpage{\begin{adjustwidth}{0pt}{-#1\d at snp@extrawidth}}%
+        {\begin{adjustwidth}{-#1\d at snp@extrawidth}{0pt}}
   \else
-     \begin{adjustwidth}{0pt}{-\d at snp@extrawidth*#1}
+     \begin{adjustwidth}{0pt}{-#1\d at snp@extrawidth}
   \fi
   }
+  \begin{lrbox}{\b at snp@textbox}
+  \begin{minipage}[]{\linewidth+1ex}
 }
 {  % end part
+\end{minipage}
+\end{lrbox}
+\usebox{\b at snp@textbox}
 \end{adjustwidth}\end{adjustwidth} \snp at placemarginal{}{}
 }
 \RenewDocumentEnvironment{figure*}{ O{htbp} }
@@ -662,22 +668,22 @@
 }
 \ExplSyntaxOff
 %%
-\newlength\marginparsepodd
-\newlength\marginparsepeven
+\newlength\snp at marginparsepodd
+\newlength\snp at marginparsepeven
 
-\setlength{\marginparsepodd}{\marginparsep}
-\setlength{\marginparsepeven}{\marginparsep-\snp at marginsepdiff}
+\setlength{\snp at marginparsepodd}{\marginparsep}
+\setlength{\snp at marginparsepeven}{\marginparsep-\snp at marginsepdiff}
 
 \makeatletter
 \patchcmd{\@addmarginpar}                 % In this command
          {\mph at orig@addmarginpar}         % ... replace this...
          {\if at twoside\ifodd\c at page\relax  % ... with this
-              \marginparsep=\marginparsepodd  % Page is odd
+              \marginparsep=\snp at marginparsepodd  % Page is odd
             \else
-              \marginparsep=\marginparsepeven  % Page is even
+              \marginparsep=\snp at marginparsepeven  % Page is even
             \fi
           \else
-            \marginparsep=\marginparsepodd
+            \marginparsep=\snp at marginparsepodd
           \fi
           \mph at orig@addmarginpar}
          {}                                           % success
@@ -702,12 +708,12 @@
              {\kern\marginparsep}                  % ... replace this...
              {\ifx\@mn at currpage\relax\else         % ... with this
                 \if at twoside\ifodd\@mn at currpage\relax
-                    \kern\marginparsepodd
+                    \kern\snp at marginparsepodd
                   \else
-                    \kern\marginparsepeven
+                    \kern\snp at marginparsepeven
                   \fi
                 \else
-                  \kern\marginparsepodd
+                  \kern\snp at marginparsepodd
                 \fi
               \fi}
              {\message{Patched!}\patchok}          % success (recurse)



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