texlive[45760] Master/texmf-dist: reledmac (12nov17)

commits+karl at tug.org commits+karl at tug.org
Sun Nov 12 23:22:03 CET 2017


Revision: 45760
          http://tug.org/svn/texlive?view=revision&revision=45760
Author:   karl
Date:     2017-11-12 23:22:03 +0100 (Sun, 12 Nov 2017)
Log Message:
-----------
reledmac (12nov17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/reledmac/README
    trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
    trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx
    trunk/Master/texmf-dist/doc/latex/reledmac/doc-more/page-typesetting-columns.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.tex
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.tex
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-glossaries.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-linespacing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-manuscript-apparatus.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-notes-width.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-reledmac-right-to-left.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.tex
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.tex
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_inside-outside-columns.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/migration.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
    trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
    trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
    trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
    trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.tex

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/README	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/README	2017-11-12 22:22:03 UTC (rev 45760)
@@ -88,9 +88,9 @@
 
 -   [Users list](http://geekographie.maieul.net/146)
 -   [StackExchange](https://tex.stackexchange.com/questions/tagged/reledmac),
-    see also the older tags
-    (https://tex.stackexchange.com/questions/tagged/eledmac) and
-    (https://tex.stackexchange.com/questions/tagged/ledmac)
+    see also the older
+    tags (https://tex.stackexchange.com/questions/tagged/eledmac)
+    and (https://tex.stackexchange.com/questions/tagged/ledmac)
 
 Debug and feature requests
 ==========================
@@ -102,8 +102,8 @@
 
 -   Go to the [issues page](https://github.com/maieul/ledmac/issues).
 -   Open *one issue for each problem*, even if problems are similar.
--   You can write in English, or better in French if it is your native
-    language.
+-   You can write in English, or better in French if it is your
+    native language.
 -   Add a [minimal working
     example](http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl).
 -   If your report is really a bug, Maïeul Rouquette will open a

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx	2017-11-12 22:22:03 UTC (rev 45760)
@@ -419,6 +419,8 @@
 %    unafraid}{\Afootnote{\edindex{elephant}Of the mouse, that is.}}
 % \end{verbatim}
 % \subsection{Migration to \reledmac~2.24.0}
-% When using \cs{labelpstarttrue}, a spurious space\footnote{See \url{https://github.com/maieul/ledmac/issues/673\#issuecomment-322457149} for an example.} was added after the pstart number (only on normal typesetting, not on parallel typesetting).
-% The new version of the package delete this spurious space.
+% When using \cs{labelpstarttrue}, a spurious space\footnote{See \url{https://github.com/maieul/ledmac/issues/673\#issuecomment-322457149} for an example.} was introduced after the pstart number (only for normal typesetting, not while typesetting in parallel).
+% The new version of the package has deleted this spurious space.
 % If you consider that it was NOT a spurious space, you should add it manually in your definition of \cs{thepstart}.
+% \subsection{Migration to \reledmac 2.26.0}
+% You must delete your \verb+.aux+ file after having upgraded to this new version of \reledmac.

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-par.dtx	2017-11-12 22:22:03 UTC (rev 45760)
@@ -83,7 +83,7 @@
 %
 % Please contact us if that causes problems.
 % \subsection{Migration to \reledpar~v.~2.17.2}
-% If you change the \cs{Lcolwidth} and \cs{Rcolwidth} length inside the \env{pages} environment, the contents were aligned to right.
-% Now, it is aligned to left.
-% Please contact us if you need to keep the older behavior.
+% When changing the \cs{Lcolwidth} and \cs{Rcolwidth} length within an \env{pages} environment, the contents were aligned to the right.
+% Now, they are aligned to the left.
+% Please contact us if you need to retain the older behaviour.
  

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/doc-more/page-typesetting-columns.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.tex	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.tex	2017-11-12 22:22:03 UTC (rev 45760)
@@ -13,9 +13,9 @@
 \title{Critical endnotes}
 \maketitle
 \begin{abstract}
-This file provides examples of critical endnotes with reledmac. 
-A critical note is associated to a lemma, marked by \verb+\edtext+, and referenced by the line and page numbers of the lemma.
-If a critical notes refers to a long lemma, we can use \verb+lemma+ to obtain an abbreviated form.
+This file provides examples of critical endnote usage with reledmac. 
+A critical note is associated with a lemma by marking it with \verb+\edtext+ and referenced by the line and page numbers of the lemma.
+When a critical note refers to a long lemma, we can use \verb+\lemma+ to produce an abbreviated form.
 
 Here we use two series of critical notes. 
 \begin{itemize}
@@ -33,12 +33,12 @@
   \Aendnote{Critical note in series A}
   \Bendnote{loram}}
 \edtext{ipsum}{
-  \Aendnote{An other critical note}
-  \Bendnote{Other critical note in series A}}
+  \Aendnote{Another critical note}
+  \Bendnote{Other critical note in series B}}
  dolor sit amet, consectetur adipiscing elit. 
  \edtext{Fusce sed dolor libero. Aenean rutrum vestibulum lacus ut pretium. Fusce et auctor lectus. Ut et commodo quam, quis gravida orci. Nullam at risus elementum, suscipit enim a, pellentesque mi}
  {\lemma{Fusce\ldots mi}
- \Aendnote{A long critical note}
+ \Aendnote{Critical note pertaining to a long lemma}
  \Bendnote{omit}}. 
 Morbi \edtext{commodo}{\Bendnote{quommodo}}, ligula vel consectetur accumsan, massa metus egestas velit, eu fringilla leo ante in turpis. \edtext{Vivamus}{\Bendnote{Vivit}} ut tellus sollicitudin, facilisis ipsum sit amet, tincidunt odio. Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis.
 \pend
@@ -51,4 +51,4 @@
 \doendnotes{B}
 
 
-\end{document}
\ No newline at end of file
+\end{document}

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf	2017-11-12 22:22:03 UTC (rev 45760)

Property changes on: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.tex	2017-11-12 22:22:03 UTC (rev 45760)
@@ -0,0 +1,50 @@
+\documentclass{article}
+\usepackage{polyglossia,fontspec}
+\usepackage{libertineotf}
+\setmainlanguage{latin}
+\setotherlanguage{english}
+
+\usepackage[series={A,B},noend,noeledsec,noledgroup]{reledmac}
+\sethangingsymbol{[\,}
+\firstlinenum{1}
+\linenumincrement{1}
+\setcounter{stanzaindentsrepetition}{0}
+\setstanzaindents{8,0,0}
+\setcounter{stanzaindentsrepetition}{1}
+
+\begin{document}
+\begin{english}
+\date{}
+
+\title{Stanza with double line numbering}
+\maketitle
+
+\begin{abstract}
+This file provides an example of typesetting verse with reledmac using a double line numbering system. 
+
+The new edition adds a starting line of verse not present in the previous one, so we need to make an addition within the margin and textsuperscript the numbering from the older edition. In the centre, we split what was in the first edition one line of verse into two.
+
+
+
+To mark the old numbering, we use \verb+\linenumannotation+. For maximum clarity, all line numbers are shown thanks to the settings of \verb+\firstlinenum+ and \verb+\linenumincrement+ in the preamble.
+
+\end{abstract}
+\end{english}
+
+\beginnumbering
+
+\stanza
+\edlabel{begin:1}\edtext{Lorem}{\lemma{Lorem\ldots nisis}\xxref{begin:1}{end:1}\Afootnote{A note on four lines of verse, the first of which was missing in the first edition}} ipsum dolor sit amet, consectetur adipisicing elit,&
+\linenumannotation{1}sed do eiusmod tempor incididunt ut labore et dolore&
+\linenumannotation{2}magna aliqua. Ut enim ad minim veniam, quis nostrud&
+\linenumannotation{3}exercitation ullamco laboris nisi\edlabel{end:1}&
+\linenumannotation{4}\edtext{ut aliquip}{\Afootnote{ut aliliquip}} consequat ut aliquip consequat irure dolor in reprehenderit irure dolor in reprehenderit&
+\linenumannotation{5}\edtext{Duis aute}{\Bfootnote{Some comments}} irure dolor in reprehenderit&
+\linenumannotation{6}\edlabel{begin:2}\edtext{in}{\xxref{begin:2}{end:2}\lemma{in\ldots deserunt}\Afootnote{Theses two lines of verse were one single line in the first edition}} voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat&
+\linenumannotation{6}cupidatat non proident, sunt in culpa qui officia deserunt\edlabel{end:2}&
+\linenumannotation{7}\edlabel{begin:3}\edtext{Duis}{\xxref{begin:3}{end:3}\lemma{Duis\ldots occaecat}\Afootnote{Another note on two verses}} aute irure dolor in reprehenderit&
+\linenumannotation{8}in voluptate velit esse cillum dolore eu fugiat nulla&
+\linenumannotation{9}pariatur. Excepteur sint occaecat\edlabel{end:3}\&
+\endnumbering
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.tex	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.tex	2017-11-12 22:22:03 UTC (rev 45760)
@@ -16,12 +16,12 @@
 \maketitle
 
 \begin{abstract}
-This file provides an example of verse's typesetting with reledmac. 
+This file provides an example of typesetting verse with reledmac. 
 
-The odd verses are not indented, the even are indented. When a verse is too long, the end is printed after a long indentation, and a left bracket is inserted (\verb+\sethangingsymbol+).
+The odd numbered verses are not indented, the even ones are. When a verse is too long for a line, the continuation is printed after a long indentation and a left bracket is inserted (\verb+\sethangingsymbol+).
 Two levels of critical footnotes are used.
 
-We also add example of notes overlapping two lines of verse, using \verb+xxref+ and \verb+lemma+.
+We also have an example of notes overlapping two lines of verse, using \verb+xxref+ and \verb+lemma+.
 \end{abstract}
 \end{english}
 
@@ -37,7 +37,7 @@
 \edtext{Duis aute}{\Bfootnote{Some comments}} irure dolor in reprehenderit&
 in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat&
 cupidatat non proident, sunt in culpa qui officia deserunt&
-\edlabel{begin:2}\edtext{Duis}{\xxref{begin:2}{end:2}\lemma{Duis\ldots occaecat}\Afootnote{A other note on two verses}} aute irure dolor in reprehenderit&
+\edlabel{begin:2}\edtext{Duis}{\xxref{begin:2}{end:2}\lemma{Duis\ldots occaecat}\Afootnote{Another note on two verses}} aute irure dolor in reprehenderit&
 in voluptate velit esse cillum dolore eu fugiat nulla&
 pariatur. Excepteur sint occaecat\edlabel{end:2}\&
 \endnumbering

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-glossaries.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-linespacing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-manuscript-apparatus.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-notes-width.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-reledmac-right-to-left.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.tex	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.tex	2017-11-12 22:22:03 UTC (rev 45760)
@@ -1,7 +1,5 @@
 \documentclass{book}
 \usepackage[a4paper]{geometry}
-\usepackage{fontspec}
-\setmainfont[Ligatures=TeX]{Linux Libertine O}
 \usepackage{hyperref}
 \usepackage{polyglossia}
 \newcommand{\LuaLaTeX}{Lua\LaTeX}
@@ -12,12 +10,10 @@
 \firstlinenum*{1}
 \setlength{\Lcolwidth}{0.48\textwidth}
 \setlength{\Rcolwidth}{0.48\textwidth} 
-
+\usepackage{libertine}
 \setmainlanguage{english}
 \setotherlanguage{russian}
 \setotherlanguage{hebrew}    
-\newfontfamily\hebrewfont[Script=Hebrew]{Linux Libertine O}
-\newfontfamily\russianfont[Script=Cyrillic]{Linux Libertine O}    
 
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.tex	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.tex	2017-11-12 22:22:03 UTC (rev 45760)
@@ -4,7 +4,7 @@
 \usepackage{reledpar,metalogo,hyperref}
 \setlength{\parindent}{0pt}
 
-\newfontfamily\syriacfont[Script=Syriac,Scale=1.2]{estre.otf}
+\newfontfamily\syriacfont[Script=Syriac,Scale=1.2]{estre.ttf}
 
 \newcommand{\textsyriac}[1] % Syriac inside LTR
            {\bgroup\textdir TRT\syriacfont #1\egroup}
@@ -58,4 +58,4 @@
 
 \end{pages} 
 \Pages
-\end{document}
\ No newline at end of file
+\end{document}

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_inside-outside-columns.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/migration.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2017-11-12 22:22:03 UTC (rev 45760)
@@ -490,7 +490,9 @@
 % \changes{v2.24.0}{2017/08/17}{Fix spurious space with \protect\cs{labelpstarttrue}}
 % \changes{v2.24.1}{2017/08/31}{Compatibility with \protect\parpackage 2.20.2}
 % \changes{v2.24.2}{2017/10/21}{Fix bug between tabular environments and endnotes}
-%% \changes{v2.25.0}{2017/11/05}{Add \protect\cs{Xendtxtbeforenotes} hook}
+% \changes{v2.25.0}{2017/11/05}{Add \protect\cs{Xendtxtbeforenotes} hook}
+% \changes{v2.26.0}{2017/11/11}{Fix bug in \protect\cs{xpstartref}}
+% \changes{v2.26.0}{2017/11/11}{Add a mechanism for annotation of stanza line numbering}
 %      Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
 % has version number \fileversion, last revised \filedate.}}
 %
@@ -1799,7 +1801,7 @@
 % comments and questions as well as error reports are very welcome at
 % \url{https://github.com/stenskjaer/samewords/issues}.
 % 
-% Please not that the maintainer of this script is not the maintainer of \macpackage.
+% Please note that the maintainer of this script is not identical with the maintainer of \macpackage.
 %
 % \subsection{Apparatus of manuscripts}
 % The critical notes mostly refer to textual variants between manuscripts which contain the text to be edited.
@@ -1968,7 +1970,7 @@
 % \end{verbatim}
 %
 % You can also decide to alternate familiar and critical footnotes with your own order.
-% In this case, the second argument of \cs{fnpos} or \cs{mpfnpos} is a comma separated list of values.
+% In this case, the second argument of \cs{fnpos} or \cs{mpfnpos} is a comma-separated list of values.
 % Each value has the following form:\\
 % \meta{series}\meta{type}
 %
@@ -2065,7 +2067,7 @@
 % \DescribeMacro{\Xnumberonlyfirstinline}\label{Xnumberonlyfirstinline}
 % \changes{v1.0.1}{2012/09/16}{Correction on \protect\cs{Xnumberonlyfirstinline} with lineation by pstart or by page.}
 % By default, the line number is printed in every note. If you want to print it only the first time for a given line number
-% (i.e., one time for line 1, one time for line 2, etc.), you can use \protect\cs{Xnumberonlyfirstinline}\oarg{s}. 
+% (i.e., once for line 1, once for line 2, etc.), you can use \protect\cs{Xnumberonlyfirstinline}\oarg{s}. 
 %
 %
 % \changes{v1.1.0}{2012/09/25}{Add \protect\cs{Xnumberonlyfirstintwolines}}
@@ -2112,7 +2114,7 @@
 %
 % \subsubsection{Arbitrary text before line number}
 % \DescribeMacro{\Xbeforenumber}
-% \cs{Xbeforenumber}\oarg{s}\marg{txt} allow to insert \meta{txt} before the line number, only when the line number is printed, so taking into accout \cs{Xnumberonlyfirstinline} and similar.
+% \cs{Xbeforenumber}\oarg{s}\marg{txt} allows the insertion of \meta{txt} before the line number only when the line number is printed, so taking into account \cs{Xnumberonlyfirstinline} and the like.
 % \paragraph{For endnotes}\label{pagelineendnotes}
 % \DescribeMacro{\Xendbeforepagenumber}
 % \cs{Xendbeforepagenumber}\oarg{s}\marg{text} defines the text before the page number in endnotes. Default value is \verb+p.+ (``p'' followed by a dot).
@@ -2120,9 +2122,9 @@
 % \DescribeMacro{\Xendafterpagenumber}
 % \cs{Xendafterpagenumber}\oarg{s}\marg{text} defines the text after the page number in endnotes. Default value is \verb+) + (open parenthesis followed by a single space). 
 % \DescribeMacro{\Xendlineprefixsingle}
-% \cs{Xendlineprefixsingle}\oarg{s}\marg{text} defines the text before the line number in endnotes, when there is only one line. Default value is empty.
+% \cs{Xendlineprefixsingle}\oarg{s}\marg{text} defines the text before the line number in endnotes when there is only one line. Default value is empty.
 % \DescribeMacro{\Xendlineprefixmore}
-% \cs{Xendlineprefixmore}\oarg{s}\marg{text} defines the text before the line number in endnotes, when there is more than one line. Default value is empty. If you don't define it, use the value defined by \cs{Xendlineprefixsingle}.
+% \cs{Xendlineprefixmore}\oarg{s}\marg{text} defines the text before the line number in endnotes when there is more than one line. Default value is empty. If you don't define it, it will use the value defined by \cs{Xendlineprefixsingle}.
 % \subsubsection{Separator for line range}\label{linerangeseparator}
 % \changes{v2.4.0}{2015/10/19}{New hooks:  \protect\cs{Xlinerangeseparator} and \protect\cs{Xendlinerangeseparator}.}
 % \changes{v2.4.0}{2015/10/19}{Option linerangesep for critical footnotes and endnotes.}
@@ -2212,12 +2214,12 @@
 % \DescribeMacro{\Xsublinesep}
 % \cs{Xsublinesep}\oarg{s}\marg{txt} changes the separator between line and subline in footnotes. 
 %
-% \textbf{Employed without optional argument, it also change separator in side number}.
+% \textbf{Employed without optional argument, it also changes the separator in side numbering}.
 % 
 % \DescribeMacro{\Xendsublinesep}
 % \cs{Xendsublinesep}\oarg{s}\marg{txt} does the same thing for endnotes. 
 %
-% \textbf{However, it does not change anything for the separator in side number. Use \cs{Xsublinesep} without optional argument or \cs{Xsublinesepside}\marg{txt} to do it.}
+% \textbf{However, it does not change anything for the separator in side numbering. Use \cs{Xsublinesep} without optional argument or \cs{Xsublinesepside}\marg{txt} to do it.}
 %
 % The default value is \verb+\textnormal{.}+.
 % \subsubsection{Separator between page and line numbers}
@@ -2232,7 +2234,7 @@
 % With \protect\cs{Xbeforenumber}\oarg{s}\marg{l}, you can add some space before the line number in a footnote. If the line number is not printed, the space is not either. The default value is 0~pt.
 %
 % \DescribeMacro{\Xafternumber}
-% With \protect\cs{Xafternumber}\oarg{s}\marg{l} you can add some space after the line number in a footnote. If the line number is not printed, the space is not either. The default value is 0.5~em.
+% With \protect\cs{Xafternumber}\oarg{s}\marg{l} you can add some space after the line number in a footnote. If the line number is not printed, neither is the space. The default value is 0.5~em.
 %
 % \DescribeMacro{\Xendbeforenumber}\DescribeMacro{\Xendaftrenumber}
 % \cs{Xendbeforenumber} and \cs{Xendafterenumber} are the equivalents of \cs{Xbeforenumber} and \cs{Xafterenumber} for endnotes.
@@ -2310,7 +2312,7 @@
 %
 % \subsection{Arbitrary code around line number}
 % \DescribeMacro{\Xendbhooklinenumber}
-% \cs{Xendbhooklinenumber}\oarg{s}\marg{code} is used to execute code before line number in endnotes. The code is executed before the \cs{Xendbeforelinenumber} space  and before the \cs{Xendnotenumfont} font setting.
+% \cs{Xendbhooklinenumber}\oarg{s}\marg{code} is used to execute code before line numbers in endnotes. The code is executed before the \cs{Xendbeforelinenumber} space  and before the \cs{Xendnotenumfont} font setting.
 %
 % \DescribeMacro{\Xendahooklinenumber}
 % \cs{Xendahooklinenumber}\oarg{s}\marg{code} is used to execute code after line number in endnotes. 
@@ -2460,7 +2462,7 @@
 % \end{verbatim}
 % 
 % \DescribeMacro{\Xbhooknote}
-% \protect\cs{Xbhooknote}\oarg{s}\marg{code} is to be used at the beginning of each critical footnotes.
+% \protect\cs{Xbhooknote}\oarg{s}\marg{code} is to be used at the beginning of each critical footnote.
 %
 %
 % \DescribeMacro{\bhooknoteX}
@@ -2567,15 +2569,15 @@
 % You can add text before familiar footnotes with \protect\cs{txtbeforenotesX}\oarg{s}\marg{text}.
 %
 % \DescribeMacro{\Xendtxtbeforenotes}
-% You can add text before endnotes with \protect\cs{Xendtxtbeforenotes}\oarg{s}\marg{text}. The text will be typeset only if we have endnotes.
+% You can add text before endnotes with \protect\cs{Xendtxtbeforenotes}\oarg{s}\marg{text}. The text will be typeset only if there are endnotes.
 %
 % \DescribeMacro{\Xtxtbeforenotesonlyonce}
-% \DescribeMacro{\txtbeforenotesonlyonceX} By default, such texts are inserted at the beginning of the groups of notes on each pages.
+% \DescribeMacro{\txtbeforenotesonlyonceX} By default, such texts are inserted at the beginning of the groups of notes on each page.
 % You can add \cs{Xtxtbeforenotesonlyonce} (for critical footnotes) and \cs{txtbeforenotesonlyonceX} (for familiar footnotes) to insert them only the first time notes are typeset. 
 % \subsubsection{Code before notes}
 %\DescribeMacro{\Xbhookgroup}
 %\DescribeMacro{\bhookgroupX}
-% While \cs{Xtxtbeforenotes} is for typesetting text before notes, \cs{Xbhookgroup}\oarg{s}\marg{code} and \cs{bhookgroupX}\oarg{s}\marg{code} (respectively for critical and familiar) are for executing code before a groups of notes, between the rules and the printing of the notes. 
+% While \cs{Xtxtbeforenotes} is for typesetting text before notes, \cs{Xbhookgroup}\oarg{s}\marg{code} and \cs{bhookgroupX}\oarg{s}\marg{code} (for critical and familiar respectively) are for executing code before a group of notes, between the rules and the printing of the notes. 
 % 
 % 
 % \subsubsection{Spacing}
@@ -2667,6 +2669,10 @@
 %   \item \protect\cs{Xnoteswidthliketwocolumns}\oarg{s} to create critical notes with a two-column size width. 
 %   \item \protect\cs{noteswidthliketwocolumnsX}\oarg{s} to create familiar notes with a two-column size width. 
 % \end{itemize}
+% \subsection{Line number annotation}
+% The way line number annotations are typeset can be changed using hooks as described in \reff{annotationposition} and 
+% \reff{wraplinenumannotation}.
+% 
 % \subsection{Endnotes in one paragraph}
 % \changes{v1.12.0}{2015/04/25}{Add \protect\cs{Xendparagraph} and related settings.}
 % \DescribeMacro{\Xendparagraph}
@@ -2918,12 +2924,104 @@
 %    \flagstanza{#1}%
 %}
 % \end{verbatim}
+% \subsection{Add annotation to line of verse numbers}\label{annotation}
+% You may want to have two or more numbers associated with a line of verse.
+% Consider, for example, the following cases:
+% \begin{itemize}
+%  \item You want to split a line of verse into two parts depending upon some stylistic / rythmic / linguistic convention.
+%  \item You want to add the line number used by a previous edition of the work.
+% \end{itemize}
+% In such instances, you must add the second number manually, as \macpackage\  can't determine a general pattern for such numbering, which depends too heavily upon the edited text.\footnote{However, you may create your own commands dealing with such pattern which will in turn call \macpackage\ commands.}
+%
+% \DescribeMacro{\linenumannotation}
+% To resolve this issue, \macpackage\ allows you to annotate to a line of verse number:
+% \begin{verbatim}
+% \linenumannotation{<annotation>}
+% \end{verbatim}
+% 
+% The annotation can contain any textual value (whether number, text, or other) such as the line number from the older edition.
+% Here are some characteristics of line number annotation:
+% \begin{itemize}
+%  \item An annotation is associated with a line of verse. It is reset with each new line of verse.
+%  \item It is printed alongside the line number in the margin.
+%  \item It is printed following the line number in critical footnotes and endnotes. 
+%  \item And of particular interest: the annotation is printed in the critical note \emph{only} when the \cs{edtext} is issued after the \cs{linenumannotation}.
+%  \item If two or more annotations are called before a \cs{edtext}, the last one is used in associated notes.
+%  \item If an annotation is called within a \cs{edtext}, it is printed as an annotation for the end of the lemma.
+% \end{itemize}
+% Here is an example, supposing we are on line 1:
+% \begin{verbatim}
+% \edtext{first lemma}
+% \linenumannotation{A}
+% \edtext{second lemma}{…}
+% \edtext{third%
+%   \lienumannotation{B}
+%  lemma}{…}
+% \edtext{fourth lemma}& 
+% \end{verbatim}
+% In the critical notes, the line number will be followed
+% \begin{itemize}
+%   \item by nothing in the first lemma, as  there is no annotation for this line;
+%   \item by \enquote{A} for the second lemma;
+%   \item by \enquote{A-B} for the third lemma, as it starts while annotation A is still in effect and it finishes after annotation B has already taken effect;
+%   \item by \enquote{B} for the fourth lemma. 
+% \end{itemize}
+% \subsubsection{Modify annotation associated to a specific note}
+%
+% The \cs{linenum} (\reff{linenum}) macro changes the line number passed to a note.
+% \DescribeMacro{\lineannot} does the same for the annotations.
+% It takes one argument, containing the beginnning and ending annotations separated by a pipe (\verb+|+).
+% As with \cs{linenum}, if one wishes to change some specific part of the annotation, one can use
+% \begin{verbatim}
+% \lineannot{|b}% to change the ending annotation
+% \lineannot{a|}% to change the beginning annotation
+% \lineannot{a|b}% to change both
+% \lineannot{\empty|}% to delete the beginning annotation 
+% \end{verbatim}
+% \subsubsection{Changing the position of the annotation}{annotationposition}
+% By default, annotations are placed after line numbers in both margin and footnote.
+% 
+% \DescribeMacro{\Xlinenumannotationposition}
+% \DescribeMacro{\Xendlinenumannotationposition}
+% To change this behaviour, one can use one of the following commands:
+% \begin{itemize}
+%  \item \cs{Xlinenumannotationposition}\oarg{s}\marg{v} changes the position in critical footnotes with \meta{s} for the series of footnotes to which it applies, where \meta{s} may be a comma-separated list of series. When \meta{s} is empty, the change applies also to annotations at the sides of the page, alongside the line number.
+%  \item \cs{Xlinenumannotationpositionside}\marg{v} changes the position at the sides of the page, alongside the line numbers. 
+%
+% Note that \cs{Xlinenumannotationposition} without any optional argument will override this setting.
+%  \item \cs{Xendlinenumannotationposition}\oarg{s}\marg{v} changes the position in critical endnotes, 
+% \meta{} for the series of endnotes to which it applies, where \meta{s} may once again be a comma-separated list of series.
+% \end{itemize}
+% In each of these three commands, \meta{v} can be \option{after} or \option{before} the line number.
+% \subsubsection{Changing the macro in which annotations are wrapped}\label{wraplinenumannotation}
+% By default, annotations are wrapped in the \cs{textsuperscript} macro.
+% You can modify this using one of the following:
+% \begin{itemize}
+%   \item \cs{Xwraplinenumannotation}\oarg{s}\marg{cmd} for critical footnotes; \meta{s} indicates the series of notes to which it applies and may be a comma-separated list of series.
+% When \meta{s} is empty, the change applies to the annotations in the margins also---around the line number---as well as to the annotations referenced using the \cs{annotationref} command of the crossref mechanism (\reff{crossref}.
+%   \item \cs{Xwraplinenumannotationside}\marg{cmd} for annotations in the margins only.
+%
+% Note that \cs{Xwraplinenumannotation} without any optional argument will override this setting.
+%   \item \cs{Xwraplinenumannotationref}\marg{cmd} for annotations referenced using the \cs{annotationref} command of the crossref mechanism (\reff{crossref}.
+%
+% Note that \cs{Xwraplinenumannotation} without any optional argument will override this setting.
+%   \item \cs{Xendwraplinenumannotation}\oarg{s}\marg{cmd} for critical endnotes, where \meta{s} indicates the series of notes to which it applies, which may be a comma-separated list.
+% \end{itemize}
+% \meta{cmd} is a command which can take one argument; the backslash is required though.
+% 
+% For example, if you do not wish to have annotations in the margins, but do want to have them in bold in the critical footnotes and endnotes, you say:\footnote{The \cs{@gobble} command takes one argument, and returns nothing.}
+% \begin{verbatim}
+% \makeatletter
+% \Xwraplinenumannotation{\textbf}
+% \Xendwraplinenumannotation{\textbf}
+% \Xwraplinenumannotationside{\@gobble}
+% \makeatother
+% \end{verbatim}
 % \subsection{Various tools}
 % \DescribeMacro{\ampersand}
 % If you need to print an \& symbol in a stanza, use the \verb?\ampersand? 
-% macro, not \verb?\&? which will end the stanza.
-%
-%
+% macro, not \verb?\&? as this will end the stanza.
+% 
 % \DescribeMacro{\flagstanza}
 % Putting \protect\cs{flagstanza}\oarg{len}\marg{text} at the start of a  line
 % in a stanza (or elsewhere) will typeset \meta{text} at a 
@@ -2998,11 +3096,12 @@
 % \DescribeMacro{\edlineref}
 % \DescribeMacro{\sublineref}
 % \DescribeMacro{\pstartref}
+% \DescribeMacro{\annotref}
 % Elsewhere in the text, either before or after the \protect\cs{edlabel},
 % you can refer to its location with \protect\cs{edpageref}\marg{lab},
-% \protect\cs{edlineref}\marg{lab}, \cs{edsublineref}\marg{lab} or \cs{pstartref}\marg{lab},
+% \protect\cs{edlineref}\marg{lab}, \cs{edsublineref}\marg{lab}, \cs{pstartref}\marg{lab} or \cs{annotref}\marg{lab}, 
 % that
-% will produce, respectively, the page, line, sub-line and pstart on which
+% will produce, respectively, the page, line, sub-line,  pstart, the annotation,  on which
 % the \protect\cs{edlabel}\marg{lab} command occurred.
 %
 % Note that the \cs{edlineref} command insert the side flag after the line number. 
@@ -3037,8 +3136,9 @@
 % \DescribeMacro{\xlineref}
 % \DescribeMacro{\xsublineref}
 % \DescribeMacro{\xpstartref}
+% \DescribeMacro{\xannotref}
 %
-% However, there are situations in which you will want \macpackage to
+% However, there are situations in which you will want \macpackage\ to
 % return a number without displaying any
 % warning messages about undefined labels or the like: if you want to
 % use the reference in a context where \LaTeX{} is looking for a
@@ -3048,9 +3148,9 @@
 % argument to \protect\cs{linenum}, for example (see \reff{linenum}). 
 %
 %For this situation,
-% four variants of the reference commands, with the \verb"x"
-% prefix, are supplied: \protect\cs{xpageref}, \protect\cs{xlineref}, \protect\cs{xsublineref} and \protect\cs{xpstartref}.
-% They have these limitations:
+% \macpackage\ supplies variants of the reference commands, with the \verb"x"
+% prefix: \cs{xpageref}, \cs{xlineref}, \cs{xsublineref}, \cs{xpstartref} and \cs{xannotationref}.
+% They have the following limitations:
 % \begin{itemize}
 %     \item They will not tell you if the label is undefined.
 %     \item They must
@@ -3073,9 +3173,9 @@
 % labels: e.g., \verb"\xxref{mouse}{elephant}". 
 %
 % It automatically calls \protect\cs{linenum}
-% (q.v., \reff{linenum} above) and sets the beginning page,
-% line and  subline numbers to those of the place where
-% \verb"\edlabel{mouse}" was placed, and the ending numbers to those where
+% (\reff{linenum}) and \cs{lineannot} (\reff{lineannot})  and sets the beginning page,
+% line,   subline numbers and line annotations to those of the place where
+% \verb"\edlabel{mouse}" was placed, and the ending ones to those where
 % \verb"\edlabel{elephant}" occurs.
 %
 % For example, one might use the following:
@@ -3117,7 +3217,7 @@
 % \subsubsection{Reference to main text lines}
 % \changes{v2.5.0}{2015/11/13}{New tools to easily make cross-reference to a passage defined by a start and an end line}
 % Many times, you may want to make a cross-reference to a passage that is defined by a start line and an end line.
-% \Macpackage provides specific tools for this scenario.
+% \Macpackage\ provides specific tools for this scenario.
 
 % \DescribeMacro{\edlabelS}
 % Use \cs{edlabelS}\marg{label} to mark the start line of the passage.
@@ -3143,15 +3243,15 @@
 % \subsubsection{References to lines that are commented on in the apparatus}\label{appref}
 % \changes{v1.21.0}{2015/03/09}{Add \protect\cs{applabel} and related}
 % You may want to make a cross-reference to a passage that is referred to by \protect\cs{edtext}.
-% \Macpackage provides specific tools for this scenario.
+% \Macpackage\ provides specific tools for this scenario.
 %
 % \DescribeMacro{\applabel}
 % If you use \protect\cs{applabel}\marg{label} inside the second argument of a \protect\cs{edtext},
-% \Macpackage will add a \protect\cs{edlabel} at the beginning and end of the marked passage.
+% \Macpackage\ will add a \protect\cs{edlabel} at the beginning and end of the marked passage.
 % The label at the beginning of the passage will have the title \meta{label}\verb+:start+, while the label at the end will have the title \meta{label}\verb+:end+.
 % 
 % If you use \protect\cs{linenum} (\reff{linenum}) to
-% refer to these labels, \macpackage will use your line settings to refer
+% refer to these labels, \macpackage\ will use your line settings to refer
 % to the passage.
 %
 % \DescribeMacro{\appref}\DescribeMacro{\apprefwithpage}  
@@ -3194,10 +3294,10 @@
 %
 % \textbf{Also note that \cs{setSErefonlypageprefixsingle} is only a shortcut for \cs{XendbeforepagenumberSErefonlypage} (see \reff{crossrefsetting:linked}).
 % So if you use \cs{Xendbeforepagenumber} without any optional argument, it will override this setting.}
-% \paragraph{Linked to setting of critical endnotes and footnotes}\label{crossrefsetting:linked}
-% Some commands who set the appearance of line numbers in critical footnotes also set the appearance of line numbers in \cs{appref} and \cs{SEref} if you call them \emph{without the optional series argument}.
+% \paragraph{Linked to setting of critical footnotes and endnotes}\label{crossrefsetting:linked}
+% Some commands which set the appearance of line numbers in critical footnotes also set the appearance of line numbers in \cs{appref} and \cs{SEref} if called \emph{without the optional series argument}.
 % 
-% These commandes are the following:
+% These commands are the following:
 % \begin{itemize}
 %   \item \cs{Xlineflag} (for \parpackage), enabled by default.
 %   \item \cs{Xlinerangeseparator}
@@ -3206,6 +3306,8 @@
 %   \item \cs{Xtwolines}
 %   \item \cs{Xtwolinesbutnotmore}
 %   \item \cs{Xtwolinesonlyinsamepage}
+%   \item \cs{Xlinenumannotationposition}
+%   \item \cs{Xwraplinenumannotation}
 % \end{itemize}
 %
 % If you want to make settings specific  to \cs{appref} or \cs{SEref}, just call them with an optional argument containing a comma-separated list of command names (for example \verb+appref,SEref+) or with a suffix equal to the command name (for example \verb+appref+).
@@ -3224,6 +3326,8 @@
 %   \item\cs{Xendtwolines}
 %   \item\cs{Xendtwolinesbutnotmore}
 %   \item\cs{Xendtwolinesonlyinsamepage}
+%   \item\cs{Xendlinenumannotationposition}
+%   \item\cs{Xendwraplinenumannotation}
 % \end{itemize}
 % \paragraph{For one specific command}
 %
@@ -3233,13 +3337,13 @@
 % \subsection{Compatibility with \protect\package{xr} package}
 % The \cs{externaldocument} command of the \cs{xr} package allows making cross-references from an external document, with the standard \LaTeX\ commands \cs{label} and \cs{ref} (and related).
 %
-% To use it with the \macpackage cross-reference commands (i.e. \cs{edlabel} and related), you must do the following:
+% To use it with the \macpackage\ cross-reference commands (i.e. \cs{edlabel} and related), you must do the following:
 % \begin{enumerate}
 % \item Load the \package{xr} package.
 % \item Load the \package{reledmac} package.
 % \item Use the \cs{externaldocument} document command. 
 % \end{enumerate}
-% \section{Side notes}
+% \section{Sidenotes}
 %
 % \subsection{Basics}
 % The \protect\cs{marginpar} command does not work in numbered text. Instead, 
@@ -3392,10 +3496,10 @@
 % who read French, read \url{http://geekographie.maieul.net/174}.}
 %
 % This file also provides, with an explanation, the settings that are needed to put
-% \macpackage lines numbers in parenthesis, in order
+% \macpackage\ lines numbers in parenthesis, in order
 % to make a better distinction between line numbers and page ranges.
 %
-% In any case, you must load \macpackage  with the \verb+xindy+ option,
+% In any case, you must load \macpackage\  with the \verb+xindy+ option,
 % in order to generate a \verb|.xdy| file which is specific to your document.
 % This file is needed by the \verb+.xdy+ example file which is in the ``\href{examples/.}{examples}'' folder.
 % Its default name is \verb+reledmac-markup-attr.xdy+,
@@ -3404,7 +3508,7 @@
 % If you choose to use both \verb+xindy+ and the \verb+hyperref+ package,
 % you must do three more things:
 % \begin{enumerate}
-%   \item Use \verb|xindy+hyperref| option when loading the \macpackage  package.
+%   \item Use \verb|xindy+hyperref| option when loading the \macpackage\  package.
 % When you run (Xe/Lua)\LaTeX with this option, a \verb+.xdy+ configuration file will be generated with all the settings needed to allow internal hyperlinking in each index entry which is created by \protect\cs{edindex}. 
 %   \item Use \verb+hyperindex=false+ option when loading hyperref.
 %   \item Uncomment\,---\,by removing the semicolons at the beginning of the relevant lines\,---\,some lines in the <code>.xdy</code> file provided in the ``\href{examples/.}{examples}'' folder in order to restore internal links in the index to be used by the standard \verb+index+ command.\footnote{These are the recommended lines to provide the best possible compatibility between hyperref and xindy, even without using \macpackage.}.
@@ -3421,9 +3525,9 @@
 % You can change \protect\cs{edindexlab} to something else if you need to.
 %
 % \section{Glossary}
-% \Macpackage provides mechanism to make glossaries with the \package{glossaries} package, refering not to the page, but to the page and line.
+% \Macpackage\ provides mechanism to make glossaries with the \package{glossaries} package, refering not to the page, but to the page and line.
 % \subsection{Preamble setting}
-% The standard compositor between page and line number in \macpackage  is a dash, while \package{glossaries} uses, by default, a dot.
+% The standard compositor between page and line number in \macpackage\  is a dash, while \package{glossaries} uses, by default, a dot.
 % Consequently, you must:
 % \begin{itemize}
 % \item Or set .
@@ -3441,7 +3545,7 @@
 %
 % \LaTeX's normal |tabular| and |array| environments cannot be used where
 % line numbering is being done; more precisely, they can be used but with 
-% odd results, so don't use them. However, \macpackage  provides some simple 
+% odd results, so don't use them. However, \macpackage\  provides some simple 
 % tabulation environments that can be line numbered. The environments
 % can also be used in normal unnumbered text.
 %
@@ -3752,8 +3856,8 @@
 %
 % \subsection{Optimization}\label{optimize}
 % \DescribeMacro{\noeledsec}
-% If you are not going to have any \protect\cs{eledxxx} commands, then load \macpackage  with \protect\cs{noeledsec} option. 
-% That will suppress the generation of unneeded \file{.eledsec} files, save memory, and make \macpackage run faster.
+% If you are not going to have any \protect\cs{eledxxx} commands, then load \macpackage\  with \protect\cs{noeledsec} option. 
+% That will suppress the generation of unneeded \file{.eledsec} files, save memory, and make \macpackage\ run faster.
 % 
 % \section{Quotation environments}
 % The \verb+quotation+ and \verb+quote+ environments can be used so that the same definition/note appears both inside and outside a numbered section.
@@ -3770,7 +3874,7 @@
 %
 % \subsection{Control page breaking}
 % \changes{v1.7.0}{2013/11/08}{New features for managing page breaks.}
-% \Macpackage and \parpackage break pages automatically. However, you may sometimes want to either force page breaks, or prevent them. 
+% \Macpackage\ and \parpackage break pages automatically. However, you may sometimes want to either force page breaks, or prevent them. 
 % \DescribeMacro{\ledpb} \DescribeMacro{\lednopb} The packages provide two macros: 
 % \begin{itemize}
 %    \item \protect\cs{ledpb} adds a page break.
@@ -3838,7 +3942,7 @@
 % \subsubsection{\package{floatrow} package compatibility}
 % The \package{floatrow} package must be loaded before the \macpackage.
 % \subsubsection{`No room for a new'}\label{noroom}
-% Sometimes, especially when using \macpackage with other packages, you could obtain warning messages such 'no room for a new count' or 'no room for a new write'.
+% Sometimes, especially when using \macpackage\ with other packages, you could obtain warning messages such 'no room for a new count' or 'no room for a new write'.
 %
 % In order to prevent such problems, the first thing is to use the options to optimize \macpackage.
 % For example, if you need only two series of notes, use the \verb+series={A,B}+ option.
@@ -3847,7 +3951,7 @@
 % However, if with these options you still have such messages, here are some tricks.
 % \begin{description}
 %  \item['no room for a new count'] is often caused by \protect\package{biblatex} being used at the same time.
-%  Load \macpackage (and \parpackage) \emph{before} \protect\package{biblatex}.
+%  Load \macpackage\ (and \parpackage) \emph{before} \protect\package{biblatex}.
 %  \item['no room for a new write'] can be caused by multiple indexes.
 % In this case, use \protect\package{indextools} of \protect\package{imakeidx} with the \verb+splitindex+ option, in order to obtain only one \verb+.idx+ file.
 % If that does not solve your problem, you can use \protect\package{morewrites} package.
@@ -3875,7 +3979,7 @@
 % \LaTeX\ is a three-pass system, but even after a document has
 % been processed three times, there are some tricky situations in
 % which the page breaks decided by \TeX\ never settle down.  At
-% each successive run, \macpackage may oscillate between two
+% each successive run, \macpackage\ may oscillate between two
 % different sets of page decisions.  To stop this happening, should
 % it arise, Wayne Sullivan\index{Sullivan, Wayne} suggested the
 % inclusion of the quantity \protect\cs{ballast}.  The amount of \protect\cs{ballast}
@@ -3918,7 +4022,7 @@
 % \subsubsection{Use with other packages}
 %
 % Because of \macpackage's complexity, it may not play well with other
-% packages. In particular \macpackage is sensitive to commands in the
+% packages. In particular \macpackage\ is sensitive to commands in the
 % arguments to the \protect\cs{edtext} and \protect\cs{*footnote} macros (this is
 % discussed in more detail in section~\ref{text}, and in particular
 % the discussion about \protect\cs{no at expands} and \protect\cs{morenoexpands}). You
@@ -3973,7 +4077,7 @@
 %%
 %
 % If you want to use the option \emph{bottom} of the \protect\package{footmisc} package, 
-% you must load this package \emph{before} the \macpackage package.
+% you must load this package \emph{before} the \macpackage\ package.
 % 
 
 % \subsection{Parallel typesetting}\label{eledpar}
@@ -4005,7 +4109,7 @@
 % \section{Implementation overview}\label{overview}
 %
 %
-% We present the \macpackage code in roughly the order in which it is used
+% We present the \macpackage\ code in roughly the order in which it is used
 % during a run of \TeX. The order is \emph{exactly} that in which
 % it is read when you load The \Eledmac{} package, because the same file
 % is used to generate this manual and to generate the \LaTeX\ package file.
@@ -4036,7 +4140,7 @@
 % (Section~\ref{endnotes}) complete the story.
 %
 % In what follows, macros with an @ in their name are more internal
-% to the workings of \macpackage than those made up just of
+% to the workings of \macpackage\ than those made up just of
 % ordinary letters, just as in \PlainTeX\ (see \thetexbook,
 % p.\,344).  You are meant to be able to make free with
 % ordinary macros, but the `@' ones should be treated with more
@@ -4069,7 +4173,7 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/11/05 v2.25.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/11/11 v2.26.0 typesetting critical editions]%
 %    \end{macrocode}
 %
 % \subsection{Package options}
@@ -4096,7 +4200,7 @@
 \RequirePackage{xkeyval}
 %    \end{macrocode}
 % The \verb+parledgroup+ option is for \parpackage.
-% However, it has consequence on \macpackage internal command.
+% However, it has consequence on \macpackage\ internal command.
 % So we need to define the boolean now.
 %    \begin{macrocode}
 \newif\ifparledgroup
@@ -4698,6 +4802,30 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \subsection{Wrapping content}
+% \begin{macro}{\l at wrap@ifnotemptybox}
+% \begin{macro}{\l at wrapcs@ifnotemptybox}
+% The \cs{l at wrap@ifnotemptybox} macro wraps its second argument in the command passed as the first argument, but only if the second argument does not produce an empty box.
+% That is useful for example when we need to wrap something on a \cs{textsuperscript}.
+%
+%
+% Indeed \verb+a\textsuperscript{}b+ does not produce the same typographical result as 
+% \verb+ab+.\footnote{Compare the distance between letters in the first case (a\textsuperscript{}b) and in the second one (ab).}
+% The l at wrapcs@ifnotemptybox does the same, but take as argument a control sequence name, so without backslash.
+%
+%    \begin{macrocode}
+\newcommand{\l at wrap@ifnotemptybox}[2]{%
+  \setbox0=\hbox{#2}%
+  \ifdim\wd0=\z@\else%
+    #1{#2}%
+  \fi%
+}%
+\newcommand{\l at wrapcs@ifnotemptybox}[2]{%
+  \l at wrap@ifnotemptybox{\csname #1\endcsname}{#2}%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
 % \subsection{Miscellaneous commands}
 % \begin{macro}{\showlemma}
 % \verb?\showlemma?\marg{lemma} typesets the lemma text in the body.
@@ -5214,7 +5342,7 @@
 % \item line-of-page: \verb|bypstart@ = false| and \verb|bypage@ = true|.
 % \item line-of-pstart: \verb|bypstart@ = true| and \verb|bypage@ = false|.
 % \end{itemize}
-% \Macpackage will use the line-of-section system unless instructed otherwise.
+% \Macpackage\ will use the line-of-section system unless instructed otherwise.
 %    \begin{macrocode}
 \newif\ifbypage@
 \newif\ifbypstart@
@@ -5350,7 +5478,7 @@
 % \subsection{Line number initialization and increment}
 % \begin{macro}{\c at firstlinenum}
 % \begin{macro}{\c at linenumincrement}
-% The following counters tell \macpackage which lines should be
+% The following counters tell \macpackage\ which lines should be
 % printed with line numbers. \verb+firstlinenum+ is the number of the
 % first line in each section that gets a number;
 % \verb+linenumincrement+
@@ -5578,7 +5706,13 @@
   \ifluatex%
     \textdir TLT%
   \fi%
-  \numlabfont\linenumrep{\line at num}%
+  \numlabfont%
+  \ifdefstring{\Xlinenumannotationposition at side}{before}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annot@\the\absline at num @\the\section at num}%
+      }%
+  }{}%
+  \linenumrep{\line at num}%
   \ifsublines@
     \ifnum\subline at num>0\relax
       \unskip%
@@ -5586,6 +5720,11 @@
       \sublinenumrep{\subline at num}%
     \fi
   \fi%
+  \ifdefstring{\Xlinenumannotationposition at side}{after}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annot@\the\absline at num @\the\section at num}%
+      }%
+  }{}%
   \egroup%
 }%
 
@@ -5705,7 +5844,8 @@
 % \begin{macro}{\insertlines at list}
 % \begin{macro}{\actionlines at list}
 % \begin{macro}{\actions at list}
-% Now we can define the list macros that will be created from the
+% \begin{macro}{\annot at list}
+% Now we can define the list of macros which will be created from the
 % line-list file.  We will maintain the following lists:
 % \begin{itemize}\addtolength{\itemsep}{-1ex}
 % \item \protect\cs{line at list}: the page and line numbers for every
@@ -5752,7 +5892,7 @@
 % defined below.
 %
 % \item \protect\cs{actions at list}: action codes corresponding to the line
-% numbers in \protect\cs{actionlines at list}. These codes tell \macpackage what action
+% numbers in \protect\cs{actionlines at list}. These codes tell \macpackage\ what action
 % it is supposed to take at each of these lines. One action, the
 % page-start action, is generated behind the scenes by \macpackage{} itself;
 % the others, for specifying sub-lineation, line-number locking, and
@@ -5821,7 +5961,9 @@
 % from the absolute line numbers with reference to the other
 % action codes and the settings they invoke; it does not require an
 % entry in the action-code list for every line.
-%
+% \item \cs{annot at list} stores line number annotations for the start and the end lines of each  \cs{edtext}, as \cs{line at list} does for line numbers.
+% We don't store that in the same list as line numbers as \cs{printlines} already have height arguments, and a \TeX\ macro can take at most nine arguments.
+% \end{itemize}
 % Here are the commands to create these lists:
 %
 %    \begin{macrocode}
@@ -5829,14 +5971,14 @@
 \list at create{\insertlines at list}
 \list at create{\actionlines at list}
 \list at create{\actions at list}
-
+\list at create{\annot at list}%
 %    \end{macrocode}
 %
-% \end{itemize}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 % 
 % \begin{macro}{\page at num}
 % \begin{macro}{\endpage at num}
@@ -6147,6 +6289,7 @@
 }
 \newcommand*{\@nl at reg}{%
   \ifx\l at dchset@num\relax \else
+    \reset at current@annot%
     \advance\absline at num \@ne
     \csgdef{l at dchset@num@\the\absline at num}{}%To remember this line have been marked by a \setlinenum
     \set at line@action
@@ -6269,7 +6412,7 @@
 % \begin{macro}{\@lopR}
 % These do not do anything at this point, but will have been added to the 
 % auxiliary file(s) if the  \parpackage package has been used. They
-% are just here to stop \macpackage from moaning if the \parpackage 
+% are just here to stop \macpackage\ from moaning if the \parpackage 
 % is used for one run and then not for the following one.
 % \changes{v0.6.0}{2004/11/16}{Added \protect\cs{@pend},\protect\cs{@pendR}, \protect\cs{@lopL} and 
 %        \protect\cs{@lopR} in anticipation of parallel processing}
@@ -6743,10 +6886,12 @@
     \let\@lab=\relax
     \let\@lemma=\relax%
     \let\@sw\@gobblethree%
+    \let\store at annot@to at absline\@gobble%
     #2
     \global\endpage at num=\page at num
     \global\endline at num=\line at num
     \global\endsubline at num=\subline at num
+    \global\let\endcurrent at annot=\current at annot%
   \endgroup
 %    \end{macrocode}
 %
@@ -6758,6 +6903,8 @@
        \ifsublines@ \the\subline at num \else 0\fi|%
        \the\endpage at num|\the\endline at num|%
        \ifsublines@ \the\endsubline at num \else 0\fi}\to\line at list
+    \xright at appenditem%
+      {\current at annot|\endcurrent at annot}\to\annot at list%
 %    \end{macrocode}
 % And now, call \cs{@ref at reg@parsearg}, which can be also called by \cs{@ref at later}
 %    \begin{macrocode}
@@ -6824,7 +6971,7 @@
 %
 % We have now defined all the counters, lists, and commands involved in
 % reading the line-list file at the start of a section. Now we will
-% cover the commands that \macpackage uses within the text of a
+% cover the commands that \macpackage\ uses within the text of a
 % section to write commands out to the line-list.
 %
 % \begin{macro}{\linenum at out}
@@ -6909,7 +7056,7 @@
 %                           \protect\cs{line at list@stuff}}
 % \changes{v0.7.0}{2005/02/25}{Deleted \protect\cs{page at start} from \protect\cs{line at list@stuff}}
 % \changes{v1.15.1}{2015/01/16}{Revert modification of 1.5.2 which makes bug with numbering. Leave vertical mode to solve spurious space before minipage.}
-% \Macpackage and \parpackage can fill the \cs{next at line@list at stuff} hook between a \cs{endnumbering} (associated with numbered file $n$) and a \cs{beginnumbering} (associated with numbered file $n+1$). It allows adding content to the numbered file $n+1$ and not $n$.
+% \Macpackage\ and \parpackage can fill the \cs{next at line@list at stuff} hook between a \cs{endnumbering} (associated with numbered file $n$) and a \cs{beginnumbering} (associated with numbered file $n+1$). It allows adding content to the numbered file $n+1$ and not $n$.
 %    \begin{macrocode}
   \iffirst at linenum@out@
      \global\first at linenum@out at false%
@@ -7150,12 +7297,15 @@
 \newcommand*{\setline}[1]{%
  \leavevmode%
   \ifnum#1<\z@
-    \led at warn@BadSetline
-  \else
-    \ifledRcol \write\linenum at outR{\string\@set[#1]}%
-    \else      \write\linenum at out{\string\@set[#1]}%
-    \fi
-  \fi}
+    \led at warn@BadSetline%
+  \else%
+    \ifledRcol% 
+      \write\linenum at outR{\string\@set[#1]}%
+    \else%      
+      \write\linenum at out{\string\@set[#1]}%
+    \fi%
+  \fi%
+}%
 
 %    \end{macrocode}
 % \end{macro}
@@ -7287,7 +7437,7 @@
 % it a new name; otherwise you will need to add an appropriate
 % definition for your new macro to \protect\cs{morenoexpands}.
 %
-% Side effects of our line-numbering code make it impossible to use
+% Side-effects of our line-numbering code make it impossible to use
 % the usual footnote macros directly within a paragraph whose lines are
 % numbered (see comments to
 % \protect\cs{do at line}, \reff{doline}).
@@ -7400,7 +7550,7 @@
 % and any other that causes trouble, will get by all right if you put
 % a \protect\cs{protect} in front of it in your file.)
 %
-% We also need to eliminate all \macpackage macros like \protect\cs{edlabel} and
+% We also need to eliminate all \macpackage\ macros like \protect\cs{edlabel} and
 % \protect\cs{setline} that write things to auxiliary files: that writing
 % should be done only once. And we make
 % \protect\cs{edtext} itself, if it appears within its own
@@ -7411,7 +7561,7 @@
 % a version of your own when you need to add more expansion
 % suppressions as needed with your macros. That makes it possible
 % to make such additions without needing to copy or modify the
-% standard \macpackage code. If you define your own
+% standard \macpackage\ code. If you define your own
 % \protect\cs{morenoexpands}, you must be very careful about spaces: if the
 % macro adds any spaces to the text when it runs, extra space
 % will appear in the main text when \protect\cs{edtext} is used.
@@ -7446,6 +7596,7 @@
   \let\edtext=\dummy at edtext
   \let\edindex\dummy at edindex%
   \l at dtabnoexpands
+  \let\linenumannotation=\@gobble%
   \morenoexpands}
 \let\morenoexpands=\relax
 
@@ -7663,7 +7814,7 @@
 %
 % 
 % \begin{macro}{\@beforeinsertofthisedtext}
-% \cs{@beforeinsertofthisedtext} is an internal macro. \macpackage or \parpackage can add in this macro any content required to be executed before doing any \cs{insert} related to a \cs{edtext}.
+% \cs{@beforeinsertofthisedtext} is an internal macro. \macpackage\ or \parpackage can add in this macro any content required to be executed before doing any \cs{insert} related to a \cs{edtext}.
 % Its content is \cs{let} equal to \cs{relax} at the end of every \cs{edtext}.
 %    \begin{macrocode}
 \let\@beforeinsertofthisedtext\relax
@@ -7702,6 +7853,13 @@
       \xdef\l at d@nums{\@tempb|\edfont at info}%
       \global\let\@tempb=\undefined
     \fi
+    \ifx\annot at listR\empty%
+      \xdef\l at current@annotR{|}%
+    \else%
+      \gl at p\annot at listR\to\@tempb%
+      \xdef\l at current@annotR{\@tempb}%
+      \global\let\@tempb=\undefined%
+    \fi%
   \else
     \ifx\line at list\empty
       \global\noteschanged at true
@@ -7711,6 +7869,13 @@
       \xdef\l at d@nums{\@tempb|\edfont at info}%
       \global\let\@tempb=\undefined
     \fi
+    \ifx\annot at list\empty%
+      \xdef\l at current@annot{|}%
+    \else%
+      \gl at p\annot at list\to\@tempb%
+      \xdef\l at current@annot{\@tempb}%
+      \global\let\@tempb=\undefined%
+    \fi%
   \fi}
 
 %    \end{macrocode}
@@ -7819,6 +7984,26 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\lineannot}
+% \begin{macro}{\lineannot at set}
+% Last but not least, \cs{lineannot} allows us to substitute line number annotation. It is different from \cs{linenum} for backward compatibility with older versions of \macpackage. It calls \cs{lineannot at set} to determine whether we must change only one annotation or two, or none. 
+%    \begin{macrocode}
+\newcommand*{\lineannot}[1]{%
+  \lineannot at set#1|%
+}%
+\def\lineannot at set#1|#2|{%
+  \expandafter\parse at annot#1|#2|%
+  \IfStrEq{#1}{}%
+    {\let\@tempa\annot at start}%
+    {\def\@tempa{#1}}%
+  \IfStrEq{#2}{}%
+    {\let\@tempb\annot at start}%
+    {\def\@tempb{#2}}% 
+  \xdef\l at current@annot{\@tempa|\@tempb}%  
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
 % \subsection{Lemma disambiguation}
 % The mechanism which counts the occurrence of a same word in a same line is quite complex, because, when \LaTeX\ reads a command between a \protect\cs{pstart} and a \protect\cs{pend}, it does not know yet which are the line numbers.
 % 
@@ -7825,7 +8010,7 @@
 % The general mechanism is the following:
 % \begin{itemize}
 %    \item \textbf{At the first run}, each \protect\cs{sameword} command increments an \protect\package{etoolbox} counter the name of which contains the argument of the \protect\cs{sameword} commands.
-%    \item Then this counter, associated with the argument of \protect\cs{sameword} is stored with the \protect\cs{@sw} command in the auxiliary file of the current \macpackage section (the \verb+.1+, \verb+.2+… file).
+%    \item Then this counter, associated with the argument of \protect\cs{sameword} is stored with the \protect\cs{@sw} command in the auxiliary file of the current \macpackage\ section (the \verb+.1+, \verb+.2+… file).
 %    \item \textbf{When this auxiliary file is read at the second run}, different operations are achieved:
 %  \begin{enumerate} 
 %         \item  Get the rank of each \protect\cs{sameword} in a line (relative rank) from the rank of each \protect\cs{sameword} in all the numbered section (absolute rank):
@@ -8562,7 +8747,7 @@
 %    \begin{macrocode}
 \def\print at line{
 %    \end{macrocode}
-% Insert the pstart number in side, if we are in the first line of a pstart.
+% Insert the pstart number inside, if we are in the first line of a pstart.
 %    \begin{macrocode}
     \affixpstart at num%
 %    \end{macrocode}
@@ -8744,7 +8929,7 @@
 % 
 % \begin{macro}{\l at dlsn@te}
 % \begin{macro}{\l at drsn@te}
-% Zero width boxes of the left and right side notes, together with their kerns, and, eventually, with additional space if we are in parallel columns typesetting.
+% Zero width boxes of the left and right sidenotes, together with their kerns, and, eventually, with additional space if we are in parallel columns typesetting.
 % \changes{v0.7.0}{2005/02/18}{Added \protect\cs{l at dlsn@te} and \protect\cs{l at drsn@te}
 %              for use in \protect\cs{do at line}}
 %    \begin{macrocode}
@@ -9002,11 +9187,98 @@
 
 %    \end{macrocode}
 % \end{macro}
+% \section{Line number annotation}
+% The \cs{linenumannotation} allows users  to add manual annotations to line numbers, for example to refer to line numbers from an older edition.
+%
+% That implies that annotations be added
+% \begin{itemize}
+%  \item in marginal line numbers. This feature is implemented by associating annotations with the absolute line numbers when reading the auxiliary numbered files (\verb+.1+, \verb+.2+ etc.).
+%  \item in critical footnotes. This feature is implemented by associating start / end line number annotations with each \cs{edtext} when reading the auxiliary numbered files.
+% \item to crossref commands which refer to line numbers (to be completed when I will have resolved this issue). 
+% \end{itemize}
+% \begin{macro}{\linenumannotation}
+% First, the user-level command, which only writes commands to the numbered files, storing the annotation.
+%    \begin{macrocode}
+\newcommand{\linenumannotation}[1]{%
+  \leavevmode%In case it begins with a \pstart, ensure the \@annot is written after \@nl
+  \ifledRcol%
+    \write\linenum at outR{\string\@annot[#1]}%
+  \else%
+    \write\linenum at out{\string\@annot[#1]}%
+  \fi%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Xlinenumannotationposition at side}
+% The \cs{Xlinenumannotationposition at side} macro, to determine the position of line number annotations in lines printed in the side, relative to the line number position.
+% The default value is \enquote{after}, but it can be changed to \enquote{before}, using the \cs{Xlinenumannotationposition} macro.
+%    \begin{macrocode}
+\def\Xlinenumannotationposition at side{after}%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Xwraplinenumannotation at ref}
+% \begin{macro}{\Xwraplinenumannotation at side}
+% The  \cs{Xwraplinenumannotation at ref} macro is applied to crossrefs made to line annotations. The \cs{Xwraplinenumannotation at side} macro is applied to line annotation in sides.
+% They must be modified by users using \cs{Xwraplinenumannotation}.
+% By default, they call \cs{textsuperscript}. 
+%    \begin{macrocode}
+\def\Xwraplinenumannotation at ref{\textsuperscript}%
+\def\Xwraplinenumannotation at side{\textsuperscript}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\@annot}
+% \begin{macro}{\store at annot@to at absline}
+% Then, the numbered files command \cs{@annot}, which
+% \begin{itemize}
+%  \item associates the annotation to the absolute lines number.
+%  \item stores the current annotation in a macro to be used by the \cs{@ref at reg} macro, which manages all things related to \cs{edtext} in numbered files. As we don't want to store it multiple times in the event of nested \cs{edtext}, we use an auxiliary macro, \cs{store at annot@to at absline}, which is set to \cs{@gobble} when we parse nested \cs{edtext} in numbered auxiliary files.
+% \end{itemize}
+%    \begin{macrocode}
+\newcommand{\@annot}[1]{%
+  \store at annot@to at absline{#1}%
+  \def\current at annot{#1}%
+}%
+\newcommand{\store at annot@to at absline}[1]{%
+  \ifledRcol%
+    \csgappto{annotR@\the\absline at numR @\the\section at numR}{#1}%
+  \else%
+    \csgappto{annot@\the\absline at num @\the\section at num}{#1}%
+  \fi%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\current at annot}
+% By default, there is no annotation to a line number, so we store an empty \cs{current at annot}
+%    \begin{macrocode}
+\let\current at annot=\empty%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\reset at current@annot}
+% \cs{reset at current@annot} is called at each \cs{@nl} in numbered auxiliary files.
+% It resets the annotation of line numbers at each line.
+%    \begin{macrocode}
+\newcommand{\reset at current@annot}{%
+  \let\current at annot\empty%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\parse at annot}
+% In the \cs{annot at list} list, each individual \cs{edtext} is associated with a starting and an ending line number annotation, which is stored this way: \verb+start annotation|end annotation+
+% The \cs{parse at annot} reads the format and defines two global macros.
+%    \begin{macrocode}
+\def\parse at annot#1|#2|{%
+  \gdef\annot at start{#1}%
+  \gdef\annot at end{#2}%
+}%
+%    \end{macrocode}
+% \end{macro}
 % \section{Line number printing}
 %
 % \begin{macro}{\affixline at num}
 % \protect\cs{affixline at num}  just puts a left line number into \protect\cs{l at dld@ta}
-% or a right line number into \protect\cs{l at drd@ta} if required.
+% or a right line number into \protect\cs{l at drd@ta} as required.
 %
 % To determine whether we need to affix a line number to this line,
 % we compute the following:
@@ -9261,12 +9533,12 @@
 %
 %
 %
-% \section{Pstart number printing in side}
-% In side, the printing of pstart number is running like the printing of line number. There is only some differences:
+% \section{Pstart number printing inside}
+% Inside, the printing of the pstart number runs like the printing of the line number. There are only a few differences:
 % \begin{macro}{\affixpstart at num}
 % \begin{macro}{\pstartnum}
 % \begin{itemize}
-%  \item The pstarts counter is upgrade in the \protect\cs{pend} command. Consequently, the \protect\cs{affixpstart at num} command has not to upgrade it, unlike the \protect\cs{affixline at num} which upgrades the lines counter.
+%  \item The pstarts counter is upgraded in the \protect\cs{pend} command. Consequently, the \protect\cs{affixpstart at num} command has not to upgrade it, unlike the \protect\cs{affixline at num} which upgrades the lines counter.
 %  \item To print the pstart number only at the beginning of a pstart, and not in every line, a boolean test is made. The \protect\cs{pstartnum} boolean is set to TRUE at every \protect\cs{pend}. It is tried in the \protect\cs{leftpstartnum} and \protect\cs{rightstartnum} commands. After the try, it is set to FALSE.
 % \end{itemize}
 % \begin{macro}{\leftpstartnum}
@@ -9320,7 +9592,7 @@
 % \end{macro}
 % \end{macro}
 % \section{Restoring footnotes and penalties} 
-% Because of the paragraph decomposition process in order to number line, \macpackage must hack the standard way \TeX\ works in order to manage insertion of footnotes,  both critical and familiar.
+% Because of the paragraph decomposition process in order to number line, \macpackage\ must hack the standard way \TeX\ works in order to manage insertion of footnotes,  both critical and familiar.
 %
 % We need to call the \protect\cs{insert} commands not when the content of \protect\cs{pstart}\ldots\protect\cs{pend} is read by \TeX\, by when each individual line is typeset.
 % 
@@ -9685,7 +9957,7 @@
 %    \begin{macrocode}
 \newcommand*{\footnoteoptions@}[3]{%
    \def\do##1{%
-      \ifstrequal{#1}{L}{% In Leftside
+      \ifstrequal{#1}{L}{% On the left side
           \xright at appenditem{\noexpand\setkeys[mac]{#3footnoteoption}{\unexpanded{##1}}}\to\inserts at list%
          \global\advance\insert at count \@ne% Increment the left insert counter.
       }%
@@ -10005,7 +10277,9 @@
 % Argument \verb"#1" contains the line and page number information
 % and lemma font specifier;
 % \verb"#2" is the lemma;
-% \verb"#3" is the note's text. This version is very
+% \verb"#3" is the note's text;
+% \verb"#4" is the note's series.
+% This version is very
 % rudimentary---it uses \protect\cs{printlines}
 % to print just the range of line numbers,
 % followed by a square bracket, the lemma, and the note text.
@@ -11260,6 +11534,7 @@
 %
 % Maïeul Rouquette has added \protect\cs{ifl at d@Xtwolines} and \protect\cs{ifl at d@Xmorethantwolines}
 % to print a symbol which stands for ``and subsequent`` when there are two, three or more lines.
+% Is also defines \cs{@annot at start@print} and \cs{@annot at end@print} which define annotations associated with the starting and ending line numbers in critical footnotes.
 % \begin{macro}{\ifl at d@pnum}
 % \begin{macro}{\ifl at d@ssub}
 % \begin{macro}{\ifl at d@elin}
@@ -11267,6 +11542,8 @@
 % \begin{macro}{\ifl at d@dash}
 % \begin{macro}{\ifl at d@Xtwolines}
 % \begin{macro}{\ifl at d@Xmorethantwolines}
+% \begin{macro}{\@annot at start@print}
+% \begin{macro}{\@annot at end@print}
 %    \begin{macrocode}
 \newif\ifl at d@pnum 
 \newif\ifl at d@ssub 
@@ -11275,6 +11552,8 @@
 \newif\ifl at d@dash
 \newif\ifl at d@Xtwolines%
 \newif\ifl at d@Xmorethantwolines%
+\let\@annot at start@print\relax%
+\let\@annot at end@print\relax%
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -11283,6 +11562,8 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
+% \end{macro}
 %
 %
 % \begin{macro}{\l at dparsefootspec}
@@ -11342,7 +11623,11 @@
 % \changes{v0.7.0}{2005/02/18}{Added \protect\cs{setprintlines} for use by \protect\cs{printlines}}
 %    \begin{macrocode}
 \newcommand*{\setprintlines}[6]{%
-  \l at d@pnumfalse \l at d@dashfalse 
+  \let\@annot at start@print\relax%
+  \let\@annot at end@print\relax%
+  \l at d@pnumfalse%
+  \l at d@dashfalse%
+  \l at d@elinfalse%
 %    \end{macrocode}
 % We print the page numbers only if\/: 1)~we are doing
 % the lineation by page, and 2)~the ending page number is different
@@ -11357,15 +11642,59 @@
 %    \end{macrocode}
 %
 % We print the ending line number if\/: (1)~we are printing the ending
-% page number, or (2)~it is different from the starting line number.
+% page number, or (2)~the ending line number is different from the starting line number.
+% If either of these conditions is true, we also print the annotation linked to the ending line number annotations.
 %    \begin{macrocode}
-  \ifl at d@pnum \l at d@elintrue \else \l at d@elinfalse \fi
-  \ifnum#2=#5 \else
-      \l at d@elintrue
-      \l at d@dashtrue
-  \fi
+  \ifboolexpr{%
+    bool{l at d@pnum}%
+    or not test{\ifnumequal{#2}{#5}}%
+   }{%
+    \l at d@elintrue%
+    \l at d@dashtrue%
+    \unless\ifx\relax\annot at end%
+      \def\@annot at end@print{%
+        \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\annot at end}%
+      }%
+    \fi%
+    }{}%
 %    \end{macrocode}
 %
+% We define the starting line number annotation as a merge of the starting annotation and ending annotation if we don't print the ending line number.
+% Otherwise, it is only the starting annotation.
+%    \begin{macrocode}
+  \ifl at d@elin%
+    \def\@annot at start@print{%
+      \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\annot at start}%
+    }%
+  \else%
+    \ifx\annot at start\annot at end%
+      \unless\ifx\@annot at start\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\annot at start}%
+        }%
+      \fi%
+    \else%
+      \ifx\@annot at end@print\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{%
+            \ifx\annot at start\empty\else%
+              \annot at start%
+              \ifdefined\linerangesep@%
+                \linerangesep@%
+              \else%
+                \csuse{Xlinerangeseparator@\@currentseries}%
+              \fi%
+            \fi%
+            \annot at end%
+            }%
+          }%
+       \else%
+         \let\@annot at start@print\@annot at end@print%
+         \let\@annot at end@print\relax%
+      \fi%
+    \fi%
+  \fi%
+%    \end{macrocode}
 % We print the starting sub-line if it is nonzero.
 %    \begin{macrocode}
   \l at d@ssubfalse
@@ -11502,6 +11831,9 @@
   \ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}%
     {\bgroup}%
     {\leavevmode\hbox to \csuse{Xboxstartlinenum@\@currentseries}\bgroup\hfill}%
+  \ifcsstring{Xlinenumannotationposition@\@currentseries}{before}%
+    {\@annot at start@print}%
+    {}%
   \ifl at d@pnum%
     \wrap at edcrossref{\@this at crossref@start}{#1}%
     \csuse{Xpagelinesep@\@currentseries}%
@@ -11514,6 +11846,9 @@
     \csuse{Xsublinesep@\@currentseries}%
     \wrap at edcrossref{\@this at crossref@start}{\sublinenumrep{#3}}%
   \fi
+  \ifcsstring{Xlinenumannotationposition@\@currentseries}{after}%
+    {\@annot at start@print}%
+    {}%
   \egroup%
 %    \end{macrocode}
 % Then print the dash + end line number, or the range symbol.
@@ -11538,6 +11873,9 @@
         \csuse{Xlinerangeseparator@\@currentseries}%
       \fi%
     \fi%
+    \ifcsstring{Xlinenumannotationposition@\@currentseries}{before}%
+      {\@annot at end@print}%
+      {}%
     \ifl at d@pnum%
        \wrap at edcrossref{\@this at crossref@end}{#4}%
        \csuse{Xpagelinesep@\@currentseries}%
@@ -11553,7 +11891,10 @@
          \csuse{Xsublinesep@\@currentseries}%
        \fi%
        \wrap at edcrossref{\@this at crossref@end}{\sublinenumrep{#6}}%
-     \fi%
+    \fi%
+    \ifcsstring{Xlinenumannotationposition@\@currentseries}{after}%
+      {\@annot at end@print}%
+      {}%
   \fi%
   \ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
     {}%
@@ -11565,7 +11906,7 @@
 % \end{macro}
 % \subsubsection{Footnote grouped by line}
 % \begin{macro}{\prepare at Xgroupbyline}
-% \cs{prepare at Xgroupbyline} is a macro called on on the \cs{\meta{XXX}vfootnote} if \cs{Xgroupbyline} is set to true, instead of calling directly the \cs{insert}.
+% \cs{prepare at Xgroupbyline} is a macro called on the \cs{meta{XXX}vfootnote} if \cs{Xgroupbyline} is set to true, instead of calling \cs{insert} directly.
 %    \begin{macrocode}  
 \newcommand{\prepare at Xgroupbyline}[3]{%
   \iftoggle{Xgroupbylineseparetwolines@#1}{%
@@ -12853,9 +13194,9 @@
 % \end{macro}
 % \end{macro}
 % \section{Specific skip for first series of footnotes}\label{skipfirstseries}
-% \subsubsection{Overview}
+% \subsection{Overview}
 % \protect\cs{Xbeforenotes} inserts a specific skip for the first series of notes in a page.
-% As we can't know in advance which series will be the first, we call \protect\cs{prepare at Xprenotes} before inserting any critical notes, in order to prevent page number overlapping. 
+% As we can't know in advance which series will be the first, we call \protect\cs{prepare at Xprenotes} before inserting any critical notes in order to prevent page number overlapping. 
 % \begin{enumerate}
 %   \item If it is the first note of the current page, it changes the footnote skip for the series to the value specified to \protect\cs{Xbeforenotes}. It also keeps the series of the note as the first one of the current page.
 %   \item If it is not the first note of the current page:
@@ -12876,7 +13217,7 @@
 % After the rule, the space which is defined by \protect\cs{Xafterrule} does not depend on whether the series is the first one of the page or not. So we use its normal value for each series.
 %
 % And now, implementation !
-% \subsubsection{User level command}
+% \subsection{User level command}
 % \begin{macro}{\Xprenotes@}
 % \begin{macro}{\Xprenotes}
 % \changes{v1.1.0}{2012/09/25}{New skip \protect\cs{Xprenotes@}}
@@ -12905,7 +13246,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \subsubsection{Internal commands}
+% \subsection{Internal commands}
 % \begin{macro}{firstXseries@}
 % \begin{macro}{prepare at Xprenotes}
 %    \begin{macrocode}
@@ -13277,14 +13618,20 @@
 % by always printing the page number. The coding is slightly simpler than
 % \protect\cs{setprintlines}.
 %
-% First of all, we print the second page number only if
-% the ending page number is different
 % from the starting page number.\label{printendlines}
 % \changes{v0.7.0}{2005/02/18}{Added \protect\cs{setprintendlines} for use by
 %              \protect\cs{printendlines}}
 %    \begin{macrocode}
 \newcommand*{\setprintendlines}[6]{%
-  \l at d@pnumfalse \l at d@dashfalse 
+  \let\@annot at start@print\relax%
+  \let\@annot at end@print\relax%
+  \l at d@pnumfalse%
+  \l at d@dashfalse%
+  \l at d@elinfalse%
+%    \end{macrocode}
+% First of all, we print the second page number only if
+% the ending page number is different
+%    \begin{macrocode}
   \ifnum#4=#1 \else
     \l at d@pnumtrue 
     \l at d@dashtrue
@@ -13292,15 +13639,61 @@
 %    \end{macrocode}
 %
 % We print the ending line number if\/: (1)~we are printing the ending
-% page number, or (2)~it is different from the starting line number.
+% page number, or (2)~the ending line is different from the starting line number.
 %    \begin{macrocode}
-  \ifl at d@pnum \l at d@elintrue \else \l at d@elinfalse \fi
-  \ifnum#2=#5 \else
+  \ifboolexpr{%
+      bool{l at d@pnum}%
+      or not test{\ifnumequal{#2}{#5}}%
+     }{%
+      \l at d@elintrue%
+      \l at d@dashtrue%
       \l at d@elintrue
       \l at d@dashtrue
-  \fi
+      \unless\ifx\relax\annot at end%
+        \def\@annot at end@print{%
+          \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\annot at end}%
+        }%
+      \fi%
+   }%
+   {}%
 %    \end{macrocode}
 %
+% We define the starting line number annotation as a merge of the starting annotation and ending annotation if we don't print the ending line number.
+% Otherwise, it is only the starting annotation.
+%    \begin{macrocode}
+  \ifl at d@elin%
+    \def\@annot at start@print{%
+      \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\annot at start}%
+    }%
+  \else%
+    \ifx\annot at start\annot at end%
+      \unless\ifx\@annot at start\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\annot at start}%
+        }%
+      \fi%
+    \else%
+      \ifx\@annot at end@print\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{%
+            \ifx\annot at start\empty\else%
+              \annot at start%
+              \ifdefined\linerangesep@%
+                \linerangesep@%
+              \else%
+                \csuse{Xendlinerangeseparator@\@currentseries}%
+              \fi%
+            \fi%
+            \annot at end%
+            }%
+          }%
+       \else%
+         \let\@annot at start@print\@annot at end@print%
+         \let\@annot at end@print\relax%
+      \fi%
+    \fi%
+  \fi%
+%    \end{macrocode}
 % We print the starting sub-line if it is nonzero.
 %    \begin{macrocode}
   \l at d@ssubfalse
@@ -13422,8 +13815,11 @@
     \csuse{Xendlineprefixsingle@\@currentseries}%
   \fi%
 %    \end{macrocode}
-% The print the starting line, followed, if needed, by the side flag and the starting sub line number.
+% Then print the starting line, followed, if needed, by the side flag and the starting sub line number, then the line number annotation.
 %    \begin{macrocode}
+  \ifcsstring{Xendlinenumannotationposition@\@currentseries}{before}%
+    {\@annot at start@print}%
+    {}%
   \wrap at edcrossref{\@this at crossref@start}{%
     \ifledRcol@%
       \linenumrepR{#2}%
@@ -13442,6 +13838,9 @@
       \fi%
     }%
   \fi%
+  \ifcsstring{Xendlinenumannotationposition@\@currentseries}{after}%
+    {\@annot at start@print}%
+    {}%
 %    \end{macrocode}
 % Close the box.
 %    \begin{macrocode}
@@ -13484,8 +13883,11 @@
        }%
     \fi%
 %    \end{macrocode}
-% Print the ending line number, with, if needed, the line prefix, and followed by the side flag and the subline number.
+% Print the ending line number, with, if needed, the line prefix, and followed by the side flag, the subline number, and line number annotation.
 %    \begin{macrocode}
+    \ifcsstring{Xendlinenumannotationposition@\@currentseries}{before}%
+      {\@annot at end@print}%
+      {}%
     \ifl at d@elin%
       \ifl at d@pnum\csuse{Xendlineprefixsingle@\@currentseries}\fi%
       \wrap at edcrossref{\@this at crossref@end}{%
@@ -13509,6 +13911,9 @@
         \fi%
       }%
     \fi%
+    \ifcsstring{Xendlinenumannotationposition@\@currentseries}{after}%
+      {\@annot at end@print}%
+      {}%
   \fi%
 %    \end{macrocode}
 % Close the ending line box.
@@ -13652,6 +14057,7 @@
       \csgdef{Xlemmafont@#1}{}%
       \csgdef{Xwraplemma@#1}{}
       \csgdef{Xwidth@#1}{\hsize}%
+      \csgdef{Xwraplinenumannotation@#1}{\textsuperscript}%
 %    \end{macrocode}
 % \subsubsection{Create inserts, needed to add notes in foot}
 % As regards inserts, see chapter 15 of \thetexbook\ by D. Knuth.
@@ -13699,6 +14105,7 @@
                       \unexpanded{\def\@this at crossref@start}{\theedtext:start}%
                       \unexpanded{\def\@this at crossref@end}{\theedtext:end}%
                       \expandonce{\@beforeinsertofthisedtext}% Internal for now, no reason to make it public
+                      \noexpand\parse at annot\l at current@annot|%
                       \noexpand\csuse{v#1footnote}{#1}%
                        {{\l at d@nums}{\expandonce\@tag}{\expandonce\content}}%
                       \noexpand\Xnote at false% 
@@ -13739,6 +14146,7 @@
                       \unexpanded{\def\@this at crossref@start}{\theedtext:start}%
                       \unexpanded{\def\@this at crossref@end}{\theedtext:end}%
                       \expandonce{\@beforeinsertofthisedtext}%Internal for now, no reason to make it public
+                      \noexpand\parse at annot\l at current@annot|%
                       \noexpand\csuse{v#1footnote}%
                          {#1}%
                          {{\l at d@nums}{\expandonce\@tag}{\expandonce\content}}%
@@ -13813,6 +14221,7 @@
       \csgdef{txtbeforenotesX@#1}{}%
       \newtoggle{txtbeforesnotesX@#1 at typeset}%Not directly used by user, but internal
       \newtoggle{txtbeforenotesonlyonceX@#1}%
+      \csgdef{Xlinenumannotationposition@#1}{after}%
 % End of for familiar footnotes.
 % \subsubsection{Create inserts, needed to add notes in foot}
 % As regards inserts, see chapter 15 of the TeXBook by D. Knuth.
@@ -13961,7 +14370,10 @@
          \newcommand{\content}{##2}%
          \stepcounter{labidx}%
          \expandafter\immediate\expandafter\write\csname l at d@#1end\endcsname{%
-         \unexpanded{\def\sw at list@inedtext}{\expandafter\unexpanded\expandafter{\sw at inthisedtext}}\@percentchar\space%Explicit space, to add a linebreak in the output file
+           \unexpanded{\def\sw at list@inedtext}%
+           {\expandafter\unexpanded\expandafter{\sw at inthisedtext}}%
+           \@percentchar\space%Explicit space, to add a linebreak in the output file
+           \noexpand\parse at annot\l at current@annot|\@percentchar\space%
            \expandafter\string\csname #1end\endcsname%
            {\ifnumberedpar@\l at d@nums\fi}%
            {\ifnumberedpar@\expandonce\@tag\fi}%
@@ -14067,6 +14479,9 @@
       \newtoggle{Xendlineflag@#1}
      
       \csgdef{Xendlemmafont@#1}{}%
+
+      \csgdef{Xendlinenumannotationposition@#1}{after}%
+      \csgdef{Xendwraplinenumannotation@#1}{\textsuperscript}%
       
       \newtoggle{Xendpagenumberonlyfirst@#1}%
       \newtoggle{Xendpagenumberonlyfirstifsingle@#1}%
@@ -14365,7 +14780,6 @@
   
   \newhookcommand at series{Xafternote}%
   \newhookcommand at series{Xparafootsep}
-  
   \newhookcommand at series@reload{Xwidth}{critical}%
   
   \ifundef{\Xhsize}%
@@ -14377,6 +14791,9 @@
     }%
     {}%
 \fi
+%    \end{macrocode}
+% Now, hooks for critical notes which also apply to crossreferencing and line numbering at the sides of the page. 
+%    \begin{macrocode}
 \newhooktoggle at series{Xlineflag}[appref,SEref]
 \newhookcommand at series{Xtwolines}[appref,SEref]
 \newhookcommand at series{Xmorethantwolines}[appref,SEref]
@@ -14385,6 +14802,8 @@
 \newhooktoggle at series{Xtwolinesbutnotmore}[appref,SEref]
 \newhooktoggle at series{Xtwolinesonlyinsamepage}[appref,SEref]
 \newhookcommand at series{Xlinerangeseparator}[appref,SEref]
+\newhookcommand at series{Xlinenumannotationposition}[side,appref,SEref]%
+\newhookcommand at series{Xwraplinenumannotation}[side,ref,appref,SEref]%
 %    \end{macrocode}
 % \subsubsection{Options for familiar notes}
 % Before generating the optional commands for familiar notes, we check the \protect\cs{nofamiliar} option.
@@ -14490,6 +14909,8 @@
 \newhookcommand at series{Xendlineprefixmore}[apprefwithpage,SErefwithpage]
 \newhookcommand at series{Xendsublinesep}[apprefwithpage,SErefwithpage]
 
+\newhookcommand at series{Xendlinenumannotationposition}[apprefwithpage,SErefwithpage]%
+\newhookcommand at series{Xendwraplinenumannotation}[apprefwithpage,SErefwithpage]%
 %    \end{macrocode}
 % \subsection{Hooks for a particular footnote}
 % \begin{macro}{\newhooktoggle at specific}
@@ -14506,8 +14927,8 @@
 % \cs{newhookarg at specific} is a generic command to create argumen hook specific to a note.
 %    \begin{macrocode}
 \newcommand{\newhookarg at specific}[1]{%
-  \define at key[mac]{truefootnoteoption}{#1}{\global\def\linerangesep@{##1}}%When enabling footnote option
-  \define at key[mac]{falsefootnoteoption}{#1}{\global\undef\linerangesep@}%When 
+  \define at key[mac]{truefootnoteoption}{#1}{\csgdef{#1@}{##1}}%When enabling footnote option
+  \define at key[mac]{falsefootnoteoption}{#1}{\global\csundef{#1@}}%When disabling footnote option
 }
 %    \end{macrocode}
 % \end{macro}
@@ -14559,7 +14980,7 @@
 %
 % \begin{macro}{\doxtrafeet}
 % \protect\cs{doxtrafeet} is the code extending \protect\cs{@makecol} to cater for
-% the extra \macpackage feet. We have two categories of extra footnotes.
+% the extra \macpackage\ feet. We have two categories of extra footnotes.
 % By default, we order the footnote inserts so that the regular footnotes of \LaTeX\ are first,
 % then familiar familiar footnotes and finally 
 % the critical footnotes.
@@ -14918,13 +15339,15 @@
 %
 %
 % \begin{macro}{\zz@@@}
-% A convenience macro to zero three labeling counters in one go.
-% \changes{v0.2.1}{2003/08/26}{Minor change to \protect\cs{zz@@@}}
+% \begin{macro}{\zz@@@@}
+% Two convenience macros to zero three / four labeling counters in one go.
 %    \begin{macrocode}
 \newcommand*{\zz@@@}{000|000|000}% Set three counters to zero in one go
+\newcommand*{\zz@@@@}{000|000|000|000}% Set four counters to zero in one go
 
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\edlabel}
 % The \protect\cs{edlabel} command first writes a \protect\cs{@lab} macro to
@@ -14950,7 +15373,7 @@
 % \changes{v0.2.1}{2003/08/26}{Tweaked \protect\cs{edlabel} to get correct page numbers}
 % \changes{v0.14.0}{2012/04/04}{Tweaked \protect\cs{edlabel} to get correct line number if the command is first element of a paragraph.}
 % \changes{v1.18.0}{2015/02/23}{\protect\cs{edlabel} is now defined only one time for both \eledmac and \eledpar}
-% \changes{v2.5.0}{2015/11/13}{Fix a bug when calling\protect\cs{edlabel} in a footnotes of the rightside}
+% \changes{v2.5.0}{2015/11/13}{Fix a bug when calling\protect\cs{edlabel} in a footnotes of the right side}
 %    \begin{macrocode}
 \newcommand*{\edlabel}[1]{%
   \leavevmode%
@@ -14958,7 +15381,7 @@
   \ifboolexpr{bool{ledRcol} or bool{ledRcol@}}{%
     \ifXnote@%
      \protected at write\@auxout{}%
-      {\string\l at dmake@labelsR\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartR|{#1}}%
+      {\string\l at dmake@labelsR\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartR|{#1}}%
       \ifdef{\hypertarget}%
         {\Hy at raisedlink{\hypertarget{#1}{}}}%
         {}%
@@ -14965,7 +15388,7 @@
     \else%
       \write\linenum at outR{\string\@lab}%
       \ifx\labelref at listR\empty%
-        \xdef\label at refs{\zz@@@}%
+        \xdef\label at refs{\zz@@@@}%
       \else%
         \gl at p\labelref at listR\to\label at refs%
       \fi%
@@ -14987,13 +15410,13 @@
     \ifXnote@%
        \ifl at dpairing%pstart or pstartL?
          \protected at write\@auxout{}%
-          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartL|{#1}}%
+          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartL|{#1}}%
           \ifdef{\hypertarget}%
             {\Hy at raisedlink{\hypertarget{#1}{}}}%
             {}%
         \else%
           \protected at write\@auxout{}%
-          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstart|{#1}}%
+          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstart|{#1}}%
           \ifdef{\hypertarget}%
             {\Hy at raisedlink{\hypertarget{#1}{}}}%
             {}%
@@ -15001,7 +15424,7 @@
     \else%
       \write\linenum at out{\string\@lab}%
       \ifx\labelref at list\empty%
-        \xdef\label at refs{\zz@@@}%
+        \xdef\label at refs{\zz@@@@}%
       \else%
         \gl at p\labelref at list\to\label at refs%
       \fi%
@@ -15070,18 +15493,18 @@
 % The initial use of \protect\cs{newcommand} is to catch if \protect\cs{l at dmake@labels}
 % has been previously defined (by a class or package).
 %
-% \verb+#1+ page number, \verb+#2+ line number, \verb-#3- sub-line number, \verb+#4+ absolute line number, \verb+#5+ pstart number, \verb+#6+ label.
+% \verb+#1+ page number, \verb+#2+ line number, \verb-#3- sub-line number, \verb+#4+ absolute line number, \verb+#5+ line number annotation, \verb+#6+ pstart number, \verb+#7+ label.
 %
 %    \begin{macrocode}
 \newcommand*{\l at dmake@labels}{}
-\def\l at dmake@labels#1|#2|#3|#4|#5|#6{%
-  \expandafter\ifx\csname the at label\csuse{XR at prefix}#6\endcsname%
+\def\l at dmake@labels#1|#2|#3|#4|#5|#6|#7{%
+  \expandafter\ifx\csname the at label\csuse{XR at prefix}#7\endcsname%
     \relax%
   \else%
-    \led at warn@DuplicateLabel{\csuse{XR at prefix}#6}%
+    \led at warn@DuplicateLabel{\csuse{XR at prefix}#7}%
   \fi
-  \global\providetoggle{label@#6 at ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side
-  \expandafter\gdef\csname the at label\csuse{XR at prefix}#6\endcsname{#1|#2|#3|#4|#5|\relax}%
+  \global\providetoggle{label@#7 at ledRcol}%False is the default value of this toggle, which tells us whether a label is linked to the right or left side
+  \csgdef{the at label\csuse{XR at prefix}#7}{#1|#2|#3|#4|#5|#6|\relax}%
   \ignorespaces}
 
 %    \end{macrocode}
@@ -15093,7 +15516,7 @@
 %
 %    \begin{macrocode}
 \AtBeginDocument{%
-  \def\l at dmake@labels#1|#2|#3|#4|#5|#6{}%
+  \def\l at dmake@labels#1|#2|#3|#4|#5|#6|#7{}%
 }
 
 %    \end{macrocode}
@@ -15120,17 +15543,24 @@
 \newcommand*{\@lab}{%
   \ifledRcol
     \xright at appenditem{\linenumr at p{\line at numR}|%
-      \ifsublines@ \sublinenumr at p{\subline at numR}\else 0\fi|\the\absline at numR}%
+      \ifsublines@ \sublinenumr at p{\subline at numR}\else 0\fi|%
+      \the\absline at numR|%
+      \current at annot%
+      }%
       \to\labelref at listR
   \else
-    \xright at appenditem{\linenumr at p{\line at num}|%
-      \ifsublines@ \sublinenumr at p{\subline at num}\else 0\fi|\the\absline at num}%
+    \xright at appenditem{%
+      \linenumr at p{\line at num}|%
+      \ifsublines@ \sublinenumr at p{\subline at num}\else 0\fi|%
+      \the\absline at num|%
+      \current at annot%
+      }%
       \to\labelref at list
   \fi}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\applabel}
-% \protect\cs{applabel}, if called in \protect\cs{edtext} will insert automatically both a start and an end label for the current edtext lines.
+% \protect\cs{applabel}, if called in \protect\cs{edtext} will insert automatically both a starting and an ending label for the current edtext lines.
 %    \begin{macrocode}
 \newcommand*{\applabel}[1]{%
   \if at edtext@secondarg@% 
@@ -15144,9 +15574,10 @@
          \led at warn@DuplicateLabel{#1 (applabel)}%
        }%
 %    \end{macrocode}
-% Parse the \protect\cs{edtext} line numbers.
+% Parse the \protect\cs{edtext} line numbers and annotations.
 %    \begin{macrocode}      
      \expandafter\l at dp@rsefootspec\l at d@nums|%
+     \expandafter\parse at annot\l at current@annot|%
 %    \end{macrocode}
 % Use the \LaTeX\  standard hack for label. 
 %    \begin{macrocode}
@@ -15156,29 +15587,29 @@
 %    \begin{macrocode}
       \ifledRcol%
         \protected at write\@auxout{}%
-          {\string\l at dmake@labelsR\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartR|{#1:start}}%
+          {\string\l at dmake@labelsR\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartR|{#1:start}}%
         \ifdef{\hypertarget}%
           {\Hy at raisedlink{\hypertarget{#1:start}{}}}%
           {}%
         \protected at write\@auxout{}%
-          {\string\l at dmake@labelsR\space\l at dparsedendpage|\l at dparsedendline||\l at dparsedendsub|\the\c at pstartR|{#1:end}}%
+          {\string\l at dmake@labelsR\space\l at dparsedendpage|\l at dparsedendline||\l at dparsedendsub||\annot at end|\the\c at pstartR|{#1:end}}%
       \else%
         \ifl at dpairing%pstart or pstartL?
           \protected at write\@auxout{}%
-            {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartL|{#1:start}}%
+            {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartL|{#1:start}}%
           \ifdef{\hypertarget}%
             {\Hy at raisedlink{\hypertarget{#1:start}{}}}%
             {}%
           \protected at write\@auxout{}%
-            {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\the\c at pstartL|{#1:end}}%
+            {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\annot at end|\the\c at pstartL|{#1:end}}%
          \else%
             \protected at write\@auxout{}%
-              {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstart|{#1:start}}%
+              {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstart|{#1:start}}%
             \ifdef{\hypertarget}%
               {\Hy at raisedlink{\hypertarget{#1:start}{}}}%
               {}%
             \protected at write\@auxout{}%
-              {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\the\c at pstart|{#1:end}}%
+              {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\annot at end|\the\c at pstart|{#1:end}}%
          \fi%
       \fi%
 %    \end{macrocode}
@@ -15218,7 +15649,7 @@
 % \begin{macro}{\wrap at edcrossref}
 % \changes{v1.12.1}{2014/08/06}{Fix spurious spaces.}
 % \changes{v1.12.7}{2014/09/07}{\protect\cs{wrap at edcrossref} is now robust}
-% \protect\cs{wrap at edcrossref} is called around all \macpackage crossref commands, except those which start with x. 
+% \protect\cs{wrap at edcrossref} is called around all \macpackage\ crossref commands, except those which start with x. 
 % It adds the hyperlink.
 %    \begin{macrocode}
 \newrobustcmd{\wrap at edcrossref}[2]{%
@@ -15295,17 +15726,35 @@
 %
 % \begin{macro}{\xabslineref}
 % If the specified label exists, \cs{xabslineref} gives its absolute line number.
-% That is used usually only by some \reledmac\ internal macros.
+% This is generally used only by \macpackage\ internal macros.
 %    \begin{macrocode}
 \newcommand*{\xabslineref}[1]{\l at dgetref@num{4}{#1}}%
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\annotationref}
+% \begin{macro}{\xannotationref}
+% If the specified label exists, \cs{edannotationref} gives the line number annotation with which it is associated.
+%    \begin{macrocode}
+\newcommand*{\annotationref}[1]{%
+  \l at dref@undefined{#1}%
+  \wrap at edcrossref{#1}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at ref}{%
+      \l at dgetref@num{5}{#1}%
+    }%
+  }%
+}%
+\newcommand*{\xannotationref}[1]{%
+  \l at dgetref@num{5}{#1}%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
 % \begin{macro}{\pstarteref}
 % \begin{macro}{\xpstartref}
 % If the specified label exists, \protect\cs{pstartref} gives its pstart number.
 %    \begin{macrocode}
-\newcommand*{\pstartref}[1]{\l at dref@undefined{#1}\wrap at edcrossref{#1}{\l at dgetref@num{5}{#1}}}%
-\newcommand*{\xpstartref}[1]{\l at dgetref@num{5}{#1}}%
+\newcommand*{\pstartref}[1]{\l at dref@undefined{#1}\wrap at edcrossref{#1}{\l at dgetref@num{6}{#1}}}%
+\newcommand*{\xpstartref}[1]{\l at dgetref@num{6}{#1}}%
 
 %    \end{macrocode}
 % \end{macro}
@@ -15313,7 +15762,7 @@
 % \begin{macro}{\xflagref}
 % \cs{xflagref} finds the side flag of any ref defined with \cs{edlabel}.
 %    \begin{macrocode}
-\newcommand*{\xflagref}[1]{\l at dgetref@num{6}{#1}}%
+\newcommand*{\xflagref}[1]{\l at dgetref@num{7}{#1}}%
 %    \end{macrocode}
 % \end{macro}
 % The next three macros are used by the referencing commands above,
@@ -15359,16 +15808,16 @@
 % penultimate line of \protect\cs{l at dgetref@num}, to
 % keep the `switch-number' separate from the reference numbers.  This
 % \verb"|" is used as another parameter delimiter by \protect\cs{l at dlabel@parse},
-% which extracts the appropriate number from its first arguments.
+% which extracts the appropriate number from its first argument.
 % The \verb"|"-delimited arguments consist of the expanded label-macro
 % (three reference numbers), followed by the switch-number (1,
-% 2, 3, 4 or 5) which defines which of the earlier six numbers to
-% pick out. (It was earlier given as the first argument of
+% 2, 3, 4, 5, 6) which defines which of the former seven numbers to
+% extract. (It was given earlier as the first argument of
 % \protect\cs{l at dgetref@num}.)
 %    \begin{macrocode}
 \newcommand*{\l at dlabel@parse}{}
-\def\l at dlabel@parse#1|#2|#3|#4|#5|#6|#7{%
-  \ifcase #7%
+\def\l at dlabel@parse#1|#2|#3|#4|#5|#6|#7|#8{%
+  \ifcase #8%
   \or #1%
   \or #2%
   \or #3%
@@ -15375,6 +15824,7 @@
   \or #4%
   \or #5%
   \or #6%
+  \or #7%
   \fi}
 %    \end{macrocode}
 % \end{macro}
@@ -15397,23 +15847,45 @@
 %    \begin{macrocode}
 \newcommand*{\xxref}[2]{%
   {%
-   \expandafter\ifx\csname the at label#1\endcsname \relax%
-     \expandafter\let\csname the@@label#1\endcsname\zz@@@%
+   \expandafter\ifx\csname the at label#1\endcsname\relax%
+      \let\@tempa\zz@@@%
+      \def\@tempc{}%
     \else%
-      \expandafter\def\csname the@@label#1\endcsname{\l at dgetref@num{1}{#1}|\l at dgetref@num{2}{#1}|\l at dgetref@num{3}{#1}}%
+      \def\@tempa{%
+        \l at dgetref@num{1}{#1}|%
+        \l at dgetref@num{2}{#1}|%
+        \l at dgetref@num{3}{#1}%
+      }%
+      \edef\@tempc{%
+        \l at dgetref@num{5}{#1}%
+      }%
    \fi%
-   \expandafter\ifx\csname the at label#2\endcsname \relax%
-     \expandafter\let\csname the@@label#2\endcsname\zz@@@%
+   \expandafter\ifx\csname the at label#2\endcsname\relax%
+      \let\@tempb\zz@@@%
+      \def\@tempd{}%
    \else%
-      \expandafter\def\csname the@@label#2\endcsname{\l at dgetref@num{1}{#2}|\l at dgetref@num{2}{#2}|\l at dgetref@num{3}{#2}}%
+      \def\@tempb{%
+        \l at dgetref@num{1}{#2}|%
+        \l at dgetref@num{2}{#2}|%
+        \l at dgetref@num{3}{#2}%
+      }%
+      \edef\@tempd{%
+        \l at dgetref@num{5}{#2}%
+      }%
    \fi%
-   \letcs{\@tempa}{the@@label#1}%
-   \letcs{\@tempb}{the@@label#2}%
-   \global\appto\@beforeinsertofthisedtext{\def\@this at crossref@start{#1}}%
-   \global\appto\@beforeinsertofthisedtext{\def\@this at crossref@end{#2}}%
-   \linenum{\@tempa|%
-    \@tempb}}}%
+   \global\appto\@beforeinsertofthisedtext{%
+     \def\@this at crossref@start{#1}%
+   }%
+   \global\appto\@beforeinsertofthisedtext{%
+     \def\@this at crossref@end{#2}%
+   }%
+   \linenum{\@tempa|\@tempb}%
+   \edef\@tempe{\@tempc|\@tempd}%
+   \expandafter\lineannot\expandafter{\@tempe}%
+ }%
+}%
 
+
 %    \end{macrocode}
 % \end{macro}
 %
@@ -15458,6 +15930,12 @@
 \newtoggle{Xlineflag at SEref}%
 \toggletrue{Xlineflag at SEref}%%Here exception
 
+\def\Xlinenumannotationposition at appref{after}%
+\def\Xlinenumannotationposition at SEref{after}%
+
+\def\Xwraplinenumannotation at appref{\textsuperscript}%
+\def\Xwraplinenumannotation at SEref{\textsuperscript}%
+
 \def\Xendtwolines at apprefwithpage{}%
 \def\Xendtwolines at SErefwithpage{}%
 
@@ -15496,6 +15974,11 @@
 \newtoggle{Xendlineflag at SErefwithpage}
 \toggletrue{Xendlineflag at SErefwithpage}%Here, exception
 
+\def\Xendlinenumannotationposition at apprefwithpage{after}%
+\def\Xendlinenumannotationposition at apprefwithpage@SErefwithpage{after}%
+
+\def\Xendwraplinenumannotation at apprefwithpage{\textsuperscript}%
+\def\Xendwraplinenumannotation at SErefwithpage{\textsuperscript}%
 %    \end{macrocode}
 % Note that some of these hooks are declared but no user command can change their values. Such hooks are not pertinent for \verb+appref+ and \verb+apprefwithpage+ pseudo-series, but their values are nonetheless tested in some  macros.
 %    \begin{macrocode}
@@ -15595,6 +16078,8 @@
    {%
     \def\@this at crossref@start{#2:start}%
     \def\@this at crossref@end{#2:end}%
+    \xdef\annot at start{\xannotationref{#2:start}}%
+    \xdef\annot at end{\xannotationref{#2:end}}%
     \printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|%
     \undef\@this at crossref@end%
     \undef\@this at crossref@start%   
@@ -15738,7 +16223,7 @@
 }%
 %    \end{macrocode}
 % \end{macro}
-% \section{Side notes}
+% \section{Sidenotes}
 %
 %    Regular \protect\cs{marginpar}s do not work inside numbered text\,---\,they
 % do not produce any note but do put an extra unnumbered blank line into
@@ -15767,9 +16252,9 @@
 %    \end{macrocode}
 % \end{macro}
 %
-%  We provide side notes as replacement for \protect\cs{marginpar} in numbered text.
-% \changes{v0.5.0}{2004/04/03}{Added left and right side notes}
-% \changes{v0.5.1}{2004/04/10}{Added moveable side note}
+%  We provide sidenotes as replacement for \protect\cs{marginpar} in numbered text.
+% \changes{v0.5.0}{2004/04/03}{Added left and right sidenotes}
+% \changes{v0.5.1}{2004/04/10}{Added moveable sidenote}
 %
 % \begin{macro}{\sidenote at margin}
 % \begin{macro}{\sidenotemargin}
@@ -15777,7 +16262,7 @@
 % These are the sidenote equivalents to \protect\cs{line at margin} and \protect\cs{linenummargin}
 % for specifying which margin. The default is the right margin (opposite to
 % the default for line numbers).
-% \protect\cs{l at dgetsidenote@margin} returns the number associated to side note margin:
+% \protect\cs{l at dgetsidenote@margin} returns the number associated to sidenote margin:
 % \begin{description}
 %   \item[left:] 0
 %    \item[right:] 1
@@ -16000,7 +16485,7 @@
 % \begin{macro}{\vl at disnote}
 % \begin{macro}{\vl at dosnote}
 % Put the left/right text into boxes, but just save the moveable text.
-% \protect\cs{l at dcsnotetext}, \protect\cs{l at dcsnotetext@l} and \protect\cs{l at dcsnotetext@r} are \protect\package{etoolbox}'s  lists which will store the content of side notes.
+% \protect\cs{l at dcsnotetext}, \protect\cs{l at dcsnotetext@l} and \protect\cs{l at dcsnotetext@r} are \protect\package{etoolbox}'s  lists which will store the content of sidenotes.
 % We store the content in lists, because we need to loop later on them, in case many sidenote co-exist for the same line.
 % That is there some special test to do, in order to:
 % \begin{itemize}
@@ -17057,11 +17542,11 @@
 % \begin{macro}{\ifinstanza}
 % The macro \protect\cs{@hangingsymbol} is used to insert a symbol on each hanging of verses. It is set by user level macro \protect\cs{sethangingsymbol}.
 %
-% For example, in French typography the symbol is `['. We obtain it by the next code:
+% For example, in French typography, the symbol is `['. We obtain it by means of the following code:
 %\begin{verbatim}
 %\sethangingsymbol{[\,}
 %\end{verbatim}
-% The \protect\cs{ifinstanza} boolean is used to be sure that we are in a stanza part.
+% The \protect\cs{ifinstanza} boolean is used to ensure that we are in a stanza part.
 %    \begin{macrocode}
 \def\@hangingsymbol{}
 \newcommand*{\sethangingsymbol}[1]{%
@@ -18153,7 +18638,7 @@
 % \end{macro}
 % \begin{macro}{\disable at sidenotes}
 % \begin{macro}{\restore at sidenotes}
-% The sames, for side notes.
+% The same for sidenotes.
 %    \begin{macrocode}
 \newcommand{\disable at sidenotes}{%
   \let\@@ledrightnote\ledrightnote%
@@ -19372,7 +19857,7 @@
 % \subsection{General overview}
 % The system of \protect\cs{eledxxxx} commands to section text work like this:
 % \begin{enumerate}
-%     \item When one of these commands is called, \macpackage  writes to an auxiliary files:
+%     \item When one of these commands is called, \macpackage\  writes to an auxiliary files:
 %     \begin{itemize}
 %           \item The section level.
 %           \item The section title.
@@ -19380,7 +19865,7 @@
 %           \item The pstart where the command is called.
 %           \item If we have starred version or not.
 %     \end{itemize}
-%   \item \macpackage adds the title of the section to pstart, as  normal content. This is to enable critical notes.
+%   \item \macpackage\ adds the title of the section to pstart, as  normal content. This is to enable critical notes.
 %   \item When \LaTeX\ is run a other time, this file is read. That:
 %    \begin{itemize}
 %         \item Adds the pstart number to a list of pstarts where a sectioning command is used.
@@ -19417,7 +19902,7 @@
 % \subsection{Auxiliary commands}
 % \begin{macro}{\print at leftmargin@eledsection}
 % \begin{macro}{\print at rightmargin@eledsection}
-% \protect\cs{print at leftmargin@eledsection} and \protect\cs{print at rightmargin@eledsection} are added by \macpackage inside the code of sectioning command, in order to affix lines numbers.
+% \protect\cs{print at leftmargin@eledsection} and \protect\cs{print at rightmargin@eledsection} are added by \macpackage\ inside the code of sectioning command, in order to affix lines numbers.
 % They include tests for RTL languages. 
 %    \begin{macrocode}
 \def\print at rightmargin@eledsection{%
@@ -20042,7 +20527,7 @@
 % \section{Long verse: prevents being separated by a page break}
 % \begin{macro}{\iflednopbinverse}
 % The \protect\cs{lednopbinverse} boolean is set to false by default.
-% If set to true, \macpackage will automatically prevent page breaks inside verse.
+% If set to true, \macpackage\ will automatically prevent page breaks inside verse.
 % The declaration is made at the beginning of the file, because it is used as a package option.
 % \end{macro}
 % \begin{macro}{\check at pb@in at verse}
@@ -20074,7 +20559,7 @@
 % The \package{hyperref} package provides a \cs{Hy at raisedlink} command, to be used to add an anchor to the top of a line and not to the bottom of it.\footnote{\url{http://tex.stackexchange.com/a/17138/7712}.}
 %
 % However, this command disrupts the line breaking mechanism when it is called before any word.
-% This is why \macpackage defines \cs{Hy at raisedlink@left} that is called to the left of words, at the beginning of \cs{edtext} or inside the \cs{edlabel} commands.\footnote{The code is inspired by an answer given by @unbonpetit.
+% This is why \macpackage\ defines \cs{Hy at raisedlink@left} that is called to the left of words, at the beginning of \cs{edtext} or inside the \cs{edlabel} commands.\footnote{The code is inspired by an answer given by @unbonpetit.
 % Thanks to him.
 % \url{http://texnique.fr:80/osqa/questions/781/hyraisedlink-perturbe-la-maniere-dont-se-fait-la-coupure-de-ligne/801}.} 
 % 

Modified: trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx	2017-11-12 22:22:03 UTC (rev 45760)
@@ -322,6 +322,7 @@
 % \changes{v2.20.0}{2017/08/17}{Fix compatibility between \protect\option{continuousnumberingwithcolumns} and \protect\cs{numberpstartfalse}.}
 % \changes{v2.20.1}{2017/08/23}{Fix bug with \protect\option{continuousnumberingwithcolumns} when left column and right column have not the same size.}
 % \changes{v2.20.2}{2017/08/31}{Fix bugs with \protect\option{continuousnumberingwithcolumns} when going to a new page}
+% \changes{v2.21.0}{2017/11/11}{Add compatibility with new features of \protect\reledmac 2.26.0}
 % ^^A PW added following as the definitions are at some unknown elsewhere
 %
 % \newcommand{\egstart}{%
@@ -728,8 +729,8 @@
 %
 %The aim of the default setting is twofold:
 %\begin{itemize}
-%\item To ensure that left pages contain what is to be on left sides and
-%that right pages contain what is to be on right sides.
+%\item To ensure that left pages contain what is to be on left side and
+%that right pages contain what is to be on right side.
 %\item To ensure that every chunk starts on the page that is facing its
 %corresponding chunk.
 %\end{itemize}
@@ -1110,9 +1111,9 @@
 %
 % \DescribeMacro{\linenumberLevenifblanktrue}
 % \DescribeMacro{\linenumberRevenifblanktrue}
-% By default, when a blank line is printed on one side, in order to synchronize with the other side, no line number is printed.
-% However, you can decide to print them for blank lines, also.
-% Use \cs{linenumberLevenifblanktrue} to enable it on the left side, and \cs{linenumberRevenifblanktrue} to enable it on right side.
+% By default, when a blank line is printed on one side, no line number is printed for the sake of synchronizing with the other side, .
+% However, line numbers can be printed for blank lines as well.
+% Use \cs{linenumberLevenifblanktrue} to enable this on the left side and \cs{linenumberRevenifblanktrue} for the right side.
 %
 % \subsection{Line flag}
 % \DescribeMacro{\setRlineflag}\label{Rlineflag}
@@ -1367,7 +1368,7 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2017/08/31 v2.20.2 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2017/11/11 v2.21.0 reledmac extension for parallel texts]%
 
 %    \end{macrocode}
 % \subsection{Package's requirement}
@@ -2359,12 +2360,24 @@
   \kern\linenumsep 
   \l at dlinenumR}
 \newcommand*{\l at dlinenumR}{%
-  \numlabfont\linenumrepR{\line at numR}\@Rlineflag%
+  \numlabfont%
+  \ifdefstring{\Xlinenumannotationposition at side}{before}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annotR@\the\absline at numR @\the\section at numR}%
+      }%
+  }{}%
+  \linenumrepR{\line at numR}\@Rlineflag%
   \ifsublines at R
     \ifnum\subline at numR>\z@
       \unskip\fullstop\sublinenumrepR{\subline at numR}%
     \fi
-  \fi}
+  \fi%
+  \ifdefstring{\Xlinenumannotationposition at side}{after}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annotR@\the\absline at numR @\the\section at numR}%
+      }%
+  }{}%
+}%
 
 %    \end{macrocode}
 % \end{macro}
@@ -2407,6 +2420,7 @@
 % \begin{macro}{\insertlines at listR}
 % \begin{macro}{\actionlines at listR}
 % \begin{macro}{\actions at listR}
+% \begin{macro}{\annot at listR}
 % Now we can define the list macros that will be created from the
 % line-list file.  They are directly analogous to the left text ones.
 % The full list of action codes and their meanings is given in the \macpackage 
@@ -2419,12 +2433,13 @@
 \list at create{\insertlines at listR}
 \list at create{\actionlines at listR}
 \list at create{\actions at listR}
-
+\list at create{\annot at listR}%
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\page at numR}
 % The right text page number.
@@ -2514,6 +2529,7 @@
 %    \begin{macrocode}
 \newcommand{\@nl at regR}{%
   \ifx\l at dchset@num\relax \else
+    \reset at current@annot%
     \advance\absline at numR \@ne
     \csgdef{l at dchset@num at R\the\absline at numR}{}%To remember this line have been marked by a \setlinenum
     \set at line@action
@@ -2760,10 +2776,12 @@
     \let\@lab=\relax
     \let\@lemma=\relax
     \let\@sw\@gobblethree%
+    \let\store at annot@to at absline\@gobble%
     #2
     \global\endpage at num=\page at numR
     \global\endline at num=\line at numR
     \global\endsubline at num=\subline at numR
+    \global\let\endcurrent at annot=\current at annot%
   \endgroup
 %    \end{macrocode}
 %
@@ -2775,6 +2793,8 @@
        \ifsublines at R \the\subline at numR \else 0\fi|%
        \the\endpage at num|\the\endline at num|%
        \ifsublines at R \the\endsubline at num \else 0\fi}\to\line at listR
+    \xright at appenditem%
+      {\current at annot|\endcurrent at annot}\to\annot at list%
 %    \end{macrocode}
 % Create a list which will store all the second argument of  each \protect\cs{@sw}
 % in this lemma, at this level.
@@ -4779,7 +4799,7 @@
 % which replaces \protect\cs{print at Xnotes} inside \protect\cs{Pages}. 
 % Here is how we proceed\footnote{See \url{http://tex.stackexchange.com/a/230332/7712}.}:
 % \begin{itemize}
-%    \item If notes are to be printed in both sides, we just proceed the usual way: print the foot starts for the series, then the foot group.
+%    \item If notes are to be printed on both sides, we just proceed the usual way: print the foot starts for the series, then the foot group.
 %    \item If notes are to be printed in the left side, we do these prints only for even pages ; if notes are to be printed in the right side, we do these prints only for odd pages.
 %    \item However, that is not enough. Because the problem does not only consists in printing notes in any particular page. It is also not to put aside room for notes in the pages where we do not want to print them.
 %    To take an example: if some note in the left side is too long by 160pt to be printed in full in the left page, we do not want to put aside 160pt a space for it in the following right page. 
@@ -5033,18 +5053,18 @@
 % \changes{v2.6.0}{2015/11/13}{\protect\cs{@Rlineflag} is not stored directly after the line number, but as a fith argument of \protect\cs{the at labelX}. Can be retrieved by \protect\cs{xflagref}.}
 %
 %    \begin{macrocode}
-\def\l at dmake@labelsR#1|#2|#3|#4|#5|#6{%
-  \expandafter\ifx\csname the at label\csuse{XR at prefix}#6\endcsname%
+\def\l at dmake@labelsR#1|#2|#3|#4|#5|#6|#7{%
+  \expandafter\ifx\csname the at label\csuse{XR at prefix}#7\endcsname%
     \relax%
   \else%
-    \led at warn@DuplicateLabel{\csuse{XR at prefix}#6}%
+    \led at warn@DuplicateLabel{\csuse{XR at prefix}#7}%
   \fi%
-  \expandafter\gdef\csname the at label\csuse{XR at prefix}#6\endcsname{#1|#2|#3|#4|#5|\@Rlineflag}%
-  \global\providetoggle{label@#6 at ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side
-  \global\toggletrue{label@#6 at ledRcol}%
+  \csgdef{the at label\csuse{XR at prefix}#7}{#1|#2|#3|#4|#5|#6|\@Rlineflag}%
+  \global\providetoggle{label@#7 at ledRcol}%False is the default value of this toggle, which tells us whether a label is linked to the right or left side
+  \global\toggletrue{label@#7 at ledRcol}%
   \ignorespaces}
 \AtBeginDocument{%
-  \def\l at dmake@labelsR#1|#2|#3|#4|#5|#6{}%
+  \def\l at dmake@labelsR#1|#2|#3|#4|#5|#6|#7{}%
 }
 
 %    \end{macrocode}
@@ -5063,7 +5083,7 @@
 % \end{macro}
 %
 %
-% \section{Side notes}
+% \section{Sidenotes}
 %
 %    Regular \verb?\marginpar?s do not work inside numbered text --- they
 % do not produce any note but do put an extra unnumbered blank line into

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2017-11-12 22:22:03 UTC (rev 45760)
@@ -25,7 +25,6 @@
 
 
 
-%% \changes{v2.25.0}{2017/11/05}{Add \protect\cs{Xendtxtbeforenotes} hook}
 
 
 
@@ -36,7 +35,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/11/05 v2.25.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/11/11 v2.26.0 typesetting critical editions]%
 \RequirePackage{xkeyval}
 \newif\ifparledgroup
 \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default at series{#1}}
@@ -325,6 +324,15 @@
 \providecommand*{\@gobblethree}[3]{}
 \providecommand*{\@gobblefour}[4]{}
 \providecommand*{\@gobbleseven}[7]{}
+\newcommand{\l at wrap@ifnotemptybox}[2]{%
+  \setbox0=\hbox{#2}%
+  \ifdim\wd0=\z@\else%
+    #1{#2}%
+  \fi%
+}%
+\newcommand{\l at wrapcs@ifnotemptybox}[2]{%
+  \l at wrap@ifnotemptybox{\csname #1\endcsname}{#2}%
+}%
 \ifledfinal
   \newcommand*{\showlemma}[1]{#1}
 \else
@@ -702,7 +710,13 @@
   \ifluatex%
     \textdir TLT%
   \fi%
-  \numlabfont\linenumrep{\line at num}%
+  \numlabfont%
+  \ifdefstring{\Xlinenumannotationposition at side}{before}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annot@\the\absline at num @\the\section at num}%
+      }%
+  }{}%
+  \linenumrep{\line at num}%
   \ifsublines@
     \ifnum\subline at num>0\relax
       \unskip%
@@ -710,6 +724,11 @@
       \sublinenumrep{\subline at num}%
     \fi
   \fi%
+  \ifdefstring{\Xlinenumannotationposition at side}{after}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annot@\the\absline at num @\the\section at num}%
+      }%
+  }{}%
   \egroup%
 }%
 
@@ -730,7 +749,7 @@
 \list at create{\insertlines at list}
 \list at create{\actionlines at list}
 \list at create{\actions at list}
-
+\list at create{\annot at list}%
 \newcount\page at num
 \newcount\endpage at num
 \newcount\endline at num
@@ -832,6 +851,7 @@
 }
 \newcommand*{\@nl at reg}{%
   \ifx\l at dchset@num\relax \else
+    \reset at current@annot%
     \advance\absline at num \@ne
     \csgdef{l at dchset@num@\the\absline at num}{}%To remember this line have been marked by a \setlinenum
     \set at line@action
@@ -1214,10 +1234,12 @@
     \let\@lab=\relax
     \let\@lemma=\relax%
     \let\@sw\@gobblethree%
+    \let\store at annot@to at absline\@gobble%
     #2
     \global\endpage at num=\page at num
     \global\endline at num=\line at num
     \global\endsubline at num=\subline at num
+    \global\let\endcurrent at annot=\current at annot%
   \endgroup
     \xright at appenditem%
       {\the\page at num|\the\line at num|%
@@ -1224,6 +1246,8 @@
        \ifsublines@ \the\subline at num \else 0\fi|%
        \the\endpage at num|\the\endline at num|%
        \ifsublines@ \the\endsubline at num \else 0\fi}\to\line at list
+    \xright at appenditem%
+      {\current at annot|\endcurrent at annot}\to\annot at list%
      \@ref at reg@parse{#2}%
   \global\advance\@edtext at level by -1%
 }
@@ -1404,12 +1428,15 @@
 \newcommand*{\setline}[1]{%
  \leavevmode%
   \ifnum#1<\z@
-    \led at warn@BadSetline
-  \else
-    \ifledRcol \write\linenum at outR{\string\@set[#1]}%
-    \else      \write\linenum at out{\string\@set[#1]}%
-    \fi
-  \fi}
+    \led at warn@BadSetline%
+  \else%
+    \ifledRcol%
+      \write\linenum at outR{\string\@set[#1]}%
+    \else%
+      \write\linenum at out{\string\@set[#1]}%
+    \fi%
+  \fi%
+}%
 
 
 \newcommand*{\setlinenum}[1]{%
@@ -1463,6 +1490,7 @@
   \let\edtext=\dummy at edtext
   \let\edindex\dummy at edindex%
   \l at dtabnoexpands
+  \let\linenumannotation=\@gobble%
   \morenoexpands}
 \let\morenoexpands=\relax
 
@@ -1551,6 +1579,13 @@
       \xdef\l at d@nums{\@tempb|\edfont at info}%
       \global\let\@tempb=\undefined
     \fi
+    \ifx\annot at listR\empty%
+      \xdef\l at current@annotR{|}%
+    \else%
+      \gl at p\annot at listR\to\@tempb%
+      \xdef\l at current@annotR{\@tempb}%
+      \global\let\@tempb=\undefined%
+    \fi%
   \else
     \ifx\line at list\empty
       \global\noteschanged at true
@@ -1560,6 +1595,13 @@
       \xdef\l at d@nums{\@tempb|\edfont at info}%
       \global\let\@tempb=\undefined
     \fi
+    \ifx\annot at list\empty%
+      \xdef\l at current@annot{|}%
+    \else%
+      \gl at p\annot at list\to\@tempb%
+      \xdef\l at current@annot{\@tempb}%
+      \global\let\@tempb=\undefined%
+    \fi%
   \fi}
 
 \newcommand*{\edfont at info}{\f at encoding/\f at family/\f at series/\f at shape}
@@ -1592,6 +1634,19 @@
   \fi}
 \newcommand{\l at d@add}[1]{\xdef\l at d@nums{\l at d@nums#1}}
 
+\newcommand*{\lineannot}[1]{%
+  \lineannot at set#1|%
+}%
+\def\lineannot at set#1|#2|{%
+  \expandafter\parse at annot#1|#2|%
+  \IfStrEq{#1}{}%
+    {\let\@tempa\annot at start}%
+    {\def\@tempa{#1}}%
+  \IfStrEq{#2}{}%
+    {\let\@tempb\annot at start}%
+    {\def\@tempb{#2}}%
+  \xdef\l at current@annot{\@tempa|\@tempb}%
+}%
 \newcommand{\get at sw@txt}[1]{%
   \begingroup%
     \swnoexpands%
@@ -2169,6 +2224,36 @@
     \led at warn@BadAction
   \fi}
 
+\newcommand{\linenumannotation}[1]{%
+  \leavevmode%In case it begins with a \pstart, ensure the \@annot is written after \@nl
+  \ifledRcol%
+    \write\linenum at outR{\string\@annot[#1]}%
+  \else%
+    \write\linenum at out{\string\@annot[#1]}%
+  \fi%
+}%
+\def\Xlinenumannotationposition at side{after}%
+\def\Xwraplinenumannotation at ref{\textsuperscript}%
+\def\Xwraplinenumannotation at side{\textsuperscript}%
+\newcommand{\@annot}[1]{%
+  \store at annot@to at absline{#1}%
+  \def\current at annot{#1}%
+}%
+\newcommand{\store at annot@to at absline}[1]{%
+  \ifledRcol%
+    \csgappto{annotR@\the\absline at numR @\the\section at numR}{#1}%
+  \else%
+    \csgappto{annot@\the\absline at num @\the\section at num}{#1}%
+  \fi%
+}%
+\let\current at annot=\empty%
+\newcommand{\reset at current@annot}{%
+  \let\current at annot\empty%
+}%
+\def\parse at annot#1|#2|{%
+  \gdef\annot at start{#1}%
+  \gdef\annot at end{#2}%
+}%
 \newcommand*{\affixline at num}{%
   \ifledgroupnotesL@\else
     \ifnumberline
@@ -2508,7 +2593,7 @@
 
 \newcommand*{\footnoteoptions@}[3]{%
    \def\do##1{%
-      \ifstrequal{#1}{L}{% In Leftside
+      \ifstrequal{#1}{L}{% On the left side
           \xright at appenditem{\noexpand\setkeys[mac]{#3footnoteoption}{\unexpanded{##1}}}\to\inserts at list%
          \global\advance\insert at count \@ne% Increment the left insert counter.
       }%
@@ -3285,6 +3370,8 @@
 \newif\ifl at d@dash
 \newif\ifl at d@Xtwolines%
 \newif\ifl at d@Xmorethantwolines%
+\let\@annot at start@print\relax%
+\let\@annot at end@print\relax%
 \newcommand*{\l at dparsefootspec}[3]{\l at dp@rsefootspec#1|}
 \def\l at dp@rsefootspec#1|#2|#3|#4|#5|#6|#7|{%
   \gdef\l at dparsedstartpage{#1}%
@@ -3302,7 +3389,11 @@
 \def\l at dparsedendsub{0}%
 
 \newcommand*{\setprintlines}[6]{%
-  \l at d@pnumfalse \l at d@dashfalse
+  \let\@annot at start@print\relax%
+  \let\@annot at end@print\relax%
+  \l at d@pnumfalse%
+  \l at d@dashfalse%
+  \l at d@elinfalse%
   \ifbypage@
      \ifnum#4=#1 \else
         \l at d@pnumtrue
@@ -3309,11 +3400,50 @@
         \l at d@dashtrue
      \fi
   \fi
-  \ifl at d@pnum \l at d@elintrue \else \l at d@elinfalse \fi
-  \ifnum#2=#5 \else
-      \l at d@elintrue
-      \l at d@dashtrue
-  \fi
+  \ifboolexpr{%
+    bool{l at d@pnum}%
+    or not test{\ifnumequal{#2}{#5}}%
+   }{%
+    \l at d@elintrue%
+    \l at d@dashtrue%
+    \unless\ifx\relax\annot at end%
+      \def\@annot at end@print{%
+        \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\annot at end}%
+      }%
+    \fi%
+    }{}%
+  \ifl at d@elin%
+    \def\@annot at start@print{%
+      \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\annot at start}%
+    }%
+  \else%
+    \ifx\annot at start\annot at end%
+      \unless\ifx\@annot at start\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\annot at start}%
+        }%
+      \fi%
+    \else%
+      \ifx\@annot at end@print\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{%
+            \ifx\annot at start\empty\else%
+              \annot at start%
+              \ifdefined\linerangesep@%
+                \linerangesep@%
+              \else%
+                \csuse{Xlinerangeseparator@\@currentseries}%
+              \fi%
+            \fi%
+            \annot at end%
+            }%
+          }%
+       \else%
+         \let\@annot at start@print\@annot at end@print%
+         \let\@annot at end@print\relax%
+      \fi%
+    \fi%
+  \fi%
   \l at d@ssubfalse
   \ifnum#3=0 \else
       \l at d@ssubtrue
@@ -3391,6 +3521,9 @@
   \ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}%
     {\bgroup}%
     {\leavevmode\hbox to \csuse{Xboxstartlinenum@\@currentseries}\bgroup\hfill}%
+  \ifcsstring{Xlinenumannotationposition@\@currentseries}{before}%
+    {\@annot at start@print}%
+    {}%
   \ifl at d@pnum%
     \wrap at edcrossref{\@this at crossref@start}{#1}%
     \csuse{Xpagelinesep@\@currentseries}%
@@ -3403,6 +3536,9 @@
     \csuse{Xsublinesep@\@currentseries}%
     \wrap at edcrossref{\@this at crossref@start}{\sublinenumrep{#3}}%
   \fi
+  \ifcsstring{Xlinenumannotationposition@\@currentseries}{after}%
+    {\@annot at start@print}%
+    {}%
   \egroup%
   \ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
     {\bgroup}%
@@ -3421,6 +3557,9 @@
         \csuse{Xlinerangeseparator@\@currentseries}%
       \fi%
     \fi%
+    \ifcsstring{Xlinenumannotationposition@\@currentseries}{before}%
+      {\@annot at end@print}%
+      {}%
     \ifl at d@pnum%
        \wrap at edcrossref{\@this at crossref@end}{#4}%
        \csuse{Xpagelinesep@\@currentseries}%
@@ -3436,7 +3575,10 @@
          \csuse{Xsublinesep@\@currentseries}%
        \fi%
        \wrap at edcrossref{\@this at crossref@end}{\sublinenumrep{#6}}%
-     \fi%
+    \fi%
+    \ifcsstring{Xlinenumannotationposition@\@currentseries}{after}%
+      {\@annot at end@print}%
+      {}%
   \fi%
   \ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
     {}%
@@ -4521,16 +4663,62 @@
 }%
 }%
 \newcommand*{\setprintendlines}[6]{%
-  \l at d@pnumfalse \l at d@dashfalse
+  \let\@annot at start@print\relax%
+  \let\@annot at end@print\relax%
+  \l at d@pnumfalse%
+  \l at d@dashfalse%
+  \l at d@elinfalse%
   \ifnum#4=#1 \else
     \l at d@pnumtrue
     \l at d@dashtrue
   \fi
-  \ifl at d@pnum \l at d@elintrue \else \l at d@elinfalse \fi
-  \ifnum#2=#5 \else
+  \ifboolexpr{%
+      bool{l at d@pnum}%
+      or not test{\ifnumequal{#2}{#5}}%
+     }{%
+      \l at d@elintrue%
+      \l at d@dashtrue%
       \l at d@elintrue
       \l at d@dashtrue
-  \fi
+      \unless\ifx\relax\annot at end%
+        \def\@annot at end@print{%
+          \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\annot at end}%
+        }%
+      \fi%
+   }%
+   {}%
+  \ifl at d@elin%
+    \def\@annot at start@print{%
+      \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\annot at start}%
+    }%
+  \else%
+    \ifx\annot at start\annot at end%
+      \unless\ifx\@annot at start\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\annot at start}%
+        }%
+      \fi%
+    \else%
+      \ifx\@annot at end@print\relax%
+        \def\@annot at start@print{%
+          \l at wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{%
+            \ifx\annot at start\empty\else%
+              \annot at start%
+              \ifdefined\linerangesep@%
+                \linerangesep@%
+              \else%
+                \csuse{Xendlinerangeseparator@\@currentseries}%
+              \fi%
+            \fi%
+            \annot at end%
+            }%
+          }%
+       \else%
+         \let\@annot at start@print\@annot at end@print%
+         \let\@annot at end@print\relax%
+      \fi%
+    \fi%
+  \fi%
   \l at d@ssubfalse
   \ifnum#3=0 \else
       \l at d@ssubtrue
@@ -4615,6 +4803,9 @@
   \else%
     \csuse{Xendlineprefixsingle@\@currentseries}%
   \fi%
+  \ifcsstring{Xendlinenumannotationposition@\@currentseries}{before}%
+    {\@annot at start@print}%
+    {}%
   \wrap at edcrossref{\@this at crossref@start}{%
     \ifledRcol@%
       \linenumrepR{#2}%
@@ -4633,6 +4824,9 @@
       \fi%
     }%
   \fi%
+  \ifcsstring{Xendlinenumannotationposition@\@currentseries}{after}%
+    {\@annot at start@print}%
+    {}%
   \egroup%
   \ifdimequal{\csuse{Xendboxendlinenum@\@currentseries}}{0pt}%
     {\bgroup}%
@@ -4662,6 +4856,9 @@
        \wrap at edcrossref{\@this at crossref@end}\printnpnum{#4}%
        }%
     \fi%
+    \ifcsstring{Xendlinenumannotationposition@\@currentseries}{before}%
+      {\@annot at end@print}%
+      {}%
     \ifl at d@elin%
       \ifl at d@pnum\csuse{Xendlineprefixsingle@\@currentseries}\fi%
       \wrap at edcrossref{\@this at crossref@end}{%
@@ -4685,6 +4882,9 @@
         \fi%
       }%
     \fi%
+    \ifcsstring{Xendlinenumannotationposition@\@currentseries}{after}%
+      {\@annot at end@print}%
+      {}%
   \fi%
   \ifdimequal{\csuse{Xendboxendlinenum@\@currentseries}}{0pt}%
     {}%
@@ -4779,6 +4979,7 @@
       \csgdef{Xlemmafont@#1}{}%
       \csgdef{Xwraplemma@#1}{}
       \csgdef{Xwidth@#1}{\hsize}%
+      \csgdef{Xwraplinenumannotation@#1}{\textsuperscript}%
       \expandafter\newinsert\csname #1footins\endcsname%
       \unless\ifnoledgroup@%
         \expandafter\newinsert\csname mp#1footins\endcsname%
@@ -4816,6 +5017,7 @@
                       \unexpanded{\def\@this at crossref@start}{\theedtext:start}%
                       \unexpanded{\def\@this at crossref@end}{\theedtext:end}%
                       \expandonce{\@beforeinsertofthisedtext}% Internal for now, no reason to make it public
+                      \noexpand\parse at annot\l at current@annot|%
                       \noexpand\csuse{v#1footnote}{#1}%
                        {{\l at d@nums}{\expandonce\@tag}{\expandonce\content}}%
                       \noexpand\Xnote at false%
@@ -4856,6 +5058,7 @@
                       \unexpanded{\def\@this at crossref@start}{\theedtext:start}%
                       \unexpanded{\def\@this at crossref@end}{\theedtext:end}%
                       \expandonce{\@beforeinsertofthisedtext}%Internal for now, no reason to make it public
+                      \noexpand\parse at annot\l at current@annot|%
                       \noexpand\csuse{v#1footnote}%
                          {#1}%
                          {{\l at d@nums}{\expandonce\@tag}{\expandonce\content}}%
@@ -4910,6 +5113,7 @@
       \csgdef{txtbeforenotesX@#1}{}%
       \newtoggle{txtbeforesnotesX@#1 at typeset}%Not directly used by user, but internal
       \newtoggle{txtbeforenotesonlyonceX@#1}%
+      \csgdef{Xlinenumannotationposition@#1}{after}%
       \expandafter\newinsert\csname footins#1\endcsname%
       \unless\ifnoledgroup@%
         \expandafter\newinsert\csname mpfootins#1\endcsname%
@@ -4988,7 +5192,10 @@
          \newcommand{\content}{##2}%
          \stepcounter{labidx}%
          \expandafter\immediate\expandafter\write\csname l at d@#1end\endcsname{%
-         \unexpanded{\def\sw at list@inedtext}{\expandafter\unexpanded\expandafter{\sw at inthisedtext}}\@percentchar\space%Explicit space, to add a linebreak in the output file
+           \unexpanded{\def\sw at list@inedtext}%
+           {\expandafter\unexpanded\expandafter{\sw at inthisedtext}}%
+           \@percentchar\space%Explicit space, to add a linebreak in the output file
+           \noexpand\parse at annot\l at current@annot|\@percentchar\space%
            \expandafter\string\csname #1end\endcsname%
            {\ifnumberedpar@\l at d@nums\fi}%
            {\ifnumberedpar@\expandonce\@tag\fi}%
@@ -5073,6 +5280,9 @@
 
       \csgdef{Xendlemmafont@#1}{}%
 
+      \csgdef{Xendlinenumannotationposition@#1}{after}%
+      \csgdef{Xendwraplinenumannotation@#1}{\textsuperscript}%
+
       \newtoggle{Xendpagenumberonlyfirst@#1}%
       \newtoggle{Xendpagenumberonlyfirstifsingle@#1}%
       \newtoggle{Xendpagenumberonlyfirstintwo@#1}%
@@ -5243,7 +5453,6 @@
 
   \newhookcommand at series{Xafternote}%
   \newhookcommand at series{Xparafootsep}
-
   \newhookcommand at series@reload{Xwidth}{critical}%
 
   \ifundef{\Xhsize}%
@@ -5263,6 +5472,8 @@
 \newhooktoggle at series{Xtwolinesbutnotmore}[appref,SEref]
 \newhooktoggle at series{Xtwolinesonlyinsamepage}[appref,SEref]
 \newhookcommand at series{Xlinerangeseparator}[appref,SEref]
+\newhookcommand at series{Xlinenumannotationposition}[side,appref,SEref]%
+\newhookcommand at series{Xwraplinenumannotation}[side,ref,appref,SEref]%
 \unless\ifnofamiliar@
   \newhookcommand at series{wrapcontentX}%
   \newhookcommand at series{beforeinsertingX}%
@@ -5360,6 +5571,8 @@
 \newhookcommand at series{Xendlineprefixmore}[apprefwithpage,SErefwithpage]
 \newhookcommand at series{Xendsublinesep}[apprefwithpage,SErefwithpage]
 
+\newhookcommand at series{Xendlinenumannotationposition}[apprefwithpage,SErefwithpage]%
+\newhookcommand at series{Xendwraplinenumannotation}[apprefwithpage,SErefwithpage]%
 \newcommand{\newhooktoggle at specific}[1]{%
   \newtoggle{#1@}%
   \define at key[mac]{truefootnoteoption}{#1}[]{\global\settoggle{#1@}{true}}%When enabling footnote option
@@ -5366,8 +5579,8 @@
   \define at key[mac]{falsefootnoteoption}{#1}[]{\global\settoggle{#1@}{false}}
 }
 \newcommand{\newhookarg at specific}[1]{%
-  \define at key[mac]{truefootnoteoption}{#1}{\global\def\linerangesep@{##1}}%When enabling footnote option
-  \define at key[mac]{falsefootnoteoption}{#1}{\global\undef\linerangesep@}%When
+  \define at key[mac]{truefootnoteoption}{#1}{\csgdef{#1@}{##1}}%When enabling footnote option
+  \define at key[mac]{falsefootnoteoption}{#1}{\global\csundef{#1@}}%When disabling footnote option
 }
 \newhooktoggle at specific{fulllines}%
 \newhooktoggle at specific{nonum}
@@ -5570,6 +5783,7 @@
 
 \list at create{\labelref at list}
 \newcommand*{\zz@@@}{000|000|000}% Set three counters to zero in one go
+\newcommand*{\zz@@@@}{000|000|000|000}% Set four counters to zero in one go
 
 \newcommand*{\edlabel}[1]{%
   \leavevmode%
@@ -5577,7 +5791,7 @@
   \ifboolexpr{bool{ledRcol} or bool{ledRcol@}}{%
     \ifXnote@%
      \protected at write\@auxout{}%
-      {\string\l at dmake@labelsR\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartR|{#1}}%
+      {\string\l at dmake@labelsR\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartR|{#1}}%
       \ifdef{\hypertarget}%
         {\Hy at raisedlink{\hypertarget{#1}{}}}%
         {}%
@@ -5584,7 +5798,7 @@
     \else%
       \write\linenum at outR{\string\@lab}%
       \ifx\labelref at listR\empty%
-        \xdef\label at refs{\zz@@@}%
+        \xdef\label at refs{\zz@@@@}%
       \else%
         \gl at p\labelref at listR\to\label at refs%
       \fi%
@@ -5601,13 +5815,13 @@
     \ifXnote@%
        \ifl at dpairing%pstart or pstartL?
          \protected at write\@auxout{}%
-          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartL|{#1}}%
+          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartL|{#1}}%
           \ifdef{\hypertarget}%
             {\Hy at raisedlink{\hypertarget{#1}{}}}%
             {}%
         \else%
           \protected at write\@auxout{}%
-          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstart|{#1}}%
+          {\string\l at dmake@labels\space\thepage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstart|{#1}}%
           \ifdef{\hypertarget}%
             {\Hy at raisedlink{\hypertarget{#1}{}}}%
             {}%
@@ -5615,7 +5829,7 @@
     \else%
       \write\linenum at out{\string\@lab}%
       \ifx\labelref at list\empty%
-        \xdef\label at refs{\zz@@@}%
+        \xdef\label at refs{\zz@@@@}%
       \else%
         \gl at p\labelref at list\to\label at refs%
       \fi%
@@ -5659,18 +5873,18 @@
 \def\labelrefsparsesubline#1|#2|#3{#2}%
 \def\labelrefsparseabsline#1|#2|#3{#3}%
 \newcommand*{\l at dmake@labels}{}
-\def\l at dmake@labels#1|#2|#3|#4|#5|#6{%
-  \expandafter\ifx\csname the at label\csuse{XR at prefix}#6\endcsname%
+\def\l at dmake@labels#1|#2|#3|#4|#5|#6|#7{%
+  \expandafter\ifx\csname the at label\csuse{XR at prefix}#7\endcsname%
     \relax%
   \else%
-    \led at warn@DuplicateLabel{\csuse{XR at prefix}#6}%
+    \led at warn@DuplicateLabel{\csuse{XR at prefix}#7}%
   \fi
-  \global\providetoggle{label@#6 at ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side
-  \expandafter\gdef\csname the at label\csuse{XR at prefix}#6\endcsname{#1|#2|#3|#4|#5|\relax}%
+  \global\providetoggle{label@#7 at ledRcol}%False is the default value of this toggle, which tells us whether a label is linked to the right or left side
+  \csgdef{the at label\csuse{XR at prefix}#7}{#1|#2|#3|#4|#5|#6|\relax}%
   \ignorespaces}
 
 \AtBeginDocument{%
-  \def\l at dmake@labels#1|#2|#3|#4|#5|#6{}%
+  \def\l at dmake@labels#1|#2|#3|#4|#5|#6|#7{}%
 }
 
 
@@ -5677,11 +5891,18 @@
 \newcommand*{\@lab}{%
   \ifledRcol
     \xright at appenditem{\linenumr at p{\line at numR}|%
-      \ifsublines@ \sublinenumr at p{\subline at numR}\else 0\fi|\the\absline at numR}%
+      \ifsublines@ \sublinenumr at p{\subline at numR}\else 0\fi|%
+      \the\absline at numR|%
+      \current at annot%
+      }%
       \to\labelref at listR
   \else
-    \xright at appenditem{\linenumr at p{\line at num}|%
-      \ifsublines@ \sublinenumr at p{\subline at num}\else 0\fi|\the\absline at num}%
+    \xright at appenditem{%
+      \linenumr at p{\line at num}|%
+      \ifsublines@ \sublinenumr at p{\subline at num}\else 0\fi|%
+      \the\absline at num|%
+      \current at annot%
+      }%
       \to\labelref at list
   \fi}
 \newcommand*{\applabel}[1]{%
@@ -5693,32 +5914,33 @@
          \led at warn@DuplicateLabel{#1 (applabel)}%
        }%
      \expandafter\l at dp@rsefootspec\l at d@nums|%
+     \expandafter\parse at annot\l at current@annot|%
      \@bsphack%
       \ifledRcol%
         \protected at write\@auxout{}%
-          {\string\l at dmake@labelsR\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartR|{#1:start}}%
+          {\string\l at dmake@labelsR\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartR|{#1:start}}%
         \ifdef{\hypertarget}%
           {\Hy at raisedlink{\hypertarget{#1:start}{}}}%
           {}%
         \protected at write\@auxout{}%
-          {\string\l at dmake@labelsR\space\l at dparsedendpage|\l at dparsedendline||\l at dparsedendsub|\the\c at pstartR|{#1:end}}%
+          {\string\l at dmake@labelsR\space\l at dparsedendpage|\l at dparsedendline||\l at dparsedendsub||\annot at end|\the\c at pstartR|{#1:end}}%
       \else%
         \ifl at dpairing%pstart or pstartL?
           \protected at write\@auxout{}%
-            {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstartL|{#1:start}}%
+            {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstartL|{#1:start}}%
           \ifdef{\hypertarget}%
             {\Hy at raisedlink{\hypertarget{#1:start}{}}}%
             {}%
           \protected at write\@auxout{}%
-            {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\the\c at pstartL|{#1:end}}%
+            {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\annot at end|\the\c at pstartL|{#1:end}}%
          \else%
             \protected at write\@auxout{}%
-              {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\the\c at pstart|{#1:start}}%
+              {\string\l at dmake@labels\space\l at dparsedstartpage|\l at dparsedstartline|\l at dparsedstartsub||\annot at start|\the\c at pstart|{#1:start}}%
             \ifdef{\hypertarget}%
               {\Hy at raisedlink{\hypertarget{#1:start}{}}}%
               {}%
             \protected at write\@auxout{}%
-              {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\the\c at pstart|{#1:end}}%
+              {\string\l at dmake@labels\space\l at dparsedendpage|\l at dparsedendline|\l at dparsedendsub||\annot at end|\the\c at pstart|{#1:end}}%
          \fi%
       \fi%
       \@esphack%
@@ -5768,10 +5990,21 @@
 \newcommand*{\xsublineref}[1]{\l at dgetref@num{3}{#1}}
 
 \newcommand*{\xabslineref}[1]{\l at dgetref@num{4}{#1}}%
-\newcommand*{\pstartref}[1]{\l at dref@undefined{#1}\wrap at edcrossref{#1}{\l at dgetref@num{5}{#1}}}%
-\newcommand*{\xpstartref}[1]{\l at dgetref@num{5}{#1}}%
+\newcommand*{\annotationref}[1]{%
+  \l at dref@undefined{#1}%
+  \wrap at edcrossref{#1}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at ref}{%
+      \l at dgetref@num{5}{#1}%
+    }%
+  }%
+}%
+\newcommand*{\xannotationref}[1]{%
+  \l at dgetref@num{5}{#1}%
+}%
+\newcommand*{\pstartref}[1]{\l at dref@undefined{#1}\wrap at edcrossref{#1}{\l at dgetref@num{6}{#1}}}%
+\newcommand*{\xpstartref}[1]{\l at dgetref@num{6}{#1}}%
 
-\newcommand*{\xflagref}[1]{\l at dgetref@num{6}{#1}}%
+\newcommand*{\xflagref}[1]{\l at dgetref@num{7}{#1}}%
 \newcommand*{\l at dref@undefined}[1]{%
   \expandafter\ifx\csname the at label#1\endcsname\relax
     \led at warn@RefUndefined{#1}%
@@ -5787,8 +6020,8 @@
   \fi}
 
 \newcommand*{\l at dlabel@parse}{}
-\def\l at dlabel@parse#1|#2|#3|#4|#5|#6|#7{%
-  \ifcase #7%
+\def\l at dlabel@parse#1|#2|#3|#4|#5|#6|#7|#8{%
+  \ifcase #8%
   \or #1%
   \or #2%
   \or #3%
@@ -5795,25 +6028,47 @@
   \or #4%
   \or #5%
   \or #6%
+  \or #7%
   \fi}
 \newcommand*{\xxref}[2]{%
   {%
-   \expandafter\ifx\csname the at label#1\endcsname \relax%
-     \expandafter\let\csname the@@label#1\endcsname\zz@@@%
+   \expandafter\ifx\csname the at label#1\endcsname\relax%
+      \let\@tempa\zz@@@%
+      \def\@tempc{}%
     \else%
-      \expandafter\def\csname the@@label#1\endcsname{\l at dgetref@num{1}{#1}|\l at dgetref@num{2}{#1}|\l at dgetref@num{3}{#1}}%
+      \def\@tempa{%
+        \l at dgetref@num{1}{#1}|%
+        \l at dgetref@num{2}{#1}|%
+        \l at dgetref@num{3}{#1}%
+      }%
+      \edef\@tempc{%
+        \l at dgetref@num{5}{#1}%
+      }%
    \fi%
-   \expandafter\ifx\csname the at label#2\endcsname \relax%
-     \expandafter\let\csname the@@label#2\endcsname\zz@@@%
+   \expandafter\ifx\csname the at label#2\endcsname\relax%
+      \let\@tempb\zz@@@%
+      \def\@tempd{}%
    \else%
-      \expandafter\def\csname the@@label#2\endcsname{\l at dgetref@num{1}{#2}|\l at dgetref@num{2}{#2}|\l at dgetref@num{3}{#2}}%
+      \def\@tempb{%
+        \l at dgetref@num{1}{#2}|%
+        \l at dgetref@num{2}{#2}|%
+        \l at dgetref@num{3}{#2}%
+      }%
+      \edef\@tempd{%
+        \l at dgetref@num{5}{#2}%
+      }%
    \fi%
-   \letcs{\@tempa}{the@@label#1}%
-   \letcs{\@tempb}{the@@label#2}%
-   \global\appto\@beforeinsertofthisedtext{\def\@this at crossref@start{#1}}%
-   \global\appto\@beforeinsertofthisedtext{\def\@this at crossref@end{#2}}%
-   \linenum{\@tempa|%
-    \@tempb}}}%
+   \global\appto\@beforeinsertofthisedtext{%
+     \def\@this at crossref@start{#1}%
+   }%
+   \global\appto\@beforeinsertofthisedtext{%
+     \def\@this at crossref@end{#2}%
+   }%
+   \linenum{\@tempa|\@tempb}%
+   \edef\@tempe{\@tempc|\@tempd}%
+   \expandafter\lineannot\expandafter{\@tempe}%
+ }%
+}%
 
 \def\Xtwolines at appref{}%
 \def\Xtwolines at SEref{}%
@@ -5842,6 +6097,12 @@
 \newtoggle{Xlineflag at SEref}%
 \toggletrue{Xlineflag at SEref}%%Here exception
 
+\def\Xlinenumannotationposition at appref{after}%
+\def\Xlinenumannotationposition at SEref{after}%
+
+\def\Xwraplinenumannotation at appref{\textsuperscript}%
+\def\Xwraplinenumannotation at SEref{\textsuperscript}%
+
 \def\Xendtwolines at apprefwithpage{}%
 \def\Xendtwolines at SErefwithpage{}%
 
@@ -5879,7 +6140,12 @@
 \newtoggle{Xendlineflag at SErefwithpage}
 \toggletrue{Xendlineflag at SErefwithpage}%Here, exception
 
+\def\Xendlinenumannotationposition at apprefwithpage{after}%
+\def\Xendlinenumannotationposition at apprefwithpage@SErefwithpage{after}%
 
+\def\Xendwraplinenumannotation at apprefwithpage{\textsuperscript}%
+\def\Xendwraplinenumannotation at SErefwithpage{\textsuperscript}%
+
 \gdef\Xboxstartlinenum at appref{0pt}
 \gdef\Xboxstartlinenum at SEref{0pt}
 
@@ -5962,6 +6228,8 @@
    {%
     \def\@this at crossref@start{#2:start}%
     \def\@this at crossref@end{#2:end}%
+    \xdef\annot at start{\xannotationref{#2:start}}%
+    \xdef\annot at end{\xannotationref{#2:end}}%
     \printlines\xpageref{#2:start}|\xlineref{#2:start}|\xsublineref{#2:start}|\xpageref{#2:end}|\xlineref{#2:end}|\xsublineref{#2:end}|\relax|\xflagref{#2:start}|%
     \undef\@this at crossref@end%
     \undef\@this at crossref@start%

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty	2017-11-12 22:21:33 UTC (rev 45759)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty	2017-11-12 22:22:03 UTC (rev 45760)
@@ -28,7 +28,7 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2017/08/31 v2.20.2 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2017/11/11 v2.21.0 reledmac extension for parallel texts]%
 
 \RequirePackage{xspace}%
 \RequirePackage{xkeyval}
@@ -503,12 +503,24 @@
   \kern\linenumsep
   \l at dlinenumR}
 \newcommand*{\l at dlinenumR}{%
-  \numlabfont\linenumrepR{\line at numR}\@Rlineflag%
+  \numlabfont%
+  \ifdefstring{\Xlinenumannotationposition at side}{before}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annotR@\the\absline at numR @\the\section at numR}%
+      }%
+  }{}%
+  \linenumrepR{\line at numR}\@Rlineflag%
   \ifsublines at R
     \ifnum\subline at numR>\z@
       \unskip\fullstop\sublinenumrepR{\subline at numR}%
     \fi
-  \fi}
+  \fi%
+  \ifdefstring{\Xlinenumannotationposition at side}{after}{%
+    \l at wrap@ifnotemptybox{\Xwraplinenumannotation at side}{%
+      \csuse{annotR@\the\absline at numR @\the\section at numR}%
+      }%
+  }{}%
+}%
 
 \newcount\line at numR
 \newcount\subline at numR
@@ -519,7 +531,7 @@
 \list at create{\insertlines at listR}
 \list at create{\actionlines at listR}
 \list at create{\actions at listR}
-
+\list at create{\annot at listR}%
 \newcount\page at numR
 
 \list at create{\linesinpar at listL}
@@ -547,6 +559,7 @@
 }%
 \newcommand{\@nl at regR}{%
   \ifx\l at dchset@num\relax \else
+    \reset at current@annot%
     \advance\absline at numR \@ne
     \csgdef{l at dchset@num at R\the\absline at numR}{}%To remember this line have been marked by a \setlinenum
     \set at line@action
@@ -657,10 +670,12 @@
     \let\@lab=\relax
     \let\@lemma=\relax
     \let\@sw\@gobblethree%
+    \let\store at annot@to at absline\@gobble%
     #2
     \global\endpage at num=\page at numR
     \global\endline at num=\line at numR
     \global\endsubline at num=\subline at numR
+    \global\let\endcurrent at annot=\current at annot%
   \endgroup
     \xright at appenditem%
       {\the\page at numR|\the\line at numR|%
@@ -667,6 +682,8 @@
        \ifsublines at R \the\subline at numR \else 0\fi|%
        \the\endpage at num|\the\endline at num|%
        \ifsublines at R \the\endsubline at num \else 0\fi}\to\line at listR
+    \xright at appenditem%
+      {\current at annot|\endcurrent at annot}\to\annot at list%
      \expandafter\list at create\expandafter{\csname sw at list@edtext at tmp@\the\@edtext at level\endcsname}%
      \@ref at reg@parseR{#2}%
      \global\advance\@edtext at level by -1%
@@ -1941,18 +1958,18 @@
 }%
 \list at create{\labelref at listR}
 
-\def\l at dmake@labelsR#1|#2|#3|#4|#5|#6{%
-  \expandafter\ifx\csname the at label\csuse{XR at prefix}#6\endcsname%
+\def\l at dmake@labelsR#1|#2|#3|#4|#5|#6|#7{%
+  \expandafter\ifx\csname the at label\csuse{XR at prefix}#7\endcsname%
     \relax%
   \else%
-    \led at warn@DuplicateLabel{\csuse{XR at prefix}#6}%
+    \led at warn@DuplicateLabel{\csuse{XR at prefix}#7}%
   \fi%
-  \expandafter\gdef\csname the at label\csuse{XR at prefix}#6\endcsname{#1|#2|#3|#4|#5|\@Rlineflag}%
-  \global\providetoggle{label@#6 at ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side
-  \global\toggletrue{label@#6 at ledRcol}%
+  \csgdef{the at label\csuse{XR at prefix}#7}{#1|#2|#3|#4|#5|#6|\@Rlineflag}%
+  \global\providetoggle{label@#7 at ledRcol}%False is the default value of this toggle, which tells us whether a label is linked to the right or left side
+  \global\toggletrue{label@#7 at ledRcol}%
   \ignorespaces}
 \AtBeginDocument{%
-  \def\l at dmake@labelsR#1|#2|#3|#4|#5|#6{}%
+  \def\l at dmake@labelsR#1|#2|#3|#4|#5|#6|#7{}%
 }
 
 \WithSuffix\newcommand\sidenotemargin*[1]{%



More information about the tex-live-commits mailing list