diff options
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx | 51 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins | 2 |
2 files changed, 30 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx b/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx index bc84aa424f2..b6c51d20d25 100644 --- a/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx +++ b/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx @@ -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@snp@textbox} \NewDocumentEnvironment{text*}{ o }% { % begin part \begin{adjustwidth}{0pt}{0pt} @@ -1157,25 +1163,30 @@ { \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{macrocode} % \end{environment} % % \begin{macrocode} { % end part +\end{minipage} +\end{lrbox} +\usebox{\b@snp@textbox} \end{adjustwidth}\end{adjustwidth} \snp@placemarginal{}{} } % \end{macrocode} @@ -1269,31 +1280,29 @@ % %% % \begin{macrocode} -\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 -% First we patch \@addmarginpar -% The \patchcmd command does a search and replace. \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 {\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@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) @@ -1330,8 +1339,6 @@ \makeatother \endinput % \end{macrocode} - - % % \iffalse %</package> diff --git a/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins b/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins index 33697cfce26..dbcf54724f6 100644 --- a/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins +++ b/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.ins @@ -21,7 +21,7 @@ \input docstrip.tex \keepsilent - +\askforoverwritefalse \preamble |