diff options
author | Karl Berry <karl@freefriends.org> | 2016-12-12 22:54:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-12-12 22:54:22 +0000 |
commit | 00db3b3ef04868e84ab4abccf4ece66d3fc77e60 (patch) | |
tree | bf5b0ddc8990b9646d290e2cb929eacbb3430105 /Master/texmf-dist/tex/latex/reledmac/reledpar.sty | |
parent | 8fb9e20f14ce6565321b8910d17919aee9cb37c0 (diff) |
reledmac (12dec16)
git-svn-id: svn://tug.org/texlive/trunk@42689 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac/reledpar.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledpar.sty | 90 |
1 files changed, 76 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty index 3752de8a762..c94978841e8 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty @@ -29,7 +29,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledpar}[2016/11/14 v2.14.4 reledmac extension for parallel texts]% +\ProvidesPackage{reledpar}[2016/12/12 v2.15.0 reledmac extension for parallel texts]% \RequirePackage{xspace}% \RequirePackage{xkeyval} @@ -57,6 +57,10 @@ \nosyncpstartstrue% \apptocmd{\@par@this@sync@option}{nosync}{}{}% }% +\newif\ifmovecolumnspositiononrightpage% +\DeclareOptionX{movecolumnspositiononrightpage}{% + \movecolumnspositiononrightpagetrue% +}% \DeclareOptionX{parledgroup}{\parledgrouptrue} \DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}% \DeclareOptionX{continuousnumberingwithcolumns}{\continuousnumberingwithcolumnstrue}% @@ -102,13 +106,13 @@ \newcommand*{\led@err@Columns@WithoutEnv}{% \reledpar@error{\string\Columns\space called without previous `pairs` environment}{\@ehc}} \newcommand*{\led@err@Pages@WithoutRightside}{% - \reledpar@error{\string\Pages\space called without previous `Rightside` environment (or environment without content)}{\@ehc}}% + \reledpar@error{\string\Pages\space called without any preceding `Rightside` environment (or environment without content)}{\@ehc}}% \newcommand*{\led@err@Pages@WithoutLeftside}{% - \reledpar@error{\string\Pages\space called without previous `Leftside` environment (or environment without content)}{\@ehc}}% + \reledpar@error{\string\Pages\space called without any preceding `Leftside` environment (or environment without content)}{\@ehc}}% \newcommand*{\led@err@Columns@WithoutRightside}{% - \reledpar@error{\string\Columns\space called without previous `Rightside` environment (or environment without content)}{\@ehc}}% + \reledpar@error{\string\Columns\space called without any preceding `Rightside` environment (or environment without content)}{\@ehc}}% \newcommand*{\led@err@Columns@WithoutLeftside}{% - \reledpar@error{\string\Columns\space called without previous `Leftside` environment (or environment without content)}{\@ehc}}% + \reledpar@error{\string\Columns\space called without any preceding `Leftside` environment (or environment without content)}{\@ehc}}% \newcommand{\led@error@fail@patch@thepage}{% \reledpar@error{Fail to patch \string\@thepage\space command.}{\@ehc}% }% @@ -195,6 +199,8 @@ \global\let\next@page@numR\relax \global\let\sub@change\relax \global\stopmsdata@inserted@true% + \global\let\@msdata@list\relax% + \global\csundef{@msdata@\add@msd@cR @dataR}% \set@continuousnumberingforR% \message{Section \the\section@numR R }% \line@list@stuffR{\jobname.\extensionchars\the\section@numR R}% @@ -371,6 +377,10 @@ \global\line@margin=\@l@dtempcntb% \fi% } +\ifmovecolumnspositiononrightpage% + \linenummargin{inner}% + \linenummarginR{outer}% +\fi% \newcount\line@margin@columnsR% \line@margin@columnsR=\m@ne% @@ -994,6 +1004,7 @@ \global\par@line=0% \endgroup% \ignorespaces% + \@oldnobreak% \dump@pstartL@pc% \ifnumberpstart% \addtocounter{pstartL}{1}% @@ -1014,6 +1025,7 @@ \global\par@lineR=0% \endgroup% \ignorespaces% + \@oldnobreak% \dump@pstartR@pc% \ifnumberpstart% \addtocounter{pstartR}{1}% @@ -1766,8 +1778,17 @@ \global\sidenote@marginR=\@l@dtempcntb \global\sidenote@margin=\@l@dtempcntb } +\newcommand{\sidenotemarginR}[1]{% + \l@dgetsidenote@margin{#1}% + \global\sidenote@marginR=\@l@dtempcntb% +}% \newcount\sidenote@marginR -\global\sidenote@margin=\@ne +\global\sidenote@marginR=\@ne% + +\ifmovecolumnspositiononrightpage% + \sidenotemargin{inner}% + \sidenotemarginR{outer}% +\fi% \newcommand*{\affixside@noteR}{% @@ -2099,15 +2120,9 @@ {}% \hb@xt@ \hsize{% \ifdefstring{\columns@position}{L}{}{\hfill }% - \unhbox\l@dleftbox% - \ifhbox\@eledsectionL% - \usebox{\@eledsectionL}% - \fi% + \print@leftcolumn% \print@columnseparator% - \unhbox\l@drightbox% - \ifhbox\@eledsectionR% - \usebox{\@eledsectionR}% - \fi% + \print@rightcolumn% \ifdefstring{\columns@position}{R}{}{\hfill}% }% \checkraw@text @@ -2155,6 +2170,53 @@ \hspace{\beforecolumnseparator}% \fi% }% +\newcommand{\print@leftcolumn}{% + \if\page@num>\page@numR% + \@l@dtempcntb=\page@num% + \else% + \@l@dtempcntb=\page@numR% + \fi% + \ifboolexpr{% + not bool {movecolumnspositiononrightpage}% + or test {\ifnumodd{\@l@dtempcntb}}% + }% + {% + \unhbox\l@dleftbox% + \ifhbox\@eledsectionL% + \usebox{\@eledsectionL}% + \fi% + }% + {% + \unhbox\l@drightbox% + \ifhbox\@eledsectionR% + \usebox{\@eledsectionR}% + \fi% + }% +}% + +\newcommand{\print@rightcolumn}{% + \if\page@num>\page@numR% + \@l@dtempcntb=\page@num% + \else% + \@l@dtempcntb=\page@numR% + \fi% + \ifboolexpr{% + not bool {movecolumnspositiononrightpage}% + or test {\ifnumodd{\@l@dtempcntb}}% + }% + {% + \unhbox\l@drightbox% + \ifhbox\@eledsectionR% + \usebox{\@eledsectionR}% + \fi% + }% + {% + \unhbox\l@dleftbox% + \ifhbox\@eledsectionL% + \usebox{\@eledsectionL}% + \fi% + }% +}% \newcommand{\checkpb@columns}{% \newif\if@pb |