summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-17 21:16:23 +0000
committerKarl Berry <karl@freefriends.org>2017-08-17 21:16:23 +0000
commit8752481311daf908372f21728c152ca10ae0973e (patch)
treeec009734d0de97ee4fed31d17425243eaac1ccad /Master/texmf-dist/source/latex/reledmac/reledpar.dtx
parent0f4a34d1fe6262bc72205b50adb2ae5ab576d427 (diff)
reledmac (17aug17)
git-svn-id: svn://tug.org/texlive/trunk@45055 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledpar.dtx')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx552
1 files changed, 393 insertions, 159 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index 1a5f3585957..1a810416c94 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -37,6 +37,7 @@
\usepackage[series={A,B},noend,noeledsec,nofamiliar]{reledmac}
\usepackage{reledpar}
\usepackage{suffix}
+\usepackage{csquotes}
\usepackage[english]{babel}
\usepackage{graphicx,metalogo,longtable}
\makeatletter
@@ -217,58 +218,58 @@
% \changes{v1.11.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
% \changes{v1.12.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.}
% \changes{v1.13.0}{2015/03/06}{With parallel pages, long notes can now flow from the Left to the right side and from the Right to the left side.}
-% \changes{v1.13.0}{2015/03/06}{Fix bug in shiftedpstarts when size difference between pstarts is very important.}
+% \changes{v1.13.0}{2015/03/06}{Fix a bug in shiftedpstarts when size difference between pstarts is very important.}
% \changes{v1.14.0}{2015/03/22}{The \protect\cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
-% \changes{v1.14.0}{2015/03/22}{Fix bug with line number position when using \protect\cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
+% \changes{v1.14.0}{2015/03/22}{Fix a bug with line number position when using \protect\cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
% \changes{v1.15.0}{2015/04/13}{Add \protect\cs{AtEveryPstartCall}.}
% \changes{v1.15.0}{2015/04/13}{Fix vertical spurious space before right \protect\cs{eledchapter} (bug added in v1.13.0).}
% \changes{v1.15.0}{2015/04/13}{Prevent vertical space when using \protect\cs{AtEveryPstart} or \protect\cs{AtEveryPend} with a command which prints nothing}
-% \changes{v1.16.0}{2015/05/18}{Fix bug with nofamiliar / nocritical option of eledmac.}
+% \changes{v1.16.0}{2015/05/18}{Fix a bug with nofamiliar / nocritical option of eledmac.}
% \changes{v1.16.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}…\protect\cs{endnumbering} without \protect\cs{pstart}.}
% \changes{v1.16.0}{2015/05/18}{Error message when starting a Leftside/a Rightside while the previous one has not been yet typeset.}
% \changes{v1.16.0}{2015/05/18}{Error message when calling \protect\cs{Pages} inside `pages' environment and \protect\cs{Columns} inside `pairs' environment.}
% \changes{v1.16.0}{2015/05/18}{New package option sameparallelpagenumber to have the same page number for both left and right side.}
% \changes{v1.16.1}{2015/05/20}{Write information about line-list file version in the correct file.}
-% \changes{v1.16.2}{2015/05/29}{Fix bug when adding empty lines before a \protect\cs{pend} in combination with some specific penalties setting.}
+% \changes{v1.16.2}{2015/05/29}{Fix a bug when adding empty lines before a \protect\cs{pend} in combination with some specific penalties setting.}
% \changes{v1.17.0}{2015/06/02}{Add compatibility of optional argument of \protect\cs{pstart}/\protect\cs{pend} and \protect\cs{AtEveryPstart}/\protect\cs{AtEveryPend} with two columns mode.}
% \changes{v2.0.0}{2015/07/19}{Many code refactored and moved to \reledmac.}
% \changes{v2.0.0}{2015/07/19}{Package's name becomes \reledpar.}
% \changes{v2.0.0}{2015/07/19}{Fix some bugs with `sameparallelpagenumber' option.}
% \changes{v2.0.0}{2015/07/19}{Totally new implementation of `sameparallelpagenumber' option.}
-% \changes{v2.1.0}{2015/07/27}{Fix bug with \protect\cs{setparledgroupnotespacing} with the shiftedpstarts option.}
+% \changes{v2.1.0}{2015/07/27}{Fix a bug with \protect\cs{setparledgroupnotespacing} with the shiftedpstarts option.}
% \changes{v2.1.0}{2015/07/27}{Fix incompatibility between optional argument of \protect\cs{pstart} and \protect\cs{numberpstarttrue}}
% \changes{v2.1.0}{2015/07/27}{Options to custom empty right page before \protect\cs{Pages}.}
-% \changes{v2.1.0}{2015/07/27}{Fix bug when using \protect\cs{pagenumbering} with memoir (bug added in v2.0.0).}
-% \changes{v2.1.0}{2015/07/27}{Fix bug when using \protect\cs{eledsection} and related on right pages when page width is short.}
+% \changes{v2.1.0}{2015/07/27}{Fix a bug when using \protect\cs{pagenumbering} with memoir (bug added in v2.0.0).}
+% \changes{v2.1.0}{2015/07/27}{Fix a bug when using \protect\cs{eledsection} and related on right pages when page width is short.}
% \changes{v2.2.0}{2015/08/08}{\protect\env{astanza} environment can take an optional argument, which will be the optional argument of \protect\cs{pstart} started by this environment.}
% \changes{v2.2.0}{2015/08/08}{New tools to number stanza}
-% \changes{v2.2.1}{2015/08/13}{Fix bug with optional argument of last left \protect\cs{pend}}
-% \changes{v2.3.0}{2015/09/05}{Fix bug with title number in parallel columns}
+% \changes{v2.2.1}{2015/08/13}{Fix a bug with optional argument of last left \protect\cs{pend}}
+% \changes{v2.3.0}{2015/09/05}{Fix a bug with title number in parallel columns}
% \changes{v2.3.0}{2015/09/05}{Change some internal codes in order to provide compatibility with \LaTeX\ release of october~2015}
% \changes{v2.3.0}{2015/09/05}{New line setting command suffixed by R to set only the right side.}
% \changes{v2.4.0}{2015/09/29}{New way of (not) synchronizing the parallel pages.}
% \changes{v2.4.0}{2015/09/29}{Option to switch to \protect\cs{mainmatter} when calling \protect\cs{Pages}}
% \changes{v2.5.0}{2015/10/14}{New commands \protect\cs{linenummarginR} and \protect\cs{linenummargin*}}
-% \changes{v2.5.0}{2015/10/14}{Fix bug introduced in v1.15.0 which made hanging indentation in verse not work anymore.}
+% \changes{v2.5.0}{2015/10/14}{Fix a bug introduced in v1.15.0 which made hanging indentation in verse not work anymore.}
% \changes{v2.5.0}{2015/10/14}{Disable empty lines as paragraph in astanza.}
% \changes{v2.5.1}{2015/10/19}{Fix spurious space when using optional argument of \protect\env{astanza} environment (introduced in v2.5.0).}
-% \changes{v2.5.2}{2015/10/26}{Fix bug introduced in v2.5.0 with \protect\cs{linenummargin}, \protect\cs{firstlinenum}, \protect\cs{linenumincrement}, \protect\cs{firstsublinenum}, \protect\cs{sublinenumincrement}.}
+% \changes{v2.5.2}{2015/10/26}{Fix a bug introduced in v2.5.0 with \protect\cs{linenummargin}, \protect\cs{firstlinenum}, \protect\cs{linenumincrement}, \protect\cs{firstsublinenum}, \protect\cs{sublinenumincrement}.}
% \changes{v2.6.0}{2015/11/13}{\protect\cs{printlinesR} deleted}
% \changes{v2.6.0}{2015/11/13}{\protect\cs{Xlineflag} and \protect\cs{Xendlineflag} added}
-% \changes{v2.6.0}{2015/11/13}{Fix bug with footnote numbering when using the same series of familiar footnotes on both sides.}
+% \changes{v2.6.0}{2015/11/13}{Fix a bug with footnote numbering when using the same series of familiar footnotes on both sides.}
% \changes{v2.6.0}{2015/11/13}{Error message when calling \protect\cs{Pages} or \protect\cs{Columns} without previous \protect\env{pages} or \protect\env{pairs} environnment.}
% \changes{v2.6.0}{2015/11/13}{Fix compatibility with \protect\package{babel} (broken in v.2.0.0).}
% \changes{v2.6.0}{2015/11/13}{No error messages about ends of left / right page when using the \protect\cs{syntaxonly} command of the \protect\package{syntonly} package.}
% \hyphenation{man-u-script man-u-scripts}
-% \changes{v2.6.0}{2015/11/13}{Fix bug with right side title number when using title commands before \protect\env{pages} or \protect\env{columns} environments.}
+% \changes{v2.6.0}{2015/11/13}{Fix a bug with right side title number when using title commands before \protect\env{pages} or \protect\env{columns} environments.}
% \changes{v2.6.1}{2015/11/20}{Fix bug, introduced in v2.6.0, with footnote numbering when using \protect\package{perpage} package.}
% \changes{v2.6.2}{2015/11/29}{Fix (again) bugs with footnote numbering in parallel typesetting while using \protect\env{ledgroup} environments (bug added in v2.6.0).}
-% \changes{v2.6.2}{2015/11/29}{Fix bug (added in v2.6.0) with footnote numbering in parallel typesetting while using \protect\package{polyglossia} with specific numbering systems (like Greek).}
+% \changes{v2.6.2}{2015/11/29}{Fix a bug (added in v2.6.0) with footnote numbering in parallel typesetting while using \protect\package{polyglossia} with specific numbering systems (like Greek).}
% \changes{v2.6.3}{2015/12/13}{Fix spurious dot when using \protect\cs{linenummargin} on right side (introduced in v2.5.0).}
% \changes{v2.7.0}{2016/01/15}{\protect\macpackage cross-referencing can take advantage of \protect\package{xr} package.}
-% \changes{v2.7.1}{2016/03/06}{Fix bug added in \protect\reledmac~2.8.2, when typesetting parallel text just after a sectioning command}
+% \changes{v2.7.1}{2016/03/06}{Fix a bug added in \protect\reledmac~2.8.2, when typesetting parallel text just after a sectioning command}
% \changes{v2.8.0}{2016/03/23}{{Allow continuing line numbering between normal text and parallel text, using \protect\cs{pausenumbering} and \protect\cs{resumenumbering} and the \protect\option{continuousnumberingwithcolumns} options.}}
-% \changes{v2.8.0}{2016/03/23}{Fix bug when the right line number style is not the same to the left line number style}
+% \changes{v2.8.0}{2016/03/23}{Fix a bug when the right line number style is not the same to the left line number style}
% \changes{v2.8.0}{2016/03/23}{Add \protect\cs{linenumberLevenifblanktrue} and \protect\cs{linenumberRevenifblank} commands}
% \changes{v2.9.0}{2016/05/08}{Add \protect\cs{AtEveryStanza} and \protect\cs{AtEveryStopStanza}.}
% \changes{v2.9.0}{2016/05/08}{More specific error messages.}
@@ -276,8 +277,8 @@
% \changes{v2.10.0}{2016/06/02}{Add new tools to make apparatuses of manuscripts}
% \changes{v2.11.0}{2016/06/16}{Compatibility with \protect\reledmac's \protect\option{auxdir} option.}
% \changes{v2.12.0}{2016/07/01}{Add \protect\cs{edtextlater} and \protect\cs{edtextnow}.}
-% \changes{v2.12.0}{2016/07/01}{Fix bug with \protect\cs{lineationR}.}
-% \changes{v2.12.0}{2016/07/01}{Fix bug with \protect\cs{AtBeginPairs}.}
+% \changes{v2.12.0}{2016/07/01}{Fix a bug with \protect\cs{lineationR}.}
+% \changes{v2.12.0}{2016/07/01}{Fix a bug with \protect\cs{AtBeginPairs}.}
% \changes{v2.13.0}{2016/07/22}{Compatibility with the new features of \protect\macpackage 2.15.0}
% \changes{v2.13.1}{2016/09/26}{Simplification of the code concerning the sectioning command}
% \changes{v2.14.0}{2016/10/02}{New commands to have specific line margins for text running in parallel columns}
@@ -285,32 +286,40 @@
% \changes{v2.14.0}{2016/10/02}{When indexing texts in sidenotes with \protect\cs{edtext}, referring to the line number where the sidenote is called.}
% \changes{v2.14.0}{2016/10/02}{More explicit error message when the stanza indentation is not defined.}
% \changes{v2.14.0}{2016/10/02}{Error message when left / right side are not defined.}
-% \changes{v2.14.1}{2016/10/16}{Fix bug with vertical space before sectioning command in optional argument of \protect\cs{pstart} (bug added in v2.13.1).}
-% \changes{v2.14.1}{2016/10/16}{Fix bug when using \protect\cs{markboth} on \protect\cs{doinsidelineLhook} and \protect\cs{doinsidelineRhook}.}
+% \changes{v2.14.1}{2016/10/16}{Fix a bug with vertical space before sectioning command in optional argument of \protect\cs{pstart} (bug added in v2.13.1).}
+% \changes{v2.14.1}{2016/10/16}{Fix a bug when using \protect\cs{markboth} on \protect\cs{doinsidelineLhook} and \protect\cs{doinsidelineRhook}.}
% \changes{v2.14.2}{2016/10/31}{Fix spurious space with \protect\cs{edtextlater}.}
-% \changes{v2.14.3}{2016/11/04}{Fix bug in \protect\cs{edtextnow}.}
+% \changes{v2.14.3}{2016/11/04}{Fix a bug in \protect\cs{edtextnow}.}
% \changes{v2.14.4}{2016/11/14}{Take into account \protect\cs{linenumberstyle} when using \protect\cs{edlineref}.}
% \changes{v2.15.0}{2016/12/12}{Add \protect\option{movecolumnspositiononrightpage} option.}
% \changes{v2.15.0}{2016/12/12}{New macro \protect\cs{sidenotemarginR}, fix default value to right.}
-% \changes{v.2.15.0}{2016/12/12}{Fix bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}}
-% \changes{v2.15.0}{2016/12/12}{Fix bug about space before sectioning commands after a pairs environment (bug added in v.~2.14.4).}
-% \changes{v2.15.0}{2016/12/12}{Fix bug with page break when using \protect\cs{columns} (bug added in v.~2.14.1).}
+% \changes{v.2.15.0}{2016/12/12}{Fix a bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}}
+% \changes{v2.15.0}{2016/12/12}{Fix a bug about space before sectioning commands after a pairs environment (bug added in v.~2.14.4).}
+% \changes{v2.15.0}{2016/12/12}{Fix a bug with page break when using \protect\cs{columns} (bug added in v.~2.14.1).}
% \changes{v2.16.0}{2016/12/23}{Compatibility with \protect\cs{setmsdataposition}}
% \changes{v2.16.1}{2017/01/03}{Restore sidenotes on left side, deleted by mistake in v2.16.0}
% \changes{v2.16.2}{2017/01/25}{Change log message when numbered files still don't exist, in order to improve compatibility with \protect\emph{latexmk}.}
-% \changes{v2.16.3}{2017/02/10}{Fix bug when setting \protect\cs{aftercolumnseparator}.}
+% \changes{v2.16.3}{2017/02/10}{Fix a bug when setting \protect\cs{aftercolumnseparator}.}
% \changes{v2.17.0}{2017/02/22}{Change code for compatibility with \protect\reledmac 2.18.0}
-% \changes{v2.17.1}{2017/03/26}{Fix bug with \protect\option{prevpgstyle} option when not using \protect\option{prevpgnotnumbered}.}
-% \changes{v2.17.3}{2017/04/20}{Fix bug when using multiple sidenotes on the same line, on right side.}
+% \changes{v2.17.1}{2017/03/26}{Fix a bug with \protect\option{prevpgstyle} option when not using \protect\option{prevpgnotnumbered}.}
+% \changes{v2.17.3}{2017/04/20}{Fix a bug when using multiple sidenotes on the same line, on right side.}
% \changes{v2.17.4}{2017/04/28}{Fix bugs with sublines in parallel typesetting.}
% \changes{v2.18.0}{2017/05/04}{Compatibility with v2.20.0 of \protect\reledmac.}
% \changes{v2.19.0}{2017/06/08}{Compatibility with v2.22.0 of \protect\reledmac.}
-% \changes{v2.19.1}{2017/06/15}{Fix bug with \protect\cs{edtext} in sectioning command with shiftedpstarts mode.}
-% \changes{v2.19.2}{2017/07/07}{\protect\option{continuousnumberingwithcolumns} works also for pstart number.}
+% \changes{v2.19.1}{2017/06/15}{Fix a bug with \protect\cs{edtext} in sectioning command with shiftedpstarts mode.}
+% \changes{v2.19.2}{2017/07/07}{\protect\option{continuousnumberingwithcolumns} also works for the pstart number.}
% \changes{v2.19.3}{2017/07/17}{Fix a bug with \protect\option{nopbinverse} when using consecutive \protect\cs{Pages}.}
% \changes{v2.19.3}{2017/07/17}{Do not print footnotes at the first run.}
-% \changes{v2.19.4}{2017/07/31}{Optimisation of the code to not print footnotes at the first run.}
-% \changes{v2.19.5}{2017/08/10}{Fix bug added in \protect\environment{astanza} in v.~2.18.0}
+% \changes{v2.19.4}{2017/07/31}{Optimisation of the code in order to not print footnotes at the first run.}
+% \changes{v2.19.5}{2017/08/10}{Fix a bug added in \protect\environment{astanza} in v.~2.18.0}
+% \changes{v2.20.0}{2017/10/15}{Add \protect\option{sidenotesmarginpage} option to make the sidenotes refer to page margins and not column margins.}
+% \changes{v2.20.0}{2017/08/17}{Fix incompatibility between \protect\cs{lineation}\protect\arg{page} and \protect\option{continuousnumberingwithcolumns} option}
+% \changes{v2.20.0}{2017/08/17}{Fix a bug with \protect\cs{continuousnumberingwithcolumns} when using multiple series of continued numbering text. Now, the line number are correctly reset at each \protect\cs{beginnumbering}.}
+% \changes{v2.20.0}{2017/08/17}{Fix a bug with \protect\option{continuousnumberingwithcolumns} and inner / outer notes and line numbering.}
+% \changes{v2.20.0}{2017/08/17}{Add \protect\cs{linenumOnlyPagesForColumns} and \protect\cs{linenumOnlyPagesForColumnsR} to tell to print the line numbers associated with a column only on some specific pages (for example, only on right pages).}
+% \changes{v2.20.0}{2017/08/17}{Fix a bug with \protect\option{continuousnumberingwithcolumns} when a \protect\cs{beginnumbering} is called after an other \protect\cs{beginnumbering}…\protect\cs{endnumbering}.}
+% \changes{v2.20.0}{2017/08/17}{Fix a bug with \protect\option{widthliketwocolumns} when manually setting \protect\cs{beforecolumnseparator} and \protect\cs{aftercolumnseparator}.}
+% \changes{v2.20.0}{2017/08/17}{Fix compatibility between \protect\option{continuousnumberingwithcolumns} and \protect\cs{numberpstartfalse}.}
% ^^A PW added following as the definitions are at some unknown elsewhere
%
% \newcommand{\egstart}{%
@@ -423,6 +432,8 @@
% column to be the same as the width of the text printed in two parallel
% columns with \parpackage. This is useful when alternating between normal and
% parallel typesetting.\footnote{This option can either be used on \macpackage or \parpackage.}
+% \item [continuousnumberingwithcolumns] allow you to alternate between normal typesetting and parallel column typesetting without resetting the line number (see \reff{continuousnumberingwithcolumns}).
+% \item [sidenotesmarginpage] makes the sidenotes be placed on the margin of the page and not on the margin of the columns.
% \item [sameparallelpagenumber] sets page numbers on facing pages to the same value.
% \item [prevpgnotnumbered] enables that the page before facing pages (the one
% automatically inserted to start parallel pages on a left page) is not
@@ -589,9 +600,17 @@
% In most cases, you should use \protect\cs{widthliketwocolumns} in combination with \protect\cs{Xnoteswidthliketwocolumns} and \protect\cs{notesXwidthliketwocolumns} to align the critical/familiar footnotes with the two colums.
% See \macpackage's handbook for more details.
%
-% If you want to have continuous line numbers between multiple columns and single columns, use the \option{continuousnumberingwithcolumns} option when loading \macpackage or \parpackage.
+% \label{continuousnumberingwithcolumns}If you want to have continuous line numbers between multiple columns and single columns, use the \option{continuousnumberingwithcolumns} option when loading \macpackage or \parpackage.
% You will need to use \cs{pausenumbering}\ldots\cs{resumenumbering} instead of \cs{endnumbering}\ldots{endnumbering} (see \reff{reledmac-pause}).
%
+% The first time you start \textbf{a left column or a single column}, use \cs{beginnumbering}, then use \cs{resumenumbering}. When you stop a left or a single column, use \cs{pausenumbering}, except the last time, where you must use \cs{endnumbering}.
+%
+% The first time you start \textbf{a right column}, use \cs{beginnumbering}, then use \cs{resumenumbering}. When you stop a right column, use \cs{pausenumbering}, except the last time, where you must use \cs{endnumbering}.
+%
+% \subsubsection{Schemas of column typesetting}
+% Domenico Cufalo wrote a schema of the parallel column typesetting parameters, with explanations.
+% You can read the file \href{run:doc-more/page-typesetting-columns.pdf}{doc-more/page-typesetting-columns.pdf}.
+%
% \subsection{Note about \cs{AtEveryPstart*} and \cs{AtEveryPend*}}
% The content of \cs{AtEveryPstart} / \cs{AtEveryPend} (without star) is added before every \cs{pstart} / after every \cs{pend}, respecting the left / right side.
%
@@ -969,7 +988,7 @@
% When inserted into a numbered line the macro \protect\cs{hidenumbering} causes
% the number for that particular line to be hidden; namely, no line number will print.
% Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse.
-% \subsection{Lineation system}
+% \subsection{First line number and line number increment}
% \DescribeMacro{\firstlinenum}
% \DescribeMacro{\linenumincrement}
% \DescribeMacro{\firstsublinenum}
@@ -987,7 +1006,6 @@
% However, these commands apply to right side when they are called inside a \environment{left} environment.
% However, such features should not be used any more. The recommended practice is to add all setting commands to the preamble.
%}
-%
% \DescribeMacro{\firstlinenum*}
% \DescribeMacro{\linenumincrement*}
% \DescribeMacro{\firstsublinenum*}
@@ -999,7 +1017,7 @@
% \DescribeMacro{\firstsublinenumR}
% \DescribeMacro{\sublinenumincrementR}
% The suffixed version change the right side, without regard to the position they are called.
-%
+% \subsection{Lineation system}
% \DescribeMacro{\lineationR}
% \protect\cs{lineationR} macro is the equivalent of \macpackage \protect\cs{lineation} macro for the right side.
% \DescribeMacro{\lineation*}
@@ -1009,7 +1027,7 @@
% \Macpackage allows you to define a \cs{linenumberlist} to explicitly define (\reff{reledmac-linenumberlist}) in which line the line number will be printed.
% In parallel typesetting, this command affects only left side.
% For right side, you have to define \cs{linenumberlistR}.
-%
+% \subsection{Line number style}
% \DescribeMacro{\linenumberstyleR}
% \DescribeMacro{\sublinenumberstyleR}
% \DescribeMacro{\linenumberstyle*}
@@ -1017,7 +1035,7 @@
% \cs{linenumberstyleR} is the equivalent of \macpackage \cs{linenumberstyle} for right text.
% \cs{sublinenumberstyleR} is the equivalent of \macpackage \cs{sublinenumberstyle} right text.
% The starred version are for both side.
-
+% \subsection{Line number margin}
% \DescribeMacro{\linenummarginR}
% \DescribeMacro{\linenummargin*}
% \cs{linenummarginR}\marg{margin} sets the line margin for right side.
@@ -1033,6 +1051,31 @@
%
% In this case, you can use \cs{linenummarginColumns}, which overrides the default setting for the left column, \cs{linenummarginColumnsR} which overrides the default setting for the right column, and \cs{linenummarginColumns*}, which overrides the default for both left and right columns.
%
+% \DescribeMacro{\linenumOnlyPagesForColumns}
+% \DescribeMacro{\linenumOnlyPagesForColumnsR}
+% Another usual case is when you have text in parallel columns and want to get line numbers only on the outer margin.
+% In this case, you need to get line numbers on the left side of the left column on left pages and on the right side of the right column on the right pages.
+%
+% Reciprocally, if you want to get line numbers only on the inner margin, you need to get line number on the right side of the right column on left pages and on the left side of the left column on the right pages.
+%
+% In the two cases, you need, for one column, to have line numbers only on one page of a double pages.
+%
+% You can use \cs{linenumOnlyPagesForColumns} and \cs{linenumOnlyPagesForColumnsR} to get this result:
+% \begin{verbatim}
+% \linenummargin{left}
+% \linenummarginR{right}
+% % To get only on the outer margin
+% \linenumOnlyPagesForColumns{left}
+% \linenumOnlyPagesForColumnsR{right}
+% % To get only on the inner margin
+% \linenumOnlyPagesForColumns{right}
+% \linenumOnlyPagesForColumnsR{left}
+% % To get on the inner or the outer margin
+% \linenumOnlyPagesForColumns{}
+% \linenumOnlyPagesForColumnsR{}
+% \end{verbatim}
+% Note that these settings only apply when we are typesetting columns (as, if we are not typesetting columns, the \enquote{inner} and \enquote{outer} setting of \cs{linenummargin} and \cs{linenummarginR} are enough).
+% \subsection{Line flag}
% \DescribeMacro{\setRlineflag}\label{Rlineflag}
% A ``R'' is appended to the line numbers of the
% right texts.
@@ -1176,6 +1219,9 @@
% The \cs{sidenotemarginR} defines the margin of the sidenote for the right side.
%
% You can use \protect\cs{sidenotemargin*} to define it for both sides.
+%
+% When typesetting parallel columns, the margin where a sidenote is placed is one of the margins of the column the sidenote is called.
+% However, you can load \parpackage with the \option{sidenotesmarginpage} to use the margin of the page, and not of the column.
% \section{Parallel ledgroups}
% \subsection{General}
% \changes{v1.6.0}{2013/12/13}{Add tool and documentation for parallel ledgroups}
@@ -1288,7 +1334,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2017/08/10 v2.19.5 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2017/08/17 v2.20.0 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -1355,7 +1401,7 @@
}%
% \end{macrocode}
% \end{macro}
-% \subsubsection{Position option}
+% \subsubsection{Position options}
% \begin{macro}{\ifmovecolumnspositiononrightpage}
% The \cs{ifmovecolumnspositiononrightpage} boolean is set to true if, for a right page, we want the left column become a right column and the right column become a left column.
% \begin{macrocode}
@@ -1365,6 +1411,15 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{if@sidenotesmarginpage}
+% With the \option{sidenotesmarginpage}, a left sidenote called in a right column will be printed at the left of the page, and a right sidenote called in a left column will be printed at the right of the page.
+% \begin{macrocode}
+\newif\if@sidenotesmarginpage%
+\DeclareOptionX{sidenotesmarginpage}{%
+ \@sidenotesmarginpagetrue%
+}%
+% \end{macrocode}
+% \end{macro}
% \subsubsection{Other options}
% The \verb+parledgroup+ can be called either on \macpackage or \parpackage.
% \begin{macrocode}
@@ -1728,16 +1783,19 @@
\global\sublines@Rfalse
\global\let\next@page@numR\relax
\global\let\sub@change\relax
+ \global\last@page@numR=-10000%
\global\stopmsdata@inserted@true%
\global\let\@msdata@list\relax%
\global\csundef{@msdata@\add@msd@cR @dataR}%
\ifcontinuousnumberingwithcolumns%
- \addtocounter{pstartR}{1}%
+ \ifnumberpstart%
+ \addtocounter{pstartR}{1}%
+ \fi%
\else%
\setcounter{pstartR}{1}%
\fi%
- \set@continuousnumberingforR%
\message{Section \the\section@numR R }%
+ \set@continuousnumberingforR%
\line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
\l@dend@stuff
\begingroup
@@ -1845,24 +1903,34 @@
%
% \begin{macro}{\pausenumberingR}
% \begin{macro}{\resumenumberingR}
+% \begin{macro}{\ifresumenumberingR@start}
+% \begin{macro}{\pausenumbering@page@numR}
% These are the right text equivalents of \protect\cs{pausenumbering} and
% \protect\cs{resumenumbering}.
% \changes{v1.8.3}{2014/08/31}{Debug \protect\cs{resumenumberingR}}
% \begin{macrocode}
+\newcount\pausenumbering@page@numR%
\newcommand*{\pausenumberingR}{%
+ \ifx\next@page@numR\relax%
+ \global\pausenumbering@page@numR=0%
+ \else%
+ \global\pausenumbering@page@numR=\next@page@numR%
+ \fi%
\endnumberingR\global\numberingRtrue}
+\newif\ifresumenumberingR@start%
\newcommand*{\resumenumberingR}{%
\ifnumberingR
\global\pst@rtedRtrue
\global\advance\section@numR \@ne
+ \global\resumenumberingR@starttrue%
\led@mess@SectionContinued{\the\section@numR R}%
+ \set@continuousnumberingforR%
\line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
\l@dend@stuff
\begingroup%
\initnumbering@sectcountR%
- \set@continuousnumberingforR%
\else
- \led@err@numberingShouldHaveStarted
+ \led@err@NumberingShouldHaveStarted
\endnumberingR
\beginnumberingR
\fi}
@@ -1870,6 +1938,8 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\memorydumpL}
% \begin{macro}{\memorydumpR}
@@ -1958,12 +2028,14 @@
% \end{macro}
%
% \begin{macro}{\set@continuousnumberingforR}
-% \cs{set@continuousnumberingforR} set the right line numbers and pstart counter at a \cs{beginnumberingR} or a \cs{resumenumberingR} in order to have continuous numbering with single column text.
+% \cs{set@continuousnumberingforR} set the right line number and the pstart counters at a \cs{beginnumberingR} or a \cs{resumenumberingR} in order to have continuous numbering with single column text.
% \begin{macrocode}
\newcommand{\set@continuousnumberingforR}{%
\ifcontinuousnumberingwithcolumns%
\ifnum\line@numR<\line@num%
- \expandafter\setlinenum\expandafter{\the\line@num}%
+ \global\appto\next@line@list@stuffR{%
+ \expandafter\setlinenum\expandafter{\the\line@num}%
+ }%
\fi%
\ifnum\last@page@num>\last@page@numR%
\global\last@page@numR=\last@page@num%
@@ -2072,6 +2144,22 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \begin{macro}{\linenumOnlyPagesForColumns}
+% \begin{macro}{\linenumOnlyPagesForColumnsR}
+% \cs{linenumOnlyPagesForColumns} and \cs{linenumOnlyPagesForColumnsR} make the line numbers be printed only on left/right page for the left/right column.
+% \begin{macrocode}
+\def\linenum@OnlyPages@ForColumns{}%
+\newcommand{\linenumOnlyPagesForColumns}[1]{%
+ \gdef\linenum@OnlyPages@ForColumns{#1}%
+}%
+
+\def\linenum@OnlyPages@ForColumnsR{}%
+\newcommand{\linenumOnlyPagesForColumnsR}[1]{%
+ \gdef\linenum@OnlyPages@ForColumnsR{#1}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \subsection{Setting lineation start and step}
% \begin{macro}{\c@firstlinenumR}
% \begin{macro}{\c@linenumincrementR}
@@ -2405,6 +2493,7 @@
\newcommand{\@nl@regR}{%
\ifx\l@dchset@num\relax \else
\advance\absline@numR \@ne
+ \csgdef{l@dchset@num@R\the\absline@numR}{}%To remember this line have been marked by a \setlinenum
\set@line@action
\let\l@dchset@num\relax
\advance\absline@numR \m@ne
@@ -2732,7 +2821,7 @@
%
% \begin{macro}{\@pstart}
% \begin{macro}{\@pstartR}
-% \cs{@pstart} and cs{@pstartR} allows us to know, when using \cs{nomaxlines} option, in which page we should start a pstart, and also how many empty lines we should let before starting this pstart at the begining of the page
+% \cs{@pstart} and cs{@pstartR} allows us to know, when using \cs{nomaxlines} option, in which page we should start a pstart, and also how many empty lines we should let before starting this pstart at the beginning of the page
% \begin{macrocode}
\newcommand{\@pstart}[3]{%
\ifcsdef{minpage@pstart@#1}%
@@ -2801,12 +2890,17 @@
% \end{macro}
%
% \begin{macro}{\line@list@stuffR}
+% \begin{macro}{\next@line@list@stuffR}
% This is the right text version of the \protect\cs{line@list@stuff}\marg{file}
% macro. It is called by \protect\cs{beginnumberingR} and performs
% all the line-list operations needed at the start of a section.
% Its argument is the name of the line-list file.
% \changes{v1.10.1}{2015/01/16}{Revert modification of 1.4.2, which makes bugs with numbering. Leave vertical mode to solve spurious space before minipage.}
+% \Macpackage and \parpackage can fill the \cs{next@line@list@stuffR} hook between a \cs{endnumberingR} (associated with numbered file $n$) and a \cs{beginnumberingR} (associated with numbered file $n+1$). It allows adding content to the numbered file $n+1R$ and not $nR$.
+% \changes{v2.20.0}{2017/08/17}{Add \protect\cs{next@line@list@stuffR} internal hook.}
% \begin{macrocode}
+
+\let\next@line@list@stuffR\relax%
\newcommand*{\line@list@stuffR}[1]{%
\global\newtoggle{notfirstrun@#1}%
\IfFileExists{\l@auxdir#1}%
@@ -2814,7 +2908,6 @@
{\global\togglefalse{notfirstrun@#1}}%
\read@linelist{#1}%
\iffirst@linenum@out@R
- \immediate\closeout\linenum@outR
\global\first@linenum@out@Rfalse
\immediate\openout\linenum@outR=\l@auxdir#1%
\immediate\write\linenum@outR{\string\line@list@version{\this@line@list@version}}%
@@ -2827,10 +2920,14 @@
\fi%
\closeout\linenum@outR%
\openout\linenum@outR=\l@auxdir#1%
- \fi}
+ \fi%
+ \next@line@list@stuffR%
+ \global\let\next@line@list@stuffR\relax%
+}%
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\new@lineL}
% The \protect\cs{new@lineL} macro sends the \protect\cs{@nl} command to the left text
@@ -2953,7 +3050,7 @@
% We need to declare these options.
% We also need box to store temporary the footnote not printed.
% We check the \verb+nofamiliar+ and \verb+nocritical+ \macpackage\ options.
-% \changes{v1.16.0}{2015/05/18}{Fix bug with \protect\cs{onlysideX}.}
+% \changes{v1.16.0}{2015/05/18}{Fix a bug with \protect\cs{onlysideX}.}
% \begin{macrocode}
\unless\ifnofamiliar@%
\csgdef{onlysideX@#1}{}%
@@ -3456,8 +3553,9 @@
\@at@start@every@pstart%
\hsize=\Lcolwidth%
\numberedpar@true%
- \iflabelpstart\protected@edef\@currentlabel%
- {\p@pstartL\thepstartL}\fi%
+ \iflabelpstart%
+ \protected@edef\@currentlabel{\p@pstartL\thepstartL}%
+ \fi%
% \end{macrocode}
% Dump the optional arguments
% \begin{macrocode}
@@ -3540,8 +3638,9 @@
\@at@start@every@pstart%
\hsize=\Rcolwidth%
\numberedpar@true%
- \iflabelpstart\protected@edef\@currentlabel%
- {\p@pstartR\thepstartR}\fi%
+ \iflabelpstart%
+ \protected@edef\@currentlabel{\p@pstartR\thepstartR}%
+ \fi%
\providetoggle{before@pstartR@\the\l@dnumpstartsR @par}%
\ifboolexpr{%
test {\ifstrempty{#1}}%
@@ -3607,10 +3706,10 @@
\dump@pstartL@pc%
\ifnumberpstart%
\addtocounter{pstartL}{1}%
+ \ifcontinuousnumberingwithcolumns%
+ \addtocounter{pstart}{1}%
+ \fi%
\fi
- \ifcontinuousnumberingwithcolumns%
- \addtocounter{pstart}{1}%
- \fi%
\parledgroup@beforenotes@save{L}%
% \end{macrocode}
% Dump content of the optional argument.
@@ -3766,7 +3865,7 @@
% \changes{v0.11.0}{2012/06/11}{Change \protect\cs{do@lineL} and \protect\cs{do@lineR} to allow line numbering by pstart (like in eledmac 0.15).}
% \changes{v1.8.0}{2014/08/05}{Change \protect\cs{do@lineR} and \protect\cs{do@lineR} to allow new sectioning commands.}
% \begin{macro}{\do@lineL}
-% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the begining of a page, (maybe added by v1.8.0) (?).}
+% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the beginning of a page, (maybe added by v1.8.0) (?).}
% The \protect\cs{do@lineL} macro is called to
% do all the processing for a single line of left text.
% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{do@lineLhook} to \protect\cs{do@lineL}}
@@ -3889,7 +3988,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\add@apparatusL}
-% The \cs{add@apparatusL} macro add apparatus for left lines, that is both footnotes and sidenotes.
+% The \cs{add@apparatusL} macro adds apparatus for the left lines, apparatus is both footnotes and sidenotes.
% \begin{macrocode}
\newcommand{\add@apparatusL}{%
\if@firstlineofpage%
@@ -3950,7 +4049,7 @@
% The \protect\cs{do@lineR} macro is called to
% do all the processing for a single line of right text.
% \changes{v0.3.0}{2005/02/10}{Changed \protect\cs{do@lineR} similarly to \protect\cs{do@lineL}}
-% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the begining of a page, added by v1.8.0 (?).}
+% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the beginning of a page, added by v1.8.0 (?).}
% \begin{macrocode}
\newcommand*{\do@lineR}{%
\let\linenumrepL\linenumrep%
@@ -4071,7 +4170,7 @@
% \end{macro}
%
% \begin{macro}{\add@apparatusR}
-% The \cs{add@apparatusR} macro add apparatus for right lines, that is both footnotes and sidenotes.
+% The \cs{add@apparatusR} macro adds apparatus for the right lines, apparatus is both footnotes and sidenotes.
% \begin{macrocode}
\newcommand{\add@apparatusR}{%
\if@firstlineofpageR%
@@ -4220,11 +4319,23 @@
\@l@dtempcntb=\absline@numR
\ifnum\@l@dtempcntb<\next@actionlineR\else
\ifnum\next@actionR>-1001\relax
- \@firstlineofpageRtrue%
+ \unless\ifresumenumberingR@start%
+ \@firstlineofpageRtrue%
+ \fi%
\global\page@numR=\next@actionR
\ifbypage@R
- \global\line@numR \z@ \global\subline@numR \z@
+ \ifcsdef{l@dchset@num@R\the\absline@numR}%
+ {%
+ \global\csundef{l@dchset@num@R\the\absline@numR}%
+ }%
+ {%
+ \unless\ifresumenumberingR@start%
+ \global\line@numR \z@%
+ \global\subline@numR \z@%
+ \fi%
+ }%
\fi
+ \global\resumenumberingR@startfalse%
\add@msdata@firstlineofpage%
\else
\ifnum\next@actionR<-4999\relax % 9/05 added relax here
@@ -4369,11 +4480,26 @@
\ifnum\@l@dtempcntb>\@ne
\advance\@l@dtempcntb by\page@numR
\fi
- \ifodd\@l@dtempcntb
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
- \else
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
- \fi
+ \ifboolexpr{%
+ bool {l@dprintingcolumns}%
+ and (%
+ (test {\ifdefstring{\linenum@OnlyPages@ForColumnsR}{left}}%
+ and test {\ifnumodd{\page@numR}}%
+ )%
+ or%
+ (test {\ifdefstring{\linenum@OnlyPages@ForColumnsR}{right}}%
+ and not test {\ifnumodd{\page@numR}}%
+ )%
+ )%
+ }%
+ {}%
+ {%
+ \ifodd\@l@dtempcntb%
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \else%
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \fi%
+ }%
\fi
\fi
\fi
@@ -4941,7 +5067,45 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@morespace@rightnote@leftcolumn}
+% \begin{macro}{\@morespace@leftnote@rightcolumn}
+% \begin{macro}{\get@sidenote@morespace@columns}
+% If we are typesetting parallel columns, we may want a left sidenote called on the right column be put on the left of the page and not on the left of the column,
+% and a right sidenote called on the left column be put on the right of the page and not on the right of the column. We store as an option in the \cs{if@sidenotesmarginpage} boolean.
+%
+% To do it, we need to add spaces, respectively defined on \cs{@morespace@leftnote@rightcolumn} and \cs{@morespace@rightnote@leftcolumn}.
+% The \cs{get@sidenote@morespace@columns} calculate there two lengths.
+% \begin{macrocode}
+\newdimen\@morespace@leftnote@rightcolumn%
+\newdimen\@morespace@rightnote@leftcolumn%
+
+
+\newcommand{\get@sidenote@morespace@columns}{%
+% \end{macrocode}
+% The calculations are made only if \cs{if@sidenotesmarginpage} is TRUE.
+% \begin{macrocode}
+ \if@sidenotesmarginpage%
+% \end{macrocode}
+% Now, we can calculate \cs{@morespace@leftnote@rightcolumn} and \cs{@morespace@rightnote@leftcolumn}.
+% \begin{macrocode}
+ \global\@morespace@leftnote@rightcolumn=\dimexpr\intercolumns@width + \Lcolwidth\relax%
+ \global\@morespace@rightnote@leftcolumn=\dimexpr\intercolumns@width + \Rcolwidth\relax%
+% \end{macrocode}
+% If \cs{if@sidenotesmarginpage} is False
+% \begin{macrocode}
+ \else%
+ \global\@morespace@leftnote@rightcolumn=\z@%
+ \global\@morespace@rightnote@leftcolumn=\z@%
+% \end{macrocode}
+% End of \cs{get@sidenote@morespace@columns}.
+% \begin{macrocode}
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \changes{v1.3.3}{2012/12/19}{Debugging the left notes of the right column.}
% \changes{v1.3.4}{2013/07/03}{Allow use of commands in sidenotes, as introduced by eledmac 1.0.}
% \changes{v1.8.0}{2014/08/05}{\protect\cs{l@dlsnote},\protect\cs{l@drsnote} and \protect\cs{l@dcsnote} defined only one time, in \protect\package{eledmac}. }
@@ -5530,6 +5694,8 @@
\global\l@dpscL=\z@
\global\l@dpscR=\z@
\get@familiarfootnote@number%
+ \get@intercolumns@width%
+ \get@sidenote@morespace@columns%
% \end{macrocode}
% Check if there are chunks to be processed, and process them
% two by two (left and right pairs).
@@ -5658,7 +5824,157 @@
\hspace{\aftercolumnseparator}%
\fi%
}%
-%\end{macrocode}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\get@intercolumns@width}
+% \begin{macro}{\intercolumns@width}
+% The \cs{intercolumns@width} is calculated by \cs{get@intercolumns@width}.
+% This length depends of many parameters:
+% \begin{itemize}
+% \item Columns width;
+% \item columns position;
+% \item columns separator;
+% \item space between columns and columns separator, which can be fixed by user or automatically calculated by \parpackage.
+% \end{itemize}
+% This length is never used directly, but it is used to calculate some other lengths.
+% \begin{macrocode}
+\newdimen\intercolumns@width%
+\newcommand{\get@intercolumns@width}{%
+% \begin{macrocode}
+ \global\intercolumns@width=\z@%
+ \ifdefstring{\columns@position}{C}%
+% \end{macrocode}
+% First case, the columns are centered.
+% \begin{macrocode}
+ {%
+% \end{macrocode}
+% First sub-case, the width between columns is automatically calculated.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimless{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimless{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth +%
+ (\textwidth - \Lcolwidth - \Rcolwidth - \columnrulewidth)*1/2% The total of the width before and after column separator
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Second sub-case, the width between column is fully determined by user setting.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimgreater{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimgreater{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth + \beforecolumnseparator + \aftercolumnseparator%
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Third sub-case, the width before column separator is determined by user setting, but the width after column separator is automatically calculated.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimgreater{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimless{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth + \beforecolumnseparator +%
+ (\textwidth - \Lcolwidth - \Rcolwidth - \columnrulewidth - \beforecolumnseparator) * 1/3%
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Fourth and last sub-case, the width before column separator is automatically calculated, but the width after column separator is determined by user setting.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimless{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimgreater{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth + \aftercolumnseparator +%
+ (\textwidth - \Lcolwidth - \Rcolwidth - \columnrulewidth - \aftercolumnseparator) * 1/3%
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Now, we have finished with the case the columns are centered aligned.
+% \begin{macrocode}
+ }%
+% \end{macrocode}
+% Other case, the columns are left or right aligned.
+% \begin{macrocode}
+ {%
+% \end{macrocode}
+% First sub-case, the width between columns is automatically calculated.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimless{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimless{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth +%
+ (\textwidth - \Lcolwidth - \Rcolwidth - \columnrulewidth)*2/3% The total of the width before and after column separator
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Second sub-case, the width between column is fully determined by user setting.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimgreater{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimgreater{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth + \beforecolumnseparator + \aftercolumnseparator%
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Third sub-case, the width before column separator is determined by user setting, but the width after column separator is automatically calculated.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimgreater{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimless{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth + \beforecolumnseparator +%
+ (\textwidth - \Lcolwidth - \Rcolwidth - \columnrulewidth - \beforecolumnseparator) * 1/2%
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% Fourth and last sub-case, the width before column separator is automatically calculated, but the width after column separator is determined by user setting.
+% \begin{macrocode}
+ \ifboolexpr{%
+ test {\ifdimless{\beforecolumnseparator}{\z@}}%
+ and test {\ifdimgreater{\aftercolumnseparator}{\z@}}%
+ }%
+ {%
+ \global\intercolumns@width=\dimexpr%
+ \columnrulewidth + \aftercolumnseparator +%
+ (\textwidth - \Lcolwidth - \Rcolwidth - \columnrulewidth - \aftercolumnseparator) * 1/2%
+ \relax%
+ }%
+ {}%
+% \end{macrocode}
+% We have finished with the case the columns are left or right aligned.
+% \begin{macrocode}
+ }%
+% \end{macrocode}
+% End of \cs{get@intercolumns@width}.
+% \begin{macrocode}
+}%
+% \end{macrocode}
+% \end{macro}
% \end{macro}
% \begin{macro}{\print@leftcolumn}
% \begin{macro}{\print@rightcolumn}
@@ -5784,40 +6100,21 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{setwidthliketwocolumns@L}
+% \begin{macro}{setwidthliketwocolumns}
% \begin{macro}{setpositionliketwocolumns@L}
% \begin{macro}{setnotepositionliketwocolumns@L}
-% \begin{macro}{setwidthliketwocolumns@C}
% \begin{macro}{setpositionliketwocolumns@C}
% \begin{macro}{setnotepositionliketwocolumns@C}
-% \begin{macro}{setwidthliketwocolumns@R}
% \begin{macro}{setpositionliketwocolumns@R}
% \begin{macro}{setnotepositionliketwocolumns@R}
-% The \protect\cs{setwidth…} macros are called in \protect\cs{beginnumbering} in a \textbf{non-parallel}
-% typesetting context, to fix the width of the lines to be vertically aligned with parallel columns. They are also called at the beginning of a note's group, if some options are enabled.
+% The \protect\cs{setwidthliketwocolumns} macro is called in \protect\cs{beginnumbering} in a \textbf{non-parallel}
+% typesetting context, to fix the width of the lines to be vertically aligned with parallel columns. It is also called at the beginning of a note's group, if some options are enabled.
% The \protect\cs{setposition…} macros are called in \protect\cs{beginnumbering} in a \textbf{non- parallel} typesetting context to fix the position of the lines.
% The \protect\cs{setnoteposition…} macros are called in \protect\cs{xxxfootstart} in a \textbf{non- parallel} typesetting context to fix the position of notes block.
% \begin{macrocode}
-\newcommand{\setwidthliketwocolumns@L}{%
-% Temporary dimension, initially equal to the standard hsize, i.e. text width
-% \begin{macrocode}
- \newdimen\temp%
- \temp=\hsize%
-% \end{macrocode}
-% Hsize : Left + Right width
-% \begin{macrocode}
- \hsize=\Lcolwidth%
- \advance\hsize\Rcolwidth%
-% \end{macrocode}
-% Now, calculating the remaining space
-% \begin{macrocode}
- \advance\temp-\hsize%
-% \end{macrocode}
-% And multiply the hsize by 2/3 of this space
-% \begin{macrocode}
- \multiply\temp by 2%
- \divide\temp by 3%
- \advance\hsize\temp%
+\newcommand{\setwidthliketwocolumns}{%
+ \get@intercolumns@width%As \columns is not necessary called before \setwidthliketwocolumns
+ \hsize=\dimexpr \Lcolwidth + \intercolumns@width + \Rcolwidth \relax%
}%
\newcommand{\setpositionliketwocolumns@L}{%
@@ -5827,31 +6124,6 @@
\newcommand{\setnotespositionliketwocolumns@L}{%
}%
-
-% \end{macrocode}
-% \begin{macrocode}
-\newcommand{\setwidthliketwocolumns@C}{%
-% Temporary dimension, initially equal to the standard hsize, i.e. text width
-% \end{macrocode}
-% \begin{macrocode}
- \newdimen\temp%
- \temp=\hsize%
-% Hsize : Left + Right width
-% \end{macrocode}
-% \begin{macrocode}
- \hsize=\Lcolwidth%
- \advance\hsize\Rcolwidth%
-% Now, calculating the remaining space
-% \end{macrocode}
-% \begin{macrocode}
- \advance\temp-\hsize%
-% \end{macrocode}
-% And multiply the hsize by 1/2 of this space
-% \begin{macrocode}
- \divide\temp by 2%
- \advance\hsize\temp%
-}%
-
\newcommand{\setpositionliketwocolumns@C}{%
\doinsidelinehook{\hfill}%
\renewcommand{\ledrlfill}{\hfill}%
@@ -5869,45 +6141,9 @@
\rightskip=-\temp%
}%
-\newcommand{\setwidthliketwocolumns@R}{%
-% \end{macrocode}
-% Temporary dimension, initially equal to the standard hsize, i.e. text width
-% \begin{macrocode}
- \newdimen\temp%
- \temp=\hsize%
-% \end{macrocode}
-% Hsize : Left + Right width
-% \begin{macrocode}
- \hsize=\Lcolwidth%
- \advance\hsize\Rcolwidth%
-% \end{macrocode}
-% Now, calculating the remaining space
-% \begin{macrocode}
- \advance\temp-\hsize%
-% \end{macrocode}
-% And multiply the hsize by 2/3 of this space
-% \begin{macrocode}
- \multiply\temp by 2%
- \divide\temp by 3%
- \advance\hsize\temp%
-}%
-
\newcommand{\setpositionliketwocolumns@R}{%
\doinsidelinehook{\hfill}%
}%
-
-\newcommand{\setnotespositionliketwocolumns@R}{%
- \newdimen\temp%
- \newdimen\tempa%
- \temp=\hsize%
- \tempa=\Lcolwidth%
- \advance\tempa\Rcolwidth%
- \advance\temp-\tempa%
- \divide\temp by 2%
- \leftskip=\temp%
- \rightskip=-\temp%
-}%
-
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5916,8 +6152,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\Columns@print@before@pstart}
% \begin{macro}{\Columns@print@after@pend}
@@ -6044,8 +6278,8 @@
% \end{macrocode}
% As \protect\cs{Pages} must be called outside of the pages environment, we have to redefine the \protect\cs{Lcolwidth} and \protect\cs{Rcolwidth} lengths, to prevent false overfull hboxes.
% \changes{v1.13.0}{2015/03/06}{Prevent false overfull hboxes when using \protect\cs{Pages} outside of pages environment.}
-% \changes{v2.3.0}{2015/09/05}{Fix bug when calling \protect\cs{Columns} after a \protect\cs{Pages} (bug added in v1.13.0).}
-% \changes{v2.17.2}{2017/04/06}{Fix bug when changing \protect\cs{Lcolwitdth} and \protect\cs{Rcolwitdth} in \protect\env{pages} environment.}
+% \changes{v2.3.0}{2015/09/05}{Fix a bug when calling \protect\cs{Columns} after a \protect\cs{Pages} (bug added in v1.13.0).}
+% \changes{v2.17.2}{2017/04/06}{Fix a bug when changing \protect\cs{Lcolwitdth} and \protect\cs{Rcolwitdth} in \protect\env{pages} environment.}
% \begin{macrocode}
\setlength{\Lcolwidth}{\Lcolwidth@pages}%
\setlength{\Rcolwidth}{\Rcolwidth@pages}%
@@ -6389,7 +6623,7 @@
% Struts inserted into leftand right text lines.
% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{ledtrutL} and \protect\cs{ledstrutR}}
% \changes{v2.4.0}{2015/09/29}{Deleted \protect\cs{ledtrutL} and \protect\cs{ledstrutR}}
-% \changes{v2.4.0}{2015/09/29}{Fix bug with dotted letter}
+% \changes{v2.4.0}{2015/09/29}{Fix a bug with dotted letter}
% \begin{macrocode}
\newcommand*{\ledstrutL}{}
\newcommand*{\ledstrutR}{}