summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-07-10 19:59:27 +0000
committerKarl Berry <karl@freefriends.org>2022-07-10 19:59:27 +0000
commitef2d4cbbeae7ccacb977dc42a4df7f44f61ee1a8 (patch)
treedf9cce6c7308c38add7d457a3dc1c24660085099 /Master/texmf-dist/tex
parent1110e94ef8664eae9c9ad31b63a7d0bb1dc964df (diff)
sidenotesplus (10jul22)
git-svn-id: svn://tug.org/texlive/trunk@63867 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty41
1 files changed, 24 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty b/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty
index c2573aab68c..20627123db2 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/31 v1.01 rich text marginal notes, tables and figures ]
+ [2022/07/09 1.02 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
@@ -55,7 +55,7 @@
\snp@size\snp@shape\snp@font\leavevmode%
\lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
- \doublehyphendemerits=100000%
+ \doublehyphendemerits=300%
\finalhyphendemerits=\doublehyphendemerits
}
\NewDocumentCommand \snp@sideformat {} {}
@@ -72,6 +72,7 @@
\bool_new:N \l@snp@alerton
\bool_new:N \l@snp@alertmarkon
\bool_new:N \l@snp@ragged
+\bool_new:N \l@snp@Ragged
\bool_new:N \l@snp@symmetric
\bool_new:N \l@snp@page
@@ -79,6 +80,7 @@
\bool_set_false:N \l@snp@alerton
\bool_set_false:N \l@snp@alertmarkon
\bool_set_false:N \l@snp@ragged
+\bool_set_false:N \l@snp@Ragged
\bool_set_true:N \l@snp@symmetric
\newlength{\snp@marginsepdiff}
@@ -112,9 +114,19 @@
ragged .code:n = { \RenewDocumentCommand \snp@leftmarginstyle {}{\raggedleft}
\RenewDocumentCommand \snp@rightmarginstyle {}{\raggedright}
\bool_set_true:N \l@snp@ragged },
+ Ragged .code:n = { \RenewDocumentCommand \snp@leftmarginstyle {}{\RaggedLeft}
+ \RenewDocumentCommand \snp@rightmarginstyle {}{\RaggedRight}
+ \bool_set_true:N \l@snp@Ragged
+ \bool_set_true:N \l@snp@ragged },
alerton .code:n = {\bool_set_true:N \l@snp@alerton},
}
\ProcessKeysOptions { sidenoteplus }
+\bool_if:NTF \l@snp@Ragged
+ {
+ \@ifpackageloaded{ragged2e}
+ {\relax}{\RequirePackage{ragged2e}}
+ }
+ {\relax}
\bool_if:NTF \l@snp@ragged
{\setlength{\snp@marginsepdiff}{0pt} \bool_set_false:N \l@snp@symmetric}
{\relax}
@@ -280,13 +292,13 @@
{\relax}
\bool_set_false:N \l@snp@alertmarkon
}
-\NewDocumentCommand \sidenotemark {s d() d!! m }
+\NewDocumentCommand \sidenotemark {s d() d!! }
{
\IfBooleanTF{#1}
{ % starred
\relax}
{% unstarred
- \IfNoValueOrEmptyT{#3}
+ \IfNoValueOrEmptyTF{#3}
{\snp@sidenotemark (#2)}
{\snp@sidenotemark !#3!( #2)}
}
@@ -623,19 +635,14 @@
}
\RenewDocumentEnvironment{table*}{O{htbp} }
{
- \begin{table}[#1]
- \begin{@snp@autoadjustwidth}{}{\d@snp@extrawidth}
- \if@twoside
- \snp@isoddpage{\raggedright}{\raggedleft}
- \snp@isoddpage
- {\captionsetup{margin={0pt,0pt}} }
- {\captionsetup{margin={-\d@snp@extrawidth,\d@snp@extrawidth}} }
- \else
- \raggedright \captionsetup{margin={0pt,0pt}}
- \fi
-}
-{ % end part
- \end{@snp@autoadjustwidth}
+ \begin{table}[#1]
+ \begin{@snp@autoadjustwidth}{}{\d@snp@extrawidth}
+ \begin{minipage}[c]{\linewidth}
+ \centering
+ \captionsetup{ margin={\d@snp@extrawidth/2,\d@snp@extrawidth/2}}
+}{ % end part
+ \end{minipage}
+ \end{@snp@autoadjustwidth}
\end{table}
}
\NewDocumentCommand \snp@before {} {}