dd

Typesetting Critical Editions with LaTeX and ledmac

(Based on the Q&A of Dr. Dirk-Jan Dekker not more updated from 2007. Note for Dr. Dekker)

It is possible to typeset your own critical text edition with multiple footnote streams, footnotes keyed to line numbers, paragraphed footnotes, marginal notes, tabular material, verse, etc. Even a bilingual edition is possible. The powerful combination of LaTeX and ledmac is all you need to produce an edition with a professional layout.

The ledmac package for LaTeX allows you to produce professional critical editions. With ledmac and the ledpar extension you can typeset your critical edition in parallel columns or on parallel pages. You can download ledmac without cost from the CTAN archive. Please follow the instructions in the ‘README' file to install.

Q & A about Working with LaTeX and ledmac

1. I am new to LaTeX… what is it, where do I get it?
2. What can LaTeX and ledmac do that Microsoft Word cannot?
3. Where do I find documentation for ledmac and friends?
4. Which alternatives are there to ledmac?
5. Who wrote ledmac?
6. What about licensing?
7. Do you actually use ledmac and friends yourself?
8. I have a question. Where do I go?

9. What kinds of footnotes and endnotes does ledmac support?
10. How many footnote apparatuses does ledmac support?
11. How do I make a footnote in the style of a critical edition?
12. Can I rename those commands into something more meaningful?
13. May footnote lemmata overlap?
14. May \edtext span across paragraphs?
15. Can I change or suppress the standard right bracket?
16. Can I control whether ledmac prints a right bracket after a lemma?
17. Can line numbers in the footnote apparatus be printed in boldface?
18. I never want to have a lemma in boldface. What do I do?
19. I always want the page number in the footnote. What do I do?
20. How do I change the style of (sub-)line numbers?
21. If two consecutive notes belong to the same line, will ledmac repeat the line number?
22. Can I change or suppress the line number in a footnote?
23. Can I adjust the amount of whitespace between critical notes?
24. How do I set the amount of whitespace between text and footnotes?
25. How do I make a cross reference to an entire passage?
26. Does ledmac support sentence and/or paragraph numbering?
27. Can ledmac distinguish between multiple occurrences of a lemma in one line?
28. Does margin kerning work with ledmac?
29. Help! My footnotes are running off the bottom of the page!
30. Why am I getting "Overfull \hbox" messages?
31. Help! makeindex rejects my index entries!
32. Can I make a bilingual edition with ledmac (e.g., Latin left, English right)?
33. Can ledmac typeset a critical edition of Bible verse?
34. Does ledmac work together with betababel?
35. How do I make numbered footnotes in EDMAC?
36. How can I alternate linenumbering/nolinenumbering in my apparatus?
37. How can I obtain numbered footnotes in ledmac?

Return to start

Q 1: I am new to LaTeX… what is it, where do I get it?
A: LaTeX is an full-featured and professional typesetting program that is used by many authors, typesetters and publishers. It runs on practically every operating system.

LaTeX users all over the world have published introductions, manuals, and FAQs. These materials will help you with your first steps in LaTeX. Two highly recommended books are:
* Frank Mittelbach, Michel Goossens (et al.), The LaTeX Companion. Second Edition, Reading MA: Addison-Wesley Professional, 2004 (xxvii+1092 pp., CD-ROM, ISBN 0-201-36299-6, price ca. US$ 55);
* Helmut Kopka & Patrick W. Daly, Guide to LaTeX. Fourth Edition, Reading MA: Addison-Wesley Professional, 2004 (xii+597 pp., CD-ROM, ISBN 0-321-17385-6, price ca. US$ 45).

Return to start

Q 2: What can LaTeX and ledmac do that Microsoft Word cannot?
A: LaTeX has many benefits over conventional word processors, including higher output quality, more versatility, superior handling of long documents (even entire books) and excellent handling of bibliographical references (with BibTeX). In contrast to many word processors, LaTeX is extremely stable and has very few bugs.

With ledmac, a package to be used with LaTeX, you can typeset professional critical text editions with footnotes keyed to line numbers, multiple footnote apparatuses, paragraphed footnotes, index references referring to line numbers, etc. With ledpar you can typeset parallel editions, e.g., a critical Latin text on the left and a synchronized English translation on the right. All this cannot be done in Microsoft Word.

