| 1 |
\documentclass{article} |
| 2 |
\usepackage{lipsum} |
| 3 |
\usepackage[series={A,B,C,D,E,F,G,H,I,J},noend,nofamiliar,noledgroup,noreledmac]{eledmac}%Declare series to be used |
| 4 |
\usepackage{eledpar} |
| 5 |
\usepackage{polyglossia} |
| 6 |
\setmainlanguage{english} |
| 7 |
\usepackage{libertine} |
| 8 |
|
| 9 |
|
| 10 |
% Here is the loop system: |
| 11 |
\makeatletter% We need to use command with @ |
| 12 |
% Two counters: one for left and one for right |
| 13 |
\newcounter{mynotelevel}% |
| 14 |
\renewcommand{\themynotelevel}{\Alph{mynotelevel}}% Print the counter as a letter |
| 15 |
\newcounter{mynotelevelR}% |
| 16 |
\renewcommand{\themynotelevelR}{\Alph{mynotelevelR}}% Print the counter as a letter |
| 17 |
\setcounter{mynotelevelR}{5} |
| 18 |
|
| 19 |
% Following lines are called at each \pstart |
| 20 |
\AtEveryPstartCall{% |
| 21 |
\ifledRcol%If it's a right pstart |
| 22 |
\addtocounter{mynotelevelR}{1}%Step counter |
| 23 |
\ifnumequal{\arabic{mynotelevelR}}{11}{%No more than J series (10) |
| 24 |
\setcounter{mynotelevelR}{6}% If more than J => restart to F (6) |
| 25 |
}{}% |
| 26 |
\global\letcs{\mynote}{\themynotelevelR footnote}% And let mynote equal to <X>footnote, where <X> is the current level \letcs is defined by etoolbox which is called by eledmac |
| 27 |
\else% If it's a left page |
| 28 |
\addtocounter{mynotelevel}{1}%Step counter |
| 29 |
\ifnumequal{\arabic{mynotelevel}}{6}{%No more than E series (5) |
| 30 |
\setcounter{mynotelevel}{1}%If more than J => restart to A (1) |
| 31 |
}{}% |
| 32 |
\global\letcs{\mynote}{\themynotelevel footnote}%And let mynote equal to <X>footnote, where <X> is the current level \letcs is defined by etoolbox which called by eledmac |
| 33 |
\fi% |
| 34 |
} |
| 35 |
% This code is called when beginnings of each pstart are printed |
| 36 |
\AtEveryPstart{% |
| 37 |
\ifodd\c@page%If we are on a left page |
| 38 |
\addtocounter{mynotelevelR}{1}%Step counter |
| 39 |
\ifnumequal{\arabic{mynotelevelR}}{11}{%No more than J series (10) |
| 40 |
\setcounter{mynotelevelR}{6}}{}% If more than J => restart to F (6) |
| 41 |
\seriesatend{\themynotelevelR}% The series should be at the end |
| 42 |
\else% |
| 43 |
\addtocounter{mynotelevel}{1}%Step counter |
| 44 |
\ifnumequal{\arabic{mynotelevel}}{6}{%No more than E series (5) |
| 45 |
\setcounter{mynotelevel}{1}}{}%% If more than E => restart to A (1) |
| 46 |
\seriesatend{\themynotelevel}% The series should be at the end |
| 47 |
\fi% |
| 48 |
} |
| 49 |
|
| 50 |
\makeatother |
| 51 |
\begin{document} |
| 52 |
|
| 53 |
\title{One series per \textbackslash pstart with eledmac} |
| 54 |
\author{} |
| 55 |
\maketitle |
| 56 |
\begin{abstract} |
| 57 |
This file provides examples of features that allow one series of notes by \verb+\pstart+…\verb+pend+, when typesetting parallel pages. |
| 58 |
|
| 59 |
We suppose there is no more than five \verb+\pstart+…\verb+pend+ by page. The series A, B, C, D and E are for left pages, while the series F, G, H, I, J are for right notes. |
| 60 |
|
| 61 |
\subsection*{In the left page} |
| 62 |
Instead of using \verb+\Afootnote+, \verb+\Bfootnote+ etc., we use \verb+\mynote+, which we let equal to \verb+\Afootnote+ at the first \verb+pstart+, \verb+\Bfootnote+ at the second \verb+\pstart+, \verb+\Cfootnote+ at the third, \verb+\Dfootnote+ at the fourth, \verb+\Efootnote+ at the fifth, and we restart at \verb+\Afootnote+ at the sixth \verb+\pstart+. |
| 63 |
|
| 64 |
To do that, we increment the counter \verb+mynotelevel+ at every \verb+pstart+ and reset it to~1 when it becomes equal to~6. |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
\subsection*{In the right page} |
| 69 |
|
| 70 |
We do the same thing, but use the \verb+mynotelevelR+ counter, rotating its values between 6 and 10, and, consequently, rotating between F, G, H, I, J series. |
| 71 |
|
| 72 |
\subsection*{Series position} |
| 73 |
We use \verb+\seriesatend+ to ensure that a \verb+pstart+ series between two pages will be printed on the first page at the end of the series, but on the second page at the beginning of the series. |
| 74 |
However, we need to do this when the \verb+pstart+s are printed, not when they are called. So we use: |
| 75 |
\begin{description} |
| 76 |
\item[\textbackslash AtEveryPstartCall] to set the footnote series. |
| 77 |
\item[\textbackslash AtEveryPstart] to set the footnote position. |
| 78 |
\end{description} |
| 79 |
\end{abstract} |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
\begin{pages} |
| 84 |
\begin{Leftside} |
| 85 |
\beginnumbering |
| 86 |
|
| 87 |
|
| 88 |
\pstart |
| 89 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 90 |
\edtext{\themynotelevel first}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 91 |
\lipsum[1] |
| 92 |
\pend |
| 93 |
|
| 94 |
\pstart |
| 95 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 96 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 97 |
\lipsum[2] |
| 98 |
\pend |
| 99 |
|
| 100 |
\pstart |
| 101 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 102 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 103 |
\lipsum[2] |
| 104 |
\pend |
| 105 |
|
| 106 |
\pstart |
| 107 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 108 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 109 |
\lipsum[2] |
| 110 |
\pend |
| 111 |
\pstart |
| 112 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 113 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 114 |
\lipsum[2]\edtext{on therpage}{\mynote{on otherpage}} |
| 115 |
\pend |
| 116 |
|
| 117 |
\pstart |
| 118 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 119 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 120 |
\lipsum[2] |
| 121 |
\pend |
| 122 |
|
| 123 |
|
| 124 |
\pstart |
| 125 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 126 |
\edtext{\themynotelevel first}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 127 |
\lipsum[1] |
| 128 |
\pend |
| 129 |
|
| 130 |
\pstart |
| 131 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 132 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 133 |
\lipsum[2] |
| 134 |
\pend |
| 135 |
|
| 136 |
\pstart |
| 137 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 138 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 139 |
\lipsum[2] |
| 140 |
\pend |
| 141 |
|
| 142 |
\pstart |
| 143 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 144 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 145 |
\lipsum[2] |
| 146 |
\pend |
| 147 |
\pstart |
| 148 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 149 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 150 |
\lipsum[2]\edtext{on therpage}{\mynote{on otherpage}} |
| 151 |
\pend |
| 152 |
|
| 153 |
\pstart |
| 154 |
\edtext{\themynotelevel Here}{\mynote{First footnote in \themynotelevel}} is the |
| 155 |
\edtext{\themynotelevel second}{\mynote{Second footnote in \themynotelevel.}} paragraph: |
| 156 |
\lipsum[2] |
| 157 |
\pend |
| 158 |
% Many more \pstart ... \pend to follow. |
| 159 |
|
| 160 |
\endnumbering |
| 161 |
\end{Leftside} |
| 162 |
|
| 163 |
\begin{Rightside} |
| 164 |
\beginnumbering |
| 165 |
|
| 166 |
\pstart |
| 167 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 168 |
\edtext{\themynotelevelR first}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 169 |
\lipsum[1] |
| 170 |
\pend |
| 171 |
|
| 172 |
\pstart |
| 173 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 174 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 175 |
\lipsum[2] |
| 176 |
\pend |
| 177 |
|
| 178 |
\pstart |
| 179 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 180 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 181 |
\lipsum[2] |
| 182 |
\pend |
| 183 |
|
| 184 |
\pstart |
| 185 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 186 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 187 |
\lipsum[2] |
| 188 |
\pend |
| 189 |
\pstart |
| 190 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 191 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 192 |
\lipsum[2]\edtext{on therpage}{\mynote{on otherpage}} |
| 193 |
\pend |
| 194 |
|
| 195 |
\pstart sss\themynotelevelR |
| 196 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 197 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 198 |
\lipsum[2] |
| 199 |
\pend |
| 200 |
|
| 201 |
\pstart |
| 202 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 203 |
\edtext{\themynotelevelR first}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 204 |
\lipsum[1] |
| 205 |
\pend |
| 206 |
|
| 207 |
\pstart |
| 208 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 209 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 210 |
\lipsum[2] |
| 211 |
\pend |
| 212 |
|
| 213 |
\pstart |
| 214 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 215 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 216 |
\lipsum[2] |
| 217 |
\pend |
| 218 |
|
| 219 |
\pstart |
| 220 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 221 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 222 |
\lipsum[2] |
| 223 |
\pend |
| 224 |
\pstart |
| 225 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 226 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 227 |
\lipsum[2]\edtext{on therpage}{\mynote{on otherpage}} |
| 228 |
\pend |
| 229 |
|
| 230 |
\pstart sss\themynotelevelR |
| 231 |
\edtext{\themynotelevelR Here}{\mynote{First footnote in \themynotelevelR}} is the |
| 232 |
\edtext{\themynotelevelR second}{\mynote{Second footnote in \themynotelevelR.}} paragraph: |
| 233 |
\lipsum[2] |
| 234 |
\pend |
| 235 |
|
| 236 |
% Many more \pstart ... \pend to follow. |
| 237 |
|
| 238 |
\endnumbering |
| 239 |
\end{Rightside} |
| 240 |
\end{pages} |
| 241 |
\setcounter{mynotelevel}{0}%Restart the left counter |
| 242 |
\setcounter{mynotelevelR}{5}% And restart the right counter |
| 243 |
\Pages |
| 244 |
|
| 245 |
\end{document} |