summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty38
1 files changed, 22 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty b/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty
index 7785fa98173..c2573aab68c 100644
--- a/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty
+++ b/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty
@@ -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@snp@textbox}
\NewDocumentEnvironment{text*}{ o }%
{ % begin part
\begin{adjustwidth}{0pt}{0pt}
@@ -585,21 +586,26 @@
{
\if@twoside
\snp@isoddpage{\begin{adjustwidth}{0pt}{-\d@snp@extrawidth}}%
- {\begin{adjustwidth}{-\d@snp@extrawidth*}{0pt}}
+ {\begin{adjustwidth}{-\d@snp@extrawidth}{0pt}}
\else
- \begin{adjustwidth}{0pt}{-\d@snp@extrawidth*}
+ \begin{adjustwidth}{0pt}{-\d@snp@extrawidth}
\fi
}
{
\if@twoside
- \snp@isoddpage{\begin{adjustwidth}{0pt}{-\d@snp@extrawidth*#1}}%
- {\begin{adjustwidth}{-\d@snp@extrawidth*#1}{0pt}}
+ \snp@isoddpage{\begin{adjustwidth}{0pt}{-#1\d@snp@extrawidth}}%
+ {\begin{adjustwidth}{-#1\d@snp@extrawidth}{0pt}}
\else
- \begin{adjustwidth}{0pt}{-\d@snp@extrawidth*#1}
+ \begin{adjustwidth}{0pt}{-#1\d@snp@extrawidth}
\fi
}
+ \begin{lrbox}{\b@snp@textbox}
+ \begin{minipage}[]{\linewidth+1ex}
}
{ % end part
+\end{minipage}
+\end{lrbox}
+\usebox{\b@snp@textbox}
\end{adjustwidth}\end{adjustwidth} \snp@placemarginal{}{}
}
\RenewDocumentEnvironment{figure*}{ O{htbp} }
@@ -662,22 +668,22 @@
}
\ExplSyntaxOff
%%
-\newlength\marginparsepodd
-\newlength\marginparsepeven
+\newlength\snp@marginparsepodd
+\newlength\snp@marginparsepeven
-\setlength{\marginparsepodd}{\marginparsep}
-\setlength{\marginparsepeven}{\marginparsep-\snp@marginsepdiff}
+\setlength{\snp@marginparsepodd}{\marginparsep}
+\setlength{\snp@marginparsepeven}{\marginparsep-\snp@marginsepdiff}
\makeatletter
\patchcmd{\@addmarginpar} % In this command
{\mph@orig@addmarginpar} % ... replace this...
{\if@twoside\ifodd\c@page\relax % ... with this
- \marginparsep=\marginparsepodd % Page is odd
+ \marginparsep=\snp@marginparsepodd % Page is odd
\else
- \marginparsep=\marginparsepeven % Page is even
+ \marginparsep=\snp@marginparsepeven % Page is even
\fi
\else
- \marginparsep=\marginparsepodd
+ \marginparsep=\snp@marginparsepodd
\fi
\mph@orig@addmarginpar}
{} % success
@@ -702,12 +708,12 @@
{\kern\marginparsep} % ... replace this...
{\ifx\@mn@currpage\relax\else % ... with this
\if@twoside\ifodd\@mn@currpage\relax
- \kern\marginparsepodd
+ \kern\snp@marginparsepodd
\else
- \kern\marginparsepeven
+ \kern\snp@marginparsepeven
\fi
\else
- \kern\marginparsepodd
+ \kern\snp@marginparsepodd
\fi
\fi}
{\message{Patched!}\patchok} % success (recurse)