From bdcb6ceed3b857a10b23bd190103a34e57b51289 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 5 Apr 2012 23:47:32 +0000
Subject: ledmac (5apr12)

git-svn-id: svn://tug.org/texlive/trunk@25861 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/ledmac/ledmac.sty | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

(limited to 'Master/texmf-dist/tex/latex/ledmac/ledmac.sty')

diff --git a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
index 8ddf7c31b27..3a9c19cc5fb 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/11/18 v0.13.1 LaTeX port of EDMAC]
+\ProvidesPackage{ledmac}[2012/04/04 v0.14 LaTeX port of EDMAC]
 
 \newif\ifledfinal
 \DeclareOption{final}{\ledfinaltrue}
@@ -1703,11 +1703,30 @@
     \xdef\label@refs{\zz@@@}%
   \else
     \gl@p\labelref@list\to\label@refs
+  \ifvmode
+   \advancelabel@refs
+  \fi
   \fi
   \protected@write\@auxout{}%
     {\string\l@dmake@labels\space\thepage|\label@refs|{#1}}%
   \@esphack}
 
+\newcommand{\advancelabel@refs}{%
+\newcount\line%
+\ledmac@warning{\label@refs}
+\line=\expandafter\labelrefsparseline\label@refs%
+\advance\line by 1%
+\ifsublines@%
+\newcount\subline%
+\subline=\labelrefsparsesubline\label@refs%
+\advance\subline by 1%
+\def\label@refs{\the\line|\the\subline}%
+\else%
+\def\label@refs{\the\line|0}%
+\fi%
+}
+\def\labelrefsparseline#1|#2{#1}
+\def\labelrefsparsesubline#1|#2{#2}
 \newcommand*{\l@dmake@labels}{}
 \def\l@dmake@labels#1|#2|#3|#4{%
   \expandafter\ifx\csname the@label#4\endcsname \relax\else
-- 
cgit v1.2.3

