summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/sidenotesplus
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-10 03:00:39 +0000
committerNorbert Preining <norbert@preining.info>2022-07-10 03:00:39 +0000
commit20ce5b015c76436ed3c8022b778a877bcf4852dd (patch)
tree1f3e497cdfb61208cb0bbc703320a6df0c2e9d63 /macros/latex/contrib/sidenotesplus
parent7891283a2f2fb8a8a884bb212c36da8082764a9b (diff)
CTAN sync 202207100300
Diffstat (limited to 'macros/latex/contrib/sidenotesplus')
-rw-r--r--macros/latex/contrib/sidenotesplus/README.txt5
-rw-r--r--macros/latex/contrib/sidenotesplus/sidenotesplus.dtx55
-rw-r--r--macros/latex/contrib/sidenotesplus/sidenotesplus.pdfbin213799 -> 233491 bytes
-rw-r--r--macros/latex/contrib/sidenotesplus/tests-sidenoteplus.pdfbin218699 -> 218822 bytes
4 files changed, 38 insertions, 22 deletions
diff --git a/macros/latex/contrib/sidenotesplus/README.txt b/macros/latex/contrib/sidenotesplus/README.txt
index e602b7cd34..c2a416610f 100644
--- a/macros/latex/contrib/sidenotesplus/README.txt
+++ b/macros/latex/contrib/sidenotesplus/README.txt
@@ -2,7 +2,7 @@ LaTeX package sidenotesplus
Copyright (c) Anton Vrba, 2022
-------------------------------------------------------------------
Version:
- 2022/05/31 1.01
+ 2022/07/09 1.02 added Ragged option
Licence:
This work may be distributed and/or modified under the conditions
of the LaTeX Project Public License, version 1.3c of the license.
@@ -17,5 +17,6 @@ Abstract:
For biblatex users, routines for side references are provided.
-------------------------------------------------------------------
-Previous Versions:
+Previous Versions:
+ 2022/05/31 1.01 Minor bug fix
2022/05/15 1.00 Initial release
diff --git a/macros/latex/contrib/sidenotesplus/sidenotesplus.dtx b/macros/latex/contrib/sidenotesplus/sidenotesplus.dtx
index b6c51d20d2..7e76cd609d 100644
--- a/macros/latex/contrib/sidenotesplus/sidenotesplus.dtx
+++ b/macros/latex/contrib/sidenotesplus/sidenotesplus.dtx
@@ -36,7 +36,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<package>\ProvidesPackage{sidenotesplus}
%<*package>
- [2022/05/31 v1.01 rich text marginal notes, tables and figures ]
+ [2022/07/09 1.02 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,8 +94,9 @@
%
% \maketitle
%
-% \changes{v1.0}{2022/05/15}{Initial Release}
-% \changes{v1.01}{2022/05/31}{Environment text* improved}
+% \changes{1.0}{2022/05/15}{Initial Release}
+% \changes{1.01}{2022/05/31}{Environment text* improved}
+% \changes{1.02}{2022/07/09}{added Ragged option}
%
% \begin{abstract}
% \noindent A package to manage the margin notes, figures, tables and captions.
@@ -124,6 +125,7 @@
% |size=| & |footnote, normal, small, script| \\
% |shape=| & | up, it, sl|\\
% |ragged| & switches to ragged outer margins\\
+% |Ragged| & switches to ragged outer margins but uses ragged2e package\\
% |classic| & switches to a classic look\\
% |sepdiff=| & |1em|, or a valid length within reason \\
% |alerton| & switches on the rendering of the margin alerts \\
@@ -132,9 +134,13 @@
% ~
%
% The normal page style is that margin notes are left-right justified with the
-% last line ragged to the outer edge. The option |ragged| changes this
+% last line ragged to the outer edge. The option |ragged| or |Ragged| changes this
% style to ragged-outer, that is the left page's marginal notes are |\raggedleft|
% and the right page's are |\raggedright|.
+% If you opt to use |Ragged| the package |ragged2e| is loaded and |RaggedLeft/Right|
+% is used instead of |raggedleft/right|. Load package |ragged2e| with required
+% options before |sidenotesplus| is loaded, otherwise |sidenotesplus| loads
+% |ragged2e| without any options.
%
% The marginal note's reference number or mark is placed in the margin separator,
% that is on the left page the mark is on the right hand side of the note.
@@ -325,6 +331,8 @@
% \item[ifoddpage] provides the command |\ifoddpage|
% \item[etoolbox] provides the command |\patchcmd|
% \item[calc] provides calculation such as adding lengths
+% \item[ragged2e] if |Ragged| option is used, and provides hyphenation
+% to prevent very short lines
%
% \end{description}%
@@ -360,7 +368,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 {} {}
@@ -385,6 +393,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
@@ -392,6 +401,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
@@ -430,9 +440,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}
@@ -683,13 +703,13 @@
% --
%
% \begin{macrocode}
-\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)}
}
@@ -1213,19 +1233,14 @@
% \begin{macrocode}
\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}
}
% \end{macrocode}
diff --git a/macros/latex/contrib/sidenotesplus/sidenotesplus.pdf b/macros/latex/contrib/sidenotesplus/sidenotesplus.pdf
index 5237810fea..46bd149c76 100644
--- a/macros/latex/contrib/sidenotesplus/sidenotesplus.pdf
+++ b/macros/latex/contrib/sidenotesplus/sidenotesplus.pdf
Binary files differ
diff --git a/macros/latex/contrib/sidenotesplus/tests-sidenoteplus.pdf b/macros/latex/contrib/sidenotesplus/tests-sidenoteplus.pdf
index e9cf85133f..dcf7635717 100644
--- a/macros/latex/contrib/sidenotesplus/tests-sidenoteplus.pdf
+++ b/macros/latex/contrib/sidenotesplus/tests-sidenoteplus.pdf
Binary files differ