Apart from all these benefits there is also a financial advantage. LaTeX and ledmac are open source software and, therefore, will cost you absolutely nothing. A commercial word processor license usually sets you back a few hundred euros, plus the cost of any upgrades.

Return to start

Q 3: Where do I find documentation for ledmac?
A: ledmac comes with excellent documentation. You will probably find most of your questions answered in the manuals ledmac.pdf, which you can download from CTAN. The manual contain an user guide as well as a detailed technical explanation of the entire ledmac source code, and an appendix with sample critical editions with their complete .tex source. You can really learn a lot from them. If the manuals do not solve your questions, you could also point your newsreader to comp.text.tex.

Return to start

Q 4: Which alternatives are there to ledmac?
A: TeX/LaTeX alternatives to ledmac include:
* EDMAC, a Plain TeX package of which ledmac is a port to LaTeX;
* ednotes, a LaTeX package for critical editions (see article based on TUGboat 24 (2003), 224-236);
* poemscol, for typesetting poetry (see articles in TUGboat 22 (2001), 353-361 and The PracTeX Journal 3/2005);
* bigfoot, a bundle of packages;
* CET (Critical Edition Typesetter), a so-called "WYSIAWYG" front-end to TeX & EDMAC;
* Mauro-TeX (February 2003).

The Italian TeX Users Group (GuIT) has a web page in Italian about typesetting critical editions with LaTeX; there is also a Corso di Edizione Critica al Computer (here).

Return to start

Q 5: Who wrote ledmac?
A: I am not the author of ledmac. This package was written by Dr Peter R. Wilson. The ledmac package is based on earlier work of Dr John Lavagnino and Dr Dominik Wujastyk (the authors of EDMAC), of Dr Nora Gädeke and Dr Herbert Breger (the authors of TABMAC), and of Dr Wayne Sullivan (the author of EDSTANZA).

Return to start

Q 6: What about licensing?
A: The ledmac package and concomitant files are professional software that may be acquired, used and distributed without cost under the terms of the LaTeX Project Public License (LPPL) version 1.3 or later. You are allowed to modify the software under the terms of the same license.

Return to start

Q 7: Do you actually use ledmac yourself?
A: Yes, I do. I use ledmac to produce critical editions in the field of ancient christianity. I use ledmac under Linux. My favorite LaTeX text editor is Kile.

Return to start

Q 8: I have a question. Where do I go?
A: First, please, read the manual (online ledmac.pdf or in your computer). Also Usenet newsgroups like comp.text.tex are an excellent place to post your questions about ledmac. As a last solution, contact me. If I know the answer, I will help you. If not, we can cry together.

Return to start

Q 9: What kinds of footnotes and endnotes does ledmac support?
A: With ledmac you can produce familiar footnotes, paragraphed footnotes, footnotes in two or three columns, and endnotes. Every note apparatus can have its own format independently of other apparatuses.

Return to start

Q 10: How many footnote apparatuses does ledmac support?
A: In theory, ledmac supports a maximum of 255 footnote apparatuses. Fifteen apparatuses are available by default: five critical apparatuses numbered \Afootnote through \Efootnote, five familiar apparatuses numbered \footnoteA through \footnoteE, and five endnote apparatuses numbered \Aendnote through \Eendnote. If you need more, you can define additional apparatuses.

If you really need a lot of apparatuses and LaTeX reports the error message "! No room for a new \count .", then you should load the etex package to allow for more counters:

\usepackage{etex}

Return to start

Q 11: How do I make a footnote in the style of a critical edition?
A: To make a footnote in apparatus X and have it referred to by line number, use the \edtext and \Xfootnote commands ("X" stands for the letter that identifies the apparatus), and optionally the \lemma command. Make sure that you have defined apparatus X as a paragraphed footnote apparatus (put \footparagraph{X} in the preamble), and that you have turned line numbering on. The syntax of \edtext is as follows:

\edtext{<main text>}{\Xfootnote{<footnote text>}}

Here is an example. If your text reads "timorem Domini" in line 14, and you would like to add a variant reading "florem philosophiae" of some text witness P in the first footnote apparatus, then you would write:

\edtext{timorem Domini}{\Afootnote{florem philosophiae P}}

and the result in the A footnote apparatus will look like this:

14 timorem Domini] florem philosophiae P

By default, the lemma that it is printed in the main text (i.e., the first argument of \edtext, in this case "timorem Domini") is used as the lemma in the footnote. If you would like to have a different lemma in the footnote, then simply define the text of the footnote lemma yourself:

\edtext{<main text>}{\lemma{<lemma>}\Xfootnote{<footnote text>}}

The \lemma command comes in handy if you have a long lemma that you wish to abbreviate in the footnote apparatus. For example, if the main text reads "in parte quae" in line 23, which you would like to abbreviate to a lemma "in…quae" in the third ("C") apparatus, and there is a variant reading "parte qua" in source Q, then you would write:

\edtext{in parte quae}{\lemma{in\ldots quae}\Cfootnote{parte qua Q}}

and the result in the C footnote apparatus will look like this:

23 in…quae] parte qua Q

Return to start

Q 12: Can I rename those commands into something more meaningful?
A: Yes, you can. For example, if you prefer to write \variant instead of \Afootnote, then just add this line to your preamble:

\let\variant=\Afootnote

which allows you to write things like this in your text:

\edtext{timorem Domini}{\variant{florem philosophiae P}}

If you really want to, you could also define < as a shorthand form of \edtext. This will work in all but nested footnotes. Put this into your preamble:

\catcode`\<=\active
\let<=\edtext

This allows you to write in your text:

<{timorem Domini}{\variant{florem philosophiae P}}

Alternatively, you could combine the \edtext and \Xfootnote commands into a single new command. In the following example we combine \edtext and \Afootnote into a single command that we call \variant. More precisely, we define \variant{<main text>}{<footnote text>} as the two commands \edtext{<main text>} and {\Afootnote{<footnote text>}} issued consecutively. Please note that although this procedure can save you some typing, it is rather illogical to let the \variant command introduce the lemma instead of the variant reading.

\newcommand{\variant}[2]{\edtext{#1}{\Afootnote{#2}}}

After this definition the following two expressions yield the same result:

\edtext{timorem Domini}{\Afootnote{florem philosophiae P}}
\variant{timorem Domini}{florem philosophiae P}

Return to start

Q 13: May footnote lemmata overlap?
A: Yes, ledmac accepts overlapping footnote lemmata. This is easiest when footnotes are nested properly, i.e., when a nested \edtext{…}{\Xfootnote{…}} is enclosed completely inside another \edtext{…}. For example:

\edtext{A \edtext{nested}{\Afootnote{hard}} note}{\Afootnote{phew}}

If you need overlapping but unnested lemmata in the apparatus, then you can simulate these with clever use of ledmac's built-in commands. Suppose you have the following text:

Use ledmac for editions

and you would like to attach footnote 1 to the words "Use ledmac for", and footnote 2 to the words "ledmac for editions". In this case lemma 2 is not completely enclosed inside lemma 1, so putting the second \edtext{…} inside the first is not going to work. To solve this with ledmac, you begin with entering footnote 1 as a normal critical footnote. You should already mark the first word of lemma 2 with an \edlabel so that you can refer to it later on. You will write something like this:

\edtext{Use ledmac\edlabel{X} for}{\Afootnote{note 1}} editions

Now add footnote 2 to this code. The footnote should be attached to the word "editions". The result will look like this:

\edtext{Use ledmac\edlabel{X} for}{\Afootnote{note 1}}
\edtext{editions}{\Afootnote{note 2}}

Next, set the starting line number for footnote 2 by means of an \xlineref command, i.e., a reference to the preceding \edlabel{X}. Finally, you can set the lemma in footnote 2 with the \lemma command. The whole line will look like this (enter it as one continuous line without line breaks):

\edtext{Use ledmac\edlabel{X} for}{\Afootnote{note 1}}
\edtext{editions}{\linenum{|\xlineref{X}}\lemma{ledmac\ldots\
editions}\Afootnote{note 2}}

Return to start

Q 14: May \edtext span across paragraphs?
A: No, both arguments of \edtext must be closed before declaring \pend. Of course, you can attach a critical footnote to multiple paragraphs by using ledmac's built-in commands. In the following example the critical footnote is keyed to the first word of the first paragraph and the last word of the second paragraph. The lemma is changed accordingly.

\pstart
First\edlabel{one} line of the example.
\pend
\pstart
This is the second \edlabel{two}\edtext{paragraph}{%
{\xxref{one}{two}}\lemma{First\ldots\ paragraph}\Afootnote{test}}.
\pend

The result will look like this:

First line of the example.
This is the second paragraph.
line
1-2 First…paragraph ] test

Alternatively, you could use the following solution to obtain the same result:

\pstart
First\edlabel{mult} line of the example.
\pend
\pstart
This is the second \edtext{paragraph.}{\linenum{|\xlineref{mult}}%
\lemma{First\ldots\ paragraph}\Afootnote{test}}
\pend

Return to start

Q 15: Can I change or suppress the standard right bracket?
A: Yes. For example: to change the right bracket into a colon, just add this line to the preamble (adjust to suit):

\renewcommand{\rbracket}{\textnormal{\thinspace:}}

If you want to suppress the delimiter altogether, then write this instead:

\renewcommand{\rbracket}{}

Return to start

Q 16: Can I control whether ledmac prints a right bracket after a lemma?
A: In the footnote apparatus, ledmac prints a right bracket after each lemma by default. In some situations you would want to suppress the delimiter without killing it for all lemmata, e.g., if a text-critical footnote contains a palaeographical remark rather than a variant reading. To handle this case you can define the \abb command. Copy and paste the following five lines into your preamble:

\newcommand{\abb}[1]{#1%
\let\rbracket\nobrak\relax}
\newcommand{\nobrak}{\textnormal{}}
\newcommand{\morenoexpands}{%
\let\abb=0}

… and then redefine the format(s) of the relevant footnote apparatus(es) (adjust to suit):

\renewcommand{\Bparafootfmt}[3]{%
\ledsetnormalparstuff
\notenumfont\printlines#1|\enspace%
{\select@lemmafont#1|#2\rbracket}\enskip % mind the braces!
\notetextfont
#3\penalty-10}

Once you have defined the \abb command, it is used as follows:

\edtext{\abb{<main text>}}{\Xfootnote{<footnote text>}}

For example:

\edtext{\abb{cotidianum}}{\Bfootnote{\em{om.}\ P}}

74 cotidianum om. P

Or, if you wish to define the text of the footnote lemma yourself:

\edtext{<main text>}{\lemma{\abb{<lemma>}}\Xfootnote{<footnote text>}}

For example:

\edtext{in ea die}{\lemma{\abb{in\ldots die}}\Bfootnote{\em{om.}\ P}}

26 in…die om. P

Return to start

Q 17: Can line numbers in the footnote apparatus be printed in boldface?
A: Yes. Put this into your preamble:

\renewcommand{\notenumfont}{\bfseries\footnotesize}

Return to start

Q 18: I never want to have a lemma in boldface. What do I do?
A: By default, ledmac prints the lemma in the footnote in the same font encoding, family, series and shape as the lemma in the main text. If the lemma in the main text is set in boldface, then it will also be printed in boldface in the apparatus. To prevent this behavior you can redefine \select@@lemmafont in the preamble of your document. In the example below, you can see how the original command \fontseries{#3} that caused the boldface lemmata has been removed altogether.

\makeatletter
\def\select@lemmafont#1|#2|#3|#4|#5|#6|#7|%
{\select@@lemmafont#7|}
\def\select@@lemmafont#1/#2/#3/#4|%
{\fontencoding{#1}\fontfamily{#2}\fontshape{#4}%
\selectfont}
\makeatother

Return to start

Q 19: I always want the page number in the footnote. What do I do?
Copy the definition of the \printlines#1|#2|#3|#4|#5|#6|#7| macro from ledmac.sty (lines 1087 through 1120) into your preamble and change this line:

\ifl@d@pnum #1\fullstop\fi

into this:

#1\fullstop

Return to start

Q 20: How do I change the style of (sub-)line numbers?
A: You can change the style of line numbers and/or sub-line numbers with the commands \linenumberstyle{<style>} and/or \sublinenumberstyle{<style>}, respectively, in your preamble. These commands take one of the following as their argument: arabic (=default), Alph, alph, Roman, or roman. You may use different numbering styles for line numbers and sub-line numbers.

Argument(Sub-)line numbering styleExample
arabicnumbers (=default)1, 2, 3, …
Alphuppercase lettersA, B, C, …, X, Y, Z
alphlowercase lettersa, b, c, …, x, y, z
RomanRoman numerals uppercaseI, II, III, …
romanRoman numerals lowercasei, ii, iii, …

Please note: do not try to use Alph or alph for texts that are longer than 26 lines, or you will get a "Counter too large" error message.

To change the appearance of the (sub-)line numbers, please see Q. 12.

Return to start

Q 21: If two consecutive notes belong to the same line, will ledmac repeat the line number?
A: By default, ledmac prints the line number before every critical footnote. If you would like to prevent repeated line numbers within one apparatus, then copy and paste the following code into the preamble (assuming that you are using paragraphed footnotes):

\makeatletter
\renewcommand*{\para@vfootnote}[2]{%
\insert\csname #1footins\endcsname
\bgroup
\notefontsetup
\footsplitskips
\l@dparsefootspec #2\ledplinenumtrue %%%% FIRST ADDED LINE %%%%%%%%%%%%%%
\ifnum\@nameuse{previous@#1@number}=\l@dparsedstartline\relax
\ledplinenumfalse
\fi
\ifnum\previous@page=\l@dparsedstartpage\relax
\else \ledplinenumtrue \fi
\ifnum\l@dparsedstartline=\l@dparsedendline\relax
\else \ledplinenumtrue \fi
\expandafter\xdef\csname previous@#1@number\endcsname{\l@dparsedstartline}
\xdef\previous@page{\l@dparsedstartpage} %%%% LAST ADDDED LINE %%%%%%%%%%
\setbox0=\vbox{\hsize=\maxdimen
\noindent\csname #1footfmt\endcsname#2}%
\setbox0=\hbox{\unvxh0}%
\dp0=0pt
\ht0=\csname #1footfudgefactor\endcsname\wd0
\box0
\penalty0
\egroup}
\makeatother

Please note that this procedure does not alter ledmac's behavior inside a ledgroup environment, i.e., in a minipage. To prevent repeated line numbers inside a ledgroup environment you can modify the definition of \mppara@vfootnote in the same way as the definition of \para@vfootnote: insert the ten added lines (indicated above) inside the definition of \mppara@vfootnote, between the commands \footsplitskips and \setbox0=\vbox{\hsize=\maxdimen.

In addition to your redefinition of \para@vfootnote and/or of \mppara@vfootnote you should issue a \renewcommand of the format of the relevant footnote apparatus(es), and tell ledmac to remove unnecessary space following any suppressed line number. Just copy and paste this into your preamble and adjust to your needs:

\makeatletter
\renewcommand{\Bparafootfmt}[3]{%
\ledsetnormalparstuff
\notenumfont\printlines#1|% % new from here
\ifledplinenum
\enspace%
\else
{\hskip 0em plus0em minus.4em}%
\fi % to here
{\select@lemmafont#1|#2}\rbracket\enskip
\notetextfont
#3\penalty-10}
\makeatother

By issuing the commands above you tell ledmac not to print the space indicated by "whitespace 1" in the picture below unless the line number is printed, too (defined here for the B footnote apparatus). Because of the parameters of the \hskip command, the space preceding the first footnote belonging to a particular line will have a slight tendency to be larger than the space preceding subsequent lemmata belonging to the same line.
[Image: Controlling whitespace in ledmac]

Notice that ledmac is smart enough not to suppress the line number if it is part of a range of lines. For example, if a note belongs to line 14 and the next note belongs to lines 14-15, then ledmac will not suppress the second instance of "14", but will print the line numbers "14" and "14-15", respectively.

Return to start

Q 22: Can I change or suppress the line number in a footnote?
A: Yes, you can. We have seen above how to use the \lemma command to change the lemma text. In a somewhat similar fashion you can use the \linenum command to change the line number that gets printed in front of the lemma. For example: if a footnote is keyed to some text on lines 18-19, but for some reason you want ledmac to write "13-20" in the apparatus, then you could use the following command:

\edtext{<main text>}{\linenum{|13|||20||}\Afootnote{<footnote text>}}

The \linenum command takes one argument that consists of seven optional parameters separated by a vertical bar:

\linenum{#1|#2|#3|#4|#5|#6|#7}
#1 starting page number
#2 starting line number
#3 starting sub-line number
#4 ending page number
#5 ending line number
#6 ending sub-line number
#7 font specifier for the lemma

In order to omit the line number in an individual note, you cannot simply leave the parameters #2 and #5 empty: ledmac will interpret an empty parameter as an instruction not to change the computed parameter. Instead, you should first redefine \printlines#1|#2|#3|#4|#5|#6|#7| in the preamble, as indicated here (just copy and paste the following code into your preamble):

\makeatletter
\def\printlines#1|#2|#3|#4|#5|#6|#7|{%
\begingroup
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifnum#2=-1 \ledplinenumfalse \fi % This line is new
\ifl@d@pnum #1\fullstop\fi
\ifledplinenum \linenumrep{#2}\else \symplinenum\fi
\ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
\ifl@d@dash \endashchar\fi
\ifl@d@pnum #4\fullstop\fi
\ifl@d@elin \linenumrep{#5}\fi
\ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
\endgroup}
\makeatother

\newcommand{\killnumber}{\linenum{|-1|||-1||}}

This allows you to kill an individual line number as follows:

\edtext{<main text>}{\killnumber\Afootnote{<footnote text>}}

There is also a thread in comp.text.tex about this question.

Return to start

Q 23: Can I adjust the amount of whitespace between critical footnotes?
A: Yes. Issue the \interparanoteglue command in the preamble, like this (adjust values to suit):

\interparanoteglue{1em plus.4em minus.4em}

Return to start

Q 24: How do I set the amount of whitespace between text and footnotes?
A: Use the \footins command in the preamble. For example, to add 1.5 mm to the whitespace above the A footnote apparatus, you would write this:

\addtolength{\skip\Afootins}{1.5mm}

To set the length rather than add some amount to it, use \setlength instead of \addtolength. For example:

\setlength{\skip\Afootins}{1.5mm}

Of course, if you need whitespace above the B footnote apparatus, then replace \Afootins by \Bfootins. You can use any unit that LaTeX understands: em, ex, in, pt, pc, cm, mm, dd, cc, bp, or sp.

Please note: to set the footnote spacing inside a ledgroup environment (i.e., in ledmac's minipage environment) you should use

\setlength{\skip\mpAfootins}{1.5mm}

rather than \setlength{\skip\Afootins}{1.5mm}. The letters "mp" in the command name mean "minipage".

Return to start

Q 25: How do I make a cross reference to an entire passage?
A: It depends on how you are referring to the passage. There are two possibilities:

  1. the note itself is attached to a passage by means of a cross reference to two \edlabels:
    28-42 text] footnote
  2. inside the footnote text a reference occurs to a passage that you have marked with two \edlabels:
    39 text] See also 1.19-2.37

In the first case you need the built-in \xxref command, which changes the line numbers that precede a footnote. It is used like this:

\edtext{text}{\xxref{edlabel1}{edlabel2}\Afootnote{variant}}

In the second case you need a command that can be used inside the argument of \Xfootnote{...}. In this situation \xxref will not work. Instead, you should define a new command that checks the page and line numbers of both labels and then prints and/or suppresses the appropriate numbers and punctuation:

\newcommand{\refpassage}[2]{%
\xpageref{#1}\fullstop\xlineref{#1}%
\ifnum\xpageref{#1}=\xpageref{#2}
\ifnum\xlineref{#1}=\xlineref{#2}
\else
\endashchar\xlineref{#2}%
\fi
\else
\endashchar\xpageref{#2}\fullstop\xlineref{#2}%
\fi
}

You can modify the definition to suit: for example, you could add support for sub-line numbers. The command \refpassage is used like this:

\edtext{text}{\Afootnote{See \refpassage{mouse}{elephant}.}}

Return to start

Q 26: Does ledmac support sentence and/or paragraph numbering?
A: Yes, it does. Dr. Dekker posted an example featuring sentence numbers on comp.text.tex in the thread titled "Is it possible to use \startlock and \endlock in Ledmac to number sentences instead of lines?" You can adapt it to use paragraph numbers. There are also a few threads on comp.text.tex that deal with using paragraph numbers in the text and/or the footnotes: thread 1 (August 2003), thread 2 (September-October 2004), thread 3 (February 2005).

Return to start

Q 27: Can ledmac distinguish between multiple occurrences of a lemma in one line?
A: No, it cannot. For example, if you have a footnote keyed to the word est in line 38, and the word est occurs twice more in the same line, then ledmac will not mark the lemma in the footnote to indicate which occurrence of est the footnote belongs to (you would want to see, for example, est¹ for the first occurrence, est² for the second, and est³ for the third).

If ledmac were forced to check for multiple occurrences of all lemmata in their lines, typesetting the text could become very slow indeed. You will gain a lot of time if you proofread the footnotes manually and, if necessary, adjust the \lemma yourself. For example, to add a superscript number to the B footnote lemma of the second occurrence of the word est in line 38, you could type:

\edtext{est}{\lemma{est\textsuperscript{2}}\Bfootnote{erat Q}}

38 est²] erat Q

Return to start

Q 28: Does margin kerning work with ledmac?
A: Yes, it does if you use version 1.30 or later of pdfTeX and version 1.8 or later of the microtype package. To learn more about the principles behind margin kerning (also known as character protrusion), a typographic nicety that can make your text look a lot better, see the article Hàn Thê Thánh, 'Micro-typographic Extensions of pdfTeX in Practice', TUGboat 25 (2004), 35-38.

Return to start

Q 29: Help! My footnotes are running off the bottom of the page!
A: TeX (and also LaTeX) occasionally reserves too little space for the footnotes. If this happens you will get the error message "overfull \vbox" in the console. See for example the following critical text edition, that was done with LaTeX and ledmac and contains many variant readings in a relatively long footnote apparatus. The figure shows how the apparatus prints right over the page number:

[Image: Illustration of footnotes printing over page number]

Simply increase the value of \footfudgefiddle in the document preamble, for example from the standard value of 64 to 71:

\renewcommand{\footfudgefiddle}{71}

Another solution is to increase the value of \Xfootins. The optimal value for \Xfootins may be different for every footnote apparatus. You will have to try and see which values work best in your own critical edition. The default value is 1000. You can increase or decrease it as necessary. For example:

\count\Bfootins=1250

Return to start

Q 30: Why am I getting "Overfull \hbox" messages?
A: An "Overfull \hbox" message usually indicates that (La)TeX is having difficulties with hyphenation. These errors can occur in the main text, in the footnote apparatus, or in both. To solve them, make sure that you have loaded the babel package with the appropriate language(s) and that you declare the hyphenation of any problematic words with the \hyphenation command in the preamble. For example:

\documentclass{...}
\usepackage[latin]{babel}
\usepackage{ledmac}
\hyphenation{au-ro-ra cur-sus pro-ve-hit}
...
\begin{document}
...

Return to start

Q 31: Help! makeindex rejects my index entries!
A: First make sure that you have loaded ledmac and makeidx in the right order:

\usepackage{ledmac}
\usepackage{makeidx}
\makeindex

If your index entries are still rejected, then probably you have not compiled your document three times before running makeindex. If you have made your index entries with the \edindex command, then the raw index file (*.idx) should refer to them with a combination of page number and line number. For example, an entry ‘Stemmatology' that occurs on page 4, line 16 of your edition and that you have indexed as follows:

Mary likes stemmatology\edindex{Stemmatology} and codicology.

will show up in the raw index file (*.idx) as:

\indexentry{Stemmatology}{4-16}

and in the final index as:

Stemmatology, 4-16

The inclusion of the line numbers is not problematic for makeindex if you first compile your edition several times to stabilize page and line numbers (remember that LaTeX always requires several runs to get them straight) before you start compiling the index with makeindex. If makeindex complains with an error message like: "Scanning input file edition.idx....done (0 entries accepted, 18 rejected)", then you should [1] delete the auxiliary files (*.ind, *.idx, *.aux, *.1 etc.); [2] compile your document several times until the page numbers and line numbers have stabilized; [3] run makeindex to generate a new index; [4] compile the document once more to incorporate the index.

Return to start

Q 32: Can I make a bilingual edition with ledmac (e.g., Latin left, English right)?
A: Yes, you can. With ledpar, an extension to ledmac that you can download from CTAN, you can typeset synchronized parallel editions. You can typeset the parallel texts either in facing columns or on facing pages. The parallel texts can contain critical footnotes, and verse is also supported. The ledpar manual contains some examples that show you how to make the parallel edition.

If you need a more sofisticated transition between pages (for example, to distribute a very irregular text because the very different length of the apparatus and notes, or to get the last line at the right end of the margin page) you can do two different files numbering the pages two by two and splitting manually the text. To split the text you must end with \pend and use \phantom{} to break the line at the exact point, as for example:

Quintus, Maximianus, Telica, Rogatianus, \phantom{tttttttttt}
\pend
\newpage
\pstart
\noindent
Rogatus, Ianuarius, Cassianus, Victorianus...

Return to start

Q 33: Can ledmac typeset a critical edition of Bible verse?
A: Yes. The ledmac package can typeset Bible verse—with references keyed to verses rather than line numbers—. Copy and paste the following code into your preamble:

\newcommand{\startledbibleverse}{%
\startlock
\setcounter{firstlinenum}{999}
}
\newcommand{\ledbibleverse}[1]{%
#1% % change the verse number appearance to suit
\setline{#1}%
}
\newcommand{\stopledbibleverse}{%
\endlock
\setcounter{firstlinenum}{5}
}

This code makes available the \ledbibleverse command that defines the verse number, which in turn is used automatically by the \edtext macro. Precede the Bible fragment that you are typesetting by \startledbibleverse and close the fragment with \stopledbibleverse. Inside the fragment issue the command \ledbibleverse{<number>} in front of each verse instead of just the verse number. Please note that the \startledbibleverse command above will suppress any line numbers below 999 in the margin (the longest Bible chapter, Psalm 119, actually contains 176 verses that are very often typeset on 373 lines). A quick and dirty trick to get the verse numbers in the left margin would be to add \ledleftnote{#1} to the \ledbibleverse definition (does not work in two column lay-outs). Here is an example:

\startledbibleverse
\ledbibleverse{1} In the beginning, God created the heaven and the earth. \ledbibleverse{2} And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. \ledbibleverse{3} And God said, ``Let there be light:'' and there was light.
\stopledbibleverse

See also question 26 of this Q&A.

Return to start

Q 34: Does ledmac work together with betababel?
A: Yes, it does. To enable the \bcode command within critical footnotes, you should write the following in the preamble of your document:

\makeatletter
\newcommand*{\morenoexpands}{%
\let\bcode=\relax
\let\Bet@code=\@gobble}
\makeatother

Return to start

Q 35: How do I make numbered footnotes in EDMAC?
A:If you want to get numbered footnotes in the \Efootnote command, add these lines before your critical text:

\newcount\nnota \nnota=1
\font\sml=cmr8
\def\nt{\text{\math ^{\the\nnota}\math\global\advance\nnota by 1}\lemma{{\sml \the\nnota}.}\Efootnote}

\makeatletter

\def\notesfootfmt#1#2#3{%
\normal@pars\eightpoint
\parindent=0pt\parfillskip=0pt plus 1fil
{\select@lemmafont#1|#2}\enskip#3\strut\par}

\makeatother

\let\Efootfmt=\notesfootfmt

The command to insert the numbered footnotes is: \nt{text of your note}/.

To set the counter to 1 add, after every \pend command, the line:

\newcount\nnota \nnota=1

Return to start

Q 36: How can I alternate linenumbering/nolinenumbering in my apparatus?
A: First you have to define the \nonumparafootfmt at the very begining of your code:

\makeatletter
\def\nonumparafootfmt#1#2#3{%
\normal@pars
\rightskip=0pt
\parindent=0pt \parfillskip=0pt plus 1fil
\select@lemmafont#1|#2
#3\penalty-10 }
\makeatother

Then, after the commands \pend and \endnumbering (the end of each chapter) you must write the command

\let\Cfootfmt=\nonumparafootfmt

at last, after \beginnumbering add:

\text{}\Cfootnote{\bf II,}/
\let\Cfootfmt=\parafootfmt

Return to start

Q 37: How can I obtain numbered footnotes in ledmac?
A: If you want to get numbered or alphabetic footnotes in the \Cfootnote command, formated as paragraph, add these lines in your preamble:

\newcounter{nnota}

and one (only one) of these three possibilities:

a.- For normal numbering:

\newcommand{\nota}{\addtocounter{nnota}{1}\thennota\edtext{}}

b.- For numbering with a little number:

\newcommand{\nota}{\addtocounter{nnota}{1}$^{\thennota}$\edtext{}}

c.- For alphabetic numbering:

\newcommand{\nota}{\addtocounter{nnota}{1}$^{\thennota}$\edtext{}}
\renewcommand*{\thennota}{\alph{nnota}}

The command to insert the numbered footnotes in the text is:

\nota{\Cfootnote{\nota cf. Arist. De an. 2,19.}}

And to set the counter to 1, after every \pend command write:

\setcounter{nnota}{0}

Return to start

Click here to return to the homepage

Note for Dr. Dekker: Your email address is unavailable. Please, contact me. Thank you very much.