diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-22 21:22:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-22 21:22:17 +0000 |
commit | 67c75df0b955d998f000056bd61fbc95478add5a (patch) | |
tree | dc3a11cfbd28262dd64c9efa464eebd4c40352e6 /Master/texmf-dist/source/latex/marginnote/marginnote.dtx | |
parent | c1d460d553ac5b2a159cb5834069f58728ae96eb (diff) |
marginnote (22apr17)
git-svn-id: svn://tug.org/texlive/trunk@43979 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/marginnote/marginnote.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/marginnote/marginnote.dtx | 46 |
1 files changed, 39 insertions, 7 deletions
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. % ====================================================================== % -%<package>%%% From File: $Id: marginnote.dtx 9 2016-10-21 06:45:27Z mjk $ +%<package>%%% 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 %</dtx> %<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01] %<package>\ProvidesPackage{marginnote}[% %<README>LaTeX package marginnote -%<README>Copyright (c) Markus Kohmm, 2005-2016 +%<README>Copyright (c) Markus Kohm, 2005-2017 %<README>------------------------------------------------------------------- %<README>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 %</package|README> % \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} |