summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-28 21:22:46 +0000
committerKarl Berry <karl@freefriends.org>2015-07-28 21:22:46 +0000
commitc65913468995f3769a911d824a76b042b8eace47 (patch)
tree3bd6110bf03b85401cc465ffc7faf46c6ccc4ba5 /Master
parentd2c4b12ffaab0820a6557bf6043ccb9a3abcd0e1 (diff)
reledmac (28jul15)
git-svn-id: svn://tug.org/texlive/trunk@37985 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/README2
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx8
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdfbin17291 -> 17240 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdfbin20226 -> 20195 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdfbin21111 -> 21109 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdfbin17358 -> 17357 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdfbin17612 -> 17609 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdfbin20902 -> 20903 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdfbin19893 -> 19897 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdfbin17093 -> 17089 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdfbin31603 -> 31600 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdfbin26000 -> 25999 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdfbin23191 -> 23147 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdfbin22800 -> 22796 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdfbin17140 -> 17140 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdfbin26221 -> 26219 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdfbin12224 -> 12223 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdfbin39708 -> 39708 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdfbin23160 -> 23164 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdfbin18431 -> 18430 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdfbin21170 -> 21173 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdfbin29587 -> 29592 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdfbin36483 -> 36485 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdfbin31711 -> 31714 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdfbin59060 -> 59059 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdfbin22718 -> 22718 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdfbin18991 -> 18941 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdfbin22222 -> 22219 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdfbin16239 -> 16237 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/migration.pdfbin81998 -> 76837 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/reledmac.pdfbin816468 -> 1010680 bytes
-rw-r--r--Master/texmf-dist/doc/latex/reledmac/reledpar.pdfbin328034 -> 395916 bytes
-rw-r--r--Master/texmf-dist/source/latex/reledmac/migration.dtx35
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx3445
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx1322
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty7
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty97
37 files changed, 2512 insertions, 2404 deletions
diff --git a/Master/texmf-dist/doc/latex/reledmac/README b/Master/texmf-dist/doc/latex/reledmac/README
index 0e221822b56..c16581a579a 100644
--- a/Master/texmf-dist/doc/latex/reledmac/README
+++ b/Master/texmf-dist/doc/latex/reledmac/README
@@ -89,7 +89,7 @@ Help
- [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/rledmac) and
+ (https://tex.stackexchange.com/questions/tagged/eledmac) and
(https://tex.stackexchange.com/questions/tagged/ledmac)
Debug and feature requests
diff --git a/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx b/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
index dbd113e2e54..56501c3fa34 100644
--- a/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
+++ b/Master/texmf-dist/doc/latex/reledmac/doc-include/migrate-mac.dtx
@@ -219,12 +219,12 @@
% \subsubsection{Risk of `no room for a new'}
% The risk to obtain a `no room for a new something' error is greater in \reledmac than it is in \eledmac. See \reff{noroom} in order to know how to limit it.
% \subsubsection{Multiple indices with memoir}
-% \Eledmac and \ledmac used the specific indexing tools of the \Lclass{memoir} class designed to produce multiple indices.
-% However, \eledmac could also use \Lpack{imakeidx} or \Lpack{indextools} tools independently of the \Lclass{memoir} class.
+% \Eledmac and \ledmac used the specific indexing tools of the \ltxclass{memoir} class designed to produce multiple indices.
+% However, \eledmac could also use \package{imakeidx} or \package{indextools} tools independently of the \ltxclass{memoir} class.
% This system forced to maintain redundant code.
-% Since \reledmac, we use only the \Lpack{imakeidx} or \Lpack{indextools} tools.
+% Since \reledmac, we use only the \package{imakeidx} or \package{indextools} tools.
%
-% Consequently: Users of \Lpack{memoir}are invited to use \Lpack{indextool} or \Lpack{imakeidx} to produce multiple indices.
+% Consequently: Users of \package{memoir}are invited to use \package{indextool} or \package{imakeidx} to produce multiple indices.
% \subsubsection{Deprecated commands and options}
%The table of deprecated commands and their alternatives follows.
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
index b60baf1f229..8a8604cfd79 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
index 7115c404e5e..a235953639f 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
index a8dc197cec1..f2af8d64ae8 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
index e40c7c3caa5..4a4091a8044 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
index 1d6dafa2ff5..6ccde05f794 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
index 16bc01759a0..2821b43ed97 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
index 9cc042b84ec..622b82951de 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
index 99e9aca685a..dd02d9f4fcd 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
index 2c1efb77b55..fbbced43207 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
index 8470bb06d2c..9364bab3c4a 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
index 2f6c9502705..bf753a0df96 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
index 45fa6ef2a4b..71057c6e2ec 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
index 03c551bfecc..e035cf10392 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
index 2ddc3cfa12d..a3fbad371f1 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
index 354ec9b0282..2656d890dc8 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
index 2a8ea5544b3..50785f17a26 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
index 266662b8159..7759b0306e8 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
index 3eb5c8c7fcf..8ef07b8e490 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
index 27538ca738f..9603c356020 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
index f2fcdf18c34..ddb0e7e9a99 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
index 36bca2c23f6..bdb78c7c2fa 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf
index ddd5ec9f192..4ab391c7777 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_page_titles_in_line_numbering_with_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
index 95bf8bd87c9..cb37f87ad8d 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
index 823855f4c64..9e6148b10d3 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
index 1388a46e87a..f8c3b6de5fb 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
index 970637a39c1..3d102060d29 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
index ce85b4d927b..efabdb4a9db 100644
--- a/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/migration.pdf b/Master/texmf-dist/doc/latex/reledmac/migration.pdf
index 56700782f80..c81a0623c6c 100644
--- a/Master/texmf-dist/doc/latex/reledmac/migration.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/migration.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf b/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
index 5354e549cea..eab74755fd1 100644
--- a/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf b/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
index f32a9183c30..8aba02a8234 100644
--- a/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
+++ b/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/reledmac/migration.dtx b/Master/texmf-dist/source/latex/reledmac/migration.dtx
index 7d26165e23c..0823da6cf68 100644
--- a/Master/texmf-dist/source/latex/reledmac/migration.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/migration.dtx
@@ -32,6 +32,7 @@
]{hyperref}
\usepackage[mono=false]{libertine}
\usepackage{reledmac}
+\usepackage{doctools}
\usepackage[english]{babel}
\usepackage{xspace}
\usepackage{graphicx,metalogo}
@@ -39,28 +40,26 @@
\pagestyle{headings}
\setcounter{StandardModuleDepth}{1}
\usepackage{longtable}
- \newcommand{\Lpack}[1]{\textsf{#1}}
- \newcommand{\Lclass}[1]{\textsf{#1}}
- \newcommand{\file}[1]{\texttt{#1}}
- \newcommand{\edmac}{\Lpack{edmac}\xspace}
- \newcommand{\tabmac}{\Lpack{tabmac}\xspace}
- \newcommand{\edstanza}{\Lpack{edstanza}\xspace}
- \newcommand{\ledmac}{\Lpack{ledmac}\xspace}
- \newcommand{\Ledmac}{\Lpack{Ledmac}\xspace}
- \newcommand{\ledpar}{\Lpack{ledpar}\xspace}
- \newcommand{\Ledpar}{\Lpack{Ledpar}\xspace}
+ \newcommand{\edmac}{\protect\package{edmac}\xspace}
+ \newcommand{\tabmac}{\protect\package{tabmac}\xspace}
+ \newcommand{\edstanza}{\protect\package{edstanza}\xspace}
+ \newcommand{\ledmac}{\protect\package{ledmac}\xspace}
+ \newcommand{\Ledmac}{\protect\package{Ledmac}\xspace}
+ \newcommand{\ledpar}{\protect\package{ledpar}\xspace}
+ \newcommand{\Ledpar}{\protect\package{Ledpar}\xspace}
- \newcommand{\eledmac}{\Lpack{eledmac}\xspace}
- \newcommand{\Eledmac}{\Lpack{Eledmac}\xspace}
- \newcommand{\eledpar}{\Lpack{eledpar}\xspace}
- \newcommand{\Eledpar}{\Lpack{Eledpar}\xspace}
- \newcommand{\reledmac}{\Lpack{reledmac}\xspace}
- \newcommand{\Reledmac}{\Lpack{Reledmac}\xspace}
- \newcommand{\reledpar}{\Lpack{reledpar}\xspace}
- \newcommand{\Reledpar}{\Lpack{Reledpar}\xspace}
+ \newcommand{\eledmac}{\protect\package{eledmac}\xspace}
+ \newcommand{\Eledmac}{\protect\package{Eledmac}\xspace}
+ \newcommand{\eledpar}{\protect\package{eledpar}\xspace}
+ \newcommand{\Eledpar}{\protect\package{Eledpar}\xspace}
+
+ \newcommand{\reledmac}{\protect\package{reledmac}\xspace}
+ \newcommand{\Reledmac}{\protect\package{Reledmac}\xspace}
+ \newcommand{\reledpar}{\protect\package{reledpar}\xspace}
+ \newcommand{\Reledpar}{\protect\package{Reledpar}\xspace}
\let\macpackage\reledmac
\let\parpackage\reledpar
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index a505563df99..7d730d1ccd7 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -29,10 +29,12 @@
% hyperindex=true
hyperindex=false
]{hyperref}
+\addtolength\marginparwidth{30pt}
\usepackage[mono=false]{libertine}
\usepackage[series={A,B},noend,noeledsec,nofamiliar]{reledmac}
\usepackage[english]{babel}
\usepackage{xspace}
+\usepackage{doctools}
\usepackage{graphicx,metalogo}
% Index and Changelog in one column
\makeatletter
@@ -66,7 +68,6 @@
% \fi
%
% \newcommand{\reff}[1]{\ref{#1} p.~\pageref{#1}}
-% \CheckSum{11656}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -150,35 +151,32 @@
% \my@changes#1.\@nil
% }%
%\makeatother
-% \newcommand{\Lpack}[1]{\textsf{#1}}
-% \newcommand{\Lclass}[1]{\textsf{#1}}
-% \newcommand{\file}[1]{\texttt{#1}}
-% \newcommand{\edmac}{\Lpack{edmac}\xspace}
-% \newcommand{\tabmac}{\Lpack{tabmac}\xspace}
-% \newcommand{\edstanza}{\Lpack{edstanza}\xspace}
+% \newcommand{\edmac}{\protect\package{edmac}\xspace}
+% \newcommand{\tabmac}{\protect\package{tabmac}\xspace}
+% \newcommand{\edstanza}{\protect\package{edstanza}\xspace}
-% \newcommand{\ledmac}{\Lpack{ledmac}\xspace}
-% \newcommand{\Ledmac}{\Lpack{Ledmac}\xspace}
-% \newcommand{\ledpar}{\Lpack{ledpar}\xspace}
-% \newcommand{\Ledpar}{\Lpack{Ledpar}\xspace}
+% \newcommand{\ledmac}{\protect\package{ledmac}\xspace}
+% \newcommand{\Ledmac}{\protect\package{Ledmac}\xspace}
+% \newcommand{\ledpar}{\protect\package{ledpar}\xspace}
+% \newcommand{\Ledpar}{\protect\package{Ledpar}\xspace}
-% \newcommand{\eledmac}{\Lpack{eledmac}\xspace}
-% \newcommand{\Eledmac}{\Lpack{Eledmac}\xspace}
-% \newcommand{\eledpar}{\Lpack{eledpar}\xspace}
-% \newcommand{\Eledpar}{\Lpack{Eledpar}\xspace}
+% \newcommand{\eledmac}{\protect\package{eledmac}\xspace}
+% \newcommand{\Eledmac}{\protect\package{Eledmac}\xspace}
+% \newcommand{\eledpar}{\protect\package{eledpar}\xspace}
+% \newcommand{\Eledpar}{\protect\package{Eledpar}\xspace}
-% \newcommand{\reledmac}{\Lpack{reledmac}\xspace}
-% \newcommand{\Reledmac}{\Lpack{Reledmac}\xspace}
-% \newcommand{\reledpar}{\Lpack{reledpar}\xspace}
-% \newcommand{\Reledpar}{\Lpack{Reledpar}\xspace}
+% \newcommand{\reledmac}{\protect\package{reledmac}\xspace}
+% \newcommand{\Reledmac}{\protect\package{Reledmac}\xspace}
+% \newcommand{\reledpar}{\protect\package{reledpar}\xspace}
+% \newcommand{\Reledpar}{\protect\package{Reledpar}\xspace}
% \let\macpackage\reledmac
% \let\parpackage\reledpar
% \let\Macpackage\reledmac
% \let\Parpackage\reledpar
-% \newcommand{\texbook}{\textit{TeXbook}}
-% \newcommand{\thetexbook}{\textit{The TeXbook}}
+% \newcommand{\texbook}{\textit{TeXbook}\xspace}
+% \newcommand{\thetexbook}{\textit{The TeXbook}\xspace}
%
% \newcommand{\egstart}{%
% \par
@@ -204,24 +202,24 @@
% \changes{v0.6.0}{2004/11/16}{Prepared for eledpar package}
% \changes{v0.6.0}{2004/12/10}{Fixed minor typos}
% \changes{v0.7.0}{2005/02/18}{Tidying up for eledpar and ledarab packages}
-% \changes{v0.7.0}{2005/02/18}{Replaced all \cs{interAfootnotelinepenalty}, etc.,
-% by just \cs{interfootnotelinepenalty}}
+% \changes{v0.7.0}{2005/02/18}{Replaced all \protect\cs{interAfootnotelinepenalty}, etc.,
+% by just \protect\cs{interfootnotelinepenalty}}
% \changes{v0.7.0}{2005/03/02}{eledmac having been available for 2 years,
% deleted the commented out original edmac texts}
% \changes{v0.7.0}{2011/06/17}{Ma\"ieul Rouquette new maintainer}
% \changes{v0.8.0}{2011/17/06}{Bug on endnotes fixed: in a // text, all endnotes will print and be placed at the ends of columns (!)}
-% \changes{v0.8.1}{2011/07/14}{Bug on \cs{edtext} ; \cs{critex} ; \cs{lemma} fixed: we can now us non-switching commands}
+% \changes{v0.8.1}{2011/07/14}{Bug on \protect\cs{edtext} ; \protect\cs{critex} ; \protect\cs{lemma} fixed: we can now us non-switching commands}
% \changes{v0.9.0}{2011/08/03}{No more ledpatch. All patches are now in the main file.}
% \changes{v0.9.1}{2011/08/08}{Fix some bugs linked to integrating ledpatch on the main file.}
-% \changes{v0.10.0}{2011/08/22}{Corrections to \cs{section} and other titles in numbered sections}
-% \changes{v0.11.0}{2011/09/16}{Makes it possible to add a symbol on each verse's hanging, as in French typography. Redefines the command \cs{hangingsymbol} to define the character.}
-% \changes{v0.12.0}{2011/10/01}{Possibility to number the pstart with the commands \cs{numberpstarttrue}.}
-% \changes{v0.12.0}{2011/10/01}{For compatibility with eledpar, possibility to use \cs{autopar} on the right side.}
-% \changes{v0.12.1}{2011/10/02}{The numbering of \cs{pstarts} restarts on each \cs{beginnumbering}.}
-% \changes{v0.12.1}{2011/10/02}{Don't number \cs{pstarts} of stanza.}
+% \changes{v0.10.0}{2011/08/22}{Corrections to \protect\cs{section} and other titles in numbered sections}
+% \changes{v0.11.0}{2011/09/16}{Makes it possible to add a symbol on each verse's hanging, as in French typography. Redefines the command \protect\cs{hangingsymbol} to define the character.}
+% \changes{v0.12.0}{2011/10/01}{Possibility to number the pstart with the commands \protect\cs{numberpstarttrue}.}
+% \changes{v0.12.0}{2011/10/01}{For compatibility with eledpar, possibility to use \protect\cs{autopar} on the right side.}
+% \changes{v0.12.1}{2011/10/02}{The numbering of \protect\cs{pstarts} restarts on each \protect\cs{beginnumbering}.}
+% \changes{v0.12.1}{2011/10/02}{Don't number \protect\cs{pstarts} of stanza.}
% \changes{v0.13.0}{2011/11/08}{New stanzaindentsrepetition counter: to repeat stanza indents every \emph{n} verses.}
-% \changes{v0.13.1}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and makes conflicts with memoir class.}
-% \changes{v0.14.0}{2012/04/04}{Tweaked \cs{edlabel} to get correct line number if the command is first element of a paragraph.}
+% \changes{v0.13.1}{2011/11/18}{\protect\cs{thepstartL} and \protect\cs{thepstartR} use now \protect\cs{bfseries} and not \protect\cs{bf}, which is deprecated and makes conflicts with memoir class.}
+% \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.0.0}{2012/09/15}{Some compatibility break with eledmac. Change of name: eledmac.}
% \changes{v1.1.0}{2012/09/25}{New package option: parapparatus.}
% \changes{v1.4.0}{2012/11/16}{Compatibility with LuaTeX of RTL notes.}
@@ -236,81 +234,83 @@
% \changes{v1.8.0}{2013/12/13}{Compatibility with parledgroup option of eledpar package.}
% \changes{v1.8.2}{2014/01/31}{Debug compatibility problem with hebrew option of babel package.}
% \changes{v1.8.3}{2014/02/03}{Fixes spurious spaces added by v1.7.0.}
-% \changes{v1.10.0}{2014/02/27}{Add \cs{pstartref} and \cs{xpstartref} to refer to a pstart number (extension of \cs{edlabel}).}
+% \changes{v1.10.0}{2014/02/27}{Add \protect\cs{pstartref} and \protect\cs{xpstartref} to refer to a pstart number (extension of \protect\cs{edlabel}).}
% \changes{v1.10.1}{2014/02/28}{Compatibility with \textsf{cleveref}.}
% \changes{v1.10.2}{2014/03/17}{Compatibility of stanza with v1.8a of babel-greek.}
% \changes{v1.10.3}{2014/04/07}{Debug of cross-referencing.}
% \changes{v1.10.4}{2014/04/09}{Debug of critical notes in edtabular environnment.}
-% \changes{v1.10.5}{2014/04/14}{Debug of \cs{xxref}.}
-% \changes{v1.10.5}{2014/04/14}{Debug of \cs{pausenumbering}.}
-% \changes{v1.10.6}{2014/05/01}{Debug of interaction between \cs{autopar} and\cs{pausenumbering}.}
+% \changes{v1.10.5}{2014/04/14}{Debug of \protect\cs{xxref}.}
+% \changes{v1.10.5}{2014/04/14}{Debug of \protect\cs{pausenumbering}.}
+% \changes{v1.10.6}{2014/05/01}{Debug of interaction between \protect\cs{autopar} and\protect\cs{pausenumbering}.}
% \changes{v1.11.1}{2014/05/29}{Correct a bug when a critical note starts with plus or minus.}
-% \changes{v1.12.0}{2014/08/05}{Compatibility with \Lpack{musixtex}.}
-% \changes{v1.12.0}{2014/08/05}{Debug eledmac sectioning command after using \cs{resumenumbering}.}
-% \changes{v1.12.3}{2014/08/15}{Underline lemma in \cs{eledxxx} when using draft mode.}
+% \changes{v1.12.0}{2014/08/05}{Compatibility with \protect\package{musixtex}.}
+% \changes{v1.12.0}{2014/08/05}{Debug eledmac sectioning command after using \protect\cs{resumenumbering}.}
+% \changes{v1.12.3}{2014/08/15}{Underline lemma in \protect\cs{eledxxx} when using draft mode.}
% \changes{v1.12.3}{2014/08/15}{Correct bug with side and familiar notes in tabular environments.}
% \changes{v1.12.3}{2014/08/15}{Debug left and right notes (bugs added by 1.12.0)}
-% \changes{v1.12.3}{2014/08/15}{Debug \cs{eledxxx} with some paper size}
-% \changes{v1.12.4}{2014/08/25}{Debug spurious page breaks before \cs{chapter} (bug added in 1.12.0)}
-% \changes{v1.13.1}{2014/09/25}{Debug quotation environment inside of a \cs{pstart} preceded by a sectioning command.}
+% \changes{v1.12.3}{2014/08/15}{Debug \protect\cs{eledxxx} with some paper size}
+% \changes{v1.12.4}{2014/08/25}{Debug spurious page breaks before \protect\cs{chapter} (bug added in 1.12.0)}
+% \changes{v1.13.1}{2014/09/25}{Debug quotation environment inside of a \protect\cs{pstart} preceded by a sectioning command.}
% \changes{v1.13.1}{2014/09/25}{Coming back of page and line breaking penalties's management, deleted by error in v0.17.}
% \changes{v1.13.2}{2014/09/30}{Fix bug with normal footnotes, added by v1.13.0.}
% \changes{v1.13.3}{2014/10/04}{Fix extra spaces with paragraphed footnotes, added by v1.13.0.}
% \changes{v1.13.4}{2014/10/20}{Fix bug with index when memoir class is used without hyperref}
% \changes{v1.15.0}{2015/01/12}{Fix bug with footnotes layout when using some options of the geometry package (bug add by v1.13.0).}
% \changes{v1.16.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
-% \changes{v1.16.0}{2015/01/23}{New \cs{stanzaindent} command.}
+% \changes{v1.16.0}{2015/01/23}{New \protect\cs{stanzaindent} command.}
% \changes{v1.18.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.}
-% \changes{v1.19.0}{2015/03/06}{\cs{Xmaxhnotes} and \cs{maxhnotesX} work now for both two-columns and three-columns setting.}
-% \changes{v1.19.0}{2015/03/06}{Compatibility with \Lpack{eledpar} v.1.13.0.}
-% \changes{v1.19.1}{2015/03/12}{Call \cs{correct@footinsX@box} and \cs{correct@Xfootins@box} directly in \cs{print@notesX@forpages} and \cs{print@Xnotes@forpages}, that is in \Lpack{eledpar}.}
-% \changes{v1.20.0}{2015/03/22}{Correct \cs{Xinplaceofnumber} hook.}
+% \changes{v1.19.0}{2015/03/06}{\protect\cs{Xmaxhnotes} and \protect\cs{maxhnotesX} work now for both two-columns and three-columns setting.}
+% \changes{v1.19.0}{2015/03/06}{Compatibility with \protect\package{eledpar} v.1.13.0.}
+% \changes{v1.19.1}{2015/03/12}{Call \protect\cs{correct@footinsX@box} and \protect\cs{correct@Xfootins@box} directly in \protect\cs{print@notesX@forpages} and \protect\cs{print@Xnotes@forpages}, that is in \protect\package{eledpar}.}
+% \changes{v1.20.0}{2015/03/22}{Correct \protect\cs{Xinplaceofnumber} hook.}
% \changes{v1.20.0}{2015/03/22}{Add series option.}
% \changes{v1.20.0}{2015/03/22}{Fix issues with RTL text in notes when using \LuaLaTeX.}
-% \changes{v1.20.0}{2015/03/22}{The \cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
-% \changes{v1.20.0}{2015/03/22}{Explicit error message when calling \cs{Xfootnote} outside of \cs{edtext}.}
-% \changes{v1.20.0}{2015/03/22}{Fix bug with line number typesetting direction when using \cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
-% \changes{v1.21.0}{2015/04/13}{\cs{AtEveryPstart} and \cs{AtEveryPend} are now compatible with \cs{autopar}}
+% \changes{v1.20.0}{2015/03/22}{The \protect\cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
+% \changes{v1.20.0}{2015/03/22}{Explicit error message when calling \protect\cs{Xfootnote} outside of \protect\cs{edtext}.}
+% \changes{v1.20.0}{2015/03/22}{Fix bug with line number typesetting direction when using \protect\cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend} are now compatible with \protect\cs{autopar}}
% \changes{v1.21.0}{2015/04/13}{Fix bug with space between columns with notes in two columns (bug added in v1.13.0).}
% \changes{v1.21.0}{2015/04/13}{Add nocritical, noend, nofamiliar and noledgroup options.}
-% \changes{v1.21.0}{2015/04/13}{Fix bug with \cs{maxhnotesX} when using \cs{foottwocolX} or \cs{footthreecolX}.}
-% \changes{v1.21.0}{2015/04/13}{Add \cs{Xtwolinesbutnotmore} and \cs{Xtwolinesonlyinsamepage}.}
-% \changes{v1.21.0}{2015/04/13}{Fix bug when a \cs{Xfootnote} follows a \cs{Xendnote} in the second argument of \cs{edtext} (bug added in eledmac 1.0.0 !).}
+% \changes{v1.21.0}{2015/04/13}{Fix bug with \protect\cs{maxhnotesX} when using \protect\cs{foottwocolX} or \protect\cs{footthreecolX}.}
+% \changes{v1.21.0}{2015/04/13}{Add \protect\cs{Xtwolinesbutnotmore} and \protect\cs{Xtwolinesonlyinsamepage}.}
+% \changes{v1.21.0}{2015/04/13}{Fix bug when a \protect\cs{Xfootnote} follows a \protect\cs{Xendnote} in the second argument of \protect\cs{edtext} (bug added in eledmac 1.0.0 !).}
% \changes{v1.21.0}{2015/04/13}{Add noeledsec package option}
% \changes{v1.21.0}{2015/04/13}{parapparatus option works now with familiar footnotes.}
-% \changes{v1.21.0}{2015/04/13}{Add \cs{beforenotesX} and \cs{Xbeforenotes} features for notes set in two and three column.}
-% \changes{v1.21.0}{2015/04/13}{Debug \cs{beforenotesX} \cs{maxhnotesX} \cs{noteswidthliketwocolumnsX} and \cs{afterruleX} with footnotes set in two and three columns.}
-% \changes{v1.21.0}{2015/04/13}{\cs{Xafterrule} and \cs{afterruleX} features no longer create problems of overflowing at the bottom of the page.}
-% \changes{v1.21.0}{2015/04/13}{\cs{preXnotes} and \cs{prenotesX} features no longer create problems of overflowing at the bottom of the page.}
-% \changes{v1.21.0}{2015/04/13}{Fix spurious space after first page number in \cs{doendnotes}. oldprintnpnumspace option allows to come back to previous setting}
-% \changes{v1.21.0}{2015/04/13}{\cs{chapter} inside optional argument of \cs{pstart} works when typesetting parallel pages}
-% \changes{v1.22.0}{2015/04/25}{When using hyperref package, internal links in index or with \cs{edlineref} are now targeted to the top and not longer to the bottom of the lines they refer to.}
+% \changes{v1.21.0}{2015/04/13}{Add \protect\cs{beforenotesX} and \protect\cs{Xbeforenotes} features for notes set in two and three column.}
+% \changes{v1.21.0}{2015/04/13}{Debug \protect\cs{beforenotesX} \protect\cs{maxhnotesX} \protect\cs{noteswidthliketwocolumnsX} and \protect\cs{afterruleX} with footnotes set in two and three columns.}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{Xafterrule} and \protect\cs{afterruleX} features no longer create problems of overflowing at the bottom of the page.}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{preXnotes} and \protect\cs{prenotesX} features no longer create problems of overflowing at the bottom of the page.}
+% \changes{v1.21.0}{2015/04/13}{Fix spurious space after first page number in \protect\cs{doendnotes}. oldprintnpnumspace option allows to come back to previous setting}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{chapter} inside optional argument of \protect\cs{pstart} works when typesetting parallel pages}
+% \changes{v1.22.0}{2015/04/25}{When using hyperref package, internal links in index or with \protect\cs{edlineref} are now targeted to the top and not longer to the bottom of the lines they refer to.}
% \changes{v1.22.0}{2015/04/25}{Provides support for xindy.}
% \changes{v1.22.0}{2015/04/25}{Adds hyperlink for references to notes in indices.}
% \changes{v1.22.0}{2015/04/25}{Fix conflict between noend package option and edtabularx environments}
-% \changes{v1.22.1}{2015/04/29}{Fix bug (added on v1.22.0) with \cs{Xinplaceofnumber} hook.}
+% \changes{v1.22.1}{2015/04/29}{Fix bug (added on v1.22.0) with \protect\cs{Xinplaceofnumber} hook.}
% \changes{v1.23.0}{2015/05/18}{Compatibility between nofamiliar/nocriticals option and minipage/ledgroup.}
-% \changes{v1.23.0}{2015/05/18}{Fix error of \cs{iftrue} not closed.}
-% \changes{v1.23.0}{2015/05/18}{Allow use of \cs{sameword} with inputenc managing of UTF-8.}
-% \changes{v1.23.0}{2015/05/18}{Error message when using \cs{beginnumbering}…\cs{endnumbering} without \cs{pstart}.}
+% \changes{v1.23.0}{2015/05/18}{Fix error of \protect\cs{iftrue} not closed.}
+% \changes{v1.23.0}{2015/05/18}{Allow use of \protect\cs{sameword} with inputenc managing of UTF-8.}
+% \changes{v1.23.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}…\protect\cs{endnumbering} without \protect\cs{pstart}.}
% \changes{v1.23.0}{2015/05/18}{New tools to ensure the line-list file uses the right version of commands when upgrading the eledmac version.}
-% \changes{v1.23.0}{2015/05/18}{Fix bug with \cs{skipnumbering} called immediately after a \cs{pstart}.}
-% \changes{v1.23.0}{2015/05/18}{Fix spurious space with \cs{skipnumbering} (bug added on v1.21.0).}
-% \changes{v1.23.1}{2015/05/20}{Fix bug with \cs{lemma} command in the right side.}
+% \changes{v1.23.0}{2015/05/18}{Fix bug with \protect\cs{skipnumbering} called immediately after a \protect\cs{pstart}.}
+% \changes{v1.23.0}{2015/05/18}{Fix spurious space with \protect\cs{skipnumbering} (bug added on v1.21.0).}
+% \changes{v1.23.1}{2015/05/20}{Fix bug with \protect\cs{lemma} command in the right side.}
% \changes{v1.23.2}{2015/05/29}{Compatibility with \LaTeX's release 2015.}
-% \changes{v1.24.0}{2015/06/02}{We can reinitialize \cs{AtEveryPstart} and \cs{AtEveryPend} providing to it an empty argument.}
-% \changes{v1.24.1}{2015/06/21}{\cs{lemma} is disabled when using `nocritical` option.}
+% \changes{v1.24.0}{2015/06/02}{We can reinitialize \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend} providing to it an empty argument.}
+% \changes{v1.24.1}{2015/06/21}{\protect\cs{lemma} is disabled when using `nocritical` option.}
% \changes{v1.24.2}{2015/06/26}{Fix incompatibility between `nofamiliar` option and `memoir` package.}
% \changes{v1.24.3}{2015/07/07}{Restore marginal numbers and notes with sectioning command (bug introduced in v1.21.0)}
-% \changes{v1.24.4}{2015/07/19}{Fix spurious space with \cs{edindex} when using xindy+hyperref option.}
-% \changes{v1.24.5}{2015/07/16}{Fix bug of indent, when a added in 1.1.0, when a \cs{beginnumbering} immediately follow a sectioning command.}
+% \changes{v1.24.4}{2015/07/19}{Fix spurious space with \protect\cs{edindex} when using xindy+hyperref option.}
+% \changes{v1.24.5}{2015/07/16}{Fix bug of indent, when a added in 1.1.0, when a \protect\cs{beginnumbering} immediately follow a sectioning command.}
% \changes{v2.0.0}{2015/07/19}{Package's name becomes \reledmac.}
% \changes{v2.0.0}{2015/07/19}{In order to have a more consistent name's convention, many names has been changed.}
% \changes{v2.0.0}{2015/07/19}{Many \LaTeX's output macros are now patched and not override.}
% \changes{v2.0.0}{2015/07/19}{Add nonum option for endnotes.}
-% \changes{v2.0.0}{2015/07/19}{Add \cs{Xendinplaceofnumber} hook.}
-% \changes{v2.0.0}{2015/07/19}{Add \cs{Xendnonumber} hook.}
+% \changes{v2.0.0}{2015/07/19}{Add \protect\cs{Xendinplaceofnumber} hook.}
+% \changes{v2.0.0}{2015/07/19}{Add \protect\cs{Xendnonumber} hook.}
% \changes{v2.0.0}{2015/07/19}{Fix bug when printing only one series of endnotes, but wanted to keep endnotes for other series.}
+% \changes{v2.0.1}{2015/07/27}{Fix incompatibility between optional argument of \protect\cs{pstart} and \protect\cs{numberpstarttrue}}
+% \changes{v2.0.1}{2015/07/27}{Fix bug in eledmac-compat option}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -321,7 +321,7 @@
%
% \author{%
% Ma\"ieul Rouquette\thanks{\texttt{maieul at maieul dot net}} \\
-% {\small based on the original \Lpack{ledmac} by} \\
+% {\small based on the original \protect\package{ledmac} by} \\
% Peter Wilson \\
% Herries Press \\
% {\small which was based on the original \edmac, \tabmac{} and \edstanza{} by} \\
@@ -330,40 +330,6 @@
%
% \date{}
%
-% \iffalse This is a METACOMMENT
-% This METACOMMENT is part of the original EDMAC
-% Everything up to the next `\ fi' (without a blank) will
-% be ignored. This is necessary because `%' may no longer
-% be a comment mark when this file is read in.
-%
-% The original EDMAC was written by:
-% \author{John Lavagnino\thanks{%
-% Department of English and American Literature,
-% Brandeis University,
-% 415 South Street,
-% Waltham, MA 02254--9110, USA.
-% Internet: {\tt lav@binah.cc.brandeis.edu},
-% Bitnet: {\tt lav@brandeis}.}
-% \and Dominik Wujastyk\thanks{%
-% Wellcome Institute for the History of Medicine,
-% 183 Euston Road,
-% London NW1 2BE, UK.
-% Internet: {\tt D.Wujastyk@ucl.ac.uk},
-% Bitnet: {\tt dow@harvunxw}.}}
-% \date{}
-%
-%
-% Macro file `EDMAC' for use with Plain TeX.
-% Copyright (C) 1990, 1991, 1992, 1993, 1994 John Lavagnino and Dominik
-% Wujastyk, all rights reserved.
-%
-% Copying of this file is authorized only if either
-% (1) you make absolutely no changes to your copy, including name, or
-% (2) if you do make changes, you name it something other than
-% edmac.tex or edmac.doc
-% This restriction helps to ensure that the macro development is orderly.
-%
-% \fi
%
% \maketitle
%
@@ -499,7 +465,7 @@
% Font Selection Scheme' for use with \PlainTeX\ and \edmac.
% Another project Wayne has worked
% on is a \verb"DVI" post-processor which works with an \edmac{}
-% that has been slightly modified to output \cs{special}s. This
+% that has been slightly modified to output \protect\cs{special}s. This
% combination enables you to recover to some extent the text of
% each line, as {\sc ascii} code, facilitating the creation of
% concordances, an {\em index verborum}, etc.
@@ -644,12 +610,12 @@
% \end{description}
% \subsection{Optimize package's performance}\label{option:performance}
% \begin{description}
-% \item[nocritical] disables tools for critical footnotes (\cs{Afootnote}, \cs{Bfootnote} etc.). If you do not need critical footnotes, this option lets \eledmac\ run faster.
+% \item[nocritical] disables tools for critical footnotes (\protect\cs{Afootnote}, \protect\cs{Bfootnote} etc.). If you do not need critical footnotes, this option lets \eledmac\ run faster.
% It will also preserve room for other packages.
-% \item[noeledsec] disables tools for \cs{eledsection} and related commands (\reff{eledsection}).
-% \item[noend] disables tools for endnotes (\cs{Aendnote}, \cs{Bendnote} etc.). If you do not need endnotes, this option lets \eledmac\ run faster.
+% \item[noeledsec] disables tools for \protect\cs{eledsection} and related commands (\reff{eledsection}).
+% \item[noend] disables tools for endnotes (\protect\cs{Aendnote}, \protect\cs{Bendnote} etc.). If you do not need endnotes, this option lets \eledmac\ run faster.
% It will also preserve room for other packages.
-% \item[nofamiliar] disables tools for familiar footnotes (\cs{footnoteA}, \cs{footnoteB} etc.). If you do not need familiar footnotes, this option lets \eledmac\ run faster.
+% \item[nofamiliar] disables tools for familiar footnotes (\protect\cs{footnoteA}, \protect\cs{footnoteB} etc.). If you do not need familiar footnotes, this option lets \eledmac\ run faster.
% It will also preserve room for other packages.
% \item[noledgroup] \macpackage allows to use of series of critical notes and new series of normal notes inside minipage and ledgroup environments (see~\reff{ledgroup}). However, such features use up computer memory, at the expense of other processing needs. So if you do not need this feature, use \verb+noledgroup+ option. This should make \macpackage faster.
% \item[series] \Macpackage defines five levels of notes: A, B, C, D, E.
@@ -662,7 +628,7 @@
% \DescribeMacro{\beginnumbering}
% \DescribeMacro{\endnumbering}
% Each section of numbered text must be preceded by
-% \cs{beginnumbering} and followed by \cs{endnumbering}, like this: \\
+% \protect\cs{beginnumbering} and followed by \protect\cs{endnumbering}, like this: \\
% \egstart
% \begin{verbatim}
% \beginnumbering
@@ -671,19 +637,19 @@
% \end{verbatim}
% \egend
%
-% The \cs{beginnumbering} macro resets the line number to zero,
+% The \protect\cs{beginnumbering} macro resets the line number to zero,
% reads an auxiliary file called \meta{jobname}.\file{nn} (where
% \meta{jobname} is the name of the main input file for this job,
% and \file{nn} is 1 for the first numbered section, 2 for
% the second section, and so on), and then creates a new version of
% this auxiliary file to collect information during this run. The
-% first instance of \cs{beginnumbering} also opens a file called
-% \meta{jobname}\file{.\meta{series}end} to receive the text of the endnotes.
-% \cs{endnumbering} closes the \meta{jobname}.\file{nn} file.
+% first instance of \protect\cs{beginnumbering} also opens a file called
+% \meta{jobname}\file{.<series>end} to receive the text of the endnotes.
+% \protect\cs{endnumbering} closes the \meta{jobname}.\file{nn} file.
%
% If the line numbering of a text is to be continuous from start to end,
% then the whole text will be typed between one pair of
-% \cs{beginnumbering} and \cs{endnumbering} commands. But your text
+% \protect\cs{beginnumbering} and \protect\cs{endnumbering} commands. But your text
% will most often contain chapter or other divisions marking sections
% that should be independently numbered, and these will be appropriate
% places to begin new numbered sections.
@@ -691,7 +657,7 @@
% \Macpackage has to read and store
% in memory
% a certain amount of information about the entire section when it
-% encounters a \cs{beginnumbering} command, so it speeds up the
+% encounters a \protect\cs{beginnumbering} command, so it speeds up the
% processing and reduces memory use when a text is divided into a larger
% number of sections (at the expense of multiplying the number of
% external files that are generated).
@@ -701,7 +667,7 @@
% \DescribeMacro{\pstart}
% \DescribeMacro{\pend}
% Within a numbered section, each paragraph of numbered text must
-% be marked using the \cs{pstart} and \cs{pend} commands like this: \\
+% be marked using the \protect\cs{pstart} and \protect\cs{pend} commands like this: \\
% \egstart
% \begin{verbatim}
% \pstart
@@ -711,7 +677,7 @@
% \egend
%
% Text that appears within a numbered section but is not marked with
-% \cs{pstart} and \cs{pend} will not be numbered.
+% \protect\cs{pstart} and \protect\cs{pend} will not be numbered.
%
% The following example shows the proper section and paragraph
% markup, and the kind of output that would typically be generated:
@@ -739,11 +705,11 @@
% \end{verbatim}
% \egend
%
-% \subsubsection{Producting automatically \cs{pstart}\ldots{}\cs{pend}}
+% \subsubsection{Producting automatically \protect\cs{pstart}\ldots{}\protect\cs{pend}}
% \DescribeMacro{\autopar}\label{autopar}
-% You can use \cs{autopar} to avoid the nuisance of this paragraph markup
+% You can use \protect\cs{autopar} to avoid the nuisance of this paragraph markup
% and still have every paragraph automatically numbered. The scope of the
-% \cs{autopar} command needs to be limited by keeping it within a group, as
+% \protect\cs{autopar} command needs to be limited by keeping it within a group, as
% follows:
% \egstart
% \begin{verbatim}
@@ -761,52 +727,52 @@
% \end{verbatim}
% \egend
%
-% \cs{autopar} fails, however, on paragraphs that start with a
+% \protect\cs{autopar} fails, however, on paragraphs that start with a
% \verb"{" or with any other command that starts a new group before it
% generates any text. Such paragraphs need to be started explicitly,
% before the new group is opened,
-% using \cs{indent}, \cs{noindent}, or \cs{leavevmode}, or using
-% \cs{pstart} itself.\footnote{For a detailed study of the
+% using \protect\cs{indent}, \protect\cs{noindent}, or \protect\cs{leavevmode}, or using
+% \protect\cs{pstart} itself.\footnote{For a detailed study of the
% reasons for this restriction, see Barbara Beeton, `Initiation
% rites', \textit{TUGboat} \textbf{12} (1991),
% pp.\,257--258.\protect\index{Beeton, Barbara Ann Neuhaus Friend}}
%
-% \subsubsection{Content before specific \cs{pstart} and after specific \cs{pend}}\label{pstart:optionalarg}
-% \changes{v1.12.0}{2014/08/05}{Optional arguments for \cs{pstart} and \cs{pend}.}
+% \subsubsection{Content before specific \protect\cs{pstart} and after specific \protect\cs{pend}}\label{pstart:optionalarg}
+% \changes{v1.12.0}{2014/08/05}{Optional arguments for \protect\cs{pstart} and \protect\cs{pend}.}
% \DescribeMacro{\AtEveryPstart}
% \DescribeMacro{\AtEveryPend}
-% Both \cs{pstart} and \cs{pend} can take a optional argument, in brackets.
-% Its content will be printed before the beginning of \cs{pstart} / after the end of \cs{pend} instead of the argument of \cs{AtEveryPstart} / \cs{AtEveryPend}.
-% If you need to start a \cs{pstart} by brackets, or to add brackets after a \cs{pend}, just add a \cs{relax} between \cs{pstart}/\cs{pend} and the brackets.
+% Both \protect\cs{pstart} and \protect\cs{pend} can take a optional argument, in brackets.
+% Its content will be printed before the beginning of \protect\cs{pstart} / after the end of \protect\cs{pend} instead of the argument of \protect\cs{AtEveryPstart} / \protect\cs{AtEveryPend}.
+% If you need to start a \protect\cs{pstart} by brackets, or to add brackets after a \protect\cs{pend}, just add a \protect\cs{relax} between \protect\cs{pstart}/\protect\cs{pend} and the brackets.
%
-%. This feature is also useful when typesetting verses (see~\reff{verse}) or \Lpack{eledpar} (see~\reff{eledpar}).
+%. This feature is also useful when typesetting verses (see~\reff{verse}) or \protect\package{eledpar} (see~\reff{eledpar}).
%
-% A \cs{noindent} is automatically added before this argument.
-% \subsubsection{Content before every \cs{pstart} and after every \cs{pend}}
-% \changes{v1.15.0}{2015/01/12}{New commands \cs{AtEveryPstart} and \cs{AtEveryPend}.}
+% A \protect\cs{noindent} is automatically added before this argument.
+% \subsubsection{Content before every \protect\cs{pstart} and after every \protect\cs{pend}}
+% \changes{v1.15.0}{2015/01/12}{New commands \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend}.}
% \label{AtEveryPstart} \DescribeMacro{\AtEveryPstart}\DescribeMacro{\AtEveryPend}
-% You can use both \cs{AtEveryPstart} and \cs{AtEveryPend}.
-% Their arguments will be printed before every \cs{pstart} begins / after every \cs{pend} ends.
-% \subsubsection{Numbering paragraphs (\cs{pstart})}
-% \changes{v0.12.0}{2011/10/01}{Possibility to number \cs{pstart}.}
-% It is possible to insert a number at every \cs{pstart} command. You must use the \DescribeMacro{\numberpstarttrue}\cs{numberpstarttrue} command to have it. You can stop the numbering with \DescribeMacro{\numberpstartfalse}\cs{numberpstartfalse}.
-% You can redefine the command \DescribeMacro{\thepstart}\cs{thepstart} to change style.
-% You can change the value of the pstart number by using \emph{after} \cs{beginnumbering}:
+% You can use both \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend}.
+% Their arguments will be printed before every \protect\cs{pstart} begins / after every \protect\cs{pend} ends.
+% \subsubsection{Numbering paragraphs (\protect\cs{pstart})}
+% \changes{v0.12.0}{2011/10/01}{Possibility to number \protect\cs{pstart}.}
+% It is possible to insert a number at every \protect\cs{pstart} command. You must use the \DescribeMacro{\numberpstarttrue}\protect\cs{numberpstarttrue} command to have it. You can stop the numbering with \DescribeMacro{\numberpstartfalse}\protect\cs{numberpstartfalse}.
+% You can redefine the command \DescribeMacro{\thepstart}\protect\cs{thepstart} to change style.
+% You can change the value of the pstart number by using \emph{after} \protect\cs{beginnumbering}:
% \begin{verbatim}
% \setcounter{numberpstart}{value}
% \end{verbatim}
-% On each \cs{beginnumbering} the numbering restarts.
-% \changes{v0.15.0}{2012/06/11}{Possibility to print \cs{pstart} number inside.}
+% On each \protect\cs{beginnumbering} the numbering restarts.
+% \changes{v0.15.0}{2012/06/11}{Possibility to print \protect\cs{pstart} number inside.}
%
% \DescribeMacro{\sidepstartnumtrue}
-% With the \cs{sidepstartnumtrue} command, the number of \cs{pstart} will be printed inside. In this case, the line number will be not printed.
+% With the \protect\cs{sidepstartnumtrue} command, the number of \protect\cs{pstart} will be printed inside. In this case, the line number will be not printed.
%
-% \changes{v1.1.0}{2012/09/25}{Add \cs{labelpstarttrue}.}
+% \changes{v1.1.0}{2012/09/25}{Add \protect\cs{labelpstarttrue}.}
% \DescribeMacro{\labelpstarttrue}
-% With the \cs{labelpstarttrue} command, a \cs{label} added just after a \cs{pstart} will refer to the number of this pstart.
+% With the \protect\cs{labelpstarttrue} command, a \protect\cs{label} added just after a \protect\cs{pstart} will refer to the number of this pstart.
% \subsubsection{Languages written in Right to Left}
% If you use languages written in right to left, we \LuaLaTeX\ or \XeLaTeX, so
-% you must switch text direction \cs{before} the \cs{pstart} command.
+% you must switch text direction \protect\cs{before} the \protect\cs{pstart} command.
% \subsubsection{Memory limits}
% \textbf{This paragraph is kept for history, but problem described below should not appear with recent version of \LaTeX.}
% \label{pause}
@@ -825,10 +791,10 @@
% split your long section into several smaller ones. The trouble
% with this is that your line numbering will start again at zero
% with each new section. To avoid this problem, we provide
-% \cs{pausenumbering} and \cs{resumenumbering} which are just
-% like \cs{endnumbering} \ldots\ \cs{beginnumbering}, except that
+% \protect\cs{pausenumbering} and \protect\cs{resumenumbering} which are just
+% like \protect\cs{endnumbering} \ldots\ \protect\cs{beginnumbering}, except that
% they arrange for your line numbering to continue across the break.
-% Use \cs{pausenumbering} only between numbered paragraphs:
+% Use \protect\cs{pausenumbering} only between numbered paragraphs:
% \egstart
% \begin{verbatim}
% \beginnumbering
@@ -855,22 +821,22 @@
% \begin{verbatim}
% \newcommand{\memorybreak}{\pausenumbering\resumenumbering}
% \end{verbatim}
-% and say \cs{memorybreak} between the relevant \cs{pend} and
-% \cs{pstart}.
+% and say \protect\cs{memorybreak} between the relevant \protect\cs{pend} and
+% \protect\cs{pstart}.
% \egend
%
% \subsection{Lineation commands}
% \subsubsection{Disabling lineation}
% \DescribeMacro{\numberlinefalse} \DescribeMacro{\numberlinetrue}
-% Line numbering can be disabled with \cs{numberlinefalse}. It can be enabled again with \cs{numberlinetrue}.
+% Line numbering can be disabled with \protect\cs{numberlinefalse}. It can be enabled again with \protect\cs{numberlinetrue}.
% \subsubsection{Setting lineation start and step}
% \DescribeMacro{\firstlinenum}
% \DescribeMacro{\linenumincrement}
% By default, \macpackage numbers every 5th line. There are two counters,
% \verb?firstlinenum? and \verb?linenumincrement?, that control this
-% behaviour; they can be changed using \cs{firstlinenum}\marg{num} and
-% \cs{linenumincrement}\marg{num}. \cs{firstlinenum} specifies the first
-% line that will have a printed number, and \cs{linenumincrement} is
+% behaviour; they can be changed using \protect\cs{firstlinenum}\marg{num} and
+% \protect\cs{linenumincrement}\marg{num}. \protect\cs{firstlinenum} specifies the first
+% line that will have a printed number, and \protect\cs{linenumincrement} is
% the difference between succesive
% numbered lines. For example, to start printing numbers at the first line
% and to have every other line numbered: \\
@@ -878,18 +844,18 @@
%
% \DescribeMacro{\firstsublinenum}
% \DescribeMacro{\sublinenumincrement}
-% There are similar commands, \cs{firstsublinenum}\marg{num} and
-% \cs{sublinenumincrement}\marg{num} for controlling sub-line numbering.
+% There are similar commands, \protect\cs{firstsublinenum}\marg{num} and
+% \protect\cs{sublinenumincrement}\marg{num} for controlling sub-line numbering.
%
% \DescribeMacro{\linenumberlist}
-% You can define \cs{linenumberlist} to specify a non-uniform distribution
+% You can define \protect\cs{linenumberlist} to specify a non-uniform distribution
% of printed line numbers. For example: \\
% \verb?\def\linenumberlist{1,2,3,5,7,11,13,17,19,23,29}? \\
% to have numbers printed on prime-numbered lines only. There must be
% no spaces within the definition which consists of comma-separated decimal
% numbers. The numbers can be in any order but it is easier to read if you
% put them in numerical order. Either omitting the definition of
-% \cs{linenumberlist} or following the vacuous definition \\
+% \protect\cs{linenumberlist} or following the vacuous definition \\
% \verb?\def\linenumberlist{}? \\
% the standard numbering sequence is applied. The standard sequence
% is that specified by the combination of the \verb+firstlinenum+,
@@ -900,7 +866,7 @@
% \DescribeMacro{\lineation}
% \changes{v1.0.0}{2012/09/15}{Debug in lineation command}
% Lines can be numbered either by page, by pstart or by section; you specify
-% this using the \cs{lineation}\marg{arg}
+% this using the \protect\cs{lineation}\marg{arg}
% macro, where \meta{arg} is either
% \texttt{page}, \texttt{pstart} or \texttt{section}.
@@ -912,7 +878,7 @@
%
% \subsubsection{Setting line number margin}
% \DescribeMacro{\linenummargin}
-% The command \cs{linenummargin}\meta{location} specifies the margin
+% The command \protect\cs{linenummargin}\meta{location} specifies the margin
% where the line (or pstart) numbers will be printed. The permissable value
% for \meta{location} is one out of the list \texttt{left}, \texttt{right},
% \texttt{inner}, or \texttt{outer},
@@ -924,11 +890,11 @@
% making a paragraph.
%
% More precisely, the value of
-% \cs{linenummargin} used is that in effect at the \cs{pend}
+% \protect\cs{linenummargin} used is that in effect at the \protect\cs{pend}
% of a numbered paragraph. Apart from an initial setting for
-% \cs{linenummargin}, only change it after a \cs{pend}, whereupon
+% \protect\cs{linenummargin}, only change it after a \protect\cs{pend}, whereupon
% it will apply to all following numbered paragraphs, until
-% changed again (changing it between a \cs{pstart} and \cs{pend}
+% changed again (changing it between a \protect\cs{pstart} and \protect\cs{pend}
% pair will apply the change to all the current paragraph).
%
%
@@ -939,11 +905,11 @@
% \DescribeMacro{\linenumsep}
% When a marginal line number is to be printed, there are a
% lot of ways to display it.
-% You can redefine \cs{leftlinenum} and \cs{rightlinenum} to
+% You can redefine \protect\cs{leftlinenum} and \protect\cs{rightlinenum} to
% change the way marginal line numbers are printed in the
% left and right margins respectively; the initial
-% versions print the number in font \cs{numlabfont} (described
-% below) at a distance \cs{linenumsep} (initially set to one pica)
+% versions print the number in font \protect\cs{numlabfont} (described
+% below) at a distance \protect\cs{linenumsep} (initially set to one pica)
% from the text.
%
% \subsection{Changing the line numbers}
@@ -957,7 +923,7 @@
% \subsubsection{Sublineation}
% \DescribeMacro{\startsub}
% \DescribeMacro{\endsub}
-% You insert the \cs{startsub} and \cs{endsub} commands in your text
+% You insert the \protect\cs{startsub} and \protect\cs{endsub} commands in your text
% to turn sub-lineation on and off. In plays, for
% example, stage directions are often numbered with sub-line
% numbers: as line $10.1$, $10.2$,
@@ -975,8 +941,8 @@
% \subsubsection{Locking lineation}
% \DescribeMacro{\startlock}
% \DescribeMacro{\endlock}
-% The \cs{startlock} command, used in running text, locks the
-% line number at its current value, until you say \cs{endlock}.
+% The \protect\cs{startlock} command, used in running text, locks the
+% line number at its current value, until you say \protect\cs{endlock}.
% It can tell for itself whether you are in a patch of line or
% sub-line numbering. One use for line-number locking is in printing
% poetry: there the line numbers should be those of verse lines
@@ -990,9 +956,9 @@
% line or the last, or whether you just want the number printed by
% them all. (This assumes that, on the basis of the settings of
% the previous parameters, it is necessary to display a line number for
-% this line.) You specify your preference using \cs{lockdisp}\marg{arg}; its
+% this line.) You specify your preference using \protect\cs{lockdisp}\marg{arg}; its
% argument is a word, either \verb+first+, \verb+last+, or \verb+all+.
-% The package initially sets this as \cs{lockdisp}\verb+{first}+.
+% The package initially sets this as \protect\cs{lockdisp}\verb+{first}+.
%
% \subsubsection{Setting and changing line number}
% \DescribeMacro{\setline}
@@ -1000,29 +966,29 @@
% In some cases you may want to modify the line numbers that are
% automatically calculated: if you are printing only fragments
% of a work but want to print line numbers appropriate to a complete
-% version, for example. The \cs{setline}\marg{num} and
-% \cs{advanceline}\marg{num} commands
+% version, for example. The \protect\cs{setline}\marg{num} and
+% \protect\cs{advanceline}\marg{num} commands
% may be used to change the current line's number (or the sub-line
% number, if sub-lineation is currently on). They change both the
% marginal line numbers and the line numbers passed to the notes.
-% \cs{setline} takes one argument, the value to which you want
-% the line number set; it must be $0$ or greater. \cs{advanceline}
+% \protect\cs{setline} takes one argument, the value to which you want
+% the line number set; it must be $0$ or greater. \protect\cs{advanceline}
% takes one argument, an amount that should be added to the current
% line number; it may be positive or negative.
%
% \DescribeMacro{\setlinenum}
-% The \cs{setline} and \cs{advanceline} macros should only be used
-% within a \cs{pstart}\ldots\cs{pend} group. The \cs{setlinenum}\marg{num}
+% The \protect\cs{setline} and \protect\cs{advanceline} macros should only be used
+% within a \protect\cs{pstart}\ldots\protect\cs{pend} group. The \protect\cs{setlinenum}\marg{num}
% command can be used outside such a group, for example between
-% a \cs{pend} and a \cs{pstart}. It sets the line number
+% a \protect\cs{pend} and a \protect\cs{pstart}. It sets the line number
% to \meta{num}.
-% It has no effect if used within a \cs{pstart}\ldots\cs{pend} group.
+% It has no effect if used within a \protect\cs{pstart}\ldots\protect\cs{pend} group.
%
% \subsubsection{Line number style}
% \DescribeMacro{\linenumberstyle}
% \DescribeMacro{\sublinenumberstyle}
% Line numbers are normally printed as arabic numbers. You can
-% use \cs{linenumberstyle}\marg{style} to change the numbering style.
+% use \protect\cs{linenumberstyle}\marg{style} to change the numbering style.
% \meta{style} must be one of:
% \begin{itemize}
% \item[\texttt{Alph}] Uppercase letters (A\ldots\ Z).
@@ -1034,27 +1000,27 @@
% Note that with the \texttt{Alph} or \texttt{alph} styles, `numbers'
% must be between 1 and 26 inclusive.
%
-% Similarly \cs{sublinenumberstyle}\marg{style} can be used to change
+% Similarly \protect\cs{sublinenumberstyle}\marg{style} can be used to change
% the numbering style of sub-line numbers, which is normally arabic numerals.
%
% \subsubsection{Skipping and hidding number}
% \DescribeMacro{\skipnumbering}
-% When inserted into a numbered line the macro \cs{skipnumbering} causes
+% When inserted into a numbered line the macro \protect\cs{skipnumbering} causes
% the numbering of that particular line to be skipped; that is, the line
% number is unchanged and no line number will be printed.
-% Note that if you use it in \cs{stanza}, you must call it at the beginning of the verse.
+% Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse.
%
% \DescribeMacro{\hidenumbering}
-% \changes{v1.21.0}{2015/04/13}{Add \cs{hidenumbering}}
-% When inserted into a numbered line the macro \cs{hidenumbering} causes
+% \changes{v1.21.0}{2015/04/13}{Add \protect\cs{hidenumbering}}
+% When inserted into a numbered line the macro \protect\cs{hidenumbering} causes
% the number for that particular line to be hidden; namely, no line number will print.
-% Note that if you use it in \cs{stanza}, you must call it at the beginning of the verse.
+% Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse.
% \subsubsection{Execute code at each line}
% \Macpackage provides to advanced feature for user.
% \DescribeMacro{dolinehook}\DescribeMacro{doinsidelinehook}
-% The argument passed to \cs{dolinehook}\marg{arg} will be executed
+% The argument passed to \protect\cs{dolinehook}\marg{arg} will be executed
% before slicing a new line in the paragraph.
-% The argument passed to \cs{doinsidelinehook}\marg{arg} will be executed before printing a new line.
+% The argument passed to \protect\cs{doinsidelinehook}\marg{arg} will be executed before printing a new line.
% In many case, the second of two is more useful than the first.
% The file \href{examples/2-line_numbers_in_header.tex}{examples/2-line\_numbers\_in\_header.tex} provides an example of use in order to print the first and last line number of a page in the header.
% \section{Apparatus commands}
@@ -1071,21 +1037,21 @@
%
% So :
% \begin{itemize}
-% \item \cs{Afootnote} is a critical footnote of the series A.
-% \item \cs{Bendnote} is a critical footnote of the series B.
-% \item \cs{footnoteC} is a critical footnote of the series C.
+% \item \protect\cs{Afootnote} is a critical footnote of the series A.
+% \item \protect\cs{Bendnote} is a critical footnote of the series B.
+% \item \protect\cs{footnoteC} is a critical footnote of the series C.
% \end{itemize}
% \subsection{Critical notes}
% \subsubsection{The lemma}
% \DescribeMacro{\edtext}
% Within numbered paragraphs, all footnotes and endnotes are generated
-% by the \cs{edtext} macro:
+% by the \protect\cs{edtext} macro:
% \begin{verse}
-% \cs{edtext}\marg{lemma}\marg{commands}
+% \protect\cs{edtext}\marg{lemma}\marg{commands}
% \end{verse}
%
%
-% The \meta{lemma} argument is the lemma in the main text: \cs{edtext}
+% The \meta{lemma} argument is the lemma in the main text: \protect\cs{edtext}
% both prints this as part of the text, and makes it available to the
% \meta{commands} you specify to generate notes.
%
@@ -1115,7 +1081,7 @@
% is supplied with the line number at which the lemma appears
% in the main text.
%
-% The \meta{lemma} may contain further \cs{edtext} commands.
+% The \meta{lemma} may contain further \protect\cs{edtext} commands.
% Nesting makes
% it possible to print an explanatory note on a long passage together with
% notes on variants for individual words within the passage. For
@@ -1144,16 +1110,16 @@
% \endnumbering
% \egend
%
-% However, \cs{edtext} cannot handle overlapping but unnested
+% However, \protect\cs{edtext} cannot handle overlapping but unnested
% notes---for example, one note covering lines 10--15, and another
-% covering 12--18; a \cs{edtext} that starts in the \meta{lemma}
-% argument of another \cs{edtext} must end there, too. (The
-% \cs{lemma} and \cs{linenum} commands may be used to
+% covering 12--18; a \protect\cs{edtext} that starts in the \meta{lemma}
+% argument of another \protect\cs{edtext} must end there, too. (The
+% \protect\cs{lemma} and \protect\cs{linenum} commands may be used to
% generate overlapping notes if necessary.)
%
% \subsubsection{Footnotes}
%
-% The second argument of the \cs{edtext} macro, \meta{commands},
+% The second argument of the \protect\cs{edtext} macro, \meta{commands},
% may contain a series of subsidiary commands that generate
% various kinds of notes.
%
@@ -1163,7 +1129,7 @@
% \DescribeMacro{\Dfootnote}
% \DescribeMacro{\Efootnote}
% Five separate series of the footnotes are maintained; each macro
-% takes one argument like \cs{Afootnote}\marg{text}.
+% takes one argument like \protect\cs{Afootnote}\marg{text}.
% When all of the six
% are used, the \texttt{A} notes appear in a layer just below the main
% text, followed by the rest in turn, down to the \texttt{E} notes at
@@ -1173,17 +1139,17 @@
%
% If you need more series of critical notes, please look at \reff{newseries}.
%
-%\changes{v1.0.0}{2012/09/15}{Options nonum and nosep in \cs{Xfootnote}.}
-%\changes{v1.20.0}{2015/03/22}{Options fulllines in \cs{Xfootnote}.}\label{Xfootnoteopt}
+%\changes{v1.0.0}{2012/09/15}{Options nonum and nosep in \protect\cs{Xfootnote}.}
+%\changes{v1.20.0}{2015/03/22}{Options fulllines in \protect\cs{Xfootnote}.}\label{Xfootnoteopt}
%An optional argument can be added before the text of the footnote. Its value is a comma separated list of options.
% \label{fulllines}The available options are:
% \begin{itemize}
-% \item \verb|fulllines| to disable \cs{Xtwolines} and \cs{Xmorethantwolines} features for this note (cf. \reff{Xtwolines}).
+% \item \verb|fulllines| to disable \protect\cs{Xtwolines} and \protect\cs{Xmorethantwolines} features for this note (cf. \reff{Xtwolines}).
% \item \verb|nonum| to disable line numbering for this note.
% \item \verb|nosep| to disable the lemma separator for this note.
% \end{itemize}
%
-% Example: \cs{Afootnote}\verb|[nonum]|\marg{text}.
+% Example: \protect\cs{Afootnote}\verb|[nonum]|\marg{text}.
%
% \subsubsection{Endnotes}
% \DescribeMacro{\Aendnote}
@@ -1193,26 +1159,26 @@
% \DescribeMacro{\Eendnote}
% The package also maintains five separate series of endnotes.
%
-% If you do not need the endnotes facility, you should use \verb+noend+ option when loading \Lpack{eledmac}.
+% If you do not need the endnotes facility, you should use \verb+noend+ option when loading \protect\package{eledmac}.
%
% The mechanism is similar to the one for footnotes: each macro takes one or more optional arguments and one single argument, like:\\
-% \cs{Aendnote}\oarg{option}\marg{text}.
+% \protect\cs{Aendnote}\oarg{option}\marg{text}.
%
% \verb+[<option>]+ can contain a comma separated list of values. Allowed values are:
% \begin{itemize}
-% \item \verb|fulllines| to disable \cs{Xendtwolines} and \cs{Xendmorethantwolines} features for this particular note (cf. \reff{Xtwolines}).
+% \item \verb|fulllines| to disable \protect\cs{Xendtwolines} and \protect\cs{Xendmorethantwolines} features for this particular note (cf. \reff{Xtwolines}).
% \item \verb+nonum+ to disable line number for this particular note.
% \item \verb|nosep| to disable the lemma separator for this particular note.
% \end{itemize}
%
% \label{doendnotes} Normally, endnotes are not printed: you must use the
-% \cs{doendnotes}\marg{s}, where \meta{s} is the letter of the series to be printed. Put this command where you want the corresponding set of endnotes printed.
+% \protect\cs{doendnotes}\marg{s}, where \meta{s} is the letter of the series to be printed. Put this command where you want the corresponding set of endnotes printed.
% In this case, all the endnotes of the \meta{s} series are printed, for all numbered section.
-% \changes{v1.22.0}{2015/04/25}{Add \cs{doendnotesbysection} command.}
+% \changes{v1.22.0}{2015/04/25}{Add \protect\cs{doendnotesbysection} command.}
% \changes{v1.22.0}{2015/04/25}{Standardize endnotes handbook.}
%
% \DescribeMacro{\doendnotesbysection} However, you may want to print the endnotes of one given series covering the first numbered section, then the endnotes of another given series covering the first numbered section, then the endnotes of the first given series covering the second numbered section, then the endnotes of the second given series covering the second numbered section, and so forth.
-% In this case, use \cs{doendnotesbysection}\marg{s}.
+% In this case, use \protect\cs{doendnotesbysection}\marg{s}.
% For each value of \meta{s}, the first call of the command will print the notes for the first series, the second call will print the notes for the second series etc.
% For example, do:
% \begin{verbatim}
@@ -1226,11 +1192,11 @@
% \end{verbatim}
%
% Note that by default inside endnotes no separator is used between the lemma and the content.
-% However you can use the \cs{Xendlemmaseparator} macro to define one (\reff{Xendlemmaseparator}).
+% However you can use the \protect\cs{Xendlemmaseparator} macro to define one (\reff{Xendlemmaseparator}).
%
% As endnotes may be printed at any point in the document they always
% start with the page number where they are called. The
-% macro \cs{printnpnum}\marg{num} is used to print these numbers.
+% macro \protect\cs{printnpnum}\marg{num} is used to print these numbers.
% Its default definition is: \\
% \verb?\newcommand*{\printnpnum}[1]{p.#1) }?
%
@@ -1244,10 +1210,10 @@
%
% \subsubsection{Change lemma and line number}
% \DescribeMacro{\lemma}
-% \changes{v1.0.0}{2012/09/15}{\cs{lemma} can contain commands.}
+% \changes{v1.0.0}{2012/09/15}{\protect\cs{lemma} can contain commands.}
% If you want to change the lemma that gets passed to the notes, you
-% can do this by using \cs{lemma}\marg{alternative} within the
-% second argument to \cs{edtext}, before the note commands.
+% can do this by using \protect\cs{lemma}\marg{alternative} within the
+% second argument to \protect\cs{edtext}, before the note commands.
% The most common use of this command is to abbreviate the lemma that's
% printed in the notes. For example:
% \egstart
@@ -1278,11 +1244,11 @@
%
% \DescribeMacro{\linenum}
% \label{linenum}
-% You can use \cs{linenum}\marg{arg} to change the line numbers passed to
+% You can use \protect\cs{linenum}\marg{arg} to change the line numbers passed to
% the notes. The notes are actually given seven parameters: the page,
% line, and sub-line number for the start of the lemma; the same
% three numbers for the end of the lemma; and the font specifier
-% for the lemma. As the argument to \cs{linenum}, you specify
+% for the lemma. As the argument to \protect\cs{linenum}, you specify
% those seven parameters in that order, separated by vertical bars
% (the \verb"|" character). However, you can retain the value
% computed by \macpackage for any number by simply omitting it; and
@@ -1292,14 +1258,14 @@
%
% This command does not change the marginal line numbers in any way;
% it just changes the numbers passed to the footnotes. Its use comes in
-% situations that \cs{edtext} has trouble dealing with for
+% situations that \protect\cs{edtext} has trouble dealing with for
% whatever reason. If you need notes for overlapping passages that
-% aren't nested, for instance, you can use \cs{lemma} and
-% \cs{linenum} to generate such notes despite the limitations of
-% \cs{edtext}. If the \meta{lemma} argument to \cs{edtext} is
+% aren't nested, for instance, you can use \protect\cs{lemma} and
+% \protect\cs{linenum} to generate such notes despite the limitations of
+% \protect\cs{edtext}. If the \meta{lemma} argument to \protect\cs{edtext} is
% extremely long, you may run out of memory; here again you can
-% specify a note with an abbreviated lemma using \cs{lemma} and
-% \cs{linenum}. The numbers used in \cs{linenum} need not be
+% specify a note with an abbreviated lemma using \protect\cs{lemma} and
+% \protect\cs{linenum}. The numbers used in \protect\cs{linenum} need not be
% entered manually; you can use the `\texttt{x-}' symbolic cross-referencing
% commands below (\reff{crossref}) to compute them
% automatically.
@@ -1316,13 +1282,13 @@
% rather bland names, because editors in different fields have
% widely divergent notions of what sort of notes are required, where
% they should be printed, and what they should be called. But this
-% does not mean you have to type \cs{Afootnote} when you would rather
-% say something you find more meaningful, like \cs{variant}.
+% does not mean you have to type \protect\cs{Afootnote} when you would rather
+% say something you find more meaningful, like \protect\cs{variant}.
%
% We
% recommend that you create a series of such aliases and use them
% instead of the names chosen here; all you have to do is put commands
-% of this form at the start of your file:\footnote{We use \cs{newcommand} and \cs{newcommandx} instead of classical \cs{let} command because the edtabular environments have to modify the notes definition, and we need to use the newest definition of notes. Read the handbook of \Lpack{xargs} to know more about \cs{newcommandx}.}
+% of this form at the start of your file:\footnote{We use \protect\cs{newcommand} and \protect\cs{newcommandx} instead of classical \protect\cs{let} command because the edtabular environments have to modify the notes definition, and we need to use the newest definition of notes. Read the handbook of \protect\package{xargs} to know more about \protect\cs{newcommandx}.}
% \begin{verbatim}
% \newcommandx{\variant}[2][1,usedefault]{\Afootnote[#1]{#2}}
% \newcommandx{\explanatory}[2][1,usedefault]{\Bfootnote[#1]{#2}}
@@ -1333,15 +1299,15 @@
%
% \subsection{Disambiguation of identical words in the apparatus}
% \changes{v1.15.0}{2015/01/12}{New tools to prevent ambiguous references in lemma}
-% \changes{v1.23.0}{2015/05/18}{Fix bug with \cs{sameword} when the same lemma is used for multiple notes or for nested \cs{edtext}s.}
-% \changes{v1.23.0}{2015/05/18}{Optional argument of \cs{sameword} can be a comma separated list of \cs{edtext} depth.}
-% \changes{v1.23.0}{2015/05/18}{Fix bug with \cs{sameword} when the lemma overlaps multiple line.}
+% \changes{v1.23.0}{2015/05/18}{Fix bug with \protect\cs{sameword} when the same lemma is used for multiple notes or for nested \protect\cs{edtext}s.}
+% \changes{v1.23.0}{2015/05/18}{Optional argument of \protect\cs{sameword} can be a comma separated list of \protect\cs{edtext} depth.}
+% \changes{v1.23.0}{2015/05/18}{Fix bug with \protect\cs{sameword} when the lemma overlaps multiple line.}
% Sometimes, the same word occurs twice (or more) in the same line.
% \Macpackage provides tools to disambiguate references in the critical notes.
% The lemma will be followed by a reference number if a given word occurs more that once in the same line.
%
% \subsubsection{Basic use}
-% \DescribeMacro{\sameword} To use this tool, you have to mark every occurrence of the potentially ambiguous term with the \cs{sameword} command:
+% \DescribeMacro{\sameword} To use this tool, you have to mark every occurrence of the potentially ambiguous term with the \protect\cs{sameword} command:
% \begin{verbatim}
% Lupus \sameword{aut} canis \edtext{\sameword{aut}}{\Afootnote{et}} felix
% \end{verbatim}
@@ -1360,16 +1326,16 @@
%
% Which unicode number you use depends, many times, on your keyboard configuration (the computer-input system).
%
-% Inside \macpackage, the \cs{sameword} command considers these two unicodes options as different characters. If you use only one unicode number consistently, the distinction will probably make no difference to how your text looks, but \cs{sameword} will process the text inaccurately, based on the unicode numbers. To prevent this, do the following:
+% Inside \macpackage, the \protect\cs{sameword} command considers these two unicodes options as different characters. If you use only one unicode number consistently, the distinction will probably make no difference to how your text looks, but \protect\cs{sameword} will process the text inaccurately, based on the unicode numbers. To prevent this, do the following:
% \begin{itemize}
% \item If you use \XeLaTeX, add this line in your preamble:\verb+ \XeTeXinputnormalization 1+.
-% \item If you use \LuaLaTeX, use the \Lpack{uninormalize} package of Michal Hoftich\footnote{\url{https://github.com/michal-h21/uninormalize}.} with the \verb+buffer+ option set to true.
+% \item If you use \LuaLaTeX, use the \protect\package{uninormalize} package of Michal Hoftich\footnote{\url{https://github.com/michal-h21/uninormalize}.} with the \verb+buffer+ option set to true.
% \end{itemize}
%
% With these tools, \XeTeX\ / \LuaTeX\ will dynamicaly normalize unicode input when reading the file.
-% Consequently, you will have no problems with the \cs{sameword} command.
-% \subsubsection{Use with \cs{lemma} command}
-% If you use the \cs{lemma} command, \Lpack{eledmac} cannot know to which occurence of \cs{sameword} in the first argument of \cs{edtext} a word marked with \cs{sameword} in \cs{lemma} should refer.
+% Consequently, you will have no problems with the \protect\cs{sameword} command.
+% \subsubsection{Use with \protect\cs{lemma} command}
+% If you use the \protect\cs{lemma} command, \protect\package{eledmac} cannot know to which occurence of \protect\cs{sameword} in the first argument of \protect\cs{edtext} a word marked with \protect\cs{sameword} in \protect\cs{lemma} should refer.
%
% For example in the following example:
% \begin{verbatim}
@@ -1380,18 +1346,18 @@
% it is all}%
% }{\lemma{\sameword{sw} \ldots all}\Afootnote{critical note}}.%
% \end{verbatim}
-% \Lpack{eledmac} cannot know if the ``sw'' in \cs{lemma} refers to the word after ``thing'', after ``other'', or after ``again''.
+% \protect\package{eledmac} cannot know if the ``sw'' in \protect\cs{lemma} refers to the word after ``thing'', after ``other'', or after ``again''.
%
-% Consequently, you have to tell to \Lpack{eledmac} which instance of \cs{sameword} in the first argument of \cs{edtext} you want to reference:
+% Consequently, you have to tell to \protect\package{eledmac} which instance of \protect\cs{sameword} in the first argument of \protect\cs{edtext} you want to reference:
% \begin{itemize}
-% \item In the content of \cs{lemma}, use \cs{sameword} with no optional argument.
-% \item In the first argument of \cs{edtext}, use \cs{sameword} with the optional argument \oarg{X}. \meta{X} is the depth of the \cs{edtext} where the \cs{lemma} is used.
-% So if the \cs{lemma} is called in a \cs{edtext} inside another \cs{edtext}, \meta{X} is equal to \verb+2+.
-% If the \cs{lemma} is called in a \cs{edtext} ``of first level'', \meta{X} is equal to \verb|1|. If the lemma is called in both 1 and 2 \cs{edtext} depth, \meta{X} is \verb+1,2+. If that word is referenced in the lemma of every \cs{edtext} depth, \meta{X} can also be set to \verb+inlemma+.
+% \item In the content of \protect\cs{lemma}, use \protect\cs{sameword} with no optional argument.
+% \item In the first argument of \protect\cs{edtext}, use \protect\cs{sameword} with the optional argument \oarg{X}. \meta{X} is the depth of the \protect\cs{edtext} where the \protect\cs{lemma} is used.
+% So if the \protect\cs{lemma} is called in a \protect\cs{edtext} inside another \protect\cs{edtext}, \meta{X} is equal to \verb+2+.
+% If the \protect\cs{lemma} is called in a \protect\cs{edtext} ``of first level'', \meta{X} is equal to \verb|1|. If the lemma is called in both 1 and 2 \protect\cs{edtext} depth, \meta{X} is \verb+1,2+. If that word is referenced in the lemma of every \protect\cs{edtext} depth, \meta{X} can also be set to \verb+inlemma+.
% \end{itemize}
-% Note that only words that are actually referenced in a \cs{lemma} need the optional argument. Therefore, the first \cs{sameword} in the example above should have ``1'' as its optional argument, to be referenced correctly in the lemma.
+% Note that only words that are actually referenced in a \protect\cs{lemma} need the optional argument. Therefore, the first \protect\cs{sameword} in the example above should have ``1'' as its optional argument, to be referenced correctly in the lemma.
%
-% Note also that the \meta{X} does not refer to the level where the \cs{sameword} occurs, but to the level of the \cs{lemma} that refers to that \cs{sameword}. For example:
+% Note also that the \meta{X} does not refer to the level where the \protect\cs{sameword} occurs, but to the level of the \protect\cs{lemma} that refers to that \protect\cs{sameword}. For example:
% \begin{verbatim}
% \edtext{some \edtext{\sameword[1]{word}}{\Afootnote{om. M}}
% and other \sameword{word}
@@ -1399,9 +1365,9 @@
% it is all}%
% }{\lemma{some \sameword{word} \ldots all}\Afootnote{critical note}}.%
% \end{verbatim}
-% Here the \cs{sameword} occurs in an \cs{edtext} of level 2, but since it is referenced by \cs{lemma} on level 1, it has ``1'' in the optional argument.
+% Here the \protect\cs{sameword} occurs in an \protect\cs{edtext} of level 2, but since it is referenced by \protect\cs{lemma} on level 1, it has ``1'' in the optional argument.
-% In the following schema, each framed box represents an \cs{edtext} level. Each number is an occurrence of \cs{sameword}. After a framed box, the text in superscript represents the content of \cs{lemma} for that \cs{edtext} level. The text in subscript at the right of a number represents the content of the optional argument of \cs{sameword}.
+% In the following schema, each framed box represents an \protect\cs{edtext} level. Each number is an occurrence of \protect\cs{sameword}. After a framed box, the text in superscript represents the content of \protect\cs{lemma} for that \protect\cs{edtext} level. The text in subscript at the right of a number represents the content of the optional argument of \protect\cs{sameword}.
%
%\fbox{%
% \fbox{%
@@ -1413,21 +1379,21 @@
% $5_1$
% }\textsuperscript{1\ldots5}
%
-% The \cs{sameword} number~3 is called in a \cs{lemma} related to an \cs{edtext} of level~2.
+% The \protect\cs{sameword} number~3 is called in a \protect\cs{lemma} related to an \protect\cs{edtext} of level~2.
% It must be marked by ``2''.
%
-% The \cs{sameword} number~5 is called in a \cs{lemma} related to \cs{edtext} of level~1. It must be marked by ``1''.
+% The \protect\cs{sameword} number~5 is called in a \protect\cs{lemma} related to \protect\cs{edtext} of level~1. It must be marked by ``1''.
%
-% The \cs{sameword} number is called in two \cs{lemma}s: one related to a \cs{edtext} of level~1, the other related to \cs{edtext} of level~2.
+% The \protect\cs{sameword} number is called in two \protect\cs{lemma}s: one related to a \protect\cs{edtext} of level~1, the other related to \protect\cs{edtext} of level~2.
% It must be marked by ``1,2''.
-% However, as \cs{lemma} is called only in level~1 and~2, ``1,2'' could replaced by ``inlemma''.
+% However, as \protect\cs{lemma} is called only in level~1 and~2, ``1,2'' could replaced by ``inlemma''.
%
-% The \cs{sameword} number ``2'' is in the first argument of a \cs{edtext} of level~3, but it has no \cs{lemma}-command, so there is no need to mark it.
+% The \protect\cs{sameword} number ``2'' is in the first argument of a \protect\cs{edtext} of level~3, but it has no \protect\cs{lemma}-command, so there is no need to mark it.
%
%
%
% \subsubsection{Customizing}
-% \DescribeMacro{\showwordrank}You can redefine the \cs{showwordrank} macro to change the way the number is printed. The default value is
+% \DescribeMacro{\showwordrank}You can redefine the \protect\cs{showwordrank} macro to change the way the number is printed. The default value is
% \begin{verbatim}
%\newcommand{\showwordrank}[2]{%
% #1\textsuperscript{#2}%
@@ -1443,10 +1409,10 @@
% \DescribeMacro{\footnoteC}
% \DescribeMacro{\footnoteD}
% \DescribeMacro{\footnoteE}
-% As well as the standard \LaTeX\ footnotes generated via \cs{footnote},
+% As well as the standard \LaTeX\ footnotes generated via \protect\cs{footnote},
% the package also provides
-% five series of additional footnotes called \cs{footnoteA} through
-% \cs{footnoteE}. These have the familiar marker in the text, and
+% five series of additional footnotes called \protect\cs{footnoteA} through
+% \protect\cs{footnoteE}. These have the familiar marker in the text, and
% the marked text at the foot of the page can be formated using
% any of the styles described for the critical footnotes. Note that
% the `regular' footnotes have the series letter at the end of the macro
@@ -1460,19 +1426,19 @@
% \DescribeMacro{\footfootmarkA}
% Each series uses a set of macros for
% styling the marks. The mark numbering scheme of series A is defined by the
-% \cs{thefootnoteA} macro; the default is: \\
+% \protect\cs{thefootnoteA} macro; the default is: \\
% \verb?\renewcommand*{\thefootnoteA}{\arabic{footnoteA}}?\\
-% The appearance of the mark in the text is controlled by \cs{bodyfootmarkA}
+% The appearance of the mark in the text is controlled by \protect\cs{bodyfootmarkA}
% which is defined as: \\
% \verb?\newcommand*{\bodyfootmarkA}{%? \\
% \verb? \hbox{\textsuperscript{\normalfont\@nameuse{@thefnmarkA}}}}? \\
-% The command \cs{footfootmarkA} controls the appearance of the mark at the
+% The command \protect\cs{footfootmarkA} controls the appearance of the mark at the
% start of the footnote text. It is defined as: \\
% \verb?\newcommand*{\footfootmarkA}{\textsuperscript{\@nameuse{@thefnmarkA}}}?
%
% There are similar command triples for the other series.
% \subsubsection{Separator for multiple footnotes}
-% The \Lpack{footmisc} package~\cite{FOOTMISC} by Robin
+% The \protect\package{footmisc} package~\cite{FOOTMISC} by Robin
% Fairbairns\index{Fairbairns, Robin} has an option whereby
% sequential footnote
% marks in the text can be separated by
@@ -1480,7 +1446,7 @@
% As a convenience \Eledmac{} provides this automatically.
%
% \DescribeMacro{\multfootsep}
-% \cs{multfootsep} is used as the separator between footnote markers.
+% \protect\cs{multfootsep} is used as the separator between footnote markers.
% Its default definition is: \\
% \verb?\providecommand*{\multfootsep}{\textsuperscript{\normalfont,}}? \\
% and can be changed if necessary.
@@ -1489,7 +1455,7 @@
% \subsubsection{Create a new series}\label{newseries}
%
% If you need more than six series of critical footnotes you can
-% create extra series, using \cs{newseries} command. For example to create G and H series \cs{newseries}\verb+G,H+.
+% create extra series, using \protect\cs{newseries} command. For example to create G and H series \protect\cs{newseries}\verb+G,H+.
%
% \subsubsection{Delete series}
% As the number of series which are defined increases, \macpackage gets slower.
@@ -1504,10 +1470,10 @@
% Series order determines footnotes order.
%
% \DescribeMacro{seriesatbegin}\DescribeMacro{seriesatend} However in some specific cases, you need to change the series order at some point inside the document.
-% You can use \cs{seriesatbegin}\marg{s} to pull up a given series \meta{s} to the beginning, or \cs{seriesatend}\marg{s} to push it down to the end.
+% You can use \protect\cs{seriesatbegin}\marg{s} to pull up a given series \meta{s} to the beginning, or \protect\cs{seriesatend}\marg{s} to push it down to the end.
% \subsection{Position of critical and familiar footnotes}
% \DescribeMacro{\fnpos}\DescribeMacro{\mpfnpos}
-% There is a historical incoherence in \Lpack{(r)(e)ledmac}. The familiar footnotes are
+% There is a historical incoherence in \protect\package{(r)(e)ledmac}. The familiar footnotes are
% before the critical footnotes in a normal page, but after in a minipage or in a ledgroup.
% However, it is possible to change the relative position of both types of footnotes.
% If you want to have familiar footnotes after critical footnotes in a normal page, use:
@@ -1539,7 +1505,7 @@
% paragraphs in one column. Three other formats are also
% available for notes.
%
-% Use \cs{Xarrangement}\oarg{s}\marg{a} to change the arrangement of the \meta{s} series of critical footnotes and \cs{arrangementX}\oarg{s}\marg{a} to change the arrangement of the \meta{s} series of familiar footnotes.
+% Use \protect\cs{Xarrangement}\oarg{s}\marg{a} to change the arrangement of the \meta{s} series of critical footnotes and \protect\cs{arrangementX}\oarg{s}\marg{a} to change the arrangement of the \meta{s} series of familiar footnotes.
%
% The value of \meta{a} can be one of the following
% \begin{itemize}
@@ -1552,7 +1518,7 @@
% \end{itemize}
%
% You should set up the page layout parameters, and in particular the
-% \cs{baselineskip} of the footnotes, before you call this
+% \protect\cs{baselineskip} of the footnotes, before you call this
% macro because its action depends on these;
% too much or too little space will be allotted for the notes on
% the page if these macros use the wrong
@@ -1568,38 +1534,38 @@
%
% The notes arrangement must be called after having defined the document geometry setting. If you must change geometry setting inside your document, do not forget to call again not arrangement.
%
-% \cs{hsize} has been set for the pages that use
+% \protect\cs{hsize} has been set for the pages that use
% this series of notes; otherwise \TeX\ will try to put too
% many or too few of these notes on each page. If you need to
-% change the \cs{hsize} within the document, call
-% \cs{footparagraph} again afterwards to take account of the new
+% change the \protect\cs{hsize} within the document, call
+% \protect\cs{footparagraph} again afterwards to take account of the new
% value.
% \subsection{Control line number printing}
% \subsubsection{Print line number only at first time}
% \DescribeMacro{\Xnumberonlyfirstinline}
-% \changes{v1.0.1}{2012/09/16}{Correction on \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 \cs{Xnumberonlyfirstinline}\oarg{s}.
+% \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}.
%
-% Use \cs{Xnumberonlyfirstinline}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
+% Use \protect\cs{Xnumberonlyfirstinline}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
%
% \DescribeMacro{\Xnumberonlyfirstintwolines}
-% \changes{v1.1.0}{2012/09/25}{Add \cs{Xnumberonlyfirstintwolines}}
+% \changes{v1.1.0}{2012/09/25}{Add \protect\cs{Xnumberonlyfirstintwolines}}
% Suppose you have a lemma on line~2 and a lemma between line~2 and line~3.
-% With \cs{Xnumberonlyfirstinline}, the second lemma is considered to be on the same line as the first lemma.
-% But if you use both \cs{Xnumberonlyfirstinline}\oarg{s} and \cs{Xnumberonlyfirstintwolines}\oarg{s}, the distinction is made.
-% Use \cs{Xnumberonlyfirstintwolines}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
+% With \protect\cs{Xnumberonlyfirstinline}, the second lemma is considered to be on the same line as the first lemma.
+% But if you use both \protect\cs{Xnumberonlyfirstinline}\oarg{s} and \protect\cs{Xnumberonlyfirstintwolines}\oarg{s}, the distinction is made.
+% Use \protect\cs{Xnumberonlyfirstintwolines}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
% \DescribeMacro{\Xsymlinenum}
-% For setting a particular symbol in place of the line number, you can use \cs{Xsymlinenum}\oarg{s}\marg{symbol} in combination with \cs{Xnumberonlyfirstinline}\oarg{s}. From the second lemma of the same line, the symbol will be used instead of the line number. Note that any command called in \meta{symbol} must be robust. Use \cs{robustify} to robustify a not robust command.
+% For setting a particular symbol in place of the line number, you can use \protect\cs{Xsymlinenum}\oarg{s}\marg{symbol} in combination with \protect\cs{Xnumberonlyfirstinline}\oarg{s}. From the second lemma of the same line, the symbol will be used instead of the line number. Note that any command called in \meta{symbol} must be robust. Use \protect\cs{robustify} to robustify a not robust command.
%
% \subsubsection{Abbreviate line range}
-% \changes{v1.20.0}{2015/03/22}{Add \cs{Xtwolines} and \cs{Xmorethantwolines} hooks}
+% \changes{v1.20.0}{2015/03/22}{Add \protect\cs{Xtwolines} and \protect\cs{Xmorethantwolines} hooks}
% \label{Xtwolines}
% \DescribeMacro{\Xtwolines}\DescribeMacro{\Xmorethantwolines}
% If a lemma is printed on two subsequent lines, \Eledmac\ will print the first and the last line numbers.
% Instead of this, it is also possible to print an abbreviation which stands for ``line 1 and subsequent line(s)''.
%
-% To achieve this, use \cs{Xtwolines}\oarg{s}\marg{text} and \cs{Xmorethantwolines}\oarg{s}\marg{text}.
-% The \meta{text} argument of \cs{Xtwolines} will be printed if the lemma is on two lines, and the \meta{text} argument of \cs{Xmorethantwolines} will be printed if the lemma is on three or more lines.
+% To achieve this, use \protect\cs{Xtwolines}\oarg{s}\marg{text} and \protect\cs{Xmorethantwolines}\oarg{s}\marg{text}.
+% The \meta{text} argument of \protect\cs{Xtwolines} will be printed if the lemma is on two lines, and the \meta{text} argument of \protect\cs{Xmorethantwolines} will be printed if the lemma is on three or more lines.
% For example:
% \begin{verbatim}
% \Xtwolines{sq.}
@@ -1607,40 +1573,40 @@
% \end{verbatim}
% Will print ``1sq.'' for a lemma which falls on lines 1-2 and ``1sqq.'' for a lemma which falls on lines 1-4.
%
-% \DescribeMacro{\Xmorethantwolines} If you use \cs{Xtwolines} without setting \cs{Xmorethantwolines}, the \meta{text} argument of \cs{Xtwolines} will be used for lemmas which fall on three or more lines.
+% \DescribeMacro{\Xmorethantwolines} If you use \protect\cs{Xtwolines} without setting \protect\cs{Xmorethantwolines}, the \meta{text} argument of \protect\cs{Xtwolines} will be used for lemmas which fall on three or more lines.
%
-% However, if you want to use a short form (when the lemma overlaps two lines, but not more than two), use \cs{Xtwolinesbutnotmore}\oarg{series}.
+% However, if you want to use a short form (when the lemma overlaps two lines, but not more than two), use \protect\cs{Xtwolinesbutnotmore}\oarg{series}.
%
-% It is possible to disable \cs{Xtwolinesbutnotmore}\oarg{series} with \cs{Xtwolinesbutnotmore}\oarg{series}\verb+[false]+.
+% It is possible to disable \protect\cs{Xtwolinesbutnotmore}\oarg{series} with \protect\cs{Xtwolinesbutnotmore}\oarg{series}\verb+[false]+.
%
% When you use lineation by page, the final page number, if different from the initial page number,
-% will not be printed, because the final page number is included in the \cs{Xendtwolines} symbol.
+% will not be printed, because the final page number is included in the \protect\cs{Xendtwolines} symbol.
%
% \DescribeMacro{\Xtwolinesonlyinsamepage}
% However, you can force print the final page number with\\
-% \cs{Xtwolinesonlyinsamepage}\oarg{series}.
+% \protect\cs{Xtwolinesonlyinsamepage}\oarg{series}.
%
-% Use \cs{Xtwolinesonlyinsamepage}\oarg{series}\verb+[false]+ to disable this.
+% Use \protect\cs{Xtwolinesonlyinsamepage}\oarg{series}\verb+[false]+ to disable this.
%
-% You can disable \cs{Xtwolines} and related for a specific note by using the `[fulllines]` argument in the note macro cf.~\reff{fulllines}.
+% You can disable \protect\cs{Xtwolines} and related for a specific note by using the `[fulllines]` argument in the note macro cf.~\reff{fulllines}.
%
-% \label{Xendtwolines}\changes{v1.21.0}{2015/04/13}{Add \cs{Xendtwolines}, \cs{Xendmorethantwolines}, \cs{Xendtwolinesbutnotmore} and \cs{Xendtwolinesonlyinsamepage}.}
+% \label{Xendtwolines}\changes{v1.21.0}{2015/04/13}{Add \protect\cs{Xendtwolines}, \protect\cs{Xendmorethantwolines}, \protect\cs{Xendtwolinesbutnotmore} and \protect\cs{Xendtwolinesonlyinsamepage}.}
% \DescribeMacro{\Xendtwolines}\DescribeMacro{\Xendmorethantwolines}\DescribeMacro{\Xendtwolinesbutnotmore}
-% For endnotes, use \cs{Xendtwolines}; \cs{Xendmorethantwolines}; \cs{Xendtwolinesbutnotmore}; \cs{Xendtwolinesonlyinsamepage} instead of \cs{Xtwolines}; \cs{Xmorethantwolines}; \cs{Xtwolinesbutnotmore}; \cs{Xtwolinesonlyinsamepage}.
+% For endnotes, use \protect\cs{Xendtwolines}; \protect\cs{Xendmorethantwolines}; \protect\cs{Xendtwolinesbutnotmore}; \protect\cs{Xendtwolinesonlyinsamepage} instead of \protect\cs{Xtwolines}; \protect\cs{Xmorethantwolines}; \protect\cs{Xtwolinesbutnotmore}; \protect\cs{Xtwolinesonlyinsamepage}.
%
%
% \subsubsection{Disable line number}
% \DescribeMacro{\Xnonumber}
-% You can use \cs{Xnonumber}\oarg{s} if you do not want to have the line number in a footnote. To cancel it, use \cs{Xnonumber}\oarg{s}\verb+[false]+.
-% \DescribeMacro{\Xendnonumber} \cs{Xendnonumber}\oarg{s} is the same for endnote.
+% You can use \protect\cs{Xnonumber}\oarg{s} if you do not want to have the line number in a footnote. To cancel it, use \protect\cs{Xnonumber}\oarg{s}\verb+[false]+.
+% \DescribeMacro{\Xendnonumber} \protect\cs{Xendnonumber}\oarg{s} is the same for endnote.
% \subsubsection{Printing pstart number}
-% \changes{v1.1.0}{2012/09/25}{Add \cs{Xpstart} and \cs{Xonlypstart}}
-% \changes{v1.18.0}{2015/02/23}{Add \cs{Xpstarteverytime}}
-% \changes{v1.18.0}{2015/02/23}{Debug \cs{Xonlypstart} when using \cs{Xnumberonlyfirstinline} and the current line number differs from the previous.}
+% \changes{v1.1.0}{2012/09/25}{Add \protect\cs{Xpstart} and \protect\cs{Xonlypstart}}
+% \changes{v1.18.0}{2015/02/23}{Add \protect\cs{Xpstarteverytime}}
+% \changes{v1.18.0}{2015/02/23}{Debug \protect\cs{Xonlypstart} when using \protect\cs{Xnumberonlyfirstinline} and the current line number differs from the previous.}
% \DescribeMacro{\Xpstart}
-% You can use \cs{Xpstart}\oarg{s} if you want to print the pstart number in the footnote, before the line and subline number.
-% Use \cs{Xpstart}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
+% You can use \protect\cs{Xpstart}\oarg{s} if you want to print the pstart number in the footnote, before the line and subline number.
+% Use \protect\cs{Xpstart}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
% Note that when you change the lineation system, the option is automatically switched :
% \begin{itemize}
% \item If you use lineation by pstart, the option is enabled.
@@ -1648,42 +1614,42 @@
% \end{itemize}
%
% \DescribeMacro{\Xpstarteverytime}
-% By default, the pstart number is printed only in the part of text where you have called \cs{numberpstarttrue}.
+% By default, the pstart number is printed only in the part of text where you have called \protect\cs{numberpstarttrue}.
% We don't know why you would like to print the pstart number in the notes and not in the main text.
-% However, if you want to do it, you can call \cs{Xpstarteverytime}\oarg{s}.
+% However, if you want to do it, you can call \protect\cs{Xpstarteverytime}\oarg{s}.
% In this case, the pstart number will be printed every time in footnote.
%
% \DescribeMacro{\Xonlypstart}
-% In combination with \cs{Xpstart}, you can use \cs{Xonlypstart}\oarg{s} if you want to print only the pstart number in the footnote, and not the line and subline number.
-% Use \cs{Xonlypstart}\oarg{s}\verb+[false]+ disable this it (\meta{s} can be empty if you want to disable it for every series).
+% In combination with \protect\cs{Xpstart}, you can use \protect\cs{Xonlypstart}\oarg{s} if you want to print only the pstart number in the footnote, and not the line and subline number.
+% Use \protect\cs{Xonlypstart}\oarg{s}\verb+[false]+ disable this it (\meta{s} can be empty if you want to disable it for every series).
% \subsubsection{Space around number}
% \DescribeMacro{\Xbeforenumber}
-% With \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.
+% 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 \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, the space is not either. The default value is 0.5~em.
%
-%\changes{v1.4.3}{2012/12/18}{Add \cs{Xnonbreakableafternumber}.}
+%\changes{v1.4.3}{2012/12/18}{Add \protect\cs{Xnonbreakableafternumber}.}
%\DescribeMacro{\Xnonbreakableafternumber}
-% By default, the space defined by \cs{Xafternumber} is breakable. With \cs{Xnonbreakableafternumber}\oarg{s} it becomes nonbreakable. Use \cs{Xnonbreakableafternumber}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
+% By default, the space defined by \protect\cs{Xafternumber} is breakable. With \protect\cs{Xnonbreakableafternumber}\oarg{s} it becomes nonbreakable. Use \protect\cs{Xnonbreakableafternumber}\oarg{s}\verb+[false]+ to disable this (\meta{s} can be empty if you want to disable it for every series).
%
% \subsubsection{Space around line symbol}
% \DescribeMacro{\Xbeforesymlinenum}
-% With \cs{Xbeforesymlinenum}\oarg{s}\marg{l} you can add some space before the line symbol in a footnote. The default value is value set by \cs{Xbeforenumber}.
+% With \protect\cs{Xbeforesymlinenum}\oarg{s}\marg{l} you can add some space before the line symbol in a footnote. The default value is value set by \protect\cs{Xbeforenumber}.
%
% \DescribeMacro{\Xaftersymlinenum}
-% With \cs{Xaftersymlinenum}\oarg{s}\marg{l} you can add some space after the line symbol in a footnote. The default value is value set by \cs{Xafternumber}.
+% With \protect\cs{Xaftersymlinenum}\oarg{s}\marg{l} you can add some space after the line symbol in a footnote. The default value is value set by \protect\cs{Xafternumber}.
%
% \subsubsection{Space in place of number}
% \DescribeMacro{\Xinplaceofnumber}
-% If no number or symbolic line number is printed, you can add a space, with \cs{Xinplaceofnumber}\oarg{s}\marg{l}. The default value is 1~em.
+% If no number or symbolic line number is printed, you can add a space, with \protect\cs{Xinplaceofnumber}\oarg{s}\marg{l}. The default value is 1~em.
%
-% \DescribeMacro{Xendinplaceofnumber}. \cs{Xendinplaceofnumber}\oarg{s}\marg{l} is the same, for critical endnotes.
+% \DescribeMacro{Xendinplaceofnumber}. \protect\cs{Xendinplaceofnumber}\oarg{s}\marg{l} is the same, for critical endnotes.
% \subsubsection{Boxing line number and line symbol}
% \DescribeMacro{\Xboxlinenum}
% It could be useful to put the line number inside a fixed box: the content of the note will be printed after this box.
-% You can use \cs{Xboxlinenum}\oarg{s}\marg{l} to do that.
-% To subsequently disable this feature, use \cs{Xboxlinenum} with length equal to 0~pt.
+% You can use \protect\cs{Xboxlinenum}\oarg{s}\marg{l} to do that.
+% To subsequently disable this feature, use \protect\cs{Xboxlinenum} with length equal to 0~pt.
% One use of this feature is to print line number in a column, and the note in an other column:
% \begin{verbatim}
%\Xhangindent{1em}
@@ -1692,24 +1658,24 @@
% \end{verbatim}
%
% \DescribeMacro{\Xboxsymlinenum}
-% \cs{Xboxsymlinenum}\oarg{s}\marg{l} is the same as \cs{Xboxlinenum} but for the line number symbol.
+% \protect\cs{Xboxsymlinenum}\oarg{s}\marg{l} is the same as \protect\cs{Xboxlinenum} but for the line number symbol.
%
-% \changes{v1.23.0}{2015/05/18}{Add \cs{Xboxlinenumalign} and \cs{Xendboxlinenumalign}.}
+% \changes{v1.23.0}{2015/05/18}{Add \protect\cs{Xboxlinenumalign} and \protect\cs{Xendboxlinenumalign}.}
% \DescribeMacro{Xboxlinenumalign}
% If you put line number in box, it will be aligned left inside the box.
-% However, you can change it using \cs{Xboxlinenumalign}\oarg{s}\marg{text} where \meta{text} can be the following:
+% However, you can change it using \protect\cs{Xboxlinenumalign}\oarg{s}\marg{text} where \meta{text} can be the following:
% \begin{description}
% \item[L] to align left (default value);
% \item[R] to align right;
% \item[C] to center.
% \end{description}
%
-% \changes{v1.23.0}{2015/05/18}{Add \cs{Xboxstartlinenum}, \cs{Xendboxstartlinenum}, \cs{Xboxendlinenum}, \cs{Xendboxendlinenum}.}
-% When using \cs{Xboxlinenum}, \macpackage put all the line number description in the same box. That is, the same box will contain: the start line number, the dash, and either the end line number or the range symbol (like \verb+ff.+).
+% \changes{v1.23.0}{2015/05/18}{Add \protect\cs{Xboxstartlinenum}, \protect\cs{Xendboxstartlinenum}, \protect\cs{Xboxendlinenum}, \protect\cs{Xendboxendlinenum}.}
+% When using \protect\cs{Xboxlinenum}, \macpackage put all the line number description in the same box. That is, the same box will contain: the start line number, the dash, and either the end line number or the range symbol (like \verb+ff.+).
% However, it is possible to box them in two different boxes.
% \begin{itemize}
-% \item \cs{Xboxstartlinenum}\oarg{s}\marg{l} will box the start line number in a box of length \meta{l}. The content will be put at the right of the box.
-% \item \cs{Xboxendlinenum}\oarg{s}\marg{l} will box the dash plus the end line number or the range symbol in a box of length \meta{l}. The content will be put at the left of the box.
+% \item \protect\cs{Xboxstartlinenum}\oarg{s}\marg{l} will box the start line number in a box of length \meta{l}. The content will be put at the right of the box.
+% \item \protect\cs{Xboxendlinenum}\oarg{s}\marg{l} will box the dash plus the end line number or the range symbol in a box of length \meta{l}. The content will be put at the left of the box.
% \end{itemize}
%
% With these two commands, it is possible to horizontaly align the dash of line number when using critical notes, to obtain something like:
@@ -1722,96 +1688,96 @@
% \DescribeMacro{\Xendboxlinenumalign}
% \DescribeMacro{\Xendboxstartlinenumalign}
% \DescribeMacro{\Xendboxendlinenumalign}
-% \changes{v1.20.0}{2015/03/22}{Add \cs{Xendboxlinenum}}
-% \cs{Xendboxlinenum}\oarg{s}\marg{l}, \cs{Xendboxlinenumalign}\oarg{s}\marg{text}, \cs{Xendboxstartlinenum}\oarg{s}\marg{l}, \cs{Xendboxendlinenum}\oarg{s}\marg{l} are the same as, respectively, \cs{Xboxlinenum} and \cs{Xboxlinenumalign}, \cs{Xboxstartlinenum}, \cs{Xboxendlinenum} except in endnotes.
+% \changes{v1.20.0}{2015/03/22}{Add \protect\cs{Xendboxlinenum}}
+% \protect\cs{Xendboxlinenum}\oarg{s}\marg{l}, \protect\cs{Xendboxlinenumalign}\oarg{s}\marg{text}, \protect\cs{Xendboxstartlinenum}\oarg{s}\marg{l}, \protect\cs{Xendboxendlinenum}\oarg{s}\marg{l} are the same as, respectively, \protect\cs{Xboxlinenum} and \protect\cs{Xboxlinenumalign}, \protect\cs{Xboxstartlinenum}, \protect\cs{Xboxendlinenum} except in endnotes.
%
%
%\subsection{Separator between the lemma and the note}
% \subsubsection{For footnotes}
% \DescribeMacro{\Xlemmaseparator}
-% By default, in a footnote, the separator between the lemma and the note is a right bracket (\cs{rbracket}). You can use \cs{Xlemmaseparator}\oarg{s}\marg{Xlemmaseparator} to change it. The optional argument can be used to specify the series in which it is used. Note that there is a non-breakable space between the lemma and the separator, but a \textbf{breakable} space between the separator and the lemma.
+% By default, in a footnote, the separator between the lemma and the note is a right bracket (\protect\cs{rbracket}). You can use \protect\cs{Xlemmaseparator}\oarg{s}\marg{Xlemmaseparator} to change it. The optional argument can be used to specify the series in which it is used. Note that there is a non-breakable space between the lemma and the separator, but a \textbf{breakable} space between the separator and the lemma.
%
% \DescribeMacro{\Xbeforelemmaseparator}
-% Using \cs{Xbeforelemmaseparator}\oarg{s}\marg{l} you can add some space between lemma and separator. If your lemma separator is empty, this space won't be printed. The default value is 0~em.
+% Using \protect\cs{Xbeforelemmaseparator}\oarg{s}\marg{l} you can add some space between lemma and separator. If your lemma separator is empty, this space won't be printed. The default value is 0~em.
%
% \DescribeMacro{\Xafterlemmaseparator}
-% Using \cs{Xafterlemmaseparator}\oarg{s}\marg{l} you can add some space between separator and note. If your lemma separator is empty, this space will not be printed. The default value is 0.5~em.
+% Using \protect\cs{Xafterlemmaseparator}\oarg{s}\marg{l} you can add some space between separator and note. If your lemma separator is empty, this space will not be printed. The default value is 0.5~em.
%
% \DescribeMacro{\Xnolemmaseparator}
-% You can suppress the lemma separator, using \cs{Xnolemmaseparator}\oarg{s}, which is simply a alias of \cs{Xlemmaseparator}\oarg{s}\verb|{}|.
+% You can suppress the lemma separator, using \protect\cs{Xnolemmaseparator}\oarg{s}, which is simply a alias of \protect\cs{Xlemmaseparator}\oarg{s}\verb|{}|.
%
% \DescribeMacro{\Xinplaceoflemmaseparator}
-% With \cs{Xinplaceoflemmaseparator}\oarg{s}\marg{l} you can add a space if no lemma separator is printed. The default value is 1~em.
+% With \protect\cs{Xinplaceoflemmaseparator}\oarg{s}\marg{l} you can add a space if no lemma separator is printed. The default value is 1~em.
%
%
% \subsubsection{For endnotes}\label{Xendlemmaseparator}
% \changes{v1.22.0}{2015/04/25}{Add option for lemma separator inside endnotes}
% \DescribeMacro{\Xendlemmaseparator}
-% By default, there is no separator inside endnotes between the lemma and the content of the note. You can use \cs{Xendlemmaseparator}\oarg{s}\marg{Xendlemmaseparator} to change this. The optional argument can be used to specify the series in which it is used.
+% By default, there is no separator inside endnotes between the lemma and the content of the note. You can use \protect\cs{Xendlemmaseparator}\oarg{s}\marg{Xendlemmaseparator} to change this. The optional argument can be used to specify the series in which it is used.
% An common value of \verb+<Xendlemmaseparator>+ is \verb+\rbracket+.
%
% Note that there is a non-breakable space between the lemma and the separator, but a \textbf{breakable} space between the separator and the lemma.
%
% \DescribeMacro{\Xendbeforelemmaseparator}
-% Using \cs{Xendbeforelemmaseparator}\oarg{s}\marg{l} you can add some space between the lemma and the separator. If your lemma separator is empty, this space won't be printed. The default value is 0~em.
+% Using \protect\cs{Xendbeforelemmaseparator}\oarg{s}\marg{l} you can add some space between the lemma and the separator. If your lemma separator is empty, this space won't be printed. The default value is 0~em.
%
% \DescribeMacro{\Xendafterlemmaseparator}
-% Using \cs{Xendafterlemmaseparator}\oarg{s}\marg{l} you can add some space between the separator and the content of the note. If your lemma separator is empty, this space won't be printed. The default value is 0.5~em.
+% Using \protect\cs{Xendafterlemmaseparator}\oarg{s}\marg{l} you can add some space between the separator and the content of the note. If your lemma separator is empty, this space won't be printed. The default value is 0.5~em.
%
%
% \DescribeMacro{\Xendinplaceoflemmaseparator}
-% With \cs{Xendinplaceoflemmaseparator}\oarg{s}\marg{l} you can add some space if you chose to remove the lemma separator. The default value is 0.5~em.
+% With \protect\cs{Xendinplaceoflemmaseparator}\oarg{s}\marg{l} you can add some space if you chose to remove the lemma separator. The default value is 0.5~em.
%
%
% \subsection{Font style}
% \subsubsection{For line number}
% \DescribeMacro{\Xnotenumfont}
-% \cs{Xnotenumfont}\oarg{s}\marg{command} is used to change the font style for line numbers in critical footnotes ;
-% \meta{command} must be one (or more) switching command, like \cs{bfseries}.
+% \protect\cs{Xnotenumfont}\oarg{s}\marg{command} is used to change the font style for line numbers in critical footnotes ;
+% \meta{command} must be one (or more) switching command, like \protect\cs{bfseries}.
%
% \DescribeMacro{\Xendnotenumfont}
-% \cs{Xendnotenumfont}\oarg{s}\marg{command} is used to change the font style for line numbers in critical footnotes.
-% \meta{command} must be one (or more) switching command, like \cs{bfseries}.
+% \protect\cs{Xendnotenumfont}\oarg{s}\marg{command} is used to change the font style for line numbers in critical footnotes.
+% \meta{command} must be one (or more) switching command, like \protect\cs{bfseries}.
%
% \DescribeMacro{\notenumfontX}
-% \cs{notenumfontX}\oarg{s}\marg{command} is used to change the font style for note numbers in familiar footnotes.
-% \meta{command} must be one (or more) switching command, like \cs{bfseries}.
+% \protect\cs{notenumfontX}\oarg{s}\marg{command} is used to change the font style for note numbers in familiar footnotes.
+% \meta{command} must be one (or more) switching command, like \protect\cs{bfseries}.
%
% \DescribeMacro{\Xnotefontsize}
-% \cs{Xnotefontsize}\oarg{s}\marg{command} is used to define the font size of critical footnotes of the series. The default value is \cs{footnotesize}.
-% The \meta{command} must not be a size in pt, but a standard \LaTeX\ size, like \cs{small}.
+% \protect\cs{Xnotefontsize}\oarg{s}\marg{command} is used to define the font size of critical footnotes of the series. The default value is \protect\cs{footnotesize}.
+% The \meta{command} must not be a size in pt, but a standard \LaTeX\ size, like \protect\cs{small}.
%
% \DescribeMacro{\notefontsizeX}
-% \cs{notefontsizeX}\oarg{s}\marg{command} is used to define the font size of critical footnotes of the series. The default value is \cs{footnotesize}.
-% The \meta{command} must not be a size in pt, but a standard \LaTeX\ size, like \cs{small}.
+% \protect\cs{notefontsizeX}\oarg{s}\marg{command} is used to define the font size of critical footnotes of the series. The default value is \protect\cs{footnotesize}.
+% The \meta{command} must not be a size in pt, but a standard \LaTeX\ size, like \protect\cs{small}.
%
% \DescribeMacro{\Xendnotefontsize}
-% \cs{Xendnotefontsize}\oarg{s}\marg{l} is used to define the font size of end critical footnotes of the series. The default value is \cs{footnotesize}.
-% The \meta{command} must not be a size in pt, but a standard \LaTeX\ size, like \cs{small}.
+% \protect\cs{Xendnotefontsize}\oarg{s}\marg{l} is used to define the font size of end critical footnotes of the series. The default value is \protect\cs{footnotesize}.
+% The \meta{command} must not be a size in pt, but a standard \LaTeX\ size, like \protect\cs{small}.
% \subsubsection{For the lemma}
% \changes{v1.11.0}{2014/05/09}{Add hooks to disable the font selection for lemma in footnote.}
% \DescribeMacro{\Xlemmadisablefontselection}
-% By default, font of the lemma in footnote is the same as font of the lemma in the main text. For example, if the lemma is in italic in the main text, it is also in italic in note. The \cs{Xlemmadisablefontselection}\oarg{s} command allows to disable it for a specific series.
+% By default, font of the lemma in footnote is the same as font of the lemma in the main text. For example, if the lemma is in italic in the main text, it is also in italic in note. The \protect\cs{Xlemmadisablefontselection}\oarg{s} command allows to disable it for a specific series.
%
% \DescribeMacro{\Xendlemmadisablefontselection}
-% By default, font of the lemma in endnote is the same as font of the lemma in the main text. For example, if the lemma is in italic in the main text, it is also in italic in note. The command allows \cs{Xendlemmadisablefontselection}\oarg{s} to disable it for a specific series.
+% By default, font of the lemma in endnote is the same as font of the lemma in the main text. For example, if the lemma is in italic in the main text, it is also in italic in note. The command allows \protect\cs{Xendlemmadisablefontselection}\oarg{s} to disable it for a specific series.
%
%
% \subsection{Styles of notes content}
-% \changes{v1.21.0}{2015/04/13}{Add \cs{Xparindent} and \cs{hangindentX}}
+% \changes{v1.21.0}{2015/04/13}{Add \protect\cs{Xparindent} and \protect\cs{hangindentX}}
% \DescribeMacro{\Xparindent}
% By default, \macpackage does not add indentation before the paragraphs inside critical footnotes.
-% Use \cs{Xparindent}\oarg{series} to enable indentation.
+% Use \protect\cs{Xparindent}\oarg{series} to enable indentation.
%
% \DescribeMacro{\parindentX}
% By default, \macpackage does not add indentation before the paragraphs inside familiar footnotes.
-% Use \cs{parindentX}\oarg{series} to enable indentation.
+% Use \protect\cs{parindentX}\oarg{series} to enable indentation.
%
% \DescribeMacro{\Xhangindent}
-% For critical notes NOT paragraphed you can define an indent with \cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make distinction between a new note and a break in a note. The default value is 0~pt.
+% For critical notes NOT paragraphed you can define an indent with \protect\cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make distinction between a new note and a break in a note. The default value is 0~pt.
%
% \DescribeMacro{\hangindentX}
-% For familiar notes NOT paragraphed you can define an indentation with \cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make a distinction between a new note and a break in a note.
+% For familiar notes NOT paragraphed you can define an indentation with \protect\cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make a distinction between a new note and a break in a note.
%
% \subsection{Arbitrary code at the beginning of notes}
% \changes{v1.1.0}{2012/09/25}{New hook to add arbitrary code at the beginning of the notes}
@@ -1823,162 +1789,162 @@
% \end{verbatim}
%
% \DescribeMacro{\Xbhooknote}
-% \cs{Xbhooknote}\oarg{series}\marg{code} is to be used at the beginning of the critical footnotes.
+% \protect\cs{Xbhooknote}\oarg{series}\marg{code} is to be used at the beginning of the critical footnotes.
%
%
% \DescribeMacro{\bhooknoteX}
-% \cs{bhooknoteX}\oarg{series}\marg{code} is to be used at the beginning of the familiar footnotes.
+% \protect\cs{bhooknoteX}\oarg{series}\marg{code} is to be used at the beginning of the familiar footnotes.
%
%
% \DescribeMacro{\Xendbhooknote}
-% \cs{Xendbhooknote}\oarg{series}\marg{code} is to be used at the beginning of the endnotes.
+% \protect\cs{Xendbhooknote}\oarg{series}\marg{code} is to be used at the beginning of the endnotes.
%
% \subsection{Options for footnotes in columns}
% \subsubsection{Alignment}
-% \changes{v1.21.0}{2015/04/13}{Add \cs{Xcolalign} and \cs{colalignX} hooks}
+% \changes{v1.21.0}{2015/04/13}{Add \protect\cs{Xcolalign} and \protect\cs{colalignX} hooks}
% By default, texts in footnotes in two or three columns are flushed left without hyphenation.
-% However, you can change this with \cs{Xcolalign}\oarg{s}\marg{code}, for critical footnotes, and \cs{colalignX}\oarg{s}\marg{code}, for familiar footnotes.
+% However, you can change this with \protect\cs{Xcolalign}\oarg{s}\marg{code}, for critical footnotes, and \protect\cs{colalignX}\oarg{s}\marg{code}, for familiar footnotes.
%
% \verb+<code>+ must be one of the following command:
% \begin{description}
-% \item[\cs{justifying}] to have text justified, as usual with \LaTeX. You can also let \verb+<code>+ empty.
-% \item[\cs{raggedright}] to have text left aligned, but \emph{without hyphenation}. That is the default \Lpack{eledmac} setting.
-% \item[\cs{RaggedRight}] to have text left aligned \emph{with hyphenation}.
-% \item[\cs{raggedleft}] to have text right aligned, but \emph{without hyphenation}.
-% \item[\cs{RaggedLeft}] to have text right aligned \emph{with hyphenation}.
-% \item[\cs{centering}] to have text centered, but \emph{without hyphenation}.
-% \item[\cs{Centering}] to have text centered \emph{with hyphenation}.
+% \item[\protect\cs{justifying}] to have text justified, as usual with \LaTeX. You can also let \verb+<code>+ empty.
+% \item[\protect\cs{raggedright}] to have text left aligned, but \emph{without hyphenation}. That is the default \protect\package{eledmac} setting.
+% \item[\protect\cs{RaggedRight}] to have text left aligned \emph{with hyphenation}.
+% \item[\protect\cs{raggedleft}] to have text right aligned, but \emph{without hyphenation}.
+% \item[\protect\cs{RaggedLeft}] to have text right aligned \emph{with hyphenation}.
+% \item[\protect\cs{centering}] to have text centered, but \emph{without hyphenation}.
+% \item[\protect\cs{Centering}] to have text centered \emph{with hyphenation}.
% \end{description}
%
% \subsubsection{Size of the columns}
% For the following four macros, be careful that the columns are made from right to left.
%
% \DescribeMacro{\Xhsizetwocol}
-% \cs{Xhsizetwocol}\oarg{s}\marg{l} is used to change width of a column when critical notes are displaying in two columns. Defaut value is \verb+.45 \hsize+.
+% \protect\cs{Xhsizetwocol}\oarg{s}\marg{l} is used to change width of a column when critical notes are displaying in two columns. Defaut value is \verb+.45 \hsize+.
%
% \DescribeMacro{\Xhsizethreecol}
-% \cs{Xhsizethreecol}\oarg{s}\marg{l} is used to change width of a column when critical notes are displaying in three columns. Defaut value is \verb+.3 \hsize+.
+% \protect\cs{Xhsizethreecol}\oarg{s}\marg{l} is used to change width of a column when critical notes are displaying in three columns. Defaut value is \verb+.3 \hsize+.
%
% \DescribeMacro{\hsizetwocolX}
-% \cs{hsizetwocol}\oarg{s}\marg{l} is used to change width of a column when familiar notes are displaying in two columns. Defaut value is \verb+.45 \hsize+.
+% \protect\cs{hsizetwocol}\oarg{s}\marg{l} is used to change width of a column when familiar notes are displaying in two columns. Defaut value is \verb+.45 \hsize+.
%
% \DescribeMacro{\hsizethreecolX}
-% \cs{hsizethreecolX}\oarg{s}\marg{l} is used to change width of a column when familiar notes are displaying in three columns. Defaut value is \verb+.3 \hsize+.
+% \protect\cs{hsizethreecolX}\oarg{s}\marg{l} is used to change width of a column when familiar notes are displaying in three columns. Defaut value is \verb+.3 \hsize+.
%
% \subsection{Options for paragraphed footnotes}
% \subsubsection{Mark separation of notes}
% \DescribeMacro{\Xafternote} \DescribeMacro{\afternoteX}
-% You can add some space after a note by using \cs{Xafternote}\oarg{s}\marg{l} (for critical footnotes) or \cs{afternoteX}\oarg{s}\marg{l} (for familiar footnotes). The default value is \verb|1em plus.4em minus.4em|.
+% You can add some space after a note by using \protect\cs{Xafternote}\oarg{s}\marg{l} (for critical footnotes) or \protect\cs{afternoteX}\oarg{s}\marg{l} (for familiar footnotes). The default value is \verb|1em plus.4em minus.4em|.
%
% \DescribeMacro{\Xparafootsep}\DescribeMacro{\parafootsepX}
-% For paragraphed footnotes (see below), you can choose the separator between each note by using \cs{Xparafootsep}\oarg{s}\marg{text} for critical notes and \cs{parafootsepX} for familiar notes.
-% A common separator is the double pipe ($\parallel$), which you can set by using \cs{parafootsep}\verb+{$\parallel$}+.
+% For paragraphed footnotes (see below), you can choose the separator between each note by using \protect\cs{Xparafootsep}\oarg{s}\marg{text} for critical notes and \protect\cs{parafootsepX} for familiar notes.
+% A common separator is the double pipe ($\parallel$), which you can set by using \protect\cs{parafootsep}\verb+{$\parallel$}+.
%
-% Note that if the symbol defined by \cs{Xsymlinenum} must be used at the beginning of a note, the \cs{Xparafootsep} / \cs{parafootsepX} is not used before this note.
+% Note that if the symbol defined by \protect\cs{Xsymlinenum} must be used at the beginning of a note, the \protect\cs{Xparafootsep} / \protect\cs{parafootsepX} is not used before this note.
%
% \subsubsection{Ragging}
% \changes{v1.12.0}{2014/08/05}{New options for ragged-paragraph notes}
% \DescribeMacro{\Xragged}
-% Text in paragraphed critical notes is justified, but you can use \cs{Xragged}\oarg{s}+{L}+ if you want it to be ragged left, or \cs{Xragged}\oarg{s}+{R} if you want it to be ragged right.
+% Text in paragraphed critical notes is justified, but you can use \protect\cs{Xragged}\oarg{s}+{L}+ if you want it to be ragged left, or \protect\cs{Xragged}\oarg{s}+{R} if you want it to be ragged right.
% \DescribeMacro{\raggedX}
-% Text in paragraphed footnotes is justified, but you can use \cs{raggedX}\oarg{s}+{L}+ if you want it to be ragged left, or \cs{raggedX}\oarg{s}+{R} if you want it to be ragged right.
+% Text in paragraphed footnotes is justified, but you can use \protect\cs{raggedX}\oarg{s}+{L}+ if you want it to be ragged left, or \protect\cs{raggedX}\oarg{s}+{R} if you want it to be ragged right.
%
% \subsection{Options for block of notes}
% \subsubsection{Text before notes}
% \changes{v1.1.0}{2012/09/12}{New options for block of notes.}
% \DescribeMacro{\Xtxtbeforenotes}
-% You can add some text before critical notes with \cs{Xtxtbeforenotes}\oarg{s}\marg{text}.
+% You can add some text before critical notes with \protect\cs{Xtxtbeforenotes}\oarg{s}\marg{text}.
%
% \subsubsection{Spacing}
% \DescribeMacro{\Xbeforenotes}
-% You can change the vertical space printed before the rule of the critical notes with \cs{Xbeforenotes}\oarg{s}\marg{l}.
+% You can change the vertical space printed before the rule of the critical notes with \protect\cs{Xbeforenotes}\oarg{s}\marg{l}.
% The default value is \verb|1.2em plus .6em minus .6em|.
%
-% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \Lpack{eledmac}, decreases by 3pt. This 3pt decrease is not changed by this command..}
+% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \protect\package{eledmac}, decreases by 3pt. This 3pt decrease is not changed by this command..}
% \DescribeMacro{\beforenotesX}
%
-% You can change the vertical space printed before the rule of the familiar notes with \cs{beforenotesX}\oarg{s}\marg{l}.
+% You can change the vertical space printed before the rule of the familiar notes with \protect\cs{beforenotesX}\oarg{s}\marg{l}.
% The default value is \verb|1.2em plus .6em minus .6em|.
%
-% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \Lpack{eledmac}, decreases 3pt. These 3pt are not changed by this command.}
+% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \protect\package{eledmac}, decreases 3pt. These 3pt are not changed by this command.}
%
% \DescribeMacro{\preXnotes}
% You can set the space before the first series of critical notes printed on each page
% and set a different amount of space for subsequent the series on the page.
-% You can do it with \cs{preXnotes}\marg{l}. Default value is \verb+0pt+.
+% You can do it with \protect\cs{preXnotes}\marg{l}. Default value is \verb+0pt+.
% You can disable this feature by setting the length to 0pt.
%
%
%
% \DescribeMacro{\prenotesX}
% You can want the space before the first printed (in a page) series of familiar notes not to be the same as before other series. Default value is \verb+0pt+.
-% You can do it with \cs{prenotesX}\marg{l}.
+% You can do it with \protect\cs{prenotesX}\marg{l}.
% You can disable this feature by setting the length to 0~pt.
%
% \DescribeMacro{\preXnotes}
% You can set the space before the first series of critical notes printed on each page
% and set a different amount of space for subsequent the series on the page.
-% You can do it with \cs{preXnotes}\marg{l}. Default value is \verb+0pt+.
+% You can do it with \protect\cs{preXnotes}\marg{l}. Default value is \verb+0pt+.
% You can disable this feature by setting the length to 0pt.
%
%
%
% \DescribeMacro{\prenotesX}
% You can want the space before the first printed (in a page) series of familiar notes not to be the same as before other series. Default value is \verb+0pt+.
-% You can do it with \cs{prenotesX}\marg{l}.
+% You can do it with \protect\cs{prenotesX}\marg{l}.
% You can disable this feature by setting the length to 0~pt.
%
%
% \subsubsection{Rule}
-% \changes{v1.12.0}{2014/08/05}{New hooks: \cs{Xafterrule} and \cs{afterruleX}}
+% \changes{v1.12.0}{2014/08/05}{New hooks: \protect\cs{Xafterrule} and \protect\cs{afterruleX}}
% \DescribeMacro{\Xafterrule}
-% You can change the vertical space printed after the rule of the critical notes with \cs{Xafterrule}\oarg{s}\marg{l}.
+% You can change the vertical space printed after the rule of the critical notes with \protect\cs{Xafterrule}\oarg{s}\marg{l}.
% The default value is \verb|0pt|.
%
-% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \Lpack{eledmac}, adds 2.6pt. These 2.6pt are not changed by this command.}
+% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \protect\package{eledmac}, adds 2.6pt. These 2.6pt are not changed by this command.}
%
%
% \DescribeMacro{\afterruleX}
-% You can change the vertical space printed after the rule of the familiar notes with \cs{beforenotesX}\oarg{s}\marg{l}.
+% You can change the vertical space printed after the rule of the familiar notes with \protect\cs{beforenotesX}\oarg{s}\marg{l}.
% % The default value is \verb|0pt|.
%
-% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \Lpack{eledmac}, adds 2.6pt. These 2.6pt are not changed by this command.}
+% \textbf{Be careful, the standard \LaTeX\ footnote rule, which is used by \protect\package{eledmac}, adds 2.6pt. These 2.6pt are not changed by this command.}
%
%
% \subsubsection{Maximum height}
% \DescribeMacro{\Xmaxhnotes}\label{Xmaxhnotes}
% By default, one series of critical notes can take 80\% of the page size, before being broken to the next page.
-% If you want to change the size use \cs{Xmaxhnotes}\oarg{s}\marg{l}.
+% If you want to change the size use \protect\cs{Xmaxhnotes}\oarg{s}\marg{l}.
% Be careful : the length can't be flexible, and is relative to the the current font.
% For example, if you want the note to take, at most, 33% of the text height, do \verb|\Xmaxhnotes{.33\textheight}|.
%
% \DescribeMacro{\maxhnotesX}
-% \cs{maxhnotesX}\oarg{s}\marg{l} is the same as previous, but for familiar footnotes.
+% \protect\cs{maxhnotesX}\oarg{s}\marg{l} is the same as previous, but for familiar footnotes.
%
% Be careful with the two previous commands.
% Actually, for technical purposes, one paragraphed note is considered as one block.
% Consequently, it ca not be broken between two pages, even if you used these commands.
% The debug is in the todolist.
% \subsection{Footnotes and the \parpackage columns}
-% \changes{v1.13.0}{2014/09/16}{Add \cs{Xnoteswidthliketwocolumns} and \cs{noteswidthliketwocolumnsX}}
+% \changes{v1.13.0}{2014/09/16}{Add \protect\cs{Xnoteswidthliketwocolumns} and \protect\cs{noteswidthliketwocolumnsX}}
% \DescribeMacro{Xnoteswidthliketwocolumns}\DescribeMacro{noteswidthliketwocolumnsX}
-% If you use \Lpack{eledpar} \cs{columns} macro, you can call :
+% If you use \protect\package{eledpar} \protect\cs{columns} macro, you can call :
% \begin{itemize}
-% \item \cs{Xnoteswidthliketwocolumns}\oarg{s} to create critical notes with a two-column size width. Use \cs{Xnoteswidthliketwocolumns}\oarg{s}\verb+[false]+ to disable it.
-% \item \cs{noteswidthliketwocolumnsX}\oarg{s} to create familiar notes with a two-column size width. Use \cs{noteswidthliketwocolumnsX}\oarg{s}\verb+[false]+ to disable it.
+% \item \protect\cs{Xnoteswidthliketwocolumns}\oarg{s} to create critical notes with a two-column size width. Use \protect\cs{Xnoteswidthliketwocolumns}\oarg{s}\verb+[false]+ to disable it.
+% \item \protect\cs{noteswidthliketwocolumnsX}\oarg{s} to create familiar notes with a two-column size width. Use \protect\cs{noteswidthliketwocolumnsX}\oarg{s}\verb+[false]+ to disable it.
% \end{itemize}
% \subsection{Endnotes in one paragraph}
-% \changes{v1.12.0}{2015/04/25}{Add \cs{Xendparagraph} and related settings.}
+% \changes{v1.12.0}{2015/04/25}{Add \protect\cs{Xendparagraph} and related settings.}
% \DescribeMacro{\Xendparagraph}
% By default, any new endnote starts a new paragraph.
-% Use \cs{Xendparagraph}\oarg{series} to have all end notes of one given series set in one paragraph.
+% Use \protect\cs{Xendparagraph}\oarg{series} to have all end notes of one given series set in one paragraph.
%
% \DescribeMacro{\Xendafternote}
-% You can add some space after a endnote series by using \cs{Xendafternote}\oarg{s}\marg{l}. The default value is \verb|1em plus.4em minus.4em|.
+% You can add some space after a endnote series by using \protect\cs{Xendafternote}\oarg{s}\marg{l}. The default value is \verb|1em plus.4em minus.4em|.
%
% \DescribeMacro{\Xendsep}
-% You can choose the separator between each note by \cs{Xendsep}\oarg{s}\marg{text}. A common separator is the double pipe (\verb+$||$+), which you can set by using \cs{Xendsep}\verb+{$\parallel$}+.
+% You can choose the separator between each note by \protect\cs{Xendsep}\oarg{s}\marg{text}. A common separator is the double pipe (\verb+$||$+), which you can set by using \protect\cs{Xendsep}\verb+{$\parallel$}+.
%
% \section{Fonts}\label{fonts}
% One of the most important features of the appearance of the notes,
@@ -1991,16 +1957,16 @@
% For those who are setting up for a large job, here is
% a list of the complete set of \macpackage macros relating to fonts that
% are intended for manipulation by the user:
-% \cs{endashchar},
-% \cs{fullstop},
-% \cs{numlabfont}, and
-% \cs{rbracket}.
+% \protect\cs{endashchar},
+% \protect\cs{fullstop},
+% \protect\cs{numlabfont}, and
+% \protect\cs{rbracket}.
%
%
% \DescribeMacro{\numlabfont}
% Line numbers for the main text
% are usually printed in a smaller font in the margin.
-% The \cs{numlabfont} macro is provided as a standard name for
+% The \protect\cs{numlabfont} macro is provided as a standard name for
% that font: it is initially defined as \\
% \verb"\newcommand{\numlabfont}{\normalfont\scriptsize}" \\
% You might wish to use a different font if, for example,
@@ -2024,48 +1990,48 @@
% have the en-dash or full stop in the same places as a text font.
% If you (or your macros) just typed \verb"$\oldstyle 12--34$" or
% \verb"$\oldstyle 55.6$" you would get `{\teni12--34}'and
-% `{\teni55.6}'. So we define \cs{endashchar} and
-% \cs{fullstop}, which produce an en-dash and a full stop
+% `{\teni55.6}'. So we define \protect\cs{endashchar} and
+% \protect\cs{fullstop}, which produce an en-dash and a full stop
% respectively from the normal document font, whatever font you are using
% for the numbers. These two macros are used in the
% macros which format the line numbers in the margins and
% footnotes, instead of explicit punctuation.
-% We also define an \cs{rbracket} macro for the
+% We also define an \protect\cs{rbracket} macro for the
% right square bracket printed at the end of the lemma in many
% styles of textual notes (including \macpackage's standard style).
-% For \Lpack{polyglossia}, when the lemma is RTL, the bracket automatically switches to a left bracket.
+% For \protect\package{polyglossia}, when the lemma is RTL, the bracket automatically switches to a left bracket.
%
%
%
% \DescribeMacro{\select@lemmafont}
-% We will briefly discuss \cs{select@lemmafont}
+% We will briefly discuss \protect\cs{select@lemmafont}
% here because it is important to know about
% it now, although it is not one of the macros you would expect to
% change in the course of a simple job. Hence it is `protected'
% by having the @-sign in its name.
%
-% When you use the \cs{edtext} macro to mark a word in your text
+% When you use the \protect\cs{edtext} macro to mark a word in your text
% as a lemma, that word will normally be printed again in your
% apparatus. If the word in the text happens to be in a font such
% as italic or bold you would probably expect it to appear in the
% apparatus in the same font. This becomes an absolute necessity
% if the font is actually a different script, such as Arabic or
-% Cyrillic. \cs{select@lemmafont} does the work of
+% Cyrillic. \protect\cs{select@lemmafont} does the work of
% decoding \macpackage's data about the fonts used to print the lemma in
% the main text and calling up those fonts for printing the lemma in
% the note.
%
-% \cs{select@lemmafont} is a macro that takes one long
+% \protect\cs{select@lemmafont} is a macro that takes one long
% argument---the cluster of line numbers passed to the note
% commands. This cluster ends with a code indicating what
% fonts were in use at the start of the lemma.
-% \cs{select@lemmafont} selects the appropriate font for the
+% \protect\cs{select@lemmafont} selects the appropriate font for the
% note using that font specifier.
%
-% \Macpackage uses \cs{select@lemmafont} in a standard footnote
-% format macro called \cs{normalfootfmt}. The footnote formats
-% for each of the layers \texttt{A} to \texttt{E} are \cs{let} equal
-% to \cs{normalfootfmt}. So all the layers of the footnotes are
+% \Macpackage uses \protect\cs{select@lemmafont} in a standard footnote
+% format macro called \protect\cs{normalfootfmt}. The footnote formats
+% for each of the layers \texttt{A} to \texttt{E} are \protect\cs{let} equal
+% to \protect\cs{normalfootfmt}. So all the layers of the footnotes are
% formatted in the same way.
%
%
@@ -2106,7 +2072,7 @@
% 0 but is never used.
%
% If you want the hanging verse to be flush right,
-% you can use \cs{sethanginsymbol}: see p.~\reff{hfillhanging}.
+% you can use \protect\cs{sethanginsymbol}: see p.~\reff{hfillhanging}.
%
% Enumeration is by stanza lines, not by print lines.
% In the above example the lines are indented one unit, two units, one unit,
@@ -2144,12 +2110,12 @@
% \subsection{Manual stanza indent}
% \DescribeMacro{\stanzaindent}
% \DescribeMacro{\stanzaindent*}
-% You can set the indent of some specific verse by calling \cs{stanzaindent}\marg{value} at the beginning of the verse, before any other character. In this case, the indent defined by \cs{setstanzaindents} for this verse is skipped, and \marg{value} is used instead.
+% You can set the indent of some specific verse by calling \protect\cs{stanzaindent}\marg{value} at the beginning of the verse, before any other character. In this case, the indent defined by \protect\cs{setstanzaindents} for this verse is skipped, and \marg{value} is used instead.
%
% If you use the mechanism of indent repetition, the next verse will be printed as it should be even if the current verse would have its normal indent value.
-% In other words, using \cs{stanzaindent} in a verse does not shift the indent repetition.
+% In other words, using \protect\cs{stanzaindent} in a verse does not shift the indent repetition.
%
-% However, if you want to shift the indent repetition, so the next verse has the indent normally used for the current verse, use \cs{stanzaindent*} instead of \cs{stanzaindent}.
+% However, if you want to shift the indent repetition, so the next verse has the indent normally used for the current verse, use \protect\cs{stanzaindent*} instead of \protect\cs{stanzaindent}.
% \subsection{Stanza breaking}
% \DescribeMacro{\setstanzapenalties}
% When the stanzas run over several pages, it is often
@@ -2179,7 +2145,7 @@
% between penalties and \emph{glue}, so it may take some adjustment of skips
% and penalties to achieve the best results.
% \subsection{Hanging symbol}
-% It is possible to insert a symbol in each line of hanging verse, as in French typography for `['. To insert it in \macpackage, use macro \DescribeMacro{\sethangingsymbol}\cs{hangingsymbol}\meta{h} with this code.
+% It is possible to insert a symbol in each line of hanging verse, as in French typography for `['. To insert it in \macpackage, use macro \DescribeMacro{\sethangingsymbol}\protect\cs{hangingsymbol}\meta{h} with this code.
% In the example of French typography, do
% \begin{verbatim}
% \sethangingsymbol{[\,}
@@ -2189,18 +2155,18 @@
% \sethangingsymbol{\protect\hfill}
% \end{verbatim}
% \subsection{Long verse and page break}
-% If you want to prevent page breaks inside long verses, use the option \verb+nopbinverse+ when loading package, or use \cs{lednopbinversetrue}.
+% If you want to prevent page breaks inside long verses, use the option \verb+nopbinverse+ when loading package, or use \protect\cs{lednopbinversetrue}.
% Read \reff{lednopbinversetrue} for further details.
% \subsection{Hanging symbol}
-% It is possible to insert a symbol on each line of hanging verse, as in French typography for `['. To insert in \macpackage, use macro \DescribeMacro{\sethangingsymbol}\cs{sethangingsymbol}\marg{symbol}. Fro exemple:
+% It is possible to insert a symbol on each line of hanging verse, as in French typography for `['. To insert in \macpackage, use macro \DescribeMacro{\sethangingsymbol}\protect\cs{sethangingsymbol}\marg{symbol}. Fro exemple:
% \begin{verbatim}
% \hangingsymbol}{[\,}
% \end{verbatim}
% \subsection{Content before/after verses}
% It is possible to add content, like a subtitle or a spacing, before or after verse:
% \begin{itemize}
-% \item \cs{stanza} command can take a optional argument (in brackets). Its content will be printed before the stanza.
-% \item \verb+&+ can be replaced by \cs{newverse} with two optional arguments (in brackets). The first will be printed after the current verse, the second before the next verse.
+% \item \protect\cs{stanza} command can take a optional argument (in brackets). Its content will be printed before the stanza.
+% \item \verb+&+ can be replaced by \protect\cs{newverse} with two optional arguments (in brackets). The first will be printed after the current verse, the second before the next verse.
% \item \verb+\&+ can take a optional argument (in brackets). Its content will be printed after the stanza.
% \end{itemize}
% \subsection{Various tools}
@@ -2210,7 +2176,7 @@
%
%
% \DescribeMacro{\flagstanza}
-% Putting \cs{flagstanza}\oarg{len}\marg{text} at the start of a line
+% 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
% distance \meta{len} before
% the line. The default \meta{len} is \verb?\stanzaindentbase?.
@@ -2276,7 +2242,7 @@
%
%
% \section{Cross referencing}
-% \changes{v1.12.0}{2014/08/05}{Add hyperlink to crossref (needs \Lpack{hyperref} package).}
+% \changes{v1.12.0}{2014/08/05}{Add hyperlink to crossref (needs \protect\package{hyperref} package).}
% \label{crossref}\relax
% The package provides a simple cross-referencing facility that allows
% you to mark places in the text with labels, and generate page and
@@ -2287,9 +2253,9 @@
%
% \DescribeMacro{\edlabel}
% First you place a label in the text using the command
-% \cs{edlabel}\marg{lab}. \meta{lab} can be almost anything you like, including
+% \protect\cs{edlabel}\marg{lab}. \meta{lab} can be almost anything you like, including
% letters, numbers, punctuation, or a combination---anything but spaces;
-% you might say \cs{edlabel}\verb+{toves-3}+, for example.\footnote{More precisely,
+% you might say \protect\cs{edlabel}\verb+{toves-3}+, for example.\footnote{More precisely,
% you should stick to characters in the \TeX\ categories of ``letter''
% and ``other''.}
%
@@ -2297,19 +2263,19 @@
% \DescribeMacro{\edlineref}
% \DescribeMacro{\sublineref}
% \DescribeMacro{\pstartref}
-% Elsewhere in the text, either before or after the \cs{edlabel},
-% you can refer to its location via \cs{edpageref}\marg{lab}, or
-% \cs{edlineref}\marg{lab}%
+% Elsewhere in the text, either before or after the \protect\cs{edlabel},
+% you can refer to its location via \protect\cs{edpageref}\marg{lab}, or
+% \protect\cs{edlineref}\marg{lab}%
% will produce, respectively, the page, line, sub-line and pstart on which
-% the \cs{edlabel}\marg{lab} command occurred.
+% the \protect\cs{edlabel}\marg{lab} command occurred.
%
%
-% An \cs{edlabel} command may appear in the main text, or in the
-% first argument of \cs{edtext}, but not in the apparatus itself. But
-% \cs{edpageref}, \cs{edlineref}, \cs{sublineref}, \cs{pstartref} commands can also be used in
-% the apparatus to refer to \cs{edlabel}s in the text.
+% An \protect\cs{edlabel} command may appear in the main text, or in the
+% first argument of \protect\cs{edtext}, but not in the apparatus itself. But
+% \protect\cs{edpageref}, \protect\cs{edlineref}, \protect\cs{sublineref}, \protect\cs{pstartref} commands can also be used in
+% the apparatus to refer to \protect\cs{edlabel}s in the text.
%
-% The \cs{edlabel} command works by writing macros to \LaTeX
+% The \protect\cs{edlabel} command works by writing macros to \LaTeX
% \file{.aux} file. You will need to process
% your document through \LaTeX\ twice in order for the references to
% be resolved.
@@ -2319,21 +2285,21 @@
% return references to the last place in the file marked with this
% label. You will also be warned if a reference is made to an
% undefined label. (This will also happen the first time you
-% process a document after adding a new \cs{edlabel} command: the
+% process a document after adding a new \protect\cs{edlabel} command: the
% auxiliary file will not have been updated yet.)
%
% \subsection{Refer to a critical notes}
% If you want to refer to a word inside an
-% \cs{edtext}\marg{lemma}\marg{app} command, the \cs{edlabel} should be defined inside
+% \protect\cs{edtext}\marg{lemma}\marg{app} command, the \protect\cs{edlabel} should be defined inside
% the first argument, e.g.,
% \begin{verbatim}
% The \edtext{creature\edlabel{elephant} was quite
% unafraid}{\Afootnote{Of the mouse, that is.}}
% \end{verbatim}
%
-% If you add the \cs{edlabel} inside some \cs{Xfootnote} command,
+% If you add the \protect\cs{edlabel} inside some \protect\cs{Xfootnote} command,
% it will refer to that note, and a suffix \emph{n} will be added to the reference.
-% You can redefine this suffix by redefining the command \cs{ledinnotemark}.
+% You can redefine this suffix by redefining the command \protect\cs{ledinnotemark}.
% Its actual definition is:
% \begin{verbatim}
% \newcommand{\ledinnotemark}[1]{#1\emph{n}}
@@ -2353,11 +2319,11 @@
% number, such a warning will lead to a complaint that the number
% is missing.
% This is the case for references used within the
-% argument to \cs{linenum}, for example (see \reff{linenum}).
+% 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: \cs{xpageref}, \cs{xlineref}, \cs{xsublineref} and \cs{xpstartref}.
+% prefix, are supplied: \protect\cs{xpageref}, \protect\cs{xlineref}, \protect\cs{xsublineref} and \protect\cs{xpstartref}.
% They have these limitations:
% \begin{itemize}
% \item They will not tell you if the label is undefined.
@@ -2365,23 +2331,23 @@
% be preceded in the file by at least one of the four other
% cross-reference commands---e.g., a \verb"\edlabel{foo}" command,
% even if you never refer to that label---since those commands can all
-% do the necessary processing of the \file{.aux} file, and the \cs{x...}
+% do the necessary processing of the \file{.aux} file, and the \protect\cs{x...}
% ones cannot.
-% \item When \Lpack{hyperref} is loaded, the hyperref link will not be added. (Indeed,
+% \item When \protect\package{hyperref} is loaded, the hyperref link will not be added. (Indeed,
% it is not a limitation, but a feature.)
% \end{itemize}
%
% \subsubsection{Cross-referencing in order to define line number of a critical note}
% \DescribeMacro{\xxref}
-% The macros \cs{xxref} and
-% \cs{edmakelabel} let you manipulate numbers
+% The macros \protect\cs{xxref} and
+% \protect\cs{edmakelabel} let you manipulate numbers
% and labels in ways which you may find helpful in tricky
% situations.
%
-% The \cs{xxref}\marg{lab1}\marg{lab2} command generates a reference to a sequence of
-% lines, for use in the second argument of \cs{edtext}.
+% The \protect\cs{xxref}\marg{lab1}\marg{lab2} command generates a reference to a sequence of
+% lines, for use in the second argument of \protect\cs{edtext}.
% It takes two arguments, both of which are
-% labels: e.g., \verb"\xxref{mouse}{elephant}". It calls \cs{linenum}
+% labels: e.g., \verb"\xxref{mouse}{elephant}". It 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
@@ -2389,10 +2355,10 @@
%
% \subsection{Not automatic cross-referencing}
% \DescribeMacro{\edmakelabel}
-% Sometimes the \cs{edlabel} command cannot be used to specify exactly
+% Sometimes the \protect\cs{edlabel} command cannot be used to specify exactly
% the page and line desired---for example, if you want to refer to a
% page and line number in another volume of your edition. In such
-% cases, you can use the \cs{edmakelabel}\marg{lab}\marg{numbers}
+% cases, you can use the \protect\cs{edmakelabel}\marg{lab}\marg{numbers}
% macro so that you can `roll your own' label.
%
% For example, if you say `\verb"\edmakelabel{elephant}{10|25|0}"'
@@ -2400,39 +2366,39 @@
% label, and a later call to \verb"\edpageref{elephant}" would print
% `10' and \verb"\lineref{elephant}" would print `25'. The sub-line
% number here is zero. It is usually best to collect your
-% \cs{edmakelabel} statements near the top of your document, so that
+% \protect\cs{edmakelabel} statements near the top of your document, so that
% you can see them at a glance.
% \subsection{Normal \LaTeX\ cross-referencing}
% \DescribeMacro{\label}
% \DescribeMacro{\ref}
% \DescribeMacro{\pageref}
% \changes{v0.2.1}{2003/08/25}{Added text about normal labeling}
-% The normal \cs{label}, \cs{ref} and \cs{pageref} macros may be used
+% The normal \protect\cs{label}, \protect\cs{ref} and \protect\cs{pageref} macros may be used
% within numbered text, and operate in the familiar fashion.
% \subsection{References to lines commented in the apparatus}
-% \changes{v1.21.0}{2015/03/09}{Add \cs{applabel} and related}
-% You may want to make a cross-reference to a passage that is referred to by \cs{edtext}.
+% \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.
%
% \DescribeMacro{\applabel}
-% If you use \cs{applabel}\marg{label} inside the second argument of a \cs{edtext},
-% \Macpackage will add a \cs{edlabel} at the beginning and end of the marked passage.
+% 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.
% 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 \cs{linenum} (\reff{linenum}) to
+% If you use \protect\cs{linenum} (\reff{linenum}) to
% refer to these labels, \macpackage will use your line settings to refer
% to the passage.
%
% \DescribeMacro{\appref}\DescribeMacro{\apprefwithpage}
-% You can also use \cs{appref}\marg{label} and
-% \cs{apprefwithpage}\marg{label} to refer to these lines.
+% You can also use \protect\cs{appref}\marg{label} and
+% \protect\cs{apprefwithpage}\marg{label} to refer to these lines.
% The first one will print the lines as they are printed in the critical footnotes,
% while the second will print the lines as they are printed in endnotes.
%
% \DescribeMacro{\setapprefprefixsingle}\DescribeMacro{\setapprefprefixmore}
-% If you use \cs{setapprefprefixsingle}\marg{prefix}, \meta{prefix} will be printed
-% before the line numbers of a \cs{appref}-reference.
-% If you use \cs{setapprefprefixmore}\marg{prefix}, \meta{prefix} will be printed
+% If you use \protect\cs{setapprefprefixsingle}\marg{prefix}, \meta{prefix} will be printed
+% before the line numbers of a \protect\cs{appref}-reference.
+% If you use \protect\cs{setapprefprefixmore}\marg{prefix}, \meta{prefix} will be printed
% before the line numbers, if you refer to more than one line.
%
% For example, you may use:
@@ -2441,95 +2407,95 @@
% \setapprefprefixmore{lines~}
% \end{verbatim}
%
-% Note that if you have not used \cs{setapprefprefixmore} is empty, argument of \cs{setapprefprefixsingle} will used in any case.
+% Note that if you have not used \protect\cs{setapprefprefixmore} is empty, argument of \protect\cs{setapprefprefixsingle} will used in any case.
%
% \DescribeMacro{\Xtwolinesappref}
% \DescribeMacro{\Xmorethantwolinesappref}
% \DescribeMacro{\Xtwolinesbutnotmoreappref}
% \DescribeMacro{\Xtwolinesonlyinsamepage}
-% If you use \cs{Xtwolines}, \cs{Xmorethantwolines}, \cs{Xtwolinesbutnotmore} and/or \cs{Xtwolinesonlyinsamepage}
+% If you use \protect\cs{Xtwolines}, \protect\cs{Xmorethantwolines}, \protect\cs{Xtwolinesbutnotmore} and/or \protect\cs{Xtwolinesonlyinsamepage}
% (\reff{Xtwolines}) \emph{without the optional
-% series argument}, the setting will also be available for \cs{appref}.
+% series argument}, the setting will also be available for \protect\cs{appref}.
%
-% The commands \cs{Xtwolinesappref}\marg{text},
-% \cs{Xmorethantwolinesappref}\marg{text}, \cs{Xtwolinesbutnotmoreappref} \cs{Xtwolinesonlyinsamepageappref} can also be used, if you
-% only want to change the reference style of \cs{appref}.
+% The commands \protect\cs{Xtwolinesappref}\marg{text},
+% \protect\cs{Xmorethantwolinesappref}\marg{text}, \protect\cs{Xtwolinesbutnotmoreappref} \protect\cs{Xtwolinesonlyinsamepageappref} can also be used, if you
+% only want to change the reference style of \protect\cs{appref}.
%
-% It is possible to disable this setting for a specific \cs{appref} command by
-% using \cs{appref}\verb+[fulllines]+\marg{label}.
+% It is possible to disable this setting for a specific \protect\cs{appref} command by
+% using \protect\cs{appref}\verb+[fulllines]+\marg{label}.
%
%
% \DescribeMacro{\Xendtwolinesapprefwithpage}
% \DescribeMacro{\Xendmorethantwolinesapprefwithpage}
% \DescribeMacro{\Xendtwolinesbutnotmoreapprefwithpage}
% \DescribeMacro{\Xendtwolinesonlyinsamepageapprefwithpage}
-% If you use one of \cs{Xendtwolines}, \cs{Xendmorethantwolines}, \cs{Xendtwolinesbutnotmore},
-% \cs{Xendtwolinesonlyinsamepage})
+% If you use one of \protect\cs{Xendtwolines}, \protect\cs{Xendmorethantwolines}, \protect\cs{Xendtwolinesbutnotmore},
+% \protect\cs{Xendtwolinesonlyinsamepage})
% (\reff{Xendtwolines}) \emph{without the optional
-% series argument}, the setting will also be available for \cs{apprefwithpage}.
+% series argument}, the setting will also be available for \protect\cs{apprefwithpage}.
%
-% The commands \cs{Xendtwolinesappref}\marg{text},
-% \cs{Xendmorethantwolinesappref}\marg{text}, \cs{Xendtwolinesbutnotmoreappref}, \cs{Xendtwolinesonlyinsamepageappref} can also be used, if you
-% only want to change the reference style of \cs{apprefwithpage}.
+% The commands \protect\cs{Xendtwolinesappref}\marg{text},
+% \protect\cs{Xendmorethantwolinesappref}\marg{text}, \protect\cs{Xendtwolinesbutnotmoreappref}, \protect\cs{Xendtwolinesonlyinsamepageappref} can also be used, if you
+% only want to change the reference style of \protect\cs{apprefwithpage}.
%
-% It is possible to disable this setting for a specific \cs{apprefwithpage} command by
-% using \cs{apprefwithpage}\verb+[fulllines]+\marg{label}.
+% It is possible to disable this setting for a specific \protect\cs{apprefwithpage} command by
+% using \protect\cs{apprefwithpage}\verb+[fulllines]+\marg{label}.
%
% \section{Side notes}
%
% \subsection{Basis}
-% The \cs{marginpar} command does not work in numbered text. Instead
+% The \protect\cs{marginpar} command does not work in numbered text. Instead
% the package provides for non-floating sidenotes in either margin.
%
% \DescribeMacro{\ledinnernote}
% \DescribeMacro{\ledouternote}
-% \cs{ledinnernote}\marg{text} will put \meta{text} into the inner margin level
-% with where the command was issued. Similarly, \cs{ledouternote}\marg{text}
+% \protect\cs{ledinnernote}\marg{text} will put \meta{text} into the inner margin level
+% with where the command was issued. Similarly, \protect\cs{ledouternote}\marg{text}
% puts \meta{text} in the outer margin.
%
-% \changes{v1.12.0}{2014/08/05}{Add \cs{ledinnernote} and \cs{ledouternote} commands.}
-% \changes{v1.12.3}{2014/08/15}{Debug \cs{ledinnernote} and \cs{ledouternote} commands in the top of pages.}
+% \changes{v1.12.0}{2014/08/05}{Add \protect\cs{ledinnernote} and \protect\cs{ledouternote} commands.}
+% \changes{v1.12.3}{2014/08/15}{Debug \protect\cs{ledinnernote} and \protect\cs{ledouternote} commands in the top of pages.}
% \DescribeMacro{\ledleftnote}
% \DescribeMacro{\ledrightnote}
% \changes{v1.0.0}{2012/09/15}{Possibility to have commands in sidenotes.}
% \DescribeMacro{\ledsidenote}
% \DescribeMacro{\sidenotemargin}
-% \cs{ledsidenote}\marg{text} will put \meta{text} into the margin specified
-% by the current setting of \cs{sidenotemargin}\marg{location}. The
+% \protect\cs{ledsidenote}\marg{text} will put \meta{text} into the margin specified
+% by the current setting of \protect\cs{sidenotemargin}\marg{location}. The
% permissible value for \meta{location} is one out of the list
% \texttt{left}, \texttt{right}, \texttt{inner}, or \texttt{outer}, for
% example \verb?\sidenotemargin{outer}?. The package's default setting
% is \\
% \verb?\sidenotemargin{right}? \\
-% to typeset \cs{ledsidenote}s in the right hand margin.
+% to typeset \protect\cs{ledsidenote}s in the right hand margin.
% This is the opposite
-% to the default margin for line numbers. The style for a \cs{ledsidenote}
-% follows that for a \cs{ledleftnote} or a \cs{ledrightnote} depending
+% to the default margin for line numbers. The style for a \protect\cs{ledsidenote}
+% follows that for a \protect\cs{ledleftnote} or a \protect\cs{ledrightnote} depending
% on the margin it is put in.
%
-% If two, say, \cs{ledleftnote}, commands are called in the same line the
+% If two, say, \protect\cs{ledleftnote}, commands are called in the same line the
% second \meta{text} will obliterate the first. There is no problem though with
% having both a left and a right sidenote on the same line.
% \subsection{Setting}
% \subsubsection{Width}
% \DescribeMacro{\ledlsnotewidth}
% \DescribeMacro{\ledrsnotewidth}
-% The left sidenote text is put into a box of width \cs{ledlsnotewidth}
-% and the right text into a box of width \cs{ledrsnotewidth}. These
-% are initially set to the value of \cs{marginparwidth}.
+% The left sidenote text is put into a box of width \protect\cs{ledlsnotewidth}
+% and the right text into a box of width \protect\cs{ledrsnotewidth}. These
+% are initially set to the value of \protect\cs{marginparwidth}.
%
% \subsubsection{Vertical position}
% \DescribeMacro{\rightnoteupfalse}
% \DescribeMacro{\leftnoteupfalse}
% By default, sidenotes are placed to align with the last line of the note to which it refers.
-% If you want they to be placed to align with the first line of the note to which it refers, use \cs{leftnoteupfalse} (for left note) and/or \cs{rightnoteupfalse} (for right note).
+% If you want they to be placed to align with the first line of the note to which it refers, use \protect\cs{leftnoteupfalse} (for left note) and/or \protect\cs{rightnoteupfalse} (for right note).
%
% \subsubsection{Distance to the main text }
% \DescribeMacro{\ledlsnotesep}
% \DescribeMacro{\ledrsnotesep}
-% The texts are put a distance \cs{ledlsnotesep} (or \cs{ledrsnotesep})
+% The texts are put a distance \protect\cs{ledlsnotesep} (or \protect\cs{ledrsnotesep})
% into the left (or right) margin. These lengths are initially set to
-% the value of \cs{linenumsep}.
+% the value of \protect\cs{linenumsep}.
%
% \DescribeMacro{\ledlsnotefontsetup}
% \DescribeMacro{\ledrsnotefontsetup}
@@ -2544,7 +2510,7 @@
% \subsubsection{Separator between notes}
% \DescribeMacro{\setsidenotesep}
% If you have two or more sidenotes for the same line, they are separated by a comma.
-% But if you want to change this separator, you can use \cs{setsidenotesep}\marg{sep}.
+% But if you want to change this separator, you can use \protect\cs{setsidenotesep}\marg{sep}.
% \section{Indexing}
% \subsection{Basis}
% \DescribeMacro{\edindex}
@@ -2554,21 +2520,21 @@
% that \meta{item} and the current page \& linenumber should be added to
% the raw index file.
%
-% Note that the file \verb+.idx+ will contain the right reference only after the third run, because of the internal indexing mechanism of \Lpack{eledmac}.
+% Note that the file \verb+.idx+ will contain the right reference only after the third run, because of the internal indexing mechanism of \protect\package{eledmac}.
% That means you must first run three times (Xe/Lua)\LaTeX, then run \verb+makeindex+ and finally run again (Xe/Lua)\LaTeX to get an index with the right page numbers.
%
-% If the \Lpack{imakeidx} or \Lpack{indextools} package is used then the macro takes an optional
+% If the \protect\package{imakeidx} or \protect\package{indextools} package is used then the macro takes an optional
% argument, which is the name of a raw index file. For example
% |\edindex[line]{item}| will use |line.idx| as the raw file instead of
% |\jobname.idx|.
%
-% The minimal version of \Lpack{imakeidx} package to be used is the version 1.3a uploaded on CTAN on 2013/07/11.
+% The minimal version of \protect\package{imakeidx} package to be used is the version 1.3a uploaded on CTAN on 2013/07/11.
%
% Be careful with the order of package loading and index declaration. You must use this order:
% \begin{enumerate}
-% \item Load \Lpack{imakeidx} or \Lpack{indextools} .
-% \item Load \Lpack{eledmac}.
-% \item Declare the index with the macro \cs{makeindex} of \Lpack{imakeidx}/\Lpack{indextools}.
+% \item Load \protect\package{imakeidx} or \protect\package{indextools} .
+% \item Load \protect\package{eledmac}.
+% \item Declare the index with the macro \protect\cs{makeindex} of \protect\package{imakeidx}/\protect\package{indextools}.
% \end{enumerate}
% \subsection{Separator between page and line numbers}
% \DescribeMacro{\pagelinesep}
@@ -2580,7 +2546,7 @@
% |-| is the default
% separator used by the \textsc{MakeIndex} program.
%
-% Consequently, if you want to use an other \cs{pagelinesep}, you have to configure your \verb+.ist+ index style file. For example if you use \verb+:+ as separator\footnote{For further detail, you can read \url{http://tex.stackexchange.com/a/32783/7712}.}.
+% Consequently, if you want to use an other \protect\cs{pagelinesep}, you have to configure your \verb+.ist+ index style file. For example if you use \verb+:+ as separator\footnote{For further detail, you can read \url{http://tex.stackexchange.com/a/32783/7712}.}.
% \begin{verbatim}
% page_compositor ":"
% delim_r ":
@@ -2591,7 +2557,7 @@
% Should you decide to use \verb+xindy+ instead of \verb+makeindex+
% to transform your \verb+.idx+ files into \verb+.ind+ files,
% you must use some specific configuration file (\verb+.xdy+) so that
-% \verb+xindy+ can understand \Lpack{eledmac} reference syntax of which the scheme is:\\
+% \verb+xindy+ can understand \protect\package{eledmac} reference syntax of which the scheme is:\\
% \verb+pagenumber-linenumber+
%
% An example of such a file is provided in the ``\href{examples/.}{examples}'' folder.
@@ -2612,20 +2578,20 @@
% you must do three more things:
% \begin{enumerate}
% \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 \cs{edindex}.
+% 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.}.
% \end{enumerate}
% \subsection{Advanced setting}
% \DescribeMacro{\edindexlab}
-% The \cs{edindex} process uses a \cs{label}/\cs{ref} mechanism to get
+% The \protect\cs{edindex} process uses a \protect\cs{label}/\protect\cs{ref} mechanism to get
% the correct line number. It automatically generates labels
-% of the form \cs{label}\verb|{\edindexlab N}|, where N is a number, and
-% the default definition of \cs{edindexlab} is: \\
+% of the form \protect\cs{label}\verb|{\edindexlab N}|, where N is a number, and
+% the default definition of \protect\cs{edindexlab} is: \\
% |\newcommand*{\edindexlab}{$&}| \\
% in the hopes that this will not be used by any other labels
-% (\cs{edindex}'s labels are like \cs{label}\verb|{$&27}|).
-% You can change \cs{edindexlab} to something else if you need to.
+% (\protect\cs{edindex}'s labels are like \protect\cs{label}\verb|{$&27}|).
+% You can change \protect\cs{edindexlab} to something else if you need to.
%
% \section{Tabular material}
%
@@ -2670,11 +2636,11 @@
% \verb?\\? at the end of the last row.
% \emph{There must be the same number of column designators (the \&)
% in each row.} There is no equivalent
-% to any line drawing commands (such as \cs{hline}).
+% to any line drawing commands (such as \protect\cs{hline}).
% However, unlike the normal environments, the |ed...| environments
% can cross page breaks.
%
-% Macros like \cs{edtext} can be used as part of an entry.
+% Macros like \protect\cs{edtext} can be used as part of an entry.
%
% For example:
% \begin{verbatim}
@@ -2808,11 +2774,11 @@
%
% \DescribeMacro{\edatleft}
% \DescribeMacro{\edatright}
-% \cs{edatleft}\oarg{math}\marg{symbol}\marg{halfheight} typesets the math
-% \meta{symbol} as \cs{left}\marg{symbol}
+% \protect\cs{edatleft}\oarg{math}\marg{symbol}\marg{halfheight} typesets the math
+% \meta{symbol} as \protect\cs{left}\marg{symbol}
% with the optional \meta{math} centered before it. The \meta{symbol} is
-% twice \meta{halfheight} tall. The \cs{edatright} macro is similar
-% and it typesets \cs{right}\marg{symbol} with \meta{math} centered after it.
+% twice \meta{halfheight} tall. The \protect\cs{edatright} macro is similar
+% and it typesets \protect\cs{right}\marg{symbol} with \meta{math} centered after it.
%
% \begin{verbatim}
% \begin{edarrayc}
@@ -2838,9 +2804,9 @@
%
% \DescribeMacro{\edbeforetab}
% \DescribeMacro{\edaftertab}
-% \cs{edbeforetab}\marg{text}\marg{entry}, where \meta{entry} is an entry in the
+% \protect\cs{edbeforetab}\marg{text}\marg{entry}, where \meta{entry} is an entry in the
% leftmost column, typesets \meta{text} left justified before the \meta{entry}.
-% Similarly \cs{edaftertab}\marg{entry}\marg{text}, where \meta{entry} is an entry
+% Similarly \protect\cs{edaftertab}\marg{entry}\marg{text}, where \meta{entry} is an entry
% in the rightmost column, typesets \meta{text} right justified after the
% \meta{entry}.
%
@@ -2866,8 +2832,8 @@
%
% \DescribeMacro{\edvertline}
% \DescribeMacro{\edvertdots}
-% The macro \cs{edvertline}\marg{height} draws a vertical line \meta{height} high
-% (contrast this with \cs{edatright} where the size argument is half the desired
+% The macro \protect\cs{edvertline}\marg{height} draws a vertical line \meta{height} high
+% (contrast this with \protect\cs{edatright} where the size argument is half the desired
% height).
% \begin{verbatim}
% \begin{edarrayr}
@@ -2891,7 +2857,7 @@
% \end{displaymath}
% \MakeShortVerb{\|}
%
-% The \cs{edvertdots} macro is similar to \cs{edvertline} except that it
+% The \protect\cs{edvertdots} macro is similar to \protect\cs{edvertline} except that it
% produces a vertical dotted instead of a solid line.
%
%
@@ -2899,8 +2865,8 @@
% \changes{v1.1.0}{2012/09/25}{Sectioning commands.}
% \changes{v1.12.0}{2014/08/05}{New sectioning commands.}
% \subsection{Sectioning commands without line numbers or critical notes}
-% The standard sectioning commands (\cs{chapter}, \cs{section} etc.) can be used inside numbered text.
-% In this case, you must call them as an optional argument of \cs{pstart} (\reff{pstart:optionalarg}):
+% The standard sectioning commands (\protect\cs{chapter}, \protect\cs{section} etc.) can be used inside numbered text.
+% In this case, you must call them as an optional argument of \protect\cs{pstart} (\reff{pstart:optionalarg}):
% \begin{verbatim}
% \pstart[\section{section}]
% Pstart content.
@@ -2911,17 +2877,17 @@
% \label{eledsection}
% You have to use the following commands:
% \begin{itemize}
-% \item \cs{eledchapter}\oarg{text}\marg{critical text}
-% \item \cs{eledchapter*}
-% \item \cs{eledsection}\oarg{text}\marg{critical text}
-% \item \cs{eledsection*}
-% \item \cs{eledsubsection}\oarg{text}\marg{critical text}
-% \item \cs{eledsubsection*}
-% \item \cs{eledsubsubsection}\oarg{text}\marg{critical text}
-% \item \cs{eledsubsubsection*}
+% \item \protect\cs{eledchapter}\oarg{text}\marg{critical text}
+% \item \protect\cs{eledchapter*}
+% \item \protect\cs{eledsection}\oarg{text}\marg{critical text}
+% \item \protect\cs{eledsection*}
+% \item \protect\cs{eledsubsection}\oarg{text}\marg{critical text}
+% \item \protect\cs{eledsubsection*}
+% \item \protect\cs{eledsubsubsection}\oarg{text}\marg{critical text}
+% \item \protect\cs{eledsubsubsection*}
% \end{itemize}
% Which are equivalent to the \LaTeX\ commands.
-% Each individual command must be called alone in a \cs{pstart}\ldots\cs{pend}:
+% Each individual command must be called alone in a \protect\cs{pstart}\ldots\protect\cs{pend}:
% \begin{verbatim}
%\pstart
%\eledsection*{xxxx\ledsidenote{section}}
@@ -2937,19 +2903,19 @@
% At the second run, you will see the formating.
% And consequently, at the third run, you will see the table of contents.
%
-% For technical reasons, the page break before \cs{elechapter} ca not be added automatically. You have to insert it manually via \cs{beforeeledchapter}, which must be called outside of a numbered section.
+% For technical reasons, the page break before \protect\cs{elechapter} ca not be added automatically. You have to insert it manually via \protect\cs{beforeeledchapter}, which must be called outside of a numbered section.
%
% \subsection{Optimization}
% \DescribeMacro{\noeledsec}
-% If you are not going to have any \cs{eledxxx} commands, then load \macpackage with \cs{noeledsec} option.
+% 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} file, keep memory and make \macpackage faster.
% \section{Quotation environments}
% The \verb+quotation+ and \verb+quote+ environment can be used so that same definition/note appears both inside and outside a numbered section.
% The typographical consequences will resemble the outside numbered sections, based on the styles of the \emph{book} class.
% However, if you use a package that redefines these environments, these redefinitions won't be available inside the numbered section.
-% You must open any quotation environments inside a \cs{start}-\cs{pend} block, not outside.
-% A quotation environment MUST not be opened immediately after a \cs{pstart}
-% and MUST not be closed immediately before a \cs{pend}.
+% You must open any quotation environments inside a \protect\cs{start}-\protect\cs{pend} block, not outside.
+% A quotation environment MUST not be opened immediately after a \protect\cs{pstart}
+% and MUST not be closed immediately before a \protect\cs{pend}.
%
% \label{noquotation} In some cases, you do not want these environments to be redefined in numbered sections.
% You can load the package with the option \verb+noquotation+ to prevent this redefinition.
@@ -2960,20 +2926,20 @@
% 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 \cs{ledpb} adds a page break.
-% \item \cs{lednopb} prevents a page break, by adding one line to the current page if needed.
+% \item \protect\cs{ledpb} adds a page break.
+% \item \protect\cs{lednopb} prevents a page break, by adding one line to the current page if needed.
% \end{itemize}
% \textbf{These commands have effect only at the second run}.
%
-% These two commands take effect at the beginning of line in which they are called. For example, if you call \cs{ledpb} at l.~444, the l.~443 will be at the p.~$n$, and the l.~444 at the p.~$n+1$.
+% These two commands take effect at the beginning of line in which they are called. For example, if you call \protect\cs{ledpb} at l.~444, the l.~443 will be at the p.~$n$, and the l.~444 at the p.~$n+1$.
% \DescribeMacro{\ledpbsetting} However you can change the behavior, and decide they will have effect after the end of the line, adding \verb+\ledpbsetting{after}+ at the beginning of your file (better: in your preamble). With the previous example, the l.~444 will be at the p.~$n$ and the l.~445 will be at the p.~$n+1$.
%
-% If you are using \parpackage to typeset parallel pages you must use \cs{lednopb} on
+% If you are using \parpackage to typeset parallel pages you must use \protect\cs{lednopb} on
% both sides in the two corresponding lines. This is especially important when you are using
% stanzas; otherwise the pages will run out of sync.
%
% \subsection{Prevent page break in a long verses}
-%\label{lednopbinversetrue}\DescribeMacro{\lednopbinversetrue} You can also decide to prevent page breaks between two lines of a long verse. To do this, use \verb+nopbinverse+ when loading package, or add \cs{lednopbinversetrue} in the beginning of your file (better: in your preamble).
+%\label{lednopbinversetrue}\DescribeMacro{\lednopbinversetrue} You can also decide to prevent page breaks between two lines of a long verse. To do this, use \verb+nopbinverse+ when loading package, or add \protect\cs{lednopbinversetrue} in the beginning of your file (better: in your preamble).
%
%This feature works only with verse of 2 lines, not more. It works at the third run, or at fourth run with \eledpar.
% By default, when a long verse runs normally between two pages, a page break will be placed at the beginning of the verse. However, if you have added\verb+ledpbsetting{after}+, the page break will be placed at the end of the long verse, and the page containing the long verse will have one extra line.
@@ -2982,7 +2948,7 @@
%
% \DescribeMacro{\extensionchars}
% When the package assembles the name of the auxiliary file for a
-% section, it prefixes \cs{extensionchars} to the section number.
+% section, it prefixes \protect\cs{extensionchars} to the section number.
% This is initially defined to be empty, but you can add some characters to
% help distinguish these files if you like; what you use is likely
% to be system-dependent. If, for example, you said
@@ -3025,11 +2991,11 @@
%
% However, if with these options you still have such message, here are some tricks.
% \begin{description}
-% \item['no room for a new count'] is often caused by a conjunction with \Lpack{biblatex}.
-% Load \macpackage (and \parpackage) \emph{before} \Lpack{biblatex}.
+% \item['no room for a new count'] is often caused by a conjunction with \protect\package{biblatex}.
+% Load \macpackage (and \parpackage) \emph{before} \protect\package{biblatex}.
% \item['no room for a new write'] can be caused by with multiple indexes.
-% In this case, use \Lpack{indextools} of \Lpack{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 \Lpack{morewrites} package.
+% 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.
% That should solve the problem, but \LaTeX\ will be slower.
%
% \end{description}
@@ -3041,13 +3007,13 @@
% breaks anything that makes direct use of the \LaTeX\ insert system,
% which includes marginpars, footnotes and floats.
%
-% However, you can use both \cs{footnote} and the familiar footnote
-% series notes in numbered text. A \cs{marginpar} in numbered text
+% However, you can use both \protect\cs{footnote} and the familiar footnote
+% series notes in numbered text. A \protect\cs{marginpar} in numbered text
% will throw away its contents and send a warning message to the terminal
% and log file, but will do no harm.
%
% \subsubsection{Paragraph shape}
-% \cs{parshape} cannot be used within numbered text, except in a
+% \protect\cs{parshape} cannot be used within numbered text, except in a
% very restricted way.
%
% \DescribeMacro{\ballast}
@@ -3057,7 +3023,7 @@
% 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 \cs{ballast}. The amount of \cs{ballast}
+% inclusion of the quantity \protect\cs{ballast}. The amount of \protect\cs{ballast}
% will be subtracted from the penalties which apply to the page
% breaks calculated on the \emph{previous} run through \TeX, thus
% reinforcing these breaks. So if you find your page breaks
@@ -3079,9 +3045,9 @@
% \DescribeMacro{\footfudgefiddle}
% For paragraphed footnotes \TeX{} has to estimate the amount of space
% required. If it underestimates this then the notes may get too long and
-% run off the bottom of the text block. \cs{footfudgefiddle} can be increased
+% run off the bottom of the text block. \protect\cs{footfudgefiddle} can be increased
% from its default 64 (say to 68) to increase the estimate. You have to use
-% \cs{renewcommand} for this, like: \\
+% \protect\cs{renewcommand} for this, like: \\
% \verb?\renewcommand{\footfudgefiddle}{68}?
%
% \subsubsection{Use with other packages}
@@ -3089,17 +3055,17 @@
%
% Because of \macpackage's complexity it may not play well with other
% packages. In particular \macpackage is sensitive to commands in the
-% arguments to the \cs{edtext} and \cs{*footnote} macros (this is
+% 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 \cs{no@expands} and \cs{morenoexpands}). You
+% the discussion about \protect\cs{no@expands} and \protect\cs{morenoexpands}). You
% will have to see what works or doesn't work in your particular case.
%
% \DescribeMacro{\morenoexpands}
-% You can define the macro \cs{morenoexpands} to modify macros that you
-% call within \cs{edtext}. Because of the way \macpackage{} numbers the lines
-% the arguments to \cs{edtext} can be processed more than once and in some
-% cases a macro should only be processed once. One example is the \cs{colorbox}
-% macro from the \Lpack{color} package, which you might use like this:
+% You can define the macro \protect\cs{morenoexpands} to modify macros that you
+% call within \protect\cs{edtext}. Because of the way \macpackage{} numbers the lines
+% the arguments to \protect\cs{edtext} can be processed more than once and in some
+% cases a macro should only be processed once. One example is the \protect\cs{colorbox}
+% macro from the \protect\package{color} package, which you might use like this:
% \begin{verbatim}
% ... \edtext{\colorbox{mycolor}{lemma}}{\Afootnote{...\colorbox...}}
% \end{verbatim}
@@ -3119,16 +3085,16 @@
% \newcommand{\morenoexpands}{\let\colorbox\@secondoftwo}
% \makeatother
% \end{verbatim}
-% (\cs{@secondoftwo} is an internal \LaTeX\ macro that takes two arguments and
+% (\protect\cs{@secondoftwo} is an internal \LaTeX\ macro that takes two arguments and
% thows away the first one.)
% The first incantation lets color show in both the main text and footnotes
% whereas the second one shows color in the main text but kills it
% in the lemma and footnotes. On the other hand if you use
-% \cs{textcolor} instead, like
+% \protect\cs{textcolor} instead, like
% \begin{verbatim}
% ... \edtext{\textcolor{mycolor}{lemma}}{\Afootnote{...\textcolor...}}
% \end{verbatim}
-% there is no need to fiddle with \cs{morenoexpands} as the color will
+% there is no need to fiddle with \protect\cs{morenoexpands} as the color will
% naturally be displayed in both the text and footnotes. To kill the color
% in the lemma and footnotes, though, you can do:
% \begin{verbatim}
@@ -3142,7 +3108,7 @@
%
%%
%
-% If you want to use the option \emph{bottom} of the \Lpack{footmisc} package,
+% 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.
%
@@ -3151,13 +3117,13 @@
%
% Peter Wilson has developed the \ledpar package
% as an extension to \ledmac specifically for parallel typesetting
-% of critical texts. This also cooperates with the \Lpack{babel} / \Lpack{polyglossia}
+% of critical texts. This also cooperates with the \protect\package{babel} / \protect\package{polyglossia}
% packages for typesetting in multiple languages.
% \Parpackage is the successor of the primitive \ledpar package.
%
%
% Peter Wilson also developed
-% the \Lpack{ledarab} package for
+% the \protect\package{ledarab} package for
% handling parallel Arabic text in critical editions.
% However, this package is not maintened by Maïeul Rouquette.
% You should use the capabilities of a modern TeX processor, like Xe(La)TeX
@@ -3219,7 +3185,7 @@
% Generally, these are the modifications to the original.
% \edmac{} code:
% \begin{itemize}
-% \item Replace as many \cs{def}'s by \cs{newcommand}'s as possible
+% \item Replace as many \protect\cs{def}'s by \protect\cs{newcommand}'s as possible
% to avoid overwriting \LaTeX\ macros.
%
% \item Replace user-level \TeX\ counts by \LaTeX\ counters.
@@ -3238,7 +3204,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/07/19 v2.0.0 typesset critical edition]%
+\ProvidesPackage{reledmac}[2015/07/27 v2.0.1 typesset critical edition]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -3260,7 +3226,7 @@
% \begin{macro}{\ifeledmaccompat@}
% Use this to remember which option is used, set and execute the options
% with final as the default.
-% We use \Lpack{xkeyval} in order to manage options with argument.
+% We use \protect\package{xkeyval} in order to manage options with argument.
% \begin{macrocode}
\RequirePackage{xkeyval}
% \end{macrocode}
@@ -3332,7 +3298,7 @@
\eledmaccompat@true%
}%
% \end{macrocode}
-% We use the starred form of \cs{ProcessOptionsX} which executes options in
+% We use the starred form of \protect\cs{ProcessOptionsX} which executes options in
% the order listed in the source file: class options, then listed package
% options, so a package option can override a class option with the same name.
% This was suggested by Dan Luecking\index{Luecking, Dan} in the \texttt{ctt}
@@ -3356,9 +3322,9 @@
% \end{macro}
% \end{macro}
% \subsection{Loading packages}
-% Loading package \Lpack{xargs} to declare commands with optional arguments.
-% \Lpack{Etoolbox} is also used to make code clearer - for example, in dynamic command names (which can replace \cs{csname} etc.).
-% Use \Lpack{suffix} to declare commands with a starred version, \Lpack{xstring} to work with strings, \Lpack{ifluatex} and \Lpack{ifxetex} to test if \LuaTeX\ or \XeTeX\ is running, and \Lpack{ragged2e} to manage ragged for paragraphed notes.
+% Loading package \protect\package{xargs} to declare commands with optional arguments.
+% \protect\package{Etoolbox} is also used to make code clearer - for example, in dynamic command names (which can replace \protect\cs{csname} etc.).
+% Use \protect\package{suffix} to declare commands with a starred version, \protect\package{xstring} to work with strings, \protect\package{ifluatex} and \protect\package{ifxetex} to test if \LuaTeX\ or \XeTeX\ is running, and \protect\package{ragged2e} to manage ragged for paragraphed notes.
% \begin{macrocode}
\RequirePackage{xargs}
\RequirePackage{etoolbox}
@@ -3374,8 +3340,8 @@
%
% \subsection{Boolean flags}
% \begin{macro}{\ifl@dmemoir}
-% Define a flag for if the \Lpack{memoir} class has been used.
-% \changes{v0.2.0}{2003/07/25}{Added \cs{ifl@dmemoir} for memoir class having been used}
+% Define a flag for if the \protect\package{memoir} class has been used.
+% \changes{v0.2.0}{2003/07/25}{Added \protect\cs{ifl@dmemoir} for memoir class having been used}
% \begin{macrocode}
\newif\ifl@dmemoir
\@ifclassloaded{memoir}{\l@dmemoirtrue}{\l@dmemoirfalse}
@@ -3385,14 +3351,14 @@
%
%
% \begin{macro}{\ifl@imakeidx}
-% Define a flag for if the \Lpack{imakeidx} package has been used.
+% Define a flag for if the \protect\package{imakeidx} package has been used.
% \begin{macrocode}
\newif\ifl@imakeidx
\@ifpackageloaded{imakeidx}{\l@imakeidxtrue}{}%False is the default value
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ifl@indextools}
-% Define a flag for if the \Lpack{indextools} package has been used.
+% Define a flag for if the \protect\package{indextools} package has been used.
% \begin{macrocode}
\newif\ifl@indextools%
\@ifpackageloaded{indextools}{%
@@ -3401,11 +3367,11 @@
\let\imki@wrindexentry\indtl@wrindexentry%
}{}%
% \end{macrocode}
-%False is the default value. We consider \Lpack{indextools} as a variant of \Lpack{imakeidx}. That is why we set \cs{ifl@imakeidx} to true. We also let \cs{imki@wrindexentry} to \cs{indtl@wrindexentry}.
+%False is the default value. We consider \protect\package{indextools} as a variant of \protect\package{imakeidx}. That is why we set \protect\cs{ifl@imakeidx} to true. We also let \protect\cs{imki@wrindexentry} to \protect\cs{indtl@wrindexentry}.
% \end{macro}
% \begin{macro}{\if@RTL}
-% The \cs{if@RTL} is defined by the bidi package, which is sometimes loaded by \emph{polyglossia}.
-% But we define it as well if the \Lpack{bidi} package is not loaded.
+% The \protect\cs{if@RTL} is defined by the bidi package, which is sometimes loaded by \emph{polyglossia}.
+% But we define it as well if the \protect\package{bidi} package is not loaded.
% \begin{macrocode}
\ifdef{\if@RTL}{}{\newif\if@RTL}
% \end{macrocode}
@@ -3426,7 +3392,7 @@
%
% \begin{macro}{\reledmac@error}
% Write an error message.
-% \changes{v0.2.0}{2003/07/25}{Added \cs{eledmac@error} and replaced error messages}
+% \changes{v0.2.0}{2003/07/25}{Added \protect\cs{eledmac@error} and replaced error messages}
% \changes{v1.12.3}{2014/08/15}{Replaced error messages}
% \begin{macrocode}
\newcommand{\reledmac@error}[2]{\PackageError{reledmac}{#1}{#2}}
@@ -3739,10 +3705,10 @@
% \end{macrocode}
% \end{macro}
% \subsection{Gobbling}
-% \changes{v1.14.0}{2014/10/27}{Provide \cs{@gobblefour}}
+% \changes{v1.14.0}{2014/10/27}{Provide \protect\cs{@gobblefour}}
% \changes{v1.14.0}{2014/10/27}{Move gobbling command}
-% \changes{v1.21.0}{2015/04/13}{Provide \cs{@gobblefive}}
-% \changes{v0.2.2}{2003/11/05}{Used \cs{providecommand} for \cs{@gobblethree}
+% \changes{v1.21.0}{2015/04/13}{Provide \protect\cs{@gobblefive}}
+% \changes{v0.2.2}{2003/11/05}{Used \protect\cs{providecommand} for \protect\cs{@gobblethree}
% to avoid clash with the amsfonts package}
% Here, we define some commands which gobble their arguments.
% \begin{macro}{\@gobblethree}
@@ -3760,7 +3726,7 @@
% \begin{macro}{\showlemma}
% \verb?\showlemma?\marg{lemma} typesets the lemma text in the body.
% It depends on the option.
-% \changes{v0.4.0}{2004/02/29}{Added \cs{showlemma}}
+% \changes{v0.4.0}{2004/02/29}{Added \protect\cs{showlemma}}
% \begin{macrocode}
\ifledfinal
\newcommand*{\showlemma}[1]{#1}
@@ -3771,12 +3737,12 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\linenumberlist}
-% The code for the \cs{linenumberlist} mechanism was given to Peter Wilson by Wayne
+% The code for the \protect\cs{linenumberlist} mechanism was given to Peter Wilson by Wayne
% Sullivan\index{Sullivan, Wayne} on 2004/02/11.
%
-% Initialize it as \cs{empty}.
+% Initialize it as \protect\cs{empty}.
%
-% \changes{v0.3.0}{2004/02/14}{Added \cs{linenumberlist} mechanism}
+% \changes{v0.3.0}{2004/02/14}{Added \protect\cs{linenumberlist} mechanism}
% \begin{macrocode}
\let\linenumberlist=\empty
@@ -3787,9 +3753,9 @@
% \begin{macro}{\@l@dtempcntb}
% In imitation of \LaTeX, we create a couple of scratch counters.
%
-% \LaTeX\ already defines \cs{@tempcnta} and \cs{@tempcntb} but Peter Wilson
+% \LaTeX\ already defines \protect\cs{@tempcnta} and \protect\cs{@tempcntb} but Peter Wilson
% found in the past that it can be dangerous to use these (for example
-% one of the AMS packages did something nasty to the \Lpack{ccaption}
+% one of the AMS packages did something nasty to the \protect\package{ccaption}
% package's use of one of these).
% \begin{macrocode}
\newcount\@l@dtempcnta \newcount\@l@dtempcntb
@@ -3817,15 +3783,15 @@
% \begin{macro}{\ifledRcol}
% \begin{macro}{\ifledRcol@}
% In preparation for the \parpackage package, these are related to
-% the `right' text of parallel texts (when \cs{ifl@dpairing} is TRUE).
-% They are explained in the \Lpack{eledpar}
+% the `right' text of parallel texts (when \protect\cs{ifl@dpairing} is TRUE).
+% They are explained in the \protect\package{eledpar}
% manual.
-% \changes{v0.7.0}{2005/02/24}{Added \cs{l@dnumpstartsL}, \cs{ifl@dpairing}
-% and \cs{ifpst@rted} for/from eledpar}
-% \changes{v0.12.0}{2005/10/01}{Added \cs{ifledRcol} and \cs{ifnumberingR} for/from \Lpack{eledpar}}
-% \changes{v1.12.0}{2014/08/05}{Add \cs{ifledRcol@} for \Lpack{eledpar}}
-% \changes{v1.13.2}{2014/09/31}{Add \cs{ifl@dpaging} for \Lpack{eledpar}}
-% \changes{v1.18.0}{2015/02/23}{Add \cs{ifl@dprintingpages} and \cs{@dprintingcolumns} for \Lpack{eledpar}}
+% \changes{v0.7.0}{2005/02/24}{Added \protect\cs{l@dnumpstartsL}, \protect\cs{ifl@dpairing}
+% and \protect\cs{ifpst@rted} for/from eledpar}
+% \changes{v0.12.0}{2005/10/01}{Added \protect\cs{ifledRcol} and \protect\cs{ifnumberingR} for/from \protect\package{eledpar}}
+% \changes{v1.12.0}{2014/08/05}{Add \protect\cs{ifledRcol@} for \protect\package{eledpar}}
+% \changes{v1.13.2}{2014/09/31}{Add \protect\cs{ifl@dpaging} for \protect\package{eledpar}}
+% \changes{v1.18.0}{2015/02/23}{Add \protect\cs{ifl@dprintingpages} and \protect\cs{@dprintingcolumns} for \protect\package{eledpar}}
% \begin{macrocode}
\newif\ifl@dpairing
\newif\ifl@dpaging%
@@ -3834,12 +3800,12 @@
\newif\ifpst@rtedL
\newcount\l@dnumpstartsL
% \end{macrocode}
-% \cs{ifledRcol} is set to true in the \verb+Rightside+ environnement. It must be not confused with \cs{ifledRcol@} which is set to true when a right line is processed, in \cs{Pages} or \cs{Columns}.
+% \protect\cs{ifledRcol} is set to true in the \verb+Rightside+ environnement. It must be not confused with \protect\cs{ifledRcol@} which is set to true when a right line is processed, in \protect\cs{Pages} or \protect\cs{Columns}.
% \begin{macrocode}
\newif\ifledRcol
\newif\ifledRcol@
% \end{macrocode}
-% The \cs{ifnumberingR} flag is
+% The \protect\cs{ifnumberingR} flag is
% set to \verb"true" if we're within a right text numbered section.
% \begin{macrocode}
\newif\ifnumberingR
@@ -3867,14 +3833,14 @@
%\section{Sectioning commands}
%
% \begin{macro}{\section@num}
-% You use \cs{beginnumbering} and \cs{endnumbering} to begin
+% You use \protect\cs{beginnumbering} and \protect\cs{endnumbering} to begin
% and end a line-numbered section of the text; the pair of commands may
% be used as many times as you like within one document to start
% and end multiple, separately line-numbered sections. \LaTeX\ will
% maintain and display
% a `section number' as a count named
-% \cs{section@num} that counts how many
-% \cs{beginnumbering} and \cs{resumenumbering}
+% \protect\cs{section@num} that counts how many
+% \protect\cs{beginnumbering} and \protect\cs{resumenumbering}
% commands have appeared; it need not be
% related to the logical divisions of your text.
%
@@ -3886,7 +3852,7 @@
% an extra string be added before the
% \file{nn} in that filename, in order to distinguish these
% temporary files from others: that string is called
-% \cs{extensionchars}. Initially it's empty, since different
+% \protect\cs{extensionchars}. Initially it's empty, since different
% operating systems have greatly varying ideas about what
% characters are permitted in file names. So
% \verb"\renewcommand{\extensionchars}{-}" gives temporary files called
@@ -3902,9 +3868,9 @@
% \begin{macro}{\ifnumbering}
% \begin{macro}{\numberingtrue}
% \begin{macro}{\numberingfalse}
-% The \cs{ifnumbering} flag is
+% The \protect\cs{ifnumbering} flag is
% set to \verb"true" if we are within a numbered section (that is, between
-% \cs{beginnumbering} and \cs{endnumbering}). You can use \cs{ifnumbering}
+% \protect\cs{beginnumbering} and \protect\cs{endnumbering}). You can use \protect\cs{ifnumbering}
% in your own code to check whether you are in a numbered section, but
% do not change the flag's value.
% \begin{macrocode}
@@ -3916,13 +3882,13 @@
%
% \begin{macro}{\beginnumbering}
% \begin{macro}{\initnumbering@reg}
-% \cs{beginnumbering} begins a section of numbered text.
+% \protect\cs{beginnumbering} begins a section of numbered text.
% When it is executed we increment the section number,
% initialize our counters, send a message to your terminal, and
% call macros to start the lineation machinery and endnote files.
%
% The initializations here are trickier than they look.
-% \cs{line@list@stuff} will use all of the counters
+% \protect\cs{line@list@stuff} will use all of the counters
% that are zeroed here when it assembles
% the line-list and other lists of information about the lineation.
% But it will do all of this locally and
@@ -3933,12 +3899,12 @@
% actually apply to both uses, though in all other respects there
% should be no direct interaction between the use of these counters
% and variables in the two processing steps.
-% \changes{v0.7.0}{2005/02/24}{Added \cs{initnumbering@reg}}
-% \changes{v1.12.0}{2014/08/05}{\cs{beginnumbering} is defined only on \Lpack{eledmac}, not on \Lpack{eledpar}.}
+% \changes{v0.7.0}{2005/02/24}{Added \protect\cs{initnumbering@reg}}
+% \changes{v1.12.0}{2014/08/05}{\protect\cs{beginnumbering} is defined only on \protect\package{eledmac}, not on \protect\package{eledpar}.}
% For parallel processing :
%\begin{itemize}
-% \item zero \cs{l@dnumpstartsL} --- the number of chunks to be processed.
-% \item set \cs{ifpst@rtedL} to FALSE.
+% \item zero \protect\cs{l@dnumpstartsL} --- the number of chunks to be processed.
+% \item set \protect\cs{ifpst@rtedL} to FALSE.
% \end{itemize}
% \begin{macrocode}
\newcommand*{\beginnumbering}{%
@@ -4002,12 +3968,12 @@
% \end{macro}
%
% \begin{macro}{\endnumbering}
-% \cs{endnumbering} must follow the last text for a numbered section.
+% \protect\cs{endnumbering} must follow the last text for a numbered section.
% It takes care of notifying you when changes have been noted in the
% input that require running the file through again to move everything
% to the right place.
-% \changes{v0.7.0}{2005/02/24}{Changed \cs{endnumbering} for eledpar}
-% \changes{v1.12.5}{2014/08/31}{Allow to mix parallel columns and normal text when using \cs{pausenumbering}}
+% \changes{v0.7.0}{2005/02/24}{Changed \protect\cs{endnumbering} for eledpar}
+% \changes{v1.12.5}{2014/08/31}{Allow to mix parallel columns and normal text when using \protect\cs{pausenumbering}}
% \begin{macrocode}
\def\endnumbering{%
\ifnumbering
@@ -4046,8 +4012,8 @@
%
% \begin{macro}{\pausenumbering}
% \begin{macro}{\resumenumbering}
-% The \cs{pausenumbering} macro is just the same as
-% \cs{endnumbering}, but with the \cs{ifnumbering} flag set to \verb"true", to
+% The \protect\cs{pausenumbering} macro is just the same as
+% \protect\cs{endnumbering}, but with the \protect\cs{ifnumbering} flag set to \verb"true", to
% show that numbering continues across the gap.\footnote{Peter Wilson's thanks
% to Wayne Sullivan,\index{Sullivan, Wayne} who suggested the idea
% behind these macros.}
@@ -4056,13 +4022,13 @@
\ifautopar\global\autopar@pausetrue\fi%
\endnumbering\global\numberingtrue}
% \end{macrocode}
-% The \cs{resumenumbering} macro is a bit more involved, but not much.
-% It does most of the same things as \cs{beginnumbering}, but
+% The \protect\cs{resumenumbering} macro is a bit more involved, but not much.
+% It does most of the same things as \protect\cs{beginnumbering}, but
% without resetting the various counters. Note that no check is made
-% by \cs{resumenumbering} to ensure that \cs{pausenumbering} was actually
+% by \protect\cs{resumenumbering} to ensure that \protect\cs{pausenumbering} was actually
% invoked.
-% \changes{v0.7.0}{2005/02/24}{Changed \cs{resumenumbering} for eledpar}
-% \changes{v1.12.5}{2014/08/31}{Debug \cs{resumenumbering}}
+% \changes{v0.7.0}{2005/02/24}{Changed \protect\cs{resumenumbering} for eledpar}
+% \changes{v1.12.5}{2014/08/31}{Debug \protect\cs{resumenumbering}}
% \begin{macrocode}
\newcommand*{\resumenumbering}{%
\ifnumbering
@@ -4104,16 +4070,16 @@
% of doing so have defined their interface in such a way that it is
% not sensitive to details of the underlying code.
%
-% The historical list tools of \ledmac are keept, because in many cause there are more useful than \Lpack{etoolbox}'s lists.
+% The historical list tools of \ledmac are keept, because in many cause there are more useful than \protect\package{etoolbox}'s lists.
% They allows to get and delete the first element of a list in one operation. They also expands the items add to the list.
%
-% However, \Lpack{etoolbox}'s lists are more useful to loop on them.
+% However, \protect\package{etoolbox}'s lists are more useful to loop on them.
% Consequently, depending of what we need, we use one or either.
%
% It could be nice to unify them to the \LaTeX3 list, however such migration would take quite time with some risk of error, for a gain which will be minor.
%
% \begin{macro}{\list@create}
-% The \cs{list@create} macro creates a new list.
+% The \protect\cs{list@create} macro creates a new list.
% This macro does not do anything beyond initializing an empty
% list macro.
%
@@ -4125,9 +4091,9 @@
% \end{macro}
%
% \begin{macro}{\list@clear}
-% The \cs{list@clear} macro just initializes a list to the empty list;
+% The \protect\cs{list@clear} macro just initializes a list to the empty list;
% it is no different from
-% \cs{list@create} in its effect, but it is in its semantic .
+% \protect\cs{list@create} in its effect, but it is in its semantic .
% \begin{macrocode}
\newcommand*{\list@clear}[1]{%
\global\let#1=\empty%
@@ -4138,11 +4104,11 @@
% \begin{macro}{\xright@appenditem}
% \begin{macro}{\led@toksa}
% \begin{macro}{\led@toksb}
-% \cs{xright@appenditem} expands an item and appends it to the right
+% \protect\cs{xright@appenditem} expands an item and appends it to the right
% end of a list macro. We want the expansion because we will often
% be using this to store the current value of a counter.
-% \cs{xright@appenditem} creates global control sequences, like \cs{xdef}, and uses two
-% temporary token-list registers, \cs{@toksa} and \cs{@toksb}.
+% \protect\cs{xright@appenditem} creates global control sequences, like \protect\cs{xdef}, and uses two
+% temporary token-list registers, \protect\cs{@toksa} and \protect\cs{@toksb}.
% \begin{macrocode}
\newtoks\led@toksa \newtoks\led@toksb
\global\led@toksa={\\}
@@ -4156,9 +4122,9 @@
% \end{macro}
%
% \begin{macro}{\xleft@appenditem}
-% \cs{xleft@appenditem} expands an item and appends it to the left
+% \protect\cs{xleft@appenditem} expands an item and appends it to the left
% end of a list macro; it is otherwise identical to
-% \cs{xright@appenditem}.
+% \protect\cs{xright@appenditem}.
% \begin{macrocode}
\long\def\xleft@appenditem#1\to#2{%
\global\led@toksb=\expandafter{#2}%
@@ -4168,13 +4134,13 @@
% \end{macro}
%
% \begin{macro}{\gl@p}
-% The \cs{gl@p} macro removes the leftmost
+% The \protect\cs{gl@p} macro removes the leftmost
% item from a list and places it in a
% control sequence. You say \verb"\gl@p\l\to\z"
% (where \verb"\l" is the list macro, and
% \verb"\z" receives the left item). \verb"\l" is assumed nonempty:use
% \verb"\ifx\l\empty" to test for an empty \verb"\l". The control
-% sequences created by \cs{gl@p} are all global.
+% sequences created by \protect\cs{gl@p} are all global.
% \begin{macrocode}
\def\gl@p#1\to#2{\expandafter\gl@poff#1\gl@poff#1#2}
\long\def\gl@poff\\#1#2\gl@poff#3#4{\gdef#4{#1}\gdef#3{#2}}
@@ -4198,7 +4164,7 @@
% \begin{macro}{\ifbypage@}
% \begin{macro}{\bypage@true}
% \begin{macro}{\bypage@false}
-% The \cs{ifbypage@} and \cs{ifbypstart@} flag specifie the current lineation
+% The \protect\cs{ifbypage@} and \protect\cs{ifbypstart@} flag specifie the current lineation
% system: \begin{itemize}
% \item line-of-page: \verb|bypstart@ = false| and \verb|bypage@ = true|.
% \item line-of-pstart: \verb|bypstart@ = true| and \verb|bypage@ = false|.
@@ -4215,7 +4181,7 @@
% \end{macro}
% \end{macro}
%
-% The \cs{ifbypage@R} and \cs{ifbypstart@R} flag specifie the current lineation for right side in case of using \parpackage. They are now defined because they are used in some specific code.
+% The \protect\cs{ifbypage@R} and \protect\cs{ifbypstart@R} flag specifie the current lineation for right side in case of using \parpackage. They are now defined because they are used in some specific code.
% \Parpackage will use the line-of-section system unless instructed otherwise.
% \begin{macro}{\ifbypage@R}
% \begin{macro}{\ifbypstart@R}
@@ -4226,7 +4192,7 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\lineation}
-% \cs{lineation}\marg{word} is the macro you use to select the
+% \protect\cs{lineation}\marg{word} is the macro you use to select the
% lineation system.
% Its argument is a string: either \verb+page+, \verb+section+ or \verb+pstart+.
% \begin{macrocode}
@@ -4284,14 +4250,14 @@
% \begin{macro}{\linenummargin}
% \begin{macro}{\line@margin}
% \begin{macro}{\l@dgetline@margin}
-% \cs{linenummargin}\marg{word} specify which margin
+% \protect\cs{linenummargin}\marg{word} specify which margin
% line numbers are in; it takes one argument, a string, which value can be
% \verb+left+ ; \verb+right+; \verb+inner+ or
% \verb+outer+.
%
-% The selection is recorded in the count \cs{line@margin}:
+% The selection is recorded in the count \protect\cs{line@margin}:
% $0$ for left, $1$ for right, $2$ for outer, and $3$ for inner.
-% \changes{v0.7.0}{2005/02/23}{Added \cs{l@dgetline@margin}}
+% \changes{v0.7.0}{2005/02/23}{Added \protect\cs{l@dgetline@margin}}
% \begin{macrocode}
\newcount\line@margin
@@ -4374,8 +4340,8 @@
% \begin{macro}{\firstsublinenum}
% \begin{macro}{\sublinenumincrement}
% These macros can be used to set the corresponding counters.
-% \changes{v0.7.0}{2005/02/18}{Added \cs{firstlinenum}, \cs{linenumincrement},
-% \cs{firstsublinenum} and \cs{linenumincrement}}
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{firstlinenum}, \protect\cs{linenumincrement},
+% \protect\cs{firstsublinenum} and \protect\cs{linenumincrement}}
% \begin{macrocode}
\newcommand*{\firstlinenum}[1]{%
@@ -4417,7 +4383,7 @@
% \begin{macro}{\lockdisp}
% \begin{macro}{\lock@disp}
% \begin{macro}{\l@dgetlock@disp}
-% When line locking is being used, the \cs{lockdisp}\marg{word} macro
+% When line locking is being used, the \protect\cs{lockdisp}\marg{word} macro
% specifies whether a line number---if one is due to
% appear---should be printed on the first printed line or on the
% last, or by all of them.
@@ -4425,9 +4391,9 @@
% \verb+first+, \verb+last+, or \verb+all+.
% Initially, it is set to \verb+first+.
%
-% \cs{lock@disp} encodes the selection: $0$ for first, $1$ for last,
+% \protect\cs{lock@disp} encodes the selection: $0$ for first, $1$ for last,
% $2$ for all.
-% \changes{v0.7.0}{2005/02/23}{Added \cs{l@dgetlock@disp}}
+% \changes{v0.7.0}{2005/02/23}{Added \protect\cs{l@dgetlock@disp}}
% \begin{macrocode}
\newcount\lock@disp
\newcommand{\lockdisp}[1]{{%
@@ -4488,15 +4454,15 @@
% We provide a mechanism for using different representations of the
% line numbers, not just the normal arabic.
%
-% NOTE: In v0.7 \cs{linenumrep} and \cs{sublinenumrep} replaced
-% the internal \cs{linenumr@p} and \cs{sublinenumr@p}.
+% NOTE: In v0.7 \protect\cs{linenumrep} and \protect\cs{sublinenumrep} replaced
+% the internal \protect\cs{linenumr@p} and \protect\cs{sublinenumr@p}.
%
-% \cs{linenumberstyle} and \cs{sublinenumberstyle} are user level
-% macros for setting the number representation (\cs{linenumrep}
-% and \cs{sublinenumrep}) for line and sub-line numbers.
-% \changes{v0.3.0}{2004/02/14}{Added \cs{linenumberstyle} and \cs{sublinenumberstyle}}
-% \changes{v0.7.0}{2005/02/18}{Using \cs{linenumrep} instead of \cs{linenumr@p}}
-% \changes{v0.7.0}{2005/02/18}{Using \cs{sublinenumrep} instead of \cs{sublinenumr@p}}
+% \protect\cs{linenumberstyle} and \protect\cs{sublinenumberstyle} are user level
+% macros for setting the number representation (\protect\cs{linenumrep}
+% and \protect\cs{sublinenumrep}) for line and sub-line numbers.
+% \changes{v0.3.0}{2004/02/14}{Added \protect\cs{linenumberstyle} and \protect\cs{sublinenumberstyle}}
+% \changes{v0.7.0}{2005/02/18}{Using \protect\cs{linenumrep} instead of \protect\cs{linenumr@p}}
+% \changes{v0.7.0}{2005/02/18}{Using \protect\cs{sublinenumrep} instead of \protect\cs{sublinenumr@p}}
% \begin{macrocode}
\newcommand*{\linenumberstyle}[1]{%
\def\linenumrep##1{\@nameuse{@#1}{##1}}}
@@ -4523,34 +4489,34 @@
% \begin{macro}{\linenumsep}
% \begin{macro}{\numlabfont}
% \begin{macro}{\ledlinenum}
-% \cs{leftlinenum} and \cs{rightlinenum} are the macros that are
+% \protect\cs{leftlinenum} and \protect\cs{rightlinenum} are the macros that are
% called to print marginal line numbers on
% a page, for left- and right-hand margins respectively.
% They are made easy to access and change, since you may
% want to change the styling in some way.
% These standard versions
% illustrate the general sort of thing that will be needed; they are
-% based on the \cs{leftheadline} macro in \thetexbook, p.\,416.
+% based on the \protect\cs{leftheadline} macro in \thetexbook, p.\,416.
%
% Whatever these macros output gets printed in a box that will be
% put into the appropriate margin without any space between it and the
% line of text.
% You will generally want a kern between a line number and
-% the text, and \cs{linenumsep} is provided as a standard way of
+% the text, and \protect\cs{linenumsep} is provided as a standard way of
% storing its size. Line numbers are usually printed in a smaller
-% font, and \cs{numlabfont} is provided as a standard name for that
+% font, and \protect\cs{numlabfont} is provided as a standard name for that
% font. When called, these macros
% will be executed within a group, so font changes and the like will
% remain local.
%
-% \cs{ledlinenum} typesets the line (and subline) number.
+% \protect\cs{ledlinenum} typesets the line (and subline) number.
%
-% The original \cs{numlabfont} specification is equivalent to
-% the \LaTeX\ \cs{scriptsize} for a 10pt document.
-% \changes{v0.3.0}{2004/02/14}{Added \cs{linenumr@p} and \cs{sublinenum@rep}
-% to \cs{leftlinenum} and \cs{rightlinenum}}
-% \changes{v0.7.0}{2005/02/18}{Added \cs{ledlinenum} for use by
-% \cs{leftlinenum} and \cs{rightlinenum}}
+% The original \protect\cs{numlabfont} specification is equivalent to
+% the \LaTeX\ \protect\cs{scriptsize} for a 10pt document.
+% \changes{v0.3.0}{2004/02/14}{Added \protect\cs{linenumr@p} and \protect\cs{sublinenum@rep}
+% to \protect\cs{leftlinenum} and \protect\cs{rightlinenum}}
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{ledlinenum} for use by
+% \protect\cs{leftlinenum} and \protect\cs{rightlinenum}}
% \begin{macrocode}
\newlength{\linenumsep}
\setlength{\linenumsep}{1pc}
@@ -4596,7 +4562,7 @@
% So we run \LaTeX\ over the text several times, and each time save
% information about page and line numbers in a `line-list file' to
% be used during the next pass. At the start of each section---whenever
-% \cs{beginnumbering} is executed---the line-list file
+% \protect\cs{beginnumbering} is executed---the line-list file
% for that section
% is read, and the information from it is encoded into a few list
% macros.
@@ -4605,17 +4571,17 @@
% in these macros, and the associated counters.
%
% \begin{macro}{\line@num}
-% The count \cs{line@num} stores the line number that is used in
+% The count \protect\cs{line@num} stores the line number that is used in
% marginal line numbering and in notes: counting either by section, page or pstart, depending on your
-% choice for this section. This may be qualified by \cs{subline@num}.
+% choice for this section. This may be qualified by \protect\cs{subline@num}.
% \begin{macrocode}
\newcount\line@num
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\subline@num}
-% The count \cs{subline@num} stores
-% a sub-line number that qualifies \cs{line@num}. For example,
+% The count \protect\cs{subline@num} stores
+% a sub-line number that qualifies \protect\cs{line@num}. For example,
% line $10$ might have sub-line numbers $1$, $2$ and $3$, which might be
% printed as lines $10.1$, $10.2$, $10.3$.
% \begin{macrocode}
@@ -4626,11 +4592,11 @@
% \begin{macro}{\ifsublines@}
% \begin{macro}{\sublines@true}
% \begin{macro}{\sublines@false}
-% We maintain an associated flag, \cs{ifsublines@},
+% We maintain an associated flag, \protect\cs{ifsublines@},
% to tell us whether we're within
% a sub-line range or not.
%
-% You may wonder why we do not just use the value of \cs{subline@num}
+% You may wonder why we do not just use the value of \protect\cs{subline@num}
% to determine this---treating anything greater than $0$ as an
% indication that sub-lineation is on. We need a separate flag because
% sub-lineation can be used together with line-number locking in odd
@@ -4649,27 +4615,27 @@
% \end{macro}
%
% \begin{macro}{\absline@num}
-% The count \cs{absline@num} stores the
+% The count \protect\cs{absline@num} stores the
% absolute number of lines since the start
% of the section: that is, the number we have actually printed, no matter
% what numbers we attached to them.
% This value is never printed on an output page, though
-% \cs{line@num} will often be equal to it. It is used internally to
+% \protect\cs{line@num} will often be equal to it. It is used internally to
% keep track of where notes are to appear and where new
-% pages start: using this value rather than \cs{line@num} is a lot
+% pages start: using this value rather than \protect\cs{line@num} is a lot
% simpler, because it does not depend on the lineation system in use.
% \begin{macrocode}
\newcount\absline@num
% \end{macrocode}
% \end{macro}
%
-% We will call \cs{absline@num} numbers ``absolute'' numbers, and
-% \cs{line@num} and \cs{subline@num} numbers ``visible'' numbers.
+% We will call \protect\cs{absline@num} numbers ``absolute'' numbers, and
+% \protect\cs{line@num} and \protect\cs{subline@num} numbers ``visible'' numbers.
%
% \subsection{Line number locking counter}
% \begin{macro}{\@lock}
% \begin{macro}{\sub@lock}
-% The counts \cs{@lock} and \cs{sub@lock}
+% The counts \protect\cs{@lock} and \protect\cs{sub@lock}
% tell us the state of line-number
% and sub-line-number locking. $0$ means we are not within a locked set of
% lines; $1$ means we are at the first line in the set; $2$, at some
@@ -4688,8 +4654,8 @@
% Now we can define the list macros that will be created from the
% line-list file. We will maintain the following lists:
% \begin{itemize}\addtolength{\itemsep}{-1ex}
-% \item \cs{line@list}: the page and line numbers for every
-% lemma marked by \cs{edtext}.
+% \item \protect\cs{line@list}: the page and line numbers for every
+% lemma marked by \protect\cs{edtext}.
% There are seven pieces of information, separated by vertical bars:
% \label{linenumbers}
% \begin{enumerate}\addtolength{\itemsep}{-1ex}
@@ -4714,25 +4680,25 @@
% \verb"23|35|0|24|3|0|OT1/cmr/m/n".
%
% There is one item in this list for every lemma marked by
-% \cs{edtext}, even if there are several notes to that lemma, or no
-% notes at all. \cs{edtext} reads the data in this list, making it
+% \protect\cs{edtext}, even if there are several notes to that lemma, or no
+% notes at all. \protect\cs{edtext} reads the data in this list, making it
% available for use in the text of notes.
%
-% \item \cs{insertlines@list}: the line numbers of lines that have
+% \item \protect\cs{insertlines@list}: the line numbers of lines that have
% footnotes or other insertions.
% These are the absolute numbers where the corresponding
% lemmas begin. This list contains one entry for every footnote in the
% section; one lemma may contribute no footnotes or many footnotes.
-% This list is used by \cs{add@inserts} within \cs{do@line}, to tell
+% This list is used by \protect\cs{add@inserts} within \protect\cs{do@line}, to tell
% it where to insert notes.
%
-% \item \cs{actionlines@list}: a list of absolute line numbers at
+% \item \protect\cs{actionlines@list}: a list of absolute line numbers at
% which we are to perform special
-% actions; these actions are specified by the \cs{actions@list} list
+% actions; these actions are specified by the \protect\cs{actions@list} list
% defined below.
%
-% \item \cs{actions@list}: action codes corresponding to the line
-% numbers in \cs{actionlines@list}. These codes tell \macpackage what action
+% \item \protect\cs{actions@list}: action codes corresponding to the line
+% numbers in \protect\cs{actionlines@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
@@ -4755,21 +4721,21 @@
% page-number values are used by some macro packages; we assume that
% page-number values less than $-1000$ are not common.)
% Page-start action codes are added to the list by
-% the \cs{page@action} macro, which is (indirectly) triggered by the
-% workings of the \cs{page@start} macro; that macro should always be
+% the \protect\cs{page@action} macro, which is (indirectly) triggered by the
+% workings of the \protect\cs{page@start} macro; that macro should always be
% called in the output routine, just before the page contents are
-% assembled. \Eledmac{} calls it in \cs{pagecontents}.
+% assembled. \Eledmac{} calls it in \protect\cs{pagecontents}.
%
% The action code $-1001$ specifies the start of sub-lineation: meaning
% that, starting with the next line, we should be advancing
-% \cs{subline@num} at each start-of-line command, rather than
-% \cs{line@num}.
+% \protect\cs{subline@num} at each start-of-line command, rather than
+% \protect\cs{line@num}.
%
% The action code $-1002$ specifies the end of sub-lineation. At the
% next start-of-line, we should clear the sub-line counter and start
% advancing the line number. The action codes for starting and ending
-% sub-lineation are added to the list by the \cs{sub@action} macro, as
-% called to implement the \cs{startsub} and \cs{endsub} macros.
+% sub-lineation are added to the list by the \protect\cs{sub@action} macro, as
+% called to implement the \protect\cs{startsub} and \protect\cs{endsub} macros.
%
% The action code $-1003$ specifies the start of line number locking.
% After the number for the current line is computed, it will remain
@@ -4786,16 +4752,16 @@
% The action code $-1006$ specifies the end of sub-line number locking.
%
% The four action codes for line and sub-line number locking are added
-% to the list by the \cs{do@lockon} and \cs{do@lockoff} macros, as called
-% to implement the \cs{startlock} and \cs{endlock} macros.
+% to the list by the \protect\cs{do@lockon} and \protect\cs{do@lockoff} macros, as called
+% to implement the \protect\cs{startlock} and \protect\cs{endlock} macros.
%
% An action code of $-5000$ or less sets the current visible line
% number (either the line number or the sub-line number, whichever is
% currently being advanced) to a specific positive value. The value of
% the code is $-(5000+n)$, where $n$ is the value (always $\ge 0$)
% assigned to the current line number. Action codes of this type are
-% added to the list by the \cs{set@line@action} macro, as called to
-% implement the \cs{advanceline} and \cs{setline} macros: this action only
+% added to the list by the \protect\cs{set@line@action} macro, as called to
+% implement the \protect\cs{advanceline} and \protect\cs{setline} macros: this action only
% occurs when the user has specified some change to the line numbers
% using those macros. Normally \macpackage{} computes the visible line numbers
% from the absolute line numbers with reference to the other
@@ -4851,7 +4817,7 @@
% we do not really know where in the section notes were added or removed,
% and the solution in any case is simply to run \LaTeX\ two more times;
% there is no fix needed to the document. The
-% \cs{ifnoteschanged@} flag is set if such
+% \protect\cs{ifnoteschanged@} flag is set if such
% a change in the number of notes is discovered at any point.
% \begin{macrocode}
\newif\ifnoteschanged@
@@ -4861,11 +4827,11 @@
% \end{macro}
%
% \DescribeMacro{\resetprevline@}
-% Inside the apparatus, at each note, the line number is stored in a macro called \cs{prevlineX},
+% Inside the apparatus, at each note, the line number is stored in a macro called \protect\cs{prevlineX},
% where X is the letter of the current series.
-% This macro is called when using \cs{Xnumberonlyfirstinline}.
+% This macro is called when using \protect\cs{Xnumberonlyfirstinline}.
% This macro must be reset at the same time as the line number.
-% The \cs{resetprevline@} does this resetting for every series.
+% The \protect\cs{resetprevline@} does this resetting for every series.
% \begin{macro}{\resetprevline@}
% \begin{macrocode}
\newcommand*{\resetprevline@}{%
@@ -4876,11 +4842,11 @@
% \end{macro}
%
% \DescribeMacro{\resetprevpage@num}
-% Inside the apparatus, at each note, the page number is stored in a macro called \cs{prevpageX@num},
+% Inside the apparatus, at each note, the page number is stored in a macro called \protect\cs{prevpageX@num},
% where X is the letter of the current series.
-% This macro is called when using \cs{Xparafootsep} or \cs{parafootsepX}.
+% This macro is called when using \protect\cs{Xparafootsep} or \protect\cs{parafootsepX}.
% This macro must be reset at the beginning of each numbered section
-% The \cs{resetprevpage@} command resets this macro for every series.
+% The \protect\cs{resetprevpage@} command resets this macro for every series.
% \begin{macro}{\resetprevpage@}
% \begin{macrocode}
\newcommand*{\resetprevpage@num}{%
@@ -4893,9 +4859,9 @@
%
%
% \begin{macro}{\read@linelist}
-% \cs{read@linelist}\marg{file} is the control sequence
-% that is called by \cs{beginnumbering}
-% (via \cs{line@list@stuff}) to open and process a
+% \protect\cs{read@linelist}\marg{file} is the control sequence
+% that is called by \protect\cs{beginnumbering}
+% (via \protect\cs{line@list@stuff}) to open and process a
% line-list file; its argument is the name of the file.
% \label{readlinelist}.
% First, it clear all previous line's list.
@@ -4909,7 +4875,7 @@
\fi%
% \end{macrocode}
%
-% When using \parpackage, make sure that the \cs{maxlinesinpar@list} is empty (otherwise things
+% When using \parpackage, make sure that the \protect\cs{maxlinesinpar@list} is empty (otherwise things
% will be thrown out of kilter if there is any old stuff still hanging
% in there).
% \begin{macrocode}
@@ -4931,11 +4897,11 @@
%
%
% Our line, page, and line-locking counters were already zeroed
-% by \cs{line@list@stuff} if this is being called from within
-% \cs{beginnumbering}; sub-lineation will be turned off as well
+% by \protect\cs{line@list@stuff} if this is being called from within
+% \protect\cs{beginnumbering}; sub-lineation will be turned off as well
% in that case. On the other hand,
-% if this is being called from \cs{resumenumbering}, those things
-% should still have the values they had when \cs{pausenumbering}
+% if this is being called from \protect\cs{resumenumbering}, those things
+% should still have the values they had when \protect\cs{pausenumbering}
% was executed.
%
% If the file is not there, we print an informative message.
@@ -4953,7 +4919,7 @@
% from it will now be encoded in our list macros.
%
% Finally, we
-% initialize the \cs{next@actionline} and \cs{next@action} macros,
+% initialize the \protect\cs{next@actionline} and \protect\cs{next@action} macros,
% which specify where and what the next action to be taken is.
% \begin{macrocode}
\ifledRcol
@@ -4978,8 +4944,8 @@
% \end{macro}
%
% \begin{macro}{\list@clearing@reg}
-% Clears the lists for \cs{read@linelist}
-% \changes{v0.7.0}{2005/02/22}{Added \cs{list@clearing@reg}}
+% Clears the lists for \protect\cs{read@linelist}
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{list@clearing@reg}}
% \begin{macrocode}
\newcommand*{\list@clearing@reg}{%
\list@clear{\line@list}%
@@ -4995,7 +4961,7 @@
% \begin{macro}{\get@linelistfile}
% \Macpackage{} can take advantage of the \LaTeX\ `safe file input' macros
% to get the line-list file.
-% \changes{v0.7.0}{2005/02/22}{Added \cs{get@linelistfile}}
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{get@linelistfile}}
% \begin{macrocode}
\newcommand*{\get@linelistfile}[1]{%
\InputIfFileExists{#1}{%
@@ -5011,7 +4977,7 @@
% \end{macrocode}
% \end{macro}
%
-% This version of \cs{read@linelist} creates list macros
+% This version of \protect\cs{read@linelist} creates list macros
% containing data for the entire section, so they could get rather
% large. It would be no more difficult to read the line-list file
% incrementally rather than all at once: we could read, at the
@@ -5021,8 +4987,8 @@
% writing, and on systems without version numbers we would have to do
% some file renaming outside of \LaTeX\ for that to work. We have
% retained this slower approach to avoid that sort of hacking
-% about, but have provided the \cs{pausenumbering} and
-% \cs{resumenumbering} macros to help you if you run into
+% about, but have provided the \protect\cs{pausenumbering} and
+% \protect\cs{resumenumbering} macros to help you if you run into
% macro memory limitations (see \reff{pause} above).
%
% \subsection{Commands within the line-list file}
@@ -5030,26 +4996,26 @@
% This section defines the commands that can appear within a
% line-list file. They all have very short names because we are
% likely to be writing very large numbers of them out. One macro,
-% \cs{@nl}, is especially short, since it will be written to the
+% \protect\cs{@nl}, is especially short, since it will be written to the
% line-list file once for every line of text in a numbered section.
-% (Another of these commands, \cs{@lab}, will be introduced in a
+% (Another of these commands, \protect\cs{@lab}, will be introduced in a
% later section, among the cross-referencing commands it is
% associated with.)
%
% When these commands modify the various page and line counters,
-% they deliberately do not say \cs{global}. This is because we
+% they deliberately do not say \protect\cs{global}. This is because we
% want them to affect only the counter values within the current
-% group when nested calls of \cs{@ref} occur. (The code assumes
-% throughout that the value of \cs{globaldefs} is zero.)
+% group when nested calls of \protect\cs{@ref} occur. (The code assumes
+% throughout that the value of \protect\cs{globaldefs} is zero.)
%
% The macros with \verb"action" in their names contain all the code
% that modifies the action-code list: again, this is so that they
-% can be turned off easily for nested calls of \cs{@ref}.
+% can be turned off easily for nested calls of \protect\cs{@ref}.
%
% \begin{macro}{\line@list@version}
-% The \cs{line@list@version} check if the line-list file does not refers to the older commands of \macpackage.
+% The \protect\cs{line@list@version} check if the line-list file does not refers to the older commands of \macpackage.
% In this case, we stop reading the line-list file.
-% Consequently, \cs{line@list@version} must be the first line of a line-number file.
+% Consequently, \protect\cs{line@list@version} must be the first line of a line-number file.
% \begin{macrocode}
\newcommand{\line@list@version}[1]{%
\IfStrEq{#1}{\this@line@list@version}%
@@ -5066,36 +5032,36 @@
% \end{macro}
% \begin{macro}{\@nl}
% \begin{macro}{\@nl@reg}
-% \changes{v1.12.0}{2014/08/05}{To ensure compatibility with \cs{musixtex}, \cs{@l} becomes \cs{@l}. Consequently, \cs{@l@reg} becomes \cs{@nl@reg}.}
-% \cs{@nl} does everything related to the start of a
+% \changes{v1.12.0}{2014/08/05}{To ensure compatibility with \protect\cs{musixtex}, \protect\cs{@l} becomes \protect\cs{@l}. Consequently, \protect\cs{@l@reg} becomes \protect\cs{@nl@reg}.}
+% \protect\cs{@nl} does everything related to the start of a
% new line of numbered text.
%
-% In order to get the \cs{setlinenum} to work Peter Wilson had to slip in some new
+% In order to get the \protect\cs{setlinenum} to work Peter Wilson had to slip in some new
% code at the start of the macro, to get the timing of the actions
% correct. The problem was that his original naive implementation
-% of \cs{setlinenum} had a unfortunate tendency to change the
+% of \protect\cs{setlinenum} had a unfortunate tendency to change the
% number of the last line of the \emph{preceding} paragraph.
% The new code is sort of based on the page number handling and
-% \cs{setline}.
+% \protect\cs{setline}.
% It seems
% that a lot of fiddling with the line number internals is required.
%
% In November 2004 in order to accurately determine page numbers Peter Wilson added
% these to the macro. It is now: \\
-% \cs{@nl}\marg{page counter number}\marg{printed page number} \\
-% We do not (yet) use the printed number (i.e., the \cs{thepage}) but
-% it may come in handy later. The macro \cs{fix@page} checks if a new
+% \protect\cs{@nl}\marg{page counter number}\marg{printed page number} \\
+% We do not (yet) use the printed number (i.e., the \protect\cs{thepage}) but
+% it may come in handy later. The macro \protect\cs{fix@page} checks if a new
% page has started.
%
-% Exactly what \cs{@nl} does depends
-% on whether right text is being processed. That's why many code is defined in \cs{@nl@reg} or \cs{nl@regR}.
+% Exactly what \protect\cs{@nl} does depends
+% on whether right text is being processed. That's why many code is defined in \protect\cs{@nl@reg} or \protect\cs{nl@regR}.
%
%
-% \changes{v0.3.0}{2004/02/14}{Added a bunch of code to \cs{@nl} for handling
-% \cs{setlinenum}}
-% \changes{v0.6.0}{2004/11/16}{Extended \cs{@nl} to include the page number}
-% \changes{v0.6.0}{2004/11/16}{Added \cs{fix@page} to \cs{@nl}}
-% \changes{v0.7.0}{2005/02/22}{Added \cs{@nl@reg}}
+% \changes{v0.3.0}{2004/02/14}{Added a bunch of code to \protect\cs{@nl} for handling
+% \protect\cs{setlinenum}}
+% \changes{v0.6.0}{2004/11/16}{Extended \protect\cs{@nl} to include the page number}
+% \changes{v0.6.0}{2004/11/16}{Added \protect\cs{fix@page} to \protect\cs{@nl}}
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{@nl@reg}}
% \begin{macrocode}
\newcommand*{\@nl}[2]{%
@@ -5171,9 +5137,9 @@
%
% \begin{macro}{\last@page@num}
% \begin{macro}{\fix@page}
-% \cs{fix@page} basically replaces \cs{@page}. It determines whether or not
-% a new page has been started, based on the page values held by \cs{@nl}.
-% \changes{v0.6.0}{2004/11/16}{Added \cs{last@page@num} and \cs{fix@page}}
+% \protect\cs{fix@page} basically replaces \protect\cs{@page}. It determines whether or not
+% a new page has been started, based on the page values held by \protect\cs{@nl}.
+% \changes{v0.6.0}{2004/11/16}{Added \protect\cs{last@page@num} and \protect\cs{fix@page}}
% \begin{macrocode}
\newcount\last@page@num
\last@page@num=-10000
@@ -5213,8 +5179,8 @@
% auxiliary file(s) if the \parpackage package has been used. They
% 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 \cs{@pend},\cs{@pendR}, \cs{@lopL} and
-% \cs{@lopR} in anticipation of parallel processing}
+% \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}
% \begin{macrocode}
\newcommand*{\@pend}[1]{}
\newcommand*{\@pendR}[1]{}
@@ -5229,10 +5195,10 @@
%
% \begin{macro}{\sub@on}
% \begin{macro}{\sub@off}
-% The \cs{sub@on} and \cs{sub@off} macros
+% The \protect\cs{sub@on} and \protect\cs{sub@off} macros
% turn sub-lineation on and off\/: but not directly, since such changes
% do not really take effect until the next line of text. Instead
-% they set a flag that notifies \cs{@nl} of the necessary action.
+% they set a flag that notifies \protect\cs{@nl} of the necessary action.
% \begin{macrocode}
\newcommand*{\sub@on}{\ifsublines@
\let\sub@change=\relax
@@ -5250,9 +5216,9 @@
% \end{macro}
%
% \begin{macro}{\@adv}
-% The \cs{@adv}\marg{num} macro advances
+% The \protect\cs{@adv}\marg{num} macro advances
% the current visible line number by the amount specified as
-% its argument. This is used to implement \cs{advanceline}.
+% its argument. This is used to implement \protect\cs{advanceline}.
% \begin{macrocode}
\newcommand*{\@adv}[1]{%
@@ -5291,9 +5257,9 @@
% \end{macro}
%
% \begin{macro}{\@set}
-% The \cs{@set}\marg{num} macro sets
+% The \protect\cs{@set}\marg{num} macro sets
% the current visible line number to the value specified as
-% its argument. This is used to implement \cs{setline}.
+% its argument. This is used to implement \protect\cs{setline}.
% \begin{macrocode}
\newcommand*{\@set}[1]{%
@@ -5318,12 +5284,12 @@
%
% \begin{macro}{\l@d@set}
% \begin{macro}{\l@dchset@num}
-% The \cs{l@d@set}\marg{num} macro sets
-% the line number for the next \cs{pstart} to the value specified as
-% its argument. This is used to implement \cs{setlinenum}.
+% The \protect\cs{l@d@set}\marg{num} macro sets
+% the line number for the next \protect\cs{pstart} to the value specified as
+% its argument. This is used to implement \protect\cs{setlinenum}.
%
-% \cs{l@dchset@num} is a flag to the \cs{@nl}? macro. If it is not
-% \cs{relax} then a linenumber change is to be done.
+% \protect\cs{l@dchset@num} is a flag to the \protect\cs{@nl}? macro. If it is not
+% \protect\cs{relax} then a linenumber change is to be done.
% \begin{macrocode}
\newcommand*{\l@d@set}[1]{%
@@ -5344,7 +5310,7 @@
%
% \begin{macro}{\page@action}
-% \cs{page@action}
+% \protect\cs{page@action}
% adds an entry to the action-code list to change the page number.
% \begin{macrocode}
@@ -5360,7 +5326,7 @@
% \end{macro}
%
% \begin{macro}{\set@line@action}
-% \cs{set@line@action} adds an entry to the action-code
+% \protect\cs{set@line@action} adds an entry to the action-code
% list to change the visible line number.
% \begin{macrocode}
@@ -5388,9 +5354,9 @@
% \end{macro}
%
% \begin{macro}{\sub@action}
-% \cs{sub@action}
+% \protect\cs{sub@action}
% adds an entry to the action-code list to turn sub-lineation on or
-% off, according to the current value of the \cs{ifsublines@} flag.
+% off, according to the current value of the \protect\cs{ifsublines@} flag.
% \begin{macrocode}
\newcommand*{\sub@action}{%
@@ -5415,7 +5381,7 @@
% \begin{macro}{\lock@on}
% \begin{macro}{\do@lockon}
% \begin{macro}{\do@lockonL}
-% \cs{lock@on}
+% \protect\cs{lock@on}
% adds an entry to the action-code list to turn line number
% locking on. The current setting of the sub-lineation flag tells us
% whether this applies to line numbers or sub-line numbers.
@@ -5471,7 +5437,7 @@
% \begin{macro}{\do@lockoff}
% \begin{macro}{\do@lockoffL}
% \begin{macro}{\skip@lockoff}
-% \cs{lock@off} adds an entry to the action-code list
+% \protect\cs{lock@off} adds an entry to the action-code list
% to turn line number locking off.
% \begin{macrocode}
\newcommand*{\do@lockoffL}{%
@@ -5508,11 +5474,11 @@
% \end{macro}
%
% \begin{macro}{\n@num}
-% These macros implement the \cs{skipnumbering} command.
+% These macros implement the \protect\cs{skipnumbering} command.
% They use action code 1007.
-% \changes{v0.7.0}{2005/02/22}{Added \cs{n@num}}
-% \changes{v1.21.0}{2015/04/13}{\cs{n@num} defined only one time for both \Eledmac{} and \Eledpar{}}
-% \changes{v1.21.0}{2015/04/13}{\cs{n@num@ref} deleted}
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{n@num}}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{n@num} defined only one time for both \Eledmac{} and \Eledpar{}}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{n@num@ref} deleted}
% \begin{macrocode}
\newcommand*{\n@num}{%
\ifledRcol%
@@ -5527,7 +5493,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\n@num@stanza}
-% This macro implements the \cs{skipnumbering} for stanza command.
+% This macro implements the \protect\cs{skipnumbering} for stanza command.
% It uses action code 1008.
% \begin{macrocode}
\newcommand*{\n@num@stanza}{%
@@ -5543,7 +5509,7 @@
% \end{macro}
% \begin{macro}{\ifl@dhidenumber}
% \begin{macro}{\hidenumbering}
-% \cs{hidenumbering} hides number in margin.
+% \protect\cs{hidenumbering} hides number in margin.
% It uses action code 1009.
% \begin{macro}{\h@num}
% \begin{macrocode}
@@ -5570,28 +5536,28 @@
% \end{macro}
% \begin{macro}{\@ref}
% \begin{macro}{\insert@count}
-% \cs{@ref}
+% \protect\cs{@ref}
% marks the start of a passage, for creation of a footnote reference.
% It takes two arguments:
% \begin{itemize}
-% \item \verb"#1", the number of entries to add to \cs{insertlines@list}
+% \item \verb"#1", the number of entries to add to \protect\cs{insertlines@list}
% for this reference. \SpecialMainIndex{\insert@count}
-% This value, here and within \cs{edtext},
+% This value, here and within \protect\cs{edtext},
% which computes it and writes it to the line-list file,
-% will be stored in the count \cs{insert@count}.
+% will be stored in the count \protect\cs{insert@count}.
% \begin{macrocode}
\newcount\insert@count
% \end{macrocode}
%
% \item \verb"#2", a sequence of other line-list-file commands, executed to
% determine the ending line-number. (This may also include other
-% \cs{@ref} commands, corresponding to uses of \cs{edtext}
-% within the first argument of another instance of \cs{edtext}.)
+% \protect\cs{@ref} commands, corresponding to uses of \protect\cs{edtext}
+% within the first argument of another instance of \protect\cs{edtext}.)
% \end{itemize}
%
% \begin{macro}{\dummy@ref}
-% When nesting of \cs{@ref} commands does occur, it is necessary to
-% temporarily redefine \cs{@ref} within \cs{@ref}, so that we are only
+% When nesting of \protect\cs{@ref} commands does occur, it is necessary to
+% temporarily redefine \protect\cs{@ref} within \protect\cs{@ref}, so that we are only
% doing one of these at a time.
% \begin{macrocode}
\newcommand*{\dummy@ref}[2]{#2}
@@ -5599,10 +5565,10 @@
% \end{macro}
%
% \begin{macro}{\@ref@reg}
-% The first thing \cs{@ref} (i.e. \cs{@ref@reg}) itself does is to add
+% The first thing \protect\cs{@ref} (i.e. \protect\cs{@ref@reg}) itself does is to add
% the specified number
-% of items to the \cs{insertlines@list} list.
-% \changes{v0.7.0}{2005/02/22}{Added \cs{@ref@reg}}
+% of items to the \protect\cs{insertlines@list} list.
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{@ref@reg}}
% \begin{macrocode}
\newcommand*{\@ref}[2]{%
\ifledRcol%
@@ -5622,8 +5588,8 @@
%
% Next, process the second argument to determine the page
% and line numbers for the end of this lemma.
-% We temporarily equate \cs{@ref} to a different macro that just executes
-% its argument, so that nested \cs{@ref} commands are just skipped
+% We temporarily equate \protect\cs{@ref} to a different macro that just executes
+% its argument, so that nested \protect\cs{@ref} commands are just skipped
% this time. Some other macros need to be temporarily redefined to
% suppress their action.
% \begin{macrocode}
@@ -5644,7 +5610,7 @@
% \end{macrocode}
%
% Now store all the information about the location of the lemma's
-% start and end in \cs{line@list}.
+% start and end in \protect\cs{line@list}.
% \begin{macrocode}
\xright@appenditem%
{\the\page@num|\the\line@num|%
@@ -5652,7 +5618,7 @@
\the\endpage@num|\the\endline@num|%
\ifsublines@ \the\endsubline@num \else 0\fi}\to\line@list
% \end{macrocode}
-% Create a list which stores every second argument of each \cs{@sw}
+% Create a list which stores every second argument of each \protect\cs{@sw}
% in this lemma, at this level.
% Also set the boolean about the use of lemma in this edtext level to false.
% \begin{macrocode}
@@ -5660,13 +5626,13 @@
\providebool{lemmacommand@\the\@edtext@level}%
\boolfalse{lemmacommand@\the\@edtext@level}%
% \end{macrocode}
-% Execute the second argument of \cs{@ref} again,
+% Execute the second argument of \protect\cs{@ref} again,
% to perform for real all the commands within it.
% \begin{macrocode}
#2%
% \end{macrocode}
-% Now, we store the list of \cs{@sw} of this current \cs{edtext} as an element of
-% the global list of list of \cs{@sw} for a \cs{edtext} depth.
+% Now, we store the list of \protect\cs{@sw} of this current \protect\cs{edtext} as an element of
+% the global list of list of \protect\cs{@sw} for a \protect\cs{edtext} depth.
% \begin{macrocode}
\ifnum\@edtext@level>0%
\def\create@this@edtext@level{\expandafter\list@create\expandafter{\csname sw@list@edtext@\the\@edtext@level\endcsname}}%
@@ -5697,7 +5663,7 @@
% section to write commands out to the line-list.
%
% \begin{macro}{\linenum@out}
-% The file will be opened on output stream \cs{linenum@out}.
+% The file will be opened on output stream \protect\cs{linenum@out}.
% \begin{macrocode}
\newwrite\linenum@out
% \end{macrocode}
@@ -5717,11 +5683,11 @@
% the asynchronous nature of output routines makes the
% status hard to determine by other means.
%
-% We can manage pretty well by means of the \cs{iffirst@linenum@out@}
+% We can manage pretty well by means of the \protect\cs{iffirst@linenum@out@}
% flag; its inelegant name suggests the nature of the problem that
% made its creation necessary. It is set
-% to be \verb"true" before any \cs{linenum@out} file is opened. When such a file
-% is opened for the first time, it is done using \cs{immediate}, so that
+% to be \verb"true" before any \protect\cs{linenum@out} file is opened. When such a file
+% is opened for the first time, it is done using \protect\cs{immediate}, so that
% it will at once be safe for the output routine to write to it; we then
% set this flag to \verb"false".
% \begin{macrocode}
@@ -5735,7 +5701,7 @@
% \begin{macro}{\this@line@list@version}
% The commands allowed in the line-list file and their arguments
% can change between two version of \macpackage.
-% The \cs{this@line@list@version} command is upgraded when it happens.
+% The \protect\cs{this@line@list@version} command is upgraded when it happens.
% It is written in the file list.
% If we process a line-list file which used a older version, that means the commands used inside are deprecated, and we can't use them.
% \begin{macrocode}
@@ -5743,8 +5709,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\line@list@stuff}
-% The \cs{line@list@stuff}\marg{file} macro, which
-% is called by \cs{beginnumbering}, performs
+% The \protect\cs{line@list@stuff}\marg{file} macro, which
+% is called by \protect\cs{beginnumbering}, performs
% all the line-list operations needed at the start of a section.
% Its argument is the name of the line-list file.
% \begin{macrocode}
@@ -5759,10 +5725,10 @@
%
% Now close the current output line-list file, if any, and open a new one.
% The first time we open a line-list file for output, we do it using
-% \cs{immediate}, and clear the \cs{iffirst@linenum@out@} flag.
+% \protect\cs{immediate}, and clear the \protect\cs{iffirst@linenum@out@} flag.
% \changes{v0.2.2}{2003/11/09}{Added initial write of page number in
-% \cs{line@list@stuff}}
-% \changes{v0.7.0}{2005/02/25}{Deleted \cs{page@start} from \cs{line@list@stuff}}
+% \protect\cs{line@list@stuff}}
+% \changes{v0.7.0}{2005/02/25}{Deleted \protect\cs{page@start} from \protect\cs{line@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.}
% \begin{macrocode}
\iffirst@linenum@out@
@@ -5787,9 +5753,9 @@
% \end{macro}
%
% \begin{macro}{\new@line}
-% The \cs{new@line} macro sends the \cs{@nl} command to the line-list
+% The \protect\cs{new@line} macro sends the \protect\cs{@nl} command to the line-list
% file, to mark the start of a new text line, and its page number.
-% \changes{v0.6.0}{2004/11/16}{Extended \cs{new@line} to output page numbers}
+% \changes{v0.6.0}{2004/11/16}{Extended \protect\cs{new@line} to output page numbers}
% \begin{macrocode}
\newcommand*{\new@line}{%
\IfStrEq{\led@pb@setting}{after}%
@@ -5820,17 +5786,17 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\if@noneed@Footnote}
-% \cs{if@noneed@Footnote} is a boolean to check if we have to print a error message when a \cs{edtext} is called without any critical notes.
+% \protect\cs{if@noneed@Footnote} is a boolean to check if we have to print a error message when a \protect\cs{edtext} is called without any critical notes.
%
% \begin{macro}{\flag@start}
% \begin{macro}{\flag@end}
-% \changes{v1.12.3}{2014/08/15}{\cs{flag@start} and \cs{flag@end} are now defined only one time for eledmac and eledpar}
-% \changes{v1.12.3}{2014/08/15}{\cs{flag@start} send a error message when a \cs{edtext} is done without insert (note)}
-% \changes{v1.12.8}{2014/09/12}{\cs{flag@start} do not send a error message when a \cs{edtext} is done without insert (note) but have a endnote}
-% We enclose a lemma marked by \cs{edtext} in
-% \cs{flag@start} and \cs{flag@end}: these send the \cs{@ref}
-% command to the line-list file. \cs{edtext} is responsible for
-% setting the value of \cs{insert@count} appropriately; it
+% \changes{v1.12.3}{2014/08/15}{\protect\cs{flag@start} and \protect\cs{flag@end} are now defined only one time for eledmac and eledpar}
+% \changes{v1.12.3}{2014/08/15}{\protect\cs{flag@start} send a error message when a \protect\cs{edtext} is done without insert (note)}
+% \changes{v1.12.8}{2014/09/12}{\protect\cs{flag@start} do not send a error message when a \protect\cs{edtext} is done without insert (note) but have a endnote}
+% We enclose a lemma marked by \protect\cs{edtext} in
+% \protect\cs{flag@start} and \protect\cs{flag@end}: these send the \protect\cs{@ref}
+% command to the line-list file. \protect\cs{edtext} is responsible for
+% setting the value of \protect\cs{insert@count} appropriately; it
% actually gets done by the various footnote macros.
% \begin{macrocode}
\newif\if@noneed@Footnote%
@@ -5864,7 +5830,7 @@
% \begin{macro}{\startsub}
% \begin{macro}{\endsub}
% \changes{v1.15.0}{2015/01/12}{Restore subline feature (disabled by mistake in v1.8.0).}
-% \cs{startsub} and \cs{endsub}
+% \protect\cs{startsub} and \protect\cs{endsub}
% turn sub-lineation on and off, by writing
% appropriate instructions to the line-list file. When
% sub-lineation is in effect, the line number counter is frozen and
@@ -5874,7 +5840,7 @@
% sub-line depending on what it started out as, even if that
% changes in the middle.
%
-% We tinker with \cs{lastskip} because a command of either sort
+% We tinker with \protect\cs{lastskip} because a command of either sort
% really needs to be attached to the last word preceding the change, not
% the first word that follows the change. This is because sub-lineation
% will often turn on and off in mid-line---stage directions, for example,
@@ -5903,7 +5869,7 @@
% \end{macro}
%
% \begin{macro}{\advanceline}
-% You can use \cs{advanceline}\marg{num}
+% You can use \protect\cs{advanceline}\marg{num}
% in running text to advance the current visible
% line-number by a specified value, positive or negative.
% \begin{macrocode}
@@ -5916,8 +5882,8 @@
% \end{macro}
%
% \begin{macro}{\setline}
-% You can use \cs{setline}\marg{num}
-% in running text (i.e., within \cs{pstart}...\cs{pend}) to set the
+% You can use \protect\cs{setline}\marg{num}
+% in running text (i.e., within \protect\cs{pstart}...\protect\cs{pend}) to set the
% current visible
% line-number to a specified positive value.
% \begin{macrocode}
@@ -5935,9 +5901,9 @@
% \end{macro}
%
% \begin{macro}{\setlinenum}
-% You can use \cs{setlinenum}\marg{num}
-% before a \cs{pstart} to set the visible line-number to a specified
-% positive value. It writes a \cs{l@d@set} command to the line-list file.
+% You can use \protect\cs{setlinenum}\marg{num}
+% before a \protect\cs{pstart} to set the visible line-number to a specified
+% positive value. It writes a \protect\cs{l@d@set} command to the line-list file.
% \begin{macrocode}
\newcommand*{\setlinenum}[1]{%
@@ -5953,7 +5919,7 @@
%
% \begin{macro}{\startlock}
% \begin{macro}{\endlock}
-% You can use \cs{startlock} or \cs{endlock}
+% You can use \protect\cs{startlock} or \protect\cs{endlock}
% in running text to start or end line number locking at
% the current line. They decide whether line numbers or sub-line numbers
% are affected, depending on the current state of the sub-lineation flags.
@@ -5976,12 +5942,12 @@
% \begin{macro}{\l@dskipnumbertrue}
% \begin{macro}{\l@dskipnumberfalse}
% \begin{macro}{\skipnumbering}
-% In numbered text \cs{skipnumbering} will suspend the numbering
+% In numbered text \protect\cs{skipnumbering} will suspend the numbering
% for that particular line.
-% \changes{v0.7.0}{2005/02/22}{Added \cs{skipnumbering} and supports}
-% \changes{v1.21.0}{2015/04/13}{\cs{skipnumbering} defined only one time for both \Eledmac{} and \Eledpar{}.}
-% \changes{v1.21.0}{2015/04/13}{Correct \cs{skipnumbering} for stanza.}
-% \changes{v1.21.0}{2015/04/13}{Delete \cs{skipnumbering@reg}.}
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{skipnumbering} and supports}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{skipnumbering} defined only one time for both \Eledmac{} and \Eledpar{}.}
+% \changes{v1.21.0}{2015/04/13}{Correct \protect\cs{skipnumbering} for stanza.}
+% \changes{v1.21.0}{2015/04/13}{Delete \protect\cs{skipnumbering@reg}.}
% \begin{macrocode}
\newif\ifl@dskipnumber
\newif\ifl@dskipversenumber%
@@ -6014,14 +5980,14 @@
% \section{Marking text for notes}
% \label{text}\relax
%
-% The \cs{edtext} macro is used to create all
+% The \protect\cs{edtext} macro is used to create all
% footnotes and endnotes,
% as well as to print the portion of the main text to which a given note
% or notes is keyed. The idea is to have that lemma appear only once in
% the \file{.tex} file: all instances of it in the main text and in the
% notes are copied from that one appearance.
%
-% The \cs{edtext} macro takes two arguments.
+% The \protect\cs{edtext} macro takes two arguments.
% \begin{verbatim}
% \edtext{#1}{#2}
% \end{verbatim}
@@ -6035,8 +6001,8 @@
% various kinds of notes.
% \end{itemize}
%
-% The \cs{edtext} macro may be used (somewhat) recursively; that
-% is, \cs{edtext} may be used within its own first argument. The
+% The \protect\cs{edtext} macro may be used (somewhat) recursively; that
+% is, \protect\cs{edtext} may be used within its own first argument. The
% code would be much simpler without this feature, but nested notes
% will commonly be necessary: it is quite likely that we will have an
% explanatory note for a long passage and notes on variants for
@@ -6044,29 +6010,29 @@
% handle is overlapping notes that are not nested: for example, one
% note covering lines 10--15, and another covering 12--18.
% You can
-% handle such cases by using the \cs{lemma} and \cs{linenum}
+% handle such cases by using the \protect\cs{lemma} and \protect\cs{linenum}
% macros within \verb"#2": they alter the copy of the lemma and the
% line numbers that are passed to the notes, and hence allow you to
% overcome any limitations of this system, albeit with extra
% effort.
%
-% The recursive operation of \cs{edtext} will fail if you try to use a copy
-% that is called something other than \cs{edtext}. In order to handle
-% recursion, \cs{edtext} needs to redefine its own definition temporarily
+% The recursive operation of \protect\cs{edtext} will fail if you try to use a copy
+% that is called something other than \protect\cs{edtext}. In order to handle
+% recursion, \protect\cs{edtext} needs to redefine its own definition temporarily
% at one point, and that does not work if the macro you are calling is
-% not actually named \cs{edtext}. There is no problem as long as \cs{edtext}
-% is not invoked in the first argument. If you want to call \cs{edtext}
+% not actually named \protect\cs{edtext}. There is no problem as long as \protect\cs{edtext}
+% is not invoked in the first argument. If you want to call \protect\cs{edtext}
% something else, it is best to create instead a macro that expands
-% to an invocation of \cs{edtext}, rather than copying \cs{edtext} and giving
+% to an invocation of \protect\cs{edtext}, rather than copying \protect\cs{edtext} and giving
% it a new name; otherwise you will need to add an appropriate
-% definition for your new macro to \cs{morenoexpands}.
+% definition for your new macro to \protect\cs{morenoexpands}.
%
% 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
-% \cs{do@line}, \reff{doline}).
+% \protect\cs{do@line}, \reff{doline}).
% Instead, the appropriate note-generating command
-% is appended to the list macro \cs{inserts@list}, and when \cs{pend}
+% is appended to the list macro \protect\cs{inserts@list}, and when \protect\cs{pend}
% completes the paragraph it inserts all the notes at the proper places.
%
%
@@ -6074,12 +6040,12 @@
% often wanted; your own macros must handle that. We ca not do it
% correctly without keeping track of what kind of notes have gone past:
% it is not just a matter of remembering the line numbers associated with
-% the previous invocation of \cs{edtext}, because that might have been for
+% the previous invocation of \protect\cs{edtext}, because that might have been for
% a different kind of note. It is preferable for your footnote macros
% to store and recall this kind of information if they need it.
%
%
-% \subsection{\cs{edtext}
+% \subsection{\protect\cs{edtext}
% itself}
%
% The various note-generating macros might want to request that
@@ -6097,21 +6063,21 @@
% to which macros may add commands that should subsequently
% be executed at the end of the lemma when that lemma is added
% to the text of the paragraph. A macro should add its contribution to
-% \cs{end@lemmas} by using \cs{xleft@appenditem}.
+% \protect\cs{end@lemmas} by using \protect\cs{xleft@appenditem}.
% (Anything that needs to be done at
-% the \emph{start} of the lemma may be handled using \cs{aftergroup}, since
-% the commands specified within \cs{edtext}'s second argument are
+% the \emph{start} of the lemma may be handled using \protect\cs{aftergroup}, since
+% the commands specified within \protect\cs{edtext}'s second argument are
% executed within a group that ends just before the lemma is added to
% the main text.)
%
-% \cs{end@lemmas} is intended for the few things that need to be
+% \protect\cs{end@lemmas} is intended for the few things that need to be
% associated with the end of the lemma, like footnote numbers. Such
% numbers are not implemented in the current version, and indeed
-% no use is currently made of \cs{end@lemmas} or of the \cs{aftergroup}
+% no use is currently made of \protect\cs{end@lemmas} or of the \protect\cs{aftergroup}
% trick. The general
% approach would be to define a macro to be used within the second
-% argument of \cs{edtext} that would add the appropriate command to
-% \cs{end@lemmas}.
+% argument of \protect\cs{edtext} that would add the appropriate command to
+% \protect\cs{end@lemmas}.
%
% Commands that are added to this list should always take care
% not to do anything that adds possible line-breaks to the output;
@@ -6123,10 +6089,10 @@
%
% \begin{macro}{\dummy@edtext}
% We now need to define a number of macros that allow us to weed out
-% nested instances of \cs{edtext}, and other problematic macros, from
+% nested instances of \protect\cs{edtext}, and other problematic macros, from
% our lemma. This is similar to what we did in reading the line-list
-% file using \cs{dummy@ref} and various redefinitions---and that is
-% because nested \cs{edtext}s macros create nested \cs{@ref} entries
+% file using \protect\cs{dummy@ref} and various redefinitions---and that is
+% because nested \protect\cs{edtext}s macros create nested \protect\cs{@ref} entries
% in the line-list file.
%
%
@@ -6136,14 +6102,14 @@
%
% \end{macro}
% \begin{macro}{\dummy@edtext@showlemma}
-% Some time, we want to obtain only the first argument of \cs{edtext}, while also wrapping it in \cs{showlemma}. For example, when printing a \cs{eledsection}.
+% Some time, we want to obtain only the first argument of \protect\cs{edtext}, while also wrapping it in \protect\cs{showlemma}. For example, when printing a \protect\cs{eledsection}.
% \begin{macrocode}
\newcommand{\dummy@edtext@showlemma}[2]{\showlemma{#1}}%
% \end{macrocode}
% \end{macro}
%
% We are going to need another macro that takes one argument and ignores
-% it entirely. This is supplied by the \LaTeX\ \cs{@gobble}\marg{arg}.
+% it entirely. This is supplied by the \LaTeX\ \protect\cs{@gobble}\marg{arg}.
%
% \begin{macro}{\no@expands}
% \begin{macro}{\morenoexpands}
@@ -6161,7 +6127,7 @@
% effect.
%
% A second sort to turn off includes a few of the accent macros.
-% Most are not a problem: an accent that is expanded to an \cs{accent}
+% Most are not a problem: an accent that is expanded to an \protect\cs{accent}
% command may be harder to read but it works just the same. The
% ones that cause problems are: those that use alignments---\TeX\
% seems to get confused about the difference between alignment
@@ -6169,30 +6135,30 @@
% sequences; and those that look carefully at what the current font
% is.
%
-% (The \cs{copyright} macro defined in \PlainTeX\ has this sort of
+% (The \protect\cs{copyright} macro defined in \PlainTeX\ has this sort of
% problem as well, but is not used enough to bother with. That macro,
% and any other that causes trouble, will get by all right if you put
-% a \cs{protect} in front of it in your file.)
+% a \protect\cs{protect} in front of it in your file.)
%
-% We also need to eliminate all \macpackage macros like \cs{edlabel} and
-% \cs{setline} that write things to auxiliary files: that writing
+% 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
-% \cs{edtext} itself, if it appears within its own
+% \protect\cs{edtext} itself, if it appears within its own
% argument, do nothing but copy its first argument.
%
-% Finally, we execute \cs{morenoexpands}. The version of
-% \cs{morenoexpands} defined here does nothing; but you may define
+% Finally, we execute \protect\cs{morenoexpands}. The version of
+% \protect\cs{morenoexpands} defined here does nothing; but you may define
% 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
-% \cs{morenoexpands}, you must be very careful about spaces: if the
+% \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 \cs{edtext} is used.
+% will appear in the main text when \protect\cs{edtext} is used.
%
% (A related problem, not addressed by these two macros,
% is that of characters whose category code is changed by any
-% the macros used in the arguments to \cs{edtext}. Since the
+% the macros used in the arguments to \protect\cs{edtext}. Since the
% category codes are set when the arguments are scanned, macros
% that depend on changing them will not work. We have most often
% encountered this with characters that are made `active' within
@@ -6201,8 +6167,8 @@
% is to ensure that those characters are \emph{always} active; within
% languages that make no special use of them, their associated
% control sequences should simply return the proper character. A simpler solution is to avoid active character, using \LuaTeX\ or \XeLaTeX.)
-% \changes{v0.2.0}{2003/07/25}{Added \cs{l@dtabnoexpands} to \cs{no@expands}}
-% \changes{v0.2.1}{203/08/25}{Removed some \cs{let}s from \cs{no@expands}.
+% \changes{v0.2.0}{2003/07/25}{Added \protect\cs{l@dtabnoexpands} to \protect\cs{no@expands}}
+% \changes{v0.2.1}{203/08/25}{Removed some \protect\cs{let}s from \protect\cs{no@expands}.
% These were in \edmac{} but Peter Wilson feels that they should not have been as they
% disabled page/line refs in a footnotes}
% \changes{v1.0.0}{2012/09/15}{Change to be compatible with new features}
@@ -6224,49 +6190,49 @@
% \end{macro}
%
% \begin{macro}{\@tag}
-% Now, we define an empty \cs{@tag} command. It will be redefine by \cs{edtext}: its value is the first argument. It will be used by the \cs{Xfootnote} commands.
+% Now, we define an empty \protect\cs{@tag} command. It will be redefine by \protect\cs{edtext}: its value is the first argument. It will be used by the \protect\cs{Xfootnote} commands.
% \begin{macrocode}
\newcommand{\@tag}{}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@edtext@level}
-% \changes{v1.15.0}{2015/01/12}{New boolean \cs{if@edtext@}.}
-% \changes{v1.23.0}{2015/05/18}{The boolean \cs{if@edtext@} becomes the counter \cs{edtext@level}.}
-% This counter is increased by 1 at each level of \cs{edtext}.
+% \changes{v1.15.0}{2015/01/12}{New boolean \protect\cs{if@edtext@}.}
+% \changes{v1.23.0}{2015/05/18}{The boolean \protect\cs{if@edtext@} becomes the counter \protect\cs{edtext@level}.}
+% This counter is increased by 1 at each level of \protect\cs{edtext}.
% That is useful for some commands which can have a different behavior if called inside or outside of the \marg{lemma} argument.
% \begin{macrocode}
\newcount\@edtext@level%
\@edtext@level=0%
% \end{macrocode}
% \end{macro}
-% \changes{v1.16.0}{2014/01/23}{\cs{edtext} is now defined only in \eledmac, not in \eledpar. Debug wrong numbering when using \cs{sameword} + \Lpack{eledpar} + \cs{tag} command.}
+% \changes{v1.16.0}{2014/01/23}{\protect\cs{edtext} is now defined only in \eledmac, not in \eledpar. Debug wrong numbering when using \protect\cs{sameword} + \protect\package{eledpar} + \protect\cs{tag} command.}
%
%
% \begin{macro}{\edtext}
-% \changes{v0.4.0}{2004/02/29}{Added \cs{showlemma} to \cs{edtext}}
-% \changes{v1.4.0}{2012/11/16}{Compatibility of \cs{edtext} with the right-to-left direction (with Polyglossia).}
-% \changes{v1.17.0}{2015/02/09}{Error message when calling \cs{edtext} outside of a numbered paragraph.}
-% When executed, \cs{edtext} first ensures that we are in
+% \changes{v0.4.0}{2004/02/29}{Added \protect\cs{showlemma} to \protect\cs{edtext}}
+% \changes{v1.4.0}{2012/11/16}{Compatibility of \protect\cs{edtext} with the right-to-left direction (with Polyglossia).}
+% \changes{v1.17.0}{2015/02/09}{Error message when calling \protect\cs{edtext} outside of a numbered paragraph.}
+% When executed, \protect\cs{edtext} first ensures that we are in
% horizontal mode.
% \begin{macrocode}
\newcommand{\edtext}[2]{\leavevmode%
% \end{macrocode}
-% Then, check if we are in a numbered paragraph (\cs{pstart}\ldots\cs{pend})..
+% Then, check if we are in a numbered paragraph (\protect\cs{pstart}\ldots\protect\cs{pend})..
% \begin{macrocode}
\ifnumberedpar@%
% \end{macrocode}
-% We increase the \cs{@edtext@} counter to know in which level of \cs{edtext} we are.
+% We increase the \protect\cs{@edtext@} counter to know in which level of \protect\cs{edtext} we are.
% \begin{macrocode}
\global\advance\@edtext@level by 1%
% \end{macrocode}
-% By default, we do not use \cs{lemma}
+% By default, we do not use \protect\cs{lemma}
% \begin{macrocode}
\global\@lemmacommand@false%
% \end{macrocode}
% \begin{macrocode}
\begingroup%
% \end{macrocode}
-% We get the next series of samewords data in the list of samewords data for the current edtext level. We push them inside \cs{sw@inthisedtext}.
+% We get the next series of samewords data in the list of samewords data for the current edtext level. We push them inside \protect\cs{sw@inthisedtext}.
% \begin{macrocode}
\ifledRcol%
\ifcsundef{sw@list@edtextR@\the\@edtext@level}%
@@ -6286,13 +6252,13 @@
% \end{macrocode}
% \begin{macro}{\@tag}
% \label{@tag}Our normal lemma is just argument \verb"#1"; but that argument could have
-% further invocations of \cs{edtext} within it. We get a copy of the
-% lemma without any \cs{edtext} macros within it by temporarily redefining
-% \cs{edtext} to just copy its first argument and ignore the other,
-% and then expand \verb"#1" into \cs{@tag}, our lemma.
+% further invocations of \protect\cs{edtext} within it. We get a copy of the
+% lemma without any \protect\cs{edtext} macros within it by temporarily redefining
+% \protect\cs{edtext} to just copy its first argument and ignore the other,
+% and then expand \verb"#1" into \protect\cs{@tag}, our lemma.
%
% This is done within a group that starts here, in order to get the
-% original \cs{edtext} restored; within this group we have also turned
+% original \protect\cs{edtext} restored; within this group we have also turned
% off the expansion of those control sequences commonly found within text
% that can cause trouble for us.
%
@@ -6305,38 +6271,38 @@
% \begin{macro}{\l@d@nums}
% \phantomsection\label{nums}
% Prepare more data for the benefit of note-generating macros: the line
-% references and font specifier for this lemma go to \cs{l@d@nums}.
+% references and font specifier for this lemma go to \protect\cs{l@d@nums}.
% \begin{macrocode}
\set@line%
% \end{macrocode}
% \end{macro}
-% \cs{insert@count} will be altered by the note-generating macros:
+% \protect\cs{insert@count} will be altered by the note-generating macros:
% it counts the number of deferred footnotes or other insertions
-% generated by this instance of \cs{edtext}.
-% If we are in a right column (\parpackage), we use \cs{insert@countR}
-% instead of \cs{insert@count}.
+% generated by this instance of \protect\cs{edtext}.
+% If we are in a right column (\parpackage), we use \protect\cs{insert@countR}
+% instead of \protect\cs{insert@count}.
% \begin{macrocode}
\ifledRcol \global\insert@countR \z@%
\else \global\insert@count \z@ \fi%
% \end{macrocode}
% Now process the note-generating macros in argument \verb"#2"
-% (i.e., \cs{Afootnote}, \cs{lemma}, etc.). \cs{ignorespaces} is here to
+% (i.e., \protect\cs{Afootnote}, \protect\cs{lemma}, etc.). \protect\cs{ignorespaces} is here to
% skip over any spaces that might appear at the start of \verb"#2";
% otherwise they wind up in the main text. Footnote and other
% macros that are used within \verb"#2" should all end with
-% \cs{ignorespaces} as well, to skip any spaces between macros when
+% \protect\cs{ignorespaces} as well, to skip any spaces between macros when
% several are used in series.
% \begin{macrocode}
\ignorespaces #2\relax%
% \end{macrocode}
-% With \Lpack{polyglossia}, you must track whether the language reads left to right (English) or right to left (Arabic).
+% With \protect\package{polyglossia}, you must track whether the language reads left to right (English) or right to left (Arabic).
% \begin{macrocode}
\@ifundefined{xpg@main@language}{%if not polyglossia
\flag@start}%
{\if@RTL\flag@end\else\flag@start\fi%
}%
% \end{macrocode}
-% We write in the numbered file wether the current \cs{edtext} has a \cs{lemma} in the the second argument.
+% We write in the numbered file wether the current \protect\cs{edtext} has a \protect\cs{lemma} in the the second argument.
% \begin{macrocode}
\if@lemmacommand@%
\ifledRcol%
@@ -6353,7 +6319,7 @@
% chunk of text \emph{before} putting the text into the paragraph: notes
% that are referenced by line number should generally be tied to the
% start of the passage they gloss, not the end. That should all be done
-% within the expansion of \verb"#2" above, or in \cs{aftergroup}
+% within the expansion of \verb"#2" above, or in \protect\cs{aftergroup}
% commands within that expansion.
% \begin{macrocode}
\endgroup%
@@ -6379,9 +6345,9 @@
% \end{macrocode}
% We switch to false some flags.
% \begin{itemize}
-% \item The one that checks having footnotes inside a \cs{edtext}.
-% \item The one that says we are inside a \cs{edtext}. In fact, it is not a flag, but a counter which is increased to 1 in each leavel of \cs{edtext}.
-% \item The one that says we are inside à \cs{@lemma}.
+% \item The one that checks having footnotes inside a \protect\cs{edtext}.
+% \item The one that says we are inside a \protect\cs{edtext}. In fact, it is not a flag, but a counter which is increased to 1 in each leavel of \protect\cs{edtext}.
+% \item The one that says we are inside à \protect\cs{@lemma}.
% \end{itemize}
% \begin{macrocode}
\global\@noneed@Footnotefalse%
@@ -6408,24 +6374,24 @@
%
%
% \begin{macro}{\ifnumberline}
-% The \cs{ifnumberline} option can be set to FALSE to disable line numbering.
+% The \protect\cs{ifnumberline} option can be set to FALSE to disable line numbering.
% \begin{macrocode}
\newif\ifnumberline
\numberlinetrue
% \end{macrocode}
% \end{macro}
% \begin{macro}{\set@line}
-% The \cs{set@line} macro
-% is called by \cs{edtext} to put the line-reference field and
-% font specifier for the current block of text into \cs{l@d@nums}.
+% The \protect\cs{set@line} macro
+% is called by \protect\cs{edtext} to put the line-reference field and
+% font specifier for the current block of text into \protect\cs{l@d@nums}.
%
-% One instance of \cs{edtext} may generate several notes, or it
-% may generate none --- it is legitimate for argument \verb"#2" to \cs{edtext} to
-% be empty. But \cs{flag@start} and \cs{flag@end} induce the generation of
-% a single entry in \cs{line@list} during the next run, and it is vital
-% to also remove one and only one \cs{line@list} entry here.
+% One instance of \protect\cs{edtext} may generate several notes, or it
+% may generate none --- it is legitimate for argument \verb"#2" to \protect\cs{edtext} to
+% be empty. But \protect\cs{flag@start} and \protect\cs{flag@end} induce the generation of
+% a single entry in \protect\cs{line@list} during the next run, and it is vital
+% to also remove one and only one \protect\cs{line@list} entry here.
%
-% If no more lines are listed in \cs{line@list}, something is
+% If no more lines are listed in \protect\cs{line@list}, something is
% wrong --- probably just some change in the input. We set all the numbers
% to zeros, following an old publishing convention for numerical
% references that have not yet been resolved.
@@ -6455,7 +6421,7 @@
% \end{macro}
%
% \begin{macro}{\edfont@info}
-% The macro \cs{edfont@info} returns coded information about the
+% The macro \protect\cs{edfont@info} returns coded information about the
% current font.
%
% \begin{macrocode}
@@ -6467,10 +6433,10 @@
% \subsection{Substitute lemma}
%
% \begin{macro}{\lemma}
-% \changes{v1.23.0}{2015/05/18}{Fix spurious space after \cs{lemma} command}
-% The \cs{lemma}\marg{text} macro allows you to change the lemma
+% \changes{v1.23.0}{2015/05/18}{Fix spurious space after \protect\cs{lemma} command}
+% The \protect\cs{lemma}\marg{text} macro allows you to change the lemma
% that is passed on to the notes.
-% Read about \cs{@tag} in normal \cs{edtext} macro for more details about \cs{sw@list@inedtext} and \cs{no@expands} (\reff{@tag}).
+% Read about \protect\cs{@tag} in normal \protect\cs{edtext} macro for more details about \protect\cs{sw@list@inedtext} and \protect\cs{no@expands} (\reff{@tag}).
% \begin{macrocode}
\unless\ifnocritical@
\newcommand*{\lemma}[1]{%
@@ -6484,8 +6450,8 @@
% \end{macro}
%
% \begin{macro}{\@lemma}
-% The \cs{@lemma} is written in the numbered file to set which \cs{edtext} has an
-% \cs{lemma} as second argument.
+% The \protect\cs{@lemma} is written in the numbered file to set which \protect\cs{edtext} has an
+% \protect\cs{lemma} as second argument.
% \begin{macrocode}
\newcommand{\@lemma}{%
\booltrue{lemmacommand@\the\@edtext@level}%
@@ -6494,8 +6460,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\if@lemmacommand@}
-% \changes{v1.15.0}{2015/01/12}{New boolean \cs{iflemmacommand@}.}
-% This boolean is set to TRUE inside a \cs{edtext} (or \cs{critext}) when a \cs{lemma} command is called.
+% \changes{v1.15.0}{2015/01/12}{New boolean \protect\cs{iflemmacommand@}.}
+% This boolean is set to TRUE inside a \protect\cs{edtext} (or \protect\cs{critext}) when a \protect\cs{lemma} command is called.
% That is useful for some commands which can have a different behavior if the lemma in the note is different from the lemma in the main text.
% \begin{macrocode}
\newif\if@lemmacommand@%
@@ -6505,13 +6471,13 @@
%
% \begin{macro}{\linenum}
% \label{linenumdef}
-% The \cs{linenum} macro can change any or all of
+% The \protect\cs{linenum} macro can change any or all of
% the page and line numbers that are
% passed on to the notes.
%
-% As argument \cs{linenum} takes a set of seven parameters
+% As argument \protect\cs{linenum} takes a set of seven parameters
% separated by vertical bars, in the format used internally for
-% \cs{l@d@nums} (see \reff{linenumbers}): the starting page,
+% \protect\cs{l@d@nums} (see \reff{linenumbers}): the starting page,
% line, and sub-line numbers, followed by the ending page, line, and
% sub-line numbers, and then the font specifier for the lemma.
% However, you can omit any parameters you do not want to change, and
@@ -6529,11 +6495,11 @@
% \end{macrocode}
%
% \begin{macro}{\line@set}
-% \cs{linenum} calls \cs{line@set} to do the actual work; it
-% looks at the first number in the argument to \cs{linenum},
-% sets the corresponding value in \cs{l@d@nums}, and then calls
-% itself to process the next number in the \cs{linenum}
-% argument, if there are more numbers in \cs{l@d@nums} to process.
+% \protect\cs{linenum} calls \protect\cs{line@set} to do the actual work; it
+% looks at the first number in the argument to \protect\cs{linenum},
+% sets the corresponding value in \protect\cs{l@d@nums}, and then calls
+% itself to process the next number in the \protect\cs{linenum}
+% argument, if there are more numbers in \protect\cs{l@d@nums} to process.
% \begin{macrocode}
\def\line@set#1|#2\\#3|#4\\{%
\gdef\@tempb{#1}%
@@ -6550,8 +6516,8 @@
% \end{macro}
%
% \begin{macro}{\l@d@add}
-% \cs{line@set} uses \cs{l@d@add} to tack numbers or vertical bars
-% onto the right hand end of \cs{l@d@nums}.
+% \protect\cs{line@set} uses \protect\cs{l@d@add} to tack numbers or vertical bars
+% onto the right hand end of \protect\cs{l@d@nums}.
% \begin{macrocode}
\newcommand{\l@d@add}[1]{\xdef\l@d@nums{\l@d@nums#1}}
@@ -6560,19 +6526,19 @@
% \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 \cs{pstart} and a \cs{pend}, it does not know yet which are the line numbers.
+% 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.
%
% The general mechanism is the following:
% \begin{itemize}
-% \item \textbf{At the first run}, each \cs{sameword} command increments an \Lpack{etoolbox} counter the name of which contains the argument of the \cs{sameword} commands.
-% \item Then this counter, associated with the argument of \cs{sameword} is stored, with the \cs{@sw} command, in the auxiliary file of the current \Lpack{eledmac} section (the \verb+.1+, \verb+.2+… file).
+% \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 \protect\package{eledmac} 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 \cs{sameword} in a line (relative rank) from the rank of each \cs{sameword} in all the numbered section (absolute rank):
+% \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):
% \begin{itemize}
-% \item For each paired \cs{sameword} argument and absolute line number, a counter is defined. Its value corresponds to the number of times \cs{sameword}\marg{argument}+ is called from the beginning of the lineation to the end of the current line. We also store the same data for the preceding absolute line number, if it does not have \cs{sameword}\marg{argument}.
-% \item For each \cs{sameword} having the same argument, we subtract from its absolute rank the number stored for the paired \cs{sameword} argument and previous absolute line number. Consequently, we obtain the relative rank.
-% \item See the following example which explain how for same \cs{sameword} absolute ranks are transformed to relative rank.
+% \item For each paired \protect\cs{sameword} argument and absolute line number, a counter is defined. Its value corresponds to the number of times \protect\cs{sameword}\marg{argument}+ is called from the beginning of the lineation to the end of the current line. We also store the same data for the preceding absolute line number, if it does not have \protect\cs{sameword}\marg{argument}.
+% \item For each \protect\cs{sameword} having the same argument, we subtract from its absolute rank the number stored for the paired \protect\cs{sameword} argument and previous absolute line number. Consequently, we obtain the relative rank.
+% \item See the following example which explain how for same \protect\cs{sameword} absolute ranks are transformed to relative rank.
% \begin{verbatim}
% At line 1:
% absolute rank 1 becomes relative rank 1-0 = 1
@@ -6589,12 +6555,12 @@
% 3 is stored for this \sameword and the line 4
% \end{verbatim}
% \end{itemize}
-% \item Create lists of lists of \cs{sameword} by depth of \cs{edtext}.
-% That is: create a list for \cs{edtext} of level~1, a list for \cs{edtext} of level~2, a list for \cs{edtext} of level~3 etc.
-% For each \cs{edtext} in these list, we store all the relative rank of \cs{saweword} which are called as lemma information, that is 1) or called in the first argument of \cs{sameword} 2) or called in the \cs{lemma} macro of the second argument of \cs{sameword} AND marked by the optional argument of \cs{saweword} in first argument of \cs{edtext}.
+% \item Create lists of lists of \protect\cs{sameword} by depth of \protect\cs{edtext}.
+% That is: create a list for \protect\cs{edtext} of level~1, a list for \protect\cs{edtext} of level~2, a list for \protect\cs{edtext} of level~3 etc.
+% For each \protect\cs{edtext} in these list, we store all the relative rank of \protect\cs{saweword} which are called as lemma information, that is 1) or called in the first argument of \protect\cs{sameword} 2) or called in the \protect\cs{lemma} macro of the second argument of \protect\cs{sameword} AND marked by the optional argument of \protect\cs{saweword} in first argument of \protect\cs{edtext}.
%
-% For example, suppose a line with nested \cs{edtext}s which contains some
-% word marked by \cs{sameword} and having the following relative rank:\\
+% For example, suppose a line with nested \protect\cs{edtext}s which contains some
+% word marked by \protect\cs{sameword} and having the following relative rank:\\
%
%
%\let\up\textsuperscript
@@ -6607,16 +6573,16 @@
% bar\up{4}
% } (E)
%
-% In this example, all lemma information for \cs{edtext} is framed. The text in parenthesis is the content of critical notes associated to the preceding frame.
-% As you can see, we have two level of \cs{edtext}.
+% In this example, all lemma information for \protect\cs{edtext} is framed. The text in parenthesis is the content of critical notes associated to the preceding frame.
+% As you can see, we have two level of \protect\cs{edtext}.
%
-%The list for \cs{edtext}s of level~1 is $\{\{1,2,2,3,4,3\},\{5,4\}\}$.
+%The list for \protect\cs{edtext}s of level~1 is $\{\{1,2,2,3,4,3\},\{5,4\}\}$.
%
-%The list for \cs{edtext}s of level~2 is $\{\{1,2,2,3\},\{5\}\}$.
+%The list for \protect\cs{edtext}s of level~2 is $\{\{1,2,2,3\},\{5\}\}$.
%
-% As you can see, the mandatory argument of \cs{sameword} does not matter: we store the rank informations for every word potentially ambiguous.
+% As you can see, the mandatory argument of \protect\cs{sameword} does not matter: we store the rank informations for every word potentially ambiguous.
% \end{enumerate}
-% \item At the second run, when a critical notes is called, we associate it to the next item of the list associated to is \cs{edtext} level. So, in the previous example:
+% \item At the second run, when a critical notes is called, we associate it to the next item of the list associated to is \protect\cs{edtext} level. So, in the previous example:
% \begin{itemize}
% \item Critical notes (A) and (B) are associated with $\{1,2,2,3\}$.
% \item Critical note (C) is associated with $\{1,2,2,3,4,3\}$.
@@ -6625,24 +6591,24 @@
% \end{itemize}
% \item At the second run, when a critical note is printed:
% \begin{itemize}
-% \item The \cs{sameword} command is let \cs{sameword@inedtext}.
-% \item At each call of this \cs{sameword@inedtext}, we step to the next element of the list associated to the note. Let it be $r$.
-% \item For the word marked by \cs{sameword}, we calculate how many time it is called in its line. To do it:
+% \item The \protect\cs{sameword} command is let \protect\cs{sameword@inedtext}.
+% \item At each call of this \protect\cs{sameword@inedtext}, we step to the next element of the list associated to the note. Let it be $r$.
+% \item For the word marked by \protect\cs{sameword}, we calculate how many time it is called in its line. To do it:
% \begin{itemize}
-% \item We get the absolute line number of the current \cs{sameword}. This absolute line number was stored with list of relative rank for the current \cs{edtext}. That means, in the previous example, that, if the absolute line number of \cs{edtext} was 1, that critical notes (A) and (B) were not associated with $\{1,2,2,3\}$ but with $\{(1,1),(2,1),(2,1),(3,1)\}$. Such method to know the absolute line number associated to a \cs{sameword} is required because a \cs{edtext} can be overlap many lines, but \cs{sameword} can't get it.
+% \item We get the absolute line number of the current \protect\cs{sameword}. This absolute line number was stored with list of relative rank for the current \protect\cs{edtext}. That means, in the previous example, that, if the absolute line number of \protect\cs{edtext} was 1, that critical notes (A) and (B) were not associated with $\{1,2,2,3\}$ but with $\{(1,1),(2,1),(2,1),(3,1)\}$. Such method to know the absolute line number associated to a \protect\cs{sameword} is required because a \protect\cs{edtext} can be overlap many lines, but \protect\cs{sameword} can't get it.
% \item We get the value associated, when reading the auxiliary file, to the pair compose by the current marked word and the current absolute line number. Let this value be $n$.
% \end{itemize}
-% \item If $n >1 $, that mean the current word appears more than once time in its line. In this case, we call \cs{showwordrank} with the word as first argument and $r$ as second argument. If the word is called only once, we just print it.
+% \item If $n >1 $, that mean the current word appears more than once time in its line. In this case, we call \protect\cs{showwordrank} with the word as first argument and $r$ as second argument. If the word is called only once, we just print it.
% \end{itemize}
% \end{itemize}
% After theory, implementation.
% \begin{macro}{\get@sw@txt}
-% As the argument of \cs{sameword} can contain active character if we
-% use \Lpack{inputenc} with \verb+utf8+ option instead of native UTF-8 engine,
-% we store its detokenized content in a macro in order to allow dynamic name of macro with \cs{csname}.\footnote{See \url{http://tex.stackexchange.com/q/244538/7712}.}
+% As the argument of \protect\cs{sameword} can contain active character if we
+% use \protect\package{inputenc} with \verb+utf8+ option instead of native UTF-8 engine,
+% we store its detokenized content in a macro in order to allow dynamic name of macro with \protect\cs{csname}.\footnote{See \url{http://tex.stackexchange.com/q/244538/7712}.}
%
-% Because there is a bug with \cs{detokenize} and \XeTeX\ when using non BMP characters\footnote{\url{http://sourceforge.net/p/xetex/bugs/108/}},
-% we detokenize only for not \XeTeX engines. In any case, in \XeTeX, a \cs{csname} construction can contain UTF-8 characters without a problem, as UTF-8 characters are not managed with category code, but instead read directly as UTF-8 characters.
+% Because there is a bug with \protect\cs{detokenize} and \XeTeX\ when using non BMP characters\footnote{\url{http://sourceforge.net/p/xetex/bugs/108/}},
+% we detokenize only for not \XeTeX engines. In any case, in \XeTeX, a \protect\cs{csname} construction can contain UTF-8 characters without a problem, as UTF-8 characters are not managed with category code, but instead read directly as UTF-8 characters.
% \begin{macrocode}
\newcommand{\get@sw@txt}[1]{%
\ifxetex%
@@ -6654,8 +6620,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\sameword}
-% \changes{v1.23.0}{2015/05/18}{In order to allow use of \cs{sameword} with inputenc, we detokenize its mandatory argument before using it in control sequence names.}
-% The hight level macro \cs{sameword}, used by the editor.
+% \changes{v1.23.0}{2015/05/18}{In order to allow use of \protect\cs{sameword} with inputenc, we detokenize its mandatory argument before using it in control sequence names.}
+% The hight level macro \protect\cs{sameword}, used by the editor.
% \begin{macrocode}
\newcommandx{\sameword}[2][1,usedefault]{%
\leavevmode%
@@ -6683,7 +6649,7 @@
}%
% \end{macrocode}
% \end{macro}
-% A flag set to true if a \cs{@sw} relative rank must be added to the list of ranks for a specific \cs{edtext}.
+% A flag set to true if a \protect\cs{@sw} relative rank must be added to the list of ranks for a specific \protect\cs{edtext}.
% \begin{macro}{\if@addsw}
% \begin{macrocode}
\newif\if@addsw%
@@ -6722,7 +6688,7 @@
\numdef{\the@sw}{#2-\csuse{sw@\sw@txt @\prev@line @\the\section@numR @R}}%
\fi%
% \end{macrocode}
-% And now, add it to the list of \cs{@sw} for the current edtext, in all depth.
+% And now, add it to the list of \protect\cs{@sw} for the current edtext, in all depth.
% \begin{macrocode}
\@tempcnta=\@edtext@level
\@whilenum{\@tempcnta>0}\do{%
@@ -6759,7 +6725,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\sameword@inedtext}
-% The command called when \cs{sameword} is called in a \cs{edtext}.
+% The command called when \protect\cs{sameword} is called in a \protect\cs{edtext}.
% \begin{macrocode}
\newcommandx{\sameword@inedtext}[2][1,usedefault]{%
\get@sw@txt{#2}%
@@ -6772,7 +6738,7 @@
\def\this@absline{-99}%
\else%
% \end{macrocode}
-% But in many cases, at this step, we should have some content in the list \cs{sw@list@inedtext}, which contains the reference for \cs{edtext}.
+% But in many cases, at this step, we should have some content in the list \protect\cs{sw@list@inedtext}, which contains the reference for \protect\cs{edtext}.
% \begin{macrocode}
\gl@p\sw@list@inedtext\to\@tmp%
\edef\the@sw{\expandafter\@firstoftwo\@tmp}%
@@ -6838,8 +6804,8 @@
% line-list, and then at last send the line to the vertical list.
% This section contains all the code for this processing.
%
-% \subsection{Boxes, counters, \cs{pstart}
-% and \cs{pend}}
+% \subsection{Boxes, counters, \protect\cs{pstart}
+% and \protect\cs{pend}}
%
% \begin{macro}{\raw@text}
% \begin{macro}{\ifnumberedpar@}
@@ -6852,13 +6818,13 @@
% of the paragraph decomposition.
%
% When we first form the paragraph, it goes into a box register,
-% \cs{raw@text}, instead of onto the current vertical list.
-% The \cs{ifnumberedpar@} flag will be \verb"true" while a paragraph is
+% \protect\cs{raw@text}, instead of onto the current vertical list.
+% The \protect\cs{ifnumberedpar@} flag will be \verb"true" while a paragraph is
% being processed in that way.
-% \cs{num@lines} will store the number of lines in the paragraph
+% \protect\cs{num@lines} will store the number of lines in the paragraph
% when it is complete. When we chop it up into lines, each line
% in turn goes into the
-% \cs{one@line} register, and \cs{par@line} will be the number
+% \protect\cs{one@line} register, and \protect\cs{par@line} will be the number
% of that line within the paragraph.
% \begin{macrocode}
\newbox\raw@text
@@ -6877,25 +6843,25 @@
%
% \begin{macro}{\pstart}
% \begin{macro}{\AtEveryPstart}
-% \changes{v1.6.1}{2013/10/27}{Spurious space in \cs{pstart}.}
-% \changes{v1.12.0}{2014/08/05}{New optional argument for \cs{pstart}, to execute code before it.}
+% \changes{v1.6.1}{2013/10/27}{Spurious space in \protect\cs{pstart}.}
+% \changes{v1.12.0}{2014/08/05}{New optional argument for \protect\cs{pstart}, to execute code before it.}
% \begin{macro}{\numberpstarttrue}
% \begin{macro}{\numberpstartfalse}
% \begin{macro}{\labelpstarttrue}
% \begin{macro}{\labelpstartfalse}
% \begin{macro}{\thepstart}
-% \cs{pstart} starts the paragraph by
-% clearing the \cs{inserts@list} list and other
+% \protect\cs{pstart} starts the paragraph by
+% clearing the \protect\cs{inserts@list} list and other
% relevant variables, and then arranges for the
% subsequent text to go into the
-% \cs{raw@text} box. \cs{pstart} needs to appear at the start of
-% every paragraph that is to be numbered; the \cs{autopar} command below
+% \protect\cs{raw@text} box. \protect\cs{pstart} needs to appear at the start of
+% every paragraph that is to be numbered; the \protect\cs{autopar} command below
% may be used to insert these commands automatically.
%
-% Beware: everything that occurs between \cs{pstart} and \cs{pend}
+% Beware: everything that occurs between \protect\cs{pstart} and \protect\cs{pend}
% is happening within a group; definitions must be global if you want
% them to survive past the end of the paragraph.
-% \changes{v1.13.1}{2014/09/25}{Add \cs{l@dzeropenalties} in \cs{pstart}}
+% \changes{v1.13.1}{2014/09/25}{Add \protect\cs{l@dzeropenalties} in \protect\cs{pstart}}
% \begin{macrocode}
\newcommand{\AtEveryPstart}[1]{%
@@ -6953,6 +6919,7 @@
{\p@pstart\thepstart}
\fi%
\l@dzeropenalties%
+ \ignorespaces%because not automatically ignored if an optional argument is used (classical TeX behavior for space after commands)
}
% \end{macrocode}
% \end{macro}
@@ -6963,9 +6930,9 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\pend}
-% \changes{v1.12.0}{2014/08/05}{New optional argument for \cs{pend}, to execute code after it.}
-% \changes{v1.6.1}{2013/10/27}{Spurious space in \cs{pend}.}
-% \cs{pend} must be used to end a numbered paragraph.
+% \changes{v1.12.0}{2014/08/05}{New optional argument for \protect\cs{pend}, to execute code after it.}
+% \changes{v1.6.1}{2013/10/27}{Spurious space in \protect\cs{pend}.}
+% \protect\cs{pend} must be used to end a numbered paragraph.
%
% \begin{macrocode}
\newcommandx*{\pend}[1][1]{\ifnumbering \else%
@@ -6977,11 +6944,11 @@
\fi%
% \end{macrocode}
% We set all the usual interline penalties to zero and then immediately
-% call \cs{endgraf} to end the paragraph; this ensures that there will
+% call \protect\cs{endgraf} to end the paragraph; this ensures that there will
% be no large interline penalties to prevent us from slicing the
% paragraph into pieces. These penalties revert to the values
-% that you set when the group for the \cs{vbox} ends. Then we call
-% \cs{do@line} to slice a line off the top of the
+% that you set when the group for the \protect\cs{vbox} ends. Then we call
+% \protect\cs{do@line} to slice a line off the top of the
% paragraph, add a line number and footnotes, and restore it to the page;
% we keep doing this until there are not any more lines left.
% \begin{macrocode}
@@ -6990,7 +6957,7 @@
\global\par@line=0%
% \end{macrocode}
% We check if lineation is by pstart: in this case, we reset line number, but only in the second line of the pstart.
-% We can't reset line number at the beginning of \cs{pstart}, as \cs{setline} is parsed at the end of previous \cs{pend}, and so, we must do it at the end of first line of pstart.
+% We can't reset line number at the beginning of \protect\cs{pstart}, as \protect\cs{setline} is parsed at the end of previous \protect\cs{pend}, and so, we must do it at the end of first line of pstart.
% \begin{macrocode}
\csnumdef{pstartline}{0}%
\loop\ifvbox\raw@text%
@@ -7002,7 +6969,7 @@
\repeat%
% \end{macrocode}
% Deal with any leftover notes, and then end the group that was begun
-% in the \cs{pstart}.
+% in the \protect\cs{pstart}.
% \begin{macrocode}
\flush@notes%
\endgroup%
@@ -7023,15 +6990,15 @@
\autopar%
\fi%
% \end{macrocode}
-% Print the optional argument of \cs{pend} or the content printed after every \cs{pend}
+% Print the optional argument of \protect\cs{pend} or the content printed after every \protect\cs{pend}
% \begin{macrocode}
\ifstrempty{#1}{\at@every@pend}{\noindent#1}%
}
% \end{macrocode}
% \end{macro}
-% Here, two macros to insert content after every \cs{pend}, between numbered line.
-% \cs{AtEveryPend} is the user macro, \cs{at@every@pend} is macro set by it.
+% Here, two macros to insert content after every \protect\cs{pend}, between numbered line.
+% \protect\cs{AtEveryPend} is the user macro, \protect\cs{at@every@pend} is macro set by it.
%
% \begin{macro}{\AtEveryPend}
% \begin{macro}{\at@every@pend}
@@ -7049,8 +7016,8 @@
% \end{macro}
%
% \begin{macro}{\l@dzeropenalties}
-% A macro to zero penalties for \cs{pend} or \cs{pstart}.
-% \changes{v0.7.0}{2005/02/22}{Added \cs{l@dzeropenalties}}
+% A macro to zero penalties for \protect\cs{pend} or \protect\cs{pstart}.
+% \changes{v0.7.0}{2005/02/22}{Added \protect\cs{l@dzeropenalties}}
% \begin{macrocode}
\newcommand*{\l@dzeropenalties}{%
\brokenpenalty \z@ \clubpenalty \z@
@@ -7062,37 +7029,37 @@
%
% \begin{macro}{\autopar}
% In most cases it is only an annoyance to have to label the paragraphs
-% to be numbered with \cs{pstart} and \cs{pend}. \cs{autopar} will
+% to be numbered with \protect\cs{pstart} and \protect\cs{pend}. \protect\cs{autopar} will
% do that automatically, allowing you to start a paragraph with its
% first word and no other preliminaries, and to end it with a blank line
-% or a \cs{par} command. The command should be issued within a
-% group, after \cs{beginnumbering} has been used to start the
+% or a \protect\cs{par} command. The command should be issued within a
+% group, after \protect\cs{beginnumbering} has been used to start the
% numbering; all paragraphs within the group will be affected.
%
% A few situations can cause problems. One is a paragraph that begins with
-% a begin-group character or command: \cs{pstart} will not get invoked
+% a begin-group character or command: \protect\cs{pstart} will not get invoked
% until after such a group beginning is processed; as a result the
% character that ends the group will be mistaken for the end of the
-% \cs{vbox} that \cs{pstart} creates, and the rest of the paragraph
+% \protect\cs{vbox} that \protect\cs{pstart} creates, and the rest of the paragraph
% will not be numbered. Such paragraphs need to be started explicitly
-% using \cs{indent}, \cs{noindent}, or \cs{leavevmode} --- or \cs{pstart}, since
-% you can still include your own \cs{pstart} and \cs{pend}
-% commands even with \cs{autopar} on.
+% using \protect\cs{indent}, \protect\cs{noindent}, or \protect\cs{leavevmode} --- or \protect\cs{pstart}, since
+% you can still include your own \protect\cs{pstart} and \protect\cs{pend}
+% commands even with \protect\cs{autopar} on.
%
-% Prematurely ending the group within which \cs{autopar} is in
+% Prematurely ending the group within which \protect\cs{autopar} is in
% effect will cause a similar problem. You must either leave a
-% blank line or use \cs{par} to end the last paragraph before
+% blank line or use \protect\cs{par} to end the last paragraph before
% you end the group.
%
% The functioning of this macro is more tricky than the usual
-% \cs{everypar}: we do not want anything to go onto the vertical
+% \protect\cs{everypar}: we do not want anything to go onto the vertical
% list at all, so we have to end the paragraph, erase any evidence
-% that it ever existed, and start it again using \cs{pstart}.
-% We remove the paragraph-indentation box using \cs{lastbox} and
-% save the width, and then skip backwards over the \cs{parskip}
+% that it ever existed, and start it again using \protect\cs{pstart}.
+% We remove the paragraph-indentation box using \protect\cs{lastbox} and
+% save the width, and then skip backwards over the \protect\cs{parskip}
% that has been added for this paragraph. Then we start again with
-% \cs{pstart}, restoring the indentation that we saved, and
-% locally change \cs{par} so that it will do our \cs{pend} for us.
+% \protect\cs{pstart}, restoring the indentation that we saved, and
+% locally change \protect\cs{par} so that it will do our \protect\cs{pend} for us.
% \begin{macrocode}
\newif\ifautopar
\autoparfalse
@@ -7119,7 +7086,7 @@
%
% \begin{macro}{\normal@pars}
% We also define a macro which we can rely on to turn off the
-% \cs{autopar} definitions at various important places, if they
+% \protect\cs{autopar} definitions at various important places, if they
% are in force. We will want to do this within a footnotes, for
% example.
% \begin{macrocode}
@@ -7130,8 +7097,8 @@
%
% \begin{macro}{\ifautopar@pause}
% We define a boolean test switched to true at the beginning
-% of the \cs{pausenumbering} command if the autopar is enabled.
-% This boolean will be tested at the beginning of \cs{resumenumbering}
+% of the \protect\cs{pausenumbering} command if the autopar is enabled.
+% This boolean will be tested at the beginning of \protect\cs{resumenumbering}
% to continue the autopar if neeeded.
% \begin{macrocode}
\newif\ifautopar@pause
@@ -7142,9 +7109,9 @@
% \subsubsection{General process}
% \begin{macro}{\do@line}\label{doline}
% \begin{macro}{\l@dunhbox@line}
-% The \cs{do@line} macro is called by \cs{pend} to
+% The \protect\cs{do@line} macro is called by \protect\cs{pend} to
% do all the processing for a single line of text.
-% \changes{v1.6.1}{2013/10/27}{Move the call to \cs{inserthangingsymbol} to allow use \cs{hfill} inside.}
+% \changes{v1.6.1}{2013/10/27}{Move the call to \protect\cs{inserthangingsymbol} to allow use \protect\cs{hfill} inside.}
% \changes{v1.12.2}{2014/08/07}{Fix a bug with critical notes at the tops of pages (added by v12.0.0)}
% \begin{macrocode}
\newcommand*{\l@dunhbox@line}[1]{\unhbox #1}
@@ -7170,7 +7137,7 @@
\affixline@num%
\fi%
% \end{macrocode}
-% \changes{v1.12.0}{2014/08/05}{\cs{do@line} is split in more little commands.}
+% \changes{v1.12.0}{2014/08/05}{\protect\cs{do@line} is split in more little commands.}
% Depending weither a sectioning command is called at this pstart or not
% we print sectioning command or normal line,
% \begin{macrocode}
@@ -7187,7 +7154,7 @@
% \begin{macro}{\print@line}
% \changes{v1.13.1}{2014/09/25}{Coming back of add@penalties, mistakenly deleted in version 0.17!}
% \changes{v1.18.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.}
-% \cs{print@line} is for normal line, i. e line without sectioning command.
+% \protect\cs{print@line} is for normal line, i. e line without sectioning command.
% \begin{macrocode}
\def\print@line{
% \end{macrocode}
@@ -7248,10 +7215,10 @@
}
% \end{macrocode}
% \end{macro}
-% \subsubsection{Process for line containing \cs{eledsection} command}
+% \subsubsection{Process for line containing \protect\cs{eledsection} command}
% \begin{macro}{\print@eledsection}
-% \cs{print@eledsection} to print sectioning command with line number.
-% It sets the correct spacing, depending whether a sectioning command was called at previous \cs{pstart}, calls the sectioning command, prints the normal line outside of the paper, to be able to have critical footnotes.
+% \protect\cs{print@eledsection} to print sectioning command with line number.
+% It sets the correct spacing, depending whether a sectioning command was called at previous \protect\cs{pstart}, calls the sectioning command, prints the normal line outside of the paper, to be able to have critical footnotes.
% Because of how this prints, a vertical spacing correction is added.
% \begin{macrocode}
\def\print@eledsection{%
@@ -7276,10 +7243,10 @@
% \subsubsection{Hooks}
% \begin{macro}{\do@linehook}
% \begin{macro}{\do@insidelinehook}
-% Two hooks into \cs{do@line}. The first is called at the beginning of \cs{do@line}, the second is called in the line box.
-% The second can, for example, have a \cs{markboth} command inside, the first ca not.
-% \changes{v0.7.0}{2005/02/18}{Added \cs{do@linehook} for use in \cs{do@line}}
-% \changes{v1.5.0}{2013/07/11}{Added \cs{do@insidelinehook} for use in \cs{do@line}}
+% Two hooks into \protect\cs{do@line}. The first is called at the beginning of \protect\cs{do@line}, the second is called in the line box.
+% The second can, for example, have a \protect\cs{markboth} command inside, the first ca not.
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{do@linehook} for use in \protect\cs{do@line}}
+% \changes{v1.5.0}{2013/07/11}{Added \protect\cs{do@insidelinehook} for use in \protect\cs{do@line}}
% \begin{macrocode}
\newcommand*{\do@linehook}{}
\newcommand*{\do@insidelinehook}{}
@@ -7290,8 +7257,8 @@
% \begin{macro}{\dolinehook}
% \begin{macro}{\doinsidelinehook}
% These hight level commands just redefine the low level commands.
-% They have to be used be user, without \cs{makeatletter}.
-% \changes{v1.12.5}{2014/08/31}{Added \cs{dolinehook} and \cs{doinsidelinehook}}
+% They have to be used be user, without \protect\cs{makeatletter}.
+% \changes{v1.12.5}{2014/08/31}{Added \protect\cs{dolinehook} and \protect\cs{doinsidelinehook}}
% \begin{macrocode}
\newcommand*{\dolinehook}[1]{\gdef\do@linehook{#1}}%
\newcommand*{\doinsidelinehook}[1]{\gdef\do@insidelinehook{#1}}%
@@ -7306,9 +7273,9 @@
% \begin{macro}{\l@dcsnotetext}
% \begin{macro}{\l@dcsnotetext@l}
% \begin{macro}{\l@dcsnotetext@r}
-% Nulls the \cs{...d@ta}, which may later hold line numbers.
-% Similarly for \cs{l@dcsnotetext}, \cs{l@dcsnotetext@l}, \cs{l@dcsnotetext@r} for the texts of the sidenotes, left and right notes.
-% \changes{v0.7.0}{2005/02/18}{Added \cs{l@demptyd@ta}}
+% Nulls the \protect\cs{...d@ta}, which may later hold line numbers.
+% Similarly for \protect\cs{l@dcsnotetext}, \protect\cs{l@dcsnotetext@l}, \protect\cs{l@dcsnotetext@r} for the texts of the sidenotes, left and right notes.
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{l@demptyd@ta}}
% \begin{macrocode}
\newcommand*{\l@demptyd@ta}{%
\gdef\l@dld@ta{}%
@@ -7328,8 +7295,8 @@
% \begin{macro}{\l@dlsn@te}
% \begin{macro}{\l@drsn@te}
% Zero width boxes of the left and right side notes, together with their kerns.
-% \changes{v0.7.0}{2005/02/18}{Added \cs{l@dlsn@te} and \cs{l@drsn@te}
-% for use in \cs{do@line}}
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{l@dlsn@te} and \protect\cs{l@drsn@te}
+% for use in \protect\cs{do@line}}
% \begin{macrocode}
\newcommand{\l@dlsn@te}{%
\hb@xt@ \z@{\hss\box\l@dlp@rbox\kern\ledlsnotesep}}
@@ -7343,9 +7310,9 @@
%
% \begin{macro}{\ledllfill}
% \begin{macro}{\ledrlfill}
-% These macros are called at the left (\cs{ledllfill}) and the right
-% (\cs{ledllfill}) of each numbered line. The initial definitions
-% correspond to the original code for \cs{do@line}.
+% These macros are called at the left (\protect\cs{ledllfill}) and the right
+% (\protect\cs{ledllfill}) of each numbered line. The initial definitions
+% correspond to the original code for \protect\cs{do@line}.
% \begin{macrocode}
\newcommand*{\ledllfill}{\hfil}
\newcommand*{\ledrlfill}{}
@@ -7357,7 +7324,7 @@
% \section{Line and page number computation}
%
% \begin{macro}{\getline@num}
-% The \cs{getline@num} macro
+% The \protect\cs{getline@num} macro
% determines the page and line numbers for the line we are about to
% send to the vertical list.
% \begin{macrocode}
@@ -7383,14 +7350,14 @@
%
% \begin{macro}{\do@ballast}
% \phantomsection\label{do@ballast}\relax
-% The real work in the macro above is done in \cs{do@actions}, but
-% before we plunge into that, let's get \cs{do@ballast} out of the
+% The real work in the macro above is done in \protect\cs{do@actions}, but
+% before we plunge into that, let's get \protect\cs{do@ballast} out of the
% way. This macro looks to see if there is an action to be
% performed on the \emph{next} line, and if it is going to be a
-% page break action, \cs{do@ballast} decreases the count \cs{ballast@count}
+% page break action, \protect\cs{do@ballast} decreases the count \protect\cs{ballast@count}
% counter
% by the amount of \verb"ballast". This means, in practice, that when
-% \cs{add@penalties} assigns penalties at this point, \TeX\ will be
+% \protect\cs{add@penalties} assigns penalties at this point, \TeX\ will be
% given extra encouragement to break the page here (see
% \reff{add@penalties}).
%
@@ -7406,7 +7373,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% And here is \cs{do@ballast} itself. It advances \cs{absline@num}
+% And here is \protect\cs{do@ballast} itself. It advances \protect\cs{absline@num}
% within the protection of a group to make its check for what
% happens on the next line.
% \begin{macrocode}
@@ -7425,17 +7392,17 @@
% \begin{macro}{\do@actions}
% \begin{macro}{\do@actions@next}
%
-% The \cs{do@actions} macro
+% The \protect\cs{do@actions} macro
% looks at the list of actions to take at particular absolute line
% numbers, and does everything that is specified for the current line.
%
% It may call itself recursively, and to do this efficiently (using
% \TeX's optimization for tail recursion), we define a control-sequence
-% called \cs{do@actions@next} that is always the last thing that
-% \cs{do@actions} does. If there could be more actions to process for
-% this line, \cs{do@actions@next} is set equal to \cs{do@actions};
-% otherwise it is just \cs{relax}.
-% \changes{v0.7.0}{2005/02/22}{Added number skipping to \cs{do@actions}}
+% called \protect\cs{do@actions@next} that is always the last thing that
+% \protect\cs{do@actions} does. If there could be more actions to process for
+% this line, \protect\cs{do@actions@next} is set equal to \protect\cs{do@actions};
+% otherwise it is just \protect\cs{relax}.
+% \changes{v0.7.0}{2005/02/22}{Added number skipping to \protect\cs{do@actions}}
% \begin{macrocode}
\newcommand*{\do@actions}{%
\global\let\do@actions@next=\relax
@@ -7457,7 +7424,7 @@
% Next, we handle
% commands that change the line-number values. (We subtract $5001$ rather
% than $5000$ here because the line number is going to be incremented
-% automatically in \cs{getline@num}.)
+% automatically in \protect\cs{getline@num}.)
% \begin{macrocode}
\else
\ifnum\next@action<-4999
@@ -7471,7 +7438,7 @@
% \end{macrocode}
%
% We rescale the value in
-% \cs{@l@dtempcnta} so that we can use a case statement.
+% \protect\cs{@l@dtempcnta} so that we can use a case statement.
% \begin{macrocode}
\else
\@l@dtempcnta=-\next@action
@@ -7482,11 +7449,11 @@
% \end{macrocode}
%
% Now we get information about the next action off the list,
-% and then set \cs{do@actions@next} so that we will
+% and then set \protect\cs{do@actions@next} so that we will
% call ourself recursively: the next action might also be for this
% line.
%
-% There is no warning if we find \cs{actionlines@list} empty,
+% There is no warning if we find \protect\cs{actionlines@list} empty,
% since that will always happen near the end of the section.
%
% \begin{macrocode}
@@ -7509,9 +7476,9 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\do@actions@fixedcode}
-% This macro handles the fixed codes for \cs{do@actions}. It is
+% This macro handles the fixed codes for \protect\cs{do@actions}. It is
% one big case statement.
-% \changes{v0.7.0}{2005/02/24}{Added \cs{do@actions@fixedcode}}
+% \changes{v0.7.0}{2005/02/24}{Added \protect\cs{do@actions@fixedcode}}
% \begin{macrocode}
\newcommand*{\do@actions@fixedcode}{%
\ifcase\@l@dtempcnta
@@ -7551,8 +7518,8 @@
% \section{Line number printing}
%
% \begin{macro}{\affixline@num}
-% \cs{affixline@num} just puts a left line number into \cs{l@dld@ta}
-% or a right line number into \cs{l@drd@ta} if required.
+% \protect\cs{affixline@num} just puts a left line number into \protect\cs{l@dld@ta}
+% or a right line number into \protect\cs{l@drd@ta} if required.
%
% To determine whether we need to affix a line number to this line,
% we compute the following:
@@ -7568,25 +7535,25 @@
% $m$ will be equal to \emph{linenum} only
% if we are to paste a number on here.
% However, the formula breaks down for the first line to number (and any
-% before that), so we check that case separately: if \cs{line@num} $\le$
-% \cs{firstlinenum}, we compare the two directly instead of making these
+% before that), so we check that case separately: if \protect\cs{line@num} $\le$
+% \protect\cs{firstlinenum}, we compare the two directly instead of making these
% calculations.
%
-% We compute, in the scratch counter \cs{@l@dtempcnta}, the number
+% We compute, in the scratch counter \protect\cs{@l@dtempcnta}, the number
% of the next line that should be printed with a number ($m$ in the
% above discussion), and move the current line number into the
-% counter \cs{@l@dtempcntb} for comparison.
+% counter \protect\cs{@l@dtempcntb} for comparison.
%
%
% First, the case when we are within a sub-line range.
-% \changes{v0.5.1}{2004/04/10}{Changed \cs{affixline@num} to cater for sidenotes}
-% \changes{v0.7.0}{2005/02/22}{Added skipnumering to \cs{affixline@num}}
+% \changes{v0.5.1}{2004/04/10}{Changed \protect\cs{affixline@num} to cater for sidenotes}
+% \changes{v0.7.0}{2005/02/22}{Added skipnumering to \protect\cs{affixline@num}}
% \begin{macrocode}
\newcommand*{\affixline@num}{%
% \end{macrocode}
-% No number is attached if \cs{ifl@dskipnumber} is TRUE (and then it
+% No number is attached if \protect\cs{ifl@dskipnumber} is TRUE (and then it
% is set to its normal FALSE value).
-% No number is attached if \cs{ifnumberline} is FALSE (the normal value is TRUE).
+% No number is attached if \protect\cs{ifnumberline} is FALSE (the normal value is TRUE).
% \changes{v0.15.0}{2012/06/11}{Line numbering can be disabled.}
% \begin{macrocode}
\ifledgroupnotesL@\else
@@ -7620,8 +7587,8 @@
\else
\@l@dtempcntb=\line@num
% \end{macrocode}
-% Check on the \cs{linenumberlist}
-% If it is \cs{empty} use the standard
+% Check on the \protect\cs{linenumberlist}
+% If it is \protect\cs{empty} use the standard
% algorithm.
% \begin{macrocode}
\ifx\linenumberlist\empty
@@ -7636,7 +7603,7 @@
\fi
\else
% \end{macrocode}
-% The \cs{linenumberlist} was not \cs{empty}, so here is Wayne's
+% The \protect\cs{linenumberlist} was not \protect\cs{empty}, so here is Wayne's
% numbering mechanism. This takes place in \TeX's mouth.
% \begin{macrocode}
\@l@dtempcnta=\line@num
@@ -7667,10 +7634,10 @@
% If we got here,
% we are going to print a line number; so now we need to
% calculate a number that will tell us which side of the page will get
-% the line number. We start from \cs{line@margin}, which asks for
+% the line number. We start from \protect\cs{line@margin}, which asks for
% one side always if it is less than $2$; and then if the side does
% depend on the page number, we simply add the page number to this
-% side code---because the values of \cs{line@margin} have been devised so
+% side code---because the values of \protect\cs{line@margin} have been devised so
% that this produces a number that is even for left-margin numbers and
% odd for right-margin numbers.
%
@@ -7680,8 +7647,8 @@
% stuff before going on with the original code.
% \begin{macro}{\l@dld@ta}
% \begin{macro}{\l@drd@ta}
-% A left line number is stored in \cs{l@dld@ta} and a right one in
-% \cs{l@drd@ta}.
+% A left line number is stored in \protect\cs{l@dld@ta} and a right one in
+% \protect\cs{l@drd@ta}.
%
% \begin{macrocode}
\if@twocolumn
@@ -7723,10 +7690,10 @@
% \begin{macro}{\ch@cksub@l@ck}
% \begin{macro}{\ch@ck@l@ck}
% \begin{macro}{\f@x@l@cks}
-% These macros handle line number locking for \cs{affixline@num}.
-% \changes{v0.7.0}{2005/02/24}{Added \cs{ch@cksub@l@ck}, \cs{ch@ck@l@ck}
-% and \cs{f@x@l@cks}}
-% \cs{ch@cksub@l@ck} checks subline locking. If it fails, then we disable
+% These macros handle line number locking for \protect\cs{affixline@num}.
+% \changes{v0.7.0}{2005/02/24}{Added \protect\cs{ch@cksub@l@ck}, \protect\cs{ch@ck@l@ck}
+% and \protect\cs{f@x@l@cks}}
+% \protect\cs{ch@cksub@l@ck} checks subline locking. If it fails, then we disable
% the line-number display by setting the counters to arbitrary but unequal
% values.
% \begin{macrocode}
@@ -7795,8 +7762,8 @@
% \begin{macro}{\affixpstart@num}
% \begin{macro}{\pstartnum}
% \begin{itemize}
-% \item The pstarts counter is upgrade in the \cs{pend} command. Consequently, the \cs{affixpstart@num} command has not to upgrade it, unlike the \cs{affixline@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 \cs{pstartnum} boolean is set to TRUE at every \cs{pend}. It is tried in the \cs{leftpstartnum} and \cs{rightstartnum} commands. After the try, it is set to FALSE.
+% \item The pstarts counter is upgrade in the \protect\cs{pend} command. Consequently, the \protect\cs{affixpstart@num} command has not to upgrade it, unlike the \protect\cs{affixline@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}
% \begin{macro}{\rightstartnum}
@@ -7851,14 +7818,14 @@
% \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.
%
-% We need to call the \cs{insert} commands not when the content of \cs{pstart}\ldots\cs{pend} is read by \TeX\, by when each individual line is typeset.
+% 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.
%
-% Consequently, when reading the content of \cs{pstart}\ldots\cs{pend}, we store the insertion (footnotes) in an specific \macpackage's list, and we restore them to the vertical list when printing each individual line.
+% Consequently, when reading the content of \protect\cs{pstart}\ldots\protect\cs{pend}, we store the insertion (footnotes) in an specific \macpackage's list, and we restore them to the vertical list when printing each individual line.
%
% \subsection{Add insertions to the vertical list}
%
% \begin{macro}{\inserts@list}
-% \cs{inserts@list} is the list macro that contains the inserts that
+% \protect\cs{inserts@list} is the list macro that contains the inserts that
% we save up for one paragraph.
%
% \begin{macrocode}
@@ -7868,29 +7835,29 @@
%
% \begin{macro}{\add@inserts}
% \begin{macro}{\add@inserts@next}
-% \cs{add@inserts}
-% is the penultimate macro used by \cs{do@line}; it takes
+% \protect\cs{add@inserts}
+% is the penultimate macro used by \protect\cs{do@line}; it takes
% insertions saved in a list macro and sends them onto the vertical list.
%
% It may call itself recursively, and to do this efficiently (using
% \TeX's optimization for tail recursion), we define a control-sequence
-% called \cs{add@inserts@next} that is always the last thing that
-% \cs{add@inserts} does. If there could be more inserts to process for
-% this line, \cs{add@inserts@next} is set equal to \cs{add@inserts};
-% otherwise it is just \cs{relax}.
+% called \protect\cs{add@inserts@next} that is always the last thing that
+% \protect\cs{add@inserts} does. If there could be more inserts to process for
+% this line, \protect\cs{add@inserts@next} is set equal to \protect\cs{add@inserts};
+% otherwise it is just \protect\cs{relax}.
%
% \begin{macrocode}
\newcommand*{\add@inserts}{%
\global\let\add@inserts@next=\relax
% \end{macrocode}
%
-% If \cs{inserts@list} is empty, there are not any more notes or insertions
+% If \protect\cs{inserts@list} is empty, there are not any more notes or insertions
% for this paragraph, and we need not waste our time.
% \begin{macrocode}
\ifx\inserts@list\empty \else
% \end{macrocode}
%
-% The \cs{next@insert} macro records the number of the line that
+% The \protect\cs{next@insert} macro records the number of the line that
% receives the next footnote or other insert; it is empty when we start
% out, and just after we have affixed a note or insert.
% \begin{macrocode}
@@ -7906,7 +7873,7 @@
%
% If the next insert's for this line, tack it on (and then erase the
% contents of the insert macro, as it could be quite large).
-% In that case, we also set \cs{add@inserts@next} so that we will
+% In that case, we also set \protect\cs{add@inserts@next} so that we will
% call ourself recursively: there might be another insert for this same
% line.
%
@@ -7933,21 +7900,21 @@
% \subsection{Penalties}
%
% \begin{macro}{\add@penalties}
-% \cs{add@penalties} is
-% the last macro used by \cs{do@line}. It adds up the club,
+% \protect\cs{add@penalties} is
+% the last macro used by \protect\cs{do@line}. It adds up the club,
% widow, and interline penalties, and puts a single penalty
% of the appropriate size
% back into the paragraph; these penalties get
-% removed by the \cs{vsplit} operation. \cs{displaywidowpenalty} and
-% \cs{brokenpenalty} are not restored, since we have no easy way to
+% removed by the \protect\cs{vsplit} operation. \protect\cs{displaywidowpenalty} and
+% \protect\cs{brokenpenalty} are not restored, since we have no easy way to
% find out where we should insert them.
%
% \label{add@penalties}
-% In this code, \cs{num@lines} is the number of lines in the whole
-% paragraph, and \cs{par@line} is the line we are working on at the
-% moment. The count \cs{@l@dtempcnta} is used to calculate and
+% In this code, \protect\cs{num@lines} is the number of lines in the whole
+% paragraph, and \protect\cs{par@line} is the line we are working on at the
+% moment. The count \protect\cs{@l@dtempcnta} is used to calculate and
% accumulate the penalty; it is initially set to the value of
-% \cs{ballast@count}, which has been worked out in \cs{do@ballast}
+% \protect\cs{ballast@count}, which has been worked out in \protect\cs{do@ballast}
% above (\reff{do@ballast}). Finally, the penalty is
% checked to see that it does not go below $-10000$.
% \begin{macrocode}
@@ -7981,7 +7948,7 @@
% \subsection{Printing leftover notes}
%
% \begin{macro}{\flush@notes}
-% The \cs{flush@notes}
+% The \protect\cs{flush@notes}
% macro is called after the entire paragraph has been sliced up
% and sent on to the vertical list.
% If the number of notes to this paragraph has increased since the previous
@@ -8007,17 +7974,17 @@
% \end{macro}
%
% \begin{macro}{\@xloop}
-% \cs{@xloop} is
-% a variant of the \PlainTeX\ \cs{loop} macro, useful when it's
+% \protect\cs{@xloop} is
+% a variant of the \PlainTeX\ \protect\cs{loop} macro, useful when it's
% hard to construct a positive test using the \TeX\ \verb"\if" commands---as
-% in \cs{flush@notes} above. One says \cs{@xloop} \verb"..." \verb"\if" \verb"..." \verb"\else"
+% in \protect\cs{flush@notes} above. One says \protect\cs{@xloop} \verb"..." \verb"\if" \verb"..." \verb"\else"
% \verb"..." \verb"\repeat", and the action following \verb"\else" is repeated as long
% as the \verb"\if" test fails. (This macro will work wherever the \PlainTeX\
-% \cs{loop} is used, too, so we could just call it \cs{loop};
+% \protect\cs{loop} is used, too, so we could just call it \protect\cs{loop};
% but it seems preferable not to change the definitions of any of
% the standard macros.)
%
-% This variant of \cs{loop} was introduced by
+% This variant of \protect\cs{loop} was introduced by
% Alois Kabelschacht\index{Kabelschacht, Alois} in
% \textit{TUGboat} \textbf{8} (1987), pp.\,184--5.
%
@@ -8051,7 +8018,7 @@
%
% \begin{macro}{\select@lemmafont}\label{notefonts}
% \begin{macro}{\select@@lemmafont}
-% \cs{select@lemmafont} is provided to set the right font for
+% \protect\cs{select@lemmafont} is provided to set the right font for
% the lemma in a note. This macro extracts the font specifier
% from the line and page number cluster, and issues the associated
% font-changing command, so that the lemma is printed in its
@@ -8068,9 +8035,9 @@
%
%
% \subsection{Individual note options}
-% \changes{v1.0.0}{2012/09/15}{Options of \cs{Xfootnote}s.}
+% \changes{v1.0.0}{2012/09/15}{Options of \protect\cs{Xfootnote}s.}
% \begin{macro}{\footnoteoptions@}
-% The \cs{footnoteoption@}\oarg{side}\marg{options}\marg{value} changes the value of on options of Xfootnote, to switch between true and false.
+% The \protect\cs{footnoteoption@}\oarg{side}\marg{options}\marg{value} changes the value of on options of Xfootnote, to switch between true and false.
% \begin{macrocode}
\newcommandx*{\footnoteoptions@}[3][1=L,usedefault]{%
\def\do##1{%
@@ -8090,7 +8057,7 @@
%
% \subsection{Notes language}
% \begin{macro}{\footnotelang@lua}
-% \cs{footnotelang@lua} is called to remember the information about the direction of a lemma when \LuaLaTeX\ is used.
+% \protect\cs{footnotelang@lua} is called to remember the information about the direction of a lemma when \LuaLaTeX\ is used.
% \begin{macrocode}
\newcommandx*{\footnotelang@lua}[1][1=L,usedefault]{%
\ifstrequal{#1}{L}{%
@@ -8109,7 +8076,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\footnotelang@poly}
-% \cs{footnotelang@poly} is called to remember the information about the language of a lemma when \Lpack{polyglossia} is used.
+% \protect\cs{footnotelang@poly} is called to remember the information about the language of a lemma when \protect\package{polyglossia} is used.
% \begin{macrocode}
\newcommandx*{\footnotelang@poly}[1][1=L,usedefault]{%
\ifstrequal{#1}{L}{%
@@ -8140,12 +8107,12 @@
% \subsection{General survey of the way we manage notes}
%
% The processing of each note is done
-% by four principal macros: the \cs{vfootnote} macro takes the text
-% of the footnote and does the \cs{insert}; it calls on the
-% \cs{footfmt} macro to select the right fonts, print the line
+% by four principal macros: the \protect\cs{vfootnote} macro takes the text
+% of the footnote and does the \protect\cs{insert}; it calls on the
+% \protect\cs{footfmt} macro to select the right fonts, print the line
% number and lemma, and do any other formatting needed for that individual
-% note. Within the output routine, the two other macros, \cs{footstart}
-% and \cs{footgroup}, are called; the first prints extra vertical
+% note. Within the output routine, the two other macros, \protect\cs{footstart}
+% and \protect\cs{footgroup}, are called; the first prints extra vertical
% space and a footnote rule, if desired; the second does any reformatting
% of the whole set of the footnotes in this series for this page---such
% as paragraphing or division into columns---and then sends them to the
@@ -8157,8 +8124,8 @@
% we are dealing with---\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}, or \texttt{E}.
% The series letter always precedes the string \verb"foot" in macro
% and parameter names. Hence, for the \texttt{A} series, the four macros
-% are called \cs{vAfootnote}, \cs{Afootfmt}, \cs{Afootstart},
-% and \cs{Afootgroup}.
+% are called \protect\cs{vAfootnote}, \protect\cs{Afootfmt}, \protect\cs{Afootstart},
+% and \protect\cs{Afootgroup}.
%
% These macros are changed depending of the footnotes arrangement: ``normal'', ``paragraphed'', ``two columns'' or ``three columns''.
% \subsection{General setup}
@@ -8166,16 +8133,16 @@
% Some setup code that is common for a variety of the footnotes.
% The setup is for:
% \begin{itemize}
-% \item \cs{interlinepenalty}.
-% \item \cs{splittopskip} (skip before last part of notes that flow from one page to another).
-% \item \cs{splitmaxdepth}.
-% \item \cs{floatingpenalty}, that is penalty values being added when a long note flows from one page to another.
-% Here, we let it to 0 when we are processing parallel pages in \Lpack{eledpar}, in order to allow notes to flow from left to right pages and \emph{vice-versa}.
-% Otherwise, we let it to \cs{@MM}, which is the standard \LaTeX\ \cs{floatingpenalty}.
+% \item \protect\cs{interlinepenalty}.
+% \item \protect\cs{splittopskip} (skip before last part of notes that flow from one page to another).
+% \item \protect\cs{splitmaxdepth}.
+% \item \protect\cs{floatingpenalty}, that is penalty values being added when a long note flows from one page to another.
+% Here, we let it to 0 when we are processing parallel pages in \protect\package{eledpar}, in order to allow notes to flow from left to right pages and \emph{vice-versa}.
+% Otherwise, we let it to \protect\cs{@MM}, which is the standard \LaTeX\ \protect\cs{floatingpenalty}.
% \end{itemize}
-% \changes{v0.7.0}{2005/02/18}{Added \cs{footsplitskips} for use in many
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{footsplitskips} for use in many
% footnote styles}
-% \changes{v1.19.0}{2015/03/06}{\cs{footsplitskips} doesn't set \cs{floatingpenalty} to \cs{@MM} when processing parallel pages.}
+% \changes{v1.19.0}{2015/03/06}{\protect\cs{footsplitskips} doesn't set \protect\cs{floatingpenalty} to \protect\cs{@MM} when processing parallel pages.}
% \begin{macrocode}
\newcommand*{\footsplitskips}{%
\interlinepenalty=\interfootnotelinepenalty
@@ -8189,7 +8156,7 @@
% \end{macro}
%
% \begin{macro}{\normalfootnoterule}
-% \cs{normalfootnoterule} is
+% \protect\cs{normalfootnoterule} is
% a standard footnote-rule macro, for use by a \verb"footstart"
% macro: just the same as the \PlainTeX\ footnote rule.
% \begin{macrocode}
@@ -8200,7 +8167,7 @@
%
% \subsubsection{User level macro}
% \begin{macro}{\Xarrangement}
-% \cs{Xarrangement}\oarg{s}\marg{arrangement}
+% \protect\cs{Xarrangement}\oarg{s}\marg{arrangement}
% The command calls, for each series, a specific command which set many counters and commands in order to define specific arrangement.
%
% \begin{macrocode}
@@ -8237,13 +8204,13 @@
% \end{verbatim}
% (Read \thetexbook\ in order to understand what are the counter, skip and dimen associated to an insertion.)
%
-% Instead of repeating ourselves, we define a \cs{Xarrangement@normal}
+% Instead of repeating ourselves, we define a \protect\cs{Xarrangement@normal}
% macro that makes all these assignments for us, for any given
% series letter.
-% This command is called when people use \cs{Xarrangement}\oarg{series}\verb+{normal}+
+% This command is called when people use \protect\cs{Xarrangement}\oarg{series}\verb+{normal}+
%
-% Now we set up the \cs{Xarrangement@normal} macro itself. It takes
+% Now we set up the \protect\cs{Xarrangement@normal} macro itself. It takes
% one argument: the footnote series letter.
% \begin{macrocode}
\newcommand*{\Xarrangement@normal}[1]{%
@@ -8268,7 +8235,7 @@
% \end{macrocode}
% Now do the setup for minipage footnotes. We use as much as possible of the
% normal setup as we can (so the notes will have a similar layout).
-% \changes{v0.4.0}{2004/02/29}{Added minpage footnote setup to \cs{footnormal}}
+% \changes{v0.4.0}{2004/02/29}{Added minpage footnote setup to \protect\cs{footnormal}}
% \begin{macrocode}
\ifnoledgroup@\else%
\expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
@@ -8292,9 +8259,9 @@
% in \PlainTeX{}, in which each footnote
% is a separate paragraph.
%
-% \cs{normalvfootnote} takes the series letter as \verb"#1",
+% \protect\cs{normalvfootnote} takes the series letter as \verb"#1",
% and the entire text of the footnote is \verb"#2". It does the
-% \cs{insert} for this note, calling on the \cs{footfmt} macro for
+% \protect\cs{insert} for this note, calling on the \protect\cs{footfmt} macro for
% this note series to format the text of the note.
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnote}[2]{%
@@ -8313,7 +8280,7 @@
%
% \begin{macro}{\mpnormalvfootnote}
% And a somewhat different version for minipages.
-% \changes{v0.4.0}{2004/02/29}{Added \cs{mpnormalvfootnote}}
+% \changes{v0.4.0}{2004/02/29}{Added \protect\cs{mpnormalvfootnote}}
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\mpnormalvfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
@@ -8330,7 +8297,7 @@
%
% \begin{macro}{\normalfootfmt}
% \label{normalfootfmt}
-% \cs{normalfootfmt} is a `normal' macro
+% \protect\cs{normalfootfmt} is a `normal' macro
% to take the footnote line and page
% number information (see \reff{linenumbers}), and the
% desired text, and output what's to be printed.
@@ -8338,7 +8305,7 @@
% and lemma font specifier;
% \verb"#2" is the lemma;
% \verb"#3" is the note's text. This version is very
-% rudimentary---it uses \cs{printlines}
+% 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.
%
@@ -8360,33 +8327,33 @@
%
% \begin{macro}{\normalfootstart}\label{normalvalues}
% \phantomsection\relax
-% \cs{normalfootstart}
+% \protect\cs{normalfootstart}
% is a standard footnote-starting macro, called in the output
% routine whenever there are footnotes of this series to be
% printed: it skips a bit and then draws a rule.
%
-% Any \cs{footstart} macro must put onto the page something that
-% takes up space exactly equal to the \cs{skip}\cs{Xfootins} value for
+% Any \protect\cs{footstart} macro must put onto the page something that
+% takes up space exactly equal to the \protect\cs{skip}\protect\cs{Xfootins} value for
% the associated series of notes. \TeX\ makes page computations based
-% on that \cs{skip} value, and the output pages will suffer from
+% on that \protect\cs{skip} value, and the output pages will suffer from
% spacing problems if what you add takes up a different amount of
% space.
%
-% But if the skip \cs{preXnotes@} is greater than 0~pt,
-% it is used instead of \cs{skip}\cs{footins} for the first printed series in one page.
+% But if the skip \protect\cs{preXnotes@} is greater than 0~pt,
+% it is used instead of \protect\cs{skip}\protect\cs{footins} for the first printed series in one page.
%
-% The \cs{leftskip} and \cs{rightskip} values
+% The \protect\cs{leftskip} and \protect\cs{rightskip} values
% are both zeroed here.
% \label{footskips}
-% Similarly, these skips are cancelled in the \cs{vfootnote} macros
+% Similarly, these skips are cancelled in the \protect\cs{vfootnote} macros
% for the various types of notes. Strictly speaking,
% this is necessary only
% if you are using paragraphed footnotes, but we have put it here
-% and in the other \cs{vfootnote} macros too so that the behavior of
+% and in the other \protect\cs{vfootnote} macros too so that the behavior of
% \macpackage{} in this respect is general across all footnote types.
-% What this means is that any \cs{leftskip}
-% and \cs{rightskip} you specify applies to the main text, but not
-% the footnotes. The footnotes continue to be of width \cs{hsize}.
+% What this means is that any \protect\cs{leftskip}
+% and \protect\cs{rightskip} you specify applies to the main text, but not
+% the footnotes. The footnotes continue to be of width \protect\cs{hsize}.
% \begin{macrocode}
\newcommand*{\normalfootstart}[1]{%
% \end{macrocode}
@@ -8406,7 +8373,7 @@
\vskip\skip\csname #1footins\endcsname%
% \end{macrocode}
% And now, the problem of left and right skip for notes.
-% Especially when using one feature of \parpackage which allows to have the footnotes horizontal size as the size of columns printed by \cs{Columns}.
+% Especially when using one feature of \parpackage which allows to have the footnotes horizontal size as the size of columns printed by \protect\cs{Columns}.
% Read \reff{width2columns} for the general description of the problem.
% \begin{macrocode}
\leftskip0pt \rightskip0pt
@@ -8425,7 +8392,7 @@
%
%
% \begin{macro}{\normalfootgroup}
-% \cs{normalfootgroup} is
+% \protect\cs{normalfootgroup} is
% a standard footnote-grouping macro: it sends the
% contents of the footnote-insert box to the output page without
% alteration.
@@ -8441,8 +8408,8 @@
%
% \begin{macro}{\mpnormalfootgroup}
% A somewhat different version for minipages.
-% Notes that, in this case, we don not make distinction between \cs{Xfootgroup} and \cs{Xfootstarts} macro.
-% \changes{v0.4.0}{2004/02/29}{Added \cs{mpnormalfootgroup}}
+% Notes that, in this case, we don not make distinction between \protect\cs{Xfootgroup} and \protect\cs{Xfootstarts} macro.
+% \changes{v0.4.0}{2004/02/29}{Added \protect\cs{mpnormalfootgroup}}
% \begin{macrocode}
\unless\ifnoledgroup@
\newcommand*{\mpnormalfootgroup}[1]{{
@@ -8483,7 +8450,7 @@
% to handle more than about $100$ notes of this kind on a page.
%
% \begin{macro}{\Xarrangement@paragraph}
-% The \cs{Xarrangement@paragraph} macro
+% The \protect\cs{Xarrangement@paragraph} macro
% sets up everything for one series of the footnotes so that
% they will be paragraphed; it takes the series letter as argument.
% We include the setting of \verb"\count\footins" to $1000$ for the
@@ -8491,7 +8458,7 @@
% footnotes after having columnar ones, since they change this
% value (see below).
%
-% The argument of \cs{Xarrangement@footparagraph} is the letter
+% The argument of \protect\cs{Xarrangement@footparagraph} is the letter
% denoting the series of notes to be paragraphed.
% \begin{macrocode}
\newcommand*{\Xarrangement@paragraph}[1]{%
@@ -8524,25 +8491,25 @@
% \begin{macro}{\footfudgefiddle}
% For paragraphed footnotes \TeX{} has to estimate the amount of space
% required. If it underestimates this then the notes may get too long and
-% run off the bottom of the text block. \cs{footfudgefiddle} can be increased
+% run off the bottom of the text block. \protect\cs{footfudgefiddle} can be increased
% from its default 64 (say to 70) to increase the estimate.
-% \changes{v0.2.2}{2003/11/04}{Added \cs{footfudgefiddle}}
+% \changes{v0.2.2}{2003/11/04}{Added \protect\cs{footfudgefiddle}}
% \begin{macrocode}
\providecommand{\footfudgefiddle}{64}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\para@footsetup}
-% \cs{footparagraph} calls the
-% \cs{para@footsetup} macro to calculate a special
-% fudge factor, which is the ratio of the \cs{baselineskip}
-% to the \cs{hsize}. We assume that the proper value of
-% \cs{baselineskip} for the footnotes (normally 9\,pt) has been set
+% \protect\cs{footparagraph} calls the
+% \protect\cs{para@footsetup} macro to calculate a special
+% fudge factor, which is the ratio of the \protect\cs{baselineskip}
+% to the \protect\cs{hsize}. We assume that the proper value of
+% \protect\cs{baselineskip} for the footnotes (normally 9\,pt) has been set
% already. The argument of the macro is
% again the note series letter.
%
-% Peter Wilson thinks that \cs{columnwidth} should be used here for \LaTeX\, not \cs{hsize}.
-% Peter Wilson have also included \cs{footfudgefiddle}.
-% \changes{v0.2.2}{2003/11/04}{Added \cs{footfudgefiddle} to \cs{para@footsetup}}
+% Peter Wilson thinks that \protect\cs{columnwidth} should be used here for \LaTeX\, not \protect\cs{hsize}.
+% Peter Wilson have also included \protect\cs{footfudgefiddle}.
+% \changes{v0.2.2}{2003/11/04}{Added \protect\cs{footfudgefiddle} to \protect\cs{para@footsetup}}
% \begin{macrocode}
\newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1}
\setXnoteswidthliketwocolumns@{#1}%
@@ -8555,15 +8522,15 @@
% \end{macrocode}
% \end{macro}
%
-% \cs{strip@pt} strip the characters \verb"pt" from a dimen value.
+% \protect\cs{strip@pt} strip the characters \verb"pt" from a dimen value.
%
% \begin{macro}{\parafootstart}
-% \cs{parafootstart} is the same as \cs{normalfootstart}, but we give it
-% again to ensure that \cs{rightskip} and \cs{leftskip} are
-% zeroed (this needs to be done before \cs{para@footgroup} in the
+% \protect\cs{parafootstart} is the same as \protect\cs{normalfootstart}, but we give it
+% again to ensure that \protect\cs{rightskip} and \protect\cs{leftskip} are
+% zeroed (this needs to be done before \protect\cs{para@footgroup} in the
% output routine). The size of
% paragraphed notes is calculated using a fudge factor which in
-% turn is based on \cs{hsize}. So the paragraph of notes needs to be
+% turn is based on \protect\cs{hsize}. So the paragraph of notes needs to be
% that wide.
%
% The argument of the macro is again the note series letter.
@@ -8588,10 +8555,10 @@
% \end{macro}
%
% \begin{macro}{\paravfootnote}
-% \cs{paravfootnote}
-% is a version of the \cs{vfootnote} command that is used for
-% paragraphed notes. It gets appended to the \cs{inserts@list} list
-% by an outer-level footnote command like \cs{Afootnote}. The first
+% \protect\cs{paravfootnote}
+% is a version of the \protect\cs{vfootnote} command that is used for
+% paragraphed notes. It gets appended to the \protect\cs{inserts@list} list
+% by an outer-level footnote command like \protect\cs{Afootnote}. The first
% argument is the note series letter; the second is the full text
% of the printed note itself, including line numbers, lemmata, and
% footnote text.
@@ -8606,18 +8573,18 @@
% mode, there are some undesirable side-effects if you later want
% to break such text across lines. In restricted horizontal mode,
% where \TeX\ does not expect to have to break lines, it does not
-% insert certain items like \cs{discretionary}s. If you later unbox
+% insert certain items like \protect\cs{discretionary}s. If you later unbox
% these hboxes and stick them together, as the \texbook{}
% macros do to make these footnotes, you lose the ability to
% hyphenate after an explicit hyphen. This can lead to overfull
-% \cs{hbox}es when you would not expect to find them, and to the
+% \protect\cs{hbox}es when you would not expect to find them, and to the
% uninitiated it might be very hard to see why the problem had
-% arisen.\footnote{Michael Downes, `Line Breaking in \cs{unhbox}ed
+% arisen.\footnote{Michael Downes, `Line Breaking in \protect\cs{unhbox}ed
% Text', \textit{TUGboat} \textbf{11} (1990), pp.\,605--612.}
%
% Wayne Sullivan\index{Sullivan, Wayne} pointed out to us another
% subtle problem that arises from the same cause: \TeX\ also leaves
-% the \cs{language} whatsit nodes out of the horizontal
+% the \protect\cs{language} whatsit nodes out of the horizontal
% list.\footnote{See \thetexbook, p.\,455 (editions after
% January 1990).} So changes from one language to another will not
% invoke the proper hyphenation rules in such footnotes. Since
@@ -8629,26 +8596,26 @@
% \texbook{} versions of these macros which are broadly the
% same as those described by Michael: the central idea (also
% suggested by Donald Knuth in a letter to Michael) is to avoid collecting
-% the text in an \cs{hbox} in the first place, but instead to collect
-% it in a \cs{vbox} whose width is (virtually)
+% the text in an \protect\cs{hbox} in the first place, but instead to collect
+% it in a \protect\cs{vbox} whose width is (virtually)
% infinite.\label{hboxproblem} The text is therefore typeset in
% unrestricted horizontal mode, as a paragraph consisting of a
% single long line. Later, there is an extra level of unboxing to
-% be done: we have to unpack the \cs{vbox}, as well as the hboxes
+% be done: we have to unpack the \protect\cs{vbox}, as well as the hboxes
% inside it, but that is not too hard. For details, we refer you to
% Michael's article, where the issues are clearly
% explained.\footnote{Wayne supplied his own macros to do this, but
% since they were almost identical to Michael's, Peter Wilson have used the
-% latter's \cs{Xunvxh} macro since it is publicly
-% documented.} Michael's unboxing macro is called \cs{Xunvxh}: unvbox,
+% latter's \protect\cs{Xunvxh} macro since it is publicly
+% documented.} Michael's unboxing macro is called \protect\cs{Xunvxh}: unvbox,
% extract the last line, and unhbox it.
%
% Doing things this way has an important
% consequence:\label{nobreaks-detail} as Michael
% pointed out, you really can't put an explicit line-break into a
-% note built in a \cs{vbox} the way we are doing.\footnote{`Line
+% note built in a \protect\cs{vbox} the way we are doing.\footnote{`Line
% Breaking', p.\,610.} In other words, be very careful not to say
-% \cs{break}, or \verb"\penalty-10000", or any equivalent inside your
+% \protect\cs{break}, or \verb"\penalty-10000", or any equivalent inside your
% para-footnote.\label{nobreak} If you do, most of the note will
% probably disappear. You \emph{are} allowed to make strong
% suggestions; in fact \verb"\penalty-9999" will be quite okay. Just
@@ -8658,11 +8625,11 @@
% you think you are having this problem, look up Michael's
% solutions.
%
-% One more thing; we set \cs{leftskip} and \cs{rightskip} to zero.
+% One more thing; we set \protect\cs{leftskip} and \protect\cs{rightskip} to zero.
% This has the effect of neutralizing any such skips which may
% apply to the main text (cf.~\reff{footskips} above).
-% We need to do this, since \cs{footfudgefactor} is calculated on
-% the assumption that the notes are \cs{hsize} wide.
+% We need to do this, since \protect\cs{footfudgefactor} is calculated on
+% the assumption that the notes are \protect\cs{hsize} wide.
%
% So, finally, here is the modified foot-paragraph code, which
% sets the footnote in vertical mode so that language and
@@ -8700,10 +8667,10 @@
% leads to an overfull vbox. The change above results in a penalty
% of $0$ instead which allows, but does not force, such breaks. This
% penalty of $0$ is later removed, after page breaks have been
-% decided, by the \cs{unpenalty} macro in \cs{makehboxofhboxes}. So it
+% decided, by the \protect\cs{unpenalty} macro in \protect\cs{makehboxofhboxes}. So it
% does not affect how the footnote paragraphs are typeset (the
% notes still have a penalty of $-10$ between them, which is added
-% by \cs{parafootfmt}).
+% by \protect\cs{parafootfmt}).
% \end{macro}
%
% \begin{macro}{\mpparavfootnote}
@@ -8728,15 +8695,15 @@
% \end{macro}
%
% \begin{macro}{\Xunvxh}
-% Here is (modified) Michael's\index{Downes, Michael} definition of \cs{unvxh},
+% Here is (modified) Michael's\index{Downes, Michael} definition of \protect\cs{unvxh},
% used above. Michael's macro also takes care to remove some
% unwanted penalties and glue that \TeX\ automatically attaches to
% the end of paragraphs. When \TeX\ finishes a paragraph, it
% throws away any remaining glue, and then tacks on the following
-% items: a \cs{penalty} of $10000$, a \cs{parfillskip} and a
-% \cs{rightskip} (\thetexbook, pp.\,99--100). \cs{unvxh}
-% cancels these unwanted paragraph-final items using \cs{unskip} and
-% \cs{unpenalty}.
+% items: a \protect\cs{penalty} of $10000$, a \protect\cs{parfillskip} and a
+% \protect\cs{rightskip} (\thetexbook, pp.\,99--100). \protect\cs{unvxh}
+% cancels these unwanted paragraph-final items using \protect\cs{unskip} and
+% \protect\cs{unpenalty}.
% \begin{macrocode}
\newcommand*{\Xunvxh}[2]{%
\setbox0=\vbox{\unvbox#1%
@@ -8753,11 +8720,11 @@
%
%
% \begin{macro}{\parafootfmt}
-% \cs{parafootfmt} is
-% \cs{normalfootfmt} adapted to do the special stuff
-% needed for paragraphed notes---leaving out the \cs{endgraf} at the
+% \protect\cs{parafootfmt} is
+% \protect\cs{normalfootfmt} adapted to do the special stuff
+% needed for paragraphed notes---leaving out the \protect\cs{endgraf} at the
% end, sticking in special penalties and kern, and leaving out the
-% \cs{footstrut}. The first argument is the line and page
+% \protect\cs{footstrut}. The first argument is the line and page
% number information, the second is the lemma, the third is the
% text of the footnote, and the fourth is the series (optional, for backward compatibility).
% \begin{macrocode}
@@ -8775,18 +8742,18 @@
% Note that in the above definition, the penalty of $-10$
% encourages a line break between notes, so that notes have a
% slight tendency to begin on new lines.
-% The \cs{Xinsertparafootsep} command is used to insert the \cs{Xparafootsep@series} between each note in the \emph{same} page.
+% The \protect\cs{Xinsertparafootsep} command is used to insert the \protect\cs{Xparafootsep@series} between each note in the \emph{same} page.
% \end{macro}
%
% \begin{macro}{\parafootgroup}
% This \verb"footgroup" code is modelled on the macros in
-% \thetexbook, p.\,399. The only difference is the \cs{unpenalty}
-% in \cs{makehboxofhboxes}, which is there to remove the penalty of
+% \thetexbook, p.\,399. The only difference is the \protect\cs{unpenalty}
+% in \protect\cs{makehboxofhboxes}, which is there to remove the penalty of
% $0$ which was added to the end of each footnote by
-% \cs{para@vfootnote}.
+% \protect\cs{para@vfootnote}.
%
-% The call to \cs{Xnotefontsize@\meta{s}} is to ensure that the correct
-% \cs{baselineskip} for the footnotes is used. The argument is the
+% The call to \protect\cs{Xnotefontsize@\meta{s}} is to ensure that the correct
+% \protect\cs{baselineskip} for the footnotes is used. The argument is the
% note series letter.
% \begin{macrocode}
\newcommand*{\parafootgroup}[1]{%
@@ -8858,10 +8825,10 @@
% \end{macro}
%
% \paragraph{Insertion of the footnotes separator}
-%The command \cs{Xinsertparafootsep}\marg{series} must be called at the beginning of \cs{parafootftm}.
+%The command \protect\cs{Xinsertparafootsep}\marg{series} must be called at the beginning of \protect\cs{parafootftm}.
% \begin{macro}{\prevpage@num}
-% \changes{v1.8.0}{2013/12/13}{Correct \cs{parafootsep} when using with ledgroup.}
-% \changes{v1.22.1}{2015/04/29}{Correct double symbol when using both \cs{parafootsep} and \cs{Xsymlinenum}.}
+% \changes{v1.8.0}{2013/12/13}{Correct \protect\cs{parafootsep} when using with ledgroup.}
+% \changes{v1.22.1}{2015/04/29}{Correct double symbol when using both \protect\cs{parafootsep} and \protect\cs{Xsymlinenum}.}
% \begin{macro}{\Xinsertparafootsep}
% \begin{macrocode}
\newcommand{\Xinsertparafootsep}[1]{%
@@ -8888,17 +8855,17 @@
% \begin{macro}{\@h}
% \begin{macro}{\@k}
% We will now define macros for three-column notes and two-column
-% notes. Both sets of macros will use \cs{rigidbalance}, which splits a
+% notes. Both sets of macros will use \protect\cs{rigidbalance}, which splits a
% box (\verb"#1") into into a number (\verb"#2") of columns, each
% with a space (\verb"#3") between the top baseline and the top of
-% the \cs{vbox}. The \cs{rigidbalance} macro is taken from
+% the \protect\cs{vbox}. The \protect\cs{rigidbalance} macro is taken from
% \thetexbook, p.\,397, with a slight change to the syntax of
% the arguments so that they do not depend on white space. Note also
-% the extra unboxing in \cs{splitoff}, which allows the new \cs{vbox} to
+% the extra unboxing in \protect\cs{splitoff}, which allows the new \protect\cs{vbox} to
% have its natural height as it goes into the alignment.
%
-% The \LaTeX\ \cs{line} macro has no relationship to the
-% TeX \cs{line}. The \LaTeX\ equivalent is \cs{@@line}.
+% The \LaTeX\ \protect\cs{line} macro has no relationship to the
+% TeX \protect\cs{line}. The \LaTeX\ equivalent is \protect\cs{@@line}.
% \begin{macrocode}
\newcount\@k \newdimen\@h
\newcommand*{\rigidbalance}[3]{\setbox0=\box#1 \@k=#2 \@h=#3
@@ -8946,30 +8913,30 @@
}
% \end{macrocode}
-% The \cs{footstart} and \cs{footnoterule} macros for these notes assume
+% The \protect\cs{footstart} and \protect\cs{footnoterule} macros for these notes assume
% the normal values (\reff{normalvalues} above).
% \end{macro}
%
% \begin{macro}{\threecolfootsetup}
-% The \cs{threecolfootsetup} macro calculates and sets some numbers
+% The \protect\cs{threecolfootsetup} macro calculates and sets some numbers
% for three-column footnotes.
%
-% We set the \cs{count} of the foot insert to $333$.
+% We set the \protect\cs{count} of the foot insert to $333$.
% Each footnote can be thought of as contributing only one third of
% its height to the page, since the footnote insertion has been
% made as a long narrow column, which then gets trisected by the
-% \cs{rigidbalance} routine (inside \cs{threecolfootgroup}).
+% \protect\cs{rigidbalance} routine (inside \protect\cs{threecolfootgroup}).
% These new, shorter columns are saved in a box, and then that box
% is \emph{put back} into the footnote insert, replacing the
% original collection of the footnotes. This new box is, therefore,
% only about a third of the height of the original one.
%
-% The \cs{dimen} value for this note series has to change in the
+% The \protect\cs{dimen} value for this note series has to change in the
% inverse way: it needs to be three times
% the actual limit on the amount of space these notes are allowed to
% fill on the page, because when \TeX\ is
% accumulating material for the page
-% and checking that limit, it does not apply the \cs{count} scaling.
+% and checking that limit, it does not apply the \protect\cs{count} scaling.
% \begin{macrocode}
\newcommand*{\threecolfootsetup}[1]{%
\count\csname #1footins\endcsname 333
@@ -8989,14 +8956,14 @@
% \end{macro}
%
% \begin{macro}{\threecolvfootnote}
-% \cs{threecolvfootnote}
-% is the \cs{vfootnote} command for three-column notes. The
-% call to \cs{Xnotefontsize@\meta{s}} ensures that the
-% \cs{splittopskip} and \cs{splitmaxdepth} take their values
-% from the right \cs{strutbox}: the one used in a footnotes.
+% \protect\cs{threecolvfootnote}
+% is the \protect\cs{vfootnote} command for three-column notes. The
+% call to \protect\cs{Xnotefontsize@\meta{s}} ensures that the
+% \protect\cs{splittopskip} and \protect\cs{splitmaxdepth} take their values
+% from the right \protect\cs{strutbox}: the one used in a footnotes.
% Note especially the importance of temporarily reducing the
-% \cs{hsize} to $0.3$ of its normal value. This determines the
-% widths of the individual columns. So if the normal \cs{hsize}
+% \protect\cs{hsize} to $0.3$ of its normal value. This determines the
+% widths of the individual columns. So if the normal \protect\cs{hsize}
% is, say, 10\,cm, then each column will be $0.3\times10=3$\,cm
% wide, leaving a gap of 1\,cm spread equally between columns
% (i.e., .5\,cm between each).
@@ -9014,7 +8981,7 @@
%
%
% \begin{macro}{\threecolfootfmt}
-% \cs{threecolfootfmt}
+% \protect\cs{threecolfootfmt}
% is the command that formats one note.
% The arguments are \verb+#1+~the line numbers, \verb+#2+~the lemma and \verb+#4+~the
% text of the \verb"-footnote" command \verb+#4+ optional (for backward compatibility): the series.
@@ -9041,17 +9008,17 @@
% \begin{macro}{\threecolfootgroup}
% And here is the \verb"footgroup" macro that is called within the
% output routine to regroup the notes into three columns. Once
-% again, the call to \cs{Xnotefontsize@\meta{s}} is there to ensure that
-% it is the right \cs{splittopskip}---the one used in
+% again, the call to \protect\cs{Xnotefontsize@\meta{s}} is there to ensure that
+% it is the right \protect\cs{splittopskip}---the one used in
% footnotes---which is used to provide the third argument for
-% \cs{rigidbalance}. This third argument (\cs{@h}) is the
+% \protect\cs{rigidbalance}. This third argument (\protect\cs{@h}) is the
% \verb"topskip" for the box containing the text of the
% footnotes, and does the job of making sure the top lines of the
% columns line up horizontally. In \thetexbook, p.\,398,
-% Donald Knuth suggests retrieving the ouput of \cs{rigidbalance},
+% Donald Knuth suggests retrieving the ouput of \protect\cs{rigidbalance},
% putting it back into the insertion box, and then printing the
-% box. Here, we just print the \cs{line} which comes out of
-% \cs{rigidbalance} directly, without any re-boxing.
+% box. Here, we just print the \protect\cs{line} which comes out of
+% \protect\cs{rigidbalance} directly, without any re-boxing.
% \begin{macrocode}
\newcommand*{\threecolfootgroup}[1]{{\csuse{Xnotefontsize@#1}%
\noindent\csuse{Xtxtbeforenotes@#1}\par%
@@ -9127,7 +9094,7 @@
% each note is assumed to contribute only a half a line of text.
% And the notes are set in columns
% giving a gap between them of one tenth
-% of the \cs{hsize}.
+% of the \protect\cs{hsize}.
% \begin{macrocode}
\newcommand*{\twocolfootsetup}[1]{%
\count\csname #1footins\endcsname 500
@@ -9222,14 +9189,14 @@
% To allow use of the standard footnote macros with such fonts, we use
% the following macros for certain characters.
%
-% The \cs{endashchar} macro is simply an en-dash from the
+% The \protect\cs{endashchar} macro is simply an en-dash from the
% normal font and is immune to changes in the surrounding
% font. The same goes for the full stop. These two are used in
-% \cs{printlines}. The right bracket macro is the same again;
-% it crops up in \cs{normalfootfmt} and the other footnote
+% \protect\cs{printlines}. The right bracket macro is the same again;
+% it crops up in \protect\cs{normalfootfmt} and the other footnote
% macros for controlling the format of the footnotes.
%
-% With \Lpack{polyglossia}, each critical note has a \cs{footnote@lang} which shows the language of the lemma,
+% With \protect\package{polyglossia}, each critical note has a \protect\cs{footnote@lang} which shows the language of the lemma,
% and which can be used to switch the bracket from right to left.
% \changes{v1.4.0}{2012/11/16}{Switch the right bracket to a left bracket when the lemma is RTL (needs polyglossia or LuaTeX).}
% \begin{macrocode}
@@ -9252,8 +9219,8 @@
%
% \subsubsection{Pstart number in footnote}
% \begin{macro}{\printpstart}
-% The \cs{printpstart} macro prints the pstart number for a note.
-% \changes{v1.18.0}{2015/02/23}{Debug \cs{Xpstart} with parallel pages and columns (eledpar)}
+% The \protect\cs{printpstart} macro prints the pstart number for a note.
+% \changes{v1.18.0}{2015/02/23}{Debug \protect\cs{Xpstart} with parallel pages and columns (eledpar)}
% \begin{macrocode}
\newcommand{\printpstart}[0]{%
\ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
@@ -9271,11 +9238,11 @@
% \end{macro}
% \subsubsection{Line number printing}
% \begin{macro}{\printlinefootnote}
-% The \cs{printlinefootnote} macro is called in each \cs{<type>footfmt} command.
+% The \protect\cs{printlinefootnote} macro is called in each \protect\cs{<type>footfmt} command.
% It controls whether the line number is printed or not, according to the series options. Its first argument is the information about lines; its second is the series of the footnote.
% The printing of the line number is shared in
-% \cs{printlinefootnotenumbers}.
-% \changes{v1.18.0}{2015/02/23}{Code refactoring in \cs{printlinefootnote}: the printing of the numbers are factorized in \cs{printlinefootnotearea}}
+% \protect\cs{printlinefootnotenumbers}.
+% \changes{v1.18.0}{2015/02/23}{Code refactoring in \protect\cs{printlinefootnote}: the printing of the numbers are factorized in \protect\cs{printlinefootnotearea}}
% \begin{macrocode}
\newcommand{\printlinefootnote}[2]{%
\def\extractline@##1|##2|##3|##4|##5|##6|##7|{##2}%
@@ -9335,7 +9302,7 @@
% \end{macro}
% \begin{macro}{\printlinefootnotearea}
% This macro prints the space before the line number, changes the font, then prints the line number and the space after it.
-% It is called by \cs{printlinefootnote}
+% It is called by \protect\cs{printlinefootnote}
% depending of the options about repeating line numbers.
% The first argument is line information, the second is the notes series (A, B, C, etc.)
% \begin{macrocode}
@@ -9350,7 +9317,7 @@
% \begin{macro}{\boxfootnotenumbers}
% Depending on the user settings, this macro will box line numbers (or not).
% The first argument is line information, the second is the notes series (A, B, C, etc.)
-% The previous \cs{printlinefootnotearea} calls it.
+% The previous \protect\cs{printlinefootnotearea} calls it.
% \begin{macrocode}
\newcommand{\boxfootnotenumbers}[2]{%
\ifdimequal{\csuse{Xboxlinenum@#2}}{0pt}{%
@@ -9370,7 +9337,7 @@
% \begin{macro}{\printlinefootnotenumbers}
% This macro prints, if needed, the pstart number and the line number.
% The first argument is line information, the second is the notes series (A, B, C, etc.)
-% The previous \cs{boxlinefootnote} calls it.
+% The previous \protect\cs{boxlinefootnote} calls it.
% \begin{macrocode}
\newcommand{\printlinefootnotenumbers}[2]{%
\xdef\@currentseries{#2}%
@@ -9384,7 +9351,7 @@
% \end{macro}
% \begin{macro}{\printXbeforenumber}
% This macro prints a space (before the line number) in footnote.
-% It is called by \cs{printlinefootnotearea}.
+% It is called by \protect\cs{printlinefootnotearea}.
% Its only argument is the note series (A, B, C, etc.)
% \begin{macrocode}
\newcommand{\printXbeforenumber}[1]{%
@@ -9393,8 +9360,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\printXafternumber}
-% This macro prints the space, adding eventually a \cs{nobreak}, after the line number, in footnote.
-% It is called by \cs{printlinefootnotearea}.
+% This macro prints the space, adding eventually a \protect\cs{nobreak}, after the line number, in footnote.
+% It is called by \protect\cs{printlinefootnotearea}.
% Its only argument is the series
% \begin{macrocode}
\newcommand{\printXafternumber}[1]{%
@@ -9404,11 +9371,11 @@
% \end{macrocode}
% \end{macro}
%
-% If we have decided to print the line number in a specific notes, the \cs{printlines} macro prints the line
+% If we have decided to print the line number in a specific notes, the \protect\cs{printlines} macro prints the line
% numbers for a note---which, in the
% general case, is a rather complicated task.
% The seven parameters of the
-% argument are the line numbers as stored in \cs{l@d@nums}, in the
+% argument are the line numbers as stored in \protect\cs{l@d@nums}, in the
% form described on \reff{linenumbers}: the starting
% page, line, and sub-line numbers, followed by the ending page,
% line, and sub-line numbers, and then the font specifier for
@@ -9416,15 +9383,15 @@
%
% \edmac' creator have defined six boolean in order to know which component of line number description we have to print:
% \begin{itemize}
-% \item \cs{ifl@d@pnum} for page numbers;
-% \item \cs{ifl@d@ssub} for starting sub-line;
-% \item \cs{ifl@d@elin} for ending line;
-% \item \cs{ifl@d@esl} for ending sub-line; and
-% \item \cs{ifl@d@dash} for the dash between the starting and ending groups.
+% \item \protect\cs{ifl@d@pnum} for page numbers;
+% \item \protect\cs{ifl@d@ssub} for starting sub-line;
+% \item \protect\cs{ifl@d@elin} for ending line;
+% \item \protect\cs{ifl@d@esl} for ending sub-line; and
+% \item \protect\cs{ifl@d@dash} for the dash between the starting and ending groups.
% \end{itemize}
% There is no boolean for the line number because it is always printed.
%
-% Maïeul Rouquette has added \cs{ifl@d@Xtwolines} and \cs{ifl@d@Xmorethantwolines}
+% Maïeul Rouquette has added \protect\cs{ifl@d@Xtwolines} and \protect\cs{ifl@d@Xmorethantwolines}
% to print a symbol which stands for ``and subsequent`` when there are two, three or more lines.
% \begin{macro}{\ifl@d@pnum}
% \begin{macro}{\ifl@d@ssub}
@@ -9459,11 +9426,11 @@
% \begin{macro}{\l@dparsedendpage}
% \begin{macro}{\l@dparsedendline}
% \begin{macro}{\l@dparsedendsub}
-% \cs{l@dparsefootspec}\marg{spec}\marg{lemma}\marg{text} parses a footnote
+% \protect\cs{l@dparsefootspec}\marg{spec}\marg{lemma}\marg{text} parses a footnote
% specification. \meta{lemma} and \meta{text} are the lemma and text
% respectively. \meta{spec} is the line and page number and lemma font
-% specifier in \cs{l@d@nums} style format. The real work is done
-% by \cs{l@dp@rsefootspec} which defines macros holding the numeric values.
+% specifier in \protect\cs{l@d@nums} style format. The real work is done
+% by \protect\cs{l@dp@rsefootspec} which defines macros holding the numeric values.
% Just a reminder of the arguments: \\
% \verb?\printlines #1 | #2 | #3 | #4 | #5 | #6 | #7? \\
% \verb?\printlines start-page | line | subline | end-page | line | subline | font ?
@@ -9501,9 +9468,9 @@
%
% \begin{macro}{\setprintlines}
%
-% The macro \cs{setprintlines} does the work of deciding what numbers should
-% be printed. Its arguments are the same as the first 6 of \cs{printlines}.
-% \changes{v0.7.0}{2005/02/18}{Added \cs{setprintlines} for use by \cs{printlines}}
+% The macro \protect\cs{setprintlines} does the work of deciding what numbers should
+% be printed. Its arguments are the same as the first 6 of \protect\cs{printlines}.
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{setprintlines} for use by \protect\cs{printlines}}
% \begin{macrocode}
\newcommand*{\setprintlines}[6]{%
\l@d@pnumfalse \l@d@dashfalse
@@ -9552,7 +9519,7 @@
\fi
\fi%
% \end{macrocode}
-% However, if the \cs{Xtwolines} is set for the current series, we do not print the last line number.
+% However, if the \protect\cs{Xtwolines} is set for the current series, we do not print the last line number.
% \begin{macrocode}
\ifl@d@dash%
\ifboolexpr{togl{fulllines@} or test{\ifcsempty{Xtwolines@\@currentseries}}}%
@@ -9589,14 +9556,14 @@
}%
\fi%
% \end{macrocode}
-% End of \cs{setprintlines}.
+% End of \protect\cs{setprintlines}.
% \begin{macrocode}
}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\setistwofollowinglines}
-% The \cs{ifistwofollowinglines} boolean, used by the \cs{Xtwolines} and related setting, is set to true by \cs{setistwofollowinglines}.
+% The \protect\cs{ifistwofollowinglines} boolean, used by the \protect\cs{Xtwolines} and related setting, is set to true by \protect\cs{setistwofollowinglines}.
% This command takes the following arguments:
% \begin{itemize}
% \item \verb+#1+ First page number.
@@ -9604,7 +9571,7 @@
% \item \verb+#3+ Last page number.
% \item \verb+#4+ Last line number.
% \end{itemize}
-% If \verb+#3+-\verb+#2+ = 1, then that means the two lines are subsequent, and consequently \cs{ifistwofollowinglines} is set to true.
+% If \verb+#3+-\verb+#2+ = 1, then that means the two lines are subsequent, and consequently \protect\cs{ifistwofollowinglines} is set to true.
% However, if we use lineation by page, two given lines can be subsequent if:
% \begin{itemize}
% \item The first line number is equal to the last line number of the first page.
@@ -9669,9 +9636,9 @@
\egroup%
% \end{macrocode}
% Then print the dash + end line number, or the range symbol.
-% \changes{v0.3.0}{2004/02/14}{Added \cs{linenumr@p} and \cs{sublinenumr@p}
-% to \cs{printlines}}
-% \changes{v1.20.0}{2015/03/22}{Added \cs{ifl@d@Xmorethantwolines} and \cs{ifl@d@Xmorethantwolines} to \cs{printlines}}
+% \changes{v0.3.0}{2004/02/14}{Added \protect\cs{linenumr@p} and \protect\cs{sublinenumr@p}
+% to \protect\cs{printlines}}
+% \changes{v1.20.0}{2015/03/22}{Added \protect\cs{ifl@d@Xmorethantwolines} and \protect\cs{ifl@d@Xmorethantwolines} to \protect\cs{printlines}}
% \begin{macrocode}
\ifdimequal{\csuse{Xboxendlinenum@\@currentseries}}{0pt}%
{\bgroup}%
@@ -9699,12 +9666,12 @@
% \section{Familiar footnotes}
%
% \subsection{Adjacent footnotes}
-% The original \edmac{} provided users with five series of critical footnotes (\cs{Afootnote} \cs{Bfootnote} \cs{Cfootnote} \cs{Dfootnote} \cs{Efootnote}),
+% The original \edmac{} provided users with five series of critical footnotes (\protect\cs{Afootnote} \protect\cs{Bfootnote} \protect\cs{Cfootnote} \protect\cs{Dfootnote} \protect\cs{Efootnote}),
% and \LaTeX\ provides a single numbered footnote. The \macpackage{} package
% uses the \edmac{} mechanism to provide six series of numbered footnotes.
%
-% First, though, the \Lpack{footmisc} package has an option whereby
-% two or more consecutive \cs{footnote}s have their marks separated
+% First, though, the \protect\package{footmisc} package has an option whereby
+% two or more consecutive \protect\cs{footnote}s have their marks separated
% by commas. This seemed to Peter Wilson such a useful ability that it was provided
% automatically by \eledmac.
%
@@ -9713,10 +9680,10 @@
%
% \begin{macro}{\multiplefootnotemarker}
% \begin{macro}{\multfootsep}
-% These macros may have been defined by the \Lclass{memoir} class,
-% are provided by the \Lpack{footmisc} package and perhaps
+% These macros may have been defined by the \protect\ltxclass{memoir} class,
+% are provided by the \protect\package{footmisc} package and perhaps
% by other footnote packages.
-% That is why we use \cs{providecommand} and not \cs{newcommand}.
+% That is why we use \protect\cs{providecommand} and not \protect\cs{newcommand}.
% \begin{macrocode}
\providecommand*{\multiplefootnotemarker}{3sp}
\providecommand*{\multfootsep}{\textsuperscript{\normalfont,}}
@@ -9727,7 +9694,7 @@
%
% \begin{macro}{\m@mmf@prepare}
% A pair of self-cancelling kerns. This may have been defined in the
-% \Lclass{memoir} class.
+% \protect\ltxclass{memoir} class.
% \begin{macrocode}
\providecommand*{\m@mmf@prepare}{%
\kern-\multiplefootnotemarker
@@ -9736,8 +9703,8 @@
% \end{macro}
%
% \begin{macro}{\m@mmf@check}
-% This may have been defined in the \Lclass{memoir} class. If it recognises
-% the last kern as \cs{multiplefootnotemarker} it typesets \cs{multfootsep}.
+% This may have been defined in the \protect\ltxclass{memoir} class. If it recognises
+% the last kern as \protect\cs{multiplefootnotemarker} it typesets \protect\cs{multfootsep}.
% \begin{macrocode}
\providecommand*{\m@mmf@check}{%
\ifdim\lastkern=\multiplefootnotemarker\relax
@@ -9750,23 +9717,23 @@
% \end{macrocode}
% \end{macro}
%
-% We have to modify \cs{@footnotetext} and \cs{@footnotemark}. However,
-% if \Lclass{memoir} is used the modifications have already been made.
-% \changes{v0.4.1}{2004/03/25}{Only change \cs{@footnotetext} and
-% \cs{@footnotemark} if memoir not used}
+% We have to modify \protect\cs{@footnotetext} and \protect\cs{@footnotemark}. However,
+% if \protect\ltxclass{memoir} is used the modifications have already been made.
+% \changes{v0.4.1}{2004/03/25}{Only change \protect\cs{@footnotetext} and
+% \protect\cs{@footnotemark} if memoir not used}
% \begin{macrocode}
\@ifclassloaded{memoir}{}{%
% \end{macrocode}
% \begin{macro}{\@footnotetext}
-% Add \cs{m@mmf@prepare} at the end of \cs{@footnotetext}.
+% Add \protect\cs{m@mmf@prepare} at the end of \protect\cs{@footnotetext}.
% \begin{macrocode}
\apptocmd{\@footnotetext}{\m@mmf@prepare}{}{}
% \end{macrocode}
% \end{macro}
%
-% \changes{v2.0.0}{2015/07/19}{Patch \cs{@footnotemark} instead of redefine it}
+% \changes{v2.0.0}{2015/07/19}{Patch \protect\cs{@footnotemark} instead of redefine it}
% \begin{macro}{\@footnotemark}
-% Modify \cs{@footnotemark} to cater for adjacent \cs{footnote}s.
+% Modify \protect\cs{@footnotemark} to cater for adjacent \protect\cs{footnote}s.
% \begin{macrocode}
\patchcmd{\@footnotemark}
@@ -9792,10 +9759,10 @@
% \subsection{Regular footnotes for numbered texts}
% \begin{macro}{\l@doldold@footnotetext}
% \begin{macro}{\@footnotetext}
-% In order to enable the regular \cs{footnote}s in numbered text
-% we have to play around with its \cs{@footnotetext}, using
+% In order to enable the regular \protect\cs{footnote}s in numbered text
+% we have to play around with its \protect\cs{@footnotetext}, using
% different forms for when in numbered or regular text.
-% \changes{v0.5.0}{2004/04/03}{Enabled regular \cs{footnote} in numbered text}
+% \changes{v0.5.0}{2004/04/03}{Enabled regular \protect\cs{footnote} in numbered text}
% \begin{macrocode}
\pretocmd{\@footnotetext}{%
\ifnumberedpar@
@@ -9809,9 +9776,9 @@
%
% \begin{macro}{\l@dbfnote}
% \begin{macro}{\vl@dbfnote}
-% \cs{l@dbfnote} adds the footnote to the insert list, and
-% \cs{vl@dbfnote} calls the original \cs{@footnotetext}.
-% \changes{v0.6.0}{2004/11/23}{Changed \cs{l@dbfnote} and \cs{vl@dbfnote} as
+% \protect\cs{l@dbfnote} adds the footnote to the insert list, and
+% \protect\cs{vl@dbfnote} calls the original \protect\cs{@footnotetext}.
+% \changes{v0.6.0}{2004/11/23}{Changed \protect\cs{l@dbfnote} and \protect\cs{vl@dbfnote} as
% originals could give incorrect markers in the footnotes}
% \changes{v1.4.1}{2012/11/16}{Compatibility of standard footnotes with \eledmac when these footnotes contain any commands.}
% \begin{macrocode}
@@ -9848,7 +9815,7 @@
%
% \begin{macro}{\prebodyfootmark}
% \begin{macro}{\postbodyfootmark}
-% Two convenience macros for use by \cs{...@footnotemark...} macros.
+% Two convenience macros for use by \protect\cs{...@footnotemark...} macros.
% \begin{macrocode}
\newcommand*{\prebodyfootmark}{%
\leavevmode
@@ -9869,7 +9836,7 @@
%
% \subsubsection{User level macro}
% \begin{macro}{\arrangementX}
-% \cs{arrangementX}\oarg{s}\marg{arrangement}
+% \protect\cs{arrangementX}\oarg{s}\marg{arrangement}
% command calls, for each series, a specific command which set many counters and commands in order to define specific arrangement.
%
% \begin{macrocode}
@@ -9889,7 +9856,7 @@
% \end{macro}
% \subsubsection{Normal footnotes}
% \begin{macro}{\normal@footnotemarkX}
-% \cs{normal@footnotemarkX}\marg{series} sets up the typesetting of the
+% \protect\cs{normal@footnotemarkX}\marg{series} sets up the typesetting of the
% marker at the point where the footnote is called for.
% \begin{macrocode}
\newcommand*{\normal@footnotemarkX}[1]{%
@@ -9901,7 +9868,7 @@
% \end{macro}
%
% \begin{macro}{\normalbodyfootmarkX}
-% The \cs{normalbodyfootmarkX}\marg{series} \emph{really} typesets the
+% The \protect\cs{normalbodyfootmarkX}\marg{series} \emph{really} typesets the
% in-text marker. The style is the normal superscript.
% \begin{macrocode}
\newcommand*{\normalbodyfootmarkX}[1]{%
@@ -9911,8 +9878,8 @@
%
% \begin{macro}{\normalvfootnoteX}
% \changes{v1.5.1}{2013/08/16}{Fix bug with normal familiar footnotes when mixing RTL and LTR text.}
-% \cs{normalvfootnoteX}\marg{series}\marg{text} does the \cs{insert} for
-% the \meta{series} and calls the series' \cs{footfmt...} to format the
+% \protect\cs{normalvfootnoteX}\marg{series}\marg{text} does the \protect\cs{insert} for
+% the \meta{series} and calls the series' \protect\cs{footfmt...} to format the
% \meta{text}.
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnoteX}[2]{%
@@ -9947,7 +9914,7 @@
% \end{macro}
%
% \begin{macro}{\normalfootfmtX}
-% \cs{normalfootfmtX}\marg{series}\marg{text} typesets the footnote text,
+% \protect\cs{normalfootfmtX}\marg{series}\marg{text} typesets the footnote text,
% prepended by the marker.
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmtX}[2]{%
@@ -9968,7 +9935,7 @@
% \end{macro}
%
% \begin{macro}{\normalfootfootmarkX}
-% \cs{normalfootfootmarkX}\marg{series} is called by \cs{normalfootfmtX}
+% \protect\cs{normalfootfootmarkX}\marg{series} is called by \protect\cs{normalfootfmtX}
% to typeset the footnote marker in the footer before the footnote text.
% \begin{macrocode}
\newcommand*{\normalfootfootmarkX}[1]{%
@@ -9978,7 +9945,7 @@
% \end{macro}
%
% \begin{macro}{\normalfootstartX}
-% \cs{normalfootstartX}\marg{series} is the \meta{series} footnote
+% \protect\cs{normalfootstartX}\marg{series} is the \meta{series} footnote
% starting macro used in the output routine.
% \begin{macrocode}
\newcommand*{\normalfootstartX}[1]{%
@@ -10014,7 +9981,7 @@
% \end{macro}
%
% \begin{macro}{\normalfootgroupX}
-% \cs{normalfootgroupX}\marg{series} sends the contents of the \meta{series}
+% \protect\cs{normalfootgroupX}\marg{series} sends the contents of the \meta{series}
% insert box to the output page without alteration.
% \begin{macrocode}
\newcommand*{\normalfootgroupX}[1]{%
@@ -10054,8 +10021,8 @@
%
%
% \begin{macro}{\normalbfnoteX}
-% \changes{v0.7.0}{2005/02/18}{Removed extraneous space from \cs{normalbfnoteX}}
-% \changes{v1.4.9}{2013/07/10}{Allow to redefine \cs{thefootnoteX} with \c{alph} when some packages are loaded.}
+% \changes{v0.7.0}{2005/02/18}{Removed extraneous space from \protect\cs{normalbfnoteX}}
+% \changes{v1.4.9}{2013/07/10}{Allow to redefine \protect\cs{thefootnoteX} with \c{alph} when some packages are loaded.}
% \begin{macrocode}
\newcommand{\normalbfnoteX}[2]{%
@@ -10100,7 +10067,7 @@
%
%
% \begin{macro}{\vnumfootnoteX}
-% \changes{v0.7.0}{2005/02/18}{Removed extraneous space from \cs{vnumfootnoteX}}
+% \changes{v0.7.0}{2005/02/18}{Removed extraneous space from \protect\cs{vnumfootnoteX}}
% \begin{macrocode}
\newcommand{\vnumfootnoteX}[2]{%
\ifnumberedpar@
@@ -10115,7 +10082,7 @@
%
%
% \begin{macro}{arrangementX@normal}
-% \cs{arrangementX@normal}\marg{series} initialises the settings for
+% \protect\cs{arrangementX@normal}\marg{series} initialises the settings for
% the \meta{series} footnotes. This should always be called for
% each series.
% \begin{macrocode}
@@ -10182,7 +10149,7 @@
%
% \begin{macro}{\twocolfootsetupX}
% \begin{macro}{\mptwocolfootsetupX}
-% \cs{twocolfootsetupX}\marg{series}
+% \protect\cs{twocolfootsetupX}\marg{series}
% \begin{macrocode}
\newcommand*{\twocolfootsetupX}[1]{%
\count\csname footins#1\endcsname 500
@@ -10197,7 +10164,7 @@
% \end{macro}
%
% \begin{macro}{\twocolvfootnoteX}
-% \cs{twocolvfootnoteX}\marg{series}
+% \protect\cs{twocolvfootnoteX}\marg{series}
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnoteX}[2]{%
\insert\csname footins#1\endcsname\bgroup
@@ -10210,7 +10177,7 @@
% \end{macro}
%
% \begin{macro}{\twocolfootfmtX}
-% \cs{twocolfootfmtX}\marg{series}
+% \protect\cs{twocolfootfmtX}\marg{series}
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolfootfmtX}[2]{%
\protected@edef\@currentlabel{%
@@ -10231,7 +10198,7 @@
%
% \begin{macro}{\twocolfootgroupX}
% \begin{macro}{\mptwocolfootgroupX}
-% \cs{twocolfootgroupX}\marg{series}
+% \protect\cs{twocolfootgroupX}\marg{series}
% \begin{macrocode}
\newcommand*{\twocolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
\splittopskip=\ht\strutbox
@@ -10295,7 +10262,7 @@
%
% \begin{macro}{\threecolfootsetupX}
% \begin{macro}{\mpthreecolfootsetupX}
-% \cs{threecolfootsetupX}\marg{series}
+% \protect\cs{threecolfootsetupX}\marg{series}
% \begin{macrocode}
\newcommand*{\threecolfootsetupX}[1]{%
\count\csname footins#1\endcsname 333
@@ -10310,7 +10277,7 @@
% \end{macro}
%
% \begin{macro}{\threecolvfootnoteX}
-% \cs{threecolvfootnoteX}\marg{series}\marg{text}
+% \protect\cs{threecolvfootnoteX}\marg{series}\marg{text}
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnoteX}[2]{%
\insert\csname footins#1\endcsname\bgroup
@@ -10322,7 +10289,7 @@
% \end{macro}
%
% \begin{macro}{\threecolfootfmtX}
-% \cs{threecolfootfmtX}\marg{series}
+% \protect\cs{threecolfootfmtX}\marg{series}
% \begin{macrocode}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolfootfmtX}[2]{%
\protected@edef\@currentlabel{%
@@ -10343,7 +10310,7 @@
%
% \begin{macro}{\threecolfootgroupX}
% \begin{macro}{\mpthreecolfootgroupX}
-% \cs{threecolfootgroupX}\marg{series}
+% \protect\cs{threecolfootgroupX}\marg{series}
% \begin{macrocode}
\newcommand*{\threecolfootgroupX}[1]{{\csuse{notefontsizeX@#1}
\splittopskip=\ht\strutbox
@@ -10382,7 +10349,7 @@
%
% \begin{macro}{\arrangementX@threecol}
% \changes{v1.15.0}{2015/01/12}{Correct bug with paragraphed familiar footnotes setting.}
-% \cs{footparagraphX}\marg{series}
+% \protect\cs{footparagraphX}\marg{series}
% \begin{macrocode}
\newcommand*{\arrangementX@paragraph}[1]{%
\csgdef{series@displayX#1}{paragraph}%
@@ -10412,9 +10379,9 @@
% \end{macro}
%
% \begin{macro}{\para@footsetupX}
-% \cs{para@footsetupX}\marg{series}
-% \changes{v0.2.2}{2003/11/04}{Added \cs{footfudgefiddle} to \cs{para@footsetupX}}
-% \changes{v1.13.0}{2014/09/16}{In \cs{para@footsetupX}, use \cs{columnwidth} instead of \cs{hsize}}
+% \protect\cs{para@footsetupX}\marg{series}
+% \changes{v0.2.2}{2003/11/04}{Added \protect\cs{footfudgefiddle} to \protect\cs{para@footsetupX}}
+% \changes{v1.13.0}{2014/09/16}{In \protect\cs{para@footsetupX}, use \protect\cs{columnwidth} instead of \protect\cs{hsize}}
% \begin{macrocode}
\newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1}
\setnoteswidthliketwocolumnsX@{#1}%
@@ -10429,7 +10396,7 @@
% \end{macro}
%
% \begin{macro}{\parafootstartX}
-% \cs{parafootstartX}\marg{series}
+% \protect\cs{parafootstartX}\marg{series}
% \begin{macrocode}
\newcommand*{\parafootstartX}[1]{%
\ifdimequal{0pt}{\prenotesX@}{}%
@@ -10456,7 +10423,7 @@
%
% \begin{macro}{\para@vfootnoteX}
% \begin{macro}{\mppara@vfootnoteX}
-% \cs{para@vfootnoteX}\marg{series}\marg{text}
+% \protect\cs{para@vfootnoteX}\marg{series}\marg{text}
% \begin{macrocode}
\newcommand*{\para@vfootnoteX}[2]{%
\insert\csname footins#1\endcsname
@@ -10503,7 +10470,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\parafootfmtX}
-% \cs{parafootfmtX}\marg{series}
+% \protect\cs{parafootfmtX}\marg{series}
% \begin{macrocode}
\newcommand*{\parafootfmtX}[2]{%
\protected@edef\@currentlabel{%
@@ -10522,7 +10489,7 @@
%
% \begin{macro}{\para@footgroupX}
% \begin{macro}{\mppara@footgroupX}
-% \cs{para@footgroupX}\marg{series}
+% \protect\cs{para@footgroupX}\marg{series}
% \begin{macrocode}
\newcommand*{\para@footgroupX}[1]{%
\unvbox\csname footins#1\endcsname
@@ -10565,7 +10532,7 @@
% \end{macro}
% \end{macro}
% \paragraph{Insertion of the footnotes separator}
-% The command \cs{insertparafootsepX}\marg{series} must be called at the beginning of \cs{parafootftmX}.
+% The command \protect\cs{insertparafootsepX}\marg{series} must be called at the beginning of \protect\cs{parafootftmX}.
% \begin{macro}{\prevpage@num}
% \begin{macro}{\Xinsertparafootsep}
% \begin{macrocode}
@@ -10578,15 +10545,15 @@
% \end{macro}
% \end{macro}
% \section{Code common to both critical and familiar footnote in normal arrangement}
-% \cs{par} should always be redefined to \cs{endgraf} within
-% the format macro (this is what \cs{normal@pars} does),
+% \protect\cs{par} should always be redefined to \protect\cs{endgraf} within
+% the format macro (this is what \protect\cs{normal@pars} does),
% to override tricky material in the main text
% to get the lines numbered automatically (as set up by
-% \cs{autopar}, for example).
+% \protect\cs{autopar}, for example).
%
% In the case of footnote arranged in a ``normal'' way, we also must set some setting for paragraph indent and text direction when using \LuaLaTeX.
%
-% That why we have defined \cs{ledsetnormalparstuff@common} in order to make this setting for both familiar and critical notes.
+% That why we have defined \protect\cs{ledsetnormalparstuff@common} in order to make this setting for both familiar and critical notes.
% This command is called by command to make specific setting to critical or familiar footnote.
%
% \begin{macro}{\ledsetnormalparstuff@common}
@@ -10594,7 +10561,7 @@
% \begin{macro}{\ledsetnormalparstuffX}
%
% \changes{v1.4.0}{2012/11/16}{Direction of footnotes with polyglossia.}
-% \changes{v1.21.0}{2015/04/13}{\cs{ledsetnormalparstuff} is deprecated and becomes \cs{ledsetnormalparstuffX} and \cs{Xledsetnormalparstuff}.}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{ledsetnormalparstuff} is deprecated and becomes \protect\cs{ledsetnormalparstuffX} and \protect\cs{Xledsetnormalparstuff}.}
% \begin{macrocode}
\newcommand*{\ledsetnormalparstuff@common}{%
\ifluatex%
@@ -10625,7 +10592,7 @@
% \begin{macro}{\setXnoteswidthliketwocolumns@}
% \begin{macro}{\setnoteswidthliketwocolumnsX@}
% These two commands are called at the beginning of critical or familiar notes groups.
-% They set, if the option is enabled, the \cs{hsize}. They are also called at the on the setup for paragraphed notes.
+% They set, if the option is enabled, the \protect\cs{hsize}. They are also called at the on the setup for paragraphed notes.
% \begin{macrocode}
\newdimen\old@hsize%
@@ -10688,7 +10655,7 @@
% \begin{macro}{\mpfnpos}
% \begin{macro}{\@fnpos}
% \begin{macro}{\@mpfnpos}
-% The \cs{fnpos} and \cs{mpfnpos} simply place their arguments in \cs{@fnpos} and \cs{@mpfnpos}, which will be used later in the output routine.
+% The \protect\cs{fnpos} and \protect\cs{mpfnpos} simply place their arguments in \protect\cs{@fnpos} and \protect\cs{@mpfnpos}, which will be used later in the output routine.
% \begin{macrocode}
\def\@fnpos{familiar-critical}
\def\@mpfnpos{critical-familiar}
@@ -10700,11 +10667,11 @@
% \end{macro}
% \end{macro}
% \section{Footnotes' rule}
-% Because the footnotes' rules can be shifted to the right when footnotes are set like two columns, we do not print them directly, but we put them in a \cs{vbox}.
+% Because the footnotes' rules can be shifted to the right when footnotes are set like two columns, we do not print them directly, but we put them in a \protect\cs{vbox}.
%
% \begin{macro}{\print@Xfootnoterule}
% \begin{macro}{\print@footnoteXrule}
-% \changes{v1.21.0}{2015/04/13}{Code refactoring: the spaces after the footnote rules are directly managed in \cs{print@Xfootnoterule} and \cs{print@footnoteXrule}}
+% \changes{v1.21.0}{2015/04/13}{Code refactoring: the spaces after the footnote rules are directly managed in \protect\cs{print@Xfootnoterule} and \protect\cs{print@footnoteXrule}}
% \begin{macrocode}
\newcommand{\print@Xfootnoterule}[1]{%
\vskip-\csuse{Xafterrule@#1}%Because count in \dimen\csuse{#1footins}
@@ -10727,10 +10694,10 @@
% \end{macro}
% \section{Specific skip for first series of footnotes}\label{skipfirstseries}
% \subsubsection{Overview}
-% \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 \cs{prepare@preXnotes} before inserting any critical notes, in order to prevent page number overlapping.
+% \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@preXnotes} 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 \cs{Xbeforenotes}. It also keeps the series of the note as the first one of the current page.
+% \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:
% \begin{itemize}
% \item If the current series is printed after the series kept as the first of the current page, then nothing happens.
@@ -10739,22 +10706,22 @@
% \end{enumerate}
%
%
-% For example, suppose the series order is A,B. We call first a \cs{Bfootnote} and a \cs{Afootnote}. The only skips used are, finally, the skip specific to the first series of the page, and the skip for the B series. If we have not called \cs{Afootnote}, the only skip used is the skip specific to the first series of the page.
+% For example, suppose the series order is A,B. We call first a \protect\cs{Bfootnote} and a \protect\cs{Afootnote}. The only skips used are, finally, the skip specific to the first series of the page, and the skip for the B series. If we have not called \protect\cs{Afootnote}, the only skip used is the skip specific to the first series of the page.
%
% That is perfect.
%
%
% The series skip and the first series of the current page are reset before the footnotes are printed. Then, the footstart macros manage the problem of the first series of the page.
%
-% After the rule, the space which is defined by \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.
+% 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}
% \begin{macro}{\preXnotes@}
% \begin{macro}{\preXnotes}
-% \changes{v1.1.0}{2012/09/25}{New skip \cs{preXnotes@}}
+% \changes{v1.1.0}{2012/09/25}{New skip \protect\cs{preXnotes@}}
% \changes{v1.2.0}{2012/10/08}{Debug in familiar footnotes (bug introduced by v1.1).}
-% If user redefines \cs{preXnotes@}, via \cs{preXnotes} to a value greater than 0~pt,
+% If user redefines \protect\cs{preXnotes@}, via \protect\cs{preXnotes} to a value greater than 0~pt,
% this skip will be added before first series notes
% instead of the notes skip.
% \begin{macrocode}
@@ -10806,7 +10773,7 @@
% \end{macro}
% \end{macro}
%
-% The same thing is required for familiar notes and \cs{prenotesX}.
+% The same thing is required for familiar notes and \protect\cs{prenotesX}.
% \begin{macro}{firstseriesX@}
% \begin{macro}{prepare@prenotesX}
% \begin{macrocode}
@@ -10846,9 +10813,9 @@
%
% \begin{macro}{\l@dend@open}
% \begin{macro}{\l@dend@close}
-% \cs{l@dend@open} and \cs{l@dend@close} are the
+% \protect\cs{l@dend@open} and \protect\cs{l@dend@close} are the
% macros that are used to open and close the endnote file. Note that
-% all our writing to this file is \cs{immediate}: all page and
+% all our writing to this file is \protect\cs{immediate}: all page and
% line numbers for the endnotes are generated by the same mechanism
% we use for the footnotes, so that there is no need to defer any
% writing to catch information from the output routine.
@@ -10872,9 +10839,9 @@
% \end{macro}
%
% \begin{macro}{\l@dend@stuff}
-% \cs{l@dend@stuff} is used by \cs{beginnumbering} to
+% \protect\cs{l@dend@stuff} is used by \protect\cs{beginnumbering} to
% do everything that is necessary for the endnotes at the
-% start of each section: it opens the \cs{l@d@end} file, if necessary,
+% start of each section: it opens the \protect\cs{l@d@end} file, if necessary,
% and writes the section number to the endnote file.
% \begin{macrocode}
\newcommand{\l@dend@stuff}{%
@@ -10891,22 +10858,22 @@
%
% \begin{macro}{\endprint}
% \begin{macro}{\l@d@section}
-% The \cs{endprint} here is nearly identical in its
-% functioning to \cs{normalfootfmt}.
+% The \protect\cs{endprint} here is nearly identical in its
+% functioning to \protect\cs{normalfootfmt}.
%
-% The endnote file also contains \cs{l@d@section} commands, which
+% The endnote file also contains \protect\cs{l@d@section} commands, which
% supply the section numbers from the main text; standard \macpackage{} does
% nothing with this information, but it is there if you want to write
% custom macros to do something with it.
% \changes{v1.18.0}{2015/02/23}{Option parapparatus works for endnotes.}
-% \changes{v1.21.0}{2015/04/13}{\cs{endnotes} take five arguments.}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{endnotes} take five arguments.}
% Arguments are:
% \begin{itemize}
% \item \verb+#1+ Line numbers and font selection.
% \item \verb+#2+ Lemma.
% \item \verb+#3+ Note content.
% \item \verb+#4+ Series.
-% \item \verb+#5+ Optional argument of \cs{Xendnote}.
+% \item \verb+#5+ Optional argument of \protect\cs{Xendnote}.
% \end{itemize}
% \begin{macrocode}
\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5{{%
@@ -10960,7 +10927,7 @@
% \begin{macro}{\printlineendnotearea}
%
% This macro prints the space before the line number, changes the font, then prints the line number and the space after it.
-% It is called by \cs{endprint}
+% It is called by \protect\cs{endprint}
% depending of the options about repeating line numbers.
% The first argument is line information, the second is the notes series (A, B, C, etc.)
% \begin{macrocode}
@@ -10982,21 +10949,21 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\setprintendlines}
-% The \cs{printendlines} macro is similar to \cs{printlines} but is
+% The \protect\cs{printendlines} macro is similar to \protect\cs{printlines} but is
% for printing endnotes rather than footnotes.
%
% The principal difference between foot- and endnotes is that footnotes
% are printed on the page where they are specified but endnotes
% are printed at a different point in the document. We need an indication
-% of the source of an endnote; \cs{setprintendlines} provides this
+% of the source of an endnote; \protect\cs{setprintendlines} provides this
% by always printing the page number. The coding is slightly simpler than
-% \cs{setprintlines}.
+% \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 \cs{setprintendlines} for use by
-% \cs{printendlines}}
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{setprintendlines} for use by
+% \protect\cs{printendlines}}
% \begin{macrocode}
\newcommand*{\setprintendlines}[6]{%
\l@d@pnumfalse \l@d@dashfalse
@@ -11074,7 +11041,7 @@
}%
\fi%
% \end{macrocode}
-% End of \cs{setprintendlines}.
+% End of \protect\cs{setprintendlines}.
% \begin{macrocode}
}%
% \end{macrocode}
@@ -11082,8 +11049,8 @@
%
% \begin{macro}{\printendlines}
% Now we are ready to print it all.
-% \changes{v0.3.0}{2004/02/14}{Added \cs{linenumr@p} and \cs{sublinenumr@p}
-% to \cs{printendlines}}
+% \changes{v0.3.0}{2004/02/14}{Added \protect\cs{linenumr@p} and \protect\cs{sublinenumr@p}
+% to \protect\cs{printendlines}}
% \begin{macrocode}
\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
\setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}%
@@ -11142,11 +11109,11 @@
%
% \begin{macro}{\doendnotes}
% \begin{macro}{\ifXendinsertsep@}
-% \cs{doendnotes} is
+% \protect\cs{doendnotes} is
% the command you use to print one series of endnotes; it
% takes one argument: the series letter of the note series you want
% to print.
-% \cs{Xendinsertsep@} is set to true at the first note of the series, and to false at the last one.
+% \protect\cs{Xendinsertsep@} is set to true at the first note of the series, and to false at the last one.
% \begin{macrocode}
\newif\ifXendinsertsep@%
\newcommand*{\doendnotes}[1]{%
@@ -11161,9 +11128,9 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\doendnotesbysection}
-% \cs{doendnotesbysection} is a variant of the previous macro.
-% While \cs{doendnotes} print endnotes for all of numbered sections
-% \cs{doendnotesbysection} print the endnotes for the first numbered section at its first call for a series, then for the second section at its second call for the same series, then for the third section at its third call for the same series, and so on.
+% \protect\cs{doendnotesbysection} is a variant of the previous macro.
+% While \protect\cs{doendnotes} print endnotes for all of numbered sections
+% \protect\cs{doendnotesbysection} print the endnotes for the first numbered section at its first call for a series, then for the second section at its second call for the same series, then for the third section at its third call for the same series, and so on.
% \begin{macrocode}
\newcommand*{\doendnotesbysection}[1]{%
\l@dend@close{#1}%
@@ -11188,7 +11155,7 @@
% \section{Generate series of notes}%
% In this section, X means the name of the series (A, B etc.)
% \begin{macro}{\series}
-% \cs{series}\cs{series} creates one more new series. It is a public command, which just loops on the private command \cs{newseries@}.
+% \protect\cs{series}\protect\cs{series} creates one more new series. It is a public command, which just loops on the private command \protect\cs{newseries@}.
% \begin{macrocode}
\newcommand{\newseries}[1]{%
\def\do##1{\newseries@{##1}}%
@@ -11197,12 +11164,12 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@series}
-% The \cs{series@} macro is an \Lpack{etoolbox} list, which contains the name of all series.
+% The \protect\cs{series@} macro is an \protect\package{etoolbox} list, which contains the name of all series.
% \begin{macrocode}
\newcommand{\@series}{}
% \end{macrocode}
% \end{macro}
-% The command \cs{newseries@}\cs{series} creates a new series of the footnote.
+% The command \protect\cs{newseries@}\protect\cs{series} creates a new series of the footnote.
% \begin{macro}{\newseries@}
% \begin{macrocode}
\newcommand{\newseries@}[1]{
@@ -11213,7 +11180,7 @@
{%
% \end{macrocode}
% \subsection{Init specific to \parpackage}
-% When calling \cs{newseries@} after having loaded \parpackage, we need to load specific setting.
+% When calling \protect\cs{newseries@} after having loaded \parpackage, we need to load specific setting.
% \begin{macrocode}
\ifdefined\newseries@par%
\newseries@par{#1}%
@@ -11221,7 +11188,7 @@
% \end{macrocode}
% \subsection{For critical footnotes}
% Critical footnotes are those which start with letters.
-% We look for the \cs{nocritical} option of \macpackage.
+% We look for the \protect\cs{nocritical} option of \macpackage.
% \begin{macrocode}
\unless\ifnocritical@
% \end{macrocode}
@@ -11282,10 +11249,10 @@
\expandafter\newinsert\csname mp#1footins\endcsname%
\fi%
% \end{macrocode}
-% \subsubsection{Create commands for critical apparatus, \cs{Afootnote}, \cs{Bfootnote} etc.}
+% \subsubsection{Create commands for critical apparatus, \protect\cs{Afootnote}, \protect\cs{Bfootnote} etc.}
% Note the double \# in command: it is because command it is made inside another command.
% \changes{v1.4.0}{2012/11/16}{Remembers the language of the lemma, in order to create a correct direction for the footnote separator.}
-% \changes{v1.23.0}{2015/04/29}{Prevent spurious spaces when \cs{Afootnote} and similar commands are followed by spaces (bug added on 1.0.0!).}
+% \changes{v1.23.0}{2015/04/29}{Prevent spurious spaces when \protect\cs{Afootnote} and similar commands are followed by spaces (bug added on 1.0.0!).}
% \begin{macrocode}
\global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
\ifnum\@edtext@level>0%
@@ -11381,8 +11348,8 @@
\expandafter\newinsert\csname mpfootins#1\endcsname%
\fi%
% \end{macrocode}
-%\subsubsection{Create tools for familiar footnotes (\cs{footnoteX})}
-% First, create the \cs{footnoteX} command.
+%\subsubsection{Create tools for familiar footnotes (\protect\cs{footnoteX})}
+% First, create the \protect\cs{footnoteX} command.
% Note the double \# in command: it is because a command is called inside another command.
% \begin{macrocode}
@@ -11415,7 +11382,7 @@
% \end{macrocode}
% \subsection{The endnotes}
% \changes{v2.0.0}{2015/07/19}{One endnotes file by series.}
-% Endnotes are commands like \cs{Xendnote}, where X is a series letter.
+% Endnotes are commands like \protect\cs{Xendnote}, where X is a series letter.
% First, we check for the \verb+noend+ options.
% \begin{macrocode}
\unless\ifnoend@
@@ -11427,8 +11394,8 @@
% \begin{macro}{\l@dend@Xfalse}
% Endnotes of all varieties are saved up in a file, one by series, typically named
% \meta{jobname}\file{.Xend}.
-% \cs{l@d@end} is the output stream number for
-% this file, and \cs{ifl@dend@X} is a flag that is \verb"true" when the file is open.
+% \protect\cs{l@d@end} is the output stream number for
+% this file, and \protect\cs{ifl@dend@X} is a flag that is \verb"true" when the file is open.
%
%
% \begin{macrocode}
@@ -11440,9 +11407,9 @@
% \end{macro}
% \end{macro}
% \subsubsection{The main macro}
-% The \cs{Xendnote} macro functions to
+% The \protect\cs{Xendnote} macro functions to
% write one endnote to the \file{.Xend} file. We change
-% \cs{newlinechar} so that in the file every space becomes the
+% \protect\cs{newlinechar} so that in the file every space becomes the
% start of a new line; this generally ensures that a long note does not
% exceed restrictions on the length of lines in files.
% \begin{macrocode}
@@ -11465,18 +11432,18 @@
\ignorespaces%
}%
% \end{macrocode}
-% \cs{Xendnote} commands called \cs{Xend} commands on to the endnote file; these are analogous to the various
+% \protect\cs{Xendnote} commands called \protect\cs{Xend} commands on to the endnote file; these are analogous to the various
% \verb"footfmt" commands above, and they take the same arguments.
% When we process this file, we want to pick out the notes of one
% series and ignore all the rest. To do that, we equate the \verb"end"
-% command for the series we want to \cs{endprint}, and leave the
-% rest equated to \cs{@gobblefive}, which just skips over its five
+% command for the series we want to \protect\cs{endprint}, and leave the
+% rest equated to \protect\cs{@gobblefive}, which just skips over its five
% arguments.
% \begin{macrocode}
\global\cslet{#1end}{\@gobblefive}
% \end{macrocode}
-% We need to store the number of times \cs{doendnotesbysection} is called for one series.
+% We need to store the number of times \protect\cs{doendnotesbysection} is called for one series.
% \begin{macrocode}
\global\expandafter\newcount\csname #1end@bysection\endcsname%
% \end{macrocode}
@@ -11513,7 +11480,7 @@
% \begin{macrocode}
\fi%
% \end{macrocode}
-% Dump series in \cs{@series}
+% Dump series in \protect\cs{@series}
% \begin{macrocode}
\listxadd{\@series}{#1}
}
@@ -11527,9 +11494,9 @@
% \section{Setting series display}
% \subsection{Change series order}
% \changes{v1.1.0}{2012/09/25}{New tools to change order of series}
-% \changes{v1.21.0}{2015/04/13}{\cs{seriesatbegin} and \cs{seriesatbegin} more efficient}
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{seriesatbegin} and \protect\cs{seriesatbegin} more efficient}
% \begin{macro}{\seriesatbegin}
-% \cs{seriesatbegin}\marg{s} changes the order of series, to put the series \meta{s} at the beginning of the list.
+% \protect\cs{seriesatbegin}\marg{s} changes the order of series, to put the series \meta{s} at the beginning of the list.
% The series can be the result of a command.
% \begin{macrocode}
\newcommand{\seriesatbegin}[1]{%
@@ -11542,8 +11509,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\seriesatend}
-% \changes{v1.21.0}{2015/04/13}{Fix spurious space in \cs{seriesatend}}
-% And \cs{seriesatend} moves the series to the end of the list.
+% \changes{v1.21.0}{2015/04/13}{Fix spurious space in \protect\cs{seriesatend}}
+% And \protect\cs{seriesatend} moves the series to the end of the list.
% \begin{macrocode}
\newcommand{\seriesatend}[1]{%
\StrDel{\@series}{#1}[\@series]%
@@ -11556,7 +11523,7 @@
% \end{macro}
% \subsection{Test series order}
% \begin{macro}{\ifseriesbefore}
-% \cs{ifseriesbefore}\marg{seriesA}\marg{seriesB}\marg{true}\marg{false} expands \meta{true} if \meta{seriesA} is printed before \meta{seriesB}, expands \meta{false} otherwise.
+% \protect\cs{ifseriesbefore}\marg{seriesA}\marg{seriesB}\marg{true}\marg{false} expands \meta{true} if \meta{seriesA} is printed before \meta{seriesB}, expands \meta{false} otherwise.
% \begin{macrocode}
\newcommand{\ifseriesbefore}[4]{%
\StrPosition{\@series}{#1}[\@first]%
@@ -11579,16 +11546,16 @@
% \changes{v1.0.0}{2012/09/15}{New generic commands to customize footnote display.}
% \subsection{Series setting}
% \subsubsection{General way of working}
-% The setting's command (like \cs{numberonlyfirstinline}), also called ``hooks'' can be divided in two categories: those which require a string values and those which require a boolean value.
+% The setting's command (like \protect\cs{numberonlyfirstinline}), also called ``hooks'' can be divided in two categories: those which require a string values and those which require a boolean value.
% The first category includes those which require a length value, because we store the length's expression send by user and we evaluate it only in the commands which requires to know the setting.
% The second category require boolean value only when it is set to FALSE.
% Otherwise, we understand the insinuated value is TRUE.
%
-% For each ``hook'' command, we store the value in commands (first category) or a \Lpack{etoolbox}'s toggle (second category) which names are in the form \cs{<hook>@<series>}.
-% For example when calling \cs{twolines}\marg{sq.}, we store \verb+sq.+ in commands \cs{twolines@A}, \cs{twolines@B}, \cs{twolines@C}\ldots for each series defined for use with \macpackage, or, if the \oarg{series} optional argument was send, for each series of this argument.
+% For each ``hook'' command, we store the value in commands (first category) or a \protect\package{etoolbox}'s toggle (second category) which names are in the form \protect\cs{<hook>@<series>}.
+% For example when calling \protect\cs{twolines}\marg{sq.}, we store \verb+sq.+ in commands \protect\cs{twolines@A}, \protect\cs{twolines@B}, \protect\cs{twolines@C}\ldots for each series defined for use with \macpackage, or, if the \oarg{series} optional argument was send, for each series of this argument.
%
% These values are tested in some specific places, scattered in all the code, depending of their effects.
-% The default values are defined by the \cs{newseries@} command.
+% The default values are defined by the \protect\cs{newseries@} command.
%
%
% In order to prevent code duplication, we have created some generic commands.
@@ -11599,15 +11566,15 @@
%
% \subsubsection{Tools to set options}
% \begin{macro}{\settoggle@series}
-% \changes{v1.1.0}{2012/09/25}{\cs{settoggle@series} switch the global value of the toggle, not only the local value.}
-% \changes{v1.13.0}{2014/09/16}{\cs{settoggle@series} can take an optional arguments to reload series setup.}
-% \cs{settoggle@series}\marg{series}\marg{toggle}\marg{value} is a generic command to switch toggles for some series.
+% \changes{v1.1.0}{2012/09/25}{\protect\cs{settoggle@series} switch the global value of the toggle, not only the local value.}
+% \changes{v1.13.0}{2014/09/16}{\protect\cs{settoggle@series} can take an optional arguments to reload series setup.}
+% \protect\cs{settoggle@series}\marg{series}\marg{toggle}\marg{value} is a generic command to switch toggles for some series.
% The arguments are:
% \begin{itemize}
% \item \verb+#1+ (mandatory): the series for which the hooks should be set. If empty, all the series will be affected.
% \item \verb+#2+ (mandatory): the name of the hook.
% \item \verb+#3+ (mandatory): the new value of toggle (true or false).
-% \item \verb+#4+ (optional): if equal to \verb+reload+, reload the footnote setting (call again \cs{Xarrangement} or \cs{arrangementX} or \ldots\ depending of the footnote display).
+% \item \verb+#4+ (optional): if equal to \verb+reload+, reload the footnote setting (call again \protect\cs{Xarrangement} or \protect\cs{arrangementX} or \ldots\ depending of the footnote display).
% \item \verb+#5+ (optional): if not empty, and if \verb+#1+ is empty, change the hook setting for pseudo-series, as \verb+appref+.
% \end{itemize}
% \begin{macrocode}
@@ -11634,13 +11601,13 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\setcommand@series}
-% \cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to store hook's value into commands specific to some series.
+% \protect\cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to store hook's value into commands specific to some series.
% The arguments are:
% \begin{itemize}
% \item \verb+#1+ (mandatory): the series for which the hooks should be set. If empty, all the series will be affected.
% \item \verb+#2+ (mandatory): the name of the hook.
% \item \verb+#3+ (mandatory): the new value of the hook/command.
-% \item \verb+#4+ (optional): if equal to \verb+reload+, reload the footnote setting (call \cs{footnormal} or \cs{footparagraph} or \ldots\ depending of the footnote display).
+% \item \verb+#4+ (optional): if equal to \verb+reload+, reload the footnote setting (call \protect\cs{footnormal} or \protect\cs{footparagraph} or \ldots\ depending of the footnote display).
% \item \verb+#5+ (optional): if not empty, and if \verb+#1+ is empty, change the hook setting for pseudo-series, as \verb+appref+.
% \end{itemize}
% \begin{macrocode}
@@ -11665,11 +11632,11 @@
% \end{macro}
% \subsubsection{Tools to generate options commands}
% \begin{macro}{\newhookcommand@series}
-% \cs{newhookcommand@series}\cs{command names} is a generic command to add new commands for hooks, like \cs{Xhsizetwocol}.
-% The first argument is the name of the hook, the second a comma separated list of pseudo-series where the hook can be used, like \verb+appref+ in the case of \cs{Xtwolines}.
-% The second argument is also used to create commands named \cs{<hookname><pseudoseries>},
-% like \cs{Xtwolinesappref}.
-% \changes{v1.21.0}{2015/04/13}{\cs{newhookcommand@series} can take an optional argument.}
+% \protect\cs{newhookcommand@series}\protect\cs{command names} is a generic command to add new commands for hooks, like \protect\cs{Xhsizetwocol}.
+% The first argument is the name of the hook, the second a comma separated list of pseudo-series where the hook can be used, like \verb+appref+ in the case of \protect\cs{Xtwolines}.
+% The second argument is also used to create commands named \protect\cs{<hookname><pseudoseries>},
+% like \protect\cs{Xtwolinesappref}.
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{newhookcommand@series} can take an optional argument.}
% \begin{macrocode}
\newcommandx{\newhookcommand@series}[2][2,usedefault]{%
\global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
@@ -11687,10 +11654,10 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\newhooktoggle@series}
-%\cs{newhooktoggle@series}\cs{command names} is a generic command to add new commands for a new toggle hook, like \cs{Xnumberonlyfirstinline}.
-% The second argument is also used to create commands named \cs{<hookname><pseudoseries>},
-% like \cs{Xtwolinesbutnotmoreappref}.
-% \changes{v1.21.0}{2015/04/13}{\cs{newhooktoggle@series} can take an optional argument.}
+%\protect\cs{newhooktoggle@series}\protect\cs{command names} is a generic command to add new commands for a new toggle hook, like \protect\cs{Xnumberonlyfirstinline}.
+% The second argument is also used to create commands named \protect\cs{<hookname><pseudoseries>},
+% like \protect\cs{Xtwolinesbutnotmoreappref}.
+% \changes{v1.21.0}{2015/04/13}{\protect\cs{newhooktoggle@series} can take an optional argument.}
% \begin{macrocode}
\newcommandx{\newhooktoggle@series}[2][2,usedefault]{%
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
@@ -11708,8 +11675,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\newhooktoggle@series@reload}
-% \changes{v1.13.0}{2014/09/16}{Add \cs{newhookcommand@toggle@reload}}
-% \cs{newhookcommand@toggle@reload} does the same thing as \cs{newhooktoggle@series}
+% \changes{v1.13.0}{2014/09/16}{Add \protect\cs{newhookcommand@toggle@reload}}
+% \protect\cs{newhookcommand@toggle@reload} does the same thing as \protect\cs{newhooktoggle@series}
% but the commands created by this macro also reload the series arrangement.
% \begin{macrocode}
\newcommand{\newhooktoggle@series@reload}[1]{%
@@ -11720,10 +11687,10 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\newhookcommand@series@reload}
-% \changes{v1.8.0}{2013/11/24}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which did not work.}
-% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which did not work when called after \cs{footparagraphX}.}
-% \changes{v1.12.0}{2014/08/05}{Debug \cs{Xbeforenotes} and \cs{Xmaxhnotes} which did not work when called after \cs{footparagraph}.}
-% \cs{newhookcommand@series@reload} does the same thing as \cs{newhookcommand@series}
+% \changes{v1.8.0}{2013/11/24}{Debug \protect\cs{beforenotesX} and \protect\cs{maxhnotesX} which did not work.}
+% \changes{v1.12.0}{2014/08/05}{Debug \protect\cs{beforenotesX} and \protect\cs{maxhnotesX} which did not work when called after \protect\cs{footparagraphX}.}
+% \changes{v1.12.0}{2014/08/05}{Debug \protect\cs{Xbeforenotes} and \protect\cs{Xmaxhnotes} which did not work when called after \protect\cs{footparagraph}.}
+% \protect\cs{newhookcommand@series@reload} does the same thing as \protect\cs{newhookcommand@series}
% but the commands created by this macro also reload the series' arrangement.
%
% \begin{macrocode}
@@ -11735,7 +11702,7 @@
% \end{macrocode}
% \end{macro}
% \subsubsection{Options for critical notes}
-% Before generating the commands that are used to set the critical notes, such as \cs{Xnumberonlyfirstinline}, \cs{Xlemmaseparator} and the like, we check the \verb+nocritical+ option.
+% Before generating the commands that are used to set the critical notes, such as \protect\cs{Xnumberonlyfirstinline}, \protect\cs{Xlemmaseparator} and the like, we check the \verb+nocritical+ option.
% \begin{macrocode}
\unless\ifnocritical@
\newhooktoggle@series{Xparindent}
@@ -11788,7 +11755,7 @@
\fi
% \end{macrocode}
% \subsubsection{Options for familiar notes}
-% Before generating the optional commands for familiar notes, we check the \cs{nofamiliar} option.
+% Before generating the optional commands for familiar notes, we check the \protect\cs{nofamiliar} option.
% \begin{macrocode}
\unless\ifnofamiliar@
\newhooktoggle@series{parindentX}
@@ -11809,7 +11776,7 @@
\fi
% \end{macrocode}
% \subsubsection{Options for endnotes}
-% Before generating the commands that are used to set the endnotes, such as \cs{Xnumberonlyfirstinline}, \cs{Xlemmaseparator}+ and the like, we check the \verb+noend+ option.
+% Before generating the commands that are used to set the endnotes, such as \protect\cs{Xnumberonlyfirstinline}, \protect\cs{Xlemmaseparator}+ and the like, we check the \verb+noend+ option.
% \begin{macrocode}
\unless\ifnoend@
\newhookcommand@series{Xendtwolines}[apprefwithpage]
@@ -11842,32 +11809,32 @@
% \end{macrocode}
% \subsection{Hooks for a particular footnote}
% \begin{macro}{\fulllines@}
-%\cs{fulllines@} toggle is used to print the full lines references, and not the abbreviated form defined by \cs{Xtwolines} and \cs{Xmorethantwolines}.
+%\protect\cs{fulllines@} toggle is used to print the full lines references, and not the abbreviated form defined by \protect\cs{Xtwolines} and \protect\cs{Xmorethantwolines}.
% \begin{macrocode}
\newtoggle{fulllines@}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\nonum@}
-%\cs{nonum@} toggle is used to disable line number printing in a particular footnote.
+%\protect\cs{nonum@} toggle is used to disable line number printing in a particular footnote.
% \begin{macrocode}
\newtoggle{nonum@}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\nosep@}
-%\cs{nonum@} toggle is used to disable the lemma separator in a particular footnote.
+%\protect\cs{nonum@} toggle is used to disable the lemma separator in a particular footnote.
% \begin{macrocode}
\newtoggle{nosep@}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\nomk@}
-%\cs{nomk@} toggle is used by \parpackage{} to remove the footnote mark in the text when using \cs{footnoteXmk}. Read \parpackage handbook.
+%\protect\cs{nomk@} toggle is used by \parpackage{} to remove the footnote mark in the text when using \protect\cs{footnoteXmk}. Read \parpackage handbook.
% \begin{macrocode}
\newtoggle{nomk@}%
% \end{macrocode}
% \end{macro}
% \subsection{Alias}
% \begin{macro}{\Xnolemmaseparator}
-%\cs{Xnolemmaseparator}\oarg{series} is just an alias for \cs{Xlemmaseparator}\oarg{series}\verb|{}|.
+%\protect\cs{Xnolemmaseparator}\oarg{series} is just an alias for \protect\cs{Xlemmaseparator}\oarg{series}\verb|{}|.
% \begin{macrocode}
\newcommandx*{\Xnolemmaseparator}[1][1]{\Xlemmaseparator[#1]{}}
% \end{macrocode}
@@ -11883,7 +11850,7 @@
% \subsubsection{Page number management}
% \begin{macro}{\pageno}
% \begin{macro}{\advancepageno}
-% \cs{pageno} is a page number, starting at 1, and \cs{advancepageno}
+% \protect\cs{pageno} is a page number, starting at 1, and \protect\cs{advancepageno}
% increments the number.
% \begin{macrocode}
\countdef\pageno=0 \pageno=1
@@ -11897,20 +11864,20 @@
%
% \subsubsection{Extra footnotes output}
%
-% With luck we might only have to change \cs{@makecol} and
-% \cs{@reinserts} of the \LaTeX's kernel.
-% Since \reledmac, we use \Lpack{etoolbox}'s patching commands instead of overriding.
+% With luck we might only have to change \protect\cs{@makecol} and
+% \protect\cs{@reinserts} of the \LaTeX's kernel.
+% Since \reledmac, we use \protect\package{etoolbox}'s patching commands instead of overriding.
% It should provides better compatibility with other package which modify these commands
%
% \begin{macro}{\doxtrafeet}
-% \cs{doxtrafeet} is the code extending \cs{@makecol} to cater for
+% \protect\cs{doxtrafeet} is the code extending \protect\cs{@makecol} to cater for
% 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.
-% \changes{v0.2.1}{2003/09/13}{Renamed \cs{doxtrafeet} to \cs{l@ddoxtrafeet}}
-% \changes{v1.9.0}{2014/02/05}{Add \cs{fnpos} to choice the order of footnotes.}
+% \changes{v0.2.1}{2003/09/13}{Renamed \protect\cs{doxtrafeet} to \protect\cs{l@ddoxtrafeet}}
+% \changes{v1.9.0}{2014/02/05}{Add \protect\cs{fnpos} to choice the order of footnotes.}
% \begin{macrocode}
\newcommand*{\l@ddoxtrafeet}{%
\IfStrEq{familiar-critical}{\@fnpos}
@@ -11926,9 +11893,9 @@
% \end{macro}
%
% \begin{macro}{\Xdo@feet}
-% \cs{Xdo@feet} is the code extending \cs{@makecol} to cater for
+% \protect\cs{Xdo@feet} is the code extending \protect\cs{@makecol} to cater for
% the extra critical feet.
-% \changes{v0.4.1}{2004/03/06}{Changed \cs{Xdo@feet} code for easier extensions}
+% \changes{v0.4.1}{2004/03/06}{Changed \protect\cs{Xdo@feet} code for easier extensions}
% \begin{macrocode}
\newcommand*{\Xdo@feet}{%
\setbox\@outputbox \vbox{%
@@ -11940,9 +11907,9 @@
% \begin{macro}{\@opXfeet}
% \begin{macro}{\print@Xnotes}
% The extra critical feet to be added to the output.
-% \changes{v0.4.1}{2004/03/06}{Added \cs{@opXfeet}}
+% \changes{v0.4.1}{2004/03/06}{Added \protect\cs{@opXfeet}}
% The normal way to add one series,
-% \cs{print@Xnotes}, is replaced by \parpackage when using \cs{Pages}.
+% \protect\cs{print@Xnotes}, is replaced by \parpackage when using \protect\cs{Pages}.
% \begin{macrocode}
\newcommand\print@Xnotes[1]{%
\csuse{#1footstart}{#1}%
@@ -11971,10 +11938,10 @@
%
%
% \begin{macro}{\l@ddodoreinxtrafeet}
-% \cs{l@ddodoreinxtrafeet} is the code for catering for the extra footnotes
-% within \cs{@reinserts}.
-% We use the same category and ordering as in \cs{l@ddoxtrafeet}.
-% \changes{v0.2.1}{203/09/13}{Renamed \cs{dodoreinxtrafeet} to \cs{l@ddodoreinxtrafeet}}
+% \protect\cs{l@ddodoreinxtrafeet} is the code for catering for the extra footnotes
+% within \protect\cs{@reinserts}.
+% We use the same category and ordering as in \protect\cs{l@ddoxtrafeet}.
+% \changes{v0.2.1}{203/09/13}{Renamed \protect\cs{dodoreinxtrafeet} to \protect\cs{l@ddodoreinxtrafeet}}
% \begin{macrocode}
\newcommand*{\l@ddodoreinxtrafeet}{%
\IfStrEq{familiar-critical}{\@fnpos}
@@ -11990,9 +11957,9 @@
% \end{macro}
%
% \begin{macro}{\X@doreinfeet}
-% \cs{X@doreinfeet} is the code for catering for the
+% \protect\cs{X@doreinfeet} is the code for catering for the
% extra critical footnotes
-% within \cs{@reinserts}.
+% within \protect\cs{@reinserts}.
% \begin{macrocode}
\newcommand*{\X@doreinfeet}{%
\unless\ifnocritical@%
@@ -12013,7 +11980,7 @@
% We have to add all the new kinds of familiar footnotes to the output
% routine.
% The normal way to add one series.
-% \cs{print@Xnotes} is replaced by \parpackage when using \cs{Pages}.
+% \protect\cs{print@Xnotes} is replaced by \parpackage when using \protect\cs{Pages}.
% \begin{macrocode}
\newcommand\print@notesX[1]{%
\csuse{footstart#1}{#1}%
@@ -12058,29 +12025,29 @@
% \end{macro}
%
% \subsubsection{Standard output's commands patching}
-% The \Lclass{memoir} class does not use the `standard' versions of
-% \cs{@makecol} and \cs{@reinserts}, due to its sidebar insert.
-% We had better add that code if \Lclass{memoir} is used. (It can
+% The \protect\ltxclass{memoir} class does not use the `standard' versions of
+% \protect\cs{@makecol} and \protect\cs{@reinserts}, due to its sidebar insert.
+% We had better add that code if \protect\ltxclass{memoir} is used. (It can
% be awkward dealing with |\if| code within |\if| code, so don't use
% |\ifl@dmemoir| here.)
% \changes{v0.2.1}{2003/09/13}{Major changes to insert code when memoir is loaded}
-% \changes{v2.0.0}{2015/07/19}{\cs{@makecol}, \cs{@reinserts} and \cs{@doclearpage} are patched instead of begin redefined}
-% \changes{v2.0.0}{2015/07/19}{\cs{doxtrafeeti} becomes \cs{do@feetX};
-% \cs{doxtrafeetii} becomes \cs{Xdo@feet};
-% \cs{@opxtrafeeti} becomes \cs{@opfeetX};
-% \cs{doreinxtrafeetii} becomes \cs{X@doreinfeet};
-% \cs{doreinxtrafeeti} becomes \cs{@doreinfeetX}.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{@makecol}, \protect\cs{@reinserts} and \protect\cs{@doclearpage} are patched instead of begin redefined}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{doxtrafeeti} becomes \protect\cs{do@feetX};
+% \protect\cs{doxtrafeetii} becomes \protect\cs{Xdo@feet};
+% \protect\cs{@opxtrafeeti} becomes \protect\cs{@opfeetX};
+% \protect\cs{doreinxtrafeetii} becomes \protect\cs{X@doreinfeet};
+% \protect\cs{doreinxtrafeeti} becomes \protect\cs{@doreinfeetX}.}
% \begin{macrocode}
\@ifclassloaded{memoir}{%
% \end{macrocode}
-% \Lclass{memoir} is loaded so we use \Lclass{memoir}'s built in hooks.
+% \protect\ltxclass{memoir} is loaded so we use \protect\ltxclass{memoir}'s built in hooks.
% \begin{macrocode}
\g@addto@macro{\m@mdoextrafeet}{\l@ddoxtrafeet}%
\g@addto@macro{\m@mdodoreinextrafeet}{\l@ddodoreinxtrafeet}%
}{%
% \end{macrocode}
-% \Lclass{memoir} has not been loaded, so patch \cs{@makecol} and
-% \cs{@reinserts}.
+% \protect\ltxclass{memoir} has not been loaded, so patch \protect\cs{@makecol} and
+% \protect\cs{@reinserts}.
% \begin{macrocode}
\@ifpackageloaded{fancyhdr}{%
\patchcmd%
@@ -12110,8 +12077,8 @@
%
%
-% It turns out that \cs{@doclearpage} also needs modifying.
-% \changes{v0.4.1}{2004/03/25}{Added code for changing \cs{@doclearpage}}
+% It turns out that \protect\cs{@doclearpage} also needs modifying.
+% \changes{v0.4.1}{2004/03/25}{Added code for changing \protect\cs{@doclearpage}}
% \begin{macro}{\if@led@nofoot}
% We have to check if there are any leftover feet.
% \begin{macrocode}
@@ -12123,7 +12090,7 @@
% \begin{macrocode}
\@ifclassloaded{memoir}{%
% \end{macrocode}
-% If the \Lclass{memoir} class is loaded we hook into its modified
+% If the \protect\ltxclass{memoir} class is loaded we hook into its modified
% \verb?\@doclearpage?.
% \begin{macro}{\@mem@extranofeet}
% \begin{macrocode}
@@ -12141,7 +12108,7 @@
}{%
% \end{macrocode}
% \end{macro}
-% As \Lclass{memoir} is not loaded we have patch \cs{@doclearpage}.
+% As \protect\ltxclass{memoir} is not loaded we have patch \protect\cs{@doclearpage}.
% \begin{macro}{\@led@testifnofoot}
% \begin{macro}{\@doclearpage}
% \begin{macrocode}
@@ -12191,21 +12158,21 @@
%
%
% You can mark a place in the text using a command of the form
-% \cs{edlabel}\marg{foo}, and later refer to it using the label
-% \meta{foo} by saying \cs{edpageref}\marg{foo}, or \cs{lineref}\marg{foo} or
-% \cs{sublineref}\marg{foo} or \cs{pstartref}. These reference commands will produce,
+% \protect\cs{edlabel}\marg{foo}, and later refer to it using the label
+% \meta{foo} by saying \protect\cs{edpageref}\marg{foo}, or \protect\cs{lineref}\marg{foo} or
+% \protect\cs{sublineref}\marg{foo} or \protect\cs{pstartref}. These reference commands will produce,
% respectively, the page, line sub-line and pstart on which the
-% \cs{edlabel}\marg{foo} command occurred.
+% \protect\cs{edlabel}\marg{foo} command occurred.
%
% The reference macros warn you if a reference is made to an
% undefined label.
% If \marg{foo} has been used as a label before,
-% the \cs{edlabel}\marg{foo} command will issue a complaint; subsequent
-% \cs{edpageref} and \cs{edlineref} commands will refer to the
-% latest occurrence of \cs{edlabel}\marg{foo}.
+% the \protect\cs{edlabel}\marg{foo} command will issue a complaint; subsequent
+% \protect\cs{edpageref} and \protect\cs{edlineref} commands will refer to the
+% latest occurrence of \protect\cs{edlabel}\marg{foo}.
%
% \begin{macro}{\labelref@list}
-% Set up a new list, \cs{labelref@list}, to hold the page, line and
+% Set up a new list, \protect\cs{labelref@list}, to hold the page, line and
% sub-line numbers for each label.
% \begin{macrocode}
\list@create{\labelref@list}
@@ -12215,7 +12182,7 @@
%
% \begin{macro}{\zz@@@}
% A convenience macro to zero two labeling counters in one go.
-% \changes{v0.2.1}{2003/08/26}{Minor change to \cs{zz@@@}}
+% \changes{v0.2.1}{2003/08/26}{Minor change to \protect\cs{zz@@@}}
% \begin{macrocode}
\newcommand*{\zz@@@}{000|000} % set two counters to zero in one go
@@ -12223,19 +12190,19 @@
% \end{macro}
%
% \begin{macro}{\edlabel}
-% The \cs{edlabel} command first writes a \cs{@lab} macro to
-% the \cs{linenum@out} file. It then checks to see that the
-% \cs{labelref@list} actually has something in it (if not, it
+% The \protect\cs{edlabel} command first writes a \protect\cs{@lab} macro to
+% the \protect\cs{linenum@out} file. It then checks to see that the
+% \protect\cs{labelref@list} actually has something in it (if not, it
% creates a dummy entry), and pops the next value for the current
-% label, storing it in \cs{label@refs}. Finally it defines the
-% label to be \cs{empty} so that any future check will turn up
+% label, storing it in \protect\cs{label@refs}. Finally it defines the
+% label to be \protect\cs{empty} so that any future check will turn up
% the fact that it has been used.\footnote{The remaining macros
% in this section were kindly revised by Wayne
% Sullivan,\index{Sullivan, Wayne} who
% substantially improved their efficiency and flexibility.}
%
-% This version of the original \edmac{} \cs{label} uses \cs{@bsphack}
-% and \cs{@esphack} to eliminate extra space problems and also use the \LaTeX\
+% This version of the original \edmac{} \protect\cs{label} uses \protect\cs{@bsphack}
+% and \protect\cs{@esphack} to eliminate extra space problems and also use the \LaTeX\
% write methods for the \file{.aux} file.
%
% Jesse Billett\footnote{(\url{jdb43@cam.ac.uk}) via the \texttt{ctt}
@@ -12243,9 +12210,9 @@
% found that the original code could be off by several pages. This version,
% hopefully cures that, and also allows for non-arabic page numbering.
%
-% \changes{v0.2.1}{2003/08/26}{Tweaked \cs{edlabel} to get correct page numbers}
-% \changes{v0.14.0}{2012/04/04}{Tweaked \cs{edlabel} to get correct line number if the command is first element of a paragraph.}
-% \changes{v1.18.0}{2015/02/23}{\cs{edlabel} is now defined only one time for both \eledmac and \eledpar}
+% \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}
% \begin{macrocode}
\newcommand*{\edlabel}[1]{%
@@ -12264,9 +12231,9 @@
\advancelabel@refs%
\fi%
% \end{macrocode}
-% Use code from the kernel \cs{label} command to write the correct
+% Use code from the kernel \protect\cs{label} command to write the correct
% page number.
-% Also define an hypertarget if \Lpack{hyperref} package is loaded.
+% Also define an hypertarget if \protect\package{hyperref} package is loaded.
% \begin{macrocode}
\protected@write\@auxout{}%
{\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
@@ -12294,10 +12261,10 @@
%\begin{macro}{\advancelabel@refs}
%\begin{macro}{\labelrefsparseline}
%\begin{macro}{\labelrefsparsesubline}
-% \changes{v1.4.1}{2012/11/16}{Fix bug with \cs{edlabel}.}
-%In cases where \cs{edlabel} is the first element in a paragraph, we have a problem with line counts, because line counts change only at the first horizontal box of the paragraph.
-%Hence, we need to test \cs{edlabel} if it occurs at the start of a paragraph. To do so, we use \cs{ifvmode}. If the test is true, we must advance by one unit the amount of text we write into the \verb].aux] file.
-% We do so using \cs{advancelabel@refs} command.
+% \changes{v1.4.1}{2012/11/16}{Fix bug with \protect\cs{edlabel}.}
+%In cases where \protect\cs{edlabel} is the first element in a paragraph, we have a problem with line counts, because line counts change only at the first horizontal box of the paragraph.
+%Hence, we need to test \protect\cs{edlabel} if it occurs at the start of a paragraph. To do so, we use \protect\cs{ifvmode}. If the test is true, we must advance by one unit the amount of text we write into the \verb].aux] file.
+% We do so using \protect\cs{advancelabel@refs} command.
% \begin{macrocode}
\newcounter{line}%
\newcounter{subline}%
@@ -12319,13 +12286,13 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\l@dmake@labels}
-% The \cs{l@dmake@labels} macro gets executed when the labels file is
+% The \protect\cs{l@dmake@labels} macro gets executed when the labels file is
% read. For each label it defines a macro, whose name is made up
% partly from the label you supplied, that contains the page, line
% and sub-line numbers. But first it checks to see whether the
% label has already been used (and complains if it has).
%
-% The initial use of \cs{newcommand} is to catch if \cs{l@dmake@labels}
+% The initial use of \protect\cs{newcommand} is to catch if \protect\cs{l@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+ pstart number, \verb+#5+ label.
@@ -12354,21 +12321,21 @@
% \end{macrocode}
%
% \begin{macro}{\@lab}
-% The \cs{@lab} command, which appears in the \cs{linenum@out} file,
+% The \protect\cs{@lab} command, which appears in the \protect\cs{linenum@out} file,
% appends the current values of page, line and sub-line to the
-% \cs{labelref@list}. These values are defined by the earlier
-% \cs{@page}, \cs{@nl}, and the \cs{sub@on} and \cs{sub@off} commands
-% appearing in the \cs{linenum@out} file.
+% \protect\cs{labelref@list}. These values are defined by the earlier
+% \protect\cs{@page}, \protect\cs{@nl}, and the \protect\cs{sub@on} and \protect\cs{sub@off} commands
+% appearing in the \protect\cs{linenum@out} file.
%
% \LaTeX\ uses the \texttt{page} counter for page numbers. However,
% it appears that this is not the right place to grab the page number.
-% That task is now done in the \cs{edlabel} macro. This version
-% of \cs{@lab} appends just the current line and sub-line numbers
-% to \cs{labelref@list}.
-% \changes{v0.2.1}{2003/08/26}{Removed page setting from \cs{@lab}}
-% \changes{v0.3.0}{2004/02/14}{Replaced \cs{the}\cs{line@num} by
-% \cs{linenumr@p}\cs{line@num} in
-% \cs{@lab}, and similar for sub-lines}
+% That task is now done in the \protect\cs{edlabel} macro. This version
+% of \protect\cs{@lab} appends just the current line and sub-line numbers
+% to \protect\cs{labelref@list}.
+% \changes{v0.2.1}{2003/08/26}{Removed page setting from \protect\cs{@lab}}
+% \changes{v0.3.0}{2004/02/14}{Replaced \protect\cs{the}\protect\cs{line@num} by
+% \protect\cs{linenumr@p}\protect\cs{line@num} in
+% \protect\cs{@lab}, and similar for sub-lines}
% \begin{macrocode}
\newcommand*{\@lab}{%
@@ -12384,7 +12351,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\applabel}
-% \cs{applabel}, if called in \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 start and an end label for the current edtext lines.
% \begin{macrocode}
\newcommand*{\applabel}[1]{%
\ifnum\@edtext@level>0%
@@ -12398,7 +12365,7 @@
\led@warn@DuplicateLabel{#1 (applabel)}%
}%
% \end{macrocode}
-% Parse the \cs{edtext} line numbers.
+% Parse the \protect\cs{edtext} line numbers.
% \begin{macrocode}
\expandafter\l@dp@rsefootspec\l@d@nums|%
% \end{macrocode}
@@ -12426,21 +12393,21 @@
% \begin{macrocode}
\@esphack%
% \end{macrocode}
-% Warning if \cs{applabel} is called outside of \cs{edtext}.
+% Warning if \protect\cs{applabel} is called outside of \protect\cs{edtext}.
% \begin{macrocode}
\else%
\led@warn@AppLabelOutEdtext{#1}%
\fi%
% \end{macrocode}
-% End of \cs{applabel}
+% End of \protect\cs{applabel}
% \begin{macrocode}
}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\wrap@edcrossref}
% \changes{v1.12.1}{2014/08/06}{Fix spurious spaces.}
-% \changes{v1.12.7}{2014/09/07}{\cs{wrap@edcrossref} is now robust}
-% \cs{wrap@edcrossref} is called around all \macpackage crossref commands, except those which start with x.
+% \changes{v1.12.7}{2014/09/07}{\protect\cs{wrap@edcrossref} is now robust}
+% \protect\cs{wrap@edcrossref} is called around all \macpackage crossref commands, except those which start with x.
% It adds the hyperlink.
% \begin{macrocode}
\newrobustcmd{\wrap@edcrossref}[2]{%
@@ -12452,19 +12419,19 @@
% \end{macro}
% \begin{macro}{\edpageref}
% \begin{macro}{\xpageref}
-% If the specified label exists, \cs{edpageref} gives its page number.
+% If the specified label exists, \protect\cs{edpageref} gives its page number.
%
% For this reference command, as for the other two, a special
% version with prefix \verb"x" is provided for use in places where the
-% command is to be scanned as a number, as in \cs{linenum}. These
+% command is to be scanned as a number, as in \protect\cs{linenum}. These
% special versions have two limitations: they do not print error
% messages if the reference is unknown, and they can't appear as
% the first label or reference command in the file; you must ensure
-% that a \cs{edlabel} or a normal reference command appears first, or
+% that a \protect\cs{edlabel} or a normal reference command appears first, or
% these x-commands will always return zeros.
%
-% \LaTeX\ already defines a \cs{pageref}, so changing the name
-% to \cs{edpageref}.
+% \LaTeX\ already defines a \protect\cs{pageref}, so changing the name
+% to \protect\cs{edpageref}.
% \begin{macrocode}
\newcommand*{\edpageref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{1}{#1}}}
\newcommand*{\xpageref}[1]{\l@dgetref@num{1}{#1}}
@@ -12474,10 +12441,10 @@
% \end{macro}
%
% \begin{macro}{\edlineref}
-% \changes{v1.16.1}{2015/02/05}{\cs{lineref} is not defined if defined by some other package, like lineno.
-% \Eledmac provides \cs{edlineref} instead.}
+% \changes{v1.16.1}{2015/02/05}{\protect\cs{lineref} is not defined if defined by some other package, like lineno.
+% \Eledmac provides \protect\cs{edlineref} instead.}
% \begin{macro}{\xlineref}
-% If the specified label exists, \cs{lineref} gives its line number.
+% If the specified label exists, \protect\cs{lineref} gives its line number.
% \begin{macrocode}
\newcommand*{\edlineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}}}%
\newcommand*{\xlineref}[1]{\l@dgetref@num{2}{#1}}%
@@ -12488,7 +12455,7 @@
%
% \begin{macro}{\sublineref}
% \begin{macro}{\xsublineref}
-% If the specified label exists, \cs{sublineref} gives its sub-line number.
+% If the specified label exists, \protect\cs{sublineref} gives its sub-line number.
% \begin{macrocode}
\newcommand*{\sublineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{3}{#1}}}
\newcommand*{\xsublineref}[1]{\l@dgetref@num{3}{#1}}
@@ -12499,7 +12466,7 @@
%
% \begin{macro}{\pstarteref}
% \begin{macro}{\xpstartref}
-% If the specified label exists, \cs{pstartref} gives its pstart number.
+% If the specified label exists, \protect\cs{pstartref} gives its pstart number.
% \begin{macrocode}
\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{4}{#1}}}
\newcommand*{\xpstartref}[1]{\l@dgetref@num{4}{#1}}
@@ -12512,7 +12479,7 @@
% macro that contains the page, line, and sub-line number.
%
% \begin{macro}{\l@dref@undefined}
-% The \cs{l@dref@undefined} macro is called when you refer to a label with
+% The \protect\cs{l@dref@undefined} macro is called when you refer to a label with
% the normal referencing macros. Its argument is a label, and it
% just checks that the label has been defined.
%
@@ -12526,11 +12493,11 @@
% \end{macro}
%
% \begin{macro}{\l@dgetref@num}
-% Next, \cs{l@dgetref@num} fetches the number we want. It has two
+% Next, \protect\cs{l@dgetref@num} fetches the number we want. It has two
% arguments: the first is simply a digit, specifying whether to
% fetch a page (1), line (2), sub-line (3) or (4) pstart number. (This
-% switching is done by calling \cs{l@dlabel@parse}.) The second argument
-% is the label-macro, which because of the \cs{@lab} macro above is
+% switching is done by calling \protect\cs{l@dlabel@parse}.) The second argument
+% is the label-macro, which because of the \protect\cs{@lab} macro above is
% defined to be a string of the type \verb"123|456|789".
% \begin{macrocode}
\newcommand*{\l@dgetref@num}[2]{%
@@ -12547,15 +12514,15 @@
%
% \begin{macro}{\l@dlabel@parse}
% Notice that we slipped another \verb"|" delimiter into the
-% penultimate line of \cs{l@dgetref@num}, to
+% penultimate line of \protect\cs{l@dgetref@num}, to
% keep the `switch-number' separate from the reference numbers. This
-% \verb"|" is used as another parameter delimiter by \cs{l@dlabel@parse},
+% \verb"|" is used as another parameter delimiter by \protect\cs{l@dlabel@parse},
% which extracts the appropriate number from its first arguments.
% The \verb"|"-delimited arguments consist of the expanded label-macro
% (three reference numbers), followed by the switch-number (1,
% 2, 3 or 4) which defines which of the earlier three numbers to
% pick out. (It was earlier given as the first argument of
-% \cs{l@dgetref@num}.)
+% \protect\cs{l@dgetref@num}.)
% \begin{macrocode}
\newcommand*{\l@dlabel@parse}{}
\def\l@dlabel@parse#1|#2|#3|#4|#5{%
@@ -12569,19 +12536,19 @@
% \end{macro}
%
% \begin{macro}{\xxref}
-% \changes{v1.19.0}{2015/03/06}{\cs{xxref} works also with right side numbers, when \cs{@Rlineflag} is not empty.}
-% \changes{v1.20.0}{2015/03/22}{Debug \cs{xxref} when not loading \eledpar (fix bug added in 1.19.0).}
-% The \cs{xxref} command takes two arguments, both of which are
-% labels, e.g., \cs{xxref}\verb+{mouse}{elephant}+. It first does some
+% \changes{v1.19.0}{2015/03/06}{\protect\cs{xxref} works also with right side numbers, when \protect\cs{@Rlineflag} is not empty.}
+% \changes{v1.20.0}{2015/03/22}{Debug \protect\cs{xxref} when not loading \eledpar (fix bug added in 1.19.0).}
+% The \protect\cs{xxref} command takes two arguments, both of which are
+% labels, e.g., \protect\cs{xxref}\verb+{mouse}{elephant}+. It first does some
% checking to make sure that the labels do exist (if one does not,
-% those numbers are set to zero). Then it calls \cs{linenum} and sets
+% those numbers are set to zero). Then it calls \protect\cs{linenum} and sets
% the beginning page, line, and sub-line numbers to those of the
-% place where \cs{label}\verb+{mouse}+ was placed, and the ending
+% place where \protect\cs{label}\verb+{mouse}+ was placed, and the ending
% numbers to those at \verb+{elephant}+. The point of this is
% to be able to manufacture footnote line references to passages
% which can not be specified in the normal way as the first argument
-% to \cs{edtext} for one reason or another. Using \cs{xxref} in the
-% second argument of \cs{edtext} lets you set things up at least
+% to \protect\cs{edtext} for one reason or another. Using \protect\cs{xxref} in the
+% second argument of \protect\cs{edtext} lets you set things up at least
% semi-automatically.
% \begin{macrocode}
\newcommand*{\xxref}[2]{%
@@ -12615,15 +12582,15 @@
% \begin{macro}{\@apprefprefixmore}
% \begin{macro}{\setapprefprefixsingle}
% \begin{macro}{\setapprefprefixmore}
-% \cs{appref} prints a crossref to some lines of the apparatus defined by \cs{applabel}.
+% \protect\cs{appref} prints a crossref to some lines of the apparatus defined by \protect\cs{applabel}.
% It prints the lines as they should be printed in the apparatus.
%
-% If \cs{@apprefprefixsingle} is not empty, it prints it before the line number.
-% If \cs{@apprefprefixmore} is not empty, it prints it before the line numbers when the first line is not the same as the last line.
-% \cs{apprefwithpage} prints a crossref to some lines of the apparatus defined by \cs{applabel}.
+% If \protect\cs{@apprefprefixsingle} is not empty, it prints it before the line number.
+% If \protect\cs{@apprefprefixmore} is not empty, it prints it before the line numbers when the first line is not the same as the last line.
+% \protect\cs{apprefwithpage} prints a crossref to some lines of the apparatus defined by \protect\cs{applabel}.
% It always prints the page number, as it should be printed in the end notes.
-% The \cs{Xtwolinesappref} and \cs{Xmorethantwolinesappref} are similar to the footnote
-% hooks and \cs{Xtwolines} \cs{Xmorethantwolines}.
+% The \protect\cs{Xtwolinesappref} and \protect\cs{Xmorethantwolinesappref} are similar to the footnote
+% hooks and \protect\cs{Xtwolines} \protect\cs{Xmorethantwolines}.
%
% So, first declare the default value of the hooks for the pseudo-series appref.
% Also declare the internal toggle which are switch by \macpackage{}.
@@ -12649,7 +12616,7 @@
\xdef\Xendboxendlinenum@apprefwithpage{0pt}
% \end{macrocode}
-% Now, declare the default value of \cs{@apprefprefixsingle} and \cs{@apprefprefixmore}, and the commands which defines them
+% Now, declare the default value of \protect\cs{@apprefprefixsingle} and \protect\cs{@apprefprefixmore}, and the commands which defines them
% \begin{macrocode}
\newcommand\@apprefprefixsingle{}%
\newcommand\@apprefprefixmore{}%
@@ -12663,8 +12630,8 @@
}
% \end{macrocode}
-% And now, the main commands: \cs{appref} and \cs{apprefwithpage}.
-% These commands call \cs{printlines} and \cs{printendlines}. That is why we have previously declared all hooks values tested inside these last commands.
+% And now, the main commands: \protect\cs{appref} and \protect\cs{apprefwithpage}.
+% These commands call \protect\cs{printlines} and \protect\cs{printendlines}. That is why we have previously declared all hooks values tested inside these last commands.
% \begin{macrocode}
\newcommandx{\appref}[2][1,usedefault]{%
\IfStrEq{#1}{fulllines}%
@@ -12682,7 +12649,7 @@
\togglefalse{fulllines@}%
}%
-% \changes{v1.23.0}{2015/05/18}{Debug \cs{Xendtwolines}, \cs{Xendmorethantwolines}, \cs{Xendtwolinesbutnotmore} and \cs{Xendtwolinesonlyinsamepage} when using \cs{apprefwithpage}.}
+% \changes{v1.23.0}{2015/05/18}{Debug \protect\cs{Xendtwolines}, \protect\cs{Xendmorethantwolines}, \protect\cs{Xendtwolinesbutnotmore} and \protect\cs{Xendtwolinesonlyinsamepage} when using \protect\cs{apprefwithpage}.}
\newcommandx{\apprefwithpage}[2][1,usedefault]{%
\IfStrEq{#1}{fulllines}%
{\toggletrue{fulllines@}}%
@@ -12699,41 +12666,41 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\edmakelabel}
-% Sometimes the \cs{edlabel} command cannot be used to specify
-% exactly the page and line desired; you can use the \cs{edmakelabel} macro
+% Sometimes the \protect\cs{edlabel} command cannot be used to specify
+% exactly the page and line desired; you can use the \protect\cs{edmakelabel} macro
% make your own label. For example, if you say
-% \cs{edmakelabel}\verb+{elephant}{10|25|0}+ you will have created a
-% new label, and a later call to \cs{edpageref}\verb+{elephant}+ would
-% print `10' and \cs{lineref}\verb+{elephant}+ would print `25'.
+% \protect\cs{edmakelabel}\verb+{elephant}{10|25|0}+ you will have created a
+% new label, and a later call to \protect\cs{edpageref}\verb+{elephant}+ would
+% print `10' and \protect\cs{lineref}\verb+{elephant}+ would print `25'.
% The sub-line number here is zero.
-% \cs{edmakelabel} takes a label, followed by a page and a line number(s)
+% \protect\cs{edmakelabel} takes a label, followed by a page and a line number(s)
% as arguments.
-% \LaTeX\ defines a \cs{makelabel} macro which is used in lists.
-% Peter Wilson has changed the name to \cs{edmakelabel}.
+% \LaTeX\ defines a \protect\cs{makelabel} macro which is used in lists.
+% Peter Wilson has changed the name to \protect\cs{edmakelabel}.
% \begin{macrocode}
\newcommand*{\edmakelabel}[2]{\expandafter\xdef\csname the@label#1\endcsname{#2}}
% \end{macrocode}
% (If you are only going to refer to such a label using
-% \cs{xxref}, then you can omit entries in the same way as with
-% \cs{linenum} (see \reff{linenumdef} and
-% \reff{linenumbers}), since \cs{xxref} makes a call to
-% \cs{linenum} in order to do its work.)
+% \protect\cs{xxref}, then you can omit entries in the same way as with
+% \protect\cs{linenum} (see \reff{linenumdef} and
+% \reff{linenumbers}), since \protect\cs{xxref} makes a call to
+% \protect\cs{linenum} in order to do its work.)
% \end{macro}
%
%
%
% \section{Side notes}
%
-% Regular \cs{marginpar}s do not work inside numbered text --- they
+% 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
% the text.
%
% \begin{macro}{\@xympar}
-% Changing \cs{@xympar} a little at least ensures that \cs{marginpar}s
+% Changing \protect\cs{@xympar} a little at least ensures that \protect\cs{marginpar}s
% in numbered text do not disturb the flow.
-% \changes{v0.5.0}{2004/04/01}{Eliminated \cs{marginpar} disturbance}
-% \changes{v2.0.0}{2104/06/28}{Patching \cs{@xympar} instead of redefining it}
+% \changes{v0.5.0}{2004/04/01}{Eliminated \protect\cs{marginpar} disturbance}
+% \changes{v2.0.0}{2104/06/28}{Patching \protect\cs{@xympar} instead of redefining it}
%
% \begin{macrocode}
\pretocmd{\@xympar}%
@@ -12752,26 +12719,26 @@
% \end{macrocode}
% \end{macro}
%
-% We provide side notes as replacement for \cs{marginpar} in numbered text.
+% 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}
%
% \begin{macro}{\sidenote@margin}
% \begin{macro}{\sidenotemargin}
% \begin{macro}{\l@dgetsidenote@margin}
-% These are the sidenote equivalents to \cs{line@margin} and \cs{linenummargin}
+% These are the sidenote equivalents to \protect\cs{line@margin} and \protect\cs{linenummargin}
% for specifying which margin. The default is the right margin (opposite to
% the default for line numbers).
-% \cs{l@dgetsidenote@margin} returns the number associated to side note margin:
+% \protect\cs{l@dgetsidenote@margin} returns the number associated to side note margin:
% \begin{description}
% \item[left]: 0
% \item[right]: 1
% \item[outer]: 2
% \item[inner]: 3
% \end{description}
-% \changes{v0.5.1}{2004/04/10}{Added \cs{sidenotemargin} and \cs{sidenote@margin}}
-% \changes{v0.7.0}{2005/02/23}{Added \cs{l@dgetsidenote@margin}}
-% \changes{v1.12.0}{2014/08/05}{\cs{sidenotemargin} is now directly defined in \Lpack{eledmac} to be able to manage \Lpack{eledpar}.}
+% \changes{v0.5.1}{2004/04/10}{Added \protect\cs{sidenotemargin} and \protect\cs{sidenote@margin}}
+% \changes{v0.7.0}{2005/02/23}{Added \protect\cs{l@dgetsidenote@margin}}
+% \changes{v1.12.0}{2014/08/05}{\protect\cs{sidenotemargin} is now directly defined in \protect\package{eledmac} to be able to manage \protect\package{eledpar}.}
% \begin{macrocode}
\newcount\sidenote@margin
\newcommand*{\sidenotemargin}[1]{{%
@@ -12832,8 +12799,8 @@
% \begin{macro}{\ledlsnotefontsetup}
% \begin{macro}{\ledrsnotefontsetup}
% These specify the width of the left/right boxes (initialised to
-% \cs{marginparwidth}), their distance from
-% the text (initialised to \cs{linenumsep}), and the fonts used.
+% \protect\cs{marginparwidth}), their distance from
+% the text (initialised to \protect\cs{linenumsep}), and the fonts used.
% \begin{macrocode}
\newdimen\ledlsnotewidth \ledlsnotewidth=\marginparwidth
\newdimen\ledrsnotewidth \ledrsnotewidth=\marginparwidth
@@ -12856,10 +12823,10 @@
% \begin{macro}{\ledinnernote}
% \begin{macro}{\ledouterote}
% \begin{macro}{\ledsidenote}
-% \cs{ledleftnote}, \cs{ledrightnote}, \cs{ledinnernote}, \cs{ledouternote} are the
+% \protect\cs{ledleftnote}, \protect\cs{ledrightnote}, \protect\cs{ledinnernote}, \protect\cs{ledouternote} are the
% user commands for left, right, inner and outer sidenotes.
% The two last one are just alias for the two first one, depending of the page number.
-% \cs{ledsidenote}\marg{text} is the command for a moveable sidenote.
+% \protect\cs{ledsidenote}\marg{text} is the command for a moveable sidenote.
% \begin{macrocode}
\newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}}
\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}}
@@ -12892,7 +12859,7 @@
% \begin{macro}{\l@dlsnote}
% \begin{macro}{\l@drsnote}
% \begin{macro}{\l@dcsnote}
-% \changes{v1.12.0}{2014/08/05}{\cs{l@dlsnote},\cs{l@drsnote} and \cs{l@dcsnote} defined only one time, in \eledmac, including needs for eledpar case.}.
+% \changes{v1.12.0}{2014/08/05}{\protect\cs{l@dlsnote},\protect\cs{l@drsnote} and \protect\cs{l@dcsnote} defined only one time, in \eledmac, including needs for eledpar case.}.
% The `footnotes' for left, right, and moveable sidenotes. The whole
% scheme is reminiscent of the critical footnotes code.
% \begin{macrocode}
@@ -12953,20 +12920,20 @@
% \begin{macro}{\vl@drsnote}
% \begin{macro}{\vl@dcsnote}
% Put the left/right text into boxes, but just save the moveable text.
-% \cs{l@dcsnotetext}, \cs{l@dcsnotetext@l} and \cs{l@dcsnotetext@r} are \Lpack{etoolbox}'s lists which will store the content of side notes.
+% \protect\cs{l@dcsnotetext}, \protect\cs{l@dcsnotetext@l} and \protect\cs{l@dcsnotetext@r} are \protect\package{etoolbox}'s lists which will store the content of side notes.
% 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}
-% \item Store the content of \cs{ledsidenote} to \cs{l@dcsnotetext} in any cases.
-% \item Store the content of \cs{rightsidenote} to:
+% \item Store the content of \protect\cs{ledsidenote} to \protect\cs{l@dcsnotetext} in any cases.
+% \item Store the content of \protect\cs{rightsidenote} to:
% \begin{itemize}
-% \item \cs{l@dcsnotetext} if \cs{ledsidenote} is to be put on right.
-% \item \cs{l@dcsnotetext@r} if \cs{ledsidenote} is to be put on left.
+% \item \protect\cs{l@dcsnotetext} if \protect\cs{ledsidenote} is to be put on right.
+% \item \protect\cs{l@dcsnotetext@r} if \protect\cs{ledsidenote} is to be put on left.
% \end{itemize}
-% \item Store the content of \cs{leftsidenote} to:
+% \item Store the content of \protect\cs{leftsidenote} to:
% \begin{itemize}
-% \item \cs{l@dcsnotetext} if \cs{ledsidenote} is to be put on left.
-% \item \cs{l@dcsnotetext@l} if \cs{ledsidenote} is to be put on right.
+% \item \protect\cs{l@dcsnotetext} if \protect\cs{ledsidenote} is to be put on left.
+% \item \protect\cs{l@dcsnotetext@l} if \protect\cs{ledsidenote} is to be put on right.
% \end{itemize}
% \end{itemize}
% \begin{macrocode}
@@ -13016,8 +12983,8 @@
%
% \begin{macro}{\setl@dlp@rbox}
% \begin{macro}{\setl@drpr@box}
-% \cs{setl@dlprbox}\marg{lednums}\marg{tag}\marg{text} puts \meta{text}
-% into the \cs{l@dlp@rbox} box. And similarly for the right side box.
+% \protect\cs{setl@dlprbox}\marg{lednums}\marg{tag}\marg{text} puts \meta{text}
+% into the \protect\cs{l@dlp@rbox} box. And similarly for the right side box.
% It is these boxes that finally
% get displayed in the margins.
% \begin{macrocode}
@@ -13053,9 +13020,9 @@
% \begin{macro}{\affixside@note}
% This macro puts any moveable sidenote text into the left or right sidenote
% box, depending on which margin it is meant to go in. It's a very much
-% stripped down version of \cs{affixlin@num}.
+% stripped down version of \protect\cs{affixlin@num}.
%
-% Before do it, we concatenate all moveable sidenotes of the line, using \cs{@sidenotesep} as separator.
+% Before do it, we concatenate all moveable sidenotes of the line, using \protect\cs{@sidenotesep} as separator.
% It is the result that we put on the sidenote.
% \changes{v1.4.1}{2012/11/16}{Remove spurious spaces.}
% \begin{macrocode}
@@ -13118,16 +13085,16 @@
% We can put footnotes into minipages. The preparatory code has
% been set up earlier, all that remains is to ensure that it is available
% inside a minipage box. This requires some alteration to the kernel code,
-% specifically the \cs{@iiiminipage} and \cs{endminipage} macros.
+% specifically the \protect\cs{@iiiminipage} and \protect\cs{endminipage} macros.
% We will arrange this so that additional series can be easily added.
%
% \begin{macro}{\l@dfeetbeginmini}
% \begin{macro}{\l@dfeetendmini}
-% \changes{v1.9.0}{2014/02/05}{Add \cs{mpfnpos} to choice the order of footnotes in minipage / ledgroup.}
-% These will be the hooks in \cs{@iiiminpage} and \cs{endminipage}.
+% \changes{v1.9.0}{2014/02/05}{Add \protect\cs{mpfnpos} to choice the order of footnotes in minipage / ledgroup.}
+% These will be the hooks in \protect\cs{@iiiminpage} and \protect\cs{endminipage}.
%
% They can be extended to handle other things if necessary.
-% \changes{v0.4.0}{2004/02/29}{Added \cs{l@dfeetbeginmini}, \cs{l@dfeetendmini}
+% \changes{v0.4.0}{2004/02/29}{Added \protect\cs{l@dfeetbeginmini}, \protect\cs{l@dfeetendmini}
% and all their supporting code}
% \begin{macrocode}
\ifnoledgroup@\else%
@@ -13210,11 +13177,11 @@
% \end{macro}
%
% \begin{macro}{\@iiiminipage}
-% This is our extended form of the kernel \cs{@iiiminipage} defined in
+% This is our extended form of the kernel \protect\cs{@iiiminipage} defined in
% \file{ltboxes.dtx}.
-% \changes{v0.4.0}{2004/02/29}{Modified kernel \cs{@iiiminipage} and
-% \cs{endminipage} to cater for critical footnotes}
-% \changes{v2.0.0}{2015/07/19}{Patch \cs{@iiiminipage} instead of redefining it.}
+% \changes{v0.4.0}{2004/02/29}{Modified kernel \protect\cs{@iiiminipage} and
+% \protect\cs{endminipage} to cater for critical footnotes}
+% \changes{v2.0.0}{2015/07/19}{Patch \protect\cs{@iiiminipage} instead of redefining it.}
% \begin{macrocode}
\patchcmd%
{\@iiiminipage}%
@@ -13226,9 +13193,9 @@
% \end{macro}
%
% \begin{macro}{\endminipage}
-% This is our extended form of the kernel \cs{endminipage} defined in
+% This is our extended form of the kernel \protect\cs{endminipage} defined in
% \file{ltboxes.dtx}.
-% \changes{v2.0.0}{2015/07/19}{Patch \cs{endminipage} instead of redefining it.}
+% \changes{v2.0.0}{2015/07/19}{Patch \protect\cs{endminipage} instead of redefining it.}
% \begin{macrocode}
\patchcmd%
{\endminipage}%
@@ -13248,10 +13215,10 @@
% \end{macro}
% \begin{macro}{\l@dunboxmpfoot}%
% \begin{macro}{\l@advance@parledgroup@beforenormalnotes}%
-% \changes{v0.7.0}{2005/02/18}{Added \cs{l@dunboxmpfoot} containing
+% \changes{v0.7.0}{2005/02/18}{Added \protect\cs{l@dunboxmpfoot} containing
% some common code}
-% \changes{v2.0.0}{2015/07/19}{Some conde of \cs{l@dumboxmpfoot} moved to \cs{l@advance@parledegroup@beforenormalnotes}}
-% \cs{@ldunboxmpfoot} insert normal footnotes for ledgroup.
+% \changes{v2.0.0}{2015/07/19}{Some conde of \protect\cs{l@dumboxmpfoot} moved to \protect\cs{l@advance@parledegroup@beforenormalnotes}}
+% \protect\cs{@ldunboxmpfoot} insert normal footnotes for ledgroup.
% \begin{macrocode}
\newcommand*{\l@dunboxmpfoot}{%
\vskip\skip\@mpfootins
@@ -13308,7 +13275,7 @@
% of unboxed, variable \meta{width} minipage. The optional \meta{pos}
% controls the sideways position of numbered text.
% \changes{v0.4.0}{2004/02/29}{Added ledgroupsized environment}
-% \changes{v0.5.1}{2004/04/10}{Only change \cs{hsize} in ledgroupsized
+% \changes{v0.5.1}{2004/04/10}{Only change \protect\cs{hsize} in ledgroupsized
% environment otherwise page number can be in wrong place}
% \begin{macrocode}
\newenvironment{ledgroupsized}[2][l]{%
@@ -13356,7 +13323,7 @@
% \end{macrocode}
% \end{environment}
%
-% Close the \cs{ifnoledgroup@}\cs{else}.
+% Close the \protect\cs{ifnoledgroup@}\protect\cs{else}.
% \begin{macrocode}
\fi%
% \end{macrocode}
@@ -13374,12 +13341,12 @@
% \end{macro}
% \section{Indexing}
% \changes{v1.5.0}{2013/07/11}{Correct indexing when the call is made in critical notes.}
-% \changes{v1.8.0}{2014/07/21}{If \Lpack{imakeidx} and \Lpack{hyperref} are loaded, adds hyperref in the index.}
+% \changes{v1.8.0}{2014/07/21}{If \protect\package{imakeidx} and \protect\package{hyperref} are loaded, adds hyperref in the index.}
% \changes{v1.8.5}{2014/08/28}{Debug indexing in right column, with eledpar.}
% Here is some code for indexing using page and line numbers.
%
-% First, ensure that \Lpack{imakeidx} or \Lpack{indextools} is loaded \emph{before} \Lpack{eledmac}.
-% \changes{v1.12.0}{2014/08/05}{Ensure that \Lpack{imakeidx} is loaded \emph{before} \Lpack{eledmac}}
+% First, ensure that \protect\package{imakeidx} or \protect\package{indextools} is loaded \emph{before} \protect\package{eledmac}.
+% \changes{v1.12.0}{2014/08/05}{Ensure that \protect\package{imakeidx} is loaded \emph{before} \protect\package{eledmac}}
% \begin{macrocode}
\AtBeginDocument{%
\unless\ifl@imakeidx%
@@ -13407,7 +13374,7 @@
% \end{macro}
%
% \begin{macro}{\doedindexlabel}
-% This macro sets an \cs{edlabel}.
+% This macro sets an \protect\cs{edlabel}.
% \begin{macrocode}
\newcommand{\doedindexlabel}{%
\stepcounter{labidx}%
@@ -13430,7 +13397,7 @@
%
% \begin{macro}{\thestartpageline}
% \begin{macro}{\theendpageline}
-% These macros make up the page/line start/end number when the \cs{edindex} command is called in critical notes.
+% These macros make up the page/line start/end number when the \protect\cs{edindex} command is called in critical notes.
% \begin{macrocode}
\newcommand{\thestartpageline}{%
\l@dparsedstartpage%
@@ -13457,7 +13424,7 @@
% This macro is called at the beginning of each critical note.
% It switches some parameters,
% to allow index referring to this note, with reference to page and line number.
-% It also defines \cs{@ledinnote@command} which will be printed as an encapsulating command after the \verb+|+.
+% It also defines \protect\cs{@ledinnote@command} which will be printed as an encapsulating command after the \verb+|+.
% \begin{macrocode}
\newcommand{\prepare@edindex@fornote}[1]{%
\l@dp@rsefootspec#1|%
@@ -13466,8 +13433,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\get@edindex@ledinnote@command}
-% The \cs{get@edindex@ledinnote@command} macro defines
-% a \cs{@ledinnote@command} command which is added as an attribute (text inserted after \verb+|+) of the next index entry.
+% The \protect\cs{get@edindex@ledinnote@command} macro defines
+% a \protect\cs{@ledinnote@command} command which is added as an attribute (text inserted after \verb+|+) of the next index entry.
%
% Consequently, we write the definition of the location reference attribute in the \verb+.xdy+ file.
% \begin{macrocode}
@@ -13498,7 +13465,7 @@
}%
\fi%
% \end{macrocode}
-% If we do not use \verb+xindy+ option, \cs{@ledinnote@command} will produce
+% If we do not use \verb+xindy+ option, \protect\cs{@ledinnote@command} will produce
% something like \verb+ledinnote{formatingcommand}+.
% \begin{macrocode}
\else%
@@ -13511,7 +13478,7 @@
% \end{macro}
% \begin{macro}{\get@index@command}
% This macro is used to analyse if a text to be indexed has a command after a \verb+|+.
-% \changes{v1.8.0}{2014/07/21}{Debug \cs{get@index@command} and compatibility with \Lpack{hyperref} package.}
+% \changes{v1.8.0}{2014/07/21}{Debug \protect\cs{get@index@command} and compatibility with \protect\package{hyperref} package.}
% \begin{macrocode}
\def\get@index@command#1|#2+{%
\gdef\@index@txt{#1}%
@@ -13531,12 +13498,12 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ledinnote}
-% \changes{v1.22.0}{2015/04/25}{\cs{ledinnote} takes a first optional argument, which is the label for hyperlinks.}
+% \changes{v1.22.0}{2015/04/25}{\protect\cs{ledinnote} takes a first optional argument, which is the label for hyperlinks.}
% \begin{macro}{\ledinnotehyperpage}
% \begin{macro}{\ledinnotemark}
-% \changes{v1.21.0}{2015/04/13}{Add \cs{ledinnotemark}.}
+% \changes{v1.21.0}{2015/04/13}{Add \protect\cs{ledinnotemark}.}
% These macros are used to specify that an index reference points to a note.
-% Arguments of \cs{ledinnote} are: \verb+#1+ (optional): the label for the hyperlink, \verb+#2+: command applied to the number, \verb+#3+: the number itself.
+% Arguments of \protect\cs{ledinnote} are: \verb+#1+ (optional): the label for the hyperlink, \verb+#2+: command applied to the number, \verb+#3+: the number itself.
% \begin{macrocode}
\newcommandx{\ledinnote}[3][1,usedefault]{%
\ifboolexpr{%
@@ -13557,19 +13524,19 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \changes{v2.0.0}{2015/07/19}{Suppress indexing command specific to \Lclass{memoir}.}
-% \Eledmac and \ledmac were using the specific indexing tools of the \Lclass{memoir} in order to allow multiple index.
-% However, \eledmac used \Lpack{imakeidx} or \Lpack{indextools} tools when one these two package was loaded.
+% \changes{v2.0.0}{2015/07/19}{Suppress indexing command specific to \protect\ltxclass{memoir}.}
+% \Eledmac and \ledmac were using the specific indexing tools of the \protect\ltxclass{memoir} in order to allow multiple index.
+% However, \eledmac used \protect\package{imakeidx} or \protect\package{indextools} tools when one these two package was loaded.
% This system forced to maintained a double code, which was not very useful.
-% Since \reledmac, we use only the \Lpack{imakeidx} or \Lpack{indextools} tools.
+% Since \reledmac, we use only the \protect\package{imakeidx} or \protect\package{indextools} tools.
%
-% The \Lpack{memoir} class provides more flexible indexing than the
-% standard classes. We need different code if the \Lpack{memoir}
-% class is being used, except if \Lpack{imakeidx} or \Lpack{indextools} is used.
+% The \protect\package{memoir} class provides more flexible indexing than the
+% standard classes. We need different code if the \protect\package{memoir}
+% class is being used, except if \protect\package{imakeidx} or \protect\package{indextools} is used.
% \begin{macro}{\edindex}
% \changes{v0.4.1}{2003/03/29}{Let eledmac take advantage of memoir's indexing}
-% \changes{v1.5.0}{2013/07/11}{Compatibility with \Lpack{imakeidx} package, and possibility to use multiple index with \cs{edindex}.}
-% \changes{v1.12.0}{2014/08/05}{Use correctly default index when \Lpack{imakeidx} is loaded.}
+% \changes{v1.5.0}{2013/07/11}{Compatibility with \protect\package{imakeidx} package, and possibility to use multiple index with \protect\cs{edindex}.}
+% \changes{v1.12.0}{2014/08/05}{Use correctly default index when \protect\package{imakeidx} is loaded.}
% \changes{v1.14.0}{2014/10/27}{Let eledmac take advantage of imakeidx even when memoir class is used}
% \begin{macro}{\@wredindex}
% Write the index information to the \file{idx} file.
@@ -13608,8 +13575,8 @@
\@esphack%
}
% \end{macrocode}
-% Need to add the definition of \cs{edindex} to \cs{makeindex}, and initialise
-% \cs{edindex} to do nothing.
+% Need to add the definition of \protect\cs{edindex} to \protect\cs{makeindex}, and initialise
+% \protect\cs{edindex} to do nothing.
% \begin{macrocode}
\pretocmd{\makeindex}{%
\def\edindex{\@bsphack
@@ -13623,7 +13590,7 @@
% \end{macro}
%
% \begin{macro}{\hyperlinkformat}
-% \cs{hyperlinkformat} command is to be used to have both a internal hyperlink and a format, when indexing.
+% \protect\cs{hyperlinkformat} command is to be used to have both a internal hyperlink and a format, when indexing.
% \begin{macrocode}
\newcommand{\hyperlinkformat}[3]{%
\ifstrempty{#1}%
@@ -13633,7 +13600,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\hyperlinkR}
-% \cs{hyperlinkR} command is to be used to create a internal hyperlink and \cs{ledRflag}, when indexing.
+% \protect\cs{hyperlinkR} command is to be used to create a internal hyperlink and \protect\cs{ledRflag}, when indexing.
% \begin{macrocode}
\newcommand{\hyperlinkR}[2]{%
\hyperlink{#1}{#2\@Rlineflag}%
@@ -13642,7 +13609,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\hyperlinkformatR}
-% \cs{hyperlinkformatR} command is to be used to create a internal hyperlink, a format and a \cs{@Rlineflag}, when indexing.
+% \protect\cs{hyperlinkformatR} command is to be used to create a internal hyperlink, a format and a \protect\cs{@Rlineflag}, when indexing.
% \begin{macrocode}
\newcommand{\hyperlinkformatR}[3]{%
\hyperlinkformat{#1}{#2}{#3\@Rlineflag}%
@@ -13652,14 +13619,14 @@
% \end{macro}
% \begin{macro}{\get@edindex@hyperref}
% \begin{macro}{\@edindex@hyperref}
-% \changes{v1.12.5}{2014/08/28}{Debug \cs{edindex} when \Lpack{hyperref} is not loaded}
-% \cs{get@edindex@hyperref} is to be used to define the \cs{@edindex@hyperref} macro, which, in index, links to the point where the index was called (with \Lpack{hyperref}.
-% \changes{v1.18.0}{2014/08/21}{Fix spurious space with \cs{edindex} when using \Lpack{imakeidx}/\Lpack{indextools} + hyperref.}
+% \changes{v1.12.5}{2014/08/28}{Debug \protect\cs{edindex} when \protect\package{hyperref} is not loaded}
+% \protect\cs{get@edindex@hyperref} is to be used to define the \protect\cs{@edindex@hyperref} macro, which, in index, links to the point where the index was called (with \protect\package{hyperref}.
+% \changes{v1.18.0}{2014/08/21}{Fix spurious space with \protect\cs{edindex} when using \protect\package{imakeidx}/\protect\package{indextools} + hyperref.}
% \changes{v1.21.0}{2015/0}{Look at the hyperindex option of hyperref before inserting hyperref}
% \begin{macrocode}
\newcommand{\get@edindex@hyperref}[1]{%
% \end{macrocode}
-% We have to disable temporary spaces to work through a \Lpack{xstring} bug (or feature?)
+% We have to disable temporary spaces to work through a \protect\package{xstring} bug (or feature?)
% \begin{macrocode}
\edef\temp@{%
\catcode`\ =9 %space need for catcode
@@ -13667,7 +13634,7 @@
\catcode`\ =10 % space need for catcode
}%
% \end{macrocode}
-% Now, we define \cs{@edindex@hyperref} if the \verb+hyperindex+ of \Lpack{hyperref} is enabled.
+% Now, we define \protect\cs{@edindex@hyperref} if the \verb+hyperindex+ of \protect\package{hyperref} is enabled.
% \begin{macrocode}
\ifdefequal{\iftrue}{\ifHy@hyperindex}{%
\IfSubStr{\temp@}{|}%
@@ -13692,8 +13659,8 @@
}%
% \end{macrocode}
% \begin{macrocode}
-% If we use both xindy and hyperref, first get the \cs{index@command} command.
-% Then define \cs{@edindex@hyperref} in the form \verb+eledmacXXX+
+% If we use both xindy and hyperref, first get the \protect\cs{index@command} command.
+% Then define \protect\cs{@edindex@hyperref} in the form \verb+eledmacXXX+
% \begin{macrocode}
{\ifxindyhyperref@%
\IfSubStr{\temp@}{|}%
@@ -13702,7 +13669,7 @@
\gdef\@edindex@hyperref{|eledmac\thelabidx}%
% \end{macrocode}
% If we start a reference range by a opening parenthesis,
-% store the \cs{thelabidx} for the current \cs{edindex}, then define \cs{@edindex@hyperref} in the form \verb+|(eledmac\thelabidx+.
+% store the \protect\cs{thelabidx} for the current \protect\cs{edindex}, then define \protect\cs{@edindex@hyperref} in the form \verb+|(eledmac\thelabidx+.
% \begin{macrocode}
\IfStrEq{\@index@parenthesis}{(}%
{%
@@ -13711,9 +13678,9 @@
}%
{}%
% \end{macrocode}
-% This \cs{thelabidx} will be called back at the closing parenthesis, to have the same number in
-% \cs{@edindex@hyperref} command that we had at the opening parenthesis.
-% \cs{@edindex@hyperref} start by a closing parenthesis, then followed by \verb+eledmacXXX+ where \verb+XXX+ is the \cs{thelabidx} of the opening \cs{edindex}.
+% This \protect\cs{thelabidx} will be called back at the closing parenthesis, to have the same number in
+% \protect\cs{@edindex@hyperref} command that we had at the opening parenthesis.
+% \protect\cs{@edindex@hyperref} start by a closing parenthesis, then followed by \verb+eledmacXXX+ where \verb+XXX+ is the \protect\cs{thelabidx} of the opening \protect\cs{edindex}.
% \begin{macrocode}
\IfStrEq{\@index@parenthesis}{)}%
{%
@@ -13752,7 +13719,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \changes{v1.14.0}{2014/10/27}{Delete previous override of \cs{l@d@@wrindexhyp} at the beginning of a document when hyperref is not loaded.}
+% \changes{v1.14.0}{2014/10/27}{Delete previous override of \protect\cs{l@d@@wrindexhyp} at the beginning of a document when hyperref is not loaded.}
%
%
% \section{Verse}
@@ -13766,13 +13733,13 @@
% \begin{macro}{\@hangingsymbol}
% \begin{macro}{\sethangingsymbol}
% \begin{macro}{\ifinstanza}
-% The macro \cs{@hangingsymbol} is used to insert a symbol on each hanging of verses. It is set by user level macro \cs{sethangingsymbol}.
+% 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 typographie the symbol is `['. We obtain it by the next code:
%\begin{verbatim}
%\sethangingsymbol{[\,}
%\end{verbatim}
-% The \cs{ifinstanza} boolean is used to be sure that we are in a stanza part.
+% The \protect\cs{ifinstanza} boolean is used to be sure that we are in a stanza part.
% \begin{macrocode}
\def\@hangingsymbol{}
\newcommand*{\sethangingsymbol}[1]{%
@@ -13785,7 +13752,7 @@
% \end{macro}
% \begin{macro}{\inserthangingymbol}
% \begin{macro}{\ifinserthangingsymbol}
-% The boolean \cs{ifinserthangingsymbol} is set to TRUE when \cs{@lock} is greater than 1, i.e. when we are not in the first line of a verse. The switch of \cs{ifinserthangingsymbol} is made in \cs{do@line} before the printing of line but after the line number calculation.
+% The boolean \protect\cs{ifinserthangingsymbol} is set to TRUE when \protect\cs{@lock} is greater than 1, i.e. when we are not in the first line of a verse. The switch of \protect\cs{ifinserthangingsymbol} is made in \protect\cs{do@line} before the printing of line but after the line number calculation.
%\changes{v0.15.0}{2012/06/11}{New management of hangingsymbol insertion, preventing undesirable insertions.}
%\changes{v0.17.0}{2012/08/03}{New new management of hangingsymbol insertion, preventing undesirable insertions.}
% \changes{v1.6.1}{2013/10/27}{Hang verse is now not automatically flush right.}
@@ -13818,7 +13785,7 @@
% \begin{macro}{\stanzaindentbase}
% Before we can define the main macros we need to save and reset
% some category codes. To save the current values we use
-% \cs{next} and \cs{body} from the \cs{loop} macro.
+% \protect\cs{next} and \protect\cs{body} from the \protect\cs{loop} macro.
% \begin{macrocode}
\chardef\body=\catcode`\@
\catcode`\@=11
@@ -13830,7 +13797,7 @@
% A count register is allocated for counting lines in a stanza; also allocated
% is a dimension register which is used to specify the base value for
% line indentation; all stanza indentations are multiples of this
-% value. The default value of \cs{stanzaindentbase} is 20pt.
+% value. The default value of \protect\cs{stanzaindentbase} is 20pt.
% \begin{macrocode}
\newcount\stanza@count
\newlength{\stanzaindentbase}
@@ -13844,10 +13811,10 @@
% \begin{macro}{\setstanzavalues}
% The indentations of stanza lines are non-negative integer multiples of the
% unit called
-% \cs{stanzaindentbase}. To make it easier for the user to specify these
+% \protect\cs{stanzaindentbase}. To make it easier for the user to specify these
% numbers, some list macros are defined. These take numerical values
% in a list separated by commas and assign the values to special control
-% sequences using \cs{mathchardef}. Though this does limit the range
+% sequences using \protect\cs{mathchardef}. Though this does limit the range
% from 0 to 32767, it should suffice for most applications,
% including \emph{penalties}, which will be discussed below.
% \begin{macrocode}
@@ -13867,10 +13834,10 @@
%
% \begin{macro}{\setstanzaindents}
% \begin{macro}{\setstanzapenalties}
-% In the original \edmac, \cs{setstanzavalues}\verb+{sza}+\marg{...} had to be called to
-% set the indents, and similarly \cs{setstanzavalues}\verb+{szp}+\marg{...}.
+% In the original \edmac, \protect\cs{setstanzavalues}\verb+{sza}+\marg{...} had to be called to
+% set the indents, and similarly \protect\cs{setstanzavalues}\verb+{szp}+\marg{...}.
% to set the penalties.
-% \cs{setstanzaindents} and \cs{setstanzapenalties} macros are a convenience to give
+% \protect\cs{setstanzaindents} and \protect\cs{setstanzapenalties} macros are a convenience to give
% the user one less thing to worry about (misspelling the first argument).
%
% \begin{macrocode}
@@ -13882,7 +13849,7 @@
% \end{macro}
% \begin{macro}{\managestanza@modulo}
% Since version 0.13, the \verb+stanzaindentsrepetition+ counter can be used when the indentation is repeated every n verses.
-% The \cs{managestanza@modulo} is a command which modifies the counter stanza@modulo. The command adds 1 to stanza@modulo, but if stanza@modulo is equal to the stanzaindentsrepetition counter, the command restarts it.
+% The \protect\cs{managestanza@modulo} is a command which modifies the counter stanza@modulo. The command adds 1 to stanza@modulo, but if stanza@modulo is equal to the stanzaindentsrepetition counter, the command restarts it.
%\changes{v0.13.0}{2011/11/08}{New stanzaindentsrepetition counter to repeat stanza indents every \emph{n} verses.}
% % \changes{v1.5.1}{2013/08/16}{Correct stanzaindentsrepetition counter}
% \begin{macrocode}
@@ -13899,7 +13866,7 @@
% \end{macro}
% \begin{macro}{\stanzaindent}
% \begin{macro}{\stanzaindent*}
-% The macro \cs{stanzaindent}, when called at the beginning of a verse, changes the indentation normally defined for this verse by \cs{setstanzaindent}.
+% The macro \protect\cs{stanzaindent}, when called at the beginning of a verse, changes the indentation normally defined for this verse by \protect\cs{setstanzaindent}.
% The starred version skips the current verse for the repetition of stanza indent.
% \begin{macrocode}
\newcommand{\stanzaindent}[1]{%
@@ -13921,15 +13888,15 @@
% \begin{macro}{\stanza@line}
% \begin{macro}{\stanza@hang}
% \begin{macro}{\sza@penalty}
-% Now we arrive at the main works. \cs{stanza@line} sets the
+% Now we arrive at the main works. \protect\cs{stanza@line} sets the
% indentation for the line and starts a numbered paragraph---each
-% line is treated as a paragraph. \cs{stanza@hang} sets the
+% line is treated as a paragraph. \protect\cs{stanza@hang} sets the
% hanging indentation to be used if the stanza line requires
% more than one print line.
%If it is known that each stanza line
% will fit on one print line, it is advisable to set the
-% hanging indentation to zero. \cs{sza@penalty} places the
+% hanging indentation to zero. \protect\cs{sza@penalty} places the
% specified penalty following each stanza line.
% By default, this
% facility is turned off so that no penalty is included. However,
@@ -13960,21 +13927,21 @@
%
% \begin{macro}{\@startstanza}
% \begin{macro}{\stanza}
-% \changes{v1.12.0}{2014/08/05}{Add \cs{newverse} macro, \cs{falseverse} deprecated.}
-% \changes{v1.12.0}{2014/08/05}{\cs{Stanza} can have an optional argument: content to be printed before.}
+% \changes{v1.12.0}{2014/08/05}{Add \protect\cs{newverse} macro, \protect\cs{falseverse} deprecated.}
+% \changes{v1.12.0}{2014/08/05}{\protect\cs{Stanza} can have an optional argument: content to be printed before.}
% \changes{v1.12.0}{2014/08/05}{\ampersand can have an optional argument: content to be printed after.}
% \changes{v1.20.0}{2015/03/22}{\ampersand\ and \textbackslash\ampersand\ can be preceded by spaces.}
% \begin{macro}{\@stopstanza}
% \begin{macro}{\newverse}
-% \changes{v1.6.0}{2013/10/09}{Add \cs{falseverse} macro.}
-% Now we have the components of the \cs{stanza} macro,
+% \changes{v1.6.0}{2013/10/09}{Add \protect\cs{falseverse} macro.}
+% Now we have the components of the \protect\cs{stanza} macro,
% which appears at the start of a group of lines. This macro
% initializes the count and checks to see if hanging indentation
% and penalties are to be included. Hanging indentation suspends
% the line count, so that the enumeration is by verse line
% rather than by print line. If the print line count is desired,
-% invoke \cs{let}\cs{startlock}\cs{relax} and do the same for
-% \cs{endlock}. Here and above we have used \cs{xdef} to
+% invoke \protect\cs{let}\protect\cs{startlock}\protect\cs{relax} and do the same for
+% \protect\cs{endlock}. Here and above we have used \protect\cs{xdef} to
% make the stored macros take up a bit less space, but it also
% makes them more obscure to the reader. Lines of the stanza are
% delimited by ampersands \&.
@@ -14055,7 +14022,7 @@
% \subsection{Preamble: macro as environment}
%
%
-% The following is borrowed, and renamed, from the \Lpack{amsmath}
+% The following is borrowed, and renamed, from the \protect\package{amsmath}
% package. See also the CTT thread `eeq and amstex', 1995/08/31, started
% by Keith Reckdahl and ended definitively by David M. Jones.
%
@@ -14065,14 +14032,14 @@
% the macro.
%
% \begin{macro}{\@emptytoks}
-% This is actually defined in the \Lpack{amsgen} package.
+% This is actually defined in the \protect\package{amsgen} package.
% \begin{macrocode}
\newtoks\@emptytoks
% \end{macrocode}
% \end{macro}
%
-% The rest is from \Lpack{amsmath}.
+% The rest is from \protect\package{amsmath}.
%
% \begin{macro}{\l@denvbody}
% A token register to contain the body.
@@ -14092,7 +14059,7 @@
% \end{macro}
%
% \begin{macro}{\l@dcollect@body}
-% The macro \cs{l@dcollect@body} starts the scan for the \cs{end}\marg{env} command
+% The macro \protect\cs{l@dcollect@body} starts the scan for the \protect\cs{end}\marg{env} command
% of the current environment. It takes a macro name as argument. This macro
% is supposed to take the whole body of the environment as its argument.
% For example, given |cenv#1{...}| as a macro that processes |#1|, then
@@ -14113,8 +14080,8 @@
% \end{macro}
%
% \begin{macro}{\l@dpush@begins}
-% When adding a piece of the current environment's contents to \cs{l@denvbody},
-% we scan it to check for additional \cs{begin} tokens, and add a `b' to the
+% When adding a piece of the current environment's contents to \protect\cs{l@denvbody},
+% we scan it to check for additional \protect\cs{begin} tokens, and add a `b' to the
% stack for any that we find.
% \begin{macrocode}
\def\l@dpush@begins#1\begin#2{%
@@ -14124,12 +14091,12 @@
% \end{macro}
%
% \begin{macro}{\l@dcollect@@body}
-% \cs{l@dcollect@@body} takes two arguments: the first will consist of all text
-% up to the next |\end| command, and the second will be the \cs{end} command's
-% argument. If there are any extra \cs{begin} commands in the body text,
-% a marker is pushed onto a stack by the \cs{l@dpush@begins} function.
-% Empty state for this stack means we have reached the \cs{end} that matches
-% our original \cs{begin}. Otherwise we need to include the \cs{end} and its
+% \protect\cs{l@dcollect@@body} takes two arguments: the first will consist of all text
+% up to the next |\end| command, and the second will be the \protect\cs{end} command's
+% argument. If there are any extra \protect\cs{begin} commands in the body text,
+% a marker is pushed onto a stack by the \protect\cs{l@dpush@begins} function.
+% Empty state for this stack means we have reached the \protect\cs{end} that matches
+% our original \protect\cs{begin}. Otherwise we need to include the \protect\cs{end} and its
% argument in the material we are adding to the environment body accumulator.
% \begin{macrocode}
\def\l@dcollect@@body#1\end#2{%
@@ -14148,7 +14115,7 @@
% \end{macrocode}
% \end{macro}
%
-% There was a question on CTT about how to use \cs{collect@body} for a macro
+% There was a question on CTT about how to use \protect\cs{collect@body} for a macro
% taking an argument. The following is part of that thread.
% \begin{verbatim}
% From: Heiko Oberdiek <oberdiek@uni-freiburg.de>
@@ -14343,7 +14310,7 @@
% \end{macro}
% \begin{macro}{\EDTEXT}
% \begin{macro}{\xedtext}
-% We need to be able to modify the \cs{edtext} macros
+% We need to be able to modify the \protect\cs{edtext} macros
% and also restore their original definitions.
% \begin{macrocode}
\let\EDTEXT=\edtext
@@ -14354,7 +14321,7 @@
%
% \begin{macro}{\EDLABEL}
% \begin{macro}{\xedlabel}
-% We need to be able to modify and restore the \cs{edlabel} macro.
+% We need to be able to modify and restore the \protect\cs{edlabel} macro.
% \begin{macrocode}
\let\EDLABEL=\edlabel
\newcommand*{\xedlabel}[1]{\EDLABEL{#1}}
@@ -14366,7 +14333,7 @@
% \begin{macro}{\EDINDEX}
% \begin{macro}{\xedindex}
% \begin{macro}{\nulledindex}
-% Macros supporting modification and restoration of \cs{edindex}.
+% Macros supporting modification and restoration of \protect\cs{edindex}.
% \begin{macrocode}
\let\EDINDEX=\edindex
\newcommand{\xedindex}{\@bsphack%
@@ -14387,8 +14354,8 @@
% \end{macro}
%
% \begin{macro}{\l@dgobblearg}
-% \cs{l@dgobbleoptarg}\oarg{arg}\marg{arg} replaces these two arguments (first is optional) by \cs{relax}.
-% \changes{v1.12.5}{2014/08/28}{\cs{l@dgobblearg} becomes \cs{l@dgobbeloptarg}}
+% \protect\cs{l@dgobbleoptarg}\oarg{arg}\marg{arg} replaces these two arguments (first is optional) by \protect\cs{relax}.
+% \changes{v1.12.5}{2014/08/28}{\protect\cs{l@dgobblearg} becomes \protect\cs{l@dgobbeloptarg}}
% \begin{macrocode}
\newcommand*{\l@dgobbleoptarg}[2][]{\relax}%
@@ -14407,7 +14374,7 @@
% \begin{macro}{\l@dmodforedtext}
% \begin{macro}{\l@drestoreforedtext}
% Modify and restore various macros for when |\edtext| is used.
-% \changes{v1.12.5}{2014/08/28}{Debug optional arguments of \cs{Xfootnote} in tabular context}
+% \changes{v1.12.5}{2014/08/28}{Debug optional arguments of \protect\cs{Xfootnote} in tabular context}
% \begin{macrocode}
\newcommand{\l@dmodforedtext}{%
\let\edtext\relax
@@ -14457,9 +14424,9 @@
% \end{macro}
% \begin{macro}{\disablel@dtabfeet}
% \begin{macro}{\enablel@dtabfeet}
-% Declarations for using or using \cs{edtext} inside
+% Declarations for using or using \protect\cs{edtext} inside
% tabulars.
-% The default at this point is for \cs{edtext}.
+% The default at this point is for \protect\cs{edtext}.
% \begin{macrocode}
\newcommand\disablel@dtabfeet{\l@dmodforedtext}%
\newcommand\enablel@dtabfeet{\l@drestoreforedtext}%
@@ -14469,8 +14436,8 @@
% \subsubsection{Counters, boxes and lengths}
% \begin{macro}{\l@dampcount}
% \begin{macro}{\l@dcolcount}
-% \cs{l@dampcount} is a counter for the \& column dividers and
-% \cs{l@dcolcount} is a counter for the columns.
+% \protect\cs{l@dampcount} is a counter for the \& column dividers and
+% \protect\cs{l@dcolcount} is a counter for the columns.
% \begin{macrocode}
\newcount\l@dampcount
\l@dampcount=1\relax
@@ -14538,7 +14505,7 @@
%
% \begin{macro}{\l@dcolwidth}
% This is a cunning way of storing the columnwidths indexed by
-% the column number \cs{l@dcolcount}, like an array. (was |\Dimenzuordnung|)
+% the column number \protect\cs{l@dcolcount}, like an array. (was |\Dimenzuordnung|)
% \begin{macrocode}
\newcommand{\l@dcolwidth}{\ifcase \the\l@dcolcount \dcoli %???
\or \dcoli \or \dcolii \or \dcoliii
@@ -14639,7 +14606,7 @@
% \end{macro}
%
% \begin{macro}{\edtabcolsep}
-% The length \cs{edtabcolsep} controls the distance between columns.
+% The length \protect\cs{edtabcolsep} controls the distance between columns.
% \begin{macrocode}
\newskip\edtabcolsep
\global\edtabcolsep=10pt
@@ -14688,7 +14655,7 @@
% \begin{macro}{\c@addcolcount}
% \begin{macro}{\theaddcolcount}
% A counter to hold the number of a column. We use a roman number so
-% that we can grab the column dimension from \cs{dcol}.
+% that we can grab the column dimension from \protect\cs{dcol}.
% \begin{macrocode}
\newcounter{addcolcount}
\renewcommand{\theaddcolcount}{\roman{addcolcount}}
@@ -14925,7 +14892,7 @@
% \end{macro}
%
% \begin{macro}{\edatleft}
-% \cs{edatleft}\oarg{math}\marg{symbol}\marg{len}.
+% \protect\cs{edatleft}\oarg{math}\marg{symbol}\marg{len}.
% Left \meta{symbol}, 2\meta{len} high with prepended \meta{math} vertically centered.
% \begin{macrocode}
\newcommand{\edatleft}[3][\@empty]{%
@@ -14941,7 +14908,7 @@
%
%
% \begin{macro}{\edatright}
-% \cs{edatright}\oarg{math}\marg{symbol}\marg{len}.
+% \protect\cs{edatright}\oarg{math}\marg{symbol}\marg{len}.
% Right \meta{symbol}, 2\meta{len} high with appended \meta{math} vertically centered.
% \begin{macrocode}
\newcommand{\edatright}[3][\@empty]{%
@@ -14958,7 +14925,7 @@
%
%
% \begin{macro}{\edvertline}
-% \cs{edvertline}\marg{len} vertical line \meta{len} high.
+% \protect\cs{edvertline}\marg{len} vertical line \meta{len} high.
% \begin{macrocode}
\newcommand{\edvertline}[1]{\vbox to 8pt{\vss\hbox{\vrule height #1}\vfil}}
@@ -14966,7 +14933,7 @@
% \end{macro}
%
% \begin{macro}{\edvertdots}
-% \cs{edvertdots}\marg{len} vertical dotted line \meta{len} high.
+% \protect\cs{edvertdots}\marg{len} vertical dotted line \meta{len} high.
% \begin{macrocode}
\newcommand{\edvertdots}[1]{\vbox to 1pt{\vss\vbox to #1%
{\cleaders\hbox{$\m@th\hbox{.}\vbox to 0.5em{ }$}\vfil}}}
@@ -14977,10 +14944,10 @@
%
%
% \begin{macro}{\l@dtabaddcols}
-% \cs{l@dtabaddcols}\marg{startcol}\marg{endcol} adds the widths of
-% the columns \meta{startcol} through \meta{endcol} to \cs{edfilldimen}.
+% \protect\cs{l@dtabaddcols}\marg{startcol}\marg{endcol} adds the widths of
+% the columns \meta{startcol} through \meta{endcol} to \protect\cs{edfilldimen}.
% It is a \LaTeX\ style
-% reimplementation of the original \cs{@add@}.
+% reimplementation of the original \protect\cs{@add@}.
% \begin{macrocode}
\newcommand{\l@dtabaddcols}[2]{%
\l@dcheckstartend{#1}{#2}%
@@ -14999,9 +14966,9 @@
%
% \begin{macro}{\ifl@dstartendok}
% \begin{macro}{\l@dcheckstartend}
-% \cs{l@dcheckstartend}\marg{startcol}\marg{endcol} checks that the values
+% \protect\cs{l@dcheckstartend}\marg{startcol}\marg{endcol} checks that the values
% of \meta{startcol} and \meta{endcol} are sensible. If they are then
-% \cs{ifl@dstartendok} is set TRUE, otherwise it is set FALSE.
+% \protect\cs{ifl@dstartendok} is set TRUE, otherwise it is set FALSE.
% \begin{macrocode}
\newif\ifl@dstartendok
\newcommand{\l@dcheckstartend}[2]{%
@@ -15027,12 +14994,12 @@
% \begin{macro}{\edrowfill}
% \begin{macro}{\@edrowfill@}
% \begin{macro}{\@EDROWFILL@}
-% \cs{edrowfill}\marg{startcol}\marg{endcol}{fill}
+% \protect\cs{edrowfill}\marg{startcol}\marg{endcol}{fill}
% fills columns \meta{startcol} to \meta{endcol} inclusive with
-% \meta{fill} (e.g. \cs{hrulefill}, \cs{upbracefill}).
+% \meta{fill} (e.g. \protect\cs{hrulefill}, \protect\cs{upbracefill}).
% This is a \LaTeX\ style reimplementation and generalization of the
-% original \cs{waklam}, \cs{Waklam}, \cs{waklamec}, \cs{wastricht}
-% and \cs{wapunktel} macros.
+% original \protect\cs{waklam}, \protect\cs{Waklam}, \protect\cs{waklamec}, \protect\cs{wastricht}
+% and \protect\cs{wapunktel} macros.
% \begin{macrocode}
\newcommand*{\edrowfill}[3]{%
\l@dtabaddcols{#1}{#2}%
@@ -15048,16 +15015,16 @@
%
% \DescribeMacro{\edbeforetab}
% \DescribeMacro{\edaftertab}
-% The macro \cs{edbeforetab}\marg{text}\marg{math} puts \meta{text} at
+% The macro \protect\cs{edbeforetab}\marg{text}\marg{math} puts \meta{text} at
% the left margin before array cell entry \meta{math}. Conversely,
-% the macro \cs{edaftertab}\marg{math}\marg{text} puts \meta{text}
+% the macro \protect\cs{edaftertab}\marg{math}\marg{text} puts \meta{text}
% at the right margin after array cell entry \meta{math}.
-% \cs{edbeforetab} should be in the first column and \cs{edaftertab} in the
+% \protect\cs{edbeforetab} should be in the first column and \protect\cs{edaftertab} in the
% last column.
% The following macros support these.
%
% \begin{macro}{\leftltab}
-% \cs{leftltab}\marg{text} for \cs{edbeforetab} in \cs{ltab}.
+% \protect\cs{leftltab}\marg{text} for \protect\cs{edbeforetab} in \protect\cs{ltab}.
% \begin{macrocode}
\newcommand{\leftltab}[1]{%
\hb@xt@\z@{\vbox{\edtabindent%
@@ -15067,7 +15034,7 @@
% \end{macro}
%
% \begin{macro}{\leftrtab}
-% \cs{leftrtab}\marg{text}\marg{math} for \cs{edbeforetab} in \cs{rtab}.
+% \protect\cs{leftrtab}\marg{text}\marg{math} for \protect\cs{edbeforetab} in \protect\cs{rtab}.
% \begin{macrocode}
\newcommand{\leftrtab}[2]{%
#2\hb@xt@\z@{\vbox{\edtabindent%
@@ -15078,7 +15045,7 @@
% \end{macro}
%
% \begin{macro}{\leftctab}
-% \cs{leftctab}\marg{text}\marg{math} for \cs{edbeforetab} in \cs{ctab}.
+% \protect\cs{leftctab}\marg{text}\marg{math} for \protect\cs{edbeforetab} in \protect\cs{ctab}.
% \begin{macrocode}
\newcommand{\leftctab}[2]{%
\hb@xt@\z@{\vbox{\edtabindent\l@dcolcount=\l@dampcount%
@@ -15093,7 +15060,7 @@
% \end{macro}
%
% \begin{macro}{\rightctab}
-% \cs{rightctab}\marg{math}\marg{text} for \cs{edaftertab} in \cs{ctab}.
+% \protect\cs{rightctab}\marg{math}\marg{text} for \protect\cs{edaftertab} in \protect\cs{ctab}.
% \begin{macrocode}
\newcommand{\rightctab}[2]{%
\setbox\hilfsbox=\hbox{\def\edlabel##1{}%
@@ -15112,7 +15079,7 @@
% \end{macro}
%
% \begin{macro}{\rightltab}
-% \cs{rightltab}\marg{math}\marg{text} for \cs{edaftertab} in \cs{ltab}.
+% \protect\cs{rightltab}\marg{math}\marg{text} for \protect\cs{edaftertab} in \protect\cs{ltab}.
% \begin{macrocode}
\newcommand{\rightltab}[2]{%
\setbox\hilfsbox=\hbox{\def\edlabel##1{}%
@@ -15131,7 +15098,7 @@
% \end{macro}
%
% \begin{macro}{\rightrtab}
-% \cs{rightrtab}\marg{math}\marg{text} for \cs{edaftertab} in \cs{rtab}.
+% \protect\cs{rightrtab}\marg{math}\marg{text} for \protect\cs{edaftertab} in \protect\cs{rtab}.
% \begin{macrocode}
\newcommand{\rightrtab}[2]{%
\setbox\hilfsbox=\hbox{\def\edlabel##1{}%
@@ -15148,7 +15115,7 @@
% \begin{macro}{\rtab}
% \begin{macro}{\edbeforetab}
% \begin{macro}{\edaftertab}
-% \cs{rtab}\marg{body} typesets \meta{body} as an array with the
+% \protect\cs{rtab}\marg{body} typesets \meta{body} as an array with the
% entries right justified.
%
%
@@ -15171,7 +15138,7 @@
% \end{macro}
%
% \begin{macro}{\measurembody}
-% \cs{measurembody}\marg{body} measures the array \meta{body}.
+% \protect\cs{measurembody}\marg{body} measures the array \meta{body}.
% \begin{macrocode}
\newcommand{\measurembody}[1]{%
\disablel@dtabfeet%
@@ -15185,7 +15152,7 @@
% \end{macro}
%
% \begin{macro}{\rtabtext}
-% \cs{rtabtext}\marg{body} typesets \meta{body} as a tabular with the
+% \protect\cs{rtabtext}\marg{body} typesets \meta{body} as a tabular with the
% entries right justified.
% \begin{macrocode}
\newcommand{\rtabtext}[1]{%
@@ -15200,7 +15167,7 @@
% \end{macro}
%
% \begin{macro}{\measuretbody}
-% \cs{measuretbody}\marg{body} measures the tabular \meta{body}.
+% \protect\cs{measuretbody}\marg{body} measures the tabular \meta{body}.
% \begin{macrocode}
\newcommand{\measuretbody}[1]{%
\disable@notes%
@@ -15386,7 +15353,7 @@
% \begin{environment}{edarrayl}
% \begin{environment}{edarrayc}
% \begin{environment}{edarrayr}
-% The `environment' forms for \cs{ltab}, \cs{ctab} and \cs{rtab}.
+% The `environment' forms for \protect\cs{ltab}, \protect\cs{ctab} and \protect\cs{rtab}.
% \begin{macrocode}
\newenvironment{edarrayl}{\l@dcollect@body\ltab}{}
\newenvironment{edarrayc}{\l@dcollect@body\ctab}{}
@@ -15400,7 +15367,7 @@
% \begin{environment}{edtabularl}
% \begin{environment}{edtabularc}
% \begin{environment}{edtabularr}
-% The `environment' forms for \cs{ltabtext}, \cs{ctabtext} and \cs{rtabtext}.
+% The `environment' forms for \protect\cs{ltabtext}, \protect\cs{ctabtext} and \protect\cs{rtabtext}.
% \begin{macrocode}
\newenvironment{edtabularl}{\l@dcollect@body\ltabtext}{}
\newenvironment{edtabularc}{\l@dcollect@body\ctabtext}{}
@@ -15415,19 +15382,19 @@
% \section{Quotation's commands}
% \begin{macro}{\initnumbering@quote}
% This macro, called at the begin of any numbered section, redefine locally the \verb+quotation+ and \verb+quote+ environment, in order to allow to use it inside numbered section.
-% \changes{v2.0.0}{2015/07/19}{\cs{initnumbering@sectcmd} becomes \cs{initnumbering@quote}}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{initnumbering@sectcmd} becomes \protect\cs{initnumbering@quote}}
% \begin{macro}{\quotation}
% \begin{macro}{\endquotation}
% \begin{macro}{\quote}
% \begin{macro}{\endquote}
-% \changes{v1.12.0}{2014/08/05}{\cs{ledxxx} sectioning commands are deprecated and replaced by \cs{eledxxx} commands.}
-% \changes{v1.2.0}{2012/10/08}{Compatibility of \cs{ledchapter} with the \emph{memoir} class.}
+% \changes{v1.12.0}{2014/08/05}{\protect\cs{ledxxx} sectioning commands are deprecated and replaced by \protect\cs{eledxxx} commands.}
+% \changes{v1.2.0}{2012/10/08}{Compatibility of \protect\cs{ledchapter} with the \emph{memoir} class.}
% \changes{v1.3.0}{2012/11/01}{\emph{Quotation} and {quote} environment inside numbered sections.}
% \changes{v1.4.1}{2012/11/16}{New option \emph{noquotation}.}
-% \changes{v1.4.7}{2012/06/07}{Compatibility of sectioning commands with \cs{autopar}.}
+% \changes{v1.4.7}{2012/06/07}{Compatibility of sectioning commands with \protect\cs{autopar}.}
% \changes{v1.8.0}{2013/12/13}{Correction of sectioning commands in parallel texts.}
% \changes{v1.10.0}{2014/02/27}{Correction of sectioning commands in parallel texts.}
-% \cs{initnumbering@quote} defines quotation environment.
+% \protect\cs{initnumbering@quote} defines quotation environment.
% \begin{macrocode}
\newcommand{\initnumbering@quote}{
\ifnoquotation@\else
@@ -15486,13 +15453,13 @@
% \section{Section's title commands}
% \subsection{Commands to disable some feature}
% \begin{macro}{\ledsectnotoc}
-% The \cs{ledsectnotoc} only disables the \cs{addcontentsline} macro.
+% The \protect\cs{ledsectnotoc} only disables the \protect\cs{addcontentsline} macro.
% \begin{macrocode}
\newcommand{\ledsectnotoc}{\let\addcontentsline\@gobblethree}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ledsectnomark}
-% The \cs{ledsectnomark} only disables the \cs{chaptermark}, \cs{sectionmark} and \cs{subsectionmark} macros.
+% The \protect\cs{ledsectnomark} only disables the \protect\cs{chaptermark}, \protect\cs{sectionmark} and \protect\cs{subsectionmark} macros.
% \begin{macrocode}
\newcommand{\ledsectnomark}{%
\let\chaptermark\@gobble%
@@ -15502,13 +15469,13 @@
% \end{macrocode}
% \end{macro}
% \subsection{General overview}
-% The system of \cs{eledxxxx} commands to section text work like this:
+% 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:
% \begin{itemize}
% \item The section level.
% \item The section title.
-% \item The side (when \Lpack{eledpar} is used).
+% \item The side (when \protect\package{eledpar} is used).
% \item The pstart where the command is called.
% \item If we have starred version or not.
% \end{itemize}
@@ -15520,16 +15487,16 @@
% \end{itemize}
% \item This last command is called when the pstart is effectively printed.
% \end{enumerate}
-% \subsection{\cs{beforeeledchapter} command}
-% We do not define commands for \cs{eledsection} and related if the \verb+noeledsec+ option is loaded.
-% We use \Lpack{etoolbox} tests and not the \cs{ifxxx}\ldots\cs{else}\ldots\cs{fi} structure to prevent problem of expansions with command after the \cs{ifxxx} which contains \cs{fi}.
-% As we patch command inside this test, we need to change the category code of \# character \emph{before} \cs{notbool} statement, because the second argument is read with the standard catcode (read \thetexbook to understand when the catcode's change has effect).
+% \subsection{\protect\cs{beforeeledchapter} command}
+% We do not define commands for \protect\cs{eledsection} and related if the \verb+noeledsec+ option is loaded.
+% We use \protect\package{etoolbox} tests and not the \protect\cs{ifxxx}\ldots\protect\cs{else}\ldots\protect\cs{fi} structure to prevent problem of expansions with command after the \protect\cs{ifxxx} which contains \protect\cs{fi}.
+% As we patch command inside this test, we need to change the category code of \# character \emph{before} \protect\cs{notbool} statement, because the second argument is read with the standard catcode (read \thetexbook to understand when the catcode's change has effect).
% \begin{macrocode}
\catcode`\#=12
\notbool{@noeled@sec}{%
% \end{macrocode}
% \begin{macro}{\beforeeledchapter}
-% For technical reasons, not yet solved, page-breaking before chapters can't be made automatically by eledmac. Users have to use \cs{beforeeledchapter}.
+% For technical reasons, not yet solved, page-breaking before chapters can't be made automatically by eledmac. Users have to use \protect\cs{beforeeledchapter}.
% \begin{macrocode}
\ifl@dmemoir
\newcommand\beforeeledchapter{%
@@ -15548,14 +15515,14 @@
% \end{macro}
% \subsection{Auxiliary commands}
% \begin{macro}{\if@eled@sectioning}
-% The boolean \cs{if@eled@sectioning} is set to true when a sectioning command is called by a \cs{eledxxx} command, and set to false after. It is used to enable/disable line number printing.
+% The boolean \protect\cs{if@eled@sectioning} is set to true when a sectioning command is called by a \protect\cs{eledxxx} command, and set to false after. It is used to enable/disable line number printing.
% \begin{macrocode}
\newif\if@eled@sectioning
% \end{macrocode}
% \end{macro}
% \begin{macro}{\print@leftmargin@eledsection}
% \begin{macro}{\print@rightmargin@eledsection}
-% \cs{print@leftmargin@eledsection} and \cs{print@rightmargin@eledsection} are added by \macpackage inside the code of sectioning command, in order to affix lines numbers.
+% \protect\cs{print@leftmargin@eledsection} and \protect\cs{print@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@rightmargin@eledsection{%
@@ -15601,15 +15568,15 @@
% \begin{macro}{\@makeschapterhead}
% \begin{macro}{\@sect}
% \begin{macro}{\@ssect}
-% \changes{v1.12.5}{2014/08/28}{Debug \cs{eledchapter} in parallel with \Lpack{memoir}}
-% \changes{v1.14.2}{2014/12/17}{Debug \cs{edtext} after starred sectioning commands when using \Lclass{memoir} class.}
-% We have to patch \LaTeX, \Lclass{book} and \Lclass{memoir} sectioning commands in order to:
+% \changes{v1.12.5}{2014/08/28}{Debug \protect\cs{eledchapter} in parallel with \protect\package{memoir}}
+% \changes{v1.14.2}{2014/12/17}{Debug \protect\cs{edtext} after starred sectioning commands when using \protect\ltxclass{memoir} class.}
+% We have to patch \LaTeX, \protect\ltxclass{book} and \protect\ltxclass{memoir} sectioning commands in order to:
% \begin{itemize}
-% \item Disable \cs{edtext} inside.
-% \item Disable page breaking (for \cs{chapter}).
+% \item Disable \protect\cs{edtext} inside.
+% \item Disable page breaking (for \protect\cs{chapter}).
% \item Add line numbers and sidenotes.
% \end{itemize}
-% Unfortunately, Maïeul Rouquette was not able to try if \Lclass{memoir} is loaded. That is why \Lpack{eledmac} tries to define for both standard class and \Lclass{memoir} class.
+% Unfortunately, Maïeul Rouquette was not able to try if \protect\ltxclass{memoir} is loaded. That is why \protect\package{eledmac} tries to define for both standard class and \protect\ltxclass{memoir} class.
%
%
% \begin{macrocode}
@@ -15730,8 +15697,8 @@
{}
% \end{macrocode}
-% \changes{v1.14.1}{2014/12/15}{Debug sectioning commands when using both \Lpack{handout} and \Lpack{hyperref} package.}
-% \Lpack{hyperref} also redefines \cs{@sect}. That is why, when manipulating arguments, we patch \cs{@sect} and the same only if \Lpack{hyperref} is not used. If it is, we patch the \cs{NR} commands.
+% \changes{v1.14.1}{2014/12/15}{Debug sectioning commands when using both \protect\package{handout} and \protect\package{hyperref} package.}
+% \protect\package{hyperref} also redefines \protect\cs{@sect}. That is why, when manipulating arguments, we patch \protect\cs{@sect} and the same only if \protect\package{hyperref} is not used. If it is, we patch the \protect\cs{NR} commands.
% \begin{macrocode}
\@ifpackageloaded{nameref}{
@@ -15816,9 +15783,9 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \subsection{Main code of \cs{eledxxx} commands}
+% \subsection{Main code of \protect\cs{eledxxx} commands}
% \begin{macro}{\eled@sectioning@out}
-% \cs{eled@sectioning@out} is the output file, to dump the pstarts where a sectioning command is used.
+% \protect\cs{eled@sectioning@out} is the output file, to dump the pstarts where a sectioning command is used.
% \begin{macrocode}
\newwrite\eled@sectioning@out
% \end{macrocode}
@@ -16042,15 +16009,15 @@
% On the first run, the line-list file records the line number of where the page break is being changed (either forced, or prevented).
% On the next run, page breaks occur either before or after this line, depending on how the user sets the command. The default setting is after the line.
% \begin{macro}{\normal@page@break}
-% \cs{normal@page@break} is an \Lpack{etoolbox} list which contains the absolute line number of the last line, for each page.
+% \protect\cs{normal@page@break} is an \protect\package{etoolbox} list which contains the absolute line number of the last line, for each page.
% \begin{macrocode}
\def\normal@page@break{}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\prev@pb}
% \begin{macro}{\prev@nopb}
-% The \cs{l@prev@pb} macro is a \Lpack{etoolbox} list, which contains the lines in which page breaks occur (before or after).
-% The \cs{l@prev@nopb} macro is a \Lpack{etoolbox} list, which contains the lines with NO page break before or after.
+% The \protect\cs{l@prev@pb} macro is a \protect\package{etoolbox} list, which contains the lines in which page breaks occur (before or after).
+% The \protect\cs{l@prev@nopb} macro is a \protect\package{etoolbox} list, which contains the lines with NO page break before or after.
% \begin{macrocode}
\def\l@prev@pb{}
\def\l@prev@nopb{}
@@ -16061,10 +16028,10 @@
% \begin{macro}{\ledpbnum}
% \begin{macro}{\lednopb}
% \begin{macro}{\lednopbnum}
-% The \cs{ledpb} macro writes the call to \cs{led@pb} in line-list file.
-% The \cs{ledpbnum} macro writes the call to \cs{led@pbnum} in line-list file.
-% The \cs{lednopb} macro writes the call to \cs{led@nopb} in line-list file.
-% The \cs{lednopbnum} macro writes the call to \cs{led@nopbnum} in line-list file.
+% The \protect\cs{ledpb} macro writes the call to \protect\cs{led@pb} in line-list file.
+% The \protect\cs{ledpbnum} macro writes the call to \protect\cs{led@pbnum} in line-list file.
+% The \protect\cs{lednopb} macro writes the call to \protect\cs{led@nopb} in line-list file.
+% The \protect\cs{lednopbnum} macro writes the call to \protect\cs{led@nopbnum} in line-list file.
% \begin{macrocode}
\newcommand{\ledpb}{\write\linenum@out{\string\led@pb}}
\newcommand{\ledpbnum}[1]{\write\linenum@out{\string\led@pbnum{#1}}}
@@ -16079,10 +16046,10 @@
% \begin{macro}{\led@pbnum}
% \begin{macro}{\led@nopb}
% \begin{macro}{\led@nopbnum}
-% The \cs{led@pb} adds the absolute line number in the \cs{prev@pb} list.
-% The \cs{led@pbnum} adds the argument in the \cs{prev@pb} list.
-% The \cs{led@nopb} adds the absolute line number in the \cs{prev@nopb} list.
-% The \cs{led@nopbnum} adds the argument in the \cs{prev@nopb} list.
+% The \protect\cs{led@pb} adds the absolute line number in the \protect\cs{prev@pb} list.
+% The \protect\cs{led@pbnum} adds the argument in the \protect\cs{prev@pb} list.
+% The \protect\cs{led@nopb} adds the absolute line number in the \protect\cs{prev@nopb} list.
+% The \protect\cs{led@nopbnum} adds the argument in the \protect\cs{prev@nopb} list.
% \begin{macrocode}
\newcommand{\led@pb}{\listxadd{\l@prev@pb}{\the\absline@num}}
\newcommand{\led@pbnum}[1]{\listxadd{\l@prev@pb}{#1}}
@@ -16095,7 +16062,7 @@
% \end{macro}
% \begin{macro}{\ledpbsetting}
% \begin{macro}{\led@pb@setting}
-% The \cs{ledpbsetting} macro only changes the value of \cs{led@pb@macro}, for which the default value is \verb+before+.
+% The \protect\cs{ledpbsetting} macro only changes the value of \protect\cs{led@pb@macro}, for which the default value is \verb+before+.
% \begin{macrocode}
\def\led@pb@setting{before}
\newcommand{\ledpbsetting}[1]{\gdef\led@pb@setting{#1}}
@@ -16104,8 +16071,8 @@
% \end{macro}
% \begin{macro}{\led@check@pb}
% \begin{macro}{\led@check@nopb}
-% The \cs{led@check@pb} and \cs{led@check@nopb} are called before or after each line.
-% They check if a page break must occur, depending on the current line and on the content of \cs{l@pb}.
+% The \protect\cs{led@check@pb} and \protect\cs{led@check@nopb} are called before or after each line.
+% They check if a page break must occur, depending on the current line and on the content of \protect\cs{l@pb}.
% \begin{macrocode}
\newcommand{\led@check@pb}{\xifinlist{\the\absline@num}{\l@prev@pb}{\pagebreak[4]}{}}
\newcommand{\led@check@nopb}{%
@@ -16133,16 +16100,16 @@
% \end{macro}
% \section{Long verse: prevents being separated by a page break}
% \begin{macro}{\iflednopbinverse}
-% The \cs{lednopbinverse} boolean is set to false by default.
+% The \protect\cs{lednopbinverse} boolean is set to false by default.
% 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@pb@in@verse}
-% The \cs{check@pb@in@verse} checks if a verse is broken in two page.
+% The \protect\cs{check@pb@in@verse} checks if a verse is broken in two page.
% If true, it adds:
% \begin{itemize}
-% \item The absolute line number of the first line of the verse -1 in the \cs{led@pb} list, if the page break must occur before the verse.
-% \item The absolute line number of the first line of the verse -1 in the \cs{led@nopb} list, if the page break must occur after the verse.
+% \item The absolute line number of the first line of the verse -1 in the \protect\cs{led@pb} list, if the page break must occur before the verse.
+% \item The absolute line number of the first line of the verse -1 in the \protect\cs{led@nopb} list, if the page break must occur after the verse.
% \end{itemize}
% \begin{macrocode}
\newcommand{\check@pb@in@verse}{%
@@ -16217,12 +16184,12 @@
\unless\ifnofamiliar@
\let\notesXwidthliketwocolumns\noteswidthliketwocolumnsX
\fi
- \newcommandx[2][1,usedefault]{\parafootsep}{%
+ \newcommandx{\parafootsep}[2][1,usedefault]{%
\Xparafootsep[#1]{#2}%
\parafootsepX[#1]{#2}
}%
- \newcommandx[2][1,usedefault]{\afternote}{%
+ \newcommandx{\afternote}[2][1,usedefault]{%
\Xafternote[#1]{#2}%
\afternoteX[#1]{#2}%
}%
@@ -16278,14 +16245,14 @@
%
% \bibitem[Eck03]{PARALLEL}
% Matthias Eckermann.
-% \newblock \emph{The \Lpack{Parallel}-Package}.
+% \newblock \emph{The \protect\package{Parallel}-Package}.
% \newblock April 2003.
% \newblock (Available from CTAN in
% \texttt{macros/latex/contrib/parallel})
%
% \bibitem[Fai03]{FOOTMISC}
% Robin Fairbairns.
-% \newblock \emph{\Lpack{footmisc} --- a portmanteau package for
+% \newblock \emph{\protect\package{footmisc} --- a portmanteau package for
% customising footnotes in \LaTeX}.
% \newblock February 2003.
% \newblock (Available from CTAN in
@@ -16316,7 +16283,7 @@
%
% \bibitem[Wil02]{MEMOIR}
% Peter Wilson.
-% \newblock \emph{The \Lpack{memoir} class for configurable typesetting}.
+% \newblock \emph{The \protect\package{memoir} class for configurable typesetting}.
% \newblock November 2002.
% \newblock (Available from CTAN in
% \texttt{macros/latex/contrib/memoir})
@@ -16324,7 +16291,7 @@
% \bibitem[Wil04]{ELEDPAR}
% Peter Wilson and Maïeul Rouquette.
% \newblock \emph{Parallel typesetting for critical editions:
-% the \Lpack{eledpar} package}.
+% the \protect\package{eledpar} package}.
% \newblock December 2004.
% \newblock (Available from CTAN in
% \texttt{macros/latex/contrib/ledmmac})
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index 722f038f9a3..c5562ce8550 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -30,6 +30,8 @@
% hyperindex=true
hyperindex=false
]{hyperref}
+\addtolength\marginparwidth{30pt}
+\usepackage{doctools}
\usepackage{libertineotf}
\usepackage[series={A,B},noend,noeledsec,nofamiliar]{reledmac}
\usepackage{reledpar}
@@ -53,36 +55,33 @@
\CodelineIndex
\RecordChanges
\renewcommand{\MakeUppercase}[1]{#1}
- \newcommand{\Lpack}[1]{\textsf{#1}}
- \newcommand{\Lclass}[1]{\textsf{#1}}
- \newcommand{\file}[1]{\texttt{#1}}
- \newcommand{\edmac}{\Lpack{edmac}\xspace}
- \newcommand{\tabmac}{\Lpack{tabmac}\xspace}
- \newcommand{\edstanza}{\Lpack{edstanza}\xspace}
+ \newcommand{\edmac}{\protect\package{edmac}\xspace}
+ \newcommand{\tabmac}{\protect\package{tabmac}\xspace}
+ \newcommand{\edstanza}{\protect\package{edstanza}\xspace}
- \newcommand{\ledmac}{\Lpack{ledmac}\xspace}
- \newcommand{\Ledmac}{\Lpack{Ledmac}\xspace}
- \newcommand{\ledpar}{\Lpack{ledpar}\xspace}
- \newcommand{\Ledpar}{\Lpack{Ledpar}\xspace}
+ \newcommand{\ledmac}{\protect\package{ledmac}\xspace}
+ \newcommand{\Ledmac}{\protect\package{Ledmac}\xspace}
+ \newcommand{\ledpar}{\protect\package{ledpar}\xspace}
+ \newcommand{\Ledpar}{\protect\package{Ledpar}\xspace}
- \newcommand{\eledmac}{\Lpack{eledmac}\xspace}
- \newcommand{\Eledmac}{\Lpack{Eledmac}\xspace}
- \newcommand{\eledpar}{\Lpack{eledpar}\xspace}
- \newcommand{\Eledpar}{\Lpack{Eledpar}\xspace}
+ \newcommand{\eledmac}{\protect\package{eledmac}\xspace}
+ \newcommand{\Eledmac}{\protect\package{Eledmac}\xspace}
+ \newcommand{\eledpar}{\protect\package{eledpar}\xspace}
+ \newcommand{\Eledpar}{\protect\package{Eledpar}\xspace}
- \newcommand{\reledmac}{\Lpack{reledmac}\xspace}
- \newcommand{\Reledmac}{\Lpack{Reledmac}\xspace}
- \newcommand{\reledpar}{\Lpack{reledpar}\xspace}
- \newcommand{\Reledpar}{\Lpack{Reledpar}\xspace}
+ \newcommand{\reledmac}{\protect\package{reledmac}\xspace}
+ \newcommand{\Reledmac}{\protect\package{Reledmac}\xspace}
+ \newcommand{\reledpar}{\protect\package{reledpar}\xspace}
+ \newcommand{\Reledpar}{\protect\package{Reledpar}\xspace}
\let\macpackage\reledmac
\let\parpackage\reledpar
\let\Macpackage\reledmac
\let\Parpackage\reledpar
- \newcommand{\texbook}{\textit{TeXbook}}
- \newcommand{\thetexbook}{\textit{The TeXbook}}
+ \newcommand{\texbook}{\textit{TeXbook}\xspace}
+ \newcommand{\thetexbook}{\textit{The TeXbook}\xspace}
\pagestyle{headings}
\setcounter{StandardModuleDepth}{1}
% Some commands are defined here, and not in the commented part, because \externaldocument require them.
@@ -95,7 +94,6 @@
%
% \fi
% \newcommand{\reff}[1]{\ref{#1} p.~\pageref{#1}}
-% \CheckSum{4545}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -181,60 +179,65 @@
% \changes{v0.1.0}{2004/12/10}{First public release}
% \changes{v0.2.0}{2005/01/01}{Fix babel problems}
% \changes{v0.3.0}{2005/03/24}{Reorganize for ledarab}
-% \changes{v0.3.a}{2005/03/30}{Minor \cs{linenummargin} fix}
+% \changes{v0.3.a}{2005/03/30}{Minor \protect\cs{linenummargin} fix}
% \changes{v0.3.b}{2005/04/08}{Improved parallel page balancing}
% \changes{v0.3.c}{2011/06/16}{Compatibilty with Polyglossia}
% \changes{v0.4.0}{2011/08/03}{No more ledparpatch. All patches are now in the main file.}
-% \changes{v0.5.0}{2011/08/21}{Corrections about \cs{section} and other titles in numbered sections}
-% \changes{v0.6.0}{2011/08/22}{Be able to us \cs{chapter} in parallel pages.}
+% \changes{v0.5.0}{2011/08/21}{Corrections about \protect\cs{section} and other titles in numbered sections}
+% \changes{v0.6.0}{2011/08/22}{Be able to us \protect\cs{chapter} in parallel pages.}
% \changes{v0.7.0}{2011/08/31}{Option `shiftedverses' which make there is no blank between two parallel verses with inequal length.}
-% \changes{v0.8.0}{2011/09/16}{Possibility to have a symbol on each hanging of verses, like in the french typography. Redefine the commande \cs{hangingsymbol} to define the character.}
-% \changes{v0.9.0}{2011/10/01}{Possibilty to number the pstart with the commands \cs{numberpstarttrue}.}
-% \changes{v0.9.1}{2011/10/02}{The numbering of the pstarts restarts on each \cs{beginnumbering}.}
-% \changes{v0.9.2}{2011/11/08}{Debug : with \cs{Columns}, the hanging indentation now runs on the left columns and the hanging symbol is shown only when \cs{stanza} is used.}
-% \changes{v0.9.3}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and makes conflicts with memoir class.}
-% \changes{v0.10.0}{2012/04/04}{\cs{edlabel} commands which start a paragraph are now put in the right place.}
-% \changes{v0.10.0}{2012/04/04}{\cs{edlabel} commands on the right side are now correctly indicated.}
+% \changes{v0.8.0}{2011/09/16}{Possibility to have a symbol on each hanging of verses, like in the french typography. Redefine the commande \protect\cs{hangingsymbol} to define the character.}
+% \changes{v0.9.0}{2011/10/01}{Possibilty to number the pstart with the commands \protect\cs{numberpstarttrue}.}
+% \changes{v0.9.1}{2011/10/02}{The numbering of the pstarts restarts on each \protect\cs{beginnumbering}.}
+% \changes{v0.9.2}{2011/11/08}{Debug : with \protect\cs{Columns}, the hanging indentation now runs on the left columns and the hanging symbol is shown only when \protect\cs{stanza} is used.}
+% \changes{v0.9.3}{2011/11/18}{\protect\cs{thepstartL} and \protect\cs{thepstartR} use now \protect\cs{bfseries} and not \protect\cs{bf}, which is deprecated and makes conflicts with memoir class.}
+% \changes{v0.10.0}{2012/04/04}{\protect\cs{edlabel} commands which start a paragraph are now put in the right place.}
+% \changes{v0.10.0}{2012/04/04}{\protect\cs{edlabel} commands on the right side are now correctly indicated.}
% \changes{v1.0.0}{2012/09/14}{Compatibility with eledmac. Change name to eledpar.}
-% \changes{v1.0.1}{2012/09/16}{Correction on \cs{numberonlyfirstinline} with lineation by pstart or by page.}
+% \changes{v1.0.1}{2012/09/16}{Correction on \protect\cs{numberonlyfirstinline} with lineation by pstart or by page.}
% \changes{v1.1.0}{2012/09/25}{Shiftedverses becomes shiftedpstarts.}
-% \changes{v1.2.0}{2012/10/15}{Support for \cs{led}\meta{section} commands in parallel texts.}
+% \changes{v1.2.0}{2012/10/15}{Support for \protect\cs{led}\meta{section} commands in parallel texts.}
% \changes{v1.3.2}{2012/12/11}{Debug with some classes.}
% \changes{v1.4.3}{2013/10/27}{Corrects a false hanging verse when a verse is exactly the length of a line.}
% \changes{v1.5.0}{2013/11/08}{Add, as in eledmac, features to manage page breaks.}
% \changes{v1.7.0}{2014/04/14}{Add, as in eledmac, features to make crossrefs with pstart numbers.}
-% \changes{v1.8.0}{2014/08/05}{Debug eledmac sectioning command after using \cs{resumenumbering}.}
-% \changes{v1.8.0}{2014/08/05}{Compatibility with \Lpack{musixtex}.}
-% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, option to insert something after \cs{pend}s / verses.}
-% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, option to insert something between \cs{pstart}s / verse.}
+% \changes{v1.8.0}{2014/08/05}{Debug eledmac sectioning command after using \protect\cs{resumenumbering}.}
+% \changes{v1.8.0}{2014/08/05}{Compatibility with \protect\package{musixtex}.}
+% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, option to insert something after \protect\cs{pend}s / verses.}
+% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, option to insert something between \protect\cs{pstart}s / verse.}
% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, new system of sectioning commands.}
% \changes{v1.8.2}{2014/08/15}{Debug left and side note (bugs added by 1.8.0)}
-% \changes{v1.8.2}{2014/08/15}{Debug \cs{eledxxx} with some paper sizes}
-% \changes{v1.8.3}{2014/08/31}{Add \cs{noeledxxx}, as in eledmac}
-% \changes{v1.9.0}{2014/09/16}{Compatibility with \cs{Xnoteswidthliketwocolumns} and \cs{notesXwidthliketwocolumns}}
-% \changes{v1.10.0}{2015/01/12}{Restore critical notes in \cs{eledsection} in parallel columns (this bug was added in 1.8.2).}
-% \changes{v1.10.0}{2015/01/12}{Compatibility with \cs{AtEveryPstart} and \cs{AtEveryPend}}
+% \changes{v1.8.2}{2014/08/15}{Debug \protect\cs{eledxxx} with some paper sizes}
+% \changes{v1.8.3}{2014/08/31}{Add \protect\cs{noeledxxx}, as in eledmac}
+% \changes{v1.9.0}{2014/09/16}{Compatibility with \protect\cs{Xnoteswidthliketwocolumns} and \protect\cs{notesXwidthliketwocolumns}}
+% \changes{v1.10.0}{2015/01/12}{Restore critical notes in \protect\cs{eledsection} in parallel columns (this bug was added in 1.8.2).}
+% \changes{v1.10.0}{2015/01/12}{Compatibility with \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend}}
% \changes{v1.11.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
% \changes{v1.12.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.}
% \changes{v1.13.0}{2015/03/06}{With parallel pages, long notes can now flow from the Left to the right side and from the Right to the left side.}
% \changes{v1.13.0}{2015/03/06}{Fix bug in shiftedpstarts when size difference between pstarts is very important.}
-% \changes{v1.14.0}{2015/03/22}{The \cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
-% \changes{v1.14.0}{2015/03/22}{Fix bug with line number position when using \cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
-% \changes{v1.15.0}{2015/04/13}{Add \cs{AtEveryPstartCall}.}
-% \changes{v1.15.0}{2015/04/13}{Fix vertical spurious space before right \cs{eledchapter} (bug added in v1.13.0).}
-% \changes{v1.15.0}{2015/04/13}{Prevent vertical space when using \cs{AtEveryPstart} or \cs{AtEveryPend} with a command which prints nothing}
+% \changes{v1.14.0}{2015/03/22}{The \protect\cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.}
+% \changes{v1.14.0}{2015/03/22}{Fix bug with line number position when using \protect\cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.}
+% \changes{v1.15.0}{2015/04/13}{Add \protect\cs{AtEveryPstartCall}.}
+% \changes{v1.15.0}{2015/04/13}{Fix vertical spurious space before right \protect\cs{eledchapter} (bug added in v1.13.0).}
+% \changes{v1.15.0}{2015/04/13}{Prevent vertical space when using \protect\cs{AtEveryPstart} or \protect\cs{AtEveryPend} with a command which prints nothing}
% \changes{v1.16.0}{2015/05/18}{Fix bug with nofamiliar / nocritical option of eledmac.}
-% \changes{v1.16.0}{2015/05/18}{Error message when using \cs{beginnumbering}…\cs{endnumbering} without \cs{pstart}.}
+% \changes{v1.16.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}…\protect\cs{endnumbering} without \protect\cs{pstart}.}
% \changes{v1.16.0}{2015/05/18}{Error message when starting a Leftside/a Rightside while the previous one has not been yet typeset.}
-% \changes{v1.16.0}{2015/05/18}{Error message when calling \cs{Pages} inside `pages' environment and \cs{Columns} inside `pairs' environment.}
+% \changes{v1.16.0}{2015/05/18}{Error message when calling \protect\cs{Pages} inside `pages' environment and \protect\cs{Columns} inside `pairs' environment.}
% \changes{v1.16.0}{2015/05/18}{New package option sameparallelpagenumber to have the same page number for both left and right side.}
% \changes{v1.16.1}{2015/05/20}{Write information about line-list file version in the correct file.}
-% \changes{v1.16.2}{2015/05/29}{Fix bug when adding empty lines before a \cs{pend} in combination with some specific penalties setting.}
-% \changes{v1.17.0}{2015/06/02}{Add compatibility of optional argument of \cs{pstart}/\cs{pend} and \cs{AtEveryPstart}/\cs{AtEveryPend} with two columns mode.}
+% \changes{v1.16.2}{2015/05/29}{Fix bug when adding empty lines before a \protect\cs{pend} in combination with some specific penalties setting.}
+% \changes{v1.17.0}{2015/06/02}{Add compatibility of optional argument of \protect\cs{pstart}/\protect\cs{pend} and \protect\cs{AtEveryPstart}/\protect\cs{AtEveryPend} with two columns mode.}
% \changes{v2.0.0}{2015/07/19}{Many code refactored and moved to \reledmac.}
% \changes{v2.0.0}{2015/07/19}{Package's name becomes \reledpar.}
% \changes{v2.0.0}{2015/07/19}{Fix some bugs with `sameparallelpagenumber' option.}
% \changes{v2.0.0}{2015/07/19}{Totally new implementation of `sameparallelpagenumber' option.}
+% \changes{v2.1.0}{2015/07/27}{Fix bug with \protect\cs{setparledgroupnotespacing} with the shiftedpstarts option.}
+% \changes{v2.1.0}{2015/07/27}{Fix incompatibility between optional argument of \protect\cs{pstart} and \protect\cs{numberpstarttrue}}
+% \changes{v2.1.0}{2015/07/27}{Options to custom empty right page before \protect\cs{Pages}.}
+% \changes{v2.1.0}{2015/07/27}{Fix bug when using \protect\cs{pagenumbering} with memoir (bug added in v2.0.0).}
+% \changes{v2.1.0}{2015/07/27}{Fix bug when using \protect\cs{eledsection} and related on right pages when page width is short.}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -338,7 +341,7 @@
% edited text.
%
% The \parpackage package lets you typeset two \emph{numbered} texts in
-% parallel\footnote{You can use, anyway, \cs{numberlinefalse} to disable printing of line numbers.}.
+% parallel\footnote{You can use, anyway, \protect\cs{numberlinefalse} to disable printing of line numbers.}.
% This can be done either as setting the `Leftside' and `Rightside'
% texts in two columns or on facing pages.
% In the paired pages case footnotes are placed at the bottom of the page
@@ -352,8 +355,8 @@
%
%
% \Macpackage essentially puts each chunk of numbered text
-% (the text within a \cs{pstart} \ldots \cs{pend}) into a box and then
-% following the \cs{pend} extracts the text line by line from the box
+% (the text within a \protect\cs{pstart} \ldots \protect\cs{pend}) into a box and then
+% following the \protect\cs{pend} extracts the text line by line from the box
% to number and print it. More precisely, the text is first put into the
% the box as though it was being typeset as normal onto a page and
% any notes are stored without being typeset. Then each typeset line
@@ -364,7 +367,7 @@
%
%
% \Parpackage similarly puts the left and right chunks into boxes but can't
-% immediately output the text after a \cs{pend} --- it has to wait until
+% immediately output the text after a \protect\cs{pend} --- it has to wait until
% after both the left and right texts have been collected before it can
% start processing. This means that several boxes are required and possibly
% \TeX\ has to store a lot of text in its memory; both the number of potential
@@ -373,23 +376,23 @@
%
% \DescribeMacro{\maxchunks}
% It is possible to have multiple chunks in the left and right texts before
-% printing them. The macro \cs{maxchunks}\marg{num} specifies the maximum
+% printing them. The macro \protect\cs{maxchunks}\marg{num} specifies the maximum
% number of chunks within the left or right texts. This is initially set as: \\
% \verb?\maxchunks{5120}? \\
% meaning that there can be up to 5120 chunks in the left text and up to
% 5120 chunks in
% the right text, requiring a total of 10240 boxes. If you need more chunks
-% then you can increase \cs{maxchunks}. The \cs{maxchunks} must be called in the preamble.
+% then you can increase \protect\cs{maxchunks}. The \protect\cs{maxchunks} must be called in the preamble.
%
-% If you \cs{maxchunks} is too little
+% If you \protect\cs{maxchunks} is too little
%you can get a \parpackage{} error message along the
-% lines: ``Too many \cs{pstart} without printing. Some text will be lost.''
-% then you will have to either increase \cs{maxchunks} or use the
-% parallel printing commands (\cs{Columns} or \cs{Pages}) more frequently.
+% lines: ``Too many \protect\cs{pstart} without printing. Some text will be lost.''
+% then you will have to either increase \protect\cs{maxchunks} or use the
+% parallel printing commands (\protect\cs{Columns} or \protect\cs{Pages}) more frequently.
%
-% When typesetting verse using \cs{stanza}, each line is treated as a chunk,
+% When typesetting verse using \protect\cs{stanza}, each line is treated as a chunk,
% so be warned that if you are setting parallel verses you might have to
-% increase \cs{maxchunks} much more than it appears at first sight.
+% increase \protect\cs{maxchunks} much more than it appears at first sight.
%
% In general, \macpackage is a \TeX\ resource hog, and \parpackage{} only
% makes things worse in this respect.
@@ -404,7 +407,7 @@
% in section~\ref{leftright}.
%
% \DescribeMacro{\Columns}
-% The command \cs{Columns} typesets the texts in the previous pair of
+% The command \protect\cs{Columns} typesets the texts in the previous pair of
% \verb?Leftside? and \verb?Rightside? environments.
% The general scheme for parallel columns looks like this:
% \begin{verbatim}
@@ -421,11 +424,11 @@
% \end{verbatim}
%
%
-% Keep in mind that the \cs{Columns} \textbf{must be} outside of the \verb+pairs+ environment.
+% Keep in mind that the \protect\cs{Columns} \textbf{must be} outside of the \verb+pairs+ environment.
% \DescribeMacro{\AtBeginPairs}
-% \changes{v1.9.0}{2014/09/16}{Add \cs{AtBeginPairs} macro.}
-% You can use the macro \cs{AtBeginPairs} to insert a code at the beginning of each \verb+pairs+ environments.
-% That could be useful to add the \cs{sloppy} macro to prevent overfull hboxes in two columns.
+% \changes{v1.9.0}{2014/09/16}{Add \protect\cs{AtBeginPairs} macro.}
+% You can use the macro \protect\cs{AtBeginPairs} to insert a code at the beginning of each \verb+pairs+ environments.
+% That could be useful to add the \protect\cs{sloppy} macro to prevent overfull hboxes in two columns.
% \begin{verbatim}
% \AtBeginPairs{\sloppy}
% \end{verbatim}
@@ -434,7 +437,7 @@
% \subsubsection{Column's width}
% \DescribeMacro{\Lcolwidth}
% \DescribeMacro{\Rcolwidth}
-% The lengths \cs{Lcolwidth} and \cs{Rcolwidth} are the widths of the left
+% The lengths \protect\cs{Lcolwidth} and \protect\cs{Rcolwidth} are the widths of the left
% and right columns, respectively. By default, these are: \\
% \verb?\setlength{\Lcolwidth}{0.45\textwidth}? \\
% \verb?\setlength{\Rcolwidth}{0.45\textwidth}? \\
@@ -442,31 +445,31 @@
% \subsubsection{Column's separator}
% \DescribeMacro{\columnrulewidth}
% \DescribeMacro{\columnseparator}
-% The macro \cs{columnseparator} is called between each left/right pair
+% The macro \protect\cs{columnseparator} is called between each left/right pair
% of lines. By default it inserts a vertical rule of width
-% \cs{columnrulewidth}. As this is initially defined to be 0pt the rule
+% \protect\cs{columnrulewidth}. As this is initially defined to be 0pt the rule
% is invisible. For a visible rule between the columns you could try: \\
% \verb?\setlength{\columnrulewidth}{0.4pt}? \\
-% You can also modify \cs{columnseparator} if you want more control.
+% You can also modify \protect\cs{columnseparator} if you want more control.
% \subsubsection{Column's positions}
% \DescribeMacro{\columnsposition}
-% \changes{v1.8.0}{2014/08/05}{Add \cs{columnsposition}.}
+% \changes{v1.8.0}{2014/08/05}{Add \protect\cs{columnsposition}.}
% By default, columns are positioned to the right of the page.
-% However, you can use \cs{columnsposition}\verb+{L}+ to align them to the left,
-% or \cs{columnsposition}\verb+{C}+ to center them.
+% However, you can use \protect\cs{columnsposition}\verb+{L}+ to align them to the left,
+% or \protect\cs{columnsposition}\verb+{C}+ to center them.
%
-% When you use \cs{stanza}, the visible rule may shift when a verse has a hanging indent. To prevent shifting, use \cs{setstanzaindents} outside the \verb|Leftside| or \verb|Rightside| environment.
+% When you use \protect\cs{stanza}, the visible rule may shift when a verse has a hanging indent. To prevent shifting, use \protect\cs{setstanzaindents} outside the \verb|Leftside| or \verb|Rightside| environment.
%
%
% \DescribeMacro{\beforecolumnseparator}\DescribeMacro{\aftercolumnseparator}
-% \changes{v1.8.0}{2014/08/05}{Add \cs{beforecolumnseparator} and \cs{aftercolumnseparator}.}
+% \changes{v1.8.0}{2014/08/05}{Add \protect\cs{beforecolumnseparator} and \protect\cs{aftercolumnseparator}.}
% By default, the spaces around column separator are the same as the space:
% \begin{itemize}
% \item On the left of columns, if columns are aligned right.
% \item On the right of columns, if columns are aligned left.
% \item On both the left and right columns, if columns are centered.
% \end{itemize}
-% You can redefine \cs{beforecolumnseparator} and \cs{aftercolumnseparator} length to define spaces before or after the column separator, instead of letting \parpackage calculate them automatically.
+% You can redefine \protect\cs{beforecolumnseparator} and \protect\cs{aftercolumnseparator} length to define spaces before or after the column separator, instead of letting \parpackage calculate them automatically.
% \begin{verbatim}
% \setlength{\beforecolumseparator}{length}
% \setlength{\aftercolumseparator}{length}
@@ -474,13 +477,13 @@
% If you want to revert to the previous behavior, just set with a negative value.
% \subsubsection{Mixing two columns and one column texts}
% \DescribeMacro{\widthliketwocolumns}
-% If you want to mix two-column with single-column text, you can align horizontally single-column text to two-column text with \cs{widthliketwocolumnstrue}. To reset this feature, use \cs{widthliketwocolumnsfalse}.
-% You can also call \cs{widthliketwocolumns} as a global option when loading \macpackage or \parpackage.
+% If you want to mix two-column with single-column text, you can align horizontally single-column text to two-column text with \protect\cs{widthliketwocolumnstrue}. To reset this feature, use \protect\cs{widthliketwocolumnsfalse}.
+% You can also call \protect\cs{widthliketwocolumns} as a global option when loading \macpackage or \parpackage.
%
% \DescribeMacro{\Xnoteswidthliketwocolumns}
% \DescribeMacro{\notesXwidthliketwocolumns}
-% In most cases, you should use \cs{widthliketwocolumns} in combination with \cs{Xnoteswidthliketwocolumns} and \cs{notesXwidthliketwocolumns} to align the critical/familiar footnotes with the two colums.
+% In most cases, you should use \protect\cs{widthliketwocolumns} in combination with \protect\cs{Xnoteswidthliketwocolumns} and \protect\cs{notesXwidthliketwocolumns} to align the critical/familiar footnotes with the two colums.
% See \macpackage's handbook for more details.
% \section{Facing pages}\label{pages}
% \subsection{Basic usage}
@@ -491,7 +494,7 @@
% environments, respectively.
%
% \DescribeMacro{\Pages}
-% The command \cs{Pages} typesets the texts in the previous pair of
+% The command \protect\cs{Pages} typesets the texts in the previous pair of
% \verb?Leftside? and \verb?Rightside? environments.
% The general scheme for parallel pages looks like this:
% \begin{verbatim}
@@ -505,34 +508,35 @@
% \end{verbatim}
% The \verb?Leftside? text is set on lefthand (even numbered) pages and
% the \verb?Rightside? text is set on righthand (odd numbered) pages.
-% Each \cs{Pages} command starts a new even numbered page. After parallel
+% Each \protect\cs{Pages} command starts a new even numbered page. After parallel
% typesetting is finished, a new page is started.
-% Note that the \cs{Pages} \textbf{must be} outside of the \verb+pages+ environment.
+% Note that the \protect\cs{Pages} \textbf{must be} outside of the \verb+pages+ environment.
% \subsection{Setting}
% \subsubsection{Text width}
% \DescribeMacro{\Lcolwidth}
% \DescribeMacro{\Rcolwidth}
-% Within the \verb?pages? environment the lengths \cs{Lcolwidth} and
-% \cs{Rcolwidth} are the widths of the left
+% Within the \verb?pages? environment the lengths \protect\cs{Lcolwidth} and
+% \protect\cs{Rcolwidth} are the widths of the left
% and right pages, respectively. By default, these are set to the normal
% textwidth for the document, but can be changed within the environment if
% necessary.
-% \subsubsection{Page number}
+% \subsubsection{Page number}\label{sameparallelpagenumber}
% \changes{v1.15.0}{2015/05/18}{Add sameparallelpagenumber option.}
-% By default, \cs{Pages} use the standard \LaTeX\ page number scheme.
+% By default, \protect\cs{Pages} use the standard \LaTeX\ page number scheme.
% This means that pages are numbered continuously following printed-book conventions: from left-hand to right-hand side, left-hand pages having even numbers, right-hand pages having odd numbers.
%
-% \DescribeMacro{\sameparallelpagenumbertrue}\DescribeMacro{\sameparallelpagenumbertrue}However, you can use the package option \verb+sameparallelpagenumber+ to have the same page number for both left and right side.
-% In this case, this setting will apply only for pages typeset by \cs{Pages}, not for ``normal'' pages.
-%
-% You can also switch the two system using \cs{sameparallelpagenumbertrue} and \cs{sameparallelpagenumberfalse}.
+% However, you can use the package option \verb+sameparallelpagenumber+ to have the same page number for both left and right side.
+% In this case, this setting will apply only for pages typeset by \protect\cs{Pages}, not for ``normal'' pages.
+%
+% Please also read advising in \reff{par@page}.
+%
%
% \subsubsection{Page breaking}
% \DescribeMacro{\setgoalfraction}
% When doing parallel pages \parpackage{} has to guess where \TeX\ is going to
% put pagebreaks and hopefully get there first in order to put the pair of
% texts on their proper pages. When it thinks that the fraction
-% \cs{@goalfraction} of a page has been filled, it finishes that page and
+% \protect\cs{@goalfraction} of a page has been filled, it finishes that page and
% starts on the other side's text. The standard value is 0.9.
%
%
@@ -540,17 +544,31 @@
% if some left text overflows onto an odd numbered page or some right text
% onto an even page, try reducing it.
% You can change it using \cs{setgoalfraction}\marg{newvalue}.
+% \subsubsection{Right page before \cs{Pages}}
+% When \cs{Pages} are called, it starts at a new left page, in order to have parallel pages.
+% Consequently, if it is called on a left page, it clears the current page and then lets
+% a right void page.
+%
+% \Parpackage provides two options to customize this (eventual) right page.
+% \label{prevpgnotnumbered}
+% \begin{description}
+% \item[prevpgstyle=\meta{style}] in order to set the style of this page. A common value of \meta{style} is \verb+empty+.
+% Use \verb+prevpgstyle=empty+ will suppress header and footer in this page.
+% Please also read advising in \reff{par@page}.
+% \item[prevpgnotnumbered] will make this page won't be counted in the page counter.
+%
+% \end{description}
% \subsection{Critical and familiar footnotes}
% Of course, in ``Facing pages'', the \macpackage's both critical and familiar footnotes can be used.
% However, some specific points must be taken into consideration.
% \subsubsection{Notes height setting}
-% Since \Lpack{eledpar} v1.13.0, long notes in facing pages can flow from left to right pages, and \emph{vice-versa}.
+% Since \protect\package{eledpar} v1.13.0, long notes in facing pages can flow from left to right pages, and \emph{vice-versa}.
%
-% However, the \macpackage default setting for the maximum alloted size to notes is greater than \cs{textheight}. That makes impossible for long notes to flow across pages.
+% However, the \macpackage default setting for the maximum alloted size to notes is greater than \protect\cs{textheight}. That makes impossible for long notes to flow across pages.
% \footnote{The same applies to \LaTeX\ normal notes. Read \url{http://tex.stackexchange.com/a/228283/7712} for technical informations.}
% We have not changed this default setting, because we do not want to break compatibility with older version of \macpackage and we want to be as close as possible to default \LaTeX's feature.
%
-% So, you MUST change the default setting via \cs{Xmaxnotes} (for critical notes) and \cs{maxhnotesX} (for familiar notes).
+% So, you MUST change the default setting via \protect\cs{Xmaxnotes} (for critical notes) and \protect\cs{maxhnotesX} (for familiar notes).
% Both commands are explained in \macpackage handbook (\reff{reledmac-xmaxhnotes}).
% As an advisable setting:
% \begin{verbatim}
@@ -561,7 +579,7 @@
% \DescribeMacro{\Xonlyside}
% \DescribeMacro{\onlysideX}
% You may want to typeset notes on one side only (either left or right).
-% Use \cs{Xonlyside}\oarg{s}\marg{p} to set critical notes, and \cs{onlysideX}\oarg{s}\marg{p} to set familiar notes.
+% Use \protect\cs{Xonlyside}\oarg{s}\marg{p} to set critical notes, and \protect\cs{onlysideX}\oarg{s}\marg{p} to set familiar notes.
% \marg{p} must be set to \verb+L+ for notes to be confined only on the left side and to \verb+R+ for notes to be confined only on the right side.
% \subsubsection{Familiar notes called in the right side, but to be printed in the left side}
% \DescribeMacro{\footnoteXnomk}
@@ -569,9 +587,9 @@
% As often happens, the left side has less room for text.
% We may want to call familiar notes in the right side while using at the same time the available space in the left side to print them.
%
-% To achieve this, we call \cs{footnoteXnomk}\marg{notecontent} in the left side. X is to be replaced by the series letter. We do this call in the left side after the word which matches up to the one in the right side after which we want to insert the actual footnote mark.
+% To achieve this, we call \protect\cs{footnoteXnomk}\marg{notecontent} in the left side. X is to be replaced by the series letter. We do this call in the left side after the word which matches up to the one in the right side after which we want to insert the actual footnote mark.
%
-% In the right side, we call \cs{footnoteXmk} at the place we want to have the footnote mark. X is to be replaced by the series letter.
+% In the right side, we call \protect\cs{footnoteXmk} at the place we want to have the footnote mark. X is to be replaced by the series letter.
% For example:
% \begin{verbatim}
% \begin{Leftside}
@@ -605,14 +623,14 @@
% \DescribeMacro{\beginnumbering}
% \DescribeMacro{\endnumbering}
% Each section of numbered text must be preceded by
-% \cs{beginnumbering} and followed by \cs{endnumbering}, like: \\
-% \cs{beginnumbering} \\
+% \protect\cs{beginnumbering} and followed by \protect\cs{endnumbering}, like: \\
+% \protect\cs{beginnumbering} \\
% \meta{text} \\
-% \cs{endnumbering} \\
+% \protect\cs{endnumbering} \\
% These have to be separately specified within \verb?Leftside? and
% \verb?Rightside? environments.
%
-% The \cs{beginnumbering} macro resets the line number to zero,
+% The \protect\cs{beginnumbering} macro resets the line number to zero,
% reads an auxiliary file called \meta{jobname}.\file{nn} (where
% \meta{jobname} is the name of the main input file for this job,
% and \file{nn} is 1 for the first numbered section, 2 for
@@ -623,8 +641,8 @@
% them from the left hand and serial (non-parallel) texts.
%
% \DescribeMacro{\memorydump}
-% The command \cs{memorydump} effectively performs an \cs{endumbering}
-% immediately followed by a \cs{beginnumbering} while not restarting the
+% The command \protect\cs{memorydump} effectively performs an \protect\cs{endumbering}
+% immediately followed by a \protect\cs{beginnumbering} while not restarting the
% numbering sequence. This has the effect of clearing \TeX's memory of previous
% texts and any associated notes, allowing
% longer apparent streams of parallel texts. The command should be applied
@@ -654,15 +672,15 @@
% \end{verbatim}
%
%
-%\changes{v0.9.0}{2011/10/01}{Possibility to number \cs{pstart}.}
-% It is possible to insert a number at every \cs{pstart} command.
-% You must use the \DescribeMacro{\numberpstarttrue}\cs{numberpstarttrue} command to have it.
-% You can stop the numbering with \DescribeMacro{\numberpstartfalse}\cs{numberpstartfalse}.
-% You can redefine the commands \DescribeMacro{\thepstartL}\cs{thepstartL} and \DescribeMacro{\thepstartR}\cs{thepstartR} to change style.
-% The numbering restarts on each \cs{beginnumbering}.
+%\changes{v0.9.0}{2011/10/01}{Possibility to number \protect\cs{pstart}.}
+% It is possible to insert a number at every \protect\cs{pstart} command.
+% You must use the \DescribeMacro{\numberpstarttrue}\protect\cs{numberpstarttrue} command to have it.
+% You can stop the numbering with \DescribeMacro{\numberpstartfalse}\protect\cs{numberpstartfalse}.
+% You can redefine the commands \DescribeMacro{\thepstartL}\protect\cs{thepstartL} and \DescribeMacro{\thepstartR}\protect\cs{thepstartR} to change style.
+% The numbering restarts on each \protect\cs{beginnumbering}.
%
% \DescribeMacro{\skipnumbering}
-% The command \cs{skipnumbering} when inserted in a line of parallel text
+% The command \protect\cs{skipnumbering} when inserted in a line of parallel text
% causes the numbering of that particular line to be skipped. This can
% useful if you are putting some kind of marker (even if it is only a
% blank line) between stanzas. Remember, parallel texts must be numbered
@@ -680,31 +698,31 @@
% \DescribeMacro{\firstsublinenum*}
% \DescribeMacro{\sublinenumincrement*}
% Following
-% \cs{firstlinenum}\marg{num} the first line number will be \meta{num}, and
-% following \cs{linenumincrement}\marg{num} only every \meta{num}th
+% \protect\cs{firstlinenum}\marg{num} the first line number will be \meta{num}, and
+% following \protect\cs{linenumincrement}\marg{num} only every \meta{num}th
% line will have a printed number. Using these macros inside the
% \verb?Leftside? and \verb?Rightside? environments gives you independent
-% control over the left and right numbering schemes. The \cs{firstsublinenum}
-% and \cs{sublinenumincrement} macros correspondingly set the numbering
+% control over the left and right numbering schemes. The \protect\cs{firstsublinenum}
+% and \protect\cs{sublinenumincrement} macros correspondingly set the numbering
% scheme for sublines.
% The starred versions change both left and right numbering schemes.
%
-% Generally speaking, controls like \cs{firstlinenum} or \cs{linenummargin}
+% Generally speaking, controls like \protect\cs{firstlinenum} or \protect\cs{linenummargin}
% apply to sequential and left texts.
% To effect right texts only, they have
% to be within a \verb?Rightside? environment.
% \DescribeMacro{\lineationR}
-% \cs{lineationR} macro is the equivalent of \macpackage \cs{lineation} macro for the right side.
+% \protect\cs{lineationR} macro is the equivalent of \macpackage \protect\cs{lineation} macro for the right side.
% \DescribeMacro{\lineation*}
-% \cs{lineation*} macro is the equivalent of \macpackage \cs{lineation} macro for both sides.
+% \protect\cs{lineation*} macro is the equivalent of \macpackage \protect\cs{lineation} macro for both sides.
%
% \DescribeMacro{\setRlineflag}
% A ``R'' is appended to the line numbers of the
% right texts.
% This may be useful for parallel columns but for parallel pages it might
-% be more appropriate to redefine it using \cs{setRlineflag}\marg{flag}.
+% be more appropriate to redefine it using \protect\cs{setRlineflag}\marg{flag}.
% Use \verb?\setRlineflag{}? to empty it.
%
% \subsection{Chunks}
@@ -712,14 +730,14 @@
% \DescribeMacro{\pend}
% In a serial (non-parallel) mode, each numbered paragraph, or chunk,
% is contained
-% between the \cs{pstart} and \cs{pend} macros, and the paragraph is output
-% when the \cs{pend} macro occurs. The situation is somewhat different
-% with parallel typesetting as the left text (contained within \cs{pstart}
-% and \cs{pend} groups within the \verb?Leftside? environment) has to be
-% set in parallel with the right text (contained within its own \cs{pstart}
-% and \cs{pend} groups within the corresponding \verb?Rightside? environment)
-% the \cs{pend} macros cannot immediately initiate any typesetting ---
-% this has to be controlled by the \cs{Columns} or \cs{Pages} macros.
+% between the \protect\cs{pstart} and \protect\cs{pend} macros, and the paragraph is output
+% when the \protect\cs{pend} macro occurs. The situation is somewhat different
+% with parallel typesetting as the left text (contained within \protect\cs{pstart}
+% and \protect\cs{pend} groups within the \verb?Leftside? environment) has to be
+% set in parallel with the right text (contained within its own \protect\cs{pstart}
+% and \protect\cs{pend} groups within the corresponding \verb?Rightside? environment)
+% the \protect\cs{pend} macros cannot immediately initiate any typesetting ---
+% this has to be controlled by the \protect\cs{Columns} or \protect\cs{Pages} macros.
% Several chunks may be specified within a \verb?Leftside? or
% \verb?Rightside? environment.
% A multi-chunk text then looks like:
@@ -733,31 +751,31 @@
% % \endnumbering
% \end{...side}
% \end{verbatim}
-% Numbering, via \cs{beginnumbering} and \cs{endnumbering}, may extend
+% Numbering, via \protect\cs{beginnumbering} and \protect\cs{endnumbering}, may extend
% across several \verb?Leftside? or \verb?Rightside? environments.
% Remember, though,
% that the left/right sides are effectively independent of each other.
%
% \DescribeMacro{\autopar}
-% The \cs{autopar} macro can be used, instead of manually inserting \cs{pstart}\ldots\cs{pends}. Please read \macpackage's handbook (\reff{reledmac-autopar}).
+% The \protect\cs{autopar} macro can be used, instead of manually inserting \protect\cs{pstart}\ldots\protect\cs{pends}. Please read \macpackage's handbook (\reff{reledmac-autopar}).
-% \subsection{\cs{AtEveryPstart} and \cs{AtEveryPstartCall}}
-% In general, remember that the moment where a \cs{pstart} is called is different
-% from the moment when the \cs{pstart}\ldots\cs{pend} content is printed, which is when \cs{Pages} or \cs{Columns} is processed.
+% \subsection{\protect\cs{AtEveryPstart} and \protect\cs{AtEveryPstartCall}}
+% In general, remember that the moment where a \protect\cs{pstart} is called is different
+% from the moment when the \protect\cs{pstart}\ldots\protect\cs{pend} content is printed, which is when \protect\cs{Pages} or \protect\cs{Columns} is processed.
%
% Consequently:
% \begin{itemize}
-% \item The argument of \cs{AtEveryPstart} (see \reff{reledmac-AtEveryPstart}) is called before every chunk is printed, except if you used an optional argument for the \cs{pstart}.
-% \item The argument of \cs{AtEveryPstartCall} is called before every \cs{pstart}.
+% \item The argument of \protect\cs{AtEveryPstart} (see \reff{reledmac-AtEveryPstart}) is called before every chunk is printed, except if you used an optional argument for the \protect\cs{pstart}.
+% \item The argument of \protect\cs{AtEveryPstartCall} is called before every \protect\cs{pstart}.
% \end{itemize}
% \subsection{Language setting}
% If you are using the
-% \Lpack{babel} package or the \Lpack{polyglossia} package ,with different languages
-% (via, say, \cs{selectlanguage}) for the left and right texts it is
+% \protect\package{babel} package or the \protect\package{polyglossia} package ,with different languages
+% (via, say, \protect\cs{selectlanguage}) for the left and right texts it is
% particularly important to select the appropriate language within the
% \verb?Leftside? and \verb?Rightside? environments. The initial language
-% selected for the right text is the \Lpack{babel} package's default. Also,
+% selected for the right text is the \protect\package{babel} package's default. Also,
% it is the \emph{last} language setting in a side that controls the
% language used in any notes for that side when they get printed. If
% you are using multilingual notes then it is probably safest to explicitly
@@ -782,17 +800,17 @@
% To enable this function, load \parpackage with the option \verb+shiftedpstarts+.
% \section{Verse}
%
-% If you are typesetting verse with \macpackage you can use the \cs{stanza}
+% If you are typesetting verse with \macpackage you can use the \protect\cs{stanza}
% construct, and you can also use this in right or left parallel texts.
% In this case each verse line is a chunk which has two implications.
-% (1) you can unexpectedly exceed the \cs{maxchunks} limit or the overall
+% (1) you can unexpectedly exceed the \protect\cs{maxchunks} limit or the overall
% limit on the number of boxes, and (2) left and right verse lines are
% matched, which may not be desirable if one side requires more print lines
% for verse lines than the other does.
%
% \DescribeEnv{astanza}
% \Parpackage provides an \verb?astanza? environment which you can use instead
-% of \cs{stanza}.
+% of \protect\cs{stanza}.
% To use it, imply replace \verb?\stanza? by \verb?\begin{astanza}? and
% add \verb?\end{astanza}? after the ending \verb?\&?. Within the
% \verb?astanza? environment each verse line is treated as a paragraph,
@@ -800,12 +818,12 @@
% be some extraneous vertical spacing.
%
% If you get an error message along the lines of `Missing number,
-% treated as zero \cs{sza@0@}' it is because you have forgotten to use
-% \cs{setstanzaindents} to set the stanza indents.
+% treated as zero \protect\cs{sza@0@}' it is because you have forgotten to use
+% \protect\cs{setstanzaindents} to set the stanza indents.
%
%
%
-% \DescribeMacro{\sethangingsymbol}Like in \macpackage, you could use the \cs{sethangingsymbol} command to insert a character in each hanging line. If you use it, you must run \LaTeX\ two time. Example for the French typography
+% \DescribeMacro{\sethangingsymbol}Like in \macpackage, you could use the \protect\cs{sethangingsymbol} command to insert a character in each hanging line. If you use it, you must run \LaTeX\ two time. Example for the French typography
%\begin{verbatim}
%\sethangingsymbol{[\,}
%\end{verbatim}
@@ -815,21 +833,21 @@
% \end{verbatim}
%
%
-% When you use \cs{lednopb} make sure to use it on both sides in the corresponding
+% When you use \protect\cs{lednopb} make sure to use it on both sides in the corresponding
% verses to keep the pages in sync.
% \section{Side notes}
-% As in \macpackage, you must use one of the following commands to add side notes: \cs{ledsidenote}, \cs{ledleftnote}, \cs{ledrightnote}, \cs{ledouterote}, \cs{ledinnerrote}.
+% As in \macpackage, you must use one of the following commands to add side notes: \protect\cs{ledsidenote}, \protect\cs{ledleftnote}, \protect\cs{ledrightnote}, \protect\cs{ledouterote}, \protect\cs{ledinnerrote}.
%
-% The \cs{sidenotemargin} defines the margin of the sidenote for either left or right side, depending on the current environment.
-% You can use \cs{sidenotemargin*} to define it for both sides.
+% The \protect\cs{sidenotemargin} defines the margin of the sidenote for either left or right side, depending on the current environment.
+% You can use \protect\cs{sidenotemargin*} to define it for both sides.
% \section{Parallel ledgroups}
% \subsection{General}
% \changes{v1.6.0}{2013/12/13}{Add tool and documentation for parallel ledgroups}
% You can also make parallel ledgroups (see the documentation of \macpackage about ledgroups, \reff{reledmac-ledgroup}).
% To do it you have:
% \begin{itemize}
-% \item To load \parpackage package with the \verb+parledgroup+ option, or to add \cs{parledgrouptrue}.
-% \item To push each ledgroup between \cs{pstart}\ldots\cs{pend} command.
+% \item To load \parpackage package with the \verb+parledgroup+ option, or to add \protect\cs{parledgrouptrue}.
+% \item To push each ledgroup between \protect\cs{pstart}\ldots\protect\cs{pend} command.
% \end{itemize}
% See the following example:
% \begin{verbatim}
@@ -865,8 +883,8 @@
% \end{pages}
% \Pages
% \end{verbatim}
-% \subsection{Parallel ledgroups and \Lpack{setspace} package}
-% If you use the \Lpack{setspace} package and want your notes in parallel ledgroups to be single-spaced (not half-spaced or double-spaced), just add to your preamble:
+% \subsection{Parallel ledgroups and \protect\package{setspace} package}
+% If you use the \protect\package{setspace} package and want your notes in parallel ledgroups to be single-spaced (not half-spaced or double-spaced), just add to your preamble:
% \begin{verbatim}
% \setparledgroupnotespacing{\singlespacing}
% \end{verbatim}
@@ -878,10 +896,21 @@
%
% \DescribeMacro{\eledsectnotoc}
% By default, the section commands of the right side are not added to the table of contents.
-% But you can change it, using \cs{eledsectnotoc}\marg{arg}, where \meta{arg} could be \verb+L+ (for left side) or \verb+R+ (for right side).
+% But you can change it, using \protect\cs{eledsectnotoc}\marg{arg}, where \meta{arg} could be \verb+L+ (for left side) or \verb+R+ (for right side).
%
% \DescribeMacro{\eledsectmark}
-% By default, the \LaTeX\ marks for header are token from left side. You can change it, using \cs{eledsectmark}\marg{arg}, where \meta{arg} could be \verb+L+ (for left side) or \verb+R+ (for right side).
+% By default, the headers are tokens from the left side. You can change them, using \cs{eledsectmark}\marg{arg}, where \meta{arg} could be \verb+L+ (for left side) or \verb+R+ (for right side).
+% \section{Notes about page number}\label{par@page}
+% If you use \verb+sameparallepagenumber+ option (\reff{sameparallelpagenumber} or \verb+prevpgnotnumbered+ option (\reff{prevpgnotnumbered}), please read the following paragraph if you want to manipulate page numbers manually.
+%
+% In order to implement these two options, \parpackage uses its own page counter, called \verb+par@page+.
+% Consequently, if you use at least one of these options:
+% \begin{enumerate}
+% \item If you modify \cs{thepage} command, use the value of \verb+par@page+ counter inside and not the value of \verb+page+ counter.
+% \item If you want to modify a page number, modify the value of \verb+page+ counter AND the value \verb+par@page+ counter.
+% \end{enumerate}
+% Notes that \parpackage automatically do it when you use \protect\cs{frontmatter} and \protect\cs{mainmatter} commands.
+%
% \StopEventually{}
% \clearpage
% \renewcommand{\thesection}{\Roman{section}}
@@ -922,42 +951,57 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2015/07/19 v2.0.0 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2015/07/27 v2.1.0 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
-% Few commands use \cs{xspace} command.
+% Few commands use \protect\cs{xspace} command.
% \begin{macrocode}
\RequirePackage{xspace}%
% \end{macrocode}
% \subsection{Package's options}
-% With the option `shiftedpstarts' a long pstart one the left side (or in the right side) does not make a blank on the corresponding pstart, but the blank is put on the bottom of the page. Consequently, the pstarts on the parallel pages are shifted, but the shift stops at every end of pages.
+% We use \package{xkeyval} in order to manage options with arguments.
+%
+% \begin{macrocode}
+\RequirePackage{xkeyval}
+% \end{macrocode}
+% With the option `shiftedpstarts' a long pstart on the left side (or on the right side) does not make a blank on the corresponding pstart, but the blank is put on the bottom of the page. Consequently, the pstarts on the parallel pages are shifted, but the shift stops at every end of pages.
% \begin{macro}{\ifshiftedpstarts}
% \begin{macrocode}
\newif\ifshiftedpstarts
-\DeclareOption{shiftedpstarts}{\shiftedpstartstrue}
+\DeclareOptionX{shiftedpstarts}{\shiftedpstartstrue}
% \end{macrocode}
% \end{macro}
% The \verb+parledgroup+ can be called either on \macpackage or \parpackage.
% \begin{macrocode}
-\DeclareOption{parledgroup}{\parledgrouptrue}
+\DeclareOptionX{parledgroup}{\parledgrouptrue}
% \end{macrocode}
% \begin{macro}{\ifwidthliketwocolumns}
-% The \cs{widthliketwocolumns} option can be called either on \macpackage or \parpackage.
+% The \protect\cs{widthliketwocolumns} option can be called either on \macpackage or \parpackage.
% \changes{v1.9.0}{2014/09/16}{Added widthliketwocolumns option}
% \begin{macrocode}
-\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}%
+\DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}%
% \end{macrocode}
% \end{macro}
-% The \verb+sameparallelpagenumber+ enable to have the same page number in left and right side.
% \begin{macro}{\ifsameparallelpagenumber}
+% \begin{macro}{\ifprevpgnotnumbered}
+% Options related to page numbering
+% \begin{macrocode}
+\newif\ifsameparallelpagenumber
+\newif\ifprevpgnotnumbered
+\DeclareOptionX{sameparallelpagenumber}{\sameparallelpagenumbertrue}
+\DeclareOptionX{prevpgnotnumbered}{\prevpgnotnumberedtrue}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\prevpgstyle}
+% We store on \protect\cs{prevpgstyle} the argument of the option \verb+prevpgstyle+.
% \begin{macrocode}
-\newif\ifsameparallelpagenumber%
-\DeclareOption{sameparallelpagenumber}{\sameparallelpagenumbertrue}%
+\DeclareOptionX{prevpgstyle}{\gdef\prevpgstyle{#1}}%
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
-\ProcessOptions%
+\ProcessOptionsX%
% \end{macrocode}
% \subsection{Determining side and category of parallel processing}
% As noted above, much of the code is a duplication of the original
@@ -971,13 +1015,13 @@
% \begin{macro}{\ifl@dpairing}
% \begin{macro}{\ifl@dpaging}
% \begin{macro}{\ifledRcol}
-% \cs{ifl@dpairing} is set TRUE if we are processing parallel texts and
-% \cs{ifl@dpaging} is also set TRUE if we are doing parallel pages.
-% \cs{ifledRcol} is set TRUE if we are doing the right hand text.
+% \protect\cs{ifl@dpairing} is set TRUE if we are processing parallel texts and
+% \protect\cs{ifl@dpaging} is also set TRUE if we are doing parallel pages.
+% \protect\cs{ifledRcol} is set TRUE if we are doing the right hand text.
% They are defined in \macpackage.
-% \changes{v0.3.0}{2005/02/24}{Moved \cs{ifl@dpairing} to eledmac}
-% \changes{v0.9.0}{2005/10/01}{Moved \cs{iflledRcol} and \cs{ifnumberingR} to eledmac}
-% \changes{v1.9.1}{2014/09/30}{Moved \cs{ifl@dpaging} to eledmac}
+% \changes{v0.3.0}{2005/02/24}{Moved \protect\cs{ifl@dpairing} to eledmac}
+% \changes{v0.9.0}{2005/10/01}{Moved \protect\cs{iflledRcol} and \protect\cs{ifnumberingR} to eledmac}
+% \changes{v1.9.1}{2014/09/30}{Moved \protect\cs{ifl@dpaging} to eledmac}
% \changes{v1.13.0}{2015/03/06}{Remove false boolean settings which are not needed.}
% \end{macro}
% \end{macro}
@@ -1067,6 +1111,13 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\led@error@fail@patch@@mempnum}
+% \begin{macrocode}
+\newcommand{\led@error@fail@patch@@mempnum}{%
+ \reledpar@error{Fail to patch \string\@mempnum\space command.}{\@ehc}%
+}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\led@error@fail@patch@@outputpage}
% \begin{macrocode}
\newcommand{\led@error@fail@patch@@outputpage}{%
@@ -1077,13 +1128,13 @@
% \section{Sectioning commands}
%
% \begin{macro}{\section@numR}
-% This is the right side equivalent of \cs{section@num}.
+% This is the right side equivalent of \protect\cs{section@num}.
%
% Each section will read and write an associated `line-list
% file', containing information used to do the numbering. Normally
% the file will be called \meta{jobname}\file{.nn}, where \file{nn} is the
% section number. However, for right side texts the file is called
-% \meta{jobname}\file{.nnR}. The \cs{extensionchars} applies to the
+% \meta{jobname}\file{.nnR}. The \protect\cs{extensionchars} applies to the
% right side files just as it does to the normal files.
% \begin{macrocode}
\newcount\section@numR
@@ -1094,10 +1145,10 @@
%
% \begin{macro}{\ifpst@rtedL}
% \begin{macro}{\ifpst@rtedR}
-% \cs{ifpst@rtedL} is set FALSE at the start of left side numbering, and
-% similarly for \cs{ifpst@rtedR}.
-% \cs{ifpst@rtedL} is defined in \macpackage.
-% \changes{v0.3.0}{2005/02/24}{Moved \cs{ifpst@rtedL} to eledmac}
+% \protect\cs{ifpst@rtedL} is set FALSE at the start of left side numbering, and
+% similarly for \protect\cs{ifpst@rtedR}.
+% \protect\cs{ifpst@rtedL} is defined in \macpackage.
+% \changes{v0.3.0}{2005/02/24}{Moved \protect\cs{ifpst@rtedL} to eledmac}
% \begin{macrocode}
\pst@rtedLfalse
\newif\ifpst@rtedR
@@ -1106,10 +1157,10 @@
% \end{macro}
% \end{macro}
%
-% \changes{v1.8.0}{2014/07/24}{\cs{beginnumbering} is defined only on \Lpack{eledmac}, not on \Lpack{eledpar}.}
+% \changes{v1.8.0}{2014/07/24}{\protect\cs{beginnumbering} is defined only on \protect\package{eledmac}, not on \protect\package{eledpar}.}
%
% \begin{macro}{\beginnumberingR}
-% This is the right text equivalent of \cs{beginnumbering}, and begins
+% This is the right text equivalent of \protect\cs{beginnumbering}, and begins
% a section of numbered text.
% \begin{macrocode}
\newcommand*{\beginnumberingR}{%
@@ -1147,13 +1198,13 @@
% \end{macro}
%
% \begin{macro}{\endnumbering}
-% This is the left text version of the regular \cs{endnumbering} and must
+% This is the left text version of the regular \protect\cs{endnumbering} and must
% follow the last text for a left text numbered section.
-% It sets \cs{ifpst@rtedL} to FALSE. It is fully defined in \macpackage.
+% It sets \protect\cs{ifpst@rtedL} to FALSE. It is fully defined in \macpackage.
% \end{macro}
%
% \begin{macro}{\endnumberingR}
-% This is the right text equivalent of \cs{endnumbering} and must follow the
+% This is the right text equivalent of \protect\cs{endnumbering} and must follow the
% last text for a right text numbered section.
% \begin{macrocode}
\def\endnumberingR{%
@@ -1190,7 +1241,7 @@
% \begin{macro}{\initnumbering@sectcountR}
% \changes{v1.2.1}{2012/11/01}{For the right section, the counter is defined only once.}
% We do not want the numbering of the right-side section commands to be continuous with the numbering of the left side,
-% we switch the \LaTeX\ counter in \cs{numberingR}.
+% we switch the \LaTeX\ counter in \protect\cs{numberingR}.
% \begin{macrocode}
\newcounter{chapterR}
\newcounter{sectionR}
@@ -1207,9 +1258,9 @@
%
% \begin{macro}{\pausenumberingR}
% \begin{macro}{\resumenumberingR}
-% These are the right text equivalents of \cs{pausenumbering} and
-% \cs{resumenumbering}.
-% \changes{v1.8.3}{2014/08/31}{Debug \cs{resumenumberingR}}
+% These are the right text equivalents of \protect\cs{pausenumbering} and
+% \protect\cs{resumenumbering}.
+% \changes{v1.8.3}{2014/08/31}{Debug \protect\cs{resumenumberingR}}
% \begin{macrocode}
\newcommand*{\pausenumberingR}{%
\endnumberingR\global\numberingRtrue}
@@ -1234,7 +1285,7 @@
%
% \begin{macro}{\memorydumpL}
% \begin{macro}{\memorydumpR}
-% \cs{memorydump} is a shorthand for \cs{pausenumbering}\cs{resumenumbering}.
+% \protect\cs{memorydump} is a shorthand for \protect\cs{pausenumbering}\protect\cs{resumenumbering}.
% This will clear the memorised stuff for the previous chunks while
% keeping the numbering going.
% \begin{macrocode}
@@ -1270,17 +1321,17 @@
% \changes{v0.11.0}{2012/06/11}{Lineation can be by pstart (like in eledmac 0.15).}
% \changes{v1.0.0}{2012/09/14}{Debug in lineation by pstart}
% Sometimes you want line numbers that start at $1$ at the top of each
-% page; sometimes you want line numbers that start at $1$ at each \cs{pstart}; other times you want line numbers that start at $1$ at the start
+% page; sometimes you want line numbers that start at $1$ at each \protect\cs{pstart}; other times you want line numbers that start at $1$ at the start
% of each section and increase regardless of page breaks.
% \Parpackage lets you choose different schemes for the left and right texts.
-% \changes{v2.0.0}{2015/07/19}{\cs{ifbypage@} and \cs{ifbypstart@R} defined in \eledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{ifbypage@} and \protect\cs{ifbypstart@R} defined in \eledmac.}
%
% \begin{macro}{\lineationR}
-% \cs{lineationR}\marg{word} is the macro used to select the
+% \protect\cs{lineationR}\marg{word} is the macro used to select the
% lineation system for right texts.
% Its argument is a string: either \verb+page+, \verb+pstart+ or \verb+section+.
-% \changes{v1.15.0}{2015/04/13}{As \cs{lineation}, \cs{lineationR} automatically set the \cs{pstartinfootnote}.}
+% \changes{v1.15.0}{2015/04/13}{As \protect\cs{lineation}, \protect\cs{lineationR} automatically set the \protect\cs{pstartinfootnote}.}
% \begin{macrocode}
\newcommand*{\lineationR}[1]{{%
\ifnumbering
@@ -1319,8 +1370,8 @@
% \end{macro}
%
% \begin{macro}{\lineation*}
-% \changes{v1.8.2}{2014/08/15}{Add \cs{lineation*}}
-% \cs{lineation*} change the lineation system for both sides.
+% \changes{v1.8.2}{2014/08/15}{Add \protect\cs{lineation*}}
+% \protect\cs{lineation*} change the lineation system for both sides.
% \begin{macrocode}
\WithSuffix\newcommand\lineation*[1]{%
\lineation{#1}%
@@ -1332,7 +1383,7 @@
% \subsection{Setting line number margin}
% \begin{macro}{\linenummargin}
% \begin{macro}{\line@marginR}
-% You call \cs{linenummargin}\marg{word} to specify which margin you want your
+% You call \protect\cs{linenummargin}\marg{word} to specify which margin you want your
% right text's line numbers in; it takes one argument, a string.
% You can put the line numbers in the same margin on every page using
% \verb+left+ or \verb+right+; or you can use \verb+inner+ or
@@ -1341,14 +1392,14 @@
% change may not take effect just when you would like; if it is done between
% paragraphs nothing surprising should happen.
%
-% For right texts the selection is recorded in the count \cs{line@marginR},
-% otherwise in the count \cs{line@margin}:
+% For right texts the selection is recorded in the count \protect\cs{line@marginR},
+% otherwise in the count \protect\cs{line@margin}:
% $0$ for left, $1$ for right, $2$ for outer, and $3$ for inner.
%
% It is defined only once time, in \reledmac.
%
-% \changes{v0.3.a}{2005/03/30}{Do not just set \cs{line@marginR} in \cs{linenummargin}}
-% \changes{v2.0.0}{2015/07/19}{\cs{linenummargin} now defined only once time in \reledmac.}
+% \changes{v0.3.a}{2005/03/30}{Do not just set \protect\cs{line@marginR} in \protect\cs{linenummargin}}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{linenummargin} now defined only once time in \reledmac.}
% \begin{macrocode}
\newcount\line@marginR
% \end{macrocode}
@@ -1403,11 +1454,11 @@
% \begin{macro}{\linenumincrement*}
% \begin{macro}{\firstsublinenum*}
% \begin{macro}{\sublinenumincrement*}
-% \changes{v1.5.0}{2013/11/08}{Add starred version of \cs{firstlinenum}, \cs{linenumincrement}, \cs{firstsublinenum}, \cs{sublinenumincrement} to change both Left and Rightside.}
+% \changes{v1.5.0}{2013/11/08}{Add starred version of \protect\cs{firstlinenum}, \protect\cs{linenumincrement}, \protect\cs{firstsublinenum}, \protect\cs{sublinenumincrement} to change both Left and Rightside.}
% These are the user's macros for changing (sub) line numbers. They are
% defined in \macpackage.
-% The starred versions are specific to \Lpack{eledpar}.
-% \changes{v2.0.0}{2015/07/19}{\cs{firstlinenum}, \cs{linenumincrement}, \cs{firstsublinenum}, \cs{sublinenumincrement} are now defined only in \macpackage.}
+% The starred versions are specific to \protect\package{eledpar}.
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{firstlinenum}, \protect\cs{linenumincrement}, \protect\cs{firstsublinenum}, \protect\cs{sublinenumincrement} are now defined only in \macpackage.}
% \begin{macrocode}
\WithSuffix\newcommand\firstlinenum*[1]{%
\setcounter{firstlinenumR}{#1}%
@@ -1448,9 +1499,9 @@
% \subsection{Setting line number style}
% \begin{macro}{\linenumrepR}
% \begin{macro}{\sublinenumrepR}
-% \cs{linenumrepR}\marg{ctr} typesets the right line number \meta{ctr}, and
-% similarly \cs{sublinenumrepR} for subline numbers.
-% \changes{v0.3.0}{2005/02/10}{Added \cs{linenumrepR} and \cs{sublinenumrepR}}
+% \protect\cs{linenumrepR}\marg{ctr} typesets the right line number \meta{ctr}, and
+% similarly \protect\cs{sublinenumrepR} for subline numbers.
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{linenumrepR} and \protect\cs{sublinenumrepR}}
% \begin{macrocode}
\newcommand*{\linenumrepR}[1]{\@arabic{#1}}
\newcommand*{\sublinenumrepR}[1]{\@arabic{#1}}
@@ -1462,12 +1513,12 @@
% \begin{macro}{\leftlinenumR}
% \begin{macro}{\rightlinenumR}
% \begin{macro}{\l@dlinenumR}
-% \cs{leftlinenumR} and \cs{rightlinenumR} are the macros that are
+% \protect\cs{leftlinenumR} and \protect\cs{rightlinenumR} are the macros that are
% called to print the right text's marginal line numbers.
% Much of the
-% code for these is common and is maintained in \cs{l@dlinenumR}.
-% \changes{v0.3.0}{2005/02/10}{Simplified \cs{leftlinenumR} and
-% \cs{rightlinenumR} by introducing \cs{l@dlinenumR}}
+% code for these is common and is maintained in \protect\cs{l@dlinenumR}.
+% \changes{v0.3.0}{2005/02/10}{Simplified \protect\cs{leftlinenumR} and
+% \protect\cs{rightlinenumR} by introducing \protect\cs{l@dlinenumR}}
% \begin{macrocode}
\newcommand*{\leftlinenumR}{%
\l@dlinenumR
@@ -1497,11 +1548,11 @@
% \begin{macro}{\line@numR}
% \begin{macro}{\subline@numR}
% \begin{macro}{\absline@numR}
-% The count \cs{line@numR} stores the line number that is used in
+% The count \protect\cs{line@numR} stores the line number that is used in
% the right text's marginal line numbering and in notes.
-% The count \cs{subline@numR} stores
-% a sub-line number that qualifies \cs{line@numR}.
-% The count \cs{absline@numR} stores the
+% The count \protect\cs{subline@numR} stores
+% a sub-line number that qualifies \protect\cs{line@numR}.
+% The count \protect\cs{absline@numR} stores the
% absolute number of lines since the start
% of the right text section: that is, the number we have actually printed,
% no matter what numbers we attached to them.
@@ -1569,7 +1620,7 @@
%
%
% \begin{macro}{\list@clearing@regR}
-% \cs{Clear the right lines for \cs{read@linelist}}
+% \protect\cs{Clear the right lines for \protect\cs{read@linelist}}
% \begin{macrocode}
\newcommand{\list@clearing@regR}{%
\list@clear{\line@listR}%
@@ -1582,28 +1633,28 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\read@linelist}
-% \cs{read@linelist}\marg{file} is the control sequence
-% that is called by \cs{beginnumbering}
-% (via \cs{line@list@stuff}) to open and process a
+% \protect\cs{read@linelist}\marg{file} is the control sequence
+% that is called by \protect\cs{beginnumbering}
+% (via \protect\cs{line@list@stuff}) to open and process a
% line-list file; its argument is the name of the file.
% \label{readlinelist}.
% It is defined only once time in \reledmac.
-% \changes{v2.0.0}{2015/07/19}{\cs{read@linelist} is defined only once time in \cs{reledmac}.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{read@linelist} is defined only once time in \protect\cs{reledmac}.}
%
% \end{macro}
% \subsection{Commands within the line-list file}
%
% This section defines the commands that can appear within a
-% line-list file, except for \cs{@lab} which is in a
+% line-list file, except for \protect\cs{@lab} which is in a
% later section among the cross-referencing commands it is
% associated with.
%
% The macros with \verb"action" in their names contain all the code
% that modifies the action-code list.
-% \changes{v2.0.0}{2015/07/19}{\cs{@nl} is now defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{@nl} is now defined only in \reledmac.}
% \begin{macro}{\@nl@regR}
% \begin{macro}{\@nl}
-% \cs{@nl@regR} is called by \cs{@nl} if we are on a right side.
+% \protect\cs{@nl@regR} is called by \protect\cs{@nl} if we are on a right side.
% It does everything related to the start of a
% new line of numbered text on a right side.
%
@@ -1658,9 +1709,9 @@
% \end{macro}
% \begin{macro}{\last@page@numR}
% \begin{macro}{\fix@page}
-% \cs{last@page@numR} store the page number of the last right page.
-% It is modified by \cs{fix@page}, defined by \reledmac.
-% \changes{v2.0.0}{2105/06/28}{\cs{fix@page} is defined only once in \reledmac}
+% \protect\cs{last@page@numR} store the page number of the last right page.
+% It is modified by \protect\cs{fix@page}, defined by \reledmac.
+% \changes{v2.0.0}{2105/06/28}{\protect\cs{fix@page} is defined only once in \reledmac}
%
% \begin{macrocode}
\newcount\last@page@numR
@@ -1672,64 +1723,64 @@
%
%
% \begin{macro}{\@adv}
-% The \cs{@adv}\marg{num} macro advances
+% The \protect\cs{@adv}\marg{num} macro advances
% the current visible line number by the amount specified as
-% its argument. This is used to implement \cs{advanceline}.
+% its argument. This is used to implement \protect\cs{advanceline}.
% It is defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{@adv} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{@adv} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\@set}
-% The \cs{@set}\marg{num} macro sets
+% The \protect\cs{@set}\marg{num} macro sets
% the current visible line number to the value specified as
-% its argument. This is used to implement \cs{setline}.
+% its argument. This is used to implement \protect\cs{setline}.
% It is defined in \macpackage.
%
-% \changes{v2.0.0}{2015/07/19}{\cs{@set} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{@set} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\l@d@set}
-% The \cs{l@d@set}\marg{num} macro sets
+% The \protect\cs{l@d@set}\marg{num} macro sets
% the line number for the next \verb?\pstart...? to the value specified as
-% its argument. This is used to implement \cs{setlinenum}.
+% its argument. This is used to implement \protect\cs{setlinenum}.
% It is defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{l@d@set} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{l@d@set} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\page@action}
-% \cs{page@action}
+% \protect\cs{page@action}
% adds an entry to the action-code list to change the page number.
% It is defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{page@action} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{page@action} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\set@line@action}
-% \cs{set@line@action} adds an entry to the action-code
+% \protect\cs{set@line@action} adds an entry to the action-code
% list to change the visible line number.
% It is defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{set@line@action} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{set@line@action} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\sub@action}
-% \cs{sub@action}
+% \protect\cs{sub@action}
% adds an entry to the action-code list to turn sub-lineation on or
-% off, according to the current value of the \cs{ifsublines@} flag.
+% off, according to the current value of the \protect\cs{ifsublines@} flag.
% It is defined in \macpackage.
%
-% \changes{v2.0.0}{2015/07/19}{\cs{sub@action} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{sub@action} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\do@lockon}
% \begin{macro}{\do@lockonR}
-% \cs{lock@on}
+% \protect\cs{lock@on}
% adds an entry to the action-code list to turn line number
% locking on. The current setting of the sub-lineation flag tells us
% whether this applies to line numbers or sub-line numbers.
-% It is defined in \macpackage, however the code specific to right side is defined here, in \cs{do@lockonR}.
+% It is defined in \macpackage, however the code specific to right side is defined here, in \protect\cs{do@lockonR}.
-% \changes{v2.0.0}{2015/07/19}{\cs{do@lockon} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{do@lockon} defined only in \reledmac.}
% \begin{macrocode}
\newcount\@lockR
\newcount\sub@lockR
@@ -1764,10 +1815,10 @@
% \begin{macro}{\do@lockoff}
% \begin{macro}{\do@lockoffR}
% \begin{macro}{\skip@lockoff}
-% \cs{lock@off} adds an entry to the action-code list
+% \protect\cs{lock@off} adds an entry to the action-code list
% to turn line number locking off.
-% It is defined in \macpackage, however the code specific to right side is defined here, in \cs{do@lockoffR}.
-% \changes{v2.0.0}{2015/07/19}{\cs{do@lockoff} defined only in \reledmac.}
+% It is defined in \macpackage, however the code specific to right side is defined here, in \protect\cs{do@lockoffR}.
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{do@lockoff} defined only in \reledmac.}
% \begin{macrocode}
@@ -1797,38 +1848,38 @@
% \end{macro}
%
% \begin{macro}{\n@num}
-% \changes{v1.15.0}{2015/04/13}{\cs{n@num} defined only one time for both \Eledmac{} and \Eledpar{}.}
+% \changes{v1.15.0}{2015/04/13}{\protect\cs{n@num} defined only one time for both \Eledmac{} and \Eledpar{}.}
% \end{macro}
%
% \begin{macro}{\@ref}
% \begin{macro}{\@ref@regR}
-% \changes{v2.0.0}{2015/07/19}{\cs{@ref} defined only in \reledmac, code specific to right side moved in \cs{ref@regR}.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{@ref} defined only in \reledmac, code specific to right side moved in \protect\cs{ref@regR}.}
% \begin{macro}{\insert@countR}
-% \cs{@ref}
+% \protect\cs{@ref}
% marks the start of a passage, for creation of a footnote reference.
% It takes two arguments:
% \begin{itemize}
-% \item \verb"#1", the number of entries to add to \cs{insertlines@list}
+% \item \verb"#1", the number of entries to add to \protect\cs{insertlines@list}
% for this reference.
-% This value for right text, here and within \cs{edtext},
+% This value for right text, here and within \protect\cs{edtext},
% which computes it and writes it to the line-list file,
-% will be stored in the count \cs{insert@countR}.
+% will be stored in the count \protect\cs{insert@countR}.
% \begin{macrocode}
\newcount\insert@countR
% \end{macrocode}
%
% \item \verb"#2", a sequence of other line-list-file commands, executed to
% determine the ending line-number. This may also include other
-% \cs{@ref} commands, corresponding to uses of \cs{edtext}
-% within the first argument of another instance of \cs{edtext}.
+% \protect\cs{@ref} commands, corresponding to uses of \protect\cs{edtext}
+% within the first argument of another instance of \protect\cs{edtext}.
% \end{itemize}
%
-% \cs{@ref} itself is defined in \macpackage.
-% It calls \cs{ref@reg} or \cs{ref@regR}, depending weither we are in left or right side.
-% Here, we define only \cs{ref@regR}, \cs{ref@reg} is already defined in \macpackage.
+% \protect\cs{@ref} itself is defined in \macpackage.
+% It calls \protect\cs{ref@reg} or \protect\cs{ref@regR}, depending weither we are in left or right side.
+% Here, we define only \protect\cs{ref@regR}, \protect\cs{ref@reg} is already defined in \macpackage.
%
-% The first thing \cs{@ref@regR} itself does is to add the specified number
-% of items to the \cs{insertlines@listR} list.
+% The first thing \protect\cs{@ref@regR} itself does is to add the specified number
+% of items to the \protect\cs{insertlines@listR} list.
% \begin{macrocode}
\newcommand*{\@ref@regR}[2]{%
\global\advance\@edtext@level by 1%
@@ -1841,8 +1892,8 @@
%
% Next, process the second argument to determine the page
% and line numbers for the end of this lemma.
-% We temporarily equate \cs{@ref} to a different macro that just executes
-% its argument, so that nested \cs{@ref} commands are just skipped
+% We temporarily equate \protect\cs{@ref} to a different macro that just executes
+% its argument, so that nested \protect\cs{@ref} commands are just skipped
% this time. Some other macros need to be temporarily redefined to
% suppress their action.
% \begin{macrocode}
@@ -1863,7 +1914,7 @@
% \end{macrocode}
%
% Now store all the information about the location of the lemma's
-% start and end in \cs{line@list@R}.
+% start and end in \protect\cs{line@list@R}.
% \begin{macrocode}
\xright@appenditem%
{\the\page@numR|\the\line@numR|%
@@ -1871,7 +1922,7 @@
\the\endpage@num|\the\endline@num|%
\ifsublines@ \the\endsubline@num \else 0\fi}\to\line@listR
% \end{macrocode}
-% Create a list which will store all the second argument of each \cs{@sw}
+% Create a list which will store all the second argument of each \protect\cs{@sw}
% in this lemma, at this level.
% \begin{macrocode}
\expandafter\list@create\expandafter{\csname sw@list@edtext@tmp@\the\@edtext@level\endcsname}%
@@ -1881,12 +1932,12 @@
\providebool{lemmacommand@\the\@edtext@level}%
\boolfalse{lemmacommand@\the\@edtext@level}%
% \end{macrocode}
-% Execute the second argument of \cs{@ref} again,
+% Execute the second argument of \protect\cs{@ref} again,
% to perform for real all the commands within it.
% \begin{macrocode}
#2
-% Now, we store the list of \cs{@sw} of this current \cs{edtext} as an element of
-% the global list of list of \cs{@sw} for a \cs{edtext} depth.
+% Now, we store the list of \protect\cs{@sw} of this current \protect\cs{edtext} as an element of
+% the global list of list of \protect\cs{@sw} for a \protect\cs{edtext} depth.
% \begin{macrocode}
\ifnum\@edtext@level>0%
\def\create@this@edtext@level{\expandafter\list@create\expandafter{\csname sw@list@edtextR@\the\@edtext@level\endcsname}}%
@@ -1907,8 +1958,8 @@
% \end{macro}
% \begin{macro}{\@pend}
% \begin{macro}{\@pendR}
-% \cs{@pend}\marg{num} adds its argument to the \cs{linesinpar@listL}
-% list, and analagously for \cs{@pendR}. If needed, it resets line number.
+% \protect\cs{@pend}\marg{num} adds its argument to the \protect\cs{linesinpar@listL}
+% list, and analagously for \protect\cs{@pendR}. If needed, it resets line number.
% Both are defined in \macpackage, but they are empty.
% They are really defined only in \parpackage.
%
@@ -1927,8 +1978,8 @@
%
% \begin{macro}{\@lopL}
% \begin{macro}{\@lopR}
-% \cs{@lopL}\marg{num} adds its argument to the \cs{linesonpage@listL}
-% list, and analagously for \cs{@lopR}.
+% \protect\cs{@lopL}\marg{num} adds its argument to the \protect\cs{linesonpage@listL}
+% list, and analagously for \protect\cs{@lopR}.
% Both are defined in \macpackage, but they are empty.
% They are really defined only in \parpackage.
% \begin{macrocode}
@@ -1949,7 +2000,7 @@
% section to write commands out to the line-list.
%
% \begin{macro}{\linenum@outR}
-% The file for right texts will be opened on output stream \cs{linenum@outR}.
+% The file for right texts will be opened on output stream \protect\cs{linenum@outR}.
% \begin{macrocode}
\newwrite\linenum@outR
% \end{macrocode}
@@ -1969,8 +2020,8 @@
% \end{macro}
%
% \begin{macro}{\line@list@stuffR}
-% This is the right text version of the \cs{line@list@stuff}\marg{file}
-% macro. It is called by \cs{beginnumberingR} and performs
+% This is the right text version of the \protect\cs{line@list@stuff}\marg{file}
+% macro. It is called by \protect\cs{beginnumberingR} and performs
% all the line-list operations needed at the start of a section.
% Its argument is the name of the line-list file.
% \changes{v1.10.1}{2015/01/16}{Revert modification of 1.4.2, which makes bugs with numbering. Leave vertical mode to solve spurious space before minipage.}
@@ -1994,7 +2045,7 @@
% \end{macro}
%
% \begin{macro}{\new@lineL}
-% The \cs{new@lineL} macro sends the \cs{@nl} command to the left text
+% The \protect\cs{new@lineL} macro sends the \protect\cs{@nl} command to the left text
% line-list file, to mark the start of a new text line.
% \begin{macrocode}
\newcommand*{\new@lineL}{%
@@ -2002,7 +2053,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\new@lineR}
-% The \cs{new@lineR} macro sends the \cs{@nl} command to the right text
+% The \protect\cs{new@lineR} macro sends the \protect\cs{@nl} command to the right text
% line-list file, to mark the start of a new text line.
% \begin{macrocode}
\newcommand*{\new@lineR}{%
@@ -2012,11 +2063,11 @@
%
% \begin{macro}{\flag@start}
% \begin{macro}{\flag@end}
-% We enclose a lemma marked by \cs{edtext} in
-% \cs{flag@start} and \cs{flag@end}: these send the \cs{@ref}
+% We enclose a lemma marked by \protect\cs{edtext} in
+% \protect\cs{flag@start} and \protect\cs{flag@end}: these send the \protect\cs{@ref}
% command to the line-list file.
-% \changes{v0.3.0}{2005/02/04}{Removed extraneous spaces from\cs{flag@end}}
-% \changes{v1.8.2}{2014/08/15}{\cs{flag@start} and \cs{flag@end} are now defined only one time for eledmac and eledpar}
+% \changes{v0.3.0}{2005/02/04}{Removed extraneous spaces from\protect\cs{flag@end}}
+% \changes{v1.8.2}{2014/08/15}{\protect\cs{flag@start} and \protect\cs{flag@end} are now defined only one time for eledmac and eledpar}
% They are both defined in \macpackage.
%
% \end{macro}
@@ -2024,62 +2075,62 @@
%
% \begin{macro}{\startsub}
% \begin{macro}{\endsub}
-% \cs{startsub} and \cs{endsub}
+% \protect\cs{startsub} and \protect\cs{endsub}
% turn sub-lineation on and off, by writing
% appropriate instructions to the line-list file.
% There are both defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{startsub} and \cs{endsub} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{startsub} and \protect\cs{endsub} defined only in \reledmac.}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\advanceline}
-% You can use \cs{advanceline}\marg{num}
+% You can use \protect\cs{advanceline}\marg{num}
% in running text to advance the current visible
% line-number by a specified value, positive or negative.
% It is defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{advanceline} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{advanceline} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\setline}
-% You can use \cs{setline}\marg{num}
+% You can use \protect\cs{setline}\marg{num}
% in running text (i.e., within \verb?\pstart...\pend?) to set the
% current visible
% line-number to a specified positive value.
% It is defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{setline} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{setline} defined only in \reledmac.}
%
% \end{macro}
%
% \begin{macro}{\setlinenum}
-% You can use \cs{setlinenum}\marg{num}
-% before a \cs{pstart} to set the visible line-number to a specified
-% positive value. It writes a \cs{\l@d@set} command to the line-list file.
+% You can use \protect\cs{setlinenum}\marg{num}
+% before a \protect\cs{pstart} to set the visible line-number to a specified
+% positive value. It writes a \protect\cs{l@d@set} command to the line-list file.
% It is defined in \macpackage.
%
-% \changes{v2.0.0}{2015/07/19}{\cs{setlinenum} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{setlinenum} defined only in \reledmac.}
% \end{macro}
%
% \begin{macro}{\startlock}
% \begin{macro}{\endlock}
-% You can use \cs{startlock} or \cs{endlock}
+% You can use \protect\cs{startlock} or \protect\cs{endlock}
% in running text to start or end line number locking at
% the current line. They decide whether line numbers or sub-line numbers
% are affected, depending on the current state of the sub-lineation flags.
% They are defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{startlock} and \cs{endlock} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{startlock} and \protect\cs{endlock} defined only in \reledmac.}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\skipnumbering}
-% \changes{v1.15.0}{2015/04/13}{\cs{skipnumbering} defined only one time for both \Eledmac{} and \Eledpar{}}
+% \changes{v1.15.0}{2015/04/13}{\protect\cs{skipnumbering} defined only one time for both \Eledmac{} and \Eledpar{}}
% \end{macro}
%
%
% \section{Marking text for notes}
% \label{text}
%
-% The \cs{edtext} macro is used to create all
+% The \protect\cs{edtext} macro is used to create all
% footnotes and endnotes,
% as well as to print the portion of the main text to which a given note
% or notes is keyed. The idea is to have that lemma appear only once in
@@ -2089,22 +2140,22 @@
% \begin{macro}{\critext}
% \begin{macro}{\edtext}
% \changes{v1.3.0}{2012/11/16}{Manage RTL language.}
-% \changes{v1.11.0}{2014/01/22}{\cs{critext} and \cs{edtext} are now defined only in eledmac.}
+% \changes{v1.11.0}{2014/01/22}{\protect\cs{critext} and \protect\cs{edtext} are now defined only in eledmac.}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\set@line}
-% The \cs{set@line} macro
-% is called by \cs{edtext} to put the line-reference field and
-% font specifier for the current block of text into \cs{l@d@nums}.
+% The \protect\cs{set@line} macro
+% is called by \protect\cs{edtext} to put the line-reference field and
+% font specifier for the current block of text into \protect\cs{l@d@nums}.
% It is defined in \macpackage.
%
-% \changes{v2.0.0}{2015/07/19}{\cs{set@line} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{set@line} defined only in \reledmac.}
% \end{macro}
% \subsection{Specific hooks and commands for notes}
-% The \macpackage \cs{newseries@} initializes commands which are linked to notes series.
+% The \macpackage \protect\cs{newseries@} initializes commands which are linked to notes series.
% However, to keep \macpackage as light as possible, it does not define commands which are specific to \parpackage.
-% This is what does \cs{newseries@par}. The specific hooks are also defined here.
+% This is what does \protect\cs{newseries@par}. The specific hooks are also defined here.
% \begin{macro}{\newseries@par}
% \begin{macrocode}
\newcommand{\newseries@par}[1]{%
@@ -2114,7 +2165,7 @@
% We need to declare these options.
% We also need boolean flags, and to set them to true when a note series is not printed on one side.
% We check the \verb+nofamiliar+ and \verb+nocritical+ \Eledmac{} options.
-% \changes{v1.16.0}{2015/05/18}{Fix bug with \cs{onlysideX}.}
+% \changes{v1.16.0}{2015/05/18}{Fix bug with \protect\cs{onlysideX}.}
% \begin{macrocode}
\unless\ifnofamiliar@%
\csgdef{onlysideX@#1}{}%
@@ -2126,8 +2177,8 @@
\fi%
% \end{macrocode}
% \subsubsection{Familiar footnotes without marks}
-% The \cs{footnoteXnomk} commands are for notes which are printed on the left side, while they are called in the right side.
-% Basically, they set first toggle \cs{nomark@} to true, then call the \cs{footnoteX}.
+% The \protect\cs{footnoteXnomk} commands are for notes which are printed on the left side, while they are called in the right side.
+% Basically, they set first toggle \protect\cs{nomark@} to true, then call the \protect\cs{footnoteX}.
% and finally add the footnote counter in the footnote counter list.
%
% First, check the \verb+nofamiliar+ option of \macpackage.
@@ -2138,18 +2189,18 @@
% \begin{macrocode}
\expandafter\list@create\csname footnote#1@mk\endcsname%
% \end{macrocode}
-% Then, declare the \cs{footnoteXnomk} command.
+% Then, declare the \protect\cs{footnoteXnomk} command.
% \begin{macrocode}
\expandafter\newcommand\csname footnote#1nomk\endcsname[1]{%
% \end{macrocode}
-% First step: just call the normal \cs{footnoteX}, saying that we do not want to print the mark.
+% First step: just call the normal \protect\cs{footnoteX}, saying that we do not want to print the mark.
% \begin{macrocode}
\toggletrue{nomk@}%
\csuse{footnote#1}{##1}%
\togglefalse{nomk@}%
% \end{macrocode}
% Second, and last, step: store the footnote counter in the footnote counters list.
-% We use some \cs{let}, because \cs{xright@appenditem} is difficult to use with \cs{expandafter}.
+% We use some \protect\cs{let}, because \protect\cs{xright@appenditem} is difficult to use with \protect\cs{expandafter}.
% \begin{macrocode}
\letcs{\@tmp}{footnote#1@mk}%
\numdef\@tmpa{\csuse{c@footnote#1}}%
@@ -2162,7 +2213,7 @@
\expandafter\newcommand\csname footnote#1mk\endcsname{%
% \end{macrocode}
% Get the first element of the footnote mark list.
-% As \cs{gl@p} is difficult to use with dynamic name macro, we use \cs{let} commands.
+% As \protect\cs{gl@p} is difficult to use with dynamic name macro, we use \protect\cs{let} commands.
% \begin{macrocode}
\letcs{\@tmp}{footnote#1@mk}%
\gl@p\@tmp\to\@tmpa%
@@ -2189,13 +2240,13 @@
% \begin{macrocode}
\fi
% \end{macrocode}
-% End of \cs{newseries@par}.
+% End of \protect\cs{newseries@par}.
% \begin{macrocode}
}%
% \end{macrocode}
% \end{macro}
% \subsubsection{Create hooks}
-% Read the \macpackage code handbook about \cs{newhookcommand@series}.
+% Read the \macpackage code handbook about \protect\cs{newhookcommand@series}.
% Here, we create hooks which are specific to \parpackage.
% \begin{macrocode}
\unless\ifnocritical@%
@@ -2209,7 +2260,7 @@
% \end{macrocode}
% \subsubsection{Init standards series (A,B,C,D,E,Z)}
% \begin{macro}{\init@series@par}
-% \cs{newseries@par} is called by \cs{newseries}.
+% \protect\cs{newseries@par} is called by \protect\cs{newseries}.
% However, this last command is called before \parpackage is loaded.
% Thus, we need to initiate a specific series hook for \parpackage.
% \begin{macrocode}
@@ -2221,10 +2272,10 @@
% \end{macrocode}
% \end{macro}
% \section{Pstart numbers dumping and restoration}
-% While in \macpackage the footnotes are inserted in the same time as the \cs{pstart}\ldots\cs{pend} are read, in \parpackage they are inserted when the \cs{Columns} or \cs{Pages} commands are called.
+% While in \macpackage the footnotes are inserted in the same time as the \protect\cs{pstart}\ldots\protect\cs{pend} are read, in \parpackage they are inserted when the \protect\cs{Columns} or \protect\cs{Pages} commands are called.
% Consequently, if we do nothing, the value of the \verb+PstartL+ and \verb+PstartR+ counters are not the same in the main text and in the notes.
-% To solve this problem, we dump the values in two list (one by side) when processing \cs{pstart} and restore these at each \cs{pstart} when calling \cs{Columns} or \cs{Pages}.
-% We also dump and restore the value of the boolean \cs{ifnumberpstart}.
+% To solve this problem, we dump the values in two list (one by side) when processing \protect\cs{pstart} and restore these at each \protect\cs{pstart} when calling \protect\cs{Columns} or \protect\cs{Pages}.
+% We also dump and restore the value of the boolean \protect\cs{ifnumberpstart}.
% So, first step, creating the lists.
% Here, ``pc'' means ``public counters''.
@@ -2238,7 +2289,7 @@
% \end{macro}
% Two commands to dump current pstarts.
% We prefer two commands to one with argument indicating the side,
-% because the commands are short, and so we save one test (or a \cs{csname} construction).
+% because the commands are short, and so we save one test (or a \protect\cs{csname} construction).
% \begin{macro}{\dump@pstartL@pc}
% \begin{macro}{\dump@pstartR@pc}
% \begin{macrocode}
@@ -2296,16 +2347,16 @@
% \end{macrocode}
% \begin{macro}{\AtBeginPairs}
-% The \cs{AtBeginPairs} macro just define a \cs{at@begin@pairs} macro, called at the beginning of each \verb+pairs+ environments.
+% The \protect\cs{AtBeginPairs} macro just define a \protect\cs{at@begin@pairs} macro, called at the beginning of each \verb+pairs+ environments.
% \begin{macrocode}
\newcommand{\AtBeginPairs}[1]{\xdef\at@begin@pairs{#1}}%
\def\at@begin@pairs{}%
% \end{macrocode}
% \end{macro}
-% \changes{v2.0.0}{2015/07/19}{Deleting the old system of managing parallel chapter, keep only the new one with \cs{patchcmd}.}
+% \changes{v2.0.0}{2015/07/19}{Deleting the old system of managing parallel chapter, keep only the new one with \protect\cs{patchcmd}.}
% The \verb?pages? environment additionally sets the `column' widths to the
-% \cs{textwidth} (as known at the time the package is called). In this environment, there are two text in parallel on 2 pages.
+% \protect\cs{textwidth} (as known at the time the package is called). In this environment, there are two text in parallel on 2 pages.
% \begin{macrocode}
\newenvironment{pages}{%
\l@dpairingtrue
@@ -2326,7 +2377,7 @@
%
% \begin{macro}{ifinstanzaL}
% \begin{macro}{ifinstanzaR}
-% These boolean tests are switched by the \cs{stanza} command, using either the left or right side.
+% These boolean tests are switched by the \protect\cs{stanza} command, using either the left or right side.
% \begin{macrocode}
\newif\ifinstanzaL
\newif\ifinstanzaR
@@ -2365,8 +2416,8 @@
% \begin{macro}{\Rightsidehookend}
% Hooks into the start and end of the {Leftside} and {Rightside}
% environments. These are initially empty.
-% \changes{v0.3.0}{2005/02/10}{Added \cs{Leftsidehook}, \cs{Leftsidehookend},
-% \cs{Rightsidehook} and \cs{Rightsidehookend}}
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{Leftsidehook}, \protect\cs{Leftsidehookend},
+% \protect\cs{Rightsidehook} and \protect\cs{Rightsidehookend}}
% \begin{macrocode}
\newcommand*{\Leftsidehook}{}
\newcommand*{\Leftsidehookend}{}
@@ -2427,8 +2478,8 @@
% line-list, and then at last send the line to the vertical list.
% This section contains all the code for this processing.
%
-% \subsection{Boxes, counters, \cs{pstart}
-% and \cs{pend}}
+% \subsection{Boxes, counters, \protect\cs{pstart}
+% and \protect\cs{pend}}
%
% \begin{macro}{\num@linesR}
% \begin{macro}{\one@lineR}
@@ -2437,14 +2488,14 @@
% of the paragraph decomposition.
%
% When we first form the paragraph, it goes into a box register,
-% \cs{l@dLcolrawbox} or \cs{l@dRcolrawbox} for right text, instead of onto the
+% \protect\cs{l@dLcolrawbox} or \protect\cs{l@dRcolrawbox} for right text, instead of onto the
% current vertical list.
-% The \cs{ifnumberedpar@} flag will be \verb"true" while a paragraph is
+% The \protect\cs{ifnumberedpar@} flag will be \verb"true" while a paragraph is
% being processed in that way.
-% \cs{num@lines(R)} will store the number of lines in the paragraph
+% \protect\cs{num@lines(R)} will store the number of lines in the paragraph
% when it is complete. When we chop it up into lines, each line
% in turn goes into the
-% \cs{one@line} or \cs{one@lineR} register, and \cs{par@line(R)}
+% \protect\cs{one@line} or \protect\cs{one@lineR} register, and \protect\cs{par@line(R)}
% will be the number
% of that line within the paragraph.
% \begin{macrocode}
@@ -2458,22 +2509,22 @@
%
% \begin{macro}{\pstartL}
% \begin{macro}{\pstartR}
-% \changes{v1.1.0}{2012/09/25}{Add \cs{labelpstarttrue} (from eledmac).}
-% \changes{v1.1.1}{2012/10/01}{Correct \cs{pstartR} bug introduced by 1.1.}
-% \changes{v1.4.3}{2013/10/27}{Spurious spaces in \cs{pstartL} and \cs{pstartR}.}
-% \changes{v1.8.0}{2014/08/05}{As in \Lpack{eledmac}, \cs{pendL} and \cs{pendR} can have an optional argument.}
-% \cs{pstart} starts the paragraph by
-% clearing the \cs{inserts@list} list and other
+% \changes{v1.1.0}{2012/09/25}{Add \protect\cs{labelpstarttrue} (from eledmac).}
+% \changes{v1.1.1}{2012/10/01}{Correct \protect\cs{pstartR} bug introduced by 1.1.}
+% \changes{v1.4.3}{2013/10/27}{Spurious spaces in \protect\cs{pstartL} and \protect\cs{pstartR}.}
+% \changes{v1.8.0}{2014/08/05}{As in \protect\package{eledmac}, \protect\cs{pendL} and \protect\cs{pendR} can have an optional argument.}
+% \protect\cs{pstart} starts the paragraph by
+% clearing the \protect\cs{inserts@list} list and other
% relevant variables, and then arranges for the
% subsequent text to go into the appropriate box.
-% \cs{pstart} needs to appear at the start of
+% \protect\cs{pstart} needs to appear at the start of
% every paragraph that is to be numbered.
%
-% Beware: everything that occurs between \cs{pstart} and \cs{pend}
+% Beware: everything that occurs between \protect\cs{pstart} and \protect\cs{pend}
% is happening within a group; definitions must be global if you want
% them to survive past the end of the paragraph.
%
-% We have to have specific left and right \cs{pstart} when parallel processing;
+% We have to have specific left and right \protect\cs{pstart} when parallel processing;
% among other things because of potential changes in the linewidth.
%
% \begin{macrocode}
@@ -2504,8 +2555,8 @@
\pend%
\fi%
% \end{macrocode}
-% If this is the first \cs{pstart} in a numbered section, clear any inserts
-% and set \cs{ifpst@rtedL} to FALSE.
+% If this is the first \protect\cs{pstart} in a numbered section, clear any inserts
+% and set \protect\cs{ifpst@rtedL} to FALSE.
% \begin{macrocode}
\ifpst@rtedL\else%
\list@clear{\inserts@list}%
@@ -2528,7 +2579,7 @@
% We set all the usual interline penalties to zero; this ensures that there will
% be no large interline penalties to prevent us from slicing the
% paragraph into pieces. These penalties revert to the values
-% that you set when the group for the \cs{vbox} ends.
+% that you set when the group for the \protect\cs{vbox} ends.
% \begin{macrocode}
\l@dzeropenalties%
\ifautopar\else%
@@ -2550,6 +2601,12 @@
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}}%
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}%
\at@every@pstart@call%
+% \end{macrocode}
+% Gobble following space (automatically done if there is no optional argument)
+% \begin{macrocode}
+ \ignorespaces%
+% \end{macrocode}
+% \begin{macrocode}
}
% \end{macrocode}
% The same for right side.
@@ -2603,6 +2660,7 @@
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}}%
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}%
\at@every@pstart@call%
+ \ignorespaces%
}
% \end{macrocode}
% \end{macro}
@@ -2610,9 +2668,9 @@
%
%
% \begin{macro}{\pendL}
-% \changes{v1.4.3}{2013/10/27}{Spurious spaces in \cs{pendL}.}
-% \changes{v1.8.0}{2014/08/05}{As in \Lpack{eledmac}, \cs{pendL} can have an optional argument.}
-% \cs{pend} must be used to end a numbered paragraph. Again we need
+% \changes{v1.4.3}{2013/10/27}{Spurious spaces in \protect\cs{pendL}.}
+% \changes{v1.8.0}{2014/08/05}{As in \protect\package{eledmac}, \protect\cs{pendL} can have an optional argument.}
+% \protect\cs{pend} must be used to end a numbered paragraph. Again we need
% a version
% that knows about left parallel texts.
%
@@ -2626,14 +2684,14 @@
\fi%
% \end{macrocode}
% We immediately
-% call \cs{endgraf} to end the paragraph; this ensures that there will
+% call \protect\cs{endgraf} to end the paragraph; this ensures that there will
% be no large interline penalties to prevent us from slicing the
% paragraph into pieces.
% \begin{macrocode}
\endgraf\global\num@lines=\prevgraf\egroup%
\global\par@line=0%
% \end{macrocode}
-% End the group that was begun in the \cs{pstart}.
+% End the group that was begun in the \protect\cs{pstart}.
% \begin{macrocode}
\endgroup%
\ignorespaces%
@@ -2654,9 +2712,9 @@
% \end{macro}
%
% \begin{macro}{\pendR}
-% \changes{v1.4.3}{2013/10/27}{Spurious spaces in \cs{pstartR}.}
-% \changes{v1.8.0}{2014/08/05}{As in \Lpack{eledmac}, \cs{pendR} can have an optional argument.}
-% The version of \cs{pend} needed for right texts.
+% \changes{v1.4.3}{2013/10/27}{Spurious spaces in \protect\cs{pstartR}.}
+% \changes{v1.8.0}{2014/08/05}{As in \protect\package{eledmac}, \protect\cs{pendR} can have an optional argument.}
+% The version of \protect\cs{pend} needed for right texts.
%
% \begin{macrocode}
\newcommandx*{\pendR}[1][1]{%
@@ -2686,8 +2744,8 @@
%
%
% \begin{macro}{\AtEveryPstartCall}
-% The \cs{AtEveryPstartCall} argument is called when the \cs{pstartL} or \cs{pstartR} is called.
-% That is different of \cs{AtEveryPstart} the argument of which is called when the \cs{pstart}s are printed.
+% The \protect\cs{AtEveryPstartCall} argument is called when the \protect\cs{pstartL} or \protect\cs{pstartR} is called.
+% That is different of \protect\cs{AtEveryPstart} the argument of which is called when the \protect\cs{pstart}s are printed.
% \begin{macrocode}
\newcommand{\AtEveryPstartCall}[1]{\gdef\at@every@pstart@call{#1}}%
\gdef\at@every@pstart@call{}%
@@ -2695,7 +2753,7 @@
% \end{macro}
% \begin{macro}{\ifprint@last@after@pendL}
% \begin{macro}{\ifprint@last@after@pendR}
-% Two booleans set to true, when the time is to print the last optional argument of a \cs{pend}.
+% Two booleans set to true, when the time is to print the last optional argument of a \protect\cs{pend}.
% \begin{macrocode}
\newif\ifprint@last@after@pendL%
\newif\ifprint@last@after@pendR%
@@ -2706,11 +2764,11 @@
%
% For parallel texts we have to be able to process left and right lines
% independently. For sequential text we happily use the
-% original \cs{do@line}. Otherwise \ldots
+% original \protect\cs{do@line}. Otherwise \ldots
%
% \begin{macro}{\l@dleftbox}
% \begin{macro}{\l@drightbox}
-% A line of left text will be put in the box \cs{l@dleftbox}, and analogously
+% A line of left text will be put in the box \protect\cs{l@dleftbox}, and analogously
% for a line of right text.
% \begin{macrocode}
\newbox\l@dleftbox
@@ -2753,14 +2811,14 @@
% \end{macro}
%
%
-% \changes{v0.11.0}{2012/06/11}{Change \cs{do@lineL} and \cs{do@lineR} to allow line numbering by pstart (like in eledmac 0.15).}
-% \changes{v1.8.0}{2014/08/05}{Change \cs{do@lineR} and \cs{do@lineR} to allow new sectioning commands.}
+% \changes{v0.11.0}{2012/06/11}{Change \protect\cs{do@lineL} and \protect\cs{do@lineR} to allow line numbering by pstart (like in eledmac 0.15).}
+% \changes{v1.8.0}{2014/08/05}{Change \protect\cs{do@lineR} and \protect\cs{do@lineR} to allow new sectioning commands.}
% \begin{macro}{\do@lineL}
% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the begining of a page, (maybe added by v1.8.0) (?).}
-% The \cs{do@lineL} macro is called to
+% The \protect\cs{do@lineL} macro is called to
% do all the processing for a single line of left text.
-% \changes{v0.3.0}{2005/02/10}{Added \cs{do@lineLhook} to \cs{do@lineL}}
-% \changes{v0.3.0}{2005/02/10}{Simplified \cs{do@lineL} by using macros for
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{do@lineLhook} to \protect\cs{do@lineL}}
+% \changes{v0.3.0}{2005/02/10}{Simplified \protect\cs{do@lineL} by using macros for
% some common code}
% \begin{macrocode}
\newcommand*{\do@lineL}{%
@@ -2805,7 +2863,7 @@
% \end{macro}
%
% \begin{macro}{\print@lineL}
-% \cs{print@lineL} is for lines without a sectioning command. See \macpackage definition of \cs{print@line} for handbook.
+% \protect\cs{print@lineL} is for lines without a sectioning command. See \macpackage definition of \protect\cs{print@line} for handbook.
% \changes{v1.12.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.}
% \begin{macrocode}
\def\print@lineL{%
@@ -2827,8 +2885,8 @@
% \end{macro}
% \begin{macro}{\print@eledsectionL}
% \changes{v1.12.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.}
-% \changes{v1.12.1}{2015/02/27}{Fixes bug with \LuaLaTeX\ RTL \cs{eledsection}.}
-% \cs{print@eledsectionL} is for line with macro code.
+% \changes{v1.12.1}{2015/02/27}{Fixes bug with \LuaLaTeX\ RTL \protect\cs{eledsection}.}
+% \protect\cs{print@eledsectionL} is for line with macro code.
% \begin{macrocode}
\def\print@eledsectionL{%%
\addtocounter{pstartL}{-1}%
@@ -2864,9 +2922,9 @@
% \begin{macro}{\dolineRhook}
% \begin{macro}{\doinsidelineLhook}
% \begin{macro}{\doinsidelineRhook}
-% \changes{v1.8.3}{2014/08/31}{Added \cs{dolineLhook}, \cs{dolineRhook}, \cs{doinsidelineLhook} and \cs{doinsidelineRhook}}
+% \changes{v1.8.3}{2014/08/31}{Added \protect\cs{dolineLhook}, \protect\cs{dolineRhook}, \protect\cs{doinsidelineLhook} and \protect\cs{doinsidelineRhook}}
% These high-level commands just redefine the low-level commands.
-% They have to be used be user, without \cs{makeatletter}.
+% They have to be used be user, without \protect\cs{makeatletter}.
% \begin{macrocode}
\newcommand*{\dolineLhook}[1]{\gdef\do@lineLhook{#1}}%
\newcommand*{\dolineRhook}[1]{\gdef\do@lineRhook{#1}}%
@@ -2878,13 +2936,13 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \changes{v0.3.0}{2005/02/10}{Added \cs{do@lineLhook} and \cs{do@lineRhook}}
-% \changes{v1.4.0}{2013/07/11}{Added \cs{do@insidelineLhook} and \cs{do@insidelineRhook}}
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{do@lineLhook} and \protect\cs{do@lineRhook}}
+% \changes{v1.4.0}{2013/07/11}{Added \protect\cs{do@insidelineLhook} and \protect\cs{do@insidelineRhook}}
% \begin{macro}{\do@lineLhook}
% \begin{macro}{\do@lineRhook}
% \begin{macro}{\do@insidelineLhook}
% \begin{macro}{\do@insidelineRhook}
-% Hooks, initially empty, into the respective \cs{do@line(L/R)} macros.
+% Hooks, initially empty, into the respective \protect\cs{do@line(L/R)} macros.
% \begin{macrocode}
\newcommand*{\do@lineLhook}{}
\newcommand*{\do@lineRhook}{}
@@ -2897,9 +2955,9 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\do@lineR}
-% The \cs{do@lineR} macro is called to
+% The \protect\cs{do@lineR} macro is called to
% do all the processing for a single line of right text.
-% \changes{v0.3.0}{2005/02/10}{Changed \cs{do@lineR} similarly to \cs{do@lineL}}
+% \changes{v0.3.0}{2005/02/10}{Changed \protect\cs{do@lineR} similarly to \protect\cs{do@lineL}}
% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the begining of a page, added by v1.8.0 (?).}
% \begin{macrocode}
\newcommand*{\do@lineR}{%
@@ -2986,10 +3044,10 @@
\@eled@sectioningfalse%
\global\csundef{eled@sectioning@\the\l@dpscR R}%
\if@RTL%
- \hspace{-\paperwidth}%
+ \hspace{-3\paperwidth}%
{\hbox{\l@dunhbox@line{\one@lineR}} \new@lineR}%
\else%
- \hspace{\paperwidth}%
+ \hspace{3\paperwidth}%
{\new@lineR \hbox{\l@dunhbox@line{\one@lineR}}}%
\fi%
\vskip\eledsection@correcting@skip
@@ -3000,9 +3058,9 @@
% \subsection{Line and page number computation}
%
% \begin{macro}{\getline@numR}
-% The \cs{getline@numR} macro
+% The \protect\cs{getline@numR} macro
% determines the page and line numbers for the right text line we are about to
-% send to the vertical list. The \cs{getline@numL} is the same for left text.
+% send to the vertical list. The \protect\cs{getline@numL} is the same for left text.
%
% \begin{macrocode}
\newcommand*{\getline@numR}{%
@@ -3050,8 +3108,8 @@
%
% \begin{macro}{\do@ballastR}
% \relax
-% The real work in the line macros above is done in \cs{do@actions}, but
-% before we plunge into that, let is get \cs{do@ballastR} out of the
+% The real work in the line macros above is done in \protect\cs{do@actions}, but
+% before we plunge into that, let is get \protect\cs{do@ballastR} out of the
% way.
% \begin{macrocode}
\newcommand*{\do@ballastR}{\global\ballast@count=\z@
@@ -3072,13 +3130,13 @@
% \begin{macro}{\do@actions@fixedcodeR}
% \begin{macro}{\do@actions@nextR}
%
-% The \cs{do@actionsR} macro
+% The \protect\cs{do@actionsR} macro
% looks at the list of actions to take at particular right text absolute line
% numbers, and does everything that is specified for the current line.
%
% It may call itself recursively and we use tail recursion, via
-% \cs{do@actions@nextR} for this.
-% \changes{v0.3.0}{2005/02/24}{Used \cs{do@actions@fixedcode} in \cs{do@actionsR}}
+% \protect\cs{do@actions@nextR} for this.
+% \changes{v0.3.0}{2005/02/24}{Used \protect\cs{do@actions@fixedcode} in \protect\cs{do@actionsR}}
% \changes{v1.15.0}{2015/04/13}{Add action 1008 and 1009}
% \begin{macrocode}
@@ -3164,10 +3222,10 @@
% \begin{macro}{\ch@ck@l@ckR}
% \begin{macro}{\f@x@l@cksR}
% \begin{macro}{\affixline@numR}
-% \cs{affixline@numR} is the right text version of the
-% \cs{affixline@num} macro.
-% \changes{v0.3.0}{2005/02/24}{Changed \cs{affixline@numR} to match new eledmac}
-% \changes{v0.11.0}{2012/06/11}{Changed \cs{affixline@numR} to allow to disable line numbering (like in eledmac 0.15).}
+% \protect\cs{affixline@numR} is the right text version of the
+% \protect\cs{affixline@num} macro.
+% \changes{v0.3.0}{2005/02/24}{Changed \protect\cs{affixline@numR} to match new eledmac}
+% \changes{v0.11.0}{2012/06/11}{Changed \protect\cs{affixline@numR} to allow to disable line numbering (like in eledmac 0.15).}
% \begin{macrocode}
\newcommand*{\l@dcalcnum}[3]{%
@@ -3288,7 +3346,7 @@
% The printing of the pstart number is like in \macpackage, with two differences :
%\begin{itemize}
%\item Some commands have versions suffixed by R or L.
-%\item The \cs{affixpstart@num} and \cs{affixpstart@numR} commands are called in the \cs{Pages} command. Consequently, the \verb|pstartL| and \verb|pstartR| counters must be reset at the beginning of this command.
+%\item The \protect\cs{affixpstart@num} and \protect\cs{affixpstart@numR} commands are called in the \protect\cs{Pages} command. Consequently, the \verb|pstartL| and \verb|pstartR| counters must be reset at the beginning of this command.
%\end{itemize}
% \begin{macro}{\affixpstart@numL}
% \begin{macro}{\affixpstart@numR}
@@ -3375,7 +3433,7 @@
% \subsection{Add insertions to the vertical list}
%
% \begin{macro}{\inserts@listR}
-% \cs{inserts@listR} is the list macro that contains the inserts that
+% \protect\cs{inserts@listR} is the list macro that contains the inserts that
% we save up for one right text paragraph.
%
% \begin{macrocode}
@@ -3417,22 +3475,22 @@
%
% \begin{macro}{\add@penaltiesL}
% \begin{macro}{\add@penaltiesR}
-% \cs{add@penaltiesL} is
-% the last macro used by \cs{do@lineL}. It adds up the club,
+% \protect\cs{add@penaltiesL} is
+% the last macro used by \protect\cs{do@lineL}. It adds up the club,
% widow, and interline penalties, and puts a single penalty
% of the appropriate size
% back into the paragraph; these penalties get
-% removed by the \cs{vsplit} operation. \cs{displaywidowpenalty} and
-% \cs{brokenpenalty} are not restored, since we have no easy way to
+% removed by the \protect\cs{vsplit} operation. \protect\cs{displaywidowpenalty} and
+% \protect\cs{brokenpenalty} are not restored, since we have no easy way to
% find out where we should insert them.
%
% \label{add@penalties}
% In the code below, which is a virtual copy of the original
-% \cs{add@penalties}, \cs{num@lines} is the number of lines in the whole
-% paragraph, and \cs{par@line} is the line we are working on at the
-% moment. The count \cs{@l@dtempcnta} is used to calculate and
+% \protect\cs{add@penalties}, \protect\cs{num@lines} is the number of lines in the whole
+% paragraph, and \protect\cs{par@line} is the line we are working on at the
+% moment. The count \protect\cs{@l@dtempcnta} is used to calculate and
% accumulate the penalty; it is initially set to the value of
-% \cs{ballast@count}, which has been worked out in \cs{do@ballast}.
+% \protect\cs{ballast@count}, which has been worked out in \protect\cs{do@ballast}.
% Finally, the penalty is
% checked to see that it does not go below $-10000$.
% \begin{verbatim}
@@ -3477,7 +3535,7 @@
% \subsection{Printing leftover notes}
%
% \begin{macro}{\flush@notesR}
-% The \cs{flush@notesR}
+% The \protect\cs{flush@notesR}
% macro is called after the entire right text has been sliced up
% and sent on to the vertical list.
% \begin{macrocode}
@@ -3498,11 +3556,11 @@
%
% \subsection{Line number printing} \label{sec:nfootformat}
%
-% The \cs{printlinesR} macro prints the line
+% The \protect\cs{printlinesR} macro prints the line
% numbers for a note---which, in the
% general case, is a rather complicated task.
% The seven parameters of the
-% argument are the line numbers as stored in \cs{l@d@nums}, in the
+% argument are the line numbers as stored in \protect\cs{l@d@nums}, in the
% form described on \reff{reledmac-linenumbers} of \Eledmac{}' handbook: the starting
% page, line, and sub-line numbers, followed by the ending page,
% line, and sub-line numbers, and then the font specifier for
@@ -3510,13 +3568,13 @@
%
%
% \begin{macro}{\printlinesR}
-% This is the right text version of \cs{printlines} and takes account
-% of \cs{@Rlineflag}.
+% This is the right text version of \protect\cs{printlines} and takes account
+% of \protect\cs{@Rlineflag}.
% Just a reminder of the arguments: \\
% \verb?\printlinesR #1 | #2 | #3 | #4 | #5 | #6 | #7? \\
% \verb?\printlinesR start-page | line | subline | end-page | line | subline | font ?
-% \changes{v0.3.0}{2005/02/10}{Simplified \cs{printlinesR} by using
-% \cs{setprintlines}}
+% \changes{v0.3.0}{2005/02/10}{Simplified \protect\cs{printlinesR} by using
+% \protect\cs{setprintlines}}
% \begin{macrocode}
\def\printlinesR#1|#2|#3|#4|#5|#6|#7|{\begingroup
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
@@ -3533,17 +3591,17 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Footnotes output specific to \cs{Pages}}
+% \subsection{Footnotes output specific to \protect\cs{Pages}}
% \begin{macro}{\print@Xnotes@forpages}
% \begin{macro}{\correct@Xfootins@box}
% \begin{macro}{\print@notesX@forpages}
% \begin{macro}{\correct@footinsX@box}
-% \changes{v1.13.1}{2015/03/12}{Correct \cs{correct@footinsX@box} and \cs{correct@Xfootins@box}}
-% \changes{v1.13.1}{2015/03/12}{Call \cs{correct@footinsX@box} and \cs{correct@Xfootins@box} directly in \cs{print@notesX@forpages} and \cs{print@Xnotes@forpages}.}
-% The \cs{Xonlyside} and \cs{onlysideX} hooks for \cs{Pages}
+% \changes{v1.13.1}{2015/03/12}{Correct \protect\cs{correct@footinsX@box} and \protect\cs{correct@Xfootins@box}}
+% \changes{v1.13.1}{2015/03/12}{Call \protect\cs{correct@footinsX@box} and \protect\cs{correct@Xfootins@box} directly in \protect\cs{print@notesX@forpages} and \protect\cs{print@Xnotes@forpages}.}
+% The \protect\cs{Xonlyside} and \protect\cs{onlysideX} hooks for \protect\cs{Pages}
% allow notes to be printed either in left or right pages only.
-% The implementation of such features is delegated to \cs{print@Xnotes@forpages},
-% which replaces \cs{print@Xnotes} inside \cs{Pages}.
+% The implementation of such features is delegated to \protect\cs{print@Xnotes@forpages},
+% which replaces \protect\cs{print@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.
@@ -3564,10 +3622,10 @@
% \item For the pages where notes must be NOT printed, we allow to every note box one line less than it ought to be.
% In our example, that means that we allow \TeX\ to add only $10-1=9$ line in the note box on p.~3.
% Before shifting to the pages where notes must be printed, we allow to every notes the expected number of lines. In our example, that means that we allow \TeX to add 10~lines in the note box on p.~4. As on p.~3 only 9 lines were allowed, that means note box of p.~4 will contain $9+1=10$ lines. So the ``one line too many'' problem is solved.
-% \item Still remains the ``glue'' problem. We solve it by recreating a clean note box. We split the one which is created by \TeX\ to get the next line printed. Then, we create the new box, by bringing together the first part and the last part of the split box, adding some skip between them. That is achieved by \cs{correct@Xfootins@box} (or \cs{correct@footinsX@box} for familiar notes).
+% \item Still remains the ``glue'' problem. We solve it by recreating a clean note box. We split the one which is created by \TeX\ to get the next line printed. Then, we create the new box, by bringing together the first part and the last part of the split box, adding some skip between them. That is achieved by \protect\cs{correct@Xfootins@box} (or \protect\cs{correct@footinsX@box} for familiar notes).
% \end{itemize}
% \end{itemize}
-% The code to print critical notes, when processing \cs{Pages}.
+% The code to print critical notes, when processing \protect\cs{Pages}.
% \begin{macrocode}
\newcommand\print@Xnotes@forpages[1]{%
% \end{macrocode}
@@ -3629,12 +3687,12 @@
\egroup%
% \end{macrocode}
% \begin{macrocode}
-% End of \cs{print@Xnotes@forpages}.
+% End of \protect\cs{print@Xnotes@forpages}.
}%
}%
}%
% \end{macrocode}
-% Now, \cs{correct@Xfootins@box}, to fix problem of last line being glued to the previous one.
+% Now, \protect\cs{correct@Xfootins@box}, to fix problem of last line being glued to the previous one.
% \begin{macrocode}
\newcommand{\correct@Xfootins@box}[1]{%
% \end{macrocode}
@@ -3716,7 +3774,7 @@
%
%
% \begin{macro}{\labelref@listR}
-% Set up a new list, \cs{labelref@listR}, to hold the page, line and
+% Set up a new list, \protect\cs{labelref@listR}, to hold the page, line and
% sub-line numbers for each label in right text.
% \begin{macrocode}
\list@create{\labelref@listR}
@@ -3727,13 +3785,13 @@
%
% \begin{macro}{\edlabel}
% This command is defined only one time in \macpackage, including features for \parpackage.
-% \changes{v1.12.0}{2015/02/23}{\cs{edlabel} is now defined only one time for both eledmac and eledpar}
-% \changes{v1.12.0}{2015/02/23}{\cs{edlabel} and \cs{edindex} works now with hyperref when using \Lpack{eledpar}.}
+% \changes{v1.12.0}{2015/02/23}{\protect\cs{edlabel} is now defined only one time for both eledmac and eledpar}
+% \changes{v1.12.0}{2015/02/23}{\protect\cs{edlabel} and \protect\cs{edindex} works now with hyperref when using \protect\package{eledpar}.}
% \end{macro}
%
% \begin{macro}{\l@dmake@labelsR}
-% This is the right text version of \cs{l@dmake@labels}, taking account
-% of \cs{@Rlineflag}.
+% This is the right text version of \protect\cs{l@dmake@labels}, taking account
+% of \protect\cs{@Rlineflag}.
%
% \begin{macrocode}
\def\l@dmake@labelsR#1|#2|#3|#4|#5{%
@@ -3751,14 +3809,14 @@
%
%
% \begin{macro}{\@lab}
-% The \cs{@lab} command, which appears in the \cs{linenum@out} file,
+% The \protect\cs{@lab} command, which appears in the \protect\cs{linenum@out} file,
% appends the current values of page, line and sub-line to the
-% \cs{labelref@list}. These values are defined by the earlier
-% \cs{@page}, \cs{@nl}, and the \cs{sub@on} and \cs{sub@off} commands
-% appearing in the \cs{linenum@out} file.
+% \protect\cs{labelref@list}. These values are defined by the earlier
+% \protect\cs{@page}, \protect\cs{@nl}, and the \protect\cs{sub@on} and \protect\cs{sub@off} commands
+% appearing in the \protect\cs{linenum@out} file.
%
% It is defined on \macpackage.
-% \changes{v2.0.0}{2015/28/06}{\cs{@lab} defined only in \eledmac.}
+% \changes{v2.0.0}{2015/28/06}{\protect\cs{@lab} defined only in \eledmac.}
% \end{macro}
%
%
@@ -3769,8 +3827,8 @@
% the text.
% \begin{macro}{\sidenote@marginR}
% \begin{macro}{\sidenotemargin*}
-% \changes{v1.8.0}{2014/08/05}{\cs{sidenotemargin} is now directly defined in \Lpack{eledmac} to be able to manage \Lpack{eledpar}.}
-% \changes{v1.8.0}{2014/08/05}{Add \cs{sidenotemargin*}}
+% \changes{v1.8.0}{2014/08/05}{\protect\cs{sidenotemargin} is now directly defined in \protect\package{eledmac} to be able to manage \protect\package{eledpar}.}
+% \changes{v1.8.0}{2014/08/05}{Add \protect\cs{sidenotemargin*}}
% Specifies which margin sidenotes can be in.
% \begin{macrocode}
\WithSuffix\newcommand\sidenotemargin*[1]{%
@@ -3788,9 +3846,9 @@
% \changes{v1.3.3}{2012/12/19}{Debugging the left notes of the right column.}
% \changes{v1.3.4}{2013/07/03}{Allow use of commands in sidenotes, as introduced by eledmac 1.0.}
-% \changes{v1.8.0}{2014/08/05}{\cs{l@dlsnote},\cs{l@drsnote} and \cs{l@dcsnote} defined only one time, in \Lpack{eledmac}. }
+% \changes{v1.8.0}{2014/08/05}{\protect\cs{l@dlsnote},\protect\cs{l@drsnote} and \protect\cs{l@dcsnote} defined only one time, in \protect\package{eledmac}. }
% \begin{macro}{\affixside@noteR}
-% The right text version of \cs{affixside@note}.
+% The right text version of \protect\cs{affixside@note}.
% \changes{v1.1.2}{2012/10/06}{Remove spurious space between line number and line content}
% \begin{macrocode}
\newcommand*{\affixside@noteR}{%
@@ -3847,20 +3905,20 @@
%
%
% \begin{macro}{\l@dbfnote}
-% \cs{l@dbfnote} adds the footnote to the insert list, and
-% \cs{vl@dbfnote} calls the original \cs{@footnotetext}.
+% \protect\cs{l@dbfnote} adds the footnote to the insert list, and
+% \protect\cs{vl@dbfnote} calls the original \protect\cs{@footnotetext}.
% \changes{v1.3.1}{2012/11/16}{Compatibility of standard footnotes with eledmac when theses footnotes contain any commands.}
% \changes{v1.3.3}{2012/11/19}{Spurious space with footnote in right column.}
% There are both defined in \macpackage.
-% \changes{v2.0.0}{2015/07/19}{\cs{l@dbfnote} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{l@dbfnote} defined only in \reledmac.}
% \end{macro}
%
%
% \begin{macro}{\normalbfnoteX}
-% \changes{v0.3.0}{2005/02/04}{Removed extraneous spaces from \cs{normalbfnoteX}}
-% \changes{v1.3.5}{2013/07/10}{Allows one to redefine \cs{thefootnoteX} with \c{alph} when some packages are loaded.}
+% \changes{v0.3.0}{2005/02/04}{Removed extraneous spaces from \protect\cs{normalbfnoteX}}
+% \changes{v1.3.5}{2013/07/10}{Allows one to redefine \protect\cs{thefootnoteX} with \c{alph} when some packages are loaded.}
% \changes{v1.4.1}{2013/08/16}{Fix bug with normal familiar footnotes when mixing RTL and LTR text.}
-% \changes{v2.0.0}{2015/07/19}{\cs{normalbfnoteX} defined only in \reledmac.}
+% \changes{v2.0.0}{2015/07/19}{\protect\cs{normalbfnoteX} defined only in \reledmac.}
% \end{macro}
%
%
@@ -3868,8 +3926,8 @@
% \section{Verse}
%\changes{v0.11.0}{2012/06/11}{New management of hangingsymbol insertion, preventing undesirable insertions.}
%\changes{v0.12.0}{2012/08/03}{New management of hangingsymbol insertion, preventing undesirable insertions.}
-% Like in \macpackage, the insertion of hangingsymbol is base on \cs{ifinserthangingsymbol}, and, for the right side, on \cs{ifinserthangingsymbolR}.
-% Both commands also include the hanging space, to be sure the \cs{one@line} of hanging lines has the same width that the \cs{one@line} of normal lines and to prevent the column separator from shifting.
+% Like in \macpackage, the insertion of hangingsymbol is base on \protect\cs{ifinserthangingsymbol}, and, for the right side, on \protect\cs{ifinserthangingsymbolR}.
+% Both commands also include the hanging space, to be sure the \protect\cs{one@line} of hanging lines has the same width that the \protect\cs{one@line} of normal lines and to prevent the column separator from shifting.
% \begin{macro}{\inserthangingsymbolL}
% \begin{macro}{\inserthangingsymbolR}
% \changes{v0.11.0}{2012/06/11}{Prevent the column separator for hanging verse from shifting}
@@ -3914,7 +3972,7 @@
% \begin{environment}{astanza}
% \changes{v1.4.1}{2013/08/16}{Enable the use of stanzaindentsrepetition within astanza environment.}
% \changes{v1.13.0}{2015/03/06}{Enable the use of optional argument of \& in astanza environment.}
-% This is roughly an environmental form of \cs{stanza}, which treats
+% This is roughly an environmental form of \protect\cs{stanza}, which treats
% its stanza-like contents as a single chunk.
%
% \begin{macrocode}
@@ -3981,7 +4039,7 @@
%
% \section{Naming macros}
%
-% The \LaTeX\ kernel provides \cs{@namedef} and \cs{@namuse} for defining
+% The \LaTeX\ kernel provides \protect\cs{@namedef} and \protect\cs{@namuse} for defining
% and using macros that may have non-letters in their names. We need
% something similar here as we are going to need and use some numbered
% boxes and counters.
@@ -4028,8 +4086,8 @@
% \section{Fixing babel and polyglossia}
%
% With parallel texts there is the possibility that the two sides
-% might use different languages via \Lpack{babel}. On the other hand,
-% nor \Lpack{babel} nor \Lpack{polyglossia} might not be called at all (even though it might be already
+% might use different languages via \protect\package{babel}. On the other hand,
+% nor \protect\package{babel} nor \protect\package{polyglossia} might not be called at all (even though it might be already
% built into the format).
% \changes{v0.2.0}{2004/12/20}{Added section of babel related code}
%
@@ -4053,19 +4111,19 @@
% \end{macro}
% \end{macro}
%
-% \changes{v1.8.0}{2014/08/05}{Suppress \cs{ifl@dsamelang} which did not work and was not logical, because both columns could have the same language but not the main language of the document.}
+% \changes{v1.8.0}{2014/08/05}{Suppress \protect\cs{ifl@dsamelang} which did not work and was not logical, because both columns could have the same language but not the main language of the document.}
%
% \begin{macro}{\l@dchecklang}
-% \changes{v1.8.0}{2014/08/05}{Suppress \cs{l@dchecklang} which did not work and was not logical, because both columns could have the same language but not the main language of the document.}
+% \changes{v1.8.0}{2014/08/05}{Suppress \protect\cs{l@dchecklang} which did not work and was not logical, because both columns could have the same language but not the main language of the document.}
% \end{macro}
% \begin{macro}{\bbl@set@language}
-% In \Lpack{babel} the macro \cs{bbl@set@language}\marg{lang} does the work when
-% the language \meta{lang} is changed via \cs{selectlanguage}.
+% In \protect\package{babel} the macro \protect\cs{bbl@set@language}\marg{lang} does the work when
+% the language \meta{lang} is changed via \protect\cs{selectlanguage}.
% Unfortunately for us, if it is given
% an argument in the form of a control sequence it strips off the \verb?\?
% character rather than expanding the command. We need a version that accepts
-% an argument in the form \cs{lang} without it stripping the \verb?\?.
-% \changes{v2.0.0}{2015/07/19}{Patch \cs{bbl@set@language} instead of redefining it}
+% an argument in the form \protect\cs{lang} without it stripping the \verb?\?.
+% \changes{v2.0.0}{2015/07/19}{Patch \protect\cs{bbl@set@language} instead of redefining it}
% \begin{macrocode}
\patchcmd{\bbl@set@language}%
{\select@language{\languagename}}%
@@ -4077,16 +4135,16 @@
% \end{macro}
%
% The rest of the setup has to be postponed until the end of the preamble
-% when we know if \Lpack{babel} or \Lpack{polyglossia} have been used or not. However, for now assume
+% when we know if \protect\package{babel} or \protect\package{polyglossia} have been used or not. However, for now assume
% that it has not been used.
%
% \begin{macro}{\selectlanguage}
% \begin{macro}{\l@duselanguage}
% \begin{macro}{\theledlanguageL}
% \begin{macro}{\theledlanguageR}
-% \cs{selectlanguage} is a \verb?babel? command. \cs{theledlanguageL} and
-% \cs{theledlanguageR} are the names of the languages of the left and right
-% texts. \cs{l@duselanguage} is similar to \cs{selectlanguage}.
+% \protect\cs{selectlanguage} is a \verb?babel? command. \protect\cs{theledlanguageL} and
+% \protect\cs{theledlanguageR} are the names of the languages of the left and right
+% texts. \protect\cs{l@duselanguage} is similar to \protect\cs{selectlanguage}.
% \begin{macrocode}
\newcommand*{\l@duselanguage}[1]{}
\gdef\theledlanguageL{}
@@ -4094,20 +4152,20 @@
% \end{macrocode}
%
-% Now do the \Lpack{babel} or \Lpack{polyglossia} fix or, if necessary.
+% Now do the \protect\package{babel} or \protect\package{polyglossia} fix or, if necessary.
% \begin{macrocode}
\AtBeginDocument{%
\@ifundefined{xpg@main@language}{%
\@ifundefined{bbl@main@language}{%
% \end{macrocode}
-% Either \Lpack{babel} has not been used or it has been used with no
+% Either \protect\package{babel} has not been used or it has been used with no
% specified language.
% \begin{macrocode}
\l@dusedbabelfalse
}{%
% \end{macrocode}
-% Here we deal with the case where babel has been used. \cs{selectlanguage}
-% has to be redefined to use our version of \cs{bbl@set@language} and to
+% Here we deal with the case where babel has been used. \protect\cs{selectlanguage}
+% has to be redefined to use our version of \protect\cs{bbl@set@language} and to
% store the left or right language.
% \begin{macrocode}
\l@dusedbabeltrue
@@ -4119,13 +4177,13 @@
\else \gdef\theledlanguageL{#1}%
\fi}
% \end{macrocode}
-% \cs{l@duselanguage} simply calls the original \cs{selectlanguage} so
-% that \cs{theledlanguageL} and \cs{theledlanguageR} are unaltered.
+% \protect\cs{l@duselanguage} simply calls the original \protect\cs{selectlanguage} so
+% that \protect\cs{theledlanguageL} and \protect\cs{theledlanguageR} are unaltered.
% \begin{macrocode}
\renewcommand*{\l@duselanguage}[1]{%
\l@doldselectlanguage{#1}}
% \end{macrocode}
-% Lastly, initialise the left and right languages to the current \Lpack{babel}
+% Lastly, initialise the left and right languages to the current \protect\package{babel}
% one.
% \begin{macrocode}
\gdef\theledlanguageL{\bbl@main@language}%
@@ -4133,10 +4191,10 @@
}%
}
% \end{macrocode}
-% If use \Lpack{polyglossia}
+% If use \protect\package{polyglossia}
% \changes{v1.8.0}{2014/08/05}{Correct left/right language setting with polyglossia.}
% \changes{v1.9.0}{2014/09/16}{Debug left/right language switching with polyglossia. Do not write in .aux file when setting left/right lines.}
-% \changes{v2.0.0}{2015/07/19}{Patch \cs{otherlanguage} instead of redefining it.}
+% \changes{v2.0.0}{2015/07/19}{Patch \protect\cs{otherlanguage} instead of redefining it.}
% \begin{macrocode}
{ \let\old@otherlanguage\otherlanguage%
\renewcommand{\otherlanguage}[2][]{%
@@ -4160,8 +4218,8 @@
%
% \section{Counts and boxes for parallel texts}
%
-% In sequential text, each chunk (that enclosed by \cs{pstart} \ldots
-% \cs{pend}) is put into a box called \cs{raw@text} and then immediately
+% In sequential text, each chunk (that enclosed by \protect\cs{pstart} \ldots
+% \protect\cs{pend}) is put into a box called \protect\cs{raw@text} and then immediately
% printed, resulting in the box being emptied and ready for the next chunk.
% For parallel processing multiple boxes are needed as printing is delayed.
% We also need extra counters for various things.
@@ -4181,9 +4239,9 @@
%
% \begin{macro}{\l@dnumpstartsL}
% \begin{macro}{\l@dnumpstartsR}
-% The numbers of left and right chunks. \cs{l@dnumpstartsL} is defined
-% in \Lpack{eledmac}.
-% \changes{v0.3.0}{2005/02/24}{Moved \cs{l@dnumpstartsL} to eledmac}
+% The numbers of left and right chunks. \protect\cs{l@dnumpstartsL} is defined
+% in \protect\package{eledmac}.
+% \changes{v0.3.0}{2005/02/24}{Moved \protect\cs{l@dnumpstartsL} to eledmac}
% \begin{macrocode}
\newcount\l@dnumpstartsR
@@ -4203,8 +4261,8 @@
% \end{macro}
%
% \begin{macro}{\l@dsetuprawboxes}
-% This macro creates \cs{maxchunks} pairs of boxes for left and right
-% chunks. The boxes are called \cs{l@dLcolrawbox1}, \cs{l@dLcolrawbox2}, etc.
+% This macro creates \protect\cs{maxchunks} pairs of boxes for left and right
+% chunks. The boxes are called \protect\cs{l@dLcolrawbox1}, \protect\cs{l@dLcolrawbox2}, etc.
% \begin{macrocode}
\newcommand*{\l@dsetuprawboxes}{%
\@l@dtempcntb=\l@dc@maxchunks
@@ -4221,9 +4279,9 @@
% \begin{macro}{\l@dzeromaxlinecounts}
% To be able to synchronise left and right texts we need
% to know the maximum number of text lines there are in each pair of chunks.
-% \cs{l@dsetupmaxlinecounts} creates \cs{maxchunks} new counts
-% called \cs{l@dmaxlinesinpar1}, etc., and
-% \cs{l@dzeromaxlinecounts} zeroes all of them.
+% \protect\cs{l@dsetupmaxlinecounts} creates \protect\cs{maxchunks} new counts
+% called \protect\cs{l@dmaxlinesinpar1}, etc., and
+% \protect\cs{l@dzeromaxlinecounts} zeroes all of them.
% \begin{macrocode}
\newcommand*{\l@dsetupmaxlinecounts}{%
\@l@dtempcntb=\l@dc@maxchunks
@@ -4245,7 +4303,7 @@
% \end{macro}
%
% Make sure that all these are set up. This has to be done after the
-% user has had an opportunity to change \cs{maxchunks}.
+% user has had an opportunity to change \protect\cs{maxchunks}.
% \begin{macrocode}
\AtBeginDocument{%
\l@dsetuprawboxes
@@ -4262,7 +4320,7 @@
% \begin{macro}{\@pstartstrue}
% \begin{macro}{\@pstartsfalse}
% \begin{macro}{\check@pstarts}
-% \cs{check@pstarts} returns \cs{@pstartstrue} if there are any unprocessed
+% \protect\cs{check@pstarts} returns \protect\cs{@pstartstrue} if there are any unprocessed
% chunks.
% \begin{macrocode}
\newif\if@pstarts
@@ -4287,9 +4345,9 @@
% \begin{macro}{\araw@texttrue}
% \begin{macro}{\araw@textfalse}
% \begin{macro}{\checkraw@text}
-% \cs{checkraw@text} checks whether the current Left or Right box is
-% void or not. If one or other is not void it sets \cs{araw@texttrue},
-% otherwise both are void and it sets \cs{araw@textfalse}.
+% \protect\cs{checkraw@text} checks whether the current Left or Right box is
+% void or not. If one or other is not void it sets \protect\cs{araw@texttrue},
+% otherwise both are void and it sets \protect\cs{araw@textfalse}.
% \begin{macrocode}
\newif\ifaraw@text
\newcommand*{\checkraw@text}{%
@@ -4335,7 +4393,7 @@
%
% \begin{macro}{\@eledsectionL}
% \begin{macro}{\@eledsectionR}
-% The parbox \cs{@eledsectionL} and \cs{@eledsectionR} will keep the sections' title.
+% The parbox \protect\cs{@eledsectionL} and \protect\cs{@eledsectionR} will keep the sections' title.
% \begin{macrocode}
\newsavebox{\@eledsectionL}%
\newsavebox{\@eledsectionR}%
@@ -4343,12 +4401,12 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\Columns}
-% \changes{v1.8.0}{2014/07/28}{Modify \cs{Columns} to enable to add section's title.}
-% The \cs{Columns} command results in the previous Left and
+% \changes{v1.8.0}{2014/07/28}{Modify \protect\cs{Columns} to enable to add section's title.}
+% The \protect\cs{Columns} command results in the previous Left and
% Right texts being typeset in matching columns. There should
% be equal numbers of chunks in the left and right texts.
%
-% \changes{v1.12.0}{2015/02/23}{Add \cs{l@dprintingcolumnstrue}}
+% \changes{v1.12.0}{2015/02/23}{Add \protect\cs{l@dprintingcolumnstrue}}
% \begin{macrocode}
\newcommand*{\Columns}{%
\ifl@dpairing%
@@ -4379,7 +4437,7 @@
\global\pstartnumtrue
\global\pstartnumRtrue
% \end{macrocode}
-% Increment \cs{l@dpscL} and \cs{l@dpscR} which here count
+% Increment \protect\cs{l@dpscL} and \protect\cs{l@dpscR} which here count
% the numbers of left and right chunks.
% Also restore the value of the public pstart counters.
% \begin{macrocode}
@@ -4388,16 +4446,16 @@
\restore@pstartL@pc%
\restore@pstartR@pc%
% \end{macrocode}
-% We print the optional argument of \cs{pstart} or the argument of \cs{AtEveryPstart}.
+% We print the optional argument of \protect\cs{pstart} or the argument of \protect\cs{AtEveryPstart}.
% \begin{macrocode}
\Columns@print@before@pstart%
% \end{macrocode}
% Check if there is text yet to be processed in at least one of
% the two current chunks, and also whether the left and right languages
% are the same
-% \changes{v0.2.0}{2004/12/20}{Added \cs{l@dchecklang} and \cs{l@duselanguage}
-% to \cs{Columns}}
-% \changes{v1.8.0}{2014/08/05}{Suppress \cs{l@dchecklang} from \cs{Columns}.}
+% \changes{v0.2.0}{2004/12/20}{Added \protect\cs{l@dchecklang} and \protect\cs{l@duselanguage}
+% to \protect\cs{Columns}}
+% \changes{v1.8.0}{2014/08/05}{Suppress \protect\cs{l@dchecklang} from \protect\cs{Columns}.}
% \begin{macrocode}
\checkraw@text
{ \loop\ifaraw@text
@@ -4484,10 +4542,10 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\print@columnseparator}
-% \changes{v1.8.0}{2014/08/05}{Move some code of \cs{Columns} to \cs{print@columnseparator}.}
-% \cs{print@columnseparator} prints the column separator, with surrounding spaces (as the user has set them).
-% We use the \TeX\ \cs{ifdim} instead of \Lpack{etoolbox}
-% to avoid having \cs{hfill} in a \verb+{}+, which deletes some space (but not much).
+% \changes{v1.8.0}{2014/08/05}{Move some code of \protect\cs{Columns} to \protect\cs{print@columnseparator}.}
+% \protect\cs{print@columnseparator} prints the column separator, with surrounding spaces (as the user has set them).
+% We use the \TeX\ \protect\cs{ifdim} instead of \protect\package{etoolbox}
+% to avoid having \protect\cs{hfill} in a \verb+{}+, which deletes some space (but not much).
% \begin{macrocode}
\def\print@columnseparator{%
\ifdim\beforecolumnseparator<0pt%
@@ -4505,7 +4563,7 @@
%\end{macrocode}
% \end{macro}
% \begin{macro}{\checkpb@columns}
-% \cs{checkpb@columns} prevent or make pagebreaking in columns, depending of the use of \cs{ledpb} or \cs{lednopb}.
+% \protect\cs{checkpb@columns} prevent or make pagebreaking in columns, depending of the use of \protect\cs{ledpb} or \protect\cs{lednopb}.
% \begin{macrocode}
\newcommand{\checkpb@columns}{%
@@ -4534,8 +4592,8 @@
% \begin{macro}{\columnrulewidth}
% The separator between line pairs in parallel columns is in the form
% of a vertical rule extending a little below the baseline and with a height
-% slightly greater than the \cs{baselineskip}. The width of the rule
-% is \cs{columnrulewidth} (initially 0pt so the rule is invisible).
+% slightly greater than the \protect\cs{baselineskip}. The width of the rule
+% is \protect\cs{columnrulewidth} (initially 0pt so the rule is invisible).
% \begin{macrocode}
\newcommand*{\columnseparator}{%
\smash{\rule[-0.2\baselineskip]{\columnrulewidth}{1.05\baselineskip}}}
@@ -4547,8 +4605,8 @@
% \end{macro}
% \begin{macro}{\columnsposition}
% \begin{macro}{\columns@position}
-% The position of the \cs{Columns} in a page. Default value is R.
-% Stored in \cs{columns@position}.
+% The position of the \protect\cs{Columns} in a page. Default value is R.
+% Stored in \protect\cs{columns@position}.
% \begin{macrocode}
\newcommand*{\columnsposition}[1]{%
\xdef\columns@position{#1}%
@@ -4559,7 +4617,7 @@
% \end{macro}
% \begin{macro}{\beforecolumnseparator}
% \begin{macro}{\aftercolumnseparator}
-% \cs{beforecolumnseparator} and \cs{aftercolumnseparator} lengths are defined to \verb+-1pt+. If user changes them to a positive length, the lengths are used to define blank spaces before / after the column separator, instead of \cs{hfill}.
+% \protect\cs{beforecolumnseparator} and \protect\cs{aftercolumnseparator} lengths are defined to \verb+-1pt+. If user changes them to a positive length, the lengths are used to define blank spaces before / after the column separator, instead of \protect\cs{hfill}.
% \begin{macrocode}
\newlength{\beforecolumnseparator}%
\setlength{\beforecolumnseparator}{-2pt}%
@@ -4580,10 +4638,10 @@
% \begin{macro}{setwidthliketwocolumns@R}
% \begin{macro}{setpositionliketwocolumns@R}
% \begin{macro}{setnotepositionliketwocolumns@R}
-% The \cs{setwidth…} macros are called in \cs{beginnumbering} in a \textbf{non-parallel}
+% The \protect\cs{setwidth…} macros are called in \protect\cs{beginnumbering} in a \textbf{non-parallel}
% typesetting context, to fix the width of the lines to be vertically aligned with parallel columns. They are also called at the beginning of a note's group, if some options are enabled.
-% The \cs{setposition…} macros are called in \cs{beginnumbering} in a \textbf{non- parallel} typesetting context to fix the position of the lines.
-% The \cs{setnoteposition…} macros are called in \cs{xxxfootstart} in a \textbf{non- parallel} typesetting context to fix the position of notes block.
+% The \protect\cs{setposition…} macros are called in \protect\cs{beginnumbering} in a \textbf{non- parallel} typesetting context to fix the position of the lines.
+% The \protect\cs{setnoteposition…} macros are called in \protect\cs{xxxfootstart} in a \textbf{non- parallel} typesetting context to fix the position of notes block.
% \begin{macrocode}
\newcommand{\setwidthliketwocolumns@L}{%
% Temporary dimension, initially equal to the standard hsize, i.e. text width
@@ -4708,7 +4766,7 @@
%
% \begin{macro}{\Columns@print@before@pstart}
% \begin{macro}{\Columns@print@after@pend}
-% The \cs{Columns@print@before@pstart} and \cs{Columns@print@after@pend} print the content of the optional argument of \cs{pstart} / \cs{pend}. If this content is not empty, it also print the separator.
+% The \protect\cs{Columns@print@before@pstart} and \protect\cs{Columns@print@after@pend} print the content of the optional argument of \protect\cs{pstart} / \protect\cs{pend}. If this content is not empty, it also print the separator.
% \begin{macrocode}
\newcommand{\Columns@print@before@pstart}{%
\ifboolexpr{%
@@ -4778,17 +4836,17 @@
% \end{macro}
% \subsection{Main macro}
% \begin{macro}{\Pages}
-% \changes{v1.8.0}{2014/07/28}{Modify \cs{Pages} to enable to add section's title.}
-% \changes{v1.8.3}{2014/08/31}{Debug blank pages when using optional argument in the last \cs{pend}.}
-% \changes{v1.10.0}{2015/01/12}{Debug wrong pages splitting when no optional argument is used in last \cs{pend} (bug was added in v.1.8.3).}
-% \changes{v1.10.0}{2015/01/12}{Debug wrong parallel pages synchronization when an \cs{edtext} falls across two pages.}
-% \changes{v1.13.0}{2015/03/06}{When using shiftedpstarts option, a \cs{l@dleftbox} with a null height will advance the \cs{pagetotal} in any case.}
-% \changes{v1.13.1}{2015/03/12}{Prevent false empty page after \cs{Pages} (bug added in 1.13.0)}
-% The \cs{Pages} command results in the previous Left and
+% \changes{v1.8.0}{2014/07/28}{Modify \protect\cs{Pages} to enable to add section's title.}
+% \changes{v1.8.3}{2014/08/31}{Debug blank pages when using optional argument in the last \protect\cs{pend}.}
+% \changes{v1.10.0}{2015/01/12}{Debug wrong pages splitting when no optional argument is used in last \protect\cs{pend} (bug was added in v.1.8.3).}
+% \changes{v1.10.0}{2015/01/12}{Debug wrong parallel pages synchronization when an \protect\cs{edtext} falls across two pages.}
+% \changes{v1.13.0}{2015/03/06}{When using shiftedpstarts option, a \protect\cs{l@dleftbox} with a null height will advance the \protect\cs{pagetotal} in any case.}
+% \changes{v1.13.1}{2015/03/12}{Prevent false empty page after \protect\cs{Pages} (bug added in 1.13.0)}
+% The \protect\cs{Pages} command results in the previous Left and
% Right texts being typeset on matching facing pages. There should
% be equal numbers of chunks in the left and right texts.
%
-% \changes{v1.12.0}{2015/02/23}{Add \cs{l@dprintingpagestrue}}
+% \changes{v1.12.0}{2015/02/23}{Add \protect\cs{l@dprintingpagestrue}}
% \begin{macrocode}
\newcommand*{\Pages}{%
\ifl@dpairing%
@@ -4802,8 +4860,8 @@
\led@err@BadLeftRightPstarts{\the\l@dnumpstartsL}{\the\l@dnumpstartsR}%
\fi%
% \end{macrocode}
-% \changes{v1.13.0}{2015/03/06xx}{Prevent false overfull hboxes when using \cs{Pages} outside of pages environment.}
-% As \cs{Pages} must be called outside of the pages environment, we have to redefine the \cs{Lcolwidth} and \cs{Rcolwidth} lengths, to prevent false overfull hboxes.
+% \changes{v1.13.0}{2015/03/06xx}{Prevent false overfull hboxes when using \protect\cs{Pages} outside of pages environment.}
+% As \protect\cs{Pages} must be called outside of the pages environment, we have to redefine the \protect\cs{Lcolwidth} and \protect\cs{Rcolwidth} lengths, to prevent false overfull hboxes.
% \begin{macrocode}
\setlength{\Lcolwidth}{\textwidth}%
\setlength{\Rcolwidth}{\textwidth}%
@@ -4834,14 +4892,14 @@
\loop\if@pstarts%
% \end{macrocode}
% Loop over the number of chunks, incrementing the chunk counts
-% (\cs{l@dpscL}
-% and \cs{l@dpscR} are chunk (box) counts.)
+% (\protect\cs{l@dpscL}
+% and \protect\cs{l@dpscR} are chunk (box) counts.)
% \begin{macrocode}
\global\advance\l@dpscL \@ne%
\global\advance\l@dpscR \@ne%
% \end{macrocode}
% Calculate the maximum number of real text lines in the chunk pair,
-% storing the result in the relevant \cs{l@dmaxlinesinpar}.
+% storing the result in the relevant \protect\cs{l@dmaxlinesinpar}.
% \begin{macrocode}
\getlinesfromparlistL%
\getlinesfromparlistR%
@@ -4856,15 +4914,15 @@
\global\l@dpscR=\z@%
% \end{macrocode}
% Get the number of lines on the first pair of pages and store
-% the minimum in \cs{l@dminpagelines}.
+% the minimum in \protect\cs{l@dminpagelines}.
% \begin{macrocode}
\getlinesfrompagelistL%
\getlinesfrompagelistR%
\l@dcalc@minoftwo{\@cs@linesonpageL}{\@cs@linesonpageR}%
{\l@dminpagelines}%
% \end{macrocode}
-% Now we start processing the left and right chunks (\cs{l@dpscL} and
-% \cs{l@dpscR} count the left and right chunks), starting with the first pair.
+% Now we start processing the left and right chunks (\protect\cs{l@dpscL} and
+% \protect\cs{l@dpscR} count the left and right chunks), starting with the first pair.
% \begin{macrocode}
\check@pstarts%
\if@pstarts%
@@ -4895,7 +4953,7 @@
% \end{macrocode}
% See if there is more that can be done for the left page and set up the
% left language.
-% \changes{v0.2.0}{2004/12/20}{Added \cs{l@duselanguage} to \cs{Pages}}
+% \changes{v0.2.0}{2004/12/20}{Added \protect\cs{l@duselanguage} to \protect\cs{Pages}}
% \begin{macrocode}
\checkpageL%
\l@duselanguage{\theledlanguageL}%
@@ -4903,7 +4961,7 @@
% \end{macrocode}
% Process the next (left) text line, adding it to the page.
% Eventually, adds the optional argument of pstart.
-% \changes{v0.3.0}{2005/02/10}{Added \cs{ledstrutL} to \cs{Pages}}
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{ledstrutL} to \protect\cs{Pages}}
% \begin{macrocode}
\ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}%
\csuse{before@pstartL@\the\l@dpscL}%
@@ -4914,24 +4972,25 @@
{}%
\advance\numpagelinesL \@ne%
% \end{macrocode}
-% When using shiftedpstarts option, a \cs{l@dleftbox} with a null height is not printed.
+% When using shiftedpstarts option, a \protect\cs{l@dleftbox} with a null height is not printed.
% That means we do not insert blank lines at the end of a left chunk lower than the corresponding right chunk.
-% However, a \cs{l@dleftbox} with a null height will advance the \cs{pagetotal} in any case.
-% Because if we do not do this, the \cs{checkpageL} could let \cs{ifl@pagefull} to false,
-% and consequently a \cs{@lopL} equal to 1000 could be written in the numbered file,
+% However, a \protect\cs{l@dleftbox} with a null height will advance the \protect\cs{pagetotal} in any case.
+% Because if we do not do this, the \protect\cs{checkpageL} could let \protect\cs{ifl@pagefull} to false,
+% and consequently a \protect\cs{@lopL} equal to 1000 could be written in the numbered file,
% even if all the lines actually needed for the current page have been printed.
% \l@dleftbox
% \begin{macrocode}
\ifshiftedpstarts%
- \ifdim\ht\l@dleftbox>0pt\hb@xt@%
- \hsize{\ledstrutL\unhbox\l@dleftbox}%
+ \ifdim\ht\l@dleftbox>0pt%
+ \parledgroup@correction@notespacing{L}%
+ \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
\else%
\dimen0=\pagetotal%
\advance\dimen0 by \baselineskip%
\global\pagetotal=\dimen0%
\fi%
\else%
- \parledgroup@correction@notespacing{L}
+ \parledgroup@correction@notespacing{L}%
\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
\fi%
% \end{macrocode}
@@ -4974,7 +5033,7 @@
\clearl@dleftpage }%
% \end{macrocode}
% Now do the same for the right text.
-% \changes{v0.3.0}{2005/02/10}{Added \cs{ledstrutR} to \cs{Pages}}
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{ledstrutR} to \protect\cs{Pages}}
% \begin{macrocode}
\checkpageR%
\l@duselanguage{\theledlanguageR}%
@@ -4989,8 +5048,9 @@
{}%
\advance\numpagelinesR \@ne%
\ifshiftedpstarts%
- \ifdim\ht\l@drightbox>0pt\hb@xt@%
- \hsize{\ledstrutR\unhbox\l@drightbox}%
+ \ifdim\ht\l@drightbox>0pt%
+ \parledgroup@correction@notespacing{R}%
+ \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
\else%
\dimen0=\pagetotal%
\advance\dimen0 by \baselineskip%
@@ -5025,7 +5085,7 @@
% \end{macrocode}
% More to do? If there is we have to get the number of lines for the next
% pair of pages before starting to output them.
-% \changes{v0.3.b}{2005/04/08}{Added \cs{l@dminpagelines} calculation
+% \changes{v0.3.b}{2005/04/08}{Added \protect\cs{l@dminpagelines} calculation
% for succeeding page pairs}
% \begin{macrocode}
\checkraw@text%
@@ -5065,7 +5125,7 @@
%
% \subsection{Ensure all notes be printed at the end of parallel pages}
% \begin{macro}{\finish@Pages@notes}
-% This macro ensures that all long notes are printed at the end of \cs{Pages} typesetting, and that there is no more long notes left for the next pages.
+% This macro ensures that all long notes are printed at the end of \protect\cs{Pages} typesetting, and that there is no more long notes left for the next pages.
% \begin{macrocode}
\newcommand{\finish@Pages@notes}{%
\def\do##1{%
@@ -5080,7 +5140,7 @@
\global\newnamebox{footins##1}
\fi
% \end{macrocode}
-% And now, add a \cs{newpage} if there is no more footnote to print.
+% And now, add a \protect\cs{newpage} if there is no more footnote to print.
% \begin{macrocode}
\ifvoid\csuse{##1footins}%
\ifvoid\csuse{footins##1}\else%
@@ -5100,7 +5160,7 @@
% \begin{macro}{\ledstrutL}
% \begin{macro}{\ledstrutR}
% Struts inserted into leftand right text lines.
-% \changes{v0.3.0}{2005/02/10}{Added \cs{ledtrutL} and \cs{ledstrutR}}
+% \changes{v0.3.0}{2005/02/10}{Added \protect\cs{ledtrutL} and \protect\cs{ledstrutR}}
% \begin{macrocode}
\newcommand*{\ledstrutL}{\strut}
\newcommand*{\ledstrutR}{\strut}
@@ -5113,35 +5173,42 @@
% \subsection{Page clearing}
% \begin{macro}{\cleartoevenpage}
% \begin{macro}{\cleartol@devenpage}
-% \cs{cleartoevenpage}, which is defined in the memoir class,
-% is like \cs{clear(double)page} except that we
+% \protect\cs{cleartoevenpage}, which is defined in the memoir class,
+% is like \protect\cs{clear(double)page} except that we
% end up on an even page.
-% \cs{cleartol@devenpage} is similar except that it first checks to see
+% \protect\cs{cleartol@devenpage} is similar except that it first checks to see
% if it is already on an empty page.
% \begin{macrocode}
\providecommand{\cleartoevenpage}[1][\@empty]{%
\clearpage
\ifodd\c@page\hbox{}#1\clearpage\fi}
+
\newcommand*{\cleartol@devenpage}{%
\ifdim\pagetotal<\topskip% on an empty page
\else
\clearpage
\fi
- \ifodd\c@page\hbox{}\clearpage\fi%
+ \ifodd\c@page%
+ \ifprevpgnotnumbered%
+ \addtocounter{par@page}{-1}%
+ \ifdef{\prevpgstyle}{\thispagestyle{\prevpgstyle}}{}%
+ \fi%
+ \hbox{}\clearpage%
+ \fi%
}%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\clearl@dleftpage}
% \begin{macro}{\clearl@drightpage}
-% \cs{clearl@dleftpage} and \cs{clearl@drightpage} get us onto
+% \protect\cs{clearl@dleftpage} and \protect\cs{clearl@drightpage} get us onto
% an odd and even page, respectively, checking that we end up on
% the subsquent page.
-% Both commands use \cs{newpage} and not \cs{clearpage}.
-% Because \cs{clearpage} prints all footnotes before the next page, even if it has to add new empty pages, while \cs{newpage} does not.
-% And as we want notes started in the left page continue in the right page and \emph{vice-versa}, we must use \cs{newpage} and not \cs{clearpage}
+% Both commands use \protect\cs{newpage} and not \protect\cs{clearpage}.
+% Because \protect\cs{clearpage} prints all footnotes before the next page, even if it has to add new empty pages, while \protect\cs{newpage} does not.
+% And as we want notes started in the left page continue in the right page and \emph{vice-versa}, we must use \protect\cs{newpage} and not \protect\cs{clearpage}
%
-% \changes{v1.13.0}{2015/03/06x}{Use \cs{newpage} instead of \cs{clearpage}.}
+% \changes{v1.13.0}{2015/03/06x}{Use \protect\cs{newpage} instead of \protect\cs{clearpage}.}
% \begin{macrocode}
\newcommand*{\clearl@dleftpage}{%
\ifdim\pagetotal=0pt\hbox{}\fi%
@@ -5170,10 +5237,10 @@
% \begin{macro}{\@cs@linesinparL}
% \begin{macro}{\getlinesfromparlistR}
% \begin{macro}{\@cs@linesinparR}
-% \cs{getlinesfromparlistL} gets the next entry from the
-% \cs{linesinpar@listL} and puts it into \cs{@cs@linesinparL}; if the
-% list is empty, it sets \cs{@cs@linesinparL} to 0. Similarly
-% for \cs{getlinesfromparlistR}.
+% \protect\cs{getlinesfromparlistL} gets the next entry from the
+% \protect\cs{linesinpar@listL} and puts it into \protect\cs{@cs@linesinparL}; if the
+% list is empty, it sets \protect\cs{@cs@linesinparL} to 0. Similarly
+% for \protect\cs{getlinesfromparlistR}.
% \begin{macrocode}
\newcommand*{\getlinesfromparlistL}{%
\ifx\linesinpar@listL\empty
@@ -5198,10 +5265,10 @@
% \begin{macro}{\@cs@linesonpageL}
% \begin{macro}{\getlinesfrompagelistR}
% \begin{macro}{\@cs@linesonpageR}
-% \cs{getlinesfrompagelistL} gets the next entry from the
-% \cs{linesonpage@listL} and puts it into \cs{@cs@linesonpageL}; if the
-% list is empty, it sets \cs{@cs@linesonpageL} to 1000. Similarly
-% for \cs{getlinesfrompagelistR}.
+% \protect\cs{getlinesfrompagelistL} gets the next entry from the
+% \protect\cs{linesonpage@listL} and puts it into \protect\cs{@cs@linesonpageL}; if the
+% list is empty, it sets \protect\cs{@cs@linesonpageL} to 1000. Similarly
+% for \protect\cs{getlinesfrompagelistR}.
% \begin{macrocode}
\newcommand*{\getlinesfrompagelistL}{%
\ifx\linesonpage@listL\empty
@@ -5225,7 +5292,7 @@
% \begin{macro}{\@writelinesonpageL}
% \begin{macro}{\@writelinesonpageR}
% These macros output the number of lines on a page to the section file
-% in the form of \cs{@lopL} or \cs{@lopR} macros.
+% in the form of \protect\cs{@lopL} or \protect\cs{@lopR} macros.
% \begin{macrocode}
\newcommand*{\@writelinesonpageL}[1]{%
\edef\next{\write\linenum@out{\string\@lopL{#1}}}%
@@ -5241,11 +5308,11 @@
%
% \begin{macro}{\l@dcalc@maxoftwo}
% \begin{macro}{\l@dcalc@minoftwo}
-% \cs{l@dcalc@maxoftwo}\marg{num}\marg{num}\marg{count} sets \meta{count}
+% \protect\cs{l@dcalc@maxoftwo}\marg{num}\marg{num}\marg{count} sets \meta{count}
% to the maximum of the two \meta{num}.
%
% Similarly
-% \cs{l@dcalc@minoftwo}\marg{num}\marg{num}\marg{count} sets \meta{count}
+% \protect\cs{l@dcalc@minoftwo}\marg{num}\marg{num}\marg{count} sets \meta{count}
% to the minimum of the two \meta{num}.
%
% \begin{macrocode}
@@ -5275,13 +5342,13 @@
% \begin{macro}{\l@dpagefullfalse}
% \begin{macro}{\checkpageL}
% \begin{macro}{\checkpageR}
-% \cs{checkpageL} tests if the space and lines already taken on the page by
+% \protect\cs{checkpageL} tests if the space and lines already taken on the page by
% text and footnotes is less than the constraints. If so, then
-% \cs{ifl@dpagefull} is set FALSE and \cs{ifl@dsamepage} is set TRUE.
+% \protect\cs{ifl@dpagefull} is set FALSE and \protect\cs{ifl@dsamepage} is set TRUE.
% If the page is spatially full
-% then \cs{ifl@dpagefull} is set TRUE and \cs{ifl@dsamepage} is set FALSE.
+% then \protect\cs{ifl@dpagefull} is set TRUE and \protect\cs{ifl@dsamepage} is set FALSE.
% If it is not spatially full but the maximum number of lines have been
-% output then both \cs{ifl@dpagefull} and \cs{ifl@dsamepage}
+% output then both \protect\cs{ifl@dpagefull} and \protect\cs{ifl@dsamepage}
% are set FALSE.
%
% \begin{macrocode}
@@ -5342,7 +5409,7 @@
% \end{macro}
% \begin{macro}{\checkpbL}
% \begin{macro}{\checkpbR}
-% \cs{checkpbL} and \cs{checkpbR} are called after each line is printed, and after the page is checked. These commands correct page breaks depending on \cs{ledpb} and \cs{lednopb}.
+% \protect\cs{checkpbL} and \protect\cs{checkpbR} are called after each line is printed, and after the page is checked. These commands correct page breaks depending on \protect\cs{ledpb} and \protect\cs{lednopb}.
% \begin{macrocode}
\newcommand{\checkpbL}{
\IfStrEq{\led@pb@setting}{after}{
@@ -5372,7 +5439,7 @@
% \end{macro}
% \begin{macro}{\checkverseL}
% \begin{macro}{\checkverseR}
-% \cs{checkverseL} and \cs{checkverseR} are called after each line is printed.
+% \protect\cs{checkverseL} and \protect\cs{checkverseR} are called after each line is printed.
% They prevent page break inside line of verse.
% \begin{macrocode}
\newcommand{\checkverseL}{
@@ -5404,9 +5471,9 @@
% \begin{macro}{\ledthegoal}
% \begin{macro}{\goalfraction}
% \begin{macro}{\check@goal}
-% \cs{ledthegoal} is the amount of space allowed to taken by text and
+% \protect\cs{ledthegoal} is the amount of space allowed to taken by text and
% footnotes on a page before a forced pagebreak. This can be controlled via
-% \cs{@goalfraction}. \cs{ledthegoal} is calculated via \cs{check@goal}.
+% \protect\cs{@goalfraction}. \protect\cs{ledthegoal} is calculated via \protect\cs{check@goal}.
% \begin{macrocode}
\newdimen\ledthegoal
\ifshiftedpstarts
@@ -5441,7 +5508,7 @@
% \subsection{Getting boxes content}
% \begin{macro}{\get@nextboxL}
% \begin{macro}{\get@nextboxR}
-% \changes{v0.11.0}{2012/06/11}{Change \cs{get@nextboxL} and \cs{get@nextboxR} to allow to disable line numbering (like in eledmac 0.15).}
+% \changes{v0.11.0}{2012/06/11}{Change \protect\cs{get@nextboxL} and \protect\cs{get@nextboxR} to allow to disable line numbering (like in eledmac 0.15).}
% If the current box is not empty (i.e., still contains some lines)
% nothing is done. Otherwise if and only if a synchronisation point is
% reached the next box is started.
@@ -5479,14 +5546,14 @@
% \end{macrocode}
% \changes{v0.11.0}{2012/06/11}{Pstart number can be printed in side}
% There are still unprocessed boxes. Recalculate the maximum number of
-% lines needed, and move onto the next box (by incrementing \cs{l@dpscL}). If needed, restart the line numbering.
+% lines needed, and move onto the next box (by incrementing \protect\cs{l@dpscL}). If needed, restart the line numbering.
% \begin{macrocode}
\writtenlinesLfalse
\ifbypstart@
\global\line@num=0%
\resetprevline@%
\fi
-% Add the content of the optional argument of the previous \cs{pend}.
+% Add the content of the optional argument of the previous \protect\cs{pend}.
% \begin{macrocode}
\csuse{after@pendL@\the\l@dpscL}%
\global\csundef{after@pendL@\the\l@dpscL}%
@@ -5557,54 +5624,87 @@
% \end{macro}
% \end{macro}
%
-% \subsection{Same page number in both side}
-% The \verb+sameparallelpagenumber+ allow to have the same page number for the left and the right side
-% We can not do it by changing the value of the \verb|page| counter, since its value is used by many \LaTeX's features to determine whether a page is left or right: left page are even, right page are odd.
-% Consequently, we have to do it by patching \cs{thepage}, in order to use the value of the \verb+sameparallelpage@number+ counter instead of value of \verb+page+ counter.
+% \section{Page numbering}
+% The \verb+sameparallelpagenumber+ option allows the same page number on both left and right side
+% The \verb+prevpgnotnumbered+ option allows an empty (not numbered) right-side page before \cs{Pages}.
+%
+%
+% We cannot implement these two options by changing the value of the \verb|page| counter, since its value is used by many \LaTeX features to determine whether a page is left (even-numbered) or right (odd-numbered).
+% Consequently, we have to do it by patching \cs{thepage}, in order to use the value of the \verb+par@page+ counter instead of value of \verb+page+ counter.
%
-% This counter will be increased in a patched version of the \LaTeX's \cs{@outputpage} macro, as is the \verb+page+ counter in this macro. However, \cs{sameparallelpage@number} will be increased only one page on two when processing \cs{Pages}.
+% This counter will be increased in a patched version of the \LaTeX's \protect\cs{@outputpage} macro, as is the \verb+page+ counter in this macro. However, this increase will take account of the options.
%
%
% \begin{macro}{\par@patch@thepage}
-
-% \cs{par@patch@thepage} patches \cs{thepage} in order to use the value of \verb+sameparallelpage@number+ counter and not the value of \verb+sameparallelpage@number+. It must be called after any redefinition of \cs{thepage}. That why we insert it at the end of the \LaTeX macro \cs{pagenumbering}, which is called by some \cs{xxxmatter} commands. We also call it at the begin of the document.
+% \begin{macro}{\par@patch@pagenumbering}
+% \cs{par@patch@thepage} patches \cs{thepage} in order to use the value of \verb+par@page+ counter and not the value of \verb+par@page+.
+% It must be called after any redefinition of \cs{thepage}.
+% That why we insert it at the end of the \LaTeX macro \cs{pagenumbering}, which is called by some \cs{xxxmatter} commands.
+% In the case of \ltxclass{memoir} class using, we insert it at the end of \cs{@mempnum}.
+% When using \cs{pagenumbering}, we also need to restart \verb+par@page+ counter. Consequently, we have wrapped \cs{par@patch@thepage} and counter restart in \cs{par@patch@pagenumbering}
+% We also call \cs{par@patch@thepage} it at the beginning of the document.
% \begin{macrocode}
+
\newcommand{\par@patch@thepage}{%
- \ifsameparallelpagenumber%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {%
\patchcmd{\thepage}%
- {page}{sameparallelpage@number}%
+ {page}{par@page}%
{}%
{\led@error@fail@patch@thepage}%
- \fi%
+ }{}%
}%
-\apptocmd{\pagenumbering}{%
+
+\newcommand{\par@patch@pagenumbering}{%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {%
+ \setcounter{par@page}{1}%
+ }%
+ {}%
\par@patch@thepage%
- }%
- {}%
- {\led@error@fail@patch@pagenumbering}%
+}%
-\AtBeginDocument{\par@patch@thepage}%
+\ifl@dmemoir%
+ \apptocmd{\@mempnum}%
+ {\par@patch@pagenumbering}%
+ {}%%
+ {\led@error@fail@patch@@mempnum}%
+\else%
+ \apptocmd{\pagenumbering}%
+ {\par@patch@pagenumbering}%
+ {}%
+ {\led@error@fail@patch@pagenumbering}%
+\fi%
+
+\AtBeginDocument{\par@patch@thepage}%
% \end{macrocode}
% \end{macro}
+% \end{macro}
% \begin{macro}{\@outputpage}
-% As its names said, \cs{@outputpage} is a \LaTeX's macro called in the output routine. That is this macro which increase the \verb+page+ counter.
-% We patch it in order to increase, conditionally, the \verb+sameparallelpage@number+ counter.
+% As its name says, \cs{@outputpage} is a \LaTeX's macro called in the output routine. It is this macro which increases the \verb+page+ counter..
+% We patch it in order to increase, conditionally, the \verb+par@page+ counter.
% \begin{macrocode}
\AtBeginDocument{%
\apptocmd{\@outputpage}{%
\ifsameparallelpagenumber%
\ifl@dprintingpages%
\ifodd\c@page\else%
- \stepcounter{sameparallelpage@number}%
+ \stepcounter{par@page}%
\fi%
\else%
- \stepcounter{sameparallelpage@number}%
+ \stepcounter{par@page}%
\fi%
\else%
- \stepcounter{sameparallelpage@number}%
+ \stepcounter{par@page}%
\fi%
}%
{}%
@@ -5613,18 +5713,18 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\thesameparallelpage@number}
-% And now, initialize \verb+sameparallelpage@number+ counter.
+% \begin{macro}{\thepar@page}
+% And now, initialize \verb+par@page+ counter.
% \begin{macrocode}
-\newcounter{sameparallelpage@number}%
-\setcounter{sameparallelpage@number}{1}%
+\newcounter{par@page}%
+\setcounter{par@page}{1}%
% \end{macrocode}
% \end{macro}
% \section{Sections' titles' commands}
% As switching from left to right pages does not clear the page since v1.13.0,
% but only creates new pages, no \verb+\vbox{}+ is inserted, and consequently parallel chapters are mis-aligned.
%
-% So we patch the \cs{chapter} command in order to prevent this problem.
+% So we patch the \protect\cs{chapter} command in order to prevent this problem.
% \begin{macro}{\chapter}
% \begin{macrocode}
\pretocmd{\chapter}{%
@@ -5637,27 +5737,27 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eledsectnotoc}
-% \cs{eledsectnotoc} just saves its content \cs{@eledsectnotoc}, which will be tested where sectioning commands will be printed.
+% \protect\cs{eledsectnotoc} just saves its content \protect\cs{@eledsectnotoc}, which will be tested where sectioning commands will be printed.
% \begin{macrocode}
\newcommand{\eledsectnotoc}[1]{\xdef\@eledsectnotoc{#1}}
\eledsectnotoc{R}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eledsectmark}
-% \cs{eledsectmark} just saves its content \cs{@eledsectmark}, which will be tested where sectioning commands will be printed.
+% \protect\cs{eledsectmark} just saves its content \protect\cs{@eledsectmark}, which will be tested where sectioning commands will be printed.
% \begin{macrocode}
\newcommand{\eledsectmark}[1]{\xdef\@eledsectmark{#1}}
\eledsectmark{L}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eledsection@correcting@skip}
-% Because the vertical correction needed after inserting a title in parallel depends whether we are in parallel columns or parallel pages, we stock its length in \cs{eledsection@correcting@skip}.
+% Because the vertical correction needed after inserting a title in parallel depends whether we are in parallel columns or parallel pages, we stock its length in \protect\cs{eledsection@correcting@skip}.
% \begin{macrocode}
\newskip\eledsection@correcting@skip
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eled@sectioningR@out}
-% We save the sectioning commands of the right side in the \cs{eled@sectioningR@out} file.
+% We save the sectioning commands of the right side in the \protect\cs{eled@sectioningR@out} file.
% \begin{macrocode}
\newwrite\eled@sectioningR@out
% \end{macrocode}
@@ -5666,8 +5766,8 @@
% We need to adapt the macro of the homonym section of eledmac to eledpar.
% \begin{macro}{\prev@pbR}
% \begin{macro}{\prev@nopbR}
-% The \cs{l@prev@pbR} macro is a \Lpack{etoolbox}'s list, which contains the lines in which page breaks occur (before or after).
-% The \cs{l@prev@nopbR} macro is a \Lpack{etoolbox} list, which contains the lines in which NO page breaks occur (before or after).
+% The \protect\cs{l@prev@pbR} macro is a \protect\package{etoolbox}'s list, which contains the lines in which page breaks occur (before or after).
+% The \protect\cs{l@prev@nopbR} macro is a \protect\package{etoolbox} list, which contains the lines in which NO page breaks occur (before or after).
% \begin{macrocode}
\def\l@prev@pbR{}
\def\l@prev@nopbR{}
@@ -5678,10 +5778,10 @@
% \begin{macro}{\ledpbnumR}
% \begin{macro}{\lednopbnum}
% \begin{macro}{\lednopbnumR}
-% The \cs{ledpbR} macro writes the call to \cs{led@pbR} in line-list file.
-% The \cs{ledpbnumR} macro writes the call to \cs{led@pbnumR} in line-list file.
-% The \cs{lednopbR} macro writes the call to \cs{led@nopbR} in line-list file.
-% The \cs{lednopbnumR} macro writes the call to \cs{led@nopbnumR} in line-list file.
+% The \protect\cs{ledpbR} macro writes the call to \protect\cs{led@pbR} in line-list file.
+% The \protect\cs{ledpbnumR} macro writes the call to \protect\cs{led@pbnumR} in line-list file.
+% The \protect\cs{lednopbR} macro writes the call to \protect\cs{led@nopbR} in line-list file.
+% The \protect\cs{lednopbnumR} macro writes the call to \protect\cs{led@nopbnumR} in line-list file.
% \begin{macrocode}
\newcommand{\ledpbR}{\write\linenum@outR{\string\led@pbR}}
\newcommand{\ledpbnumR}[1]{\write\linenum@outR{\string\led@pbnumR{#1}}}
@@ -5696,10 +5796,10 @@
% \begin{macro}{\led@pbnumR}
% \begin{macro}{\led@nopbR}
% \begin{macro}{\led@nopbnumR}
-% The \cs{led@pbR} add the absolute line number in the \cs{prev@pbR} list.
-% The \cs{led@pbnumR} add the argument in the \cs{prev@pbR} list.
-% The \cs{led@nopbR} add the absolute line number in the \cs{prev@nopbR} list.
-% The \cs{led@nopbnumR} add the argument in the \cs{prev@nopbR} list.
+% The \protect\cs{led@pbR} add the absolute line number in the \protect\cs{prev@pbR} list.
+% The \protect\cs{led@pbnumR} add the argument in the \protect\cs{prev@pbR} list.
+% The \protect\cs{led@nopbR} add the absolute line number in the \protect\cs{prev@nopbR} list.
+% The \protect\cs{led@nopbnumR} add the argument in the \protect\cs{prev@nopbR} list.
% \begin{macrocode}
\newcommand{\led@pbR}{\listxadd{\l@prev@pbR}{\the\absline@numR}}
\newcommand{\led@pbnumR}[1]{\listxadd{\l@prev@pbR}{#1}}
@@ -5714,9 +5814,9 @@
% \begin{macro}{\parledgroup@}
% \begin{macro}{\parledgroupseries@}
% \begin{macro}{\parledgrouptype@}
-% The marks \cs{parledgroup@} contains information about the beginnings and endings of notes in a parallel ledgroup.
-% \cs{parledgroup@series} contains the footnote series.
-% \cs{parledgroup@type} contains the type of the footnote: critical (Xfootnote) or familiar (footnoteX).
+% The marks \protect\cs{parledgroup@} contains information about the beginnings and endings of notes in a parallel ledgroup.
+% \protect\cs{parledgroup@series} contains the footnote series.
+% \protect\cs{parledgroup@type} contains the type of the footnote: critical (Xfootnote) or familiar (footnoteX).
% \begin{macrocode}
\newmarks\parledgroup@
\newmarks\parledgroup@series
@@ -5727,7 +5827,7 @@
% \end{macro}
% \begin{macro}{\parledgroup@notes@startL}
% \begin{macro}{\parledgroup@notes@startR}
-% \cs{parledgroup@notes@startL} and \cs{parledgroup@notes@startR} are used to mark the beginning of a note series in a parallel ledgroup.
+% \protect\cs{parledgroup@notes@startL} and \protect\cs{parledgroup@notes@startR} are used to mark the beginning of a note series in a parallel ledgroup.
% \begin{macrocode}
\newcommand{\parledgroup@notes@startL}{%
\ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}>0%
@@ -5750,7 +5850,7 @@
% \end{macro}
% \begin{macro}{\parledgroup@notes@startL}
% \begin{macro}{\parledgroup@notes@startR}
-% \cs{parledgroup@notes@endL} and \cs{parledgroup@notes@endR} are used to mark the end of a note series in a parallel ledgroup.
+% \protect\cs{parledgroup@notes@endL} and \protect\cs{parledgroup@notes@endR} are used to mark the end of a note series in a parallel ledgroup.
% \begin{macrocode}
\newcommand{\parledgroup@notes@endL}{%
\global\ledgroupnotesL@false%
@@ -5762,8 +5862,8 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\insert@noterule@ledgroup}
-% A \cs{vskip} is not used when the boxes are constructed. So we insert it before ledgroup note series when parallel lines are constructed.
-% This is the goal of \cs{insert@noterule@ledgroup}
+% A \protect\cs{vskip} is not used when the boxes are constructed. So we insert it before ledgroup note series when parallel lines are constructed.
+% This is the goal of \protect\cs{insert@noterule@ledgroup}
% \begin{macrocode}
\newcommand{\insert@noterule@ledgroup}[1]{
\IfStrEq{\splitbotmarks\parledgroup@}{begin}{%
@@ -5787,7 +5887,7 @@
% \end{macro}
%
% \begin{macro}{\@parledgroupnotespacing}
-% \cs{@parledgroupnotespacing} can be redefined by the user to change the interline spacing of ledgroup notes.
+% \protect\cs{@parledgroupnotespacing} can be redefined by the user to change the interline spacing of ledgroup notes.
% \begin{macrocode}
\newcommand{\setparledgroupnotespacing}[1]{\gdef\@parledgroupnotespacing{#1}}
\newcommand{\@parledgroupnotespacing}{}
@@ -5795,7 +5895,7 @@
% \end{macro}
% \begin{macro}{\parledgroup@notespacing@correction}
% \begin{macro}{\parledgroup@notespacing@set@correction}
-% \cs{parledgroup@notespacing@correction} is the difference between a normal line skip and a line skip in a note. It is set by \cs{parledgroup@notespacing@set@correction}, called at the beginning of \cs{Pages}.
+% \protect\cs{parledgroup@notespacing@correction} is the difference between a normal line skip and a line skip in a note. It is set by \protect\cs{parledgroup@notespacing@set@correction}, called at the beginning of \protect\cs{Pages}.
% \begin{macrocode}
\dimdef{\parledgroup@notespacing@correction}{0pt}
\newcommand{\parledgroup@notespacing@set@correction}{%
@@ -5807,7 +5907,7 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\parledgroup@correction@notespacing@init}
-% \cs{parledgroup@correction@notespacing@init} sets the value of accumulated corrections of note spacing to 0~pt.
+% \protect\cs{parledgroup@correction@notespacing@init} sets the value of accumulated corrections of note spacing to 0~pt.
% It is called at the beginning of each pages AND at the end of each ledgroup.
% \begin{macrocode}
\newcommand{\parledgroup@correction@notespacing@init}{
@@ -5818,7 +5918,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\parledgroup@correction@notespacing@final}
-% \cs{parledgroup@correction@notespacing@final} adds the total space deleted because of correction for notes, in a parallel ledgroup.
+% \protect\cs{parledgroup@correction@notespacing@final} adds the total space deleted because of correction for notes, in a parallel ledgroup.
% It also adds the space needed by the other side spaces between note rules and notes. It is called after the print of each pstart/pend.
% \begin{macrocode}
\newcommand{\parledgroup@correction@notespacing@final}[1]{
@@ -5843,12 +5943,12 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\parledgroup@correction@notespacing}
-% \cs{parledgroup@correction@notespacing} is used before each printed line.
-% If it is a line of notes in parallel ledgroup, the space \cs{parledgroup@notespacing@correction} is decreased, to make interline space correct.
-% The decreased space is added to \cs{parledgroup@notespacing@correction@accumulated} and \cs{parledgroup@notespacing@correction@modulo}.
-% If \cs{parledgroup@notespacing@correction@modulo} is equal or greater than \cs{baselineskip}:
+% \protect\cs{parledgroup@correction@notespacing} is used before each printed line.
+% If it is a line of notes in parallel ledgroup, the space \protect\cs{parledgroup@notespacing@correction} is decreased, to make interline space correct.
+% The decreased space is added to \protect\cs{parledgroup@notespacing@correction@accumulated} and \protect\cs{parledgroup@notespacing@correction@modulo}.
+% If \protect\cs{parledgroup@notespacing@correction@modulo} is equal or greater than \protect\cs{baselineskip}:
% \begin{itemize}
-% \item It is decreased by \cs{baselineskip}.
+% \item It is decreased by \protect\cs{baselineskip}.
% \item The total of line number in the current page is decreased by one.
% \end{itemize}
% For example, suppose an normal interline of 24~pt and interline for note of 12~pt.
@@ -5868,7 +5968,7 @@
% \end{macro}
% \begin{macro}{\parledgroup@beforenotesL}
% \begin{macro}{\parledgroup@beforenotesR}
-% \cs{parledgroup@beforenotesL} and \cs{parledgroup@beforenotesR} store the total of space before notes in the current parallel ledgroup.
+% \protect\cs{parledgroup@beforenotesL} and \protect\cs{parledgroup@beforenotesR} store the total of space before notes in the current parallel ledgroup.
% \begin{macrocode}
\dimdef\parledgroup@beforenotesL{0pt}
\dimdef\parledgroup@beforenotesR{0pt}
@@ -5876,7 +5976,7 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\parledgroup@beforenotes@save}
-% The macro \cs{parledgroup@beforenotes@save} dumps the space before notes of the current parallel ledgroup in a macro named with the current pstart number.
+% The macro \protect\cs{parledgroup@beforenotes@save} dumps the space before notes of the current parallel ledgroup in a macro named with the current pstart number.
% \begin{macrocode}
\newcommand{\parledgroup@beforenotes@save}[1]{
\ifparledgroup
@@ -5928,15 +6028,15 @@
%
% \bibitem[Wil02]{MEMOIR}
% Peter Wilson.
-% \newblock \emph{The \Lpack{memoir} class for configurable typesetting}.
+% \newblock \emph{The \protect\package{memoir} class for configurable typesetting}.
% \newblock November 2002.
% \newblock (Available from CTAN in
% \texttt{macros/latex/contrib/memoir})
%
% \bibitem[Wil04]{ELEDMAC}
% Peter Wilson and Maïeul Rouquette.
-% \newblock \emph{\Lpack{eledmac} A presumptuous attempt to port
-% \Lpack{EDMAC},\Lpack{TABMAC} and \Lpack{EDSTANZA} to
+% \newblock \emph{\protect\package{eledmac} A presumptuous attempt to port
+% \protect\package{EDMAC},\protect\package{TABMAC} and \protect\package{EDSTANZA} to
% LaTeX}.
% \newblock December 2004.
% \newblock (Available from CTAN in
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 8e879a1b9cf..15056105b40 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -40,7 +40,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/07/19 v2.0.0 typesset critical edition]%
+\ProvidesPackage{reledmac}[2015/07/27 v2.0.1 typesset critical edition]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -1474,6 +1474,7 @@
{\p@pstart\thepstart}
\fi%
\l@dzeropenalties%
+ \ignorespaces%because not automatically ignored if an optional argument is used (classical TeX behavior for space after commands)
}
\newcommandx*{\pend}[1][1]{\ifnumbering \else%
\led@err@PendNotNumbered%
@@ -6235,12 +6236,12 @@
\unless\ifnofamiliar@
\let\notesXwidthliketwocolumns\noteswidthliketwocolumnsX
\fi
- \newcommandx[2][1,usedefault]{\parafootsep}{%
+ \newcommandx{\parafootsep}[2][1,usedefault]{%
\Xparafootsep[#1]{#2}%
\parafootsepX[#1]{#2}
}%
- \newcommandx[2][1,usedefault]{\afternote}{%
+ \newcommandx{\afternote}[2][1,usedefault]{%
\Xafternote[#1]{#2}%
\afternoteX[#1]{#2}%
}%
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index c117a68534c..48b3141179c 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -28,16 +28,20 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2015/07/19 v2.0.0 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2015/07/27 v2.1.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
+\RequirePackage{xkeyval}
\newif\ifshiftedpstarts
-\DeclareOption{shiftedpstarts}{\shiftedpstartstrue}
-\DeclareOption{parledgroup}{\parledgrouptrue}
-\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}%
-\newif\ifsameparallelpagenumber%
-\DeclareOption{sameparallelpagenumber}{\sameparallelpagenumbertrue}%
-\ProcessOptions%
+\DeclareOptionX{shiftedpstarts}{\shiftedpstartstrue}
+\DeclareOptionX{parledgroup}{\parledgrouptrue}
+\DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}%
+\newif\ifsameparallelpagenumber
+\newif\ifprevpgnotnumbered
+\DeclareOptionX{sameparallelpagenumber}{\sameparallelpagenumbertrue}
+\DeclareOptionX{prevpgnotnumbered}{\prevpgnotnumberedtrue}
+\DeclareOptionX{prevpgstyle}{\gdef\prevpgstyle{#1}}%
+\ProcessOptionsX%
\newdimen\Lcolwidth
\Lcolwidth=0.45\textwidth
\newdimen\Rcolwidth
@@ -67,6 +71,9 @@
\newcommand{\led@error@fail@patch@pagenumbering}{%
\reledpar@error{Fail to patch \string\pagenumbering\space command.}{\@ehc}%
}%
+\newcommand{\led@error@fail@patch@@mempnum}{%
+ \reledpar@error{Fail to patch \string\@mempnum\space command.}{\@ehc}%
+}%
\newcommand{\led@error@fail@patch@@outputpage}{%
\reledpar@error{Fail to patch \string\@outputpage\space command.}{\@ehc}%
}%
@@ -659,6 +666,7 @@
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}}%
{\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}%
\at@every@pstart@call%
+ \ignorespaces%
}
\newcommandx*{\pstartR}[1][1]{%
\if@nobreak%
@@ -708,6 +716,7 @@
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}}%
{\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}%
\at@every@pstart@call%
+ \ignorespaces%
}
\newcommandx*{\pendL}[1][1]{%
\ifnumbering \else%
@@ -936,10 +945,10 @@
\@eled@sectioningfalse%
\global\csundef{eled@sectioning@\the\l@dpscR R}%
\if@RTL%
- \hspace{-\paperwidth}%
+ \hspace{-3\paperwidth}%
{\hbox{\l@dunhbox@line{\one@lineR}} \new@lineR}%
\else%
- \hspace{\paperwidth}%
+ \hspace{3\paperwidth}%
{\new@lineR \hbox{\l@dunhbox@line{\one@lineR}}}%
\fi%
\vskip\eledsection@correcting@skip
@@ -1959,15 +1968,16 @@
{}%
\advance\numpagelinesL \@ne%
\ifshiftedpstarts%
- \ifdim\ht\l@dleftbox>0pt\hb@xt@%
- \hsize{\ledstrutL\unhbox\l@dleftbox}%
+ \ifdim\ht\l@dleftbox>0pt%
+ \parledgroup@correction@notespacing{L}%
+ \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
\else%
\dimen0=\pagetotal%
\advance\dimen0 by \baselineskip%
\global\pagetotal=\dimen0%
\fi%
\else%
- \parledgroup@correction@notespacing{L}
+ \parledgroup@correction@notespacing{L}%
\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
\fi%
\get@nextboxL%
@@ -2001,8 +2011,9 @@
{}%
\advance\numpagelinesR \@ne%
\ifshiftedpstarts%
- \ifdim\ht\l@drightbox>0pt\hb@xt@%
- \hsize{\ledstrutR\unhbox\l@drightbox}%
+ \ifdim\ht\l@drightbox>0pt%
+ \parledgroup@correction@notespacing{R}%
+ \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
\else%
\dimen0=\pagetotal%
\advance\dimen0 by \baselineskip%
@@ -2078,12 +2089,19 @@
\providecommand{\cleartoevenpage}[1][\@empty]{%
\clearpage
\ifodd\c@page\hbox{}#1\clearpage\fi}
+
\newcommand*{\cleartol@devenpage}{%
\ifdim\pagetotal<\topskip% on an empty page
\else
\clearpage
\fi
- \ifodd\c@page\hbox{}\clearpage\fi%
+ \ifodd\c@page%
+ \ifprevpgnotnumbered%
+ \addtocounter{par@page}{-1}%
+ \ifdef{\prevpgstyle}{\thispagestyle{\prevpgstyle}}{}%
+ \fi%
+ \hbox{}\clearpage%
+ \fi%
}%
\newcommand*{\clearl@dleftpage}{%
\ifdim\pagetotal=0pt\hbox{}\fi%
@@ -2329,40 +2347,63 @@
\newcommand{\par@patch@thepage}{%
- \ifsameparallelpagenumber%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {%
\patchcmd{\thepage}%
- {page}{sameparallelpage@number}%
+ {page}{par@page}%
{}%
{\led@error@fail@patch@thepage}%
- \fi%
+ }{}%
}%
-\apptocmd{\pagenumbering}{%
+
+\newcommand{\par@patch@pagenumbering}{%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {%
+ \setcounter{par@page}{1}%
+ }%
+ {}%
\par@patch@thepage%
- }%
- {}%
- {\led@error@fail@patch@pagenumbering}%
+}%
-\AtBeginDocument{\par@patch@thepage}%
+\ifl@dmemoir%
+ \apptocmd{\@mempnum}%
+ {\par@patch@pagenumbering}%
+ {}%%
+ {\led@error@fail@patch@@mempnum}%
+
+\else%
+ \apptocmd{\pagenumbering}%
+ {\par@patch@pagenumbering}%
+ {}%
+ {\led@error@fail@patch@pagenumbering}%
+\fi%
+\AtBeginDocument{\par@patch@thepage}%
\AtBeginDocument{%
\apptocmd{\@outputpage}{%
\ifsameparallelpagenumber%
\ifl@dprintingpages%
\ifodd\c@page\else%
- \stepcounter{sameparallelpage@number}%
+ \stepcounter{par@page}%
\fi%
\else%
- \stepcounter{sameparallelpage@number}%
+ \stepcounter{par@page}%
\fi%
\else%
- \stepcounter{sameparallelpage@number}%
+ \stepcounter{par@page}%
\fi%
}%
{}%
{\led@error@fail@patch@@outputpage}%
}
-\newcounter{sameparallelpage@number}%
-\setcounter{sameparallelpage@number}{1}%
+\newcounter{par@page}%
+\setcounter{par@page}{1}%
\pretocmd{\chapter}{%
\ifl@dprintingpages%
\vbox{}%