diff options
author | Karl Berry <karl@freefriends.org> | 2023-10-05 19:40:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-10-05 19:40:34 +0000 |
commit | 9872f149048296ab207386f967697abb5b30450c (patch) | |
tree | eaaab8efa3113ee6ff79f38490b1462ec1142d38 /Master | |
parent | 9b3db1287c78496c24b88eb363d495a88bfa02c3 (diff) |
sidenotesplus (5oct23)
git-svn-id: svn://tug.org/texlive/trunk@68456 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/sidenotesplus/README.txt | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf | bin | 233491 -> 235043 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.bib | 45 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf | bin | 218822 -> 218822 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx | 72 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty | 32 |
6 files changed, 147 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/latex/sidenotesplus/README.txt b/Master/texmf-dist/doc/latex/sidenotesplus/README.txt index c2a416610f0..e8d6a21a011 100644 --- a/Master/texmf-dist/doc/latex/sidenotesplus/README.txt +++ b/Master/texmf-dist/doc/latex/sidenotesplus/README.txt @@ -2,7 +2,7 @@ LaTeX package sidenotesplus Copyright (c) Anton Vrba, 2022 ------------------------------------------------------------------- Version: - 2022/07/09 1.02 added Ragged option + 2023/10/05 1.03 added \sidecitebefore and \sidecitemark Licence: This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, version 1.3c of the license. @@ -18,5 +18,6 @@ Abstract: ------------------------------------------------------------------- Previous Versions: + 2202/07/09 1.02 Added Ragged option 2022/05/31 1.01 Minor bug fix 2022/05/15 1.00 Initial release diff --git a/Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf b/Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf Binary files differindex 46bd149c760..cf8d8c792c9 100644 --- a/Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf +++ b/Master/texmf-dist/doc/latex/sidenotesplus/sidenotesplus.pdf diff --git a/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.bib b/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.bib new file mode 100644 index 00000000000..6dc192ea7bf --- /dev/null +++ b/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.bib @@ -0,0 +1,45 @@ +%% LaTeX2e file `tests-sidenoteplus.bib' +%% generated by the `filecontents' environment +%% from source `tests-sidenoteplus' on 2022/07/09. +%% +@book{Tufte1990, + author = {Edward R. Tufte}, + title = {Envisioning Information}, + publisher = {Graphics Press}, + year = {1990}, + isbn = {0-9613921-1-8} +} + +@book{Tufte2006, + author = {Edward R. Tufte}, + title = {Beautiful Evidence}, + year = {2006}, + publisher = {Graphics Press, {LLC}}, + isbn = {0-9613921-7-7} +} + +@BOOK{bringhurst:2002, + title = {{T}he {E}lements of {T}ypographic {S}tyle}, + publisher = {Hartley \& Marks Publishers}, + year = {2013}, + author = {Robert Bringhurst}, + series = {Version 4.0: 20th Anniversary Edition}, + address = {Point Roberts, WA, USA} + } + +@Article{Einstein_1905e, + author = {A. Einstein}, + journal = {Annalen der Physik}, + title = {Ist die Trägheit eines Körpers von seinem Energieinhalt abhängig?}, + year = {1905}, + number = {13}, + pages = {639--641}, + volume = {323}, + doi = {10.1002/andp.19053231314}, + file = {:Articles/Einstein_1905e - Does the Inertia of a Body Depend upon its + Energy-Content_.pdf:PDF;:Articles/Einstein_1905e - Ist Die Trägheit Eines Körpers Von Seinem + Energieinhalt Abhängig_.pdf:PDF}, + groups = {Relativity}, + publisher = {Wiley}, +} + diff --git a/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf b/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf Binary files differindex dcf7635717a..9d2049e2578 100644 --- a/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf +++ b/Master/texmf-dist/doc/latex/sidenotesplus/tests-sidenoteplus.pdf diff --git a/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx b/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx index 7e76cd609db..4d559deb3fe 100644 --- a/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx +++ b/Master/texmf-dist/source/latex/sidenotesplus/sidenotesplus.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2022 by Anton Vrba +% Copyright (C) 2022/23 by Anton Vrba % % Home Page: https://github.com/anton-vrba/sidenotesplus % Issues: https://github.com/anton-vrba/sidenotesplus/issues @@ -36,7 +36,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01] %<package>\ProvidesPackage{sidenotesplus} %<*package> - [2022/07/09 1.02 rich text marginal notes, tables and figures ] + [2023/10/05 1.03 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) @@ -97,6 +97,7 @@ % \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} +% \changes{1.03}{2023/10/05}{added commands sidecitebefore, sideciteafter and sidcitemark} % % \begin{abstract} % \noindent A package to manage the margin notes, figures, tables and captions. @@ -146,7 +147,7 @@ % that is on the left page the mark is on the right hand side of the note. % The option |classic| always places the mark to the left of the marginal note. % This requires that the margin separator on the left page is slightly reduced if not -% enough space is availabe to the page outer edge. +% enough space is available to the page outer edge. % % \subsection{Modified \LaTeX\xspace commands} % @@ -288,11 +289,16 @@ % % % \DescribeMacro{\sidecite} +% \DescribeMacro{\sidecitebefore} +% % \DescribeMacro{\sidecitemark} +% \DescribeMacro{\sideciteafter} % \DescribeMacro{\sidecitet} % \DescribeMacro{\sidecitet*} % The |\sidecite|, |\sidecitet| and |\sidecitet*| provide citing % references in the margin and uses the package |biblatex| which has to be setup % outside the |sitenotesplus| package. +% Use |sidecitebefore| or |sideciteafter| to place the marginalia reference +% before or after the |sidenotemark| % Example settings in the document preamble: % % ~~~~|\usepackage[english]{babel}| @@ -1291,6 +1297,66 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\sidecitebefore} +% -- +% +% \begin{macrocode} +\NewDocumentCommand \sidecitebefore {s d|| d<> d() d!! o o m } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +{ \IfNoValueOrEmptyTF{#6} + {\RenewDocumentCommand \snp@before {} {}} + {\RenewDocumentCommand \snp@before {} {#6}} + \IfNoValueOrEmptyTF{#7} + {\RenewDocumentCommand \snp@after {} {}} + {\RenewDocumentCommand \snp@after {} {#7}} + \sidenotetextbefore|#2|<#3>(#4)!#5!{\kern-2.3pt\upshape\fullcite[\snp@before][\snp@after]{#8}} +} +% \end{macrocode} +% +% \begin{macro}{\sideciteafter} +% -- +% +% \begin{macrocode} +\NewDocumentCommand \sideciteafter {s d|| d<> d() d!! o o m } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +{ \IfNoValueOrEmptyTF{#6} + {\RenewDocumentCommand \snp@before {} {}} + {\RenewDocumentCommand \snp@before {} {#6}} + \IfNoValueOrEmptyTF{#7} + {\RenewDocumentCommand \snp@after {} {}} + {\RenewDocumentCommand \snp@after {} {#7}} + \sidenotetext|#2|<#3>(#4)!#5!{\kern-2.3pt\upshape\fullcite[\snp@before][\snp@after]{#8}} +} +% \end{macrocode} +% +% +% \begin{macro}{\sidecitemark} +% -- +% +% \begin{macrocode} +\NewDocumentCommand \sidecitemark {s d() d!! } +{ + \IfBooleanTF{#1} + { % starred + \relax} + {% unstarred + \IfNoValueOrEmptyTF{#3} + {\snp@sidenotemark (#2)} + {\snp@sidenotemark !#3!( #2)} + } + \xspace +} +% \end{macrocode} +% \end{macro} +% +% +% \ExplSyntaxOff % %% diff --git a/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty b/Master/texmf-dist/tex/latex/sidenotesplus/sidenotesplus.sty index 20627123db2..ba8cd69342a 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/07/09 1.02 rich text marginal notes, tables and figures ] + [2023/10/05 1.03 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 @@ -673,6 +673,36 @@ {\kern-2.3pt\upshape\fullcite[\snp@before][\snp@after]{#8}} } } +\NewDocumentCommand \sidecitebefore {s d|| d<> d() d!! o o m } +{ \IfNoValueOrEmptyTF{#6} + {\RenewDocumentCommand \snp@before {} {}} + {\RenewDocumentCommand \snp@before {} {#6}} + \IfNoValueOrEmptyTF{#7} + {\RenewDocumentCommand \snp@after {} {}} + {\RenewDocumentCommand \snp@after {} {#7}} + \sidenotetextbefore|#2|<#3>(#4)!#5!{\kern-2.3pt\upshape\fullcite[\snp@before][\snp@after]{#8}} +} +\NewDocumentCommand \sideciteafter {s d|| d<> d() d!! o o m } +{ \IfNoValueOrEmptyTF{#6} + {\RenewDocumentCommand \snp@before {} {}} + {\RenewDocumentCommand \snp@before {} {#6}} + \IfNoValueOrEmptyTF{#7} + {\RenewDocumentCommand \snp@after {} {}} + {\RenewDocumentCommand \snp@after {} {#7}} + \sidenotetext|#2|<#3>(#4)!#5!{\kern-2.3pt\upshape\fullcite[\snp@before][\snp@after]{#8}} +} +\NewDocumentCommand \sidecitemark {s d() d!! } +{ + \IfBooleanTF{#1} + { % starred + \relax} + {% unstarred + \IfNoValueOrEmptyTF{#3} + {\snp@sidenotemark (#2)} + {\snp@sidenotemark !#3!( #2)} + } + \xspace +} \ExplSyntaxOff %% \newlength\snp@marginparsepodd |