-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Differentiate between footnotes and endnotes #4041
Comments
Definition even has a comment saying "footnote or endnote": I want to add a |
Only #1603 requires storing note reference separately from the note contents. Great idea, as it makes sense to refer to the same footnote multiple times sometimes, but I rarely see it in real texts. Also, as pointed out in #2053 discussion, referring to previous footnote in LaTeX can only be done manually with As for #2053, it is just a problem with Markdown reader. It is correct that trying to convert it to PDF via LaTeX will result in missing footnotes, but it is a problem of LaTeX writer or LaTeX itself. What I see in real texts is endnotes referenced from footnotes (also discussed in #2053, @Kedrigern even suggested adding endnotes), but I see no problem with them after making AST changes that I suggest. LibreOffice does not support endnotes inside footnotes, manually produced |
Pull request submitted: jgm/pandoc-types#34 |
Just a note: texinfo has |
There's also #1425 (migrated from the mailing list), which has some interesting discussion attached to it |
@adunning Looks like I implemented exactly the same thing as described except for indentation ( |
Looking forward to use endnotes with pandoc! Hurray! |
Found this issue looking for marginnote support directly. Is there any motion and getting this functionality in? Thanks |
My understanding is that the current structure of the AST, which makes no distinction among notes according to type, most appropriately follows the objective of capturing a semantic representation of a document. Distinction between footnotes and endnotes (and indeed, further, margin notes) appears to be a choice of styling based on the nature of a publication. The Chicago Manual of Style explains that notes may be formatted according to either method, but appears to assume that a publication will generally commit to one or the other. Relevant comments begin in Section 14.39 (16th Edition):
They continue, in Section 14.40:
Finally, a special case appears, in Section 14.44:
Following the last remarks, a means to distinguish among notes in a document may be valuable, but relevant observations point away from a static distinction between two kinds, which all readers and writers would attempt to support, and toward a distinction by user-defined class names, which writers can variously be configured to process as desired for a specific document. Indeed, all notes appearing in a single sequence best supports the basic case, of only one method of formatting notes being available in the output. Whereas classical publishing appears to support at least three common styles of notes, the meaning of these styles transfers poorly to digital display targets. In a hypertext document, such as a web page, footnotes and endnotes appear to lack distinction generally, and margin notes are possible in principle, but often only if a margin is created expressly for such purpose. Popup notes become possible in such an interactive environment, but never of course in hard printing. Division of notes in a document into two kinds, as suggested, appears to be unable to generalize. I recommend the following:
In LaTeX support is possible through very minor changes, which are to use the Note however that formatting a LaTeX document with footnotes and endnotes combined is less trivial than merely using the basic macros provided by the |
@brainchild0 gives us very helpful analysis. I can't comment on the practicalities of the AST, but I can say that a work around for me at the moment is to use LaTeX classes to use the |
Just wanted to point out that endnotes are sometimes section-level endnotes and sometimes document-level endnotes. The way of addressing this issue would ideally allow for that flexibility. As a somewhat-related aside: currently, the markdown writer has |
Yes, ultimately it's futile to try to represent these distinctions in the transitional document schema (the AST). Semantic tags that the publisher (i.e. writer and user) can resolve flexibly according to the constraints of the target format, and the intention for the document appearance, are necessary to cover the full breadth of possible cases. |
I didn't quite understand what precisely you're suggesting. The four most common options I've seen for paged media seem to be: (1) bottom-of-the-page, (2) margin-of-the-text, (3) end-of-section, (4) end-of-document. The first two are kinds of footnotes (the note text is shown close to the note reference), while the latter two are kinds of endnotes (the notes are collected together and shown in a location separate from the reference). But in essence, there are two types: footnotes and endnotes, and their placement may vary. I did some research on various (paged-media) formats, and here's what I found:
For unpaged formats (like HTML), all of this is ultimately handled by CSS. (The default HTML template for pandoc creates footnote references using So, it seems to me that information as to whether a note is a footnote or an endnote should at the least be preserved during conversion, given that EPUB3, ODT, and DOCX all support those two. The location of their display is something that can be controlled via templates, I think. |
Just adding a detail that might (or might not) help in this matter.
Since the posting of this comment in may 2020, there has been a release (2.10.1 in july 2020) that added the capability to give attributes to all elements (at least for So although
and the result in the AST looks like :
Note here that the
) This would give a way, as the-solipsist asks, to preserve the information of that intent. /+: ... And if the input document supports both footnotes and endnotes, as mentioned in the opening issue message, the appropriate reader could also put that information in the /++: ... missed that quote from bc in may, sorry:
|
My comment was not meant as an objection to yours, though the context may have inadvertently implied such an intention. The futility is to generalize all possible note types and attributes into the AST (the internal, intermediary document format used for conversion between formats), because the set of possibilities is unbounded in general, as illustrated by the numerous permutations outlined in your comments. This observation is relevant because the original request proposes changes to the AST to capture the distinction between footnotes and endnotes. Generalizing this approach to achieve the further functionality you propose amounts to chasing the end of the rainbow, such that the AST would be augmented constantly and endlessly in an effort to capture full generality for notes. My comment only suggests that an effective solution is likely to be one other than adding the greater generality to the AST. I support the broader objective of more flexible handling of notes. |
Sorry to ask a non-technical question in a github issue, but I gather from the preceding that there is still no general method to cause pandoc to create endnotes rather than footnotes. Is that correct? It appears that |
That's right. There are notes. Whether they render as footnotes or endnotes really depends on the output format. (Some output formats don't separate things into pages anyway, which makes the distinction irrelevant.) But there's no way to have two sets of notes, numbered independently, one rendered as footnotes and the other as endnotes. If you just need one set of notes but want them to be endnotes, then there may be ways to make this happen, depending on the output format you want. |
Thanks @jgm! Yes, I just want endnotes. When I use the LaTeX |
A friend pointed out that I don't need pandoc to create endnotes! One can highlight footnotes in Word and make it convert them to endnotes. I hope that there is or will be a way for pandoc to create endnotes, but for my immediate needs I guess I don't need it. (MS Word is not my native language.) Sorry for cluttering up the github issue. |
Just wanted to add my hope that endnotes can be supported. My rationale is here. Many thanks. |
I also hope it can be supported. Even if one can choose whether notes in the |
It would be interesting to be able to put the footnotes in a custom location, as we can do with references:
This would be the easiest solution to anyone that want in a custom place the footnotes and not at the end of their respective page. Obviously, this would not solve the cases in which you need footnotes and endnotes in the same document. |
Some formats, like OpenDocument and Docx have support for footnotes and endnotes. LaTeX has
endnotes
package. FB3 format will have an option for endnotes: https://github.com/gribuser/FB3/blob/master/fb3_links.xsdNow converting Docx to ODT or ODT to Docx converts all endnotes to footnotes. (edit: i stated that converting to ODT converted to endnotes, it was a result of my local modifications)
I suggest to add footnote/endnote marker to AST to avoid losing this information for ODT and Docx. For LaTeX read footnotes as footnotes and add support for
endnotes
package later. For wiki-like formats it has to be footnotes for compatibility so users converting markdown to PDF via LaTeX are not surprised when they see their notes placed at the end of the document.The text was updated successfully, but these errors were encountered: