diff options
38 files changed, 4455 insertions, 1003 deletions
diff --git a/Master/texmf-dist/doc/latex/eledmac/Makefile b/Master/texmf-dist/doc/latex/eledmac/Makefile index 4f28f1e0134..9081baf5dd8 100644 --- a/Master/texmf-dist/doc/latex/eledmac/Makefile +++ b/Master/texmf-dist/doc/latex/eledmac/Makefile @@ -3,7 +3,8 @@ PACKAGE = *.dtx \ eledmac.pdf \ eledpar.pdf \ README \ - Makefile + Makefile \ + latexmkrc \ @@ -14,6 +15,8 @@ all: eledmac.sty eledmac.pdf eledpar.sty eledpar.pdf dist doc: *.pdf +README: README.md + pandoc README.md -o README %.sty: %.ins %.dtx rm -f $*.sty $*tex @@ -27,14 +30,22 @@ doc: *.pdf @pdflatex $*.dtx -dist: $(PACKAGE) +dist: $(PACKAGE) examples rm -rf eledmac mkdir eledmac + mkdir eledmac/examples + $(MAKE) -C examples clean + $(MAKE) -C examples all + cp examples/*pdf eledmac/examples + cp examples/*tex eledmac/examples + cp examples/makefile eledmac/examples + cp $(PACKAGE) eledmac @$(RM) ../eledmac.zip zip -r ../eledmac.zip eledmac clean: + $(MAKE) -C examples clean @$(RM) *.aux *.log *.out *.toc *tex *.pdf eledmac.sty eledpar.sty *ind *ilg *lof *idx *glo *gls ../eledmac.zip diff --git a/Master/texmf-dist/doc/latex/eledmac/README b/Master/texmf-dist/doc/latex/eledmac/README index 0b2537830d2..6d548bdad29 100644 --- a/Master/texmf-dist/doc/latex/eledmac/README +++ b/Master/texmf-dist/doc/latex/eledmac/README @@ -1,72 +1,114 @@ - The eledmac package is for typesetting critical editions. It is a -LaTeX port, and extension, of the plain TeX EDMAC, TABMAC and EDSTANZA -macros. The eledpar package is an extension of eledmac enabling parallel -typesetting in columns or on facing pages. +Overview +======== + +The eledmac package is for typesetting critical editions. It is a LaTeX +port, and extension, of the plain TeX EDMAC, TABMAC and EDSTANZA macros. +The eledpar package is an extension of eledmac enabling parallel +typesetting in columns or on facing pages. Eledmac and eledpar are successors of ledmac and ledpar. - Bug reports and suggestions are welcome. - -This version of the package is stored in github https://github.com/maieul/ledmac - -Please use ledmac "issues" https://github.com/maieul/ledmac/issues - -URL in the CTAN : http://www.ctan.org/pkg/eledmac - -Users list : https://lists.berlios.de/pipermail/ledmac-users/ --------------------------------------------------------------------- - Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net, Maïeul Rouquette (new maintainer since june 2011) - Copyright 2003 --- 2005 Peter R. Wilson - Copyright 2011 --- .. Maïeul Rouquette - - This work may be distributed and/or modified under the - conditions of the LaTeX Project Public License, either - version 1.3 of this license or (at your option) any - later version. - The latest version of the license is in - http://www.latex-project.org/lppl.txt - and version 1.3 or later is part of all distributions of - LaTeX version 2003/06/01 or later. - - This work has the LPPL maintenance status "maintained". - - This work consists of the files: - README (this file), - eledmac.dtx, - eledmac.ins, - eledmac.pdf (200+ pages) - eledpar.dtx, - eledpar.ins, - eledpar.pdf (100+ pages) -and the derived files - eledmac.sty, - eledpar.sty, - --------------------------------------------------------------------- - - The distribution consists of the following files: -README (this file) -eledmac.dtx -eledmac.ins -eledmac.pdf -eledpar.dtx -eledpar.ins -eledpar.pdf -makefile - - - To install the eledmac package: -o run: latex eledmac.ins (which will generate eledmac.sty) -o Move ledmac.sty (and ledpatch.sty if it exists) to a location where - LaTeX will find it (for more information on this see the FAQ). - - To generate a second copy of the manual (which is already supplied as a PDF file): -o run: make eledmac.pdf - - Installation of the other packages (via eledpar.ins) -is similar. - -2012/08/14 -Maïeul Rouquette -maieul at maieul dot net +The package is available on [CTAN](http://www.ctan.org/pkg/eledmac). \# +Copyright and Licence \#\# Authors - Peter Wilson (Herries Press) +herries dot press at earthlink dot net, - Maïeul Rouquette (new +maintainer since june 2011) + +Copyright +--------- + +- Copyright 2003 --- 2005 Peter R. Wilson +- Copyright 2011 --- .. Maïeul Rouquette + +Licence +------- + +This work may be distributed and/or modified under the conditions of the +LaTeX Project Public License, either version 1.3 of this license or (at +your option) any later version. + +The latest version of the license is in +<http://www.latex-project.org/lppl.txt> and version 1.3 or later is part +of all distributions of LaTeX version 2003/06/01 or later. + +This work has the LPPL maintenance status "maintained". + +This work consists of the files: + +- README (this file), +- eledmac.dtx, +- eledmac.ins, +- eledpar.dtx, +- eledpar.ins, + +and the derived files: + +- eledmac.sty, +- eledpar.sty, +- eledmac.pdf, (200+ pages) +- eledpar.pdf, (100+ pages) + +The distribution consists of the following files: + +- README (this file) +- eledmac.dtx +- eledmac.ins +- eledmac.pdf +- eledpar.dtx +- eledpar.ins +- eledpar.pdf +- makefile +- latexmrc +- examples/ + - \*.tex + - \*.pdf + - makefile + +Installation +============ + +- run: `latex eledmac.ins` (which will generate eledmac.sty) and + `latex eledpar.ins` (which will generate eledmac.sty) +- move eledmac.sty and eledpar.sty to a location where LaTeX will find + it (for more information on this see the FAQ). + +To generate a second copy of the manual (which is already supplied as a +PDF file): + +- run: `make eledmac.pdf` + +Help +==== + +- [Users list](https://lists.berlios.de/pipermail/ledmac-users/) +- [StackExchange](https://tex.stackexchange.com/questions/tagged/eledmac), + see also the [older + tag](https://tex.stackexchange.com/questions/tagged/eledmac) + + Debug +====== + +Suggestions and bug reports are welcome. + +Maïeul Rouquette is the only one maintainer. To help him in his work, +please follow these rules: + +- Go to the [issues page](https://github.com/maieul/ledmac/issues); +- Open *one issue by problem*, even if problems are similar. +- Add a [minimal working + example](http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl). +- If your report is really a bug, Maïeul Rouquette will open a + "branch" to solve your problem. This branch will be called + "issueXXX", where "XXX" is the issue number. +- Once the problem has a possible solution, Maïeul Rouquette will send + you a zip file and ask you to test it: + - Download the zip file of the branch (or, if you know Git, go to + the branch there): + - Go to [the project page](https://github.com/maieul/ledmac/). + - Choose the correct branch in the "branch" menu. + - Click on the cloud, in the right side. + + - Run the `.ins` files with pdflatex, to obtain the `.sty` files. + - Put the `.sty` files with your test files (in the same folder). + - Make your report. + diff --git a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf Binary files differindex e2fe2e7ac58..7c287898c11 100644 --- a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf +++ b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf Binary files differindex 4051acf929c..a306fc33d24 100644 --- a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf +++ b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf Binary files differnew file mode 100644 index 00000000000..acde45f4cc0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.tex b/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.tex new file mode 100644 index 00000000000..1154556631a --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/columns-alignment.tex @@ -0,0 +1,131 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage[showframe]{geometry} +\usepackage{libertineotf} +\setmainlanguage{english} + +\usepackage{eledmac,eledpar} + +\linenummargin{left} +\setlength{\Lcolwidth}{.44\textwidth} +\setlength{\Rcolwidth}{.44\textwidth} +\setlength{\columnrulewidth}{0.4pt} + +\begin{document} + + +\title{\texttt{\textbackslash Columns} alignment} +\date{} +\maketitle +\begin{abstract} +This file provide example of setting the alignment of \verb+\Columns+ on the page: right (default), left or center. + +The column are 0.44\verb+\textwidth+, and we use \verb+\columnsposition+. + +We also provide a last example, showing how we can manipulate space between colons, by redefining \verb+\beforecolumnseparator+ and \verb+\aftercolumnseparator+. +\end{abstract} + + +\section{Right (default)} + +\columnsposition{R} +\begin{pairs} + +\begin{Leftside} +\beginnumbering +\pstart +Left side left side left side left side left side left side left side left side left side left side +\pend +\endnumbering +\end{Leftside} + +\begin{Rightside} +\beginnumbering +\pstart +Right side right side right side right side right side right side right side right side right side right side +\pend +\endnumbering +\end{Rightside} + +\Columns +\end{pairs} + +\section{Left} +\columnsposition{L} + +\begin{pairs} + +\begin{Leftside} +\beginnumbering +\pstart +Left side left side left side left side left side left side left side left side left side left side +\pend +\endnumbering +\end{Leftside} + +\begin{Rightside} +\beginnumbering +\pstart +Right side right side right side right side right side right side right side right side right side right side +\pend +\endnumbering +\end{Rightside} + +\Columns +\end{pairs} + +\section{Center} + +\columnsposition{C} +\begin{pairs} + +\begin{Leftside} +\beginnumbering +\pstart +Left side left side left side left side left side left side left side left side left side left side +\pend +\endnumbering +\end{Leftside} + +\begin{Rightside} +\beginnumbering +\pstart +Right side right side right side right side right side right side right side right side right side right side +\pend +\endnumbering +\end{Rightside} + +\Columns +\end{pairs} + +\section{Center, setting space between columns} + +Now, we set the spaces between columns, to have all the line occupied. + +\setlength{\beforecolumnseparator}{0.06\textwidth} +\setlength{\aftercolumnseparator}{0.06\textwidth} + +\vspace{\baselineskip} + +\begin{pairs} + +\begin{Leftside} +\beginnumbering +\pstart +Left side left side left side left side left side left side left side left side left side left side +\pend +\endnumbering +\end{Leftside} + +\begin{Rightside} +\beginnumbering +\pstart +Right side right side right side right side right side right side right side right side right side right side +\pend +\endnumbering +\end{Rightside} + +\Columns +\end{pairs} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf Binary files differnew file mode 100644 index 00000000000..9d2a75bf918 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex new file mode 100644 index 00000000000..dd83a43adc1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/cross-referencing.tex @@ -0,0 +1,30 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{latin} +\setotherlanguage{english} +\usepackage{eledmac,hyperref} + + + +\begin{document} + +\begin{english} +\title{Cross-referencing with eledmac} +\date{} +\maketitle +\begin{abstract} +This files provides a MWE of cross-referencing with eledmac, referencing to line number. +The \verb+\edlabel+, \verb+\edpageref+ and \verb+\lineref+ commands are used. + +See p.~\edpageref{ultrices} l.~\lineref{ultrices}. +\end{abstract} +\end{english} + +\beginnumbering + +\pstart +Pellentesque non orci dui. Donec a libero eu nisl sollicitudin lobortis eget nec lacus. Nulla pellentesque, neque ut tincidunt vestibulum, ante mi varius purus, nec cursus neque orci ut orci. Donec bibendum ligula bibendum nisl aliquet auctor. Nam luctus lorem mauris, ac venenatis felis posuere non. Quisque ultricies ante magna, facilisis pellentesque nibh placerat at. Aliquam sit amet ante varius, vestibulum augue condimentum, scelerisque turpis. Proin at nibh vulputate, tincidunt tellus vel, vehicula libero. Praesent venenatis, turpis nec feugiat sodales, risus sapien tempus odio, at vehicula ipsum nisl a nisl. Nunc pretium elit tellus, \edlabel{ultrices}ultrices facilisis odio interdum non. Donec et condimentum quam, id ullamcorper nisl. +\pend + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf Binary files differnew file mode 100644 index 00000000000..fc9715e6e94 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/indexing.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/indexing.tex b/Master/texmf-dist/doc/latex/eledmac/examples/indexing.tex new file mode 100644 index 00000000000..44e6e01701b --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/indexing.tex @@ -0,0 +1,41 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{latin} +\setotherlanguage{english} +\usepackage[nonewpage]{imakeidx} + +\usepackage{eledmac,hyperref} +\makeindex +\makeindex[title=Index Nominum,name=name] +\begin{document} + +\begin{english} +\date{} +\title{Indexing with eledmac} +\maketitle + +\begin{abstract} + This file provides a MWE of indexing with eledmac, referencing to line number. + The \verb+\edindex+ command is used. The package imakeidx is used, to have multiple index. +\end{abstract} +\end{english} + +\beginnumbering +\pstart +Imperator\edindex[name]{Nero} purus, dictum a semper eu, \edindex{long-passage|(}fermentum a augue. Nam enim sapien, consequat sit amet fermentum et, convallis non orci. Aliquam erat volutpat. Sed laoreet vitae enim eget posuere. Integer auctor aliquet sagittis. Curabitur odio felis, tempus sit amet porttitor sed, mattis a sapien. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus posuere adipiscing erat, et porta augue semper nec. +\pend +\pstart +Phasellus pretium euismod urna ac congue. Integer interdum\edindex{long-passage|)} dapibus aliquet. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum placerat volutpat est, porta adipiscing lectus commodo vel. Vestibulum libero magna, vulputate eget tellus ornare, posuere lobortis velit. Suspendisse non diam at est auctor luctus in nec elit. Cras sed aliquam tellus. Suspendisse non odio sit amet nunc consequat malesuada. Curabitur eget lacus lectus. Vivamus elementum risus eget nisi venenatis, in volutpat elit placerat. Maecenas congue nunc id est luctus accumsan. Fusce id nisl enim. +\pend +\pstart +Pellentesque non orci dui. Donec a libero\edindex{libero|textbf} eu nisl sollicitudin lobortis eget nec lacus. Nulla pellentesque, neque ut tincidunt vestibulum, ante mi varius purus, nec cursus neque orci ut orci. Donec bibendum ligula bibendum nisl aliquet auctor. Nam luctus lorem mauris, ac venenatis felis posuere non. Quisque ultricies ante magna, facilisis pellentesque nibh placerat at. Aliquam sit amet ante varius, vestibulum augue condimentum, scelerisque turpis. Proin at nibh vulputate, tincidunt tellus vel, vehicula libero. Praesent venenatis, turpis nec feugiat sodales, risus sapien tempus odio, at vehicula ipsum nisl a nisl. Nunc pretium elit tellus, ultrices facilisis odio interdum non. Donec et condimentum quam, id ullamcorper nisl. +\pend +\endnumbering + +\newpage +\printindex + +\printindex[name] + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/makefile b/Master/texmf-dist/doc/latex/eledmac/examples/makefile new file mode 100644 index 00000000000..2957ca2313a --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/makefile @@ -0,0 +1,11 @@ +.SUFFIXES: .tex + +all: .tex.pdf + +.tex.pdf: + latexmk $< + + + +clean: + @$(RM) *pdf *toc *.1* *.2* *.3* *.eledsec* *.log *.fdb_latexmk *.aux *.end *.ilg *.ind *.idx *.out *.synctex.gz *.synctex.gz\(busy\)
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf Binary files differnew file mode 100644 index 00000000000..636a81bb0a0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.tex b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.tex new file mode 100644 index 00000000000..83c19f87715 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-parallels.tex @@ -0,0 +1,72 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{english} + + +\usepackage{eledmac,eledpar} + + +\begin{document} + +\date{} +\title{Parallel} +\maketitle + +\begin{abstract} +This file provides two minimal examples of typesetting parallel texts with eledmac plus eledpar. + +The first minimal example is parallel typesetting in columns, the second one is parallel typesetting in pages. +\end{abstract} + + +\begin{pairs} + \begin{Leftside} + \beginnumbering + \pstart + Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. + \pend + \pstart + Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. + \pend + \endnumbering + \end{Leftside} + \begin{Rightside} + \beginnumbering + \pstart + Right side paragraph. Right side paragraph. Right side paragraph. Right side paragraph. + \pend + \pstart + Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. + \pend + \endnumbering + \end{Rightside} +\Columns +\end{pairs} + + +\begin{pages} + \begin{Leftside} + \beginnumbering + \pstart + Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. Left side paragraph. + \pend + \pstart + Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. Other left side paragraph. + \pend + \endnumbering + \end{Leftside} + \begin{Rightside} + \beginnumbering + \pstart + Right side paragraph. Right side paragraph. Right side paragraph. Right side paragraph. + \pend + \pstart + Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. Other right side paragraph. + \pend + \endnumbering + \end{Rightside} +\Pages +\end{pages} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf Binary files differnew file mode 100644 index 00000000000..00849a277d4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.tex b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.tex new file mode 100644 index 00000000000..d034880184d --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/minimal-verses.tex @@ -0,0 +1,42 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{latin} +\setotherlanguage{english} + +\usepackage{eledmac} +\renewcommand{\hangingsymbol}{[\,} + + +\begin{document} +\begin{english} +\date{} +\title{Stanza} +\maketitle + +\begin{abstract} +This file provides an example of verse's typesetting with eledmac. + +The odd verses are not indented, the even are indented. When a verse is too long, the end is printed after a long indentation, and a left bracket is inserted (\verb+\hangingsymbol+). +Two levels of critical footnotes are used. +\end{abstract} +\end{english} + +\beginnumbering +\setcounter{stanzaindentsrepetition}{2} +\setstanzaindents{8,0,1} +\stanza +Lorem ipsum dolor sit amet, consectetur adipisicing elit,& +sed do eiusmod tempor incididunt ut labore et dolore& +magna aliqua. Ut enim ad minim veniam, quis nostrud& +exercitation ullamco laboris nisi& +\edtext{ut aliquip}{\Afootnote{ut aliliquip}} consequat ut aliquip consequat irure dolor in reprehenderit irure dolor in reprehenderit& +\edtext{Duis aute}{\Bfootnote{Some comments}} irure dolor in reprehenderit& +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat& +cupidatat non proident, sunt in culpa qui officia deserunt& +Duis aute irure dolor in reprehenderit& +in voluptate velit esse cillum dolore eu fugiat nulla& +pariatur. Excepteur sint occaecat\& +\endnumbering + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf Binary files differnew file mode 100644 index 00000000000..e8efbba53ef --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.tex b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.tex new file mode 100644 index 00000000000..d1080316848 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/parallel-column-two-languages.tex @@ -0,0 +1,75 @@ +\documentclass{book} +\usepackage[a4paper]{geometry} +\usepackage{fontspec} +\setmainfont[Ligatures=TeX]{Linux Libertine O} +\usepackage{xunicode} +\usepackage{polyglossia} + +\usepackage{eledmac} +\usepackage{eledpar} + +\linenumincrement*{1} +\firstlinenum*{1} +\setlength{\Lcolwidth}{0.48\textwidth} +\setlength{\Rcolwidth}{0.48\textwidth} + +\setmainlanguage{english} +\setotherlanguage{russian} +\setotherlanguage{hebrew} +\newfontfamily\hebrewfont[Script=Hebrew]{Linux Libertine O} +\newfontfamily\russianfont[Script=Cyrillic]{Linux Libertine O} + +\begin{document} + + +\title{Parallel columns in two different languages} + + + +{\let\newpage\relax\maketitle} +{\small +This file provides example of typesetting parallel columns in two different language, using eledpar and polyglossia. + +The main language is English. The left column is in Russian, the right column in Hebrew. +We have enlarged \verb+\Lcolwidth+ and \verb+\Rcolwidth+ to avoid problem with hyphenations. + +We also used \verb+\eledchapter+, which implies that chapters' titles are printed with line numbering beside. +} + + + +\begin{pairs} + +\begin{Rightside} +\begin{RTL} +\begin{hebrew} +\beginnumbering +\pstart +\eledchapter{המאמר השני}\ledleftnote{s} +\pend +\pstart +בפנות התוריות, ר״ל שהם יסודות ועמודים אשר בית אלהים נכון עליהם, ובמציאותם יציר מציאות התורה מסדרת ממנו יתברך, ואלו יציר העדר אחת מהם תפל התורה בכללה חלילה. +\pend +\endnumbering +\end{hebrew} +\end{RTL} +\end{Rightside} + + + + +\begin{Leftside} +\begin{russian} +\beginnumbering +\pstart +\eledchapter{Трактат Второй} +\pend +\pstart +О краеугольных [принципах] Торы, имеется ввиду, которые [есть] основы и столпы на которых дом Б-жий опирается/нахон, и с существованием их может быть представлено существование Торы упорядоченной от Него, благословенного, и если бы было представлено отсутствие одного из них — упадет Тора в общем, [Б-же] упаси. +\pend +\endnumbering +\end{russian} +\end{Leftside} +\Columns +\end{pairs} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf Binary files differnew file mode 100644 index 00000000000..94e1099d6f4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.tex b/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.tex new file mode 100644 index 00000000000..25b59ee77c0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-not-in-line-numbering.tex @@ -0,0 +1,54 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{latin} +\setotherlanguage{english} + +\usepackage{eledmac} +\begin{document} + +\begin{english} +\date{} +\title{Sectioning with eledmac (not numbered)} +\maketitle +\begin{abstract} +This file provides examples of use of sectioning commands with eledmac. +The sections are outside of the numbered text. + +The optional argument of \verb+\pstart+ is used. The optional argument of \verb+\pend+ is also used. +\end{abstract} +\end{english} + +\beginnumbering +\pstart[\section{Section title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +Une note à la ligne 5 consequat ut aliquip consequat\pend[\vskip 2ex] +\pstart[\subsection{Subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend[] +\pstart[\subsection{Subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi + consequat ut aliquip consequat +\pend[\vskip\baselineskip\noindent\hfill⁂\hfill\hbox{}] +\pstart[\section{Section title}] +Irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend +\endnumbering + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf Binary files differnew file mode 100644 index 00000000000..18ae3a213b0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.tex b/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.tex new file mode 100644 index 00000000000..914694c29c9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-parallel-not-in-line-numbering.tex @@ -0,0 +1,246 @@ +\documentclass{article} +\usepackage{fontspec} +\usepackage{libertineotf} +\usepackage{polyglossia} +\setmainlanguage{latin} +\setotherlanguage{english} + +\usepackage{eledmac} +\usepackage{eledpar} + + +\begin{document} +\begin{english} +\date{} +\title{Titles in parallel, not in numbered line} +\maketitle +\begin{abstract} +This file provides example of section titles set in parallel. The titles are not in numbered line. Following the standard configuration of eledpar, only the left titles are add to the table of contents. + +We use the optional arguments of \verb+\pstart+. +\end{abstract} +\end{english} + +\tableofcontents + + +\begin{pages} + +\begin{Leftside} +\beginnumbering + +\pstart[\section{Left section title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Left subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Left subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat\pend + +\pstart[\section{Left section title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Left subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Left subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\section{Left section title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat\pend + +\pstart[\subsection{Left subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Left subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\section{Left section title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Left subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Left subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\endnumbering +\end{Leftside} + +\begin{Rightside} + +\beginnumbering +\pstart[\section{Right section title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Right subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Right subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\section{Right section title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Right subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Right subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\section{Right section title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Right subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Right subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\section{Right section title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\pstart[\subsection{Right subsection title}] +Lorem ipsum dolor sit amet, consectetur adipisicing elit +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi +ut aliquip consequat ut aliquip consequat +\pend + +\pstart[\subsection{Right subsection title}] +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat +cupidatat non proident, sunt in culpa qui officia deserunt +Duis aute irure dolor in reprehenderit +in voluptate velit esse cillum dolore eu fugiat nulla +pariatur. Excepteur sint occaecat. +\pend + +\endnumbering +\end{Rightside} + + +\Pages +\end{pages} +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf Binary files differnew file mode 100644 index 00000000000..2fa9e774d4f --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.tex b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.tex new file mode 100644 index 00000000000..5b2d9692621 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-columns.tex @@ -0,0 +1,225 @@ +\documentclass[oneside,12pt]{book} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{english} + +\usepackage{eledmac,eledpar} +\eledsectnotoc{L} +\eledsectmark{R} +\linenumincrement*{1} +\firstlinenum*{1} + +\begin{document} + +\title{Sectioning commands with critical notes in parallel colums} + + + +{\let\newpage\relax\maketitle} +{\small +This file provides examples of using sectioning commands with eledpar. The section titles are in the line numbering, and have critical notes. + +The left and right sides are put in columns. We use \verb+\eledsectnotoc{L}+ to say we want the right titles be added to the table of contents, and not the left titles. +We also use \verb+\eledsectmark{R}+ to use the right side to add \LaTeX\ marks for headers. + +We use the \verb+\eledxxx+ commands, each of them in their own \verb+\pstart…\pend+ group. + +Page clearings are manually added before chapter with \verb+\beforeeledchapter+. +} + + +\tableofcontents + +\beforeeledchapter + +\begin{pairs} +\begin{Leftside} +\beginnumbering +\pstart +\eledchapter{Left \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten.. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +\eledsubsection{Left \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Left \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + + +\endnumbering +\end{Leftside} + +\begin{Rightside} + +\beginnumbering +\pstart +\eledchapter{Right \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten.. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +\eledsubsection{Right \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Right \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\endnumbering + +\end{Rightside} +\Columns +\end{pairs} + +\beforeeledchapter + + +\begin{pairs} +\begin{Leftside} +\beginnumbering + +\pstart +\eledchapter{Left \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten.. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +\eledsubsection{Left \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Left \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\endnumbering +\end{Leftside} + +\begin{Rightside} + +\beginnumbering + +\pstart +\eledchapter{Right \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten.. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +\eledsubsection{Right \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Right \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\endnumbering + +\end{Rightside} +\Columns +\end{pairs} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf Binary files differnew file mode 100644 index 00000000000..bfbddbc6d6a --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.tex b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.tex new file mode 100644 index 00000000000..f40d599696f --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes-in-parallel-pages.tex @@ -0,0 +1,357 @@ +\documentclass[twoside,12pt]{book} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{english} + +\usepackage{eledmac,eledpar} +\linenumincrement*{1} +\firstlinenum*{1} +\begin{document} + +\title{Sectioning commands with critical notes in parallel pages} + + + +{\let\newpage\relax\maketitle} +{\small +This file provides examples for using the sectioning command with eledpar. The section titles are in the line numbering, and have critical notes. + +The left and right sides are put in parallel pages. Following the standard behavior of eledpar, only the left titles are put to the table of contents. + +We use the \verb+\eledxxx+ commands, each of them in their own \verb+\pstart…\pend+ group. + +Page breaks are manually added before chapter with \verb+\beforeeledchapter+. +} + + +\tableofcontents + +\beforeeledchapter + + +\begin{pages} +\begin{Leftside} +\beginnumbering +\pstart +\eledchapter{Left \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +\eledsubsection{Left \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Left \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +\eledsubsection{Left \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Left \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\endnumbering +\end{Leftside} + +\begin{Rightside} + +\beginnumbering +\pstart +\eledchapter{Right \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +\eledsubsection{Right \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Right \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +\eledsubsection{Right \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Right \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\endnumbering + +\end{Rightside} +\Pages +\end{pages} + +\begin{pages} +\begin{Leftside} +\beginnumbering +\pstart +\eledchapter{Left \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +\eledsubsection{Left \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Left \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +\eledsubsection{Left \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Left \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Left section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\endnumbering +\end{Leftside} + +\begin{Rightside} + +\beginnumbering +\pstart +\eledchapter{Right \edtext{chapter}{\Afootnote{chapitre}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +\eledsubsection{Right \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Right \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +\eledsubsection{Right \edtext{subsection}{\Afootnote{sous-section}}} +\pend + +\pstart +\eledsubsubsection{Right \edtext{subsubsection}{\Afootnote{sous-sous-section}}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{Right section} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\endnumbering + +\end{Rightside} +\Pages +\end{pages} + + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf Binary files differnew file mode 100644 index 00000000000..3d7a8d3c257 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.tex b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.tex new file mode 100644 index 00000000000..b3f4dfecbfd --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/sections-with-critical-notes.tex @@ -0,0 +1,104 @@ +\documentclass[twoside,12pt]{book} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{english} + +\usepackage{eledmac} +\linenumincrement{1} +\firstlinenum{1} +\begin{document} +\title{Sectioning commands with critical notes} + +\date{} + +{\let\newpage\relax\maketitle} +{\small +This file provides examples of using sectioning command with eledmac. The section titles are in the line numbering, and have critical and side notes. + +We use the \verb+\eledxxx+ commands, each of them in their own \verb+\pstart…\pend+ group. + +Page breaks are manually added before chapter with \verb+\beforeeledchapter+. +} +\beginnumbering +\beforeeledchapter +\pstart +\eledchapter{\edtext{chapter}{\Afootnote{chapitre}}\ledsidenote{chapter}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten.. +\pend + +\pstart +\eledsection{section\ledsidenote{section}} +\pend + +\pstart +\eledsubsection{\edtext{subsection}{\Afootnote{sous-section}}\ledsidenote{subsection}} +\pend + +\pstart +\eledsubsubsection{\edtext{subsubsection}{\Afootnote{sous-sous-section}}\ledsidenote{subsubsection}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{section\ledsidenote{section}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + + +\beforeeledchapter +\pstart +\eledchapter{\edtext{chapter}{\Afootnote{chapitre}}\ledsidenote{chapter}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten.. +\pend + +\pstart +\eledsection{section\ledsidenote{section}} +\pend + +\pstart +\eledsubsection{\edtext{subsection}{\Afootnote{sous-section}}\ledsidenote{subsection}} +\pend + +\pstart +\eledsubsubsection{\edtext{subsubsection}{\Afootnote{sous-sous-section}}\ledsidenote{subsubsection}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\pstart +\eledsection{section\ledsidenote{section}} +\pend + +\pstart +I use git to manage some packages. +I would like to add a pre-commit hook, to check if I have forgotten +For now, I have a minimal pre-commit, which tests only the blank spaces at ends of lines, but not the forgotten. +\pend + +\endnumbering + +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf Binary files differnew file mode 100644 index 00000000000..2eba98a3b13 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.tex b/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.tex new file mode 100644 index 00000000000..5614fa00b7b --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/side-notes.tex @@ -0,0 +1,41 @@ +\documentclass{article} +\usepackage{polyglossia,fontspec,xunicode} +\usepackage{libertineotf} +\setmainlanguage{latin} +\setotherlanguage{english} + +\usepackage{eledmac} +\sidenotemargin{outer} +\renewcommand{\ledlsnotefontsetup}{\small\it}% left +\renewcommand{\ledrsnotefontsetup}{\small\it}% right +\leftnoteupfalse +\rightnoteupfalse +\renewcommand{\sidenotesep}{ $|$ } + +\begin{document} + +\begin{english} +\title{Side notes} +\maketitle +\begin{abstract} +This file provides examples of side notes with eledmac. +We use : +\begin{itemize} + \item \verb+\ledleftnote+ (left notes); + \item \verb+\ledrightnote+ (right notes); + \item \verb+\ledsidenote+ (configurable notes). +\end{itemize} + +For the \verb+\ledsidenote+, we put them in the outer margin. +Notes are in small size, and italic. If there is more than one note by the line, they are separated$ | $. The notes start at the level of the line they are called, and continue after. +\end{abstract} +\end{english} + +\beginnumbering +\pstart +Lorem\ledrightnote{1-R}\ledleftnote{1-L} \ledsidenote{1-M}\ledsidenote{2-M}ipsum\ledrightnote{2-R} dolor\ledleftnote{2-L} sit amet, consectetur adipiscing elit. Fusce sed dolor libero. Aenean rutrum vestibulum lacus ut pretium. Fusce et auctor lectus. Ut et commodo quam, quis gravida orci. Nullam at risus elementum, suscipit enim a, pellentesque mi. Morbi commodo, ligula vel consectetur accumsan, massa metus egestas velit, eu fringilla leo ante in turpis. Vivamus ut tellus sollicitudin, facilisis ipsum sit amet, tincidunt odio. Maecenas tincidunt dolor sed ante blandit tincidunt. Etiam vulputate ultricies facilisis. +\pend +\endnumbering + + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf Binary files differnew file mode 100644 index 00000000000..d9bf0b6fa86 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.tex b/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.tex new file mode 100644 index 00000000000..43ed8bd4955 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/spaces-around-footnote-rule.tex @@ -0,0 +1,70 @@ +\documentclass{article} +\usepackage{fontspec} +\usepackage{libertineotf} +\usepackage{polyglossia} +\setmainlanguage{latin} +\setotherlanguage{english} +\usepackage{SIunits} + +\usepackage{eledmac} + +% THE APPARATI ARE PARAGRAPHED +\footparagraph{A} +\footparagraph{B} +\footparagraph{C} + +%VERTICAL SPACES BEFORE APPARATUS +\preXnotes{0.5cm} + +% VERTICAL SPACE BEFORE RULES +\newlength{\before} % A length which will contains the space before the rule +\setlength{\before}{3mm} % The space we want to have +\addtolength{\before}{3pt} % A compensation for the space decreased by \footnoterule +\beforeXnotes{\before} % And so, we configure eledmac. + +% VERTICAL SPACE AFTER RULES +\newlength{\after} % A length which will contains the space before the rule +\setlength{\after}{3mm} % The space we want to have +\addtolength{\after}{-2.6pt} % A compensation for the space added by \footnoterule +\afterXrule{\after} % And so, we configure eledmac. + +\begin{document} + +\begin{english} +\title{Setting spaces around footnote rules} +\maketitle +\begin{abstract} +This file sets spaces around footnote rules, to have a uniform \unit{3}{\milli\meter} before and after. There are three levels of paragraphed notes. Before the first series of notes, we have \unit{0.5}{\centi\meter}. + +We use \verb+\beforeXnotes+ and \verb+\afterXrule+. There is, anyway, a subtlety: the footnote rule of eledmac is the standard \LaTeX footnote rule: \verb+\footnoterule+, which automatically decreases \unit{3}{pt} before and adds \unit{2.6}{pt} after. So we have to compensate, by defining to length: \verb+before+ and \verb+\after+, which are passed to the respective commands. +\end{abstract} +\end{english} + +\beginnumbering +\pstart% +Cum defensionum \edtext{laboribus}{\Cfootnote{first note}} senatoriisque muneribus aut omnino aut magna ex parte essem aliquando liberatus, rettuli me, Brute, te hortante maxime ad ea studia, quae retenta animo, remissa temporibus, longo intervallo intermissa revocavi, et cum omnium artium, quae ad rectam vivendi viam pertinerent, \edtext{ratio}{\Afootnote{second note}} et disciplina studio sapientiae, quae philosophia dicitur, contineretur, hoc mihi Latinis litteris \edtext{inlustrandum}{\Cfootnote{third note}} putavi, non quia \edtext{philosophia}{\Bfootnote{fourth note}} Graecis et litteris et doctoribus percipi non posset, sed meum semper iudicium fuit omnia nostros aut invenisse per se sapientius quam Graecos aut accepta ab illis fecisse meliora, quae quidem digna statuissent, in quibus elaborarent. +\pend + +\pstart% +Cum defensionum \edtext{laboribus}{\Cfootnote{first note}} senatoriisque muneribus aut omnino aut magna ex parte essem aliquando liberatus, rettuli me, Brute, te hortante maxime ad ea studia, quae retenta animo, remissa temporibus, longo intervallo intermissa revocavi, et cum omnium artium, quae ad rectam vivendi viam pertinerent, \edtext{ratio}{\Afootnote{second note}} et disciplina studio sapientiae, quae philosophia dicitur, contineretur, hoc mihi Latinis litteris \edtext{inlustrandum}{\Cfootnote{third note}} putavi, non quia \edtext{philosophia}{\Bfootnote{fourth note}} Graecis et litteris et doctoribus percipi non posset, sed meum semper iudicium fuit omnia nostros aut invenisse per se sapientius quam Graecos aut accepta ab illis fecisse meliora, quae quidem digna statuissent, in quibus elaborarent. +\pend + +\pstart% +Cum defensionum \edtext{laboribus}{\Cfootnote{first note}} senatoriisque muneribus aut omnino aut magna ex parte essem aliquando liberatus, rettuli me, Brute, te hortante maxime ad ea studia, quae retenta animo, remissa temporibus, longo intervallo intermissa revocavi, et cum omnium artium, quae ad rectam vivendi viam pertinerent, \edtext{ratio}{\Afootnote{second note}} et disciplina studio sapientiae, quae philosophia dicitur, contineretur, hoc mihi Latinis litteris \edtext{inlustrandum}{\Cfootnote{third note}} putavi, non quia \edtext{philosophia}{\Bfootnote{fourth note}} Graecis et litteris et doctoribus percipi non posset, sed meum semper iudicium fuit omnia nostros aut invenisse per se sapientius quam Graecos aut accepta ab illis fecisse meliora, quae quidem digna statuissent, in quibus elaborarent. +\pend + +\pstart% +Cum defensionum \edtext{laboribus}{\Cfootnote{first note}} senatoriisque muneribus aut omnino aut magna ex parte essem aliquando liberatus, rettuli me, Brute, te hortante maxime ad ea studia, quae retenta animo, remissa temporibus, longo intervallo intermissa revocavi, et cum omnium artium, quae ad rectam vivendi viam pertinerent, \edtext{ratio}{\Afootnote{second note}} et disciplina studio sapientiae, quae philosophia dicitur, contineretur, hoc mihi Latinis litteris \edtext{inlustrandum}{\Cfootnote{third note}} putavi, non quia \edtext{philosophia}{\Bfootnote{fourth note}} Graecis et litteris et doctoribus percipi non posset, sed meum semper iudicium fuit omnia nostros aut invenisse per se sapientius quam Graecos aut accepta ab illis fecisse meliora, quae quidem digna statuissent, in quibus elaborarent. +\pend + +\pstart% +Cum defensionum \edtext{laboribus}{\Cfootnote{first note}} senatoriisque muneribus aut omnino aut magna ex parte essem aliquando liberatus, rettuli me, Brute, te hortante maxime ad ea studia, quae retenta animo, remissa temporibus, longo intervallo intermissa revocavi, et cum omnium artium, quae ad rectam vivendi viam pertinerent, \edtext{ratio}{\Afootnote{second note}} et disciplina studio sapientiae, quae philosophia dicitur, contineretur, hoc mihi Latinis litteris \edtext{inlustrandum}{\Cfootnote{third note}} putavi, non quia \edtext{philosophia}{\Bfootnote{fourth note}} Graecis et litteris et doctoribus percipi non posset, sed meum semper iudicium fuit omnia nostros aut invenisse per se sapientius quam Graecos aut accepta ab illis fecisse meliora, quae quidem digna statuissent, in quibus elaborarent. +\pend + +\pstart% +Cum defensionum \edtext{laboribus}{\Cfootnote{first note}} senatoriisque muneribus aut omnino aut magna ex parte essem aliquando liberatus, rettuli me, Brute, te hortante maxime ad ea studia, quae retenta animo, remissa temporibus, longo intervallo intermissa revocavi, et cum omnium artium, quae ad rectam vivendi viam pertinerent, \edtext{ratio}{\Afootnote{second note}} et disciplina studio sapientiae, quae philosophia dicitur, contineretur, hoc mihi Latinis litteris \edtext{inlustrandum}{\Cfootnote{third note}} putavi, non quia \edtext{philosophia}{\Bfootnote{fourth note}} Graecis et litteris et doctoribus percipi non posset, sed meum semper iudicium fuit omnia nostros aut invenisse per se sapientius quam Graecos aut accepta ab illis fecisse meliora, quae quidem digna statuissent, in quibus elaborarent. +\pend + +\endnumbering + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf b/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf Binary files differnew file mode 100644 index 00000000000..4d51ced6640 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.tex b/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.tex new file mode 100644 index 00000000000..4f188bff50f --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/examples/text-between-verses-in-parallel.tex @@ -0,0 +1,71 @@ +\documentclass{article} +\usepackage{fontspec} +\usepackage{libertineotf} +\usepackage{polyglossia} +\setmainlanguage{latin} +\setotherlanguage{english} + +\usepackage{eledmac} +\usepackage{eledpar} +\setcounter{stanzaindentsrepetition}{2} +\setstanzaindents{14,0,1} + +\begin{document} +\begin{english} +\date{} +\title{Content between verse, with parallel typesetting} +\maketitle +\begin{abstract} +This file provides examples of adding content between two verses. The parallel typesetting is used. + +The \verb+\newverse+ command is used, with only the first optional arguments. +\end{abstract} +\end{english} + +\begin{pages} + +\begin{Leftside} +\beginnumbering + +\stanza +Ut enim ad minim veniam,& +sed do eiusmod tempor incididunt ut labore et dolore& +magna aliqua. Ut enim ad minim veniam, quis nostrud& +exercitation ullamco laboris nisi& +Uut aliquip consequat ut aliquip consequat +\newverse[\vskip\baselineskip% + ⁂\hfill⁂\hfill⁂% + \vskip\baselineskip]% +% +Duis aute irure dolor in reprehenderit& +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat& +cupidatat non proident, sunt in culpa qui officia deserunt& +Duis aute irure dolor in reprehenderit& +in voluptate velit esse cillum dolore eu fugiat nulla& +pariatur. Excepteur sint occaecat\& +\endnumbering +\end{Leftside} + +\begin{Rightside} +\beginnumbering + +\stanza +Lorem ipsum dolor sit amet, consectetur adipisicing elit,& +sed do eiusmod tempor incididunt ut labore et dolore& +magna aliqua. Ut enim ad minim veniam Ut enim ad minim veniam, quis nostrud& +exercitation ullamco laboris nisi& +Ut aliquip consequat ut consequat ut consequat ut consequat ut aliquip consequat\newverse[\vskip\baselineskip% + ⁂\hfill⁂\hfill⁂% + \vskip\baselineskip]% +% +Duis aute irure dolor in reprehenderit& +in voluptate velit esse cillum dolore eu ur. Excepteur sint occaecat& +cupidatat non proident, & +Duis aute irure dolor in reprehenderit& +in voluptate velit esse cillum dolore eu fugiat nulla& +pariatur. Excepteur sint occaecat\& +\endnumbering +\end{Rightside} +\Pages +\end{pages} +\end{document} diff --git a/Master/texmf-dist/doc/latex/eledmac/latexmkrc b/Master/texmf-dist/doc/latex/eledmac/latexmkrc new file mode 100644 index 00000000000..c734d8b7606 --- /dev/null +++ b/Master/texmf-dist/doc/latex/eledmac/latexmkrc @@ -0,0 +1,2 @@ +$pdflatex = "xelatex --shell-escape %S"; +$pdf_mode = "1";
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx index c4b008167d2..82d8cd98d8b 100644 --- a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx +++ b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx @@ -51,7 +51,7 @@ % % \fi % -% \CheckSum{8925} +% \CheckSum{9904} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters @@ -135,6 +135,17 @@ % \my@changes#1.\@nil % }% %\makeatother +% \newcommand{\Lpack}[1]{\textsf{#1}} +% \newcommand{\Lclass}[1]{\textsf{#1}} +% \newcommand{\file}[1]{\texttt{#1}} +% \newcommand{\eledmac}{eledmac} +% \newcommand{\Eledmac}{\Lpack{\eledmac}} +% \newcommand{\edmac}{\texttt{EDMAC}} +% \newcommand{\tabmac}{\texttt{TABMAC}} +% \newcommand{\edstanza}{\texttt{EDSTANZA}} +% \newcommand{\texbook}{\textit{TeXbook}} +% \newcommand{\thetexbook}{\textit{The TeXbook}} +% % \changes{v0.1}{2003/03/25}{First public release} % \changes{v0.2}{2003/08/16}{Added tabmac code, and extended indexing} % \changes{v0.2.1}{2003/09/13}{Bug fixes and match with mempatch v1.8} @@ -188,19 +199,11 @@ % \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.11.1}{2014/05/29}{Correct a bug when a critical note starts by plus or minus.} +% \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}.} % \hyphenation{man-u-script man-u-scripts} % -% \newcommand{\Lpack}[1]{\textsf{#1}} -% \newcommand{\Lclass}[1]{\textsf{#1}} -% \newcommand{\file}[1]{\texttt{#1}} -% \newcommand{\eledmac}{eledmac} -% \newcommand{\Eledmac}{\Lpack{\eledmac}} -% \newcommand{\edmac}{\texttt{EDMAC}} -% \newcommand{\tabmac}{\texttt{TABMAC}} -% \newcommand{\edstanza}{\texttt{EDSTANZA}} -% \newcommand{\texbook}{\textit{TeXbook}} -% \newcommand{\thetexbook}{\textit{The TeXbook}} % % ^^A PW added following as the definitions are at some unknown elsewhere % \newcommand{\egstart}{} @@ -293,10 +296,8 @@ % Other LaTeX packages for critical editions include EDNOTES, and % \Lpack{poemscol} for poetical works. % -% In October 2012, Maïeul Rouquette released the \emph{eledform} package\footnote{\url{http://www.ctan.org/eledform}.}. -% Based on eledmac, this package provides tools for creating a formal description (formalism) of textual variants. % -% To report bugs, please go to ledmac's GitHub page and click "New Issue": \url{https://github.com/maieul/ledmac/issues/}. You must open an account with github.com to access my page (maieul/ledmac). GitHub accounts are free for open-source users. You can report bug in English or in French. +% To report bugs, please go to ledmac's GitHub page and click "New Issue": \url{https://github.com/maieul/ledmac/issues/}. You must open an account with github.com to access my page (maieul/ledmac). GitHub accounts are free for open-source users. You can report bugs in English or in French. % % You can subscribe to the eledmac mail list in:\\ \url{https://lists.berlios.de/pipermail/ledmac-users/} % \end{abstract} @@ -560,9 +561,11 @@ % Since July~2011, ledmac is maintained by Ma\"ieul Rouquette. % % Important changes were put in version 1.0, to make eledmac more easily extensible (see \ref{displayoptions} p.\pageref{displayoptions}). -% They can make some little troubles with old customization. +% These changes can trigger small problems with the old customization. % That is why a new name was selected: \emph{eledmac}. To migrate from ledmac to eledmac, please read Appendix \ref{migration} (p.\pageref{migration}). % +% \subsubsection{List of works edited with (e)ledmac} +% A collaborative list of works edited with (e)ledmac is available on \url{https://www.zotero.org/groups/critical_editions_typeset_with_edmac_ledmac_and_eledmac/items}. Please add your own edition made with (e)ledmac. % % \section{The \Eledmac{} package}\label{howto} % @@ -678,6 +681,14 @@ % begins again.\par} % \egend % +% \changes{v1.12.0}{2014/08/05}{Optional arguments for \cs{pstart} and \cs{pend}.} +% Both \cs{pstart} and \cs{pend} can take a optional argument, in brackets. +% Its content will be printed before the beginning of the \cs{pstart} / after the end of the \cs{pend}. +% +% This feature is not needed for normal use of \Lpack{eledmac}, but it is needed when using verse (see~\ref{verse} p.~\pageref{verse}) or \Lpack{eledpar} (see~\ref{eledpar} p.~\pageref{eledpar}). +% +% A \cs{noindent} is automatically added before this argument. +% % \DescribeMacro{\autopar} % You can use \cs{autopar} to avoid the nuisance of this paragraph markup % and still have every paragraph automatically numbered. The scope of the @@ -734,6 +745,10 @@ % There are similar commands, \cs{firstsublinenum}\marg{num} and % \cs{sublinenumincrement}\marg{num} for controlling sub-line numbering. % +% \DescribeMacro{\numberpstarttrue}You can use the command \cs{numberpstarttrue} to insert a number on every \cs{pstart}. To stop the numbering, you must use \cs{numberpstartfalse}. To reset the numebering of \cs{pstarts}, insert +% \begin{verbatim} +%\setcounter{pstart}{0} +% \end{verbatim} % % \DescribeMacro{\pausenumbering} % \DescribeMacro{\resumenumbering} @@ -965,7 +980,6 @@ % the numbering of that particular line to be skipped; that is, the line % number is unchanged and no line number will be printed. % -% If you want to use the feature in a stanza, you should look at the \cs{falseverse} macro (p.~\pageref{falseverse}). % % \section{The apparatus} % \subsection{Commands} @@ -1162,15 +1176,6 @@ % \let\testimonia=\Cfootnote % \end{verbatim} % -% \paragraph{Formalism for textual criticism} -% -% If your notes are for textual criticism, you should -% use the \emph{eledform} package\footnote{\url{http://www.ctan.org/pkg/eledform}.}. -% -% This package provides tools to describes the textual variants in a -% formal way. -% -% It is based on eledmac for the typographical aspect. % % \subsection{Alternate footnote formatting} % If you just launch into \Eledmac{} using the commands outlined @@ -1323,13 +1328,13 @@ % \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}. -% \subsection{Font of the lemma} +% \subsubsection{Font of 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 command \cs{Xlemmadisablefontselection}\oarg{s} 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 \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 \cs{Xendlemmadisablefontselection}\oarg{s} allows 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 \cs{Xendlemmadisablefontselection}\oarg{s} to disable it for a specific series. % % % \subsubsection{Styles of notes content} @@ -1382,6 +1387,13 @@ % \DescribeMacro{\parafootsep} % For paragraphed footnotes (see below), you can chooce the separator between each note by \cs{parafootsep}\oarg{s}\marg{l}. A common separator is a double pipe (\verb+$||$+), which you can set by \cs{parafootsep}\verb+{$||$}+. % +% \changes{v1.12.0}{2014/08/05}{New options to ragg paragraphed 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. + +% \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. +% %\subsubsection{Options for block of notes} % \changes{v1.1}{2012/09/12}{New options for block of notes.} % \DescribeMacro{\txtbeforeXnotes} @@ -1391,21 +1403,46 @@ % You can change the vertical space printed before the rule of the critical notes with \cs{beforeXnotes}\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.} % \DescribeMacro{\beforenotesX} +% % You can change the vertical space printed before the rule of the familiar notes with \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.} +% +% \changes{v1.12.0}{2014/08/05}{New hooks: \cs{afterXrule} and \cs{afterruleX}} +% \DescribeMacro{\afterXrule} +% You can change the vertical space printed after the rule of the critical notes with \cs{afterXrule}\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.} +% +% Be careful with this setting: it can place notes by the page number, at the bottom of the page. +% \DescribeMacro{\afterruleX} +% You can change the vertical space printed after the rule of the familiar notes with \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.} +% +% Be careful with this setting: it can place notes by the page number, at the bottom of the page. +% % \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}. -% You can disable this feature by setting the length to 0~pt. +% You can do it with \cs{preXnotes}\marg{l}. Default value is \verb+0pt+. +% You can disable this feature by setting the length to 0pt. +% +% +% Be careful with this setting: it can place notes by the page number, at the bottom of the page. % % \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. +% 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 disable this feature by setting the length to 0~pt. +% You can disable this feature by setting the length to 0~pt. % +% +% Be careful with this setting: it could make the notes be written on the bottom pages number. % \DescribeMacro{\maxhXnotes} % 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{maxhXnotes}\oarg{s}\marg{l}. @@ -1532,7 +1569,7 @@ % If you need more than 5 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+. % -% \section{Verse} +% \section{Verse}\label{verse} % % % In 1992 Wayne Sullivan\footnote{Department of Mathematics, @@ -1545,8 +1582,8 @@ % % With Wayne Sullivan's\index{Sullivan, Wayne} permission the majority % of this section has -% been taken from~\cite{EDSTANZA}. I have made a few changes to enable his -% macros to be used in the LaTeX \Lpack{eledmac} +% been taken from~\cite{EDSTANZA}. Peter has made a few changes to enable his +% macros to be used in the LaTeX \Lpack{ledmac}, and now in \Lpack{eledmac}. % package. % % @@ -1648,25 +1685,8 @@ % desirability of a page break at a given line. There is a subtle interaction % between penalties and \textit{glue}, so it may take some adjustment of skips % and penalties to achieve the best results. -% \subsection{False verse} -% \label{falseverse}In some special cases, you want to add false verse after true verse. -% This false verse: -% \begin{enumerate} -% \item Won't be numbered. -% \item Won't affect the indent of the next verse. -% \end{enumerate} -% It could be used, for example, to add some space between verses. -% To add this type of false verse, you have to finish the previous verse with \cs{falseverse} (and not with \verb+&+). -% For example: -% \begin{verbatim} -% True verse& -% True verse\falseverse -% \vspace{3ex}& -% True verse& -% True verse -% \end{verbatim} % \subsection{Hanging symbol} -% It's possible to insert a symbol in each line of hanging verse, as in French typography for `['., as in French typography for `['. To insert in eledmac, redefine macro \DescribeMacro{\hangingsymbol}\cmd{\hangingsymbol} with this code: +% It's possible to insert a symbol in each line of hanging verse, as in French typography for `['. To insert in eledmac, redefine macro \DescribeMacro{\hangingsymbol}\cmd{\hangingsymbol} with this code: % \begin{verbatim} % \renewcommand{\hangingsymbol}{[\,} % \end{verbatim} @@ -1720,6 +1740,13 @@ %\begin{verbatim} %\renewcommand{\hangingsymbol}{[\,} %\end{verbatim} +% \subsection{Text before/after verses} +% It is possible to add text, like a subtitle, 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 \verb+\&+ can take a optional argument (in brackets). Its content will be printed after the stanza. +% \end{itemize} % \section{Grouping} % In a \verb?minipage? environment LaTeX changes \verb?\footnote? numbering from % arabic to alphabetic and puts the footnotes at the end of the minipage. @@ -1795,6 +1822,7 @@ % generation of an unneeded \file{.end} file. % % \section{Cross referencing} +% \changes{v1.12.0}{2014/08/05}{Add hyperlink to crossref (needs \Lpack{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 @@ -1861,12 +1889,17 @@ % three variants of the reference commands, with the \verb"x" % prefix, are supplied: \cs{xpageref}, \cs{xlineref}, \cs{xsublineref} and \cs{xpstartref}. % They have these limitations: -% they will not tell you if the label is undefined, and they must +% \begin{itemize} +% \item They will not tell you if the label is undefined. +% \item They must % 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...} % ones cannot. +% \item When \Lpack{hyperref} is loaded, the hyperref link won't be added. (Indeed, +% it's not a limitation, but a feature. +% \end{itemize} % % \DescribeMacro{\xxref} % The macros \cs{xxref} and @@ -1910,11 +1943,15 @@ % The \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{ledleftnote}\marg{text} will put \meta{text} into the inner margin level +% with where the command was issued. Similarly, \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.} % \DescribeMacro{\ledleftnote} % \DescribeMacro{\ledrightnote} -% \cs{ledleftnote}\marg{text} will put \meta{text} into the left margin level -% with where the command was issued. Similarly, \cs{ledrightnote}\marg{text} -% puts \meta{text} in the right margin. % \changes{v1.0}{2012/09/15}{Possibility to have commands in sidenotes.} % \DescribeMacro{\ledsidenote} % \DescribeMacro{\sidenotemargin} @@ -2348,11 +2385,12 @@ % % % \section{Sectioning commands} -% \changes{v1.1}{2012/09/25}{sectioning commands} +% \changes{v1.1.0}{2012/09/25}{Sectioning commands.} +% \changes{v1.12.0}{2014/08/05}{New sectioning commands.}\label{eledsection} % The standard sectioning command (\cs{chapter}, \cs{section} etc.) can be used inside a numbered text. % But the line which contains it won't be numbered, and you can't add critical notes inside. -% -% However, eledmac provides the following commands: +% In the past (between versions 1.1.0 and 1.12.0), +% these following commands were provided: % \begin{itemize} % \item \cs{ledchapter}\oarg{text}\marg{critical text} % \item \cs{ledchapter*} @@ -2363,29 +2401,35 @@ % \item \cs{ledsubsubsection}\oarg{text}\marg{critical text} % \item \cs{ledsubsubsection*} % \end{itemize} -% Which are the equivalent of the standard LaTeX commands, but be careful. -% Note the following points: -% \begin{enumerate} -% \item All these commands close a \cs{pstart}, and open a new one. The content of the command itself is between \cs{pstart} and \cs{pend}. -% \item Don't try to make \verb|\let\chapter\ledchapter|, or other things like it: the \cs{led}section commands call the standard commands. -% \item For the non-starred sections, use the optional argument \meta{text} to provide the text to the table of contents. -% \item The \cs{ledchapter} doesn't open a new page. You must use \cs{beforeledchapter} before. This also closes a \cs{pstart} and opens a new. -% \end{enumerate} -% -% \changes{v1.8.0}{2013/12/13}{Add \cs{ledsecnolinenumber} option.} -% If you use \Lpack{eledpar}, you must use these commands to have parallel sectioning. -% However, if you don't want lineation in sectioning command, use the \verb+ledsecnolinenumber+ option when loading eledmac. Or add \cs{ledsecnolinenumbertrue} in your preamble. -% \changes{v1.2}{2012/10/13}{Add \cs{ledsectnotoc} command.} -% \DescribeMacro{\ledsectnotoc} -% You can create a table of contents that indexes only the titles that appear on the left side of the edition: -% for instance, titles from the original language, not the translation. -% You could use \cs{ledsectnotoc} at the beginning of the side environnment : +% These commands are deprecated, and won't be maintened anymore, because of a bad conception. +% Since version 1.12.0, 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*} +% \end{itemize} +% Which are equivalent to the \LaTeX\ commands. Each indivual command must be called alone in a \cs{pstart}\ldots\cs{pend}: % \begin{verbatim} -% \begin{Rightside} -% \ledsectnotoc -% ... -% \end{Rightside} +%\pstart +%\eledsection*{xxxx\ledsidenote{section}} +%\pend +%\pstart +%\eledsubsection*{xxxx\ledsidenote{sub}} +%\pend +%\pstart +%normal text +%\pend % \end{verbatim} +% At the first run, you will see only the text. It's normal. +% At the second run, you will see the formating. +% And consequently, at the third run, you will see the table of contents. +% +% For technical reason, the page break before \cs{elechapter} can't be add automatically. You have to insert it manually via \cs{beforeeledchapter}, which must be called outside of a numbering section. % \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. @@ -2406,12 +2450,12 @@ % \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$. -% \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 begining 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$. +% \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 \Lpack{eledpar} to typeset parallel pages you must use \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. -% \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 begining 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 \Lpack{eledpar}. +% \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). This feature works only with verse of 2 lines, not more. It works at the third run, or at fourth run with \Lpack{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. % \section{Miscellaneous} % @@ -2590,7 +2634,7 @@ % on a solution. % % -% \subsection{Parallel typesetting} +% \subsection{Parallel typesetting}\label{eledpar} % % % Peter Wilson has developed the Ledpar package @@ -2786,7 +2830,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledmac}[2014/05/29 v1.11.1 LaTeX port of EDMAC] +\ProvidesPackage{eledmac}[2014/08/05 v1.12.0 LaTeX port of EDMAC]% % \end{macrocode} % % Generally, these are the modifications to the original. @@ -2838,7 +2882,7 @@ % \end{macro} % Loading package \emph{xargs} to declare commands with optional arguments. % \emph {Etoolbox} is also used to make code clearer - for example, in dynamic command names (which can replace \cs{csname} etc.). -% Use \emph{suffix} to declare commands with a starred version, \Lpack{xstring} to work with strings and \emph{iflutex} to test if LuaLaTeX is running. +% Use \emph{suffix} to declare commands with a starred version, \Lpack{xstring} to work with strings and \emph{iflutex} to test if LuaLaTeX is running, and \Lpack{ragged2e} to manage ragging for paragraphed notes. % \changes{v1.4}{2012/11/16}{Compatibility with LuaTeX of RTL notes.} % \begin{macrocode} \RequirePackage{xargs} @@ -2847,6 +2891,7 @@ \RequirePackage{suffix} \RequirePackage{xstring} \RequirePackage{ifluatex} +\RequirePackage{ragged2e} % \end{macrocode} % \begin{macro}{\if@RTL} % The \cs{if@RTL} is defined by the bidi package, which is sometimes loaded by \emph{polyglossia}. @@ -3181,20 +3226,26 @@ % \begin{macro}{\pst@rtedLfalse} % \begin{macro}{\l@dnumpstartsL} % \begin{macro}{\ifledRcol} +% \begin{macro}{\ifledRcol@} % In preparation for the \Lpack{eledpar} package, these are related to % the `left' text of parallel texts (when \cs{ifl@dpairing} is TRUE). % They are explained in the \Lpack{eledpar} % manual. % \changes{v0.7}{2005/02/24}{Added \cs{l@dnumpstartsL}, \cs{ifl@dpairing} % and \cs{ifpst@rted} for/from eledpar} -% \changes{v0.12}{2005/10/01}{Added \cs{ifledRcol} and \cs{ifnumberingR} for/from eledpar} +% \changes{v0.12}{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}} % \begin{macrocode} \newif\ifl@dpairing \l@dpairingfalse \newif\ifpst@rtedL \pst@rtedLfalse \newcount\l@dnumpstartsL +% \end{macrocode} +% \cs{ifledRcol} is set to true in the \verb+Rightside+ environnement. It must be distingued from \cs{ifledRcol@} which is set to true when a right line is processed, in \cs{Pages} or \cs{Columns}. +% \begin{macrocode} \newif\ifledRcol +\newif\ifledRcol@ % \end{macrocode} % The \cs{ifnumberingR} flag is % set to \verb"true" if we're within a right text numbered section. @@ -3210,6 +3261,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % \begin{macro}{\beginnumbering} % \begin{macro}{\initnumbering@reg} % \cs{beginnumbering} begins a section of numbered text. @@ -3230,6 +3282,12 @@ % should be no direct interaction between the use of these counters % and variables in the two processing steps. % \changes{v0.7}{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}.} +% For parallel processing : +%\begin{itemize} +% \item zero \cs{l@dnumpstartsL} --- the number of chunks to be processed. +% \item set \cs{ifpst@rtedL} to FALSE. +% \end{itemize} % \begin{macrocode} \newcommand*{\beginnumbering}{% \ifnumbering @@ -3243,8 +3301,25 @@ \line@list@stuff{\jobname.\extensionchars\the\section@num}% \l@dend@stuff \setcounter{pstart}{1} - \ifl@dpairing\else\begingroup\fi - \initnumbering@sectcmd + \ifl@dpairing + \global\l@dnumpstartsL \z@ + \global\pst@rtedLfalse +% \end{macrocode} +% The tools for section's title commands are called: +% \begin{itemize} +% \item Define old (deprecated) sectioning commands. +% \item Define an empty list of pstart number where sectioning commands are called. +% \item Input auxiliary file with the description of section titles. +% \item Open the same auxiliary file to write in. +% \end{itemize} +% \begin{macrocode} + \else + \begingroup + \initnumbering@sectcmd + \fi + \gdef\eled@sections@@{} + \makeatletter\InputIfFileExists{\jobname.eledsec\the\section@num}{}{}\makeatother + \immediate\openout\eled@sectioning@out=\jobname.eledsec\the\section@num\relax } \newcommand*{\initnumbering@reg}{% \global\pst@rtedLfalse @@ -3268,155 +3343,6 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\initnumbering@sectcmd} -% \begin{macro}{\ledsection} -% \begin{macro}{\ledsection*} -% \begin{macro}{\ledsubsection} -% \begin{macro}{\ledsubsection*} -% \begin{macro}{\ledsubsubsection} -% \begin{macro}{\ledsubsubsection*} -% \begin{macro}{\ledchapter} -% \begin{macro}{\ledchapter*} -% \begin{macro}{\quotation} -% \begin{macro}{\endquotation} -% \begin{macro}{\quote} -% \begin{macro}{\endquote} -% \changes{v1.2}{2012/10/08}{Compatibility of \cs{ledchapter} with the \emph{memoir} class.} -% \changes{v1.3}{2012/11/01}{\emph{Quotation} and {quote} environment inside the numbering 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.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@sectcmd} defines sectioning commands inside numbered section. -% It also defines quotation environment. -% Note: this assumes that the user didn't change \cs{chapter}. -% If he did, he should redefine \cs{initnumbering@sectcmd}. -% \begin{macrocode} -\newcommand{\initnumbering@sectcmd}{ - \newcommand{\ledsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi%% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \WithSuffix\newcommand\ledsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \newcommand{\ledsubsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \WithSuffix\newcommand\ledsubsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \newcommand{\ledsubsubsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \WithSuffix\newcommand\ledsubsubsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \newcommand\ledchapter[2][]{\ifl@dmemoir\gdef\ch@pt@c{##1}\fi~\pend\skipnumbering\pstart\chapter[##1]{##2}\pend\pstart} - \WithSuffix\newcommand\ledchapter*[1]{~\pend\skipnumbering\pstart\chapter*{##1}\pend\pstart} - \patchcmd{\@makeschapterhead}{1\par}{1}{}{} - \pretocmd{\@makeschapterhead}{\par}{}{} - \apptocmd{\@makeschapterhead}{\par}{}{} - \patchcmd{\@makeschapterhead}{\vskip 40\p@}{}{}{} - \patchcmd{\@makechapterhead}{1\par}{1}{}{} - \pretocmd{\@makechapterhead}{\par}{}{} - \apptocmd{\@makechapterhead}{\par}{}{} - \patchcmd{\@makechapterhead}{\vskip 40\p@}{}{}{} - \apptocmd{\@chapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} - \apptocmd{\@schapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} - \newcommand\beforeledchapter{\pend\cleardoublepage\pstart} - \patchcmd{\chapter}{\cleardoublepage}{\relax}{}{} - \patchcmd{\chapter}{\clearpage}{\relax}{}{} - \ifnoquotation@\else - \renewcommand{\quotation}{\par\leavevmode% - \parindent=1.5em% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - \global\leftskip=\leftmargin% - \global\rightskip=\leftmargin% - } - \renewcommand{\endquotation}{\par% - \global\leftskip=0pt% - \global\rightskip=0pt% - \leavevmode% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - } - \renewcommand{\quote}{\par\leavevmode% - \parindent=0pt% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - \global\leftskip=\leftmargin% - \global\rightskip=\leftmargin% - } - \renewcommand{\endquote}{\par% - \global\leftskip=0pt% - \global\rightskip=0pt% - \leavevmode% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - } - \fi -} -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \begin{macro}{\ledsectnotoc} -% The \cs{ledsectnotoc} only disables the \cs{addcontentsline} macro. -% \begin{macrocode} -\newcommand{\ledsectnotoc}{\let\addcontentsline\@gobblethree} -% \end{macrocode} -% \end{macro} % \begin{macro}{\endnumbering} % \cs{endnumbering} must follow the last text for a numbered section. % It takes care of notifying you when changes have been noted in the @@ -3444,7 +3370,12 @@ \else \led@err@NumberingNotStarted \fi - \autoparfalse\ifl@dpairing\else\endgroup\fi} + \autoparfalse + \immediate\closeout\eled@sectioning@out + \ifl@dpairing\else + \endgroup + \fi +} % \end{macrocode} % \end{macro} % @@ -3476,6 +3407,7 @@ \line@list@stuff{\jobname.\extensionchars\the\section@num}% \l@dend@stuff \begingroup + \initnumbering@sectcmd \else \led@err@NumberingShouldHaveStarted \endnumbering @@ -3487,7 +3419,6 @@ % \end{macro} % \end{macro} % -% % \section{Line counting} % \label{lineation}\relax % @@ -4201,7 +4132,7 @@ % Inside the apparatus, at each note, the page number is stored in a macro called \cs{prevpageX@num}, % where X is the letter of the current series. % This macro is called when using \cs{parafootsep}. -% This macro must be reset at the begining of each numbered section +% This macro must be reset at the beginning of each numbered section % The \cs{resetprevpage@} command resets this macro for every series. % \begin{macro}{\resetprevpage@} % \begin{macrocode} @@ -4325,7 +4256,7 @@ % 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{@l}, is especially short, since it will be written to the +% \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 % later section, among the cross-referencing commands it is @@ -4341,9 +4272,10 @@ % that modifies the action-code list: again, this is so that they % can be turned off easily for nested calls of \cs{@ref}. % -% \begin{macro}{\@l} -% \begin{macro}{\@l@reg} -% \cs{@l} does everything related to the start of a +% \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 % new line of numbered text. % % In order to get the \verb?\setlinenum? to work Peter Wilson had to slip in some new @@ -4357,21 +4289,21 @@ % % In November 2004 in order to accurately determine page numbers Peter Wilson added % these to the macro. It is now: \\ -% \cs{@l}\marg{page counter number}\marg{printed page number} \\ +% \cs{@nl}\marg{page counter number}\marg{printed page number} \\ % I don't (yet) use the printed number (i.e., the \verb?\thepage?) but % it may come in handy later. The macro \cs{fix@page} checks if a new % page has started. % -% \changes{v0.3}{2004/02/14}{Added a bunch of code to \cs{@l} for handling +% \changes{v0.3}{2004/02/14}{Added a bunch of code to \cs{@nl} for handling % \cs{setlinenum}} -% \changes{v0.6}{2004/11/16}{Extended \cs{@l} to include the page number} -% \changes{v0.6}{2004/11/16}{Added \cs{fix@page} to \cs{@l}} -% \changes{v0.7}{2005/02/22}{Added \cs{@l@reg}} +% \changes{v0.6}{2004/11/16}{Extended \cs{@nl} to include the page number} +% \changes{v0.6}{2004/11/16}{Added \cs{fix@page} to \cs{@nl}} +% \changes{v0.7}{2005/02/22}{Added \cs{@nl@reg}} % \begin{macrocode} -\newcommand{\@l}[2]{% +\newcommand{\@nl}[2]{% \fix@page{#1}% - \@l@reg} -\newcommand*{\@l@reg}{% + \@nl@reg} +\newcommand*{\@nl@reg}{% \ifx\l@dchset@num\relax \else \advance\absline@num \@ne \set@line@action @@ -4437,7 +4369,7 @@ % \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{@l}. +% a new page has been started, based on the page values held by \cs{@nl}. % \changes{v0.6}{2004/11/16}{Added \cs{last@page@num} and \cs{fix@page}} % \begin{macrocode} \newcount\last@page@num @@ -4485,7 +4417,7 @@ % The \cs{sub@on} and \cs{sub@off} macros % turn sub-lineation on and off\/: but not directly, since such changes % don't really take effect until the next line of text. Instead -% they set a flag that notifies \cs{@l} of the necessary action. +% they set a flag that notifies \cs{@nl} of the necessary action. % \begin{macrocode} \newcommand*{\sub@on}{\ifsublines@ \let\sub@change=\relax @@ -4878,7 +4810,7 @@ % \end{macro} % % \begin{macro}{\new@line} -% The \cs{new@line} macro sends the \cs{@l} command to the line-list +% The \cs{new@line} macro sends the \cs{@nl} command to the line-list % file, to mark the start of a new text line, and its page number. % \changes{v0.6}{2004/11/16}{Extended \cs{new@line} to output page numbers} % \begin{macrocode} @@ -4887,27 +4819,25 @@ {\xifinlistcs{\the\absline@num}{l@prev@nopb}% {\xifinlistcs{\the\absline@num}{normal@page@break}% {\numgdef{\@next@page}{\thepage+1}% - \write\linenum@out{\string\@l[\@next@page][\@next@page]}% + \write\linenum@out{\string\@nl[\@next@page][\@next@page]}% }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}% + {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}% }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}}% + {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}}% {}% \IfStrEq{\led@pb@setting}{before}% - {% -\numdef{\next@absline}{\the\absline@num+1}% -\xifinlistcs{\next@absline}{l@prev@nopb}% - {\xifinlistcs{\the\absline@num}{normal@page@break}% - {% - \numgdef{\nc@page}{\c@page+1}% - \write\linenum@out{\string\@l[\nc@page][\nc@page]}% + {\numdef{\next@absline}{\the\absline@num+1}% + \xifinlistcs{\next@absline}{l@prev@nopb}% + {\xifinlistcs{\the\absline@num}{normal@page@break}% + {\numgdef{\nc@page}{\c@page+1}% + \write\linenum@out{\string\@nl[\nc@page][\nc@page]}% + }% + {\write\linenum@out{\string\n@l[\the\c@page][\thepage]}}% + }% + {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}% }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}% - }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}% -}% - {}% - \IfStrEqCase{\led@pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum@out{\string\@l[\the\c@page][\thepage]}]% + {}% + \IfStrEqCase{\led@pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum@out{\string\@nl[\the\c@page][\thepage]}]% } % \end{macrocode} @@ -5609,7 +5539,7 @@ % \begin{macro}{\numberpstartfalse} % \begin{macro}{\labelpstarttrue} % \begin{macro}{\labelpstartfalse} -% \begin{macro}{thepstart} +% \begin{macro}{\thepstart} % \cs{pstart} starts the paragraph by % clearing the \cs{inserts@list} list and other % relevant variables, and then arranges for the @@ -5622,11 +5552,7 @@ % is happening within a group; definitions must be global if you want % them to survive past the end of the paragraph. % -%You can use the command \cs{numberpstarttrue} to insert a number on every \cs{pstart}. To stop the numbering, you must use \cs{numberpstartfalse}. To reset the numebering of \cs{pstarts}, insert -% \begin{verbatim} -%\setcounter{pstart}{0} -% \end{verbatim} -% +% \changes{v1.12.0}{2014/08/05}{New optional argument for \cs{pstart}, to execute code before it.} % \begin{macrocode} \newcounter{pstart} @@ -5635,14 +5561,15 @@ \numberpstartfalse \newif\iflabelpstart \labelpstartfalse -\newcommand*{\pstart}{% -\if@nobreak% - \let\@oldnobreak\@nobreaktrue% -\else% - \let\@oldnobreak\@nobreakfalse% -\fi% -\@nobreaktrue% -\ifnumbering \else% +\newcommandx*{\pstart}[1][1]{% + \ifstrempty{#1}{}{\noindent#1}% + \if@nobreak% + \let\@oldnobreak\@nobreaktrue% + \else% + \let\@oldnobreak\@nobreakfalse% + \fi% + \@nobreaktrue% + \ifnumbering \else% \led@err@PstartNotNumbered% \beginnumbering% \fi% @@ -5653,6 +5580,7 @@ \list@clear{\inserts@list}% \global\let\next@insert=\empty% \begingroup\normal@pars% + \global\advance \l@dnumpstartsL\@ne \global\setbox\raw@text=\vbox\bgroup% \ifautopar\else% \ifnumberpstart% @@ -5665,7 +5593,8 @@ \fi% \numberedpar@true% \iflabelpstart\protected@edef\@currentlabel% - {\p@pstart\thepstart}\fi% + {\p@pstart\thepstart} + \fi% } % \end{macrocode} % \end{macro} @@ -5675,11 +5604,12 @@ % \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. % % \begin{macrocode} -\newcommand*{\pend}{\ifnumbering \else% +\newcommandx*{\pend}[1][1]{\ifnumbering \else% \led@err@PendNotNumbered% \fi% \ifnumberedpar@ \else% @@ -5720,7 +5650,9 @@ \pstartnumtrue% \fi% \@oldnobreak% - \addtocounter{pstart}{1}} + \addtocounter{pstart}{1}% + \ifstrempty{#1}{}{\noindent#1}% +} % \end{macrocode} % \end{macro} @@ -5808,7 +5740,7 @@ % \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 begining of \cs{resumenumbering} +% This boolean will be tested at the beginning of \cs{resumenumbering} % to continue the autopar if neeeded. % \begin{macrocode} \newif\ifautopar@pause @@ -5839,18 +5771,57 @@ \fi \check@pb@in@verse \affixline@num - \affixpstart@num - \hb@xt@ \linewidth{\do@insidelinehook\l@dld@ta\add@inserts\affixside@note - \l@dlsn@te - {\ledllfill\hb@xt@ \wd\one@line{\new@line\inserthangingsymbol\l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta% - \l@drsn@te - }} + \add@inserts\affixside@note +% \end{macrocode} +% \changes{v1.12.0}{2014/08/05}{\cs{do@line} is splitted in more little commands.} +% Depending wether a sectioning command is called at this pstart or not +% we print sectioning command or normal line, +% \begin{macrocode} + \xifinlist{\the\l@dnumpstartsL}{\eled@sections@@}% + {\print@eledsection}% + {\print@line}% \IfStrEq{\led@pb@setting}{after}{\led@check@pb\led@check@nopb}{} }% % \end{macrocode} % \end{macro} % \end{macro} % +% \begin{macro}{\print@line} +% \begin{macrocode} +% \cs{print@line} is for normal line, i. e line without sectioning command. +\def\print@line{ + \affixpstart@num% + \hb@xt@ \linewidth{\do@insidelinehook\l@dld@ta + \l@dlsn@te + {\ledllfill\hb@xt@ \wd\one@line{\new@line\inserthangingsymbol \l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta% + \l@drsn@te + }}% +} +% \end{macrocode} +% \end{macro} +% \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. +% Because of this printing, a vertical spacing correction is added. +% \begin{macrocode} +\def\print@eledsection{% + \numdef{\temp@}{\l@dnumpstartsL-1}% + \xifinlist{\temp@}{\eled@sections@@}{\@nobreaktrue}{\@nobreakfalse}% + \@eled@sectioningtrue% + \csuse{eled@sectioning@\the\l@dnumpstartsL}% + \@eled@sectioningfalse% + \global\csundef{eled@sectioning@\the\l@dnumpstartsL}% + \if@RTL% + \hspace{-\paperwidth}% + {\hbox{\l@dunhbox@line{\one@line}}\new@line}% + \else% + \hspace{\paperwidth}% + {\new@line \hbox{\l@dunhbox@line{\one@line}}}% + \fi% + \vskip-\baselineskip% +} +% \end{macrocode} +% \end{macro} % \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. @@ -5868,13 +5839,17 @@ % \begin{macro}{\l@dld@ta} % \begin{macro}{\l@drd@ta} % \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} for the texts of the sidenotes. +% 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}{2005/02/18}{Added \cs{l@demptyd@ta}} % \begin{macrocode} \newcommand*{\l@demptyd@ta}{% \gdef\l@dld@ta{}% \gdef\l@drd@ta{}% + \gdef\l@dcsnotetext@l{}% + \gdef\l@dcsnotetext@r{}% \gdef\l@dcsnotetext{}} % \end{macrocode} @@ -5882,6 +5857,8 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\l@dlsn@te} % \begin{macro}{\l@drsn@te} @@ -7102,7 +7079,9 @@ }% \vskip\skip\csname #1footins\endcsname% \leftskip0pt \rightskip0pt - \csname #1footnoterule\endcsname\noindent\leavevmode} + \csname #1footnoterule\endcsname% + \vskip\csuse{afterXrule@#1}% + \noindent\leavevmode} % \end{macrocode} % \end{macro} % @@ -7141,9 +7120,11 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \setlength{\parindent}{0pt} {\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}} @@ -7296,6 +7277,8 @@ \expandafter\let\csname #1footfmt\endcsname=\parafootfmt \expandafter\let\csname #1footgroup\endcsname=\para@footgroup \count\csname #1footins\endcsname=1000 + \dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1} + \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1} \para@footsetup{#1} % \end{macrocode} % And the extra setup for minipages. @@ -7303,6 +7286,8 @@ \expandafter\let\csname mpv#1footnote\endcsname=\mppara@vfootnote \expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup \count\csname mp#1footins\endcsname=1000 + \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1} + \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1} } % \end{macrocode} % \end{macro} @@ -7365,7 +7350,9 @@ {}% }% \vskip\skip\csname #1footins\endcsname% - \csname #1footnoterule\endcsname\noindent\leavevmode} + \csname #1footnoterule\endcsname% + \vskip\csuse{afterXrule@#1}% + \noindent\leavevmode} % \end{macrocode} % \end{macro} % @@ -7573,6 +7560,8 @@ % \begin{macrocode} \newcommand*{\para@footgroup}[1]{% \unvbox\csname #1footins\endcsname + \ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}% + \ifcsstring{Xragged@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}% \csuse{Xnotefontsize@#1} @@ -7595,11 +7584,15 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \unvbox\csname mp#1footins\endcsname + \ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}% + \ifcsstring{Xragged@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}% \csuse{Xnotefontsize@#1} @@ -7842,9 +7835,11 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par \splittopskip=\ht\strutbox @@ -7949,9 +7944,11 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par \splittopskip=\ht\strutbox @@ -8219,7 +8216,8 @@ \vskip\skip\csname footins#1\endcsname% \leftskip=\z@ \rightskip=\z@ - \@nameuse{footnoterule#1}} + \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}} % \end{macrocode} % \end{macro} @@ -8256,9 +8254,11 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \unvbox\@nameuse{mpfootins#1}} @@ -8428,9 +8428,11 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \splittopskip=\ht\strutbox \expandafter @@ -8529,9 +8531,11 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \splittopskip=\ht\strutbox \expandafter @@ -8557,9 +8561,13 @@ \expandafter\let\csname footgroup#1\endcsname=\para@footgroupX \expandafter\let\csname footnoterule#1\endcsname=\normalfootnoteruleX \count\csname footins#1\endcsname=1000 + \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1} + \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1} \expandafter\let\csname mpvfootnote#1\endcsname=\mppara@vfootnoteX \expandafter\let\csname mpfootgroup#1\endcsname=\mppara@footgroupX \count\csname mpfootins#1\endcsname=1000 + \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1} + \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1} \para@footsetupX{#1}} % \end{macrocode} @@ -8595,7 +8603,9 @@ \rightskip=\z@ \parindent=\z@ \vskip\skip\@nameuse{footins#1}% - \@nameuse{footnoterule#1}} + \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% + } % \end{macrocode} % \end{macro} @@ -8657,6 +8667,8 @@ % \begin{macrocode} \newcommand*{\para@footgroupX}[1]{% \unvbox\csname footins#1\endcsname + \ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}% + \ifcsstring{raggedX@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{\unhbox0 \removehboxes}% \csuse{notefontsizeX@#1} @@ -8673,11 +8685,15 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \unvbox\csname mpfootins#1\endcsname + \ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}% + \ifcsstring{raggedX@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{\unhbox0 \removehboxes}% \csuse{notefontsizeX@#1} @@ -8978,10 +8994,12 @@ % \end{macrocode} % \subsection{Create all commands to memorize display options} % \begin{macrocode} - \newtoggle{Xlemmadisablefontselection@#1} - \newtoggle{Xendlemmadisablefontselection@#1} + \newtoggle{Xlemmadisablefontselection@#1} + \newtoggle{Xendlemmadisablefontselection@#1} \csgdef{Xhangindent@#1}{0pt}% - \csgdef{hangindentX@#1}{0pt} + \csgdef{hangindentX@#1}{0pt}% + \csgdef{Xragged@#1}{}% + \csgdef{raggedX@#1}{}% \csgdef{hsizetwocol@#1}{0.45 \hsize}% \csgdef{hsizetwocolX@#1}{0.45 \hsize}% \csgdef{hsizethreecol@#1}{.3 \hsize}% @@ -9017,6 +9035,8 @@ \csgdef{parafootsep@#1}{\parafootftmsep}% \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em} \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em} + \csgdef{afterXrule@#1}{0pt} + \csgdef{afterruleX@#1}{0pt} \csgdef{txtbeforeXnotes@#1}{} \csgdef{maxhnotesX@#1}{\ledfootinsdim}% \csgdef{maxhXnotes@#1}{\ledfootinsdim} @@ -9221,6 +9241,10 @@ \newhookcommand@series{hangindentX} +\newhookcommand@series{Xragged} + +\newhookcommand@series{raggedX} + \newhookcommand@series{hsizetwocol} \newhookcommand@series{hsizethreecol} @@ -9277,10 +9301,16 @@ \newhookcommand@series{txtbeforeXnotes} +\newhookcommand@series{afterruleX} + +\newhookcommand@series{afterXrule} + % \end{macrocode} % \end{macro} % \begin{macro}{\newhookcommand@series@reload} -% \changes{v1.8.0}{2013/11/24}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which didn'nt work.} +% \changes{v1.8.0}{2013/11/24}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which did'nt work.} +% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which did'nt work when called after \cs{footparagraphX}.} +% \changes{v1.12.0}{2014/08/05}{Debug \cs{beforeXnotes} and \cs{maxhXnotes} which did'nt work when called after \cs{footparagraph}.} % \cs{newhookcommand@series@reload} does the same thing as \cs{newhookcommand@series} % but the commands created by this macro also reload the series displaying (normal, paragraph, twocol) % \begin{macrocode} @@ -9796,7 +9826,7 @@ % \end{macrocode} % If the \Lclass{memoir} class is loaded we hook into its modified % \verb?\@doclearpage?. -% \begin{macro}{\@mem@extranofeet} +% \begin{macro}{\@mem@extranofeet} % \begin{macrocode} \g@addto@macro{\@mem@extranofeet}{% \def\do#1{\ifvoid\csuse{#1footins}\else\@mem@nofootfalse\fi% @@ -9948,9 +9978,11 @@ % Use code from the kernel \cs{label} command to write the correct % page number (it seems possible that the original \edmac's \cs{page@num} % scheme might also have had problems in this area). +% Also define an hypertarget if \Lpack{hyperref} package is loaded. % \begin{macrocode} \protected@write\@auxout{}% {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}% + \ifcsdef{hypertarget}{\hypertarget{#1}{}}{}% \@esphack} % \end{macrocode} @@ -10020,7 +10052,7 @@ % The \cs{@lab} command, which appears in the \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{@l}, and the \cs{sub@on} and \cs{sub@off} commands +% \cs{@page}, \cs{@nl}, and the \cs{sub@on} and \cs{sub@off} commands % appearing in the \cs{linenum@out} file. % % LaTeX uses the \texttt{page} counter for page numbers. However, @@ -10039,7 +10071,16 @@ % \end{macrocode} % \end{macro} -% +% \begin{macro}{\wrap@edcrossref} +% \cs{wrap@edcrossref} is called around all eledmac crossref command, except those which start by x. It adds the hyperlink. +% \begin{macrocode} +\newcommand{\wrap@edcrossref}[2]{% + \ifdef{\hyperlink}% + {\hyperlink{#1}{#2}}% + {#2} +} +% \end{macrocode} +% \end{macro} % \begin{macro}{\edpageref} % \begin{macro}{\xpageref} % If the specified label exists, \cs{edpageref} gives its page number. @@ -10054,7 +10095,7 @@ % LaTeX already defines a \cs{pageref}, so changing the name % to \cs{edpageref}. % \begin{macrocode} -\newcommand*{\edpageref}[1]{\l@dref@undefined{#1}\l@dgetref@num{1}{#1}} +\newcommand*{\edpageref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{1}{#1}}} \newcommand*{\xpageref}[1]{\l@dgetref@num{1}{#1}} % \end{macrocode} @@ -10065,7 +10106,7 @@ % \begin{macro}{\xlineref} % If the specified label exists, \cs{lineref} gives its line number. % \begin{macrocode} -\newcommand*{\lineref}[1]{\l@dref@undefined{#1}\l@dgetref@num{2}{#1}} +\newcommand*{\lineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}}} \newcommand*{\xlineref}[1]{\l@dgetref@num{2}{#1}} % \end{macrocode} @@ -10076,7 +10117,7 @@ % \begin{macro}{\xsublineref} % If the specified label exists, \cs{sublineref} gives its sub-line number. % \begin{macrocode} -\newcommand*{\sublineref}[1]{\l@dref@undefined{#1}\l@dgetref@num{3}{#1}} +\newcommand*{\sublineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{3}{#1}}} \newcommand*{\xsublineref}[1]{\l@dgetref@num{3}{#1}} % \end{macrocode} @@ -10087,8 +10128,9 @@ % \begin{macro}{\xpstartref} % If the specified label exists, \cs{pstartref} gives its pstart number. % \begin{macrocode} -\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\l@dgetref@num{4}{#1}} +\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{4}{#1}}} \newcommand*{\xpstartref}[1]{\l@dgetref@num{4}{#1}} + % \end{macrocode} % \end{macro} % \end{macro} @@ -10245,14 +10287,26 @@ % These are the sidenote equivalents to \cs{line@margin} and \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: +% \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}{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}.} % \begin{macrocode} \newcount\sidenote@margin \newcommand*{\sidenotemargin}[1]{{% \l@dgetsidenote@margin{#1}% \ifnum\@l@dtempcntb>\m@ne - \global\sidenote@margin=\@l@dtempcntb + \ifledRcol + \global\sidenote@marginR=\@l@dtempcntb + \else + \global\sidenote@margin=\@l@dtempcntb + \fi \fi}} \newcommand*{\l@dgetsidenote@margin}[1]{% \def\@tempa{#1}\def\@tempb{left}% @@ -10324,52 +10378,95 @@ % % \begin{macro}{\ledleftnote} % \begin{macro}{\ledrightnote} +% \begin{macro}{\ledinnernote} +% \begin{macro}{\ledouterote} % \begin{macro}{\ledsidenote} -% \verb?\ledleftnote?\marg{text} and \verb?\ledrightnote?\marg{text} are the -% user commands for left and right sidenotes. \verb?\ledsidenote?\marg{text} -% is the command for a moveable sidenote. +% \cs{ledleftnote}, \cs{ledrightnote}, \cs{ledinnernote}, \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. +% \verb?\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}}} -\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}} +\newcommand*{\ledinnernote}[1]{% + \ifodd\page@num% + \ledleftnote{#1}% + \else% + \ledrightnote{#1}% + \fi% +} + +\newcommand*{\ledouternote}[1]{% + \ifodd\page@num% + \ledrightnote{#1}% + \else% + \ledleftnote{#1}% + \fi% +} +\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % % \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 \Lpack{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} \newif\ifrightnoteup \rightnoteuptrue + \newcommand*{\l@dlsnote}[1]{% \begingroup% \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne + \ifledRcol% + \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% + \to\inserts@listR + \global\advance\insert@countR \@ne% + \else% + \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% + \to\inserts@list + \global\advance\insert@count \@ne% + \fi \fi\ignorespaces\endgroup} + \newcommand*{\l@drsnote}[1]{% \begingroup% \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne + \ifledRcol% + \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% + \to\inserts@listR + \global\advance\insert@countR \@ne% + \else% + \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% + \to\inserts@list + \global\advance\insert@count \@ne% + \fi \fi\ignorespaces\endgroup} -\newcommand*{\l@dcsnote}[1]{\begingroup% + +\newcommand*{\l@dcsnote}[1]{% + \begingroup% \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne + \ifledRcol% + \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% + \to\inserts@listR + \global\advance\insert@countR \@ne% + \else% + \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% + \to\inserts@list + \global\advance\insert@count \@ne% + \fi \fi\ignorespaces\endgroup} % \end{macrocode} @@ -10381,10 +10478,59 @@ % \begin{macro}{\vl@drsnote} % \begin{macro}{\vl@dcsnote} % Put the left/right text into boxes, but just save the moveable text. -% \cs{l@dcsnotetext} is a etoolbox list (comma separated) +% \cs{l@dcsnotetext}, \cs{l@dcsnotetext@l} and \cs{l@dcsnotetext@r} are etoolbox 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: +% \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. +% \end{itemize} +% \item Store the content of \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. +% \end{itemize} +% \end{itemize} % \begin{macrocode} -\newcommand*{\vl@dlsnote}[1]{\setl@dlp@rbox{#1}} -\newcommand*{\vl@drsnote}[1]{\setl@drp@rbox{#1}} +\newcommand*{\vl@dlsnote}[1]{% + \ifledRcol@% + \@l@dtempcntb=\sidenote@marginR% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@numR% + \fi% + \else% + \@l@dtempcntb=\sidenote@margin% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@num% + \fi% + \fi% + \ifodd\@l@dtempcntb% + \listgadd{\l@dcsnotetext@l}{#1}% + \else% + \listgadd{\l@dcsnotetext}{#1}% + \fi +} +\newcommand*{\vl@drsnote}[1]{% + \ifledRcol@% + \@l@dtempcntb=\sidenote@marginR% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@numR% + \fi% + \else% + \@l@dtempcntb=\sidenote@margin% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@num% + \fi% + \fi% + \ifodd\@l@dtempcntb% + \listgadd{\l@dcsnotetext}{#1}% + \else% + \listgadd{\l@dcsnotetext@r}{#1}% + \fi% +} \newcommand*{\vl@dcsnote}[1]{\listgadd{\l@dcsnotetext}{#1}} % \end{macrocode} @@ -10451,7 +10597,7 @@ \dolistloop{\l@dcsnotetext}% \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@num\space p. \the\page@num,}}{}% % \end{macrocode} -% And now, the main part of the macro +% And we do the same for left and right notes (not movable). % \begin{macrocode} \gdef\@templ@d{}% \ifx\@templ@d\l@dcsnotetext \else% @@ -10468,14 +10614,24 @@ \fi% \ifodd\@l@dtempcntb% \setl@drp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@l}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space leftnotes on line \the\line@num\space p. \the\page@num,}}{}% + \setl@dlp@rbox{\sidenotecontent@}% \else% \setl@dlp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@r}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space rightnotes on line \the\line@num\space p. \the\page@num,}}{}% + \setl@drp@rbox{\sidenotecontent@}% \fi% \fi% -\fi} + \fi% +} % \end{macrocode} -% \end{macro} -% +% \end{macro}% % % % @@ -10498,14 +10654,14 @@ % \begin{macrocode} \newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini} \newcommand*{\l@dfeetendmini}{% - \IfStrEq{critical-familiar}{\@mpfnpos}% - {\l@dedendmini\l@dfamendmini}% - {% - \IfStrEq{familiar-critical}{\@mpfnpos}% - {\l@dfamendmini\l@dedendmini}% - {\l@dedendmini\l@dfamendmini}% - }% - }% + \IfStrEq{critical-familiar}{\@mpfnpos}% + {\l@dedendmini\l@dfamendmini}% + {% + \IfStrEq{familiar-critical}{\@mpfnpos}% + {\l@dfamendmini\l@dedendmini}% + {\l@dedendmini\l@dfamendmini}% + }% + }% % \end{macrocode} % \end{macro} % \end{macro} @@ -10729,8 +10885,22 @@ % \section{Indexing} % % \changes{v1.5}{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.} % Here's some code for indexing using page \& line numbers. % +% \begin{macro}{\ifeledmac@check@imakeidx@} +% First, ensure that \Lpack{imakeidx} is loaded \emph{before} \Lpack{eledmac}. +% \changes{v1.12.0}{2014/08/05}{Ensure that \Lpack{imakeidx} is loaded \emph{before} \Lpack{eledmac}} +% \begin{macrocode} +\newif\ifeledmac@after@imakeidx@ +\@ifpackageloaded{imakeidx}{\eledmac@after@imakeidx@true}{} +\AtBeginDocument{% + \ifeledmac@after@imakeidx@\else% + \@ifpackageloaded{imakeidx}{\eledmac@error{Imakeidx must be loaded before eledmac.}}{}% + \fi +} +% \end{macrocode} +% \end{macro} % \begin{macro}{\pagelinesep} % \begin{macro}{\edindexlab} % \begin{macro}{\c@labidx} @@ -10760,7 +10930,7 @@ % This macro makes up the page/line number combo from the label/ref. % \begin{macrocode} \newcommand{\thepageline}{% - \thepage\pagelinesep\lineref{\edindexlab\thelabidx}} + \thepage\pagelinesep\xlineref{\edindexlab\thelabidx}} % \end{macrocode} % \end{macro} % @@ -10793,9 +10963,24 @@ % \end{macrocode} % \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+|+. -% \begin{macrocode} -\def\get@index@command#1|#2{\gdef\@index@command{#2}\gdef\@index@txt{#1}} +% 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.} +% \begin{macrocode} +\def\get@index@command#1|#2+{% + \gdef\@index@txt{#1}% + \gdef\@index@command{#2}% + \xdef\@index@parenthesis{}% + \IfBeginWith{\@index@command}{(}{% + \StrGobbleLeft{\@index@command}{1}[\@index@command@]% + \global\let\@index@command\@index@command@% + \xdef\@index@parenthesis{(}% + }{}% + \IfBeginWith{\@index@command}{)}{% + \StrGobbleLeft{\@index@command}{1}[\@index@command@]% + \global\let\@index@command\@index@command@% + \xdef\@index@parenthesis{)}% + }{}% +} % \end{macrocode} % \end{macro} % \begin{macro}{\ledinnote} @@ -10926,19 +11111,21 @@ % % \begin{macro}{\@wredindex} % Write the index information to the \file{idx} file. +% \changes{v1.12.0}{2014/08/05}{Use correctly default index when \Lpack{imakeidx} is loaded.} % \begin{macrocode} - \newcommandx{\@wredindex}[2][1=\jobname,usedefault]{%#1 = the index name, #2 = the text + \newcommandx{\@wredindex}[2][1=\expandonce\jobname,usedefault]{%#1 = the index name, #2 = the text \ifl@imakeidx% \if@edindex@fornote@% - \IfSubStr[1]{#2}{|}{\get@index@command#2}{\get@index@command#2|}% + \IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}% \expandafter\imki@wrindexentry{#1}{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}% \expandafter\imki@wrindexentry{#1}{\@index@txt|)ledinnote{\@index@command}}{\theendpageline}% \else% - \imki@wrindexentry{#1}{#2}{\thepageline}% + \get@edindex@hyperref{#2}% + \imki@wrindexentry{#1}{\@index@txt\@edindex@hyperref}{\thepageline}% \fi% \else% \if@edindex@fornote@% - \IfSubStr[1]{#2}{|}{\get@index@command#2}{\get@index@command#2|}% + \IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}% \expandafter\protected@write\@indexfile{}% {\string\indexentry{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline} }% @@ -10962,6 +11149,36 @@ % \end{macrocode} % +% \subsection{Hyperref compatibility} +% \begin{macro}{\hyperlinkformat} +% \cs{hyperlinkformat} command is to be used to have both a internal hyperlink and a format, when indexding. +% \begin{macrocode} +\newcommand{\hyperlinkformat}[3]{% + \ifstrempty{#1}% + {\hyperlink{#2}{#3}}% + {\csuse{#1}{\hyperlink{#2}{#3}}% + }} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\get@edindex@hyperref} +% \begin{macro}{\@edindex@hyperref} +% \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}. +% \begin{macrocode} +\newcommand{\get@edindex@hyperref}[1]{% + \ifcsdef{hyperlink}% + {\IfSubStr{#1}{|}% + {\get@index@command#1+% + \gdef\@edindex@hyperref{|\@index@parenthesis % + hyperlinkformat{\@index@command} + {\edindexlab\thelabidx}}}% + {\get@index@command#1|+ + \gdef\@edindex@hyperref{|hyperlink{\edindexlab\thelabidx}}}% + }% + {\gdef\@edindex@hyperref{}}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\l@d@@wrindexhyp} % If the \Lpack{hyperref} package is not loaded, it doesn't make sense % to clutter up the index with hyperreffing things. @@ -10969,7 +11186,7 @@ \AtBeginDocument{\@ifpackageloaded{hyperref}{}{% \def\l@d@@wrindexhyp#1||\\{% \ifshowindexmark\@showidx{#1}\fi - \IfSubStr[1]{#1}{|}{\get@index@command#1}{\get@index@command#1|}% + \IfSubStr[1]{#1}{|}{\get@index@command#1+}{\get@index@command#1|+}% \if@edindex@fornote@% \protected@write\@auxout{}% {\string\@@wrindexm@m{\@idxfile}{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}}% @@ -11322,7 +11539,7 @@ % the user may initiate these penalties to indicate good and bad % places in the stanza for page breaking. % \begin{macrocode} -\def\stanza@line{ +\newcommandx{\stanza@line}[1][1]{ \ifnum\value{stanzaindentsrepetition}=0 \parindent=\csname sza@\number\stanza@count @\endcsname\stanzaindentbase @@ -11331,7 +11548,7 @@ @\endcsname\stanzaindentbase \managestanza@modulo \fi - \pstart\stanza@hang\ignorespaces} + \pstart[#1]\stanza@hang\ignorespaces} \xdef\stanza@hang{\noexpand\leavevmode\noexpand\startlock \hangindent\expandafter \noexpand\csname sza@0@\endcsname\stanzaindentbase @@ -11346,9 +11563,15 @@ % % \begin{macro}{\startstanzahook} % \begin{macro}{\endstanzaextra} +% \begin{macro}{\@startstanza} % \begin{macro}{\stanza} +% \begin{macro}{\@stopstanza} +% \begin{macro}{\newverse} % \begin{macro}{\falseverse} % \changes{v1.6.0}{2013/10/09}{Add \cs{falseverse} macro.} +% \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 a optional argument: content to be printed before.} +% \changes{v1.12.0}{2014/08/05}{\ampersand can have a optional argument: content to be printed after.} % Now we have the components of the \verb+\stanza+ macro, % which appears at the start of a group of lines. This macro % initializes the count and checks to see if hanging indentation @@ -11359,8 +11582,7 @@ % \verb+\endlock+. Here and above we have used \verb+\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 \&. The macro \cs{falseverse} can be -% use to add stanza not numbered and with no impact on the next indent. +% delimited by ampersands \&. % The last line of the stanza must % end with \verb+\&+. % For convenience the macro @@ -11375,32 +11597,50 @@ % \begin{macrocode} \let\startstanzahook\relax \let\endstanzaextra\relax -\xdef\stanza{\noexpand\instanzatrue\expandafter - \begingroup\startstanzahook% - \catcode`\noexpand\&\active% - \global\stanza@count\@ne\stanza@modulo\@ne - \noexpand\ifnum\expandafter\noexpand - \csname sza@0@\endcsname=\z@\let\noexpand\stanza@hang\relax - \let\noexpand\endlock\relax\noexpand\else\interlinepenalty - \@M\rightskip\z@ plus 1fil\relax\noexpand\fi\noexpand\ifnum - \expandafter\noexpand\csname szp@0@\endcsname=\z@ - \let\noexpand\sza@penalty\relax\noexpand\fi% +\xdef\@startstanza[#1]{% + \noexpand\instanzatrue\expandafter + \begingroup\startstanzahook% + \catcode`\noexpand\&\active% + \global\stanza@count\@ne\stanza@modulo\@ne + \noexpand\ifnum\expandafter\noexpand + \csname sza@0@\endcsname=\z@\let\noexpand\stanza@hang\relax + \let\noexpand\endlock\relax\noexpand\else\interlinepenalty + \@M\rightskip\z@ plus 1fil\relax\noexpand\fi\noexpand\ifnum + \expandafter\noexpand\csname szp@0@\endcsname=\z@ + \let\noexpand\sza@penalty\relax\noexpand\fi% \def\noexpand\falseverse{% + \noexpand\eledmac@warning{\string\falseverse\space deprecated. Look at \string\newverse\space instead.} \global\advance\stanza@modulo-\@ne% \global\advance\stanza@count-\@ne% \relax\noexpand&\leavevmode\skipnumbering} - \def\noexpand&{% - \noexpand\endlock\noexpand\pend\noexpand\sza@penalty\global% - \advance\stanza@count\@ne\noexpand\stanza@line}% - \def\noexpand% - \&{\noexpand\endlock\noexpand\pend\endgroup\noexpand\instanzafalse\expandafter\endstanzaextra}% - \noexpand\stanza@line} + \def\noexpand&{% + \noexpand\newverse[][]}% + \def\noexpand\&{\noexpand\@stopstanza}% + \noexpand\stanza@line[#1]} + +\newcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1]} + +\newcommandx{\@stopstanza}[1][1,usedefault]{% + \endlock% + \pend[#1]% + \endgroup% + \instanzafalse% + \endstanzaextra% +} + +\newcommandx*{\newverse}[2][1,2,usedefault]{% + \endlock\pend[#1]\sza@penalty\global% + \advance\stanza@count\@ne\stanza@line[#2]% + } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % \begin{macro}{\flagstanza} % Use \verb?\flagstanza[len]{text}? at the start of a line to put \texttt{text} % a distance \texttt{len} before the start of the line. The default for @@ -12754,9 +12994,663 @@ % % % +% \section{Section's title commands} +% \subsection{Deprecated commands} +% \begin{macro}{\initnumbering@sectcmd} +% \begin{macro}{\ledsection} +% \begin{macro}{\ledsection*} +% \begin{macro}{\ledsubsection} +% \begin{macro}{\ledsubsection*} +% \begin{macro}{\ledsubsubsection} +% \begin{macro}{\ledsubsubsection*} +% \begin{macro}{\ledchapter} +% \begin{macro}{\ledchapter*} +% \begin{macro}{\@patchforledchapter} +% \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}{2012/10/08}{Compatibility of \cs{ledchapter} with the \emph{memoir} class.} +% \changes{v1.3}{2012/11/01}{\emph{Quotation} and {quote} environment inside the numbering 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.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@sectcmd} defines \cs{ledxxx} commands. These commands are deprecated. +% It also defines quotation environment. +% Note: this assumes that the user didn't change \cs{chapter}. +% If he did, he should redefine \cs{initnumbering@sectcmd}. +% \begin{macrocode} +\newcommand{\initnumbering@sectcmd}{ + \newcommand{\ledsection}[2][]{\eledmac@warning{\string\ledsection\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi%% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \WithSuffix\newcommand\ledsection*[1]{\eledmac@warning{\string\ledsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \newcommand{\ledsubsection}[2][]{\eledmac@warning{\string\ledsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \WithSuffix\newcommand\ledsubsection*[1]{\eledmac@warning{\string\ledsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \newcommand{\ledsubsubsection}[2][]{\eledmac@warning{\string\ledsubsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \WithSuffix\newcommand\ledsubsubsection*[1]{\eledmac@warning{\string\ledsubsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \newcommand\ledchapter[2][]{% + \eledmac@warning{\string\ledchapter\space deprecated}% + \ifl@dmemoir% + \gdef\ch@pt@c{##1}% + \fi% + ~\pend\skipnumbering% + \pstart% + \@patchforledchapter\chapter[##1]{##2}% + \pend\pstart} + \WithSuffix\newcommand\ledchapter*[1]{% + \eledmac@warning{\string\ledchapter*\space deprecated}% + ~\pend\skipnumbering% + \pstart% + \@patchforledchapter\chapter*{##1}\pend% + \pstart} + \def\@patchforledchapter{ + \patchcmd{\@makeschapterhead}{1\par}{1}{}{} + \pretocmd{\@makeschapterhead}{\par}{}{} + \apptocmd{\@makeschapterhead}{\par}{}{} + \patchcmd{\@makeschapterhead}{\vskip 40\p@}{}{}{} + \patchcmd{\@makechapterhead}{1\par}{1}{}{} + \pretocmd{\@makechapterhead}{\par}{}{} + \apptocmd{\@makechapterhead}{\par}{}{} + \patchcmd{\@makechapterhead}{\vskip 40\p@}{}{}{} + \apptocmd{\@chapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} + \apptocmd{\@schapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} + \newcommand\beforeledchapter{\pend\cleardoublepage\pstart} + \patchcmd{\chapter}{\cleardoublepage}{\relax}{}{} + \patchcmd{\chapter}{\clearpage}{\relax}{}{} + } + \ifnoquotation@\else + \renewcommand{\quotation}{\par\leavevmode% + \parindent=1.5em% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + \global\leftskip=\leftmargin% + \global\rightskip=\leftmargin% + } + \renewcommand{\endquotation}{\par% + \global\leftskip=0pt% + \global\rightskip=0pt% + \leavevmode% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + } + \renewcommand{\quote}{\par\leavevmode% + \parindent=0pt% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + \global\leftskip=\leftmargin% + \global\rightskip=\leftmargin% + } + \renewcommand{\endquote}{\par% + \global\leftskip=0pt% + \global\rightskip=0pt% + \leavevmode% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + } + \fi +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\ledsectnotoc} +% The \cs{ledsectnotoc} only disables the \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. +% \begin{macrocode} +\newcommand{\ledsectnomark}{% + \let\chaptermark\@gobble% + \let\sectionmark\@gobble% + \let\subsectionmark\@gobble% +} +% \end{macrocode} +% \end{macro} +% +% \subsection{New commands : \cs{eledxxx}} +% The new system of \cs{eledxxxx} commands to section text work like this: +% \begin{enumerate} +% \item When one of these commands is called, \Lpack{eledmac} 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 pstart where the command is called. +% \item If we have starred version or not. +% \end{itemize} +% \item \Lpack{eledmac} adds the title of the section to pstart, as normal content. This is to enable critical notes. +% \item When \LaTeX\ is run a other time, this file is read. That: +% \begin{itemize} +% \item Adds the pstart number to a list of pstarts where a sectioning command is used. +% \item Defines a command, the name of which contains the pstart number, and which calls the normal \LaTeX\ sectioning command. +% \end{itemize} +% \item This last command is called when the pstart is effectively printed. +% \end{enumerate} +% +% \begin{macro}{\beforeeledchapter} +% For technical reasons, not yet solved, page-breaking before chapters can't be made automatically by eledmac. Users have to us \cs{beforeeledchapter}. +% \begin{macrocode} +\ifl@dmemoir + \newcommand\beforeeledchapter{\clearforchapter} +\else + \newcommand\beforeeledchapter{\if@openright\cleardoublepage\else\clearpage\fi} +\fi +% \end{macrocode} +% \end{macro} +% \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. +% \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 eledmac inside the code of sectioning command, in order to affix lines numbers. +% They include tests for RTL languages. +% \begin{macrocode} +\def\print@rightmargin@eledsection{% + \if@eled@sectioning% + \begingroup% + \if@RTL% + \let\llap\rlap% + \let\leftlinenum\rightlinenum% + \let\leftlinenumR\rightlinenumR% + \let\l@drd@ta\l@dld@ta% + \let\l@drsn@te\l@dlsn@te% + \fi% + \hfill\l@drd@ta \csuse{LR}{\l@drsn@te}% + \endgroup% + \fi% +}% + +\def\print@leftmargin@eledsection{% + \if@eled@sectioning% + \leavevmode% + \begingroup% + \if@RTL% + \let\rlap\llap% + \let\rightlinenum\leftlinenum% + \let\rightlinenumR\leftlinenumR% + \let\l@dld@ta\l@drd@ta% + \let\l@dlsn@te\l@drsn@te% + \fi% + \l@dld@ta\csuse{LR}{\l@dlsn@te}% + \endgroup% + \fi% +}% + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\chapter} +% \begin{macro}{\M@sect} +% \begin{macro}{\@mem@old@ssect} +% \begin{macro}{\@makechapterhead} +% \begin{macro}{\@makechapterhead} +% \begin{macro}{\@makeschapterhead} +% \begin{macro}{\@sect} +% \begin{macro}{\@ssect} +% We have to patch \LaTeX, \Lclass{book} and \Lclass{memoir} sectioning commands in order to: +% \begin{itemize} +% \item Disable \cs{edtext} inside. +% \item Disable page breaking (for \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. % +% +% \begin{macrocode} +\catcode`\#=12 % Space NEEDS by \catcode +\AtBeginDocument{% +\patchcmd{\chapter}{\clearforchapter}{% + \ifnumbering\else% + \clearforchapter + \fi% + } + {} + {} + +\pretocmd{\M@sect} + {\let\old@edtext=\edtext% + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\M@sect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\M@sect} + { #9} + { #9% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\M@sect} + {\hskip #3\relax} + {\hskip #3\relax% + \print@leftmargin@eledsection% + } + {} + {} + +\pretocmd{\@mem@old@ssect} + {\let\old@edtext=\edtext% + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\@mem@old@ssect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\@mem@old@ssect} + {#5} + {#5% + \print@leftmargin@eledsection% + } + {} + {} + +\patchcmd{\@mem@old@ssect} + {\hskip #1} + {\hskip #1% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{% + \if@eled@sectioning\else% + \leavevmode\if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection : will make the critical notes not in the same page than title. + \fi% + }% + {}% + {}% + +\patchcmd{\@makechapterhead} + {#1} + {\print@leftmargin@eledsection% + #1% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\@makechapterhead}% For BIDI + {\if@RTL\raggedleft\else\raggedright\fi}% + {\if@eled@sectioning\else% + \if@RTL\raggedleft\else\raggedright\fi% + \fi% + }% + {}% + {}% + +\patchcmd{\@makeschapterhead} + {#1} + {\print@leftmargin@eledsection% + #1% + \print@rightmargin@eledsection% + } + {} + {} + +\pretocmd{\@sect} + {\let\old@edtext=\edtext + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\@sect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\@sect} + {#8} + {#8% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\@sect} + {\hskip #3\relax} + {\hskip #3\relax% + \print@leftmargin@eledsection% + } + {} + {} + +\pretocmd{\@ssect} + {\let\old@edtext=\edtext% + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\@ssect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\@ssect} + {#5} + {#5% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\@ssect} + {\hskip #1} + {\hskip #1% + \print@leftmargin@eledsection% + } + {} + {} +}% +\catcode`\#=6 %Space NEEDS by \catcode +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\eled@sectioning@out} +% \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} +% \end{macro} +% \begin{macro}{\eledchapter} +% \begin{macro}{\eledsection} +% \begin{macro}{\eledsubsection} +% \begin{macro}{\eledsubsubsection} +% \begin{macro}{\eledchapter*} +% \begin{macro}{\eledsection*} +% \begin{macro}{\eledsubsection*} +% \begin{macro}{\eledsubsubsection*} +% And now, the user sectioning commands, which write to the file, and also add content as a "normal" line. +% \begin{macrocode} +\newcommand{\eledchapter}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} + +\newcommand{\eledsection}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} + +\newcommand{\eledsubsection}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} +\newcommand{\eledsubsubsection}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} + + +\WithSuffix\newcommand\eledchapter*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledsection*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledsubsection*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledsubsubsection*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\eled@chapter} +% \begin{macro}{\eled@section} +% \begin{macro}{\eled@subsection} +% \begin{macro}{\eled@subsubsection} +% The sectioning macros, called in the auxiliary file. They have five arguments: +% \begin{enumerate} +% \item Optional arguments of \LaTeX\ sectioning command. +% \item Mandatory arguments of \LaTeX\ sectioning command. +% \item Pstart number. +% \item Side: \verb+R+ if right, nothing if left. +% \item Starred or not. +% \end{enumerate} +% \begin{macrocode} +\def\eled@chapter#1#2#3#4#5{% + \ifstrempty{#4}% + {% + \ifstrempty{#1}% + {% + \global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}% + }%Need for \pairs, because of using parbox. + {% + \global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter[#1]{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}%Need for \pairs, because of using parbox. + }% + }% + {% + \ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter*{#2}}} + {\global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter*[#1]{#2}}}%Bug in LaTeX! + }% + \listcsgadd{eled@sections#5@@}{#3}% + } +\def\eled@section#1#2#3#4#5{% + \ifstrempty{#4}% + {\ifstrempty{#1}% + {% + \global\csdef{eled@sectioning@#3#5}{\section{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#2}}%Need for \pairs, because of using parbox. + }% + {% + \global\csdef{eled@sectioning@#3#5}{\section[#1]{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#1}}%Need for \pairs, because of using parbox. + }% + }% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\section*{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\section*[#1]{#2}}}%Bug in LaTeX! + } + \listcsgadd{eled@sections#5@@}{#3}% + } +\def\eled@subsection#1#2#3#4#5{% + \ifstrempty{#4}% + {\ifstrempty{#1}% + {% + \global\csdef{eled@sectioning@#3#5}{\subsection{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#2}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book) + }% + {% + \global\csdef{eled@sectioning@#3#5}{\subsection[#1]{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#1}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book) + }% + }% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\subsection*{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\subsection*[#1]{#2}}}%Bug in LaTeX! + } + \listcsgadd{eled@sections#5@@}{#3}% + } +\def\eled@subsubsection#1#2#3#4#5{% + \ifstrempty{#4}% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection[#1]{#2}}}% + }% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection*{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection*[#1]{#2}}}%Bug in LaTeX! + } + \listcsgadd{eled@sections#5@@}{#3}% + } + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % \section{Page breaking or no page breaking depending of specific lines} -% By default, page breaks are automatic. However, the use can define lines which will force page breaks, or prevent page breaks around one specific line. +% By default, page breaks are automatic. However, the user can define lines which will force page breaks, or prevent page breaks around one specific line. % 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} @@ -12934,6 +13828,14 @@ % \setcounter{stanzaindentsrepetition}{2} % \setstanzaindents{5,0,1} % \end{verbatim} +% \subsection{Migration to eledmac 1.12.0} +% The migration to eledmac 1.12.0 is easy: +% \begin{itemize} +% \item You must delete all the auxiliary files, and so one, make the normal three runs. +% \item If you have modified \cs{l@reg}, which is not advisable, you must rename it to \cs{@nl@reg}. +% \end{itemize} +% +% The version 1.12.0 adds new best way to manage section title inside numbered text. Please read §~\ref{eledsection} (p.~\pageref{eledsection}). % \clearpage % \bibliographystyle{alpha} % \phantomsection diff --git a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx index cfb74f23010..cae0c298ca7 100644 --- a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx +++ b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx @@ -51,7 +51,7 @@ % % \fi % -% \CheckSum{4483} +% \CheckSum{4628} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters @@ -134,6 +134,19 @@ % \my@changes#1\@nil % }% %\makeatother +% \newcommand{\Lpack}[1]{\textsf{#1}} +% \newcommand{\Lclass}[1]{\textsf{#1}} +% \newcommand{\file}[1]{\texttt{#1}} +% \newcommand{\eledpar}{eledpar} +% \newcommand{\eledmac}{eledmac} +% \newcommand{\Eledmac}{\Lpack{\eledmac}} +% \newcommand{\Eledpar}{\Lpack{\eledpar}} +% \newcommand{\edmac}{\texttt{EDMAC}} +% \newcommand{\tabmac}{\texttt{TABMAC}} +% \newcommand{\edstanza}{\texttt{EDSTANZA}} +% \newcommand{\texbook}{\textit{TeXbook}} +% \newcommand{\thetexbook}{\textit{The TeXbook}} +% % \changes{v0.1}{2004/12/10}{First public release} % \changes{v0.2}{2005/01/01}{Fix babel problems} % \changes{v0.3}{2005/03/24}{Reorganize for ledarab} @@ -159,20 +172,13 @@ % \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, possibility to insert something after \cs{pend}s / verses.} +% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, possibility to insert something between \cs{pstart}s / verse.} +% \changes{v1.8.0}{2014/08/05}{Add, as in eledmac, new system of sectioning commands.} % \hyphenation{man-u-script man-u-scripts} % -% \newcommand{\Lpack}[1]{\textsf{#1}} -% \newcommand{\Lclass}[1]{\textsf{#1}} -% \newcommand{\file}[1]{\texttt{#1}} -% \newcommand{\eledpar}{eledpar} -% \newcommand{\eledmac}{eledmac} -% \newcommand{\Eledmac}{\Lpack{\eledmac}} -% \newcommand{\Eledpar}{\Lpack{\eledpar}} -% \newcommand{\edmac}{\texttt{EDMAC}} -% \newcommand{\tabmac}{\texttt{TABMAC}} -% \newcommand{\edstanza}{\texttt{EDSTANZA}} -% \newcommand{\texbook}{\textit{TeXbook}} -% \newcommand{\thetexbook}{\textit{The TeXbook}} % % ^^A PW added following as the definitions are at some unknown elsewhere % \newcommand{\egstart}{} @@ -369,9 +375,30 @@ % 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. +% +% \DescribeMacro{\columnsposition} +% \changes{v1.8.0}{2014/08/05}{Add \cs{columnsposition}.} +% By default, columns are positioned to the right of the page. +% However, you use \cs{columnsposition}\verb+{L}+ to align them to the left, +% or \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. % % +% \DescribeMacro{\beforecolumnseparator}\DescribeMacro{\aftercolumnseparator} +% \changes{v1.8.0}{2014/08/05}{Add \cs{beforecolumnseparator} and \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 eledpar calculate them automatically. +% \begin{verbatim} +% \setlength{\beforecolumseparator}{length} +% \setlength{\aftercolumseparator}{length} +% \end{verbatim} +% If you want to come back to the previous behavior, just set them with a negative value. % \section{Facing pages}\label{pages} % % \DescribeEnv{pages} @@ -695,12 +722,17 @@ % % When you use \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 \Lpack{eledmac}, you must use one of the following commands to add side notes: \cs{ledsidenote}, \cs{ledleftnote}, \cs{ledrightnote}, \cs{ledouterote}, \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. % \section{Parallel ledgroups} % \changes{v1.6.0}{2013/12/13}{Add tool and documentation for parallel ledgroups} % You can also make parallel ledgroups (see the documentation of eledmac about ledgroups). % To do it you have: % \begin{itemize} -% \item To load \Lpack{eledpar} package with the \verb+parledgroup+ option, or to add \cs{\parledgrouptrue}. +% \item To load \Lpack{eledpar} package with the \verb+parledgroup+ option, or to add \cs{parledgrouptrue}. % \item To push each ledgroup between \cs{pstart}…\cs{pend} command. % \end{itemize} % See the following example: @@ -769,6 +801,15 @@ % \StopEventually{} % % \clearpage +% \section{Sectioning commands} +% \changes{v1.8.0}{2014/08/05}{New sectioning commands, as in eledmac.} +% The standard sectioning commands of eledmac are available, and provide parallel sectionings, for both two-column and two-page layout. +% \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). +% +% \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). % \section{Implementation overview}\label{overview} % % TeX is designed to process a single stream of text, which may include @@ -806,7 +847,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledpar}[2014/04/14 v1.7.0 eledmac extension for parallel texts] +\ProvidesPackage{eledpar}[2014/08/05 v1.8.0 eledmac extension for parallel texts]% % \end{macrocode} % With the option `shiftedpstarts' a long pstart one the left side (or in the right side) don't 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 shifted stop at every end of pages. @@ -927,26 +968,7 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\beginnumbering} -% For parallel processing the original \cs{beginnumbering} is extended -% to zero \cs{l@dnumpstartsL} --- the number of chunks to be processed. -% It also sets \cs{ifpst@rtedL} to FALSE. -% \begin{macrocode} -\providecommand*{\beginnumbering}{% - \ifnumbering - \led@err@NumberingStarted - \endnumbering - \fi - \global\l@dnumpstartsL \z@ - \global\pst@rtedLfalse - \global\numberingtrue - \global\advance\section@num \@ne - \initnumbering@reg - \message{Section \the\section@num}% - \line@list@stuff{\jobname.\extensionchars\the\section@num}% - \l@dend@stuff} -% \end{macrocode} -% \end{macro} +% \changes{v1.12.0}{2014/07/24}{\cs{beginnumbering} is defined only on \Lpack{eledmac}, not on \Lpack{eledpar}.} % % \begin{macro}{\beginnumberingR} % This is the right text equivalent of \cs{beginnumbering}, and begins @@ -976,10 +998,11 @@ \l@dend@stuff \setcounter{pstartR}{1} \begingroup - \initnumbering@sectcmd \initnumbering@sectcountR + \gdef\eled@sectionsR@@{} + \makeatletter\InputIfFileExists{\jobname.eledsec\the\section@numR R}{}{}\makeatother + \immediate\openout\eled@sectioningR@out=\jobname.eledsec\the\section@numR R\relax } - % \end{macrocode} % \end{macro} % @@ -1012,7 +1035,10 @@ \fi \else \led@err@NumberingNotStarted - \fi\endgroup} + \fi + \endgroup + \immediate\closeout\eled@sectioningR@out + } % \end{macrocode} % \end{macro} @@ -1048,6 +1074,7 @@ \led@mess@SectionContinued{\the\section@numR R}% \line@list@stuffR{\jobname.\extensionchars\the\section@numR R}% \l@dend@stuff + \initnumbering@sectcmd \else \led@err@numberingShouldHaveStarted \endnumberingR @@ -1326,7 +1353,7 @@ % \subsection{Line-number counters and lists} % % We need another set of counters and lists for the right text, -% corresponding to those in \Lpack{eledmac} for regualr or left text. +% corresponding to those in \Lpack{eledmac} for regular or left text. % % \begin{macro}{\line@numR} % \begin{macro}{\subline@numR} @@ -1481,14 +1508,14 @@ % % The macros with \verb"action" in their names contain all the code % that modifies the action-code list. -% \begin{macro}{\@l@regR} -% \begin{macro}{\@l} -% \cs{@l} does everything related to the start of a +% \begin{macro}{\@nl@regR} +% \begin{macro}{\@nl} +% \cs{@nl} does everything related to the start of a % new line of numbered text. Exactly what it does depends % on whether right text is being processed. % % \begin{macrocode} -\newcommand{\@l@regR}{% +\newcommand{\@nl@regR}{% \ifx\l@dchset@num\relax \else \advance\absline@numR \@ne \set@line@action @@ -1532,12 +1559,12 @@ \fi \fi} -\renewcommand*{\@l}[2]{% +\renewcommand*{\@nl}[2]{% \fix@page{#1}% \ifledRcol - \@l@regR + \@nl@regR \else - \@l@reg + \@nl@reg \fi} % \end{macrocode} @@ -2014,19 +2041,19 @@ % \end{macro} % % \begin{macro}{\new@lineL} -% The \cs{new@lineL} macro sends the \cs{@l} command to the left text +% The \cs{new@lineL} macro sends the \cs{@nl} command to the left text % line-list file, to mark the start of a new text line. % \begin{macrocode} \newcommand*{\new@lineL}{% - \write\linenum@out{\string\@l[\the\c@page][\thepage]}} + \write\linenum@out{\string\@nl[\the\c@page][\thepage]}} % \end{macrocode} % \end{macro} % \begin{macro}{\new@lineR} -% The \cs{new@lineR} macro sends the \cs{@l} command to the right text +% The \cs{new@lineR} macro sends the \cs{@nl} command to the right text % line-list file, to mark the start of a new text line. % \begin{macrocode} \newcommand*{\new@lineR}{% - \write\linenum@outR{\string\@l[\the\c@page][\thepage]}} + \write\linenum@outR{\string\@nl[\the\c@page][\thepage]}} % \end{macrocode} % \end{macro} % @@ -2290,6 +2317,7 @@ \newenvironment{pairs}{%} \l@dpairingtrue \l@dpagingfalse + \initnumbering@sectcmd }{% \l@dpairingfalse } @@ -2302,6 +2330,7 @@ \let\chapter\chapterinpages \l@dpairingtrue \l@dpagingtrue + \initnumbering@sectcmd \setlength{\Lcolwidth}{\textwidth}% \setlength{\Rcolwidth}{\textwidth}% }{% @@ -2339,16 +2368,15 @@ % \begin{macrocode} \newenvironment{Leftside}{% \ledRcolfalse - \let\beginnumbering\beginnumbering\setcounter{pstartL}{1} + \setcounter{pstartL}{1} \let\pstart\pstartL \let\thepstart\thepstartL \let\pend\pendL \let\memorydump\memorydumpL \Leftsidehook - \let\oldstanza\stanza - \renewcommand{\stanza}{\oldstanza\global\instanzaLtrue} + \let\old@startstanza\@startstanza + \def\@startstanza[##1]{\global\instanzaLtrue\old@startstanza[##1]} }{ - \let\stanza\oldstanza \Leftsidehookend} % \end{macrocode} % \end{environment} @@ -2393,11 +2421,10 @@ \let\lednopb\lednopbR \let\lineation\lineationR \Rightsidehook - \let\oldstanza\stanza - \renewcommand{\stanza}{\oldstanza\global\instanzaRtrue} + \let\old@startstanza\@startstanza + \def\@startstanza[##1]{\global\instanzaRtrue\old@startstanza[##1]} }{% \ledRcolfalse - \let\stanza\oldstanza \Rightsidehookend } @@ -2453,6 +2480,7 @@ % \changes{v1.1}{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 % relevant variables, and then arranges for the @@ -2476,12 +2504,12 @@ \newcounter{pstartRold} \renewcommand{\thepstartR}{{\bfseries\@arabic\c@pstartR}. } -\newcommand*{\pstartL}{% -\if@nobreak% +\newcommandx*{\pstartL}[1][1]{% + \if@nobreak% \let\@oldnobreak\@nobreaktrue% -\else% + \else% \let\@oldnobreak\@nobreakfalse% -\fi% + \fi% \@nobreaktrue% \ifnumbering \else% \led@err@PstartNotNumbered% @@ -2525,16 +2553,22 @@ \numberedpar@true% \iflabelpstart\protected@edef\@currentlabel% {\p@pstartL\thepstartL}\fi% +% \end{macrocode} +% Dump the optional arguments +% \begin{macrocode} + \ifstrempty{#1}% + {}% + {\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}% } % \end{macrocode} % % \begin{macrocode} -\newcommand*{\pstartR}{% -\if@nobreak% +\newcommandx*{\pstartR}[1][1]{% + \if@nobreak% \let\@oldnobreak\@nobreaktrue% -\else% + \else% \let\@oldnobreak\@nobreakfalse% -\fi% + \fi% \@nobreaktrue% \ifnumberingR \else% \led@err@PstartNotNumbered% @@ -2568,6 +2602,9 @@ \numberedpar@true% \iflabelpstart\protected@edef\@currentlabel% {\p@pstartR\thepstartR}\fi% + \ifstrempty{#1}% + {} + {\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}% } % \end{macrocode} % \end{macro} @@ -2576,12 +2613,14 @@ % % \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 % a version % that knows about left parallel texts. % % \begin{macrocode} -\newcommand*{\pendL}{\ifnumbering \else% +\newcommandx*{\pendL}[1][1]{% + \ifnumbering \else% \led@err@PendNotNumbered% \fi% \ifnumberedpar@ \else% @@ -2607,17 +2646,24 @@ \addtocounter{pstartL}{1}% \fi \parledgroup@beforenotes@save{L}% +% \end{macrocode} +% Dump content of the optional argument. +% \begin{macrocode} + \ifstrempty{#1}% + {}% + {\csgdef{after@pendL@\the\l@dnumpstartsL}{\noindent#1}}% } - % \end{macrocode} % \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. % % \begin{macrocode} -\newcommand*{\pendR}{\ifnumberingR \else% +\newcommandx*{\pendR}[1][1]{% + \ifnumberingR \else% \led@err@PendNotNumbered% \fi% \ifnumberedpar@ \else% @@ -2632,7 +2678,10 @@ \ifnumberpstart% \addtocounter{pstartR}{1}% \fi% - \parledgroup@beforenotes@save{R} + \parledgroup@beforenotes@save{R}% + \ifstrempty{#1}% + {}% + {\csgdef{after@pendR@\the\l@dnumpstartsR}{\noindent#1}}% } % \end{macrocode} @@ -2690,7 +2739,8 @@ % \end{macro} % % -% \changes{v0.11}{2012/06/11}{Change \cs{do@lineL} and \cs{do@lineR} to allow line numbering by pstart(like in eledmac 0.15).} +% \changes{v0.11}{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.} % \begin{macro}{\do@lineL} % The \cs{do@lineL} macro is called to % do all the processing for a single line of left text. @@ -2710,18 +2760,19 @@ \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{} \unvbox\one@line \global\setbox\one@line=\lastbox \getline@numL -\ifnum\@lock>\@ne\inserthangingsymboltrue\else\inserthangingsymbolfalse\fi + \ifnum\@lock>\@ne% + \inserthangingsymboltrue% + \else% + \inserthangingsymbolfalse% + \fi \setbox\l@dleftbox \hb@xt@ \Lcolwidth{% - \affixpstart@numL \affixline@num - \l@dld@ta \add@inserts \affixside@note - \l@dlsn@te - {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta% - \l@drsn@te - }}% + \xifinlist{\the\l@dpscL}{\eled@sections@@}% + {}% + {\print@lineL}}% \add@penaltiesL \global\advance\@donereallinesL\@ne \global\advance\@donetotallinesL\@ne @@ -2734,6 +2785,41 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\print@eledsectionL} +% \cs{print@lineL} is for lines without a sectioning command. +% \begin{macrocode} +\def\print@lineL{% + \affixpstart@numL% + \l@dld@ta %space kept for backwar compatibility + \l@dlsn@te %space kept for backwar compatibility + {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta% + \l@drsn@te}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\print@eledsectionL} +% \cs{print@eledsectionL} is for line with macro code. +% \begin{macrocode} +\def\print@eledsectionL{% + \addtocounter{pstartL}{-1}% + \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{} + \ifdefstring{\@eledsectmark}{L}{}{\ledsectnomark} + \numdef{\temp@}{\l@dpscL-1}% + \xifinlist{\temp@}{\eled@sections@@}{\@nobreaktrue}{\@nobreakfalse}% + \@eled@sectioningtrue% + \csuse{eled@sectioning@\the\l@dpscL}% + \@eled@sectioningfalse% + \global\csundef{eled@sectioning@\the\l@dpscL}% + \if@RTL% + \hspace{-\paperwidth}% + {\hbox{\l@dunhbox@line{\one@line}} \new@line}% + \else% + \hspace{\paperwidth}% + {\new@line \hbox{\l@dunhbox@line{\one@line}}}% + \fi% + \vskip\eledsection@correcting@skip% +} +% \end{macrocode} +% \end{macro} % \changes{v0.3}{2005/02/10}{Added \cs{do@lineLhook} and \cs{do@lineRhook}} % \changes{v1.4}{2013/07/11}{Added \cs{do@insidelineLhook} and \cs{do@insidelineRhook}} % \begin{macro}{\do@lineLhook} @@ -2758,6 +2844,7 @@ % \changes{v0.3}{2005/02/10}{Changed \cs{do@lineR} similarly to \cs{do@lineL}} % \begin{macrocode} \newcommand*{\do@lineR}{% + \ledRcol@true% \advance\countRline \@ne \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}% {\vbadness=10000 @@ -2766,33 +2853,69 @@ \l@demptyd@ta \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR} to\baselineskip}% - \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{} + \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{} \unvbox\one@lineR \global\setbox\one@lineR=\lastbox \getline@numR -\ifnum\@lockR>\@ne\inserthangingsymbolRtrue\else\inserthangingsymbolRfalse\fi + \ifnum\@lockR>\@ne% + \inserthangingsymbolRtrue + \else% + \inserthangingsymbolRfalse% + \fi% \setbox\l@drightbox \hb@xt@ \Rcolwidth{% - \affixpstart@numR - \affixline@numR - \l@dld@ta + \affixline@numR% \add@insertsR \affixside@noteR - \l@dlsn@te - {\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\do@insidelineRhook\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta% - \l@drsn@te - }}% + \xifinlist{\the\l@dpscR}{\eled@sectionsR@@}% + {}% + {\print@lineR}% + }% \add@penaltiesR \global\advance\@donereallinesR\@ne \global\advance\@donetotallinesR\@ne \else \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}} \global\advance\@donetotallinesR\@ne -\fi} +\fi +\ledRcol@false% +} % \end{macrocode} % \end{macro} % +% \begin{macro}{\print@lineR}{} +% \begin{macro}{\print@eledsectionR}{} +\def\print@lineR{% + \affixpstart@numR% + \l@dld@ta + \l@dlsn@te +\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\do@insidelineRhook\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta% + \l@drsn@te + } + +\def\print@eledsectionR{% + \addtocounter{pstartR}{-1}% + \initnumbering@sectcountR% + \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}% + \ifdefstring{\@eledsectmark}{R}{}{\ledsectnomark}% + \numdef{\temp@}{\l@dpscR-1}% + \xifinlist{\temp@}{\eled@sectionsR@@}{\@nobreaktrue}{\@nobreakfalse}% + \@eled@sectioningtrue% + \csuse{eled@sectioning@\the\l@dpscR R}% + \@eled@sectioningfalse% + \global\csundef{eled@sectioning@\the\l@dpscR R}% + \if@RTL% + \hspace{-\paperwidth}% + {\hbox{\l@dunhbox@line{\one@lineR}} \new@lineR}% + \else% + \hspace{\paperwidth}% + {\new@lineR \hbox{\l@dunhbox@line{\one@lineR}}}% + \fi% + \vskip\eledsection@correcting@skip +} +% \end{macro} +% \end{macro} % % \subsection{Line and page number computation} % @@ -3400,7 +3523,7 @@ % The \cs{@lab} command, which appears in the \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{@l}, and the \cs{sub@on} and \cs{sub@off} commands +% \cs{@page}, \cs{@nl}, and the \cs{sub@on} and \cs{sub@off} commands % appearing in the \cs{linenum@out} file. % % \begin{macrocode} @@ -3425,82 +3548,27 @@ % don't produce any note but do put an extra unnumbered blank line into % the text. % \begin{macro}{\sidenote@marginR} -% \begin{macro}{\sidenotemargin} +% \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*}} % Specifies which margin sidenotes can be in. % \begin{macrocode} +\WithSuffix\newcommand\sidenotemargin*[1]{% + \l@dgetsidenote@margin{#1} + \global\sidenote@marginR=\@l@dtempcntb + \global\sidenote@margin=\@l@dtempcntb +} \newcount\sidenote@marginR -\renewcommand*{\sidenotemargin}[1]{{% - \l@dgetsidenote@margin{#1}% - \ifnum\@l@dtempcntb>\m@ne - \ifledRcol - \global\sidenote@marginR=\@l@dtempcntb - \else - \global\sidenote@margin=\@l@dtempcntb - \fi - \fi}} -\sidenotemargin{right} \global\sidenote@margin=\@ne % \end{macrocode} % \end{macro} % \end{macro} % -% \begin{macro}{\l@dlsnote} -% \begin{macro}{\l@drsnote} -% \begin{macro}{\l@dcsnote} -% The `footnotes' for left, right, and moveable sidenotes. The whole -% scheme is reminiscent of the critical footnotes code. + % \changes{v1.3.3}{2012/12/19}{Debug on the left notes of the right column.} % \changes{v1.3.4}{2013/07/03}{Allow to use commands in sidenotes, like it was introduced by eledmac 1.0.} -% \begin{macrocode} -\renewcommand*{\l@dlsnote}[1]{% - \begingroup% - \newcommand{\content}{#1}% - \ifnumberedpar@ - \ifledRcol% - \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% - \to\inserts@listR - \global\advance\insert@countR \@ne% - \else% - \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne% - \fi - \fi\ignorespaces\endgroup} -\renewcommand*{\l@drsnote}[1]{% - \begingroup% - \newcommand{\content}{#1}% - \ifnumberedpar@ - \ifledRcol% - \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% - \to\inserts@listR - \global\advance\insert@countR \@ne% - \else% - \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne% - \fi - \fi\ignorespaces\endgroup} -\renewcommand*{\l@dcsnote}[1]{% - \begingroup% - \newcommand{\content}{#1}% - \ifnumberedpar@ - \ifledRcol% - \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% - \to\inserts@listR - \global\advance\insert@countR \@ne% - \else% - \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne% - \fi - \fi\ignorespaces\endgroup} - -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% +% \changes{v1.8.0}{2014/08/05}{\cs{l@dlsnote},\cs{l@drsnote} and \cs{l@dcsnote} defined only one time, in \Lpack{eledmac}. } % \begin{macro}{\affixside@noteR} % The right text version of \cs{affixside@note}. % \changes{v1.1.2}{2012/10/06}{Remove spurious space between line number and line content} @@ -3517,27 +3585,38 @@ \numdef{\itemcount@}{\itemcount@+1}% }% \dolistloop{\l@dcsnotetext}% - \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@numR R p. \the\page@numR,}}{}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@numR\space p. \the\page@numR,}}{}% \gdef\@templ@d{}% \ifx\@templ@d\l@dcsnotetext \else% \if@twocolumn% \if@firstcolumn% - \setl@dlp@rbox{\sidenotecontent@}% + \setl@dlp@rbox{##1}{\sidenotecontent@}% \else% \setl@drp@rbox{\sidenotecontent@}% \fi% \else% \@l@dtempcntb=\sidenote@marginR% \ifnum\@l@dtempcntb>\@ne% - \advance\@l@dtempcntb by\page@num% + \advance\@l@dtempcntb by\page@numR% \fi% \ifodd\@l@dtempcntb% - \setl@drp@rbox{\sidenotecontent@t}% + \setl@drp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@l}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space leftnotes on line \the\line@numR\space p. \the\page@numR,}}{}% + \setl@dlp@rbox{\sidenotecontent@}% \else% \setl@dlp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@r}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space rightnotes on line \the\line@numR\space p. \the\page@numR,}}{}% + \setl@drp@rbox{\sidenotecontent@}% \fi% \fi% - \fi} + \fi% +} % \end{macrocode} % \end{macro} @@ -3908,34 +3987,12 @@ % \end{macro} % % \begin{macro}{\ifl@dsamelang} -% \begin{macro}{\l@dsamelangfalse} -% \begin{macro}{\l@dsamelangtrue} -% A flag for checking if the same \verb?babel? language has been used -% for both the left and right texts. -% \begin{macrocode} -\newif\ifl@dsamelang - \l@dsamelangtrue -% \end{macrocode} -% \end{macro} -% \end{macro} +% Suppress \cs{ifl@dsamelang} which didn't 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}{\l@dchecklang} -% I'm going to use \cs{theledlanguageL} and \cs{theledlanguageR} to hold -% the names of the languages used for the left and right texts. This macro -% sets \cs{ifl@dsamelang} TRUE if they are the same, otherwise it -% sets it FALSE. -% \begin{macrocode} -\newcommand*{\l@dchecklang}{% - \l@dsamelangfalse - \edef\@tempa{\theledlanguageL}\edef\@temp{\theledlanguageR}% - \ifx\@tempa\@tempb - \l@dsamelangtrue - \fi} - -% \end{macrocode} +% \changes{v1.12.0}{2014/08/05}{Suppress \cs{l@dchecklang} which didn't 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}{\l@dbbl@set@language} % In \verb?babel? the macro \cs{bbl@set@language}\marg{lang} does the work when % the language \meta{lang} is changed via \cs{selectlanguage}. @@ -4017,12 +4074,15 @@ } % \end{macrocode} % If on Polyglossia +% \changes{v1.8.0}{2014/08/05}{Correct left/right language setting with polyglossia.} % \begin{macrocode} - { \apptocmd{\xpg@set@language}{% - \ifledRcol \gdef\theledlanguageR{#1}% - \else \gdef\theledlanguageL{#1}% + { \let\old@otherlanguage\otherlanguage% + \renewcommand{\otherlanguage}[2][]{% + \selectlanguage[#1]{#2}% + \ifledRcol \gdef\theledlanguageR{#2}% + \else \gdef\theledlanguageL{#2}% \fi}% - \let\l@duselanguage\xpg@set@language + \let\l@duselanguage\xpg@set@language% \gdef\theledlanguageL{\xpg@main@language}% \gdef\theledlanguageR{\xpg@main@language}% % \end{macrocode} @@ -4038,13 +4098,24 @@ % % \section{Parallel columns} % +% \begin{macro}{\@eledsectionL} +% \begin{macro}{\@eledsectionR} +% The parbox \cs{@eledsectionL} and \cs{@eledsectionR} will keep the sections' title. +% \begin{macrocode} +\newsavebox{\@eledsectionL}% +\newsavebox{\@eledsectionR}% +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\Columns} +% \changes{v1.12.0}{2014/07/28}{Modify \cs{Columns} to enable to add section's title.} % The \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. % % \begin{macrocode} \newcommand*{\Columns}{% + \eledsection@correcting@skip=-\baselineskip% Correction for sections' titles \setcounter{pstartL}{\value{pstartLold}} \setcounter{pstartR}{\value{pstartRold}} \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else @@ -4081,27 +4152,47 @@ % are the same % \changes{v0.2}{2004/12/20}{Added \cs{l@dchecklang} and \cs{l@duselanguage} % to \cs{Columns}} +% \changes{v1.12.0}{2014/08/05}{Suppress \cs{l@dchecklang} from \cs{Columns}.} % \begin{macrocode} \checkraw@text - \l@dchecklang { \loop\ifaraw@text % \end{macrocode} % Grab the next pair of left and right text lines and output them, swapping -% languages if they differ +% languages if they differ, adding section title if needed. % \begin{macrocode} - \ifl@dsamelang - \do@lineL - \do@lineR - \else \l@duselanguage{\theledlanguageL}% \do@lineL + \xifinlist{\the\l@dpscL}{\eled@sections@@} + {% + \ifdefstring{\@eledsectmark}{L}% + {\csuse{eled@sectmark@\the\l@dpscL}% + }{}% + \global\csundef{eled@sectmark@\the\l@dpscL}% + \savebox{\@eledsectionL}{\parbox[t][][t]{\Lcolwidth}{\vbox{}\print@eledsectionL}}%\vbox{}-> prevent alignment troubles with RTL language + }% + {}% \l@duselanguage{\theledlanguageR}% \do@lineR - \fi + \xifinlist{\the\l@dpscR}{\eled@sectionsR@@} + {% + \ifdefstring{\@eledsectmark}{R}% + {\csuse{eled@sectmark@\the\l@dpscR R}% + }{}% + \global\csundef{eled@sectmark@\the\l@dpscR R}% + \savebox{\@eledsectionR}{\parbox[t][][t]{\Rcolwidth}{\vbox{}\print@eledsectionR}}}%\vbox{}-> prevent alignment troubles with RTL language + {}% \hb@xt@ \hsize{% - \hfill \unhbox\l@dleftbox - \hfill \columnseparator \hfill - \unhbox\l@drightbox + \ifdefstring{\columns@position}{L}{}{\hfill }% + \unhbox\l@dleftbox% + \ifhbox\@eledsectionL% + \usebox{\@eledsectionL}% + \fi% + \print@columnseparator% + \unhbox\l@drightbox% + \ifhbox\@eledsectionR% + \usebox{\@eledsectionR}% + \fi% + \ifdefstring{\columns@position}{R}{}{\hfill}% }% \checkraw@text \checkverseL @@ -4146,6 +4237,27 @@ % \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} print the colum separator, with spaces around, following user's setting. +% We use the \TeX\ \cs{ifdim} instead of \Lpack{etoolbox} +% to avoid having \cs{hfill} in a \verb+{}+, which delete some (little) space. +% \begin{macrocode} +\def\print@columnseparator{% + \ifdim\beforecolumnseparator<0pt% + \hfill% + \else% + \hspace{\beforecolumnseparator}% + \fi% + \columnseparator% + \ifdim\aftercolumnseparator<0pt% + \hfill% + \else% + \hspace{\beforecolumnseparator}% + \fi% +}% +%\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}. % \begin{macrocode} @@ -4187,7 +4299,30 @@ % \end{macrocode} % \end{macro} % \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}. +% \begin{macrocode} +\newcommand*{\columnsposition}[1]{% + \xdef\columns@position{#1}% + }% +\xdef\columns@position{R}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\beforecolumnseparator} +% \begin{macro}{\aftercolumnseparator} +% \cs{beforecolumnseparator} and \cs{aftercolumnseparator} lengths are defined to \verb+-1pt+. If user change them to a positive length, the lengths are used to define blank spaces before / after the column separator, instead of \cs{hfill}. +% \begin{macrocode} +\newlength{\beforecolumnseparator}% +\setlength{\beforecolumnseparator}{-2pt}% + +\newlength{\aftercolumnseparator}% +\setlength{\aftercolumnseparator}{-2pt}% +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\if@pstarts} % \begin{macro}{\@pstartstrue} % \begin{macro}{\@pstartsfalse} @@ -4282,12 +4417,14 @@ % % % \begin{macro}{\Pages} +% \changes{v1.12.0}{2014/07/28}{Modify \cs{Pages} to enable to add section's title.} % The \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. % % \begin{macrocode} \newcommand*{\Pages}{% + \eledsection@correcting@skip=-2\baselineskip% line correcting for section titles. \setcounter{pstartL}{\value{pstartLold}} \setcounter{pstartR}{\value{pstartRold}} \parledgroup@notespacing@set@correction @@ -4380,12 +4517,19 @@ \checkpageL \l@duselanguage{\theledlanguageL}% %%% \begingroup -{ \loop\ifl@dsamepage +{ \loop\ifl@dsamepage% % \end{macrocode} -% Process the next (left) text line, adding it to the page. +% Process the next (left) text line, adding it to the page. +% Eventually, adds the optional argument of pstart. % \changes{v0.3}{2005/02/10}{Added \cs{ledstrutL} to \cs{Pages}} % \begin{macrocode} + \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{} + \csuse{before@pstartL@\the\l@dpscL} + \global\csundef{before@pstartL@\the\l@dpscL} \do@lineL + \xifinlist{\the\l@dpscL}{\eled@sections@@} + {\print@eledsectionL}% + {}% \advance\numpagelinesL \@ne \ifshiftedpstarts \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi% @@ -4427,8 +4571,15 @@ % \begin{macrocode} \checkpageR \l@duselanguage{\theledlanguageR}% -{ \loop\ifl@dsamepage +{ \loop\ifl@dsamepage% + \initnumbering@sectcountR + \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{} + \csuse{before@pstartR@\the\l@dpscR} + \global\csundef{before@pstartR@\the\l@dpscR} \do@lineR + \xifinlist{\the\l@dpscR}{\eled@sectionsR@@} + {\print@eledsectionR}% + {}% \advance\numpagelinesR \@ne \ifshiftedpstarts \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi% @@ -4816,11 +4967,12 @@ % \begin{macrocode} \else% box is empty % \end{macrocode} -% The box is empty; check if enough lines (real and blank) have been +% The box is empty. +% Check if enough lines (real and blank) have been % output. % \begin{macrocode} \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}>\@donetotallinesL - \parledgroup@notes@endL + \parledgroup@notes@endL \else % \end{macrocode} % Sufficient lines have been output. @@ -4828,8 +4980,7 @@ \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}=\@donetotallinesL \parledgroup@notes@endL \fi - \ifwrittenlinesL - \else + \ifwrittenlinesL\else % \end{macrocode} % Write out the number of lines done, and set the boolean so this is only % done once. @@ -4851,6 +5002,12 @@ \resetprevline@ \fi \fi +% Add the content of the optional argument of the previous \cs{pend}. +% \begin{macrocode} + \csuse{after@pendL@\the\l@dpscL}% + \global\csundef{after@pendL@\the\l@dpscL}% +% \end{macrocode} +% \begin{macrocode} \addtocounter{pstartL}{1} \global\pstartnumtrue \l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}% @@ -4858,8 +5015,19 @@ {\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}% \global\@donetotallinesL \z@ \global\advance\l@dpscL \@ne +% \end{macrocode} +% Add notes of parallel ledgroup. +% \begin{macrocode} \parledgroup@notes@endL \parledgroup@correction@notespacing@final{L} + \else +% Add the content of the optional argument of the last \cs{pend}. +% \begin{macrocode} + \l@dpagefulltrue + \csuse{after@pendL@\the\l@dpscL}% + \global\csundef{after@pendL@\the\l@dpscL}% +% \end{macrocode} +% \begin{macrocode} \fi \fi \fi} @@ -4870,13 +5038,12 @@ \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}% box is not empty \else% box is empty \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}>\@donetotallinesR - \parledgroup@notes@endR + \parledgroup@notes@endR \else \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}=\@donetotallinesR \parledgroup@notes@endR \fi - \ifwrittenlinesR - \else + \ifwrittenlinesR\else \@writelinesinparR \writtenlinesRtrue \fi @@ -4889,6 +5056,8 @@ \resetprevline@ \fi \fi + \csuse{after@pendR@\the\l@dpscR}% + \global\csundef{after@pendR@\the\l@dpscR}% \addtocounter{pstartR}{1} \global\pstartnumRtrue \l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}% @@ -4898,6 +5067,10 @@ \global\advance\l@dpscR \@ne \parledgroup@notes@endR \parledgroup@correction@notespacing@final{R} + \else + \csuse{after@pendR@\the\l@dpscR}% + \global\csundef{after@pendR@\the\l@dpscR}% + \l@dpagefulltrue \fi \fi \fi} @@ -4906,6 +5079,33 @@ % \end{macro} % \end{macro} % +% \section{Sections' titles' commands} +% \begin{macro}{\eledsectnotoc} +% \cs{eledsectnotoc} just saves its content \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. +% \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}. +% \begin{macrocode} +\newskip\eledsection@correcting@skip +% \end{macrocode} +% \end{macro} +% \begin{macro} +% We save the sectioning commands of the right side in the \cs{eled@sectioningR@out} file. +% \begin{macrocode} +\newwrite\eled@sectioningR@out +% \end{macrocode} +% \end{macro} % \section{Page break/no page break, depending on the specific line} % We need to adapt the macro of the homonym section of eledmac to eledpar. % \begin{macro}{\prev@pbR} @@ -5068,7 +5268,7 @@ \vspace{\parledgroup@notespacing@correction@accumulated} \parledgroup@correction@notespacing@init% \ifstrequal{#1}{L}{ - \numdef{\@checking}{\the\l@dpscL-1} + \numdef{\@checking}{\the\l@dpscL-1} }{ \numdef{\@checking}{\the\l@dpscR-1} } diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty index 60bf7019004..6c10b8364a8 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty @@ -23,8 +23,9 @@ %% This work consists of the files listed in the README file. + \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledmac}[2014/05/29 v1.11.1 LaTeX port of EDMAC] +\ProvidesPackage{eledmac}[2014/08/05 v1.12.0 LaTeX port of EDMAC]% \newif\ifledfinal \newif\ifparapparatus@ \newif\ifnoquotation@ @@ -47,6 +48,7 @@ \RequirePackage{suffix} \RequirePackage{xstring} \RequirePackage{ifluatex} +\RequirePackage{ragged2e} \ifcsdef{if@RTL}{}{\newif\if@RTL} \ifledfinal \newcommand*{\showlemma}[1]{#1} @@ -151,6 +153,7 @@ \pst@rtedLfalse \newcount\l@dnumpstartsL \newif\ifledRcol +\newif\ifledRcol@ \newif\ifnumberingR \newcommand*{\beginnumbering}{% \ifnumbering @@ -164,8 +167,16 @@ \line@list@stuff{\jobname.\extensionchars\the\section@num}% \l@dend@stuff \setcounter{pstart}{1} - \ifl@dpairing\else\begingroup\fi - \initnumbering@sectcmd + \ifl@dpairing + \global\l@dnumpstartsL \z@ + \global\pst@rtedLfalse + \else + \begingroup + \initnumbering@sectcmd + \fi + \gdef\eled@sections@@{} + \makeatletter\InputIfFileExists{\jobname.eledsec\the\section@num}{}{}\makeatother + \immediate\openout\eled@sectioning@out=\jobname.eledsec\the\section@num\relax } \newcommand*{\initnumbering@reg}{% \global\pst@rtedLfalse @@ -185,112 +196,6 @@ \resetprevpage@num } -\newcommand{\initnumbering@sectcmd}{ - \newcommand{\ledsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi%% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \WithSuffix\newcommand\ledsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \newcommand{\ledsubsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \WithSuffix\newcommand\ledsubsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \newcommand{\ledsubsubsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \WithSuffix\newcommand\ledsubsubsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% - \pstart% - \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% - \vspace{-2\parskip}\vspace{-2\baselineskip}% - \ifautopar\else\pstart\fi - } - \newcommand\ledchapter[2][]{\ifl@dmemoir\gdef\ch@pt@c{##1}\fi~\pend\skipnumbering\pstart\chapter[##1]{##2}\pend\pstart} - \WithSuffix\newcommand\ledchapter*[1]{~\pend\skipnumbering\pstart\chapter*{##1}\pend\pstart} - \patchcmd{\@makeschapterhead}{1\par}{1}{}{} - \pretocmd{\@makeschapterhead}{\par}{}{} - \apptocmd{\@makeschapterhead}{\par}{}{} - \patchcmd{\@makeschapterhead}{\vskip 40\p@}{}{}{} - \patchcmd{\@makechapterhead}{1\par}{1}{}{} - \pretocmd{\@makechapterhead}{\par}{}{} - \apptocmd{\@makechapterhead}{\par}{}{} - \patchcmd{\@makechapterhead}{\vskip 40\p@}{}{}{} - \apptocmd{\@chapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} - \apptocmd{\@schapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} - \newcommand\beforeledchapter{\pend\cleardoublepage\pstart} - \patchcmd{\chapter}{\cleardoublepage}{\relax}{}{} - \patchcmd{\chapter}{\clearpage}{\relax}{}{} - \ifnoquotation@\else - \renewcommand{\quotation}{\par\leavevmode% - \parindent=1.5em% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - \global\leftskip=\leftmargin% - \global\rightskip=\leftmargin% - } - \renewcommand{\endquotation}{\par% - \global\leftskip=0pt% - \global\rightskip=0pt% - \leavevmode% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - } - \renewcommand{\quote}{\par\leavevmode% - \parindent=0pt% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - \global\leftskip=\leftmargin% - \global\rightskip=\leftmargin% - } - \renewcommand{\endquote}{\par% - \global\leftskip=0pt% - \global\rightskip=0pt% - \leavevmode% - \skipnumbering% - \ifautopar% - \vskip-\parskip% - \else% - \vskip\topsep% - \fi% - } - \fi -} -\newcommand{\ledsectnotoc}{\let\addcontentsline\@gobblethree} \def\endnumbering{% \ifnumbering \global\numberingfalse @@ -311,7 +216,12 @@ \else \led@err@NumberingNotStarted \fi - \autoparfalse\ifl@dpairing\else\endgroup\fi} + \autoparfalse + \immediate\closeout\eled@sectioning@out + \ifl@dpairing\else + \endgroup + \fi +} \newcommand{\pausenumbering}{% \ifautopar\global\autopar@pausetrue\fi% \endnumbering\global\numberingtrue} @@ -324,6 +234,7 @@ \line@list@stuff{\jobname.\extensionchars\the\section@num}% \l@dend@stuff \begingroup + \initnumbering@sectcmd \else \led@err@NumberingShouldHaveStarted \endnumbering @@ -532,10 +443,10 @@ \begingroup}% } -\newcommand{\@l}[2]{% +\newcommand{\@nl}[2]{% \fix@page{#1}% - \@l@reg} -\newcommand*{\@l@reg}{% + \@nl@reg} +\newcommand*{\@nl@reg}{% \ifx\l@dchset@num\relax \else \advance\absline@num \@ne \set@line@action @@ -769,27 +680,25 @@ {\xifinlistcs{\the\absline@num}{l@prev@nopb}% {\xifinlistcs{\the\absline@num}{normal@page@break}% {\numgdef{\@next@page}{\thepage+1}% - \write\linenum@out{\string\@l[\@next@page][\@next@page]}% + \write\linenum@out{\string\@nl[\@next@page][\@next@page]}% }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}% + {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}% }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}}% + {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}}% {}% \IfStrEq{\led@pb@setting}{before}% - {% -\numdef{\next@absline}{\the\absline@num+1}% -\xifinlistcs{\next@absline}{l@prev@nopb}% - {\xifinlistcs{\the\absline@num}{normal@page@break}% - {% - \numgdef{\nc@page}{\c@page+1}% - \write\linenum@out{\string\@l[\nc@page][\nc@page]}% + {\numdef{\next@absline}{\the\absline@num+1}% + \xifinlistcs{\next@absline}{l@prev@nopb}% + {\xifinlistcs{\the\absline@num}{normal@page@break}% + {\numgdef{\nc@page}{\c@page+1}% + \write\linenum@out{\string\@nl[\nc@page][\nc@page]}% + }% + {\write\linenum@out{\string\n@l[\the\c@page][\thepage]}}% + }% + {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}% }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}% - }% - {\write\linenum@out{\string\@l[\the\c@page][\thepage]}}% -}% - {}% - \IfStrEqCase{\led@pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum@out{\string\@l[\the\c@page][\thepage]}]% + {}% + \IfStrEqCase{\led@pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum@out{\string\@nl[\the\c@page][\thepage]}]% } \newcommand*{\flag@start}{% @@ -938,14 +847,15 @@ \numberpstartfalse \newif\iflabelpstart \labelpstartfalse -\newcommand*{\pstart}{% -\if@nobreak% - \let\@oldnobreak\@nobreaktrue% -\else% - \let\@oldnobreak\@nobreakfalse% -\fi% -\@nobreaktrue% -\ifnumbering \else% +\newcommandx*{\pstart}[1][1]{% + \ifstrempty{#1}{}{\noindent#1}% + \if@nobreak% + \let\@oldnobreak\@nobreaktrue% + \else% + \let\@oldnobreak\@nobreakfalse% + \fi% + \@nobreaktrue% + \ifnumbering \else% \led@err@PstartNotNumbered% \beginnumbering% \fi% @@ -956,6 +866,7 @@ \list@clear{\inserts@list}% \global\let\next@insert=\empty% \begingroup\normal@pars% + \global\advance \l@dnumpstartsL\@ne \global\setbox\raw@text=\vbox\bgroup% \ifautopar\else% \ifnumberpstart% @@ -968,9 +879,10 @@ \fi% \numberedpar@true% \iflabelpstart\protected@edef\@currentlabel% - {\p@pstart\thepstart}\fi% + {\p@pstart\thepstart} + \fi% } -\newcommand*{\pend}{\ifnumbering \else% +\newcommandx*{\pend}[1][1]{\ifnumbering \else% \led@err@PendNotNumbered% \fi% \ifnumberedpar@ \else% @@ -994,7 +906,9 @@ \pstartnumtrue% \fi% \@oldnobreak% - \addtocounter{pstart}{1}} + \addtocounter{pstart}{1}% + \ifstrempty{#1}{}{\noindent#1}% +} \newcommand*{\l@dzeropenalties}{% \brokenpenalty \z@ \clubpenalty \z@ @@ -1041,19 +955,43 @@ \fi \check@pb@in@verse \affixline@num - \affixpstart@num - \hb@xt@ \linewidth{\do@insidelinehook\l@dld@ta\add@inserts\affixside@note - \l@dlsn@te - {\ledllfill\hb@xt@ \wd\one@line{\new@line\inserthangingsymbol\l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta% - \l@drsn@te - }} + \add@inserts\affixside@note + \xifinlist{\the\l@dnumpstartsL}{\eled@sections@@}% + {\print@eledsection}% + {\print@line}% \IfStrEq{\led@pb@setting}{after}{\led@check@pb\led@check@nopb}{} }% +\def\print@line{ + \affixpstart@num% + \hb@xt@ \linewidth{\do@insidelinehook\l@dld@ta + \l@dlsn@te + {\ledllfill\hb@xt@ \wd\one@line{\new@line\inserthangingsymbol \l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta% + \l@drsn@te + }}% +} +\def\print@eledsection{% + \numdef{\temp@}{\l@dnumpstartsL-1}% + \xifinlist{\temp@}{\eled@sections@@}{\@nobreaktrue}{\@nobreakfalse}% + \@eled@sectioningtrue% + \csuse{eled@sectioning@\the\l@dnumpstartsL}% + \@eled@sectioningfalse% + \global\csundef{eled@sectioning@\the\l@dnumpstartsL}% + \if@RTL% + \hspace{-\paperwidth}% + {\hbox{\l@dunhbox@line{\one@line}}\new@line}% + \else% + \hspace{\paperwidth}% + {\new@line \hbox{\l@dunhbox@line{\one@line}}}% + \fi% + \vskip-\baselineskip% +} \newcommand*{\do@linehook}{} \newcommand*{\do@insidelinehook}{} \newcommand*{\l@demptyd@ta}{% \gdef\l@dld@ta{}% \gdef\l@drd@ta{}% + \gdef\l@dcsnotetext@l{}% + \gdef\l@dcsnotetext@r{}% \gdef\l@dcsnotetext{}} \newcommand{\l@dlsn@te}{% @@ -1556,7 +1494,9 @@ }% \vskip\skip\csname #1footins\endcsname% \leftskip0pt \rightskip0pt - \csname #1footnoterule\endcsname\noindent\leavevmode} + \csname #1footnoterule\endcsname% + \vskip\csuse{afterXrule@#1}% + \noindent\leavevmode} \let\normalfootnoterule=\footnoterule \newcommand*{\normalfootgroup}[1]{{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\unvbox\csname #1footins\endcsname} @@ -1571,9 +1511,11 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \setlength{\parindent}{0pt} {\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}} @@ -1615,10 +1557,14 @@ \expandafter\let\csname #1footfmt\endcsname=\parafootfmt \expandafter\let\csname #1footgroup\endcsname=\para@footgroup \count\csname #1footins\endcsname=1000 + \dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1} + \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1} \para@footsetup{#1} \expandafter\let\csname mpv#1footnote\endcsname=\mppara@vfootnote \expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup \count\csname mp#1footins\endcsname=1000 + \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1} + \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1} } \providecommand{\footfudgefiddle}{64} \newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1} @@ -1638,7 +1584,9 @@ {}% }% \vskip\skip\csname #1footins\endcsname% - \csname #1footnoterule\endcsname\noindent\leavevmode} + \csname #1footnoterule\endcsname% + \vskip\csuse{afterXrule@#1}% + \noindent\leavevmode} \newcommand*{\para@vfootnote}[2]{% \insert\csname #1footins\endcsname \bgroup @@ -1690,6 +1638,8 @@ #3\penalty-10 } \newcommand*{\para@footgroup}[1]{% \unvbox\csname #1footins\endcsname + \ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}% + \ifcsstring{Xragged@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}% \csuse{Xnotefontsize@#1} @@ -1706,11 +1656,15 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \unvbox\csname mp#1footins\endcsname + \ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}% + \ifcsstring{Xragged@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}% \csuse{Xnotefontsize@#1} @@ -1806,9 +1760,11 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par \splittopskip=\ht\strutbox @@ -1868,9 +1824,11 @@ \ifl@dpairing% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% \else% \@nameuse{#1footnoterule}% + \vskip\csuse{afterXrule@#1}% \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par \splittopskip=\ht\strutbox @@ -1984,7 +1942,8 @@ \vskip\skip\csname footins#1\endcsname% \leftskip=\z@ \rightskip=\z@ - \@nameuse{footnoterule#1}} + \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}} \let\normalfootnoteruleX=\footnoterule @@ -2002,9 +1961,11 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \unvbox\@nameuse{mpfootins#1}} @@ -2102,9 +2063,11 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \splittopskip=\ht\strutbox \expandafter @@ -2163,9 +2126,11 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \splittopskip=\ht\strutbox \expandafter @@ -2180,9 +2145,13 @@ \expandafter\let\csname footgroup#1\endcsname=\para@footgroupX \expandafter\let\csname footnoterule#1\endcsname=\normalfootnoteruleX \count\csname footins#1\endcsname=1000 + \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1} + \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1} \expandafter\let\csname mpvfootnote#1\endcsname=\mppara@vfootnoteX \expandafter\let\csname mpfootgroup#1\endcsname=\mppara@footgroupX \count\csname mpfootins#1\endcsname=1000 + \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1} + \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1} \para@footsetupX{#1}} \newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1} @@ -2205,7 +2174,9 @@ \rightskip=\z@ \parindent=\z@ \vskip\skip\@nameuse{footins#1}% - \@nameuse{footnoterule#1}} + \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% + } \newcommand*{\para@vfootnoteX}[2]{% \insert\csname footins#1\endcsname @@ -2246,6 +2217,8 @@ \newcommand*{\para@footgroupX}[1]{% \unvbox\csname footins#1\endcsname + \ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}% + \ifcsstring{raggedX@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{\unhbox0 \removehboxes}% \csuse{notefontsizeX@#1} @@ -2262,11 +2235,15 @@ \ifl@dpairing% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \else% \@nameuse{footnoterule#1}% + \vskip\csuse{afterruleX@#1}% \fi% \unvbox\csname mpfootins#1\endcsname + \ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}% + \ifcsstring{raggedX@#1}{R}{\RaggedRight}{}% \makehboxofhboxes \setbox0=\hbox{\unhbox0 \removehboxes}% \csuse{notefontsizeX@#1} @@ -2375,10 +2352,12 @@ \newcommand{\newseries@}[1]{ \xifinlist{#1}{\@series}{\eledmac@warning{Series #1 is still existing !}} {% -\newtoggle{Xlemmadisablefontselection@#1} -\newtoggle{Xendlemmadisablefontselection@#1} + \newtoggle{Xlemmadisablefontselection@#1} + \newtoggle{Xendlemmadisablefontselection@#1} \csgdef{Xhangindent@#1}{0pt}% - \csgdef{hangindentX@#1}{0pt} + \csgdef{hangindentX@#1}{0pt}% + \csgdef{Xragged@#1}{}% + \csgdef{raggedX@#1}{}% \csgdef{hsizetwocol@#1}{0.45 \hsize}% \csgdef{hsizetwocolX@#1}{0.45 \hsize}% \csgdef{hsizethreecol@#1}{.3 \hsize}% @@ -2414,6 +2393,8 @@ \csgdef{parafootsep@#1}{\parafootftmsep}% \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em} \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em} + \csgdef{afterXrule@#1}{0pt} + \csgdef{afterruleX@#1}{0pt} \csgdef{txtbeforeXnotes@#1}{} \csgdef{maxhnotesX@#1}{\ledfootinsdim}% \csgdef{maxhXnotes@#1}{\ledfootinsdim} @@ -2538,6 +2519,10 @@ \newhookcommand@series{hangindentX} +\newhookcommand@series{Xragged} + +\newhookcommand@series{raggedX} + \newhookcommand@series{hsizetwocol} \newhookcommand@series{hsizethreecol} @@ -2594,6 +2579,10 @@ \newhookcommand@series{txtbeforeXnotes} +\newhookcommand@series{afterruleX} + +\newhookcommand@series{afterXrule} + \newcommand{\newhookcommand@series@reload}[1]{% \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{% \csuse{setcommand@series}{##1}{#1}{##2}[reload] @@ -2890,6 +2879,7 @@ \fi \protected@write\@auxout{}% {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}% + \ifcsdef{hypertarget}{\hypertarget{#1}{}}{}% \@esphack} \newcounter{line}% @@ -2923,17 +2913,23 @@ {\linenumrep{\line@num}|% \ifsublines@ \sublinenumrep{\subline@num}\else 0\fi}\to\labelref@list} -\newcommand*{\edpageref}[1]{\l@dref@undefined{#1}\l@dgetref@num{1}{#1}} +\newcommand{\wrap@edcrossref}[2]{% + \ifdef{\hyperlink}% + {\hyperlink{#1}{#2}}% + {#2} +} +\newcommand*{\edpageref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{1}{#1}}} \newcommand*{\xpageref}[1]{\l@dgetref@num{1}{#1}} -\newcommand*{\lineref}[1]{\l@dref@undefined{#1}\l@dgetref@num{2}{#1}} +\newcommand*{\lineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{2}{#1}}} \newcommand*{\xlineref}[1]{\l@dgetref@num{2}{#1}} -\newcommand*{\sublineref}[1]{\l@dref@undefined{#1}\l@dgetref@num{3}{#1}} +\newcommand*{\sublineref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{3}{#1}}} \newcommand*{\xsublineref}[1]{\l@dgetref@num{3}{#1}} -\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\l@dgetref@num{4}{#1}} +\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{4}{#1}}} \newcommand*{\xpstartref}[1]{\l@dgetref@num{4}{#1}} + \newcommand*{\l@dref@undefined}[1]{% \expandafter\ifx\csname the@label#1\endcsname\relax \led@warn@RefUndefined{#1}% @@ -2986,7 +2982,11 @@ \newcommand*{\sidenotemargin}[1]{{% \l@dgetsidenote@margin{#1}% \ifnum\@l@dtempcntb>\m@ne - \global\sidenote@margin=\@l@dtempcntb + \ifledRcol + \global\sidenote@marginR=\@l@dtempcntb + \else + \global\sidenote@margin=\@l@dtempcntb + \fi \fi}} \newcommand*{\l@dgetsidenote@margin}[1]{% \def\@tempa{#1}\def\@tempb{left}% @@ -3025,36 +3025,108 @@ \newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}} \newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}} -\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}} +\newcommand*{\ledinnernote}[1]{% + \ifodd\page@num% + \ledleftnote{#1}% + \else% + \ledrightnote{#1}% + \fi% +} + +\newcommand*{\ledouternote}[1]{% + \ifodd\page@num% + \ledrightnote{#1}% + \else% + \ledleftnote{#1}% + \fi% +} + +\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}} \newif\ifrightnoteup \rightnoteuptrue + \newcommand*{\l@dlsnote}[1]{% \begingroup% \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne + \ifledRcol% + \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% + \to\inserts@listR + \global\advance\insert@countR \@ne% + \else% + \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% + \to\inserts@list + \global\advance\insert@count \@ne% + \fi \fi\ignorespaces\endgroup} + \newcommand*{\l@drsnote}[1]{% \begingroup% \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne + \ifledRcol% + \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% + \to\inserts@listR + \global\advance\insert@countR \@ne% + \else% + \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% + \to\inserts@list + \global\advance\insert@count \@ne% + \fi \fi\ignorespaces\endgroup} -\newcommand*{\l@dcsnote}[1]{\begingroup% + +\newcommand*{\l@dcsnote}[1]{% + \begingroup% \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne + \ifledRcol% + \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% + \to\inserts@listR + \global\advance\insert@countR \@ne% + \else% + \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% + \to\inserts@list + \global\advance\insert@count \@ne% + \fi \fi\ignorespaces\endgroup} -\newcommand*{\vl@dlsnote}[1]{\setl@dlp@rbox{#1}} -\newcommand*{\vl@drsnote}[1]{\setl@drp@rbox{#1}} +\newcommand*{\vl@dlsnote}[1]{% + \ifledRcol@% + \@l@dtempcntb=\sidenote@marginR% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@numR% + \fi% + \else% + \@l@dtempcntb=\sidenote@margin% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@num% + \fi% + \fi% + \ifodd\@l@dtempcntb% + \listgadd{\l@dcsnotetext@l}{#1}% + \else% + \listgadd{\l@dcsnotetext}{#1}% + \fi +} +\newcommand*{\vl@drsnote}[1]{% + \ifledRcol@% + \@l@dtempcntb=\sidenote@marginR% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@numR% + \fi% + \else% + \@l@dtempcntb=\sidenote@margin% + \ifnum\@l@dtempcntb>\@ne% + \advance\@l@dtempcntb by\page@num% + \fi% + \fi% + \ifodd\@l@dtempcntb% + \listgadd{\l@dcsnotetext}{#1}% + \else% + \listgadd{\l@dcsnotetext@r}{#1}% + \fi% +} \newcommand*{\vl@dcsnote}[1]{\listgadd{\l@dcsnotetext}{#1}} \newcommand*{\setl@dlp@rbox}[1]{% @@ -3104,21 +3176,32 @@ \fi% \ifodd\@l@dtempcntb% \setl@drp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@l}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space leftnotes on line \the\line@num\space p. \the\page@num,}}{}% + \setl@dlp@rbox{\sidenotecontent@}% \else% \setl@dlp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@r}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space rightnotes on line \the\line@num\space p. \the\page@num,}}{}% + \setl@drp@rbox{\sidenotecontent@}% \fi% \fi% -\fi} + \fi% +} \newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini} \newcommand*{\l@dfeetendmini}{% -\IfStrEq{critical-familiar}{\@mpfnpos}% -{\l@dedendmini\l@dfamendmini}% -{% -\IfStrEq{familiar-critical}{\@mpfnpos}% -{\l@dfamendmini\l@dedendmini}% -{\l@dedendmini\l@dfamendmini}% -}% -}% + \IfStrEq{critical-familiar}{\@mpfnpos}% + {\l@dedendmini\l@dfamendmini}% + {% + \IfStrEq{familiar-critical}{\@mpfnpos}% + {\l@dfamendmini\l@dedendmini}% + {\l@dedendmini\l@dfamendmini}% + }% + }% \newcommand*{\l@dedbeginmini}{% \def\do##1{\csletcs{v##1footnote}{mpv##1footnote}}% \dolistloop{\@series}% @@ -3241,6 +3324,13 @@ \newif\ifledgroupnotesL@ \newif\ifledgroupnotesR@ +\newif\ifeledmac@after@imakeidx@ +\@ifpackageloaded{imakeidx}{\eledmac@after@imakeidx@true}{} +\AtBeginDocument{% + \ifeledmac@after@imakeidx@\else% + \@ifpackageloaded{imakeidx}{\eledmac@error{Imakeidx must be loaded before eledmac.}}{}% + \fi +} \newcommand{\pagelinesep}{-} \newcommand{\edindexlab}{$&} \newcounter{labidx} @@ -3250,7 +3340,7 @@ \edlabel{\edindexlab\thelabidx}} \newcommand{\thepageline}{% - \thepage\pagelinesep\lineref{\edindexlab\thelabidx}} + \thepage\pagelinesep\xlineref{\edindexlab\thelabidx}} \newcommand{\thestartpageline}{\l@dparsedstartpage\pagelinesep\l@dparsedstartline} \newcommand{\theendpageline}{\l@dparsedendpage\pagelinesep\l@dparsedendline} \newif\if@edindex@fornote@ @@ -3258,7 +3348,21 @@ \l@dp@rsefootspec#1|% \@edindex@fornote@true } -\def\get@index@command#1|#2{\gdef\@index@command{#2}\gdef\@index@txt{#1}} +\def\get@index@command#1|#2+{% + \gdef\@index@txt{#1}% + \gdef\@index@command{#2}% + \xdef\@index@parenthesis{}% + \IfBeginWith{\@index@command}{(}{% + \StrGobbleLeft{\@index@command}{1}[\@index@command@]% + \global\let\@index@command\@index@command@% + \xdef\@index@parenthesis{(}% + }{}% + \IfBeginWith{\@index@command}{)}{% + \StrGobbleLeft{\@index@command}{1}[\@index@command@]% + \global\let\@index@command\@index@command@% + \xdef\@index@parenthesis{)}% + }{}% +} \newcommand{\ledinnote}[2]{\csuse{#1}{#2\emph{n}}} \newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\hyperpage{#2}\emph{n}}} \@ifclassloaded{memoir}{% @@ -3326,18 +3430,19 @@ \@sanitize \@wredindex}}{}{} \newcommand{\edindex}[1]{\@bsphack\@esphack} - \newcommandx{\@wredindex}[2][1=\jobname,usedefault]{%#1 = the index name, #2 = the text + \newcommandx{\@wredindex}[2][1=\expandonce\jobname,usedefault]{%#1 = the index name, #2 = the text \ifl@imakeidx% \if@edindex@fornote@% - \IfSubStr[1]{#2}{|}{\get@index@command#2}{\get@index@command#2|}% + \IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}% \expandafter\imki@wrindexentry{#1}{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}% \expandafter\imki@wrindexentry{#1}{\@index@txt|)ledinnote{\@index@command}}{\theendpageline}% \else% - \imki@wrindexentry{#1}{#2}{\thepageline}% + \get@edindex@hyperref{#2}% + \imki@wrindexentry{#1}{\@index@txt\@edindex@hyperref}{\thepageline}% \fi% \else% \if@edindex@fornote@% - \IfSubStr[1]{#2}{|}{\get@index@command#2}{\get@index@command#2|}% + \IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}% \expandafter\protected@write\@indexfile{}% {\string\indexentry{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline} }% @@ -3354,10 +3459,27 @@ \@esphack} } +\newcommand{\hyperlinkformat}[3]{% + \ifstrempty{#1}% + {\hyperlink{#2}{#3}}% + {\csuse{#1}{\hyperlink{#2}{#3}}% + }} +\newcommand{\get@edindex@hyperref}[1]{% + \ifcsdef{hyperlink}% + {\IfSubStr{#1}{|}% + {\get@index@command#1+% + \gdef\@edindex@hyperref{|\@index@parenthesis % + hyperlinkformat{\@index@command} + {\edindexlab\thelabidx}}}% + {\get@index@command#1|+ + \gdef\@edindex@hyperref{|hyperlink{\edindexlab\thelabidx}}}% + }% + {\gdef\@edindex@hyperref{}}% +} \AtBeginDocument{\@ifpackageloaded{hyperref}{}{% \def\l@d@@wrindexhyp#1||\\{% \ifshowindexmark\@showidx{#1}\fi - \IfSubStr[1]{#1}{|}{\get@index@command#1}{\get@index@command#1|}% + \IfSubStr[1]{#1}{|}{\get@index@command#1+}{\get@index@command#1|+}% \if@edindex@fornote@% \protected@write\@auxout{}% {\string\@@wrindexm@m{\@idxfile}{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}}% @@ -3446,7 +3568,7 @@ \stanza@modulo\@ne \fi } -\def\stanza@line{ +\newcommandx{\stanza@line}[1][1]{ \ifnum\value{stanzaindentsrepetition}=0 \parindent=\csname sza@\number\stanza@count @\endcsname\stanzaindentbase @@ -3455,7 +3577,7 @@ @\endcsname\stanzaindentbase \managestanza@modulo \fi - \pstart\stanza@hang\ignorespaces} + \pstart[#1]\stanza@hang\ignorespaces} \xdef\stanza@hang{\noexpand\leavevmode\noexpand\startlock \hangindent\expandafter \noexpand\csname sza@0@\endcsname\stanzaindentbase @@ -3465,26 +3587,41 @@ \penalty\fi\count@} \let\startstanzahook\relax \let\endstanzaextra\relax -\xdef\stanza{\noexpand\instanzatrue\expandafter - \begingroup\startstanzahook% - \catcode`\noexpand\&\active% - \global\stanza@count\@ne\stanza@modulo\@ne - \noexpand\ifnum\expandafter\noexpand - \csname sza@0@\endcsname=\z@\let\noexpand\stanza@hang\relax - \let\noexpand\endlock\relax\noexpand\else\interlinepenalty - \@M\rightskip\z@ plus 1fil\relax\noexpand\fi\noexpand\ifnum - \expandafter\noexpand\csname szp@0@\endcsname=\z@ - \let\noexpand\sza@penalty\relax\noexpand\fi% +\xdef\@startstanza[#1]{% + \noexpand\instanzatrue\expandafter + \begingroup\startstanzahook% + \catcode`\noexpand\&\active% + \global\stanza@count\@ne\stanza@modulo\@ne + \noexpand\ifnum\expandafter\noexpand + \csname sza@0@\endcsname=\z@\let\noexpand\stanza@hang\relax + \let\noexpand\endlock\relax\noexpand\else\interlinepenalty + \@M\rightskip\z@ plus 1fil\relax\noexpand\fi\noexpand\ifnum + \expandafter\noexpand\csname szp@0@\endcsname=\z@ + \let\noexpand\sza@penalty\relax\noexpand\fi% \def\noexpand\falseverse{% + \noexpand\eledmac@warning{\string\falseverse\space deprecated. Look at \string\newverse\space instead.} \global\advance\stanza@modulo-\@ne% \global\advance\stanza@count-\@ne% \relax\noexpand&\leavevmode\skipnumbering} - \def\noexpand&{% - \noexpand\endlock\noexpand\pend\noexpand\sza@penalty\global% - \advance\stanza@count\@ne\noexpand\stanza@line}% - \def\noexpand% - \&{\noexpand\endlock\noexpand\pend\endgroup\noexpand\instanzafalse\expandafter\endstanzaextra}% - \noexpand\stanza@line} + \def\noexpand&{% + \noexpand\newverse[][]}% + \def\noexpand\&{\noexpand\@stopstanza}% + \noexpand\stanza@line[#1]} + +\newcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1]} + +\newcommandx{\@stopstanza}[1][1,usedefault]{% + \endlock% + \pend[#1]% + \endgroup% + \instanzafalse% + \endstanzaextra% +} + +\newcommandx*{\newverse}[2][1,2,usedefault]{% + \endlock\pend[#1]\sza@penalty\global% + \advance\stanza@count\@ne\stanza@line[#2]% + } \newcommand*{\flagstanza}[2][\stanzaindentbase]{% \hskip -#1\llap{#2}\hskip #1\ignorespaces} @@ -4107,6 +4244,499 @@ \usingedtext +\newcommand{\initnumbering@sectcmd}{ + \newcommand{\ledsection}[2][]{\eledmac@warning{\string\ledsection\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi%% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \WithSuffix\newcommand\ledsection*[1]{\eledmac@warning{\string\ledsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \newcommand{\ledsubsection}[2][]{\eledmac@warning{\string\ledsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \WithSuffix\newcommand\ledsubsection*[1]{\eledmac@warning{\string\ledsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \newcommand{\ledsubsubsection}[2][]{\eledmac@warning{\string\ledsubsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \WithSuffix\newcommand\ledsubsubsection*[1]{\eledmac@warning{\string\ledsubsubsection*\space deprecated}% + \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% + \pstart% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \vspace{-2\parskip}\vspace{-2\baselineskip}% + \ifautopar\else\pstart\fi + } + \newcommand\ledchapter[2][]{% + \eledmac@warning{\string\ledchapter\space deprecated}% + \ifl@dmemoir% + \gdef\ch@pt@c{##1}% + \fi% + ~\pend\skipnumbering% + \pstart% + \@patchforledchapter\chapter[##1]{##2}% + \pend\pstart} + \WithSuffix\newcommand\ledchapter*[1]{% + \eledmac@warning{\string\ledchapter*\space deprecated}% + ~\pend\skipnumbering% + \pstart% + \@patchforledchapter\chapter*{##1}\pend% + \pstart} + \def\@patchforledchapter{ + \patchcmd{\@makeschapterhead}{1\par}{1}{}{} + \pretocmd{\@makeschapterhead}{\par}{}{} + \apptocmd{\@makeschapterhead}{\par}{}{} + \patchcmd{\@makeschapterhead}{\vskip 40\p@}{}{}{} + \patchcmd{\@makechapterhead}{1\par}{1}{}{} + \pretocmd{\@makechapterhead}{\par}{}{} + \apptocmd{\@makechapterhead}{\par}{}{} + \patchcmd{\@makechapterhead}{\vskip 40\p@}{}{}{} + \apptocmd{\@chapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} + \apptocmd{\@schapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{} + \newcommand\beforeledchapter{\pend\cleardoublepage\pstart} + \patchcmd{\chapter}{\cleardoublepage}{\relax}{}{} + \patchcmd{\chapter}{\clearpage}{\relax}{}{} + } + \ifnoquotation@\else + \renewcommand{\quotation}{\par\leavevmode% + \parindent=1.5em% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + \global\leftskip=\leftmargin% + \global\rightskip=\leftmargin% + } + \renewcommand{\endquotation}{\par% + \global\leftskip=0pt% + \global\rightskip=0pt% + \leavevmode% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + } + \renewcommand{\quote}{\par\leavevmode% + \parindent=0pt% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + \global\leftskip=\leftmargin% + \global\rightskip=\leftmargin% + } + \renewcommand{\endquote}{\par% + \global\leftskip=0pt% + \global\rightskip=0pt% + \leavevmode% + \skipnumbering% + \ifautopar% + \vskip-\parskip% + \else% + \vskip\topsep% + \fi% + } + \fi +} +\newcommand{\ledsectnotoc}{\let\addcontentsline\@gobblethree} +\newcommand{\ledsectnomark}{% + \let\chaptermark\@gobble% + \let\sectionmark\@gobble% + \let\subsectionmark\@gobble% +} +\ifl@dmemoir + \newcommand\beforeeledchapter{\clearforchapter} +\else + \newcommand\beforeeledchapter{\if@openright\cleardoublepage\else\clearpage\fi} +\fi +\newif\if@eled@sectioning +\def\print@rightmargin@eledsection{% + \if@eled@sectioning% + \begingroup% + \if@RTL% + \let\llap\rlap% + \let\leftlinenum\rightlinenum% + \let\leftlinenumR\rightlinenumR% + \let\l@drd@ta\l@dld@ta% + \let\l@drsn@te\l@dlsn@te% + \fi% + \hfill\l@drd@ta \csuse{LR}{\l@drsn@te}% + \endgroup% + \fi% +}% + +\def\print@leftmargin@eledsection{% + \if@eled@sectioning% + \leavevmode% + \begingroup% + \if@RTL% + \let\rlap\llap% + \let\rightlinenum\leftlinenum% + \let\rightlinenumR\leftlinenumR% + \let\l@dld@ta\l@drd@ta% + \let\l@dlsn@te\l@drsn@te% + \fi% + \l@dld@ta\csuse{LR}{\l@dlsn@te}% + \endgroup% + \fi% +}% + +\catcode`\#=12 % Space NEEDS by \catcode +\AtBeginDocument{% +\patchcmd{\chapter}{\clearforchapter}{% + \ifnumbering\else% + \clearforchapter + \fi% + } + {} + {} + +\pretocmd{\M@sect} + {\let\old@edtext=\edtext% + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\M@sect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\M@sect} + { #9} + { #9% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\M@sect} + {\hskip #3\relax} + {\hskip #3\relax% + \print@leftmargin@eledsection% + } + {} + {} + +\pretocmd{\@mem@old@ssect} + {\let\old@edtext=\edtext% + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\@mem@old@ssect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\@mem@old@ssect} + {#5} + {#5% + \print@leftmargin@eledsection% + } + {} + {} + +\patchcmd{\@mem@old@ssect} + {\hskip #1} + {\hskip #1% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{% + \if@eled@sectioning\else% + \leavevmode\if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection : will make the critical notes not in the same page than title. + \fi% + }% + {}% + {}% + +\patchcmd{\@makechapterhead} + {#1} + {\print@leftmargin@eledsection% + #1% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\@makechapterhead}% For BIDI + {\if@RTL\raggedleft\else\raggedright\fi}% + {\if@eled@sectioning\else% + \if@RTL\raggedleft\else\raggedright\fi% + \fi% + }% + {}% + {}% + +\patchcmd{\@makeschapterhead} + {#1} + {\print@leftmargin@eledsection% + #1% + \print@rightmargin@eledsection% + } + {} + {} + +\pretocmd{\@sect} + {\let\old@edtext=\edtext + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\@sect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\@sect} + {#8} + {#8% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\@sect} + {\hskip #3\relax} + {\hskip #3\relax% + \print@leftmargin@eledsection% + } + {} + {} + +\pretocmd{\@ssect} + {\let\old@edtext=\edtext% + \let\edtext=\dummy@edtext% + } + {} + {} + +\apptocmd{\@ssect} + {\let\edtext=\old@edtext} + {} + {} + +\patchcmd{\@ssect} + {#5} + {#5% + \print@rightmargin@eledsection% + } + {} + {} + +\patchcmd{\@ssect} + {\hskip #1} + {\hskip #1% + \print@leftmargin@eledsection% + } + {} + {} +}% +\catcode`\#=6 %Space NEEDS by \catcode +\newwrite\eled@sectioning@out +\newcommand{\eledchapter}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} + +\newcommand{\eledsection}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} + +\newcommand{\eledsubsection}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} +\newcommand{\eledsubsubsection}[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledchapter*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledsection*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledsubsection*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} + +\WithSuffix\newcommand\eledsubsubsection*[2][]{% + #2% + \ifledRcol% + \immediate\write\eled@sectioningR@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R} + }% + \else% + \immediate\write\eled@sectioning@out{% + \string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsL}{*}{} + }% + \fi% +} +\def\eled@chapter#1#2#3#4#5{% + \ifstrempty{#4}% + {% + \ifstrempty{#1}% + {% + \global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}% + }%Need for \pairs, because of using parbox. + {% + \global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter[#1]{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\chaptermark{#2}}%Need for \pairs, because of using parbox. + }% + }% + {% + \ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter*{#2}}} + {\global\csdef{eled@sectioning@#3#5}{\let\edtext=\dummy@edtext\chapter*[#1]{#2}}}%Bug in LaTeX! + }% + \listcsgadd{eled@sections#5@@}{#3}% + } +\def\eled@section#1#2#3#4#5{% + \ifstrempty{#4}% + {\ifstrempty{#1}% + {% + \global\csdef{eled@sectioning@#3#5}{\section{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#2}}%Need for \pairs, because of using parbox. + }% + {% + \global\csdef{eled@sectioning@#3#5}{\section[#1]{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\sectionmark{#1}}%Need for \pairs, because of using parbox. + }% + }% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\section*{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\section*[#1]{#2}}}%Bug in LaTeX! + } + \listcsgadd{eled@sections#5@@}{#3}% + } +\def\eled@subsection#1#2#3#4#5{% + \ifstrempty{#4}% + {\ifstrempty{#1}% + {% + \global\csdef{eled@sectioning@#3#5}{\subsection{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#2}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book) + }% + {% + \global\csdef{eled@sectioning@#3#5}{\subsection[#1]{#2}}% + \global\csdef{eled@sectmark@#3#5}{\let\edtext=\dummy@edtext{}\csuse{subsectionmark}{#1}}%Need for \pairs, because of using parbox. \csuse in case of \subsectionmark is not defined (book) + }% + }% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\subsection*{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\subsection*[#1]{#2}}}%Bug in LaTeX! + } + \listcsgadd{eled@sections#5@@}{#3}% + } +\def\eled@subsubsection#1#2#3#4#5{% + \ifstrempty{#4}% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection[#1]{#2}}}% + }% + {\ifstrempty{#1}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection*{#2}}}% + {\global\csdef{eled@sectioning@#3#5}{\subsubsection*[#1]{#2}}}%Bug in LaTeX! + } + \listcsgadd{eled@sections#5@@}{#3}% + } + \def\normal@page@break{} \def\l@prev@pb{} \def\l@prev@nopb{} diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty index 60b80af8ceb..6b0a96c5264 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty @@ -24,7 +24,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledpar}[2014/04/14 v1.7.0 eledmac extension for parallel texts] +\ProvidesPackage{eledpar}[2014/08/05 v1.8.0 eledmac extension for parallel texts]% \newif\ifshiftedpstarts \let\shiftedversestrue\shiftedpstartstrue @@ -58,19 +58,6 @@ \newif\ifpst@rtedR \pst@rtedRfalse -\providecommand*{\beginnumbering}{% - \ifnumbering - \led@err@NumberingStarted - \endnumbering - \fi - \global\l@dnumpstartsL \z@ - \global\pst@rtedLfalse - \global\numberingtrue - \global\advance\section@num \@ne - \initnumbering@reg - \message{Section \the\section@num}% - \line@list@stuff{\jobname.\extensionchars\the\section@num}% - \l@dend@stuff} \newcommand*{\beginnumberingR}{% \ifnumberingR \led@err@NumberingStarted @@ -95,10 +82,11 @@ \l@dend@stuff \setcounter{pstartR}{1} \begingroup - \initnumbering@sectcmd \initnumbering@sectcountR + \gdef\eled@sectionsR@@{} + \makeatletter\InputIfFileExists{\jobname.eledsec\the\section@numR R}{}{}\makeatother + \immediate\openout\eled@sectioningR@out=\jobname.eledsec\the\section@numR R\relax } - \def\endnumberingR{% \ifnumberingR \global\numberingRfalse @@ -118,7 +106,10 @@ \fi \else \led@err@NumberingNotStarted - \fi\endgroup} + \fi + \endgroup + \immediate\closeout\eled@sectioningR@out + } \newcounter{chapterR} \newcounter{sectionR} @@ -139,6 +130,7 @@ \led@mess@SectionContinued{\the\section@numR R}% \line@list@stuffR{\jobname.\extensionchars\the\section@numR R}% \l@dend@stuff + \initnumbering@sectcmd \else \led@err@numberingShouldHaveStarted \endnumberingR @@ -303,7 +295,7 @@ \fi \fi} -\newcommand{\@l@regR}{% +\newcommand{\@nl@regR}{% \ifx\l@dchset@num\relax \else \advance\absline@numR \@ne \set@line@action @@ -347,12 +339,12 @@ \fi \fi} -\renewcommand*{\@l}[2]{% +\renewcommand*{\@nl}[2]{% \fix@page{#1}% \ifledRcol - \@l@regR + \@nl@regR \else - \@l@reg + \@nl@reg \fi} \newcount\last@page@numR @@ -628,9 +620,9 @@ \fi} \newcommand*{\new@lineL}{% - \write\linenum@out{\string\@l[\the\c@page][\thepage]}} + \write\linenum@out{\string\@nl[\the\c@page][\thepage]}} \newcommand*{\new@lineR}{% - \write\linenum@outR{\string\@l[\the\c@page][\thepage]}} + \write\linenum@outR{\string\@nl[\the\c@page][\thepage]}} \renewcommand*{\flag@start}{% \ifledRcol \edef\next{\write\linenum@outR{% @@ -767,6 +759,7 @@ \newenvironment{pairs}{%} \l@dpairingtrue \l@dpagingfalse + \initnumbering@sectcmd }{% \l@dpairingfalse } @@ -775,6 +768,7 @@ \let\chapter\chapterinpages \l@dpairingtrue \l@dpagingtrue + \initnumbering@sectcmd \setlength{\Lcolwidth}{\textwidth}% \setlength{\Rcolwidth}{\textwidth}% }{% @@ -791,16 +785,15 @@ \newif\ifinstanzaR \newenvironment{Leftside}{% \ledRcolfalse - \let\beginnumbering\beginnumbering\setcounter{pstartL}{1} + \setcounter{pstartL}{1} \let\pstart\pstartL \let\thepstart\thepstartL \let\pend\pendL \let\memorydump\memorydumpL \Leftsidehook - \let\oldstanza\stanza - \renewcommand{\stanza}{\oldstanza\global\instanzaLtrue} + \let\old@startstanza\@startstanza + \def\@startstanza[##1]{\global\instanzaLtrue\old@startstanza[##1]} }{ - \let\stanza\oldstanza \Leftsidehookend} \newcommand*{\Leftsidehook}{} \newcommand*{\Leftsidehookend}{} @@ -821,11 +814,10 @@ \let\lednopb\lednopbR \let\lineation\lineationR \Rightsidehook - \let\oldstanza\stanza - \renewcommand{\stanza}{\oldstanza\global\instanzaRtrue} + \let\old@startstanza\@startstanza + \def\@startstanza[##1]{\global\instanzaRtrue\old@startstanza[##1]} }{% \ledRcolfalse - \let\stanza\oldstanza \Rightsidehookend } @@ -840,12 +832,12 @@ \newcounter{pstartRold} \renewcommand{\thepstartR}{{\bfseries\@arabic\c@pstartR}. } -\newcommand*{\pstartL}{% -\if@nobreak% +\newcommandx*{\pstartL}[1][1]{% + \if@nobreak% \let\@oldnobreak\@nobreaktrue% -\else% + \else% \let\@oldnobreak\@nobreakfalse% -\fi% + \fi% \@nobreaktrue% \ifnumbering \else% \led@err@PstartNotNumbered% @@ -880,13 +872,16 @@ \numberedpar@true% \iflabelpstart\protected@edef\@currentlabel% {\p@pstartL\thepstartL}\fi% + \ifstrempty{#1}% + {}% + {\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}% } -\newcommand*{\pstartR}{% -\if@nobreak% +\newcommandx*{\pstartR}[1][1]{% + \if@nobreak% \let\@oldnobreak\@nobreaktrue% -\else% + \else% \let\@oldnobreak\@nobreakfalse% -\fi% + \fi% \@nobreaktrue% \ifnumberingR \else% \led@err@PstartNotNumbered% @@ -920,8 +915,12 @@ \numberedpar@true% \iflabelpstart\protected@edef\@currentlabel% {\p@pstartR\thepstartR}\fi% + \ifstrempty{#1}% + {} + {\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}% } -\newcommand*{\pendL}{\ifnumbering \else% +\newcommandx*{\pendL}[1][1]{% + \ifnumbering \else% \led@err@PendNotNumbered% \fi% \ifnumberedpar@ \else% @@ -937,9 +936,12 @@ \addtocounter{pstartL}{1}% \fi \parledgroup@beforenotes@save{L}% + \ifstrempty{#1}% + {}% + {\csgdef{after@pendL@\the\l@dnumpstartsL}{\noindent#1}}% } - -\newcommand*{\pendR}{\ifnumberingR \else% +\newcommandx*{\pendR}[1][1]{% + \ifnumberingR \else% \led@err@PendNotNumbered% \fi% \ifnumberedpar@ \else% @@ -954,7 +956,10 @@ \ifnumberpstart% \addtocounter{pstartR}{1}% \fi% - \parledgroup@beforenotes@save{R} + \parledgroup@beforenotes@save{R}% + \ifstrempty{#1}% + {}% + {\csgdef{after@pendR@\the\l@dnumpstartsR}{\noindent#1}}% } \newbox\l@dleftbox @@ -982,18 +987,19 @@ \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{} \unvbox\one@line \global\setbox\one@line=\lastbox \getline@numL -\ifnum\@lock>\@ne\inserthangingsymboltrue\else\inserthangingsymbolfalse\fi + \ifnum\@lock>\@ne% + \inserthangingsymboltrue% + \else% + \inserthangingsymbolfalse% + \fi \setbox\l@dleftbox \hb@xt@ \Lcolwidth{% - \affixpstart@numL \affixline@num - \l@dld@ta \add@inserts \affixside@note - \l@dlsn@te - {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta% - \l@drsn@te - }}% + \xifinlist{\the\l@dpscL}{\eled@sections@@}% + {}% + {\print@lineL}}% \add@penaltiesL \global\advance\@donereallinesL\@ne \global\advance\@donetotallinesL\@ne @@ -1002,12 +1008,38 @@ \global\advance\@donetotallinesL\@ne \fi} +\def\print@lineL{% + \affixpstart@numL% + \l@dld@ta %space kept for backwar compatibility + \l@dlsn@te %space kept for backwar compatibility + {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta% + \l@drsn@te}} +\def\print@eledsectionL{% + \addtocounter{pstartL}{-1}% + \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{} + \ifdefstring{\@eledsectmark}{L}{}{\ledsectnomark} + \numdef{\temp@}{\l@dpscL-1}% + \xifinlist{\temp@}{\eled@sections@@}{\@nobreaktrue}{\@nobreakfalse}% + \@eled@sectioningtrue% + \csuse{eled@sectioning@\the\l@dpscL}% + \@eled@sectioningfalse% + \global\csundef{eled@sectioning@\the\l@dpscL}% + \if@RTL% + \hspace{-\paperwidth}% + {\hbox{\l@dunhbox@line{\one@line}} \new@line}% + \else% + \hspace{\paperwidth}% + {\new@line \hbox{\l@dunhbox@line{\one@line}}}% + \fi% + \vskip\eledsection@correcting@skip% +} \newcommand*{\do@lineLhook}{} \newcommand*{\do@lineRhook}{} \newcommand*{\do@insidelineLhook}{} \newcommand*{\do@insidelineRhook}{} \newcommand*{\do@lineR}{% + \ledRcol@true% \advance\countRline \@ne \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}% {\vbadness=10000 @@ -1016,29 +1048,61 @@ \l@demptyd@ta \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR} to\baselineskip}% - \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{} + \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{} \unvbox\one@lineR \global\setbox\one@lineR=\lastbox \getline@numR -\ifnum\@lockR>\@ne\inserthangingsymbolRtrue\else\inserthangingsymbolRfalse\fi + \ifnum\@lockR>\@ne% + \inserthangingsymbolRtrue + \else% + \inserthangingsymbolRfalse% + \fi% \setbox\l@drightbox \hb@xt@ \Rcolwidth{% - \affixpstart@numR - \affixline@numR - \l@dld@ta + \affixline@numR% \add@insertsR \affixside@noteR - \l@dlsn@te - {\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\do@insidelineRhook\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta% - \l@drsn@te - }}% + \xifinlist{\the\l@dpscR}{\eled@sectionsR@@}% + {}% + {\print@lineR}% + }% \add@penaltiesR \global\advance\@donereallinesR\@ne \global\advance\@donetotallinesR\@ne \else \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}} \global\advance\@donetotallinesR\@ne -\fi} +\fi +\ledRcol@false% +} +\def\print@lineR{% + \affixpstart@numR% + \l@dld@ta + \l@dlsn@te +\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\do@insidelineRhook\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta% + \l@drsn@te + } + +\def\print@eledsectionR{% + \addtocounter{pstartR}{-1}% + \initnumbering@sectcountR% + \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}% + \ifdefstring{\@eledsectmark}{R}{}{\ledsectnomark}% + \numdef{\temp@}{\l@dpscR-1}% + \xifinlist{\temp@}{\eled@sectionsR@@}{\@nobreaktrue}{\@nobreakfalse}% + \@eled@sectioningtrue% + \csuse{eled@sectioning@\the\l@dpscR R}% + \@eled@sectioningfalse% + \global\csundef{eled@sectioning@\the\l@dpscR R}% + \if@RTL% + \hspace{-\paperwidth}% + {\hbox{\l@dunhbox@line{\one@lineR}} \new@lineR}% + \else% + \hspace{\paperwidth}% + {\new@lineR \hbox{\l@dunhbox@line{\one@lineR}}}% + \fi% + \vskip\eledsection@correcting@skip +} \newcommand*{\getline@numR}{% \global\advance\absline@numR \@ne \do@actionsR @@ -1416,61 +1480,14 @@ \to\labelref@list \fi} +\WithSuffix\newcommand\sidenotemargin*[1]{% + \l@dgetsidenote@margin{#1} + \global\sidenote@marginR=\@l@dtempcntb + \global\sidenote@margin=\@l@dtempcntb +} \newcount\sidenote@marginR -\renewcommand*{\sidenotemargin}[1]{{% - \l@dgetsidenote@margin{#1}% - \ifnum\@l@dtempcntb>\m@ne - \ifledRcol - \global\sidenote@marginR=\@l@dtempcntb - \else - \global\sidenote@margin=\@l@dtempcntb - \fi - \fi}} -\sidenotemargin{right} \global\sidenote@margin=\@ne -\renewcommand*{\l@dlsnote}[1]{% - \begingroup% - \newcommand{\content}{#1}% - \ifnumberedpar@ - \ifledRcol% - \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% - \to\inserts@listR - \global\advance\insert@countR \@ne% - \else% - \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne% - \fi - \fi\ignorespaces\endgroup} -\renewcommand*{\l@drsnote}[1]{% - \begingroup% - \newcommand{\content}{#1}% - \ifnumberedpar@ - \ifledRcol% - \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% - \to\inserts@listR - \global\advance\insert@countR \@ne% - \else% - \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne% - \fi - \fi\ignorespaces\endgroup} -\renewcommand*{\l@dcsnote}[1]{% - \begingroup% - \newcommand{\content}{#1}% - \ifnumberedpar@ - \ifledRcol% - \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% - \to\inserts@listR - \global\advance\insert@countR \@ne% - \else% - \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% - \to\inserts@list - \global\advance\insert@count \@ne% - \fi - \fi\ignorespaces\endgroup} \newcommand*{\affixside@noteR}{% \def\sidenotecontent@{}% @@ -1484,27 +1501,38 @@ \numdef{\itemcount@}{\itemcount@+1}% }% \dolistloop{\l@dcsnotetext}% - \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@numR R p. \the\page@numR,}}{}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@numR\space p. \the\page@numR,}}{}% \gdef\@templ@d{}% \ifx\@templ@d\l@dcsnotetext \else% \if@twocolumn% \if@firstcolumn% - \setl@dlp@rbox{\sidenotecontent@}% + \setl@dlp@rbox{##1}{\sidenotecontent@}% \else% \setl@drp@rbox{\sidenotecontent@}% \fi% \else% \@l@dtempcntb=\sidenote@marginR% \ifnum\@l@dtempcntb>\@ne% - \advance\@l@dtempcntb by\page@num% + \advance\@l@dtempcntb by\page@numR% \fi% \ifodd\@l@dtempcntb% - \setl@drp@rbox{\sidenotecontent@t}% + \setl@drp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@l}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space leftnotes on line \the\line@numR\space p. \the\page@numR,}}{}% + \setl@dlp@rbox{\sidenotecontent@}% \else% \setl@dlp@rbox{\sidenotecontent@}% + \gdef\sidenotecontent@{}% + \numdef{\itemcount@}{0}% + \dolistloop{\l@dcsnotetext@r}% + \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space rightnotes on line \the\line@numR\space p. \the\page@numR,}}{}% + \setl@drp@rbox{\sidenotecontent@}% \fi% \fi% - \fi} + \fi% +} \renewcommand{\l@dbfnote}[1]{% \ifnumberedpar@ @@ -1684,15 +1712,6 @@ \newif\ifl@dusedbabel \l@dusedbabelfalse -\newif\ifl@dsamelang - \l@dsamelangtrue -\newcommand*{\l@dchecklang}{% - \l@dsamelangfalse - \edef\@tempa{\theledlanguageL}\edef\@temp{\theledlanguageR}% - \ifx\@tempa\@tempb - \l@dsamelangtrue - \fi} - \newcommand*{\l@dbbl@set@language}[1]{% \edef\languagename{#1}% \select@language{\languagename}% @@ -1728,15 +1747,20 @@ \gdef\theledlanguageR{\bbl@main@language}% }% } - { \apptocmd{\xpg@set@language}{% - \ifledRcol \gdef\theledlanguageR{#1}% - \else \gdef\theledlanguageL{#1}% + { \let\old@otherlanguage\otherlanguage% + \renewcommand{\otherlanguage}[2][]{% + \selectlanguage[#1]{#2}% + \ifledRcol \gdef\theledlanguageR{#2}% + \else \gdef\theledlanguageL{#2}% \fi}% - \let\l@duselanguage\xpg@set@language + \let\l@duselanguage\xpg@set@language% \gdef\theledlanguageL{\xpg@main@language}% \gdef\theledlanguageR{\xpg@main@language}% }} +\newsavebox{\@eledsectionL}% +\newsavebox{\@eledsectionR}% \newcommand*{\Columns}{% + \eledsection@correcting@skip=-\baselineskip% Correction for sections' titles \setcounter{pstartL}{\value{pstartLold}} \setcounter{pstartR}{\value{pstartRold}} \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else @@ -1757,21 +1781,40 @@ \global\advance\l@dpscL \@ne \global\advance\l@dpscR \@ne \checkraw@text - \l@dchecklang { \loop\ifaraw@text - \ifl@dsamelang - \do@lineL - \do@lineR - \else \l@duselanguage{\theledlanguageL}% \do@lineL + \xifinlist{\the\l@dpscL}{\eled@sections@@} + {% + \ifdefstring{\@eledsectmark}{L}% + {\csuse{eled@sectmark@\the\l@dpscL}% + }{}% + \global\csundef{eled@sectmark@\the\l@dpscL}% + \savebox{\@eledsectionL}{\parbox[t][][t]{\Lcolwidth}{\vbox{}\print@eledsectionL}}%\vbox{}-> prevent alignment troubles with RTL language + }% + {}% \l@duselanguage{\theledlanguageR}% \do@lineR - \fi + \xifinlist{\the\l@dpscR}{\eled@sectionsR@@} + {% + \ifdefstring{\@eledsectmark}{R}% + {\csuse{eled@sectmark@\the\l@dpscR R}% + }{}% + \global\csundef{eled@sectmark@\the\l@dpscR R}% + \savebox{\@eledsectionR}{\parbox[t][][t]{\Rcolwidth}{\vbox{}\print@eledsectionR}}}%\vbox{}-> prevent alignment troubles with RTL language + {}% \hb@xt@ \hsize{% - \hfill \unhbox\l@dleftbox - \hfill \columnseparator \hfill - \unhbox\l@drightbox + \ifdefstring{\columns@position}{L}{}{\hfill }% + \unhbox\l@dleftbox% + \ifhbox\@eledsectionL% + \usebox{\@eledsectionL}% + \fi% + \print@columnseparator% + \unhbox\l@drightbox% + \ifhbox\@eledsectionR% + \usebox{\@eledsectionR}% + \fi% + \ifdefstring{\columns@position}{R}{}{\hfill}% }% \checkraw@text \checkverseL @@ -1803,6 +1846,19 @@ \global\instanzaLfalse \global\instanzaRfalse} +\def\print@columnseparator{% + \ifdim\beforecolumnseparator<0pt% + \hfill% + \else% + \hspace{\beforecolumnseparator}% + \fi% + \columnseparator% + \ifdim\aftercolumnseparator<0pt% + \hfill% + \else% + \hspace{\beforecolumnseparator}% + \fi% +}% \newcommand{\checkpb@columns}{% \newif\if@pb @@ -1829,6 +1885,15 @@ \newdimen\columnrulewidth \columnrulewidth=\z@ +\newcommand*{\columnsposition}[1]{% + \xdef\columns@position{#1}% + }% +\xdef\columns@position{R}% +\newlength{\beforecolumnseparator}% +\setlength{\beforecolumnseparator}{-2pt}% + +\newlength{\aftercolumnseparator}% +\setlength{\aftercolumnseparator}{-2pt}% \newif\if@pstarts \newcommand*{\check@pstarts}{% \@pstartsfalse @@ -1870,6 +1935,7 @@ \newcount\l@dminpagelines \newcommand*{\Pages}{% + \eledsection@correcting@skip=-2\baselineskip% line correcting for section titles. \setcounter{pstartL}{\value{pstartLold}} \setcounter{pstartR}{\value{pstartRold}} \parledgroup@notespacing@set@correction @@ -1918,8 +1984,14 @@ \checkpageL \l@duselanguage{\theledlanguageL}% %%% \begingroup -{ \loop\ifl@dsamepage +{ \loop\ifl@dsamepage% + \ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{} + \csuse{before@pstartL@\the\l@dpscL} + \global\csundef{before@pstartL@\the\l@dpscL} \do@lineL + \xifinlist{\the\l@dpscL}{\eled@sections@@} + {\print@eledsectionL}% + {}% \advance\numpagelinesL \@ne \ifshiftedpstarts \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi% @@ -1942,8 +2014,15 @@ \clearl@dleftpage }% \checkpageR \l@duselanguage{\theledlanguageR}% -{ \loop\ifl@dsamepage +{ \loop\ifl@dsamepage% + \initnumbering@sectcountR + \ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{} + \csuse{before@pstartR@\the\l@dpscR} + \global\csundef{before@pstartR@\the\l@dpscR} \do@lineR + \xifinlist{\the\l@dpscR}{\eled@sectionsR@@} + {\print@eledsectionR}% + {}% \advance\numpagelinesR \@ne \ifshiftedpstarts \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi% @@ -2152,13 +2231,12 @@ \ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}% box is not empty \else% box is empty \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}>\@donetotallinesL - \parledgroup@notes@endL + \parledgroup@notes@endL \else \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}=\@donetotallinesL \parledgroup@notes@endL \fi - \ifwrittenlinesL - \else + \ifwrittenlinesL\else \@writelinesinparL \writtenlinesLtrue \fi @@ -2171,6 +2249,8 @@ \resetprevline@ \fi \fi + \csuse{after@pendL@\the\l@dpscL}% + \global\csundef{after@pendL@\the\l@dpscL}% \addtocounter{pstartL}{1} \global\pstartnumtrue \l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}% @@ -2180,6 +2260,10 @@ \global\advance\l@dpscL \@ne \parledgroup@notes@endL \parledgroup@correction@notespacing@final{L} + \else + \l@dpagefulltrue + \csuse{after@pendL@\the\l@dpscL}% + \global\csundef{after@pendL@\the\l@dpscL}% \fi \fi \fi} @@ -2187,13 +2271,12 @@ \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}% box is not empty \else% box is empty \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}>\@donetotallinesR - \parledgroup@notes@endR + \parledgroup@notes@endR \else \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}=\@donetotallinesR \parledgroup@notes@endR \fi - \ifwrittenlinesR - \else + \ifwrittenlinesR\else \@writelinesinparR \writtenlinesRtrue \fi @@ -2206,6 +2289,8 @@ \resetprevline@ \fi \fi + \csuse{after@pendR@\the\l@dpscR}% + \global\csundef{after@pendR@\the\l@dpscR}% \addtocounter{pstartR}{1} \global\pstartnumRtrue \l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}% @@ -2215,10 +2300,20 @@ \global\advance\l@dpscR \@ne \parledgroup@notes@endR \parledgroup@correction@notespacing@final{R} + \else + \csuse{after@pendR@\the\l@dpscR}% + \global\csundef{after@pendR@\the\l@dpscR}% + \l@dpagefulltrue \fi \fi \fi} +\newcommand{\eledsectnotoc}[1]{\xdef\@eledsectnotoc{#1}} +\eledsectnotoc{R} +\newcommand{\eledsectmark}[1]{\xdef\@eledsectmark{#1}} +\eledsectmark{L} +\newskip\eledsection@correcting@skip +\newwrite\eled@sectioningR@out \def\l@prev@pbR{} \def\l@prev@nopbR{} \newcommand{\ledpbR}{\write\linenum@outR{\string\led@pbR}} @@ -2288,7 +2383,7 @@ \vspace{\parledgroup@notespacing@correction@accumulated} \parledgroup@correction@notespacing@init% \ifstrequal{#1}{L}{ - \numdef{\@checking}{\the\l@dpscL-1} + \numdef{\@checking}{\the\l@dpscL-1} }{ \numdef{\@checking}{\the\l@dpscR-1} } |