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

**URL:** <https://forum.literatureandlatte.com/t/is-there-a-way-to-reference-plain-text-like-with-reference-inline-footnotes/124164>\
**Category:** Scrivener\
**Tags:** support, compile, advanced-tips, latex\
**Created:** [November 8, 2021, 11:29pm UTC](https://forum.literatureandlatte.com/t/is-there-a-way-to-reference-plain-text-like-with-reference-inline-footnotes/124164 "2021-11-08T23:29:03Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![gr](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/gr/32/38680_2.png) [@gr](https://forum.literatureandlatte.com/u/gr)\
**Post date:** [November 12, 2021, 3:04am UTC](https://forum.literatureandlatte.com/t/is-there-a-way-to-reference-plain-text-like-with-reference-inline-footnotes/124164/10 "2021-11-12T03:04:42Z")

</div>

> [@scrive](#):
>
> What I haven’t been able to automate is to replace the prepended **unique text string** of the **endnote** ‘**\footnote{[@@]…**’ with ‘ **\endnote{…** ’ so that after compilation, I’m left with properly formatted **endnotes** located at the end of the chapter or section.

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…

```nohighlight
% Relies on packages endnotes, ifthen, and xstring.

\let\fnote\footnote
\renewcommand{\footnote}[1]{
  \IfBeginWith{#1}{ZZZ}
  	{\endnote{\StrDel[1]{#1}{ZZZ}}}
	{\fnote{#1}}
}

```

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.

gr

**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.

---

_[View the full topic](https://forum.literatureandlatte.com/t/is-there-a-way-to-reference-plain-text-like-with-reference-inline-footnotes/124164)._
