summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-08-16 22:39:07 +0000
committerKarl Berry <karl@freefriends.org>2012-08-16 22:39:07 +0000
commit22c251adda514ed7b453066de05b2f89707d0fe6 (patch)
treec2676b88be564a83e2223682be307b93a7512700 /Master/texmf-dist/source/latex/ledmac/ledpar.dtx
parentba17420abc332aeb0656fc73507e29fa48e1ee96 (diff)
ledmac (16aug12)
git-svn-id: svn://tug.org/texlive/trunk@27426 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/ledmac/ledpar.dtx')
-rw-r--r--Master/texmf-dist/source/latex/ledmac/ledpar.dtx53
1 files changed, 38 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/latex/ledmac/ledpar.dtx b/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
index bae3e9fb942..4017277191d 100644
--- a/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
+++ b/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
@@ -50,7 +50,7 @@
%
% \fi
%
-% \CheckSum{4813}
+% \CheckSum{4815}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -60,7 +60,6 @@
% \SpecialItIndex{#1}\@esphack\ignorespaces}
% \newcommand*{\SpecialItIndex}[1]{\@bsphack
% \index{#1\actualchar{\protect\ttfamily#1}\encapchar usage}\@esphack}
-%
% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
% \DoNotIndex{\@flushglue,\@input}
% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
@@ -133,6 +132,7 @@
% \def\fileversion{v0.9.3}\def\filedate{2011/11/18}
% \def\fileversion{v0.10}\def\filedate{2012/04/04}
% \def\fileversion{v0.11}\def\filedate{2012/06/11}
+% \def\fileversion{v0.12}\def\filedate{2012/08/03}
% \changes{v0.1}{2004/12/10}{First public release}
% \changes{v0.2}{2005/01/01}{Fix babel problems}
% \changes{v0.3}{2005/03/24}{Reorganize for ledarab}
@@ -706,7 +706,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledpar}[2012/06/11 v0.11 ledmac extension for parallel texts]
+\ProvidesPackage{ledpar}[2012/08/03 v0.12 ledmac extension for parallel texts]
% \end{macrocode}
% With the option `shiftedverses' a long verse one the left side (or in the right side) don't make a blank on the corresponding verse, but the blank is put on the bottom of the page. Consequently, the verses on the parallel pages are shifted, but the shifted stop at every end of pages.
@@ -2503,6 +2503,7 @@
to\baselineskip}%
\unvbox\one@line \global\setbox\one@line=\lastbox
\getline@numL
+\ifnum\@lock>\@ne\inserthangingsymboltrue\else\inserthangingsymbolfalse\fi
\setbox\l@dleftbox
\hb@xt@ \Lcolwidth{%
\affixpstart@numL
@@ -2514,7 +2515,6 @@
{\ledllfill\hb@xt@ \wd\one@line{\inserthangingsymbolL\new@line\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
\l@drsn@te
}}%
- \prevline@num=\line@num%
\add@penaltiesL
\global\advance\@donereallinesL\@ne
\global\advance\@donetotallinesL\@ne
@@ -2555,6 +2555,7 @@
to\baselineskip}%
\unvbox\one@lineR \global\setbox\one@lineR=\lastbox
\getline@numR
+\ifnum\@lockR>\@ne\inserthangingsymbolRtrue\else\inserthangingsymbolRfalse\fi
\setbox\l@drightbox
\hb@xt@ \Rcolwidth{%
\affixpstart@numR
@@ -2566,7 +2567,6 @@
{\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
\l@drsn@te
}}%
- \prevline@numR=\line@numR%
\add@penaltiesR
\global\advance\@donereallinesR\@ne
\global\advance\@donetotallinesR\@ne
@@ -3574,28 +3574,51 @@
% \section{Verse}
%\changes{v0.11}{2012/06/11}{New management of hangingsymbol insertion, preventing undesirable insertions.}
-% Like in ledmac, the insertion of hangingsymbol is base on a control of the change of line's numbers. But we need different macros for left and right sides.
-% \begin{macro}{\prevline@numR}
+%\changes{v0.12}{2012/08/03}{New new management of hangingsymbol insertion, preventing undesirable insertions.}
+% Like in ledmac, the insertion of hangingsymbol is base on \cs{ifinserthangingsymbol}, and, for the right side, on \cs{ifinserthangingsymbolR}.
% \begin{macro}{\inserthangingsymbolL}
% \begin{macro}{\inserthangingsymbolR}
% \begin{macrocode}
-\newcount\prevline@numR
-\newcommand{\inserthangingsymbolL}{\ifinstanzaL\ifnum\line@num=\prevline@num\hfill\hangingsymbol\fi\fi}
-\newcommand{\inserthangingsymbolR}{\ifinstanzaR\ifnum\line@numR=\prevline@numR\hfill\hangingsymbol\fi\fi}
+\newif\ifinserthangingsymbolR
+\newcommand{\inserthangingsymbolL}{%
+\ifinserthangingsymbol%
+ \ifinstanzaL%
+ \hfill\hangingsymbol%
+ \fi%
+\fi}
+\newcommand{\inserthangingsymbolR}{%
+\ifinserthangingsymbolR%
+ \ifinstanzaR%
+ \hfill\hangingsymbol%
+ \fi%
+\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
%\changes{v0.11}{2012/06/11}{Prevent shift of column separator when a verse is hanged}
% When a verse is hanged, the column separator is shifted. To prevent it, the \cs{do@lineL} and \cs{do@lineR} commands call \cs{correcthangingL} and \cs{correcthangingR} commands. These commands insert horizontal skip which length is equal to the hang indent.
% \begin{macro}{\correcthangingL}
% \begin{macro}{\correcthangingR}
% \begin{macrocode}
-\newcommand{\correcthangingL}{\ifl@dpaging\else\ifinstanzaL\ifnum\line@num=\prevline@num\hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase\fi\fi\fi}
+\newcommand{\correcthangingL}{%
+\ifl@dpaging\else%
+ \ifinstanzaL%
+ \ifinserthangingsymbol%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
+ \fi%
+ \fi%
+\fi}
-\newcommand{\correcthangingR}{\ifl@dpaging\else\ifinstanzaR\ifnum\line@numR=\prevline@numR\hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase\fi\fi\fi}
+\newcommand{\correcthangingR}{%
+\ifl@dpaging\else%
+ \ifinstanzaR%
+ \ifinserthangingsymbolR%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
+ \fi%
+ \fi%
+\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}