From 67c75df0b955d998f000056bd61fbc95478add5a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 22 Apr 2017 21:22:17 +0000 Subject: marginnote (22apr17) git-svn-id: svn://tug.org/texlive/trunk@43979 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/marginnote/README.txt | 4 +- .../texmf-dist/doc/latex/marginnote/marginnote.pdf | Bin 294702 -> 304607 bytes .../source/latex/marginnote/marginnote.dtx | 46 +++++++++++++++++---- .../texmf-dist/tex/latex/marginnote/marginnote.sty | 23 ++++++++++- 4 files changed, 62 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/marginnote/README.txt b/Master/texmf-dist/doc/latex/marginnote/README.txt index 9947f9a31fa..09dd4d5adef 100644 --- a/Master/texmf-dist/doc/latex/marginnote/README.txt +++ b/Master/texmf-dist/doc/latex/marginnote/README.txt @@ -1,8 +1,8 @@ LaTeX package marginnote -Copyright (c) Markus Kohmm, 2005-2016 +Copyright (c) Markus Kohm, 2005-2017 ------------------------------------------------------------------- Version: - 2016/10/21 v1.2a + 2017/04/22 v1.2b Licence: This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, version 1.3c of the license. diff --git a/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf b/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf index 7c278e8c5dc..28a406ba0dd 100644 Binary files a/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf and b/Master/texmf-dist/doc/latex/marginnote/marginnote.pdf differ diff --git a/Master/texmf-dist/source/latex/marginnote/marginnote.dtx b/Master/texmf-dist/source/latex/marginnote/marginnote.dtx index 8e1b58575b6..fd66d776e18 100644 --- a/Master/texmf-dist/source/latex/marginnote/marginnote.dtx +++ b/Master/texmf-dist/source/latex/marginnote/marginnote.dtx @@ -1,8 +1,8 @@ -% \CheckSum{815} +% \CheckSum{859} % \iffalse meta-comment % ====================================================================== % marginnote.dtx -% Copyright (c) Markus Kohm, 2005-2016 +% Copyright (c) Markus Kohm, 2005-2017 % % This file is part of the work marginnote. % @@ -21,21 +21,21 @@ % derived files README.txt and marginnote.sty. % ====================================================================== % -%%%% From File: $Id: marginnote.dtx 9 2016-10-21 06:45:27Z mjk $ +%%%% From File: $Id: marginnote.dtx 13 2017-04-22 09:25:22Z mjk $ %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2016-10-21 08:45:27 +0200 (Fr, 21 Okt 2016) $ + \filedate$Date: 2017-04-22 11:25:22 +0200 (Sa, 22 Apr 2017) $ \def\filerevision$#1: #2 ${\gdef\filerevision{#2}} - \filerevision$Revision: 9 $ + \filerevision$Revision: 13 $ \endgroup \ProvidesFile{marginnote.dtx}[\filedate\space\filerevision\space % %\NeedsTeXFormat{LaTeX2e}[1995/12/01] %\ProvidesPackage{marginnote}[% %LaTeX package marginnote -%Copyright (c) Markus Kohmm, 2005-2016 +%Copyright (c) Markus Kohm, 2005-2017 %------------------------------------------------------------------- %Version: % \fi^^A meta-comment @@ -43,7 +43,7 @@ % \iffalse meta-comment %<*package|README> % \fi^^A meta-comment - 2016/10/21 v1.2a + 2017/04/22 v1.2b % \iffalse meta-comment % % \fi^^A meta-comment @@ -641,6 +641,24 @@ \fi \fi \fi +% \end{macrocode} +% \changes{v1.2b}{2017/04/22}{\textsf{bidi} code added}^^A +% If you are using package \textsf{bidi} and RTL mode is active, the position +% is from right instead of left. So we have to substract \cs{@mn@currxpos} +% from \cs{pdfpagewidth} (or \cs{pagewidth} using Lua\TeX, but this cannot be, +% because \textsf{bidi} is not Lua\TeX-compatible). +% \begin{macrocode} + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname \@mn@mode@prefix pagewidth\endcsname\relax\else + \@mn@if@RTL{% + \PackageInfo{marginnote}{Margin note + \@mn@thispage.\@mn@atthispage\space in RTL mode}% + \edef\@mn@currxpos{% + \the\dimexpr\@nameuse{\@mn@mode@prefix pagewidth} + -\@mn@currxpos\relax + }% + }{}% + \fi \fi \edef\@mn@currpage{\expandafter\@firstoftwo\@mn@currpage}% \if@mn@verbose @@ -662,6 +680,20 @@ \fi } % \end{macrocode} +% \begin{macro}{@mn@ifRTL} +% \changes{1.2b}{2017/04/22}{new internal} +% Test, whether or not \cs{if@RTL} exists and is true or false. +% \begin{macrocode} +\newcommand*{\@mn@if@RTL}{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname if@RTL\endcsname\iftrue + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% \end{macrocode} +% \end{macro} % \end{macro} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/marginnote/marginnote.sty b/Master/texmf-dist/tex/latex/marginnote/marginnote.sty index e1ab2621581..e1cc622cdbc 100644 --- a/Master/texmf-dist/tex/latex/marginnote/marginnote.sty +++ b/Master/texmf-dist/tex/latex/marginnote/marginnote.sty @@ -20,10 +20,10 @@ %% original source files, as listed above, are part of the %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) -%%% From File: $Id: marginnote.dtx 9 2016-10-21 06:45:27Z mjk $ +%%% From File: $Id: marginnote.dtx 13 2017-04-22 09:25:22Z mjk $ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{marginnote}[% - 2016/10/21 v1.2a + 2017/04/22 v1.2b non floating margin notes for LaTeX] \begingroup \def\@tempb{}% @@ -232,6 +232,17 @@ \fi \fi \fi + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname \@mn@mode@prefix pagewidth\endcsname\relax\else + \@mn@if@RTL{% + \PackageInfo{marginnote}{Margin note + \@mn@thispage.\@mn@atthispage\space in RTL mode}% + \edef\@mn@currxpos{% + \the\dimexpr\@nameuse{\@mn@mode@prefix pagewidth} + -\@mn@currxpos\relax + }% + }{}% + \fi \fi \edef\@mn@currpage{\expandafter\@firstoftwo\@mn@currpage}% \if@mn@verbose @@ -252,6 +263,14 @@ \fi \fi } +\newcommand*{\@mn@if@RTL}{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname if@RTL\endcsname\iftrue + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} \newcommand*{\marginnote}{% \@dblarg\@mn@marginnote } -- cgit v1.2.3