Is there a way to 'reference plain text' like with ‘reference Inline Footnotes’?

Consider that the text you are including can come from anywhere in the binder, it does not have to be in the draft. You could keep all of these in a folder just below it.

Hi AmberV,

UPDATED - 10 Nov 2021 … see UPDATED summary of 7 steps below:

Actually, I’ve tested a kludge that will eliminate the endnote in the Endnote-XX Section from showing up in the PDF output file.

  1. I prepended the <$include:Endnote-XX> syntax with the text


instead to have it appear as:

  1. I deleted the text ‘\end’ from the syntax for the endnote in each Section to simply:

         note{\,<endnote text>}

so that after the ‘\end<$include:Endnote-XX>’ is replaced with the text in Endnote-XX, the compiled text appears as a complete \endnote:

      \endnote{\,<endnote text> }

This way, the whole term ‘\endnote’ does not appear in the Endnote-XX Section which for some reason was triggering that Section to show up in the PDF output file.

Now, with only the word ‘note{’ (and not \endnote{ ) appearing (in the Endnote-XX Section) before the text of the endnote, nothing from the Endnote-XX Section appears in the PDF output file, and the text of the \end + note{\,<endnote text>} appears as endnote at the end of the respective chapter.

Yea! Mission accomplished!! A bit kludgy, but it works!!

Thanks for all your help, including the tip on the <$include:> command.

UPDATED (my apologies) - In summary, to create endnotes in my Scrivener + LaTeX project, I had to:

  1. Move each footnote that I wanted to turn into an endnote from Comments & Footnotes in the Inspector, to a separate ‘Latex Chunk’ type Section (with one and only one endnote per Section) in the Binder.
  2. Give the ‘Latex Chunk’ type Section in the Binder a unique label such as ‘Endnote-XX’ where XX is a sequential alpha or numeric code for each Section, e.g. Endnote-01, Endnote-02 …etc…
  3. Prepend the text of each endnote in each ‘Latex Chunk’ type Section with the syntax ‘\endnote{\,’ (the \, is LaTeX code for a narrow space to provide a slender space between the endnote mark, e.g. A, B or C …, and the endnote text), and add a close curly-bracket, ’ } ’ at the end of the endnote text in the ‘Latex Chunk’ type Section.
  4. In the main body of the text where the endnote mark (e.g. A, B or C…) is to appear, add the following syntax: ‘<$include:Endnote-XX>’. Be sure the sequential alpha or numeric code XX matches what was used to label the ‘Latex Chunk’ type Section as ‘Endnote-XX’ in the Binder, e.g. Endnote-01, Endnote-02 …etc…
  5. If working with LaTeX, be sure to include ‘\usepackage{endnotes}’ in your Setup Preamble Module, and include ‘\theendnotes’ at the end of the chapter or section where the endnotes are to appear.
  6. In an attempt to keep my Binder less cluttered (a constant struggle) for those chapters with multiple endnotes, I moved the endnote ‘Latex Chunk’ type Sections into a separate folder just beneath the corresponding chapter.
  7. A trick I discovered, almost by accident, one that is a bit counter-intuitive for me, is to turn the Include in Compile toggle for the ‘Latex Chunk’ type Sections, OFF!! Yes, OFF, e.g. image.
    As long as the ‘Latex Chunk’ type Sections that contain the endnotes are included in the Binder, the ‘<$include:Endnote-XX>’ code WILL find the endnotes and appropriately include them in the compiled LaTeX .tex file, despite the fact that they are not Included in the Compile. Go figure. Don’t ask me how this works, but it does … and it is the only way I found to prevent the endnote from appearing a second time in the PDF output file.

Now, compile, typeset, and enjoy your new endnotes!

Note: For those using LaTeX and compiling to Plain Text (.txt) files, there may be a much less involved, more straightforward way to create endnotes, but I need to further explore what, if any, Scrivener options can be made available to do so.


P.S. Here is what the endnotes look like after compiling and typesetting using the method above:

There’s <$include>, but it includes a document, not part of a document.

Hi drmajorbob

Thank you for your feedback.

I hope with my updated 7 steps (to create an endnote) that I outlined above, I was specific enough that each endnote needs to go in a:

Let me know if I need to adjust any of the 7 steps to be clear how Scrivener + LaTeX users can create endnotes.

Thanks again for your feedback,

I don’t know anything about LaTex.

It seems to me you should just be doing this part in LaTeX. Suppose you just prepended each intended endnote with ‘ZZZ’, and then on the LaTeX side…

% Relies on packages endnotes, ifthen, and xstring.


Voila! We get the desired split between footnotes and endnotes in the typeset output. Also notice your prepended string need not be totally unique — it just needs to be something that you would never start a foot/endnote with.

Works for me.


Addendum: What the code does, line by line:

  • Use the let cmd to set aside original footnote cmd under new name fnote (cuz we still need to call on it).
  • Co-opt footnote cmd so we can adjudicate by contents.
  • Is the content of the note prepended by ‘ZZZ’?
  • If so, push it out as an endnote, but first delete the prepended ‘ZZZ’ marker.
  • Otherwise, send it out as an fnote.

Hi gr,

Thank you for your suggestion.

I’d love to be able to use LaTeX to enable endnotes. There is so much I don’t know about LaTeX, so I appreciate the effort you put into the code you suggested.

I’m running a bit low on energy at the moment, so I’d like to work your suggestion into my project when I’m thinking more clearly.

Let me have a look and get back to you.

Thanks again,

Somehow, I never realized LaTeX is a programming language.


Hi drmajorbob,

And what a language it is … the typesetting of equations afforded by LaTeX is unassailable … I looked into the way that MathType does equations and realized it would not be enough for what I wanted to do … but that was only the teaser …

LaTeX offers over 6000 separate packages (and counting) with such a wide range of functions, with support on StackExchange et al. … but make no mistake, the learning curve is STEEP. If you have the time and patience, however, the rewards can be endless.

Except for endnotes, for which I have spent weeks trying to accommodate, Scrivener (among other benefits) is the perfect front end for LaTeX.

That said, I am a bit surprised how little feedback I see from other Scriveners regarding the Scrivener + LaTeX interface, e.g. the use of Scrivener Styles to leverage LaTeX macros and to create their own user-defined objects. Scrivener Styles are like Matryoshka dolls - they can provide for entirely new degree of freedom with layers of user defined coding. Quite astonishing once you get the drift of what is possible when Scrivener Styles are combined with LaTeX.

I don’t have data on the number of scientific, research and engineering papers that are created with Scrivener + LaTeX, but I also don’t hear a lot of chatter (there is some chatter, but not what I would expect with such an outstanding application such as Scrivener) on this site regarding scientific, research and engineering papers and PhD thesis, etc.

From my own experience, I wonder if there is, and how large, an untapped market there may be for Scrivener + LaTeX in the scientific, research and engineering fields of study.

Thanks for your comment,

I’d need an expert to walk me through a LaTeX workflow. That’s how you make the learning curve steep (which is a good thing).

1 Like

Hi drmajorbob,

Thanks for your comment.

The way I got started with Scrivener + LaTeX was with the General Non-Fiction (LaTeX) template that is included in the Mac version of Scrivener (I don’t know about the Windows version).

Without the General Non-Fiction (LaTeX) template, I don’t think I’d be anywhere near where I am today. The Scrivener LaTeX template is even where I learned (with a few guesses along the way) about how to implement the dozens of user-defined Styles that I’ve developed.

And the development continues: just yesterday I figured out how to apply a footnote to an Epigraph … something I’ve wanted to do for a while now as I often use Epigraphs with quotations to set the stage for each section. A nice touch!

Kudos to whomever had the foresight to include the General Non-Fiction (LaTeX) template in the base set of Scrivener templates. Someone was thinking longer term about how to help jumpstart users to include LaTeX when using Scrivener. Thank you to whomever that person was! (I’ve been meaning to do so for some time now.)

Thanks again for your comment!


1 Like

I would bet a :beer: that this person was @AmberV :grinning:


What content do you need in your epigraph footnotes?

@JimRac gets the beer. :slight_smile:

And to @Scrive, you’re most welcome!

I think the important thing to be aware of here is that the choice between endnotes and footnotes (or having both) is fundamentally a LaTeX layout decision and not a Scrivener thing, since Scrivener itself is ignorant of LaTeX. We must teach it everything, and we do so through the configuration of our content and the compile settings.

The project template provides a healthy start on that process of training the software, and by intention it does so in a way that is as vanilla as possible so one can more easily make those decisions and implement them.

So that is why there is no endnote checkbox in the compile overview area, because from that context Scrivener is ignorant of what an endnote is in LaTeX. For it to successfully implement them it would need to know how to do so, and doing so is not always straightforward. Using the endnotes package is a fairly simple tweak, but using both is not, and often require a bespoke setup to accomplish it.

From my own experience, I wonder if there is, and how large, an untapped market there may be for Scrivener + LaTeX in the scientific, research and engineering fields of study.

There very likely is, but the challenge we face is two-fold:

  1. On the surface Scrivener looks like how word processors look, which typically are fairly awful for authoring technical formats like this. You have to dig pretty deep to get past that first impressions in the tutorial and default UI, and into novel areas that few tools address, like using styles for syntax injection, which is very unorthodox and unexpected.

    When you consider how hard-won some people’s workflows are, how much sunk cost fallacy you have to fight against in some cases, it can be difficult to present an alternative that is so different.

  2. We have a reputation for being a tool for novel writers, despite insisting everywhere otherwise, even in the breadth of its offerings for non-fiction work on the surface. I would guess that a lot of that has to do with a preconception of what “software for writers” tends to be. If you look around at many of what people consider to be “competition” for Scrivener, you’ll mostly find tools that really do not work for anything other than novel writing. There are very few writing tools that strive toward general writing. So that it gets lumped together with what the genre seems to on the whole address, makes sense.

These problems aside, the fact is that Scrivener is a very unique tool for authoring technical formats, such as LaTeX. It is largely unknown for that, but you will not find much of anything out there that provides that kind of “front end”. As I’ve mentioned elsewhere, LyX is probably the closest thing to it, but we wouldn’t think of it so much as being a “tool for writers” in the modern sense. It’s closer to a word processor in how it presents the writing workflow. Beyond that, tools for LaTeX are invariably closer to coding editors, where all of the syntax is right in your face and only made less obstructive through conventions such as syntax highlighting—to help make the content easier to find among the symbols.

It would be more accurate to say that TeX is the Turing-complete programming language for typesetting, while LaTeX is a massive corpus of automation (what we refer to as macros) built from that language, that enable those who are not specialist programmers to make use of the system in a relatively comfortable environment for doing so. So in that sense it is closer to how we might think of Cocoa or Qt, which Scrivener is created with on Mac and PC respectively. It’s not a perfect analogy by any stretch, but if know you the relationship between those and Objective-C or C++, it’s a better way of thinking about the relationship.


The citation.

I try doing my best not to forget or miss a proper citation. Just because a quotation exists within an epigraph, I assume it still requires a citation (my knowledge and memory of The Elements of Style is somewhat limited).

N’est pas?

Thanks for your note,

A citation in what form? A footnote or endnote?

Just a run-of-the mill footnote, or it could be an endnote, depending on spacial requirements.

As a literary refugee of sorts, I’m starting to wonder if my personal understanding about having to cite everything, including citations in epigraphs, may not be according to Hoyle.

Are epigraph citations an oxymoron of sorts?

It would not be the first time that I’ve gone a little overboard.

Thanks for your note,

Here’s a typical chapter head in my WIP. I include <$title> in the epigram document template.

1 Like

It would be highly unusual to have a citation foot/endnote on this kind salutatory quotation.

The point of full citation in body text is so that a reader could, in principle, go check on the veracity of what you were saying about the quoted text (is it being interpreted out of context, for example), or what you are saying with the quoted text (depending on how you are using the quoted passage).

But in this sort of opening quote you are not saying anything that anyone could need to doublecheck.

I would say these kinds of lead-in quotes are generally attributed rather than cited. That is generally just credit where credit is due, but it also may be meaningful for you purpose where the quote comes from or who said it.

It seems to me one has a wide latitude in these sorts of attribution. Often, just the author of the quote is given. But I think, for example, you will never see the publishing house given. I also think you will not find any such quote using a foot/endnote to make the attribution.


Hi drmajorbob and gr,

Thanks for the chapter header and the low-down on citing or attributing epigraphs. I like to pull quotes from the NYT and I’m a bit paranoid about not getting everything just so. Thanks for the feedback … here is a sample of how I cited a quote from the NYT in an epigraph:

I haven’t decided if I’ll use a footnote or an in-text citation on all the epigraphs where I have a direct quote. So for now I’ve included both until I decide which one I’ll use in the end … a lot easier to delete than to recreate the footnote or citation later on, long after I created the initial citation …

Thanks for your comments,

P.S. FYI, I use the website MyBib to create citations directly from the URL.