diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/ledmac/ledmac.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/ledmac/ledmac.dtx | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/ledmac/ledmac.dtx b/Master/texmf-dist/source/latex/ledmac/ledmac.dtx index a01c2b301ef..229f1f57553 100644 --- a/Master/texmf-dist/source/latex/ledmac/ledmac.dtx +++ b/Master/texmf-dist/source/latex/ledmac/ledmac.dtx @@ -50,7 +50,7 @@ % % \fi % -% \CheckSum{9157} +% \CheckSum{9200} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters @@ -137,6 +137,7 @@ % \def\fileversion{v0.12.1} \def\filedate{2011/10/02} % \def\fileversion{v0.13} \def\filedate{2011/11/08} % \def\fileversion{v0.13.1} \def\filedate{2011/11/18} +% \def\fileversion{v0.14} \def\filedate{2012/04/04} % \changes{v0.1}{2003/03/25}{First public release} % \changes{v0.2}{2003/08/16}{Added tabmac code, and extended indexing} % \changes{v0.2.1}{2003/09/13}{Bug fixes and match with mempatch v1.8} @@ -169,6 +170,7 @@ % \changes{v0.12.1}{2011/10/02}{Don't number \cs{pstarts} of stanza.} %\changes{v0.13}{2011/11/08}{New stanzaindentsrepetition counter to repeat stanza indents every \emph{n} verses.} % \changes{v0.13.1}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and make conflicts with memoir class.} +% \changes{v0.14}{2012/04/04}{Tweaked \cs{edlabel} to get correct line number if the command is first element of a paragraph.} % \hyphenation{man-u-script man-u-scripts} % % \newcommand{\Lpack}[1]{\textsf{#1}} @@ -278,7 +280,7 @@ % \Lpack{poemscol} for poetical works. % \end{PW} % -% To report bugs, please go to ledmac's GitHub page and click "New Issue": \url{lhttps://github.com/maieul/ledmac/issues/}. You must open an account with github.com to access my page (maieul/ledmac). GitHub accounts are free for open-source users. +% To report bugs, please go to ledmac's GitHub page and click "New Issue": \url{https://github.com/maieul/ledmac/issues/}. You must open an account with github.com to access my page (maieul/ledmac). GitHub accounts are free for open-source users. % \end{abstract} % % \tableofcontents @@ -2972,7 +2974,7 @@ % \begin{macrocode} %<*code> \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] % \end{macrocode} % @@ -8440,6 +8442,7 @@ % \end{PW} % % \changes{v0.2.1}{2003/08/26}{Tweaked \cs{edlabel} to get correct page numbers} +% \changes{v0.14}{2012/04/04}{Tweaked \cs{edlabel} to get correct line number if the command is first element of a paragraph.} % \begin{macrocode} \newcommand*{\edlabel}[1]{\@bsphack \write\linenum@out{\string\@lab}% @@ -8447,6 +8450,9 @@ \xdef\label@refs{\zz@@@}% \else \gl@p\labelref@list\to\label@refs + \ifvmode + \advancelabel@refs + \fi \fi % \edef\next{\write\@aux{\string\l@dmake@labels\label@refs|{#1}}}% % \next} @@ -8464,6 +8470,32 @@ % \end{macrocode} % \end{macro} % +% +%\begin{macro}{\advancelabel@refs} +%\begin{macro}{\labelrefsparseline} +%\begin{macro}{\labelrefsparsesubline} +% \begin{macrocode} +% In case which \cs{edlabel} is the first in a paragraph, we have a problem, because line's number changes only at first horizontal box of the paragraph. And so, we need test in \cs{edlable} if we are at the top of paragraph, with \cs{ifvmode}. If true, we need advance of on unity text that we write in .aux file. We do it with \cs{advancelabel@refs} command. +\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} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} % \begin{macro}{\l@dmake@labels} % The \cs{l@dmake@labels} macro gets executed when the labels file is % read. For each label it defines a macro, whose name is made up |