summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-17 22:59:04 +0000
committerKarl Berry <karl@freefriends.org>2011-09-17 22:59:04 +0000
commitae2491a03dcd2036d8879409d6fe624854f27e3f (patch)
treecc0d7a0656462040d39f116cabb0af7897ce8822 /Master/texmf-dist/tex/latex/ledmac
parent1660ead686e1adf91f9eb96d0fe3010b137136f4 (diff)
ledmac (17sep11)
git-svn-id: svn://tug.org/texlive/trunk@23993 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ledmac')
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledmac.sty45
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledpar.sty36
2 files changed, 71 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
index 181f0c99acf..c9858377d35 100644
--- a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
+++ b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
@@ -23,7 +23,7 @@
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledmac}[2011/08/22 v0.10 LaTeX port of EDMAC]
+\ProvidesPackage{ledmac}[2011/09/16 v0.11 LaTeX port of EDMAC]
\newif\ifledfinal
\DeclareOption{final}{\ledfinaltrue}
@@ -730,6 +730,7 @@
\newbox\one@line
\newcount\par@line
\newcommand*{\pstart}{
+\managehangingsymbol
\if@nobreak
\let\@oldnobreak\@nobreaktrue
\else
@@ -1878,9 +1879,9 @@
\newcommand*{\ledlsnotefontsetup}{\raggedleft\footnotesize}
\newcommand*{\ledrsnotefontsetup}{\raggedright\footnotesize}
-\newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}}
-\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}}
-\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}}
+\newcommand*{\ledleftnote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@dlsnote{#1}}}
+\newcommand*{\ledrightnote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@drsnote{#1}}}
+\newcommand*{\ledsidenote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@dcsnote{#1}}}
\newif\ifrightnoteup
\rightnoteuptrue
@@ -2552,6 +2553,34 @@
\processl@denvbody % A little tricky! Note the grouping
}
+\newcommand*{\hangingsymbol}{}
+\newcounter{hbox}
+\newcounter{hboxmodulo}
+\newif\ifhangingsymbol
+\hangingsymbolfalse
+\newif\ifinstanza
+\instanzafalse
+\newcommand{\managehangingsymbol}{\ifinstanza%
+ \setcounter{hbox}{0}%
+ \setcounter{hboxmodulo}{0}%
+ \everyhbox{%
+\ifnum \value{hbox}>2%
+ \addtocounter{hboxmodulo}{1}%
+ \ifnum \value{hboxmodulo}=2
+ \ifhangingsymbol%
+ \hangingsymbol%
+ \hangingsymbolfalse%
+ \else%
+ \hangingsymboltrue%
+ \fi%
+ \setcounter{hboxmodulo}{0}%
+ \fi%
+\else%
+\addtocounter{hbox}{1}%
+\fi%
+}
+\fi}
+
\newcommand*{\ampersand}{\char`\&}
\chardef\body=\catcode`\@
@@ -2576,7 +2605,8 @@
\newcommand*{\setstanzaindents}[1]{\setstanzavalues{sza}{#1}}
\newcommand*{\setstanzapenalties}[1]{\setstanzavalues{szp}{#1}}
-\def\stanza@line{\parindent=\csname sza@\number\stanza@count
+\def\stanza@line{
+\parindent=\csname sza@\number\stanza@count
@\endcsname\stanzaindentbase
\pstart\stanza@hang\ignorespaces}
\xdef\stanza@hang{\noexpand\leavevmode\noexpand\startlock
@@ -2589,7 +2619,8 @@
\let\startstanzahook\relax
\let\endstanzaextra\relax
-\xdef\stanza{\begingroup\startstanzahook%
+\xdef\stanza{\noexpand\instanzatrue\expandafter
+ \begingroup\startstanzahook%
\catcode`\&\active\global\stanza@count\@ne
\noexpand\ifnum\expandafter\noexpand
\csname sza@0@\endcsname=\z@\let\noexpand\stanza@hang\relax
@@ -2599,7 +2630,7 @@
\let\noexpand\sza@penalty\relax\noexpand\fi \def\noexpand&{%
\noexpand\endlock\noexpand\pend\noexpand\sza@penalty\global
\advance\stanza@count\@ne\noexpand\stanza@line}\def\noexpand
- \&{\noexpand\endlock\noexpand\pend\endgroup\endstanzaextra}%
+ \&{\noexpand\endlock\noexpand\pend\endgroup\noexpand\instanzafalse\expandafter\endstanzaextra}%
\noexpand\stanza@line}
\newcommand*{\flagstanza}[2][\stanzaindentbase]{%
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledpar.sty b/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
index 7c90f0b2415..68b27b70d4b 100644
--- a/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
+++ b/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
@@ -24,7 +24,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledpar}[2011/08/31 v0.7 ledmac extension for parallel texts]
+\ProvidesPackage{ledpar}[2011/09/16 v0.8 ledmac extension for parallel texts]
\newif\ifshiftedverses
\shiftedversesfalse
@@ -706,7 +706,7 @@
\fi
\fi}
-\newenvironment{pairs}{%
+\newenvironment{pairs}{%}
\l@dpairingtrue
\l@dpagingfalse
}{%
@@ -858,6 +858,7 @@
\newcount\@donetotallinesR
\newcommand*{\do@lineL}{%
+ \manageparhangingsymbol
\advance\countLline \@ne
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
{\vbadness=10000
@@ -867,7 +868,7 @@
\global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}
to\baselineskip}%
\unvbox\one@line \global\setbox\one@line=\lastbox
- \getline@num
+ \getline@numL
\setbox\l@dleftbox
\hb@xt@ \Lcolwidth{%
\affixline@num
@@ -890,6 +891,7 @@
\newcommand*{\do@lineRhook}{}
\newcommand*{\do@lineR}{%
+\manageparhangingsymbol
\advance\countRline \@ne
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
{\vbadness=10000
@@ -928,10 +930,26 @@
\fi
\else
\ifnum\@lockR<\tw@
+\addtocounter{hbox}{10}%
\global\advance\line@numR \@ne
\global\subline@numR \z@
\fi
\fi}
+\newcommand*{\getline@numL}{%
+ \global\advance\absline@num \@ne
+ \do@actions
+ \do@ballast
+ \ifsublines@
+ \ifnum\sub@lock<\tw@
+ \global\advance\subline@num \@ne
+ \fi
+ \else
+ \ifnum\@lock<\tw@
+ \global\advance\line@num \@ne
+ \addtocounter{hbox}{10}%
+ \global\subline@num \z@
+ \fi
+ \fi}
\newcommand*{\do@ballastR}{\global\ballast@count=\z@
\begingroup
@@ -1438,6 +1456,15 @@
\fi
\fi\ignorespaces}
+
+
+\newcommand{\manageparhangingsymbol}{%
+ \setcounter{hbox}{0}%
+ \everyhbox{%
+ \ifnum \value{hbox}=-2%
+ \hangingsymbol%
+ \fi%
+ \addtocounter{hbox}{-1}}}
\chardef\next=\catcode`\&
\catcode`\&=\active
@@ -1728,6 +1755,7 @@
\do@lineL
\advance\numpagelinesL \@ne
\ifshiftedverses
+\addtocounter{hbox}{-1}
\ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi%
\else
\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
@@ -1748,6 +1776,7 @@
\do@lineR
\advance\numpagelinesR \@ne
\ifshiftedverses
+\addtocounter{hbox}{-1}
\ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
\else
\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
@@ -1778,6 +1807,7 @@
\global\l@dpscR=\z@
\global\l@dnumpstartsL=\z@
\global\l@dnumpstartsR=\z@
+
\ignorespaces}
\newcommand*{\ledstrutL}{\strut}