paddymcall / SARIT-pdf-conversions

XML to PDF for SARIT texts
https://github.com/sarit/SARIT-corpus
2 stars 1 forks source link

Improve footnotes/critical apparatus #26

Closed ppasedach closed 8 years ago

ppasedach commented 8 years ago

At the moment we have footnote markers in the text, keyed to the footnotes numbered per page.

selection_081

The numbers (from the source edition) at the beginning of the footnotes should be moved from the text presumably into an attribute of the note tag. This would give us the possibility to either hide them, or display them with special formatting, possibly also at the end of the note.

In order to remove the footnote numbers from the text, keying the notes to line numbers and using lemmata, we probably want to shift them to reledmac. Regarding that our biggest problem is that we have no beginning and end points for the lemmata, only one point, where we now have the footnote marker. One possible default lemma could be from the beginning of the word the note is attached to to its end. Is this default reasonable? Apart from that, however there will be cases in which a word (or rather string) might be too long, or two footnote markers are attached to one string, possibly also other problems, for which we would need human interaction to specifically mark beginning- and endpoints of the lemma, which would have to be done in the xml files, probably also, for reference, inserting a milestone tag at the position of the source edition's footnote marker. The notes requiring human interaction will have to be identified by a well-tested search.

I'll make a small example to see how that would look like.

ppasedach commented 8 years ago

Here a sample containing the beginning of pramanavarttikavrtti. The next page then begins with an asterisk instead of a number, not attached to any word, so this would be a case requiring human interaction.

paddymcall commented 8 years ago

This is now in the latest stylesheet version. But a few problems remain:

How to deal with paragraphs in reledmac notes? Especially: when can we use \par and \begin{verse}...\end{verse}? And a note in a note?

All of this is possible according to the TEI guidelines. It depends also, but not only, on arrangementX/Xarrangement of reledmac (using paragraph breaks a lot of things, but what about twocol or default settings?)

ppasedach commented 8 years ago

Here a MWE that shows what happens if you have an explicit linebreak in a critical footnote:

\documentclass{article}
\usepackage{reledmac}
\Xarrangement[A]{paragraph}

\begin{document}
\beginnumbering
\pstart
\edtext{something}{\Afootnote{else.}}. And now \edtext{something more}{\Afootnote{Something\\
with\\
some\\ linebreaks.}}
\pend
\endnumbering
\end{document}

selection_082 Beautiful. Only the last line appears. The best of it is that you get no warning or error message! So we have to be very careful with this.

Doing some simple testing switching from \Xarrangement[A]{paragraph} to default or twocol works o.k.: selection_083 selection_084

If I put a verse environment around my lines I get similar results:

selection_085 selection_086 selection_087

A lemma that contains a second lemma (note: This is not exactly footnote in a footnote, but probably what you meant, is it?) is documented in the reledmac documentation and seems to work:

\documentclass{article}
\usepackage{reledmac}
\Xarrangement[A]{paragraph}

\begin{document}
\beginnumbering
\pstart
\edtext{something}{\Afootnote{else.}}. And now \edtext{something \edtext{more}{\Afootnote{Not so much more.}}}{\Afootnote{Something with some linebreaks.}} 
\pend
\endnumbering
\end{document}

selection_088

Or did you really mean footnote within footnote, for which one normally would use \footnotemark \footnotetext?

\documentclass{article}
\usepackage{reledmac}
\Xarrangement[A]{paragraph}

\begin{document}
\beginnumbering
\pstart
\edtext{something}{\Afootnote{else.}}. And now \edtext{something more}{\Afootnote{Something with a footnote.\footnotemark}}\footnotetext{Test.} 
\pend
\endnumbering
\end{document}

selection_089

The numbering is off. Would need to be investigated, but maybe it's not required anyways?

So it seems that linebreaks and verse environments work with reledmac, but not, or not easily, with the paragraphed mode. twocol looks like an easy option. I can also look at workarounds for paragraph. Later I'll have to check some real world examples and their handling.

ppasedach commented 8 years ago

The current maintainer of reledmac has no idea how to do the line breaks in paragraphed footnotes, so I'd say we go for the twocol option, at least for now. Still need to check if it doesn't break anything.

paddymcall commented 8 years ago

Indeed, it's unclear how one should format pars in an environment that tries to get rid of them.

paddymcall commented 8 years ago

As for the footnote markers, this is fixed in https://github.com/paddymcall/SARIT-corpus/commit/084f0d7ed05e70e475846ed93af44a01ae8790ea

The other things should be filed as feature requests, not bugs.