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

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,
scrive
:thinking:

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.

2 Likes

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,
scrive
:thinking:

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

Yup, I can certainly see why you would want/need to fully cite that quote.

UPDATE: See P.S. below regarding the \url{…} command.

Hi gr,

Thank you SO MUCH for the above LaTeX \fnote code to accommodate endnotes.

I was SO HOPING that your code would work. Unfortunately, when I tested the code, I am seeing the following error: (I searched for the error but did not find a solution)

! Undefined control sequence.
\hyper@normalise …M{ }\catcode `%\active \let %
\@percentchar \let \%@per
l.4679 …hp?title=Economic_rent&oldid=931394262}}

The line of code where the error occurred is:

economic rent.\footnote{Wikipedia contributors. (2019, December 18). Economic rent. In Wikipedia, The Free Encyclopedia. Retrieved 00:58, March 9, 2020, from \url{https://en.wikipedia.org/w/index.php?title=Economic_rent&oldid=931394262}} 

I thought the error might have occurred due to the presence of the syntax ‘&oldid=931394262’ at the end of the above \footnote, so I removed it and re-typeset the code, but to no avail.

When I commented out just the \fnote code, the compiled .tex file typeset without error, so I doubt the error was due to anything other than the \fnote code.

Any thoughts or suggestions you might have about what I might try to determine what is causing the error would be more than welcome.

Thanks again for your \fnote code to accommodate endnotes,
scrive
:thinking:

P.S. I did a bit more testing, and it seems that if I remove the \url{…} from the \footnote, that the ‘.tex’ file typesets just fine. So it appears that for some reason the \url{…} command within the \footnote is not compatible with the \fnote command. I have NO idea what is going on … Thanks again!

I can only imagine two ways that you might run into trouble using that code:

  1. If the string you are using to flag endnotes (‘ZZZ’ in my code) has anything that the tex processor might treat as a special character/code, that might cause you grief.

  2. If not that, it looks to me like the only place for a hitch would be in the url{} function and the IfBeginWith{} function not playing nice together.

(I think it unlikely to be the fnote cmd call, because this literally invokes the original footnote function and nothing more. The let cmd is very low level TeX. So, nothing should be hinky with that part.)

You could verify that by trying something like:
\let\fnote\footnote
\renewcommand{\footnote}[1]{\fnote{#1}}
Which should just return footnotes unmolested.

Hi gr,

The stripped-down fnote works without a hitch. So, as you mentioned in 2. above, the error may be due to a collision between the \url{…} function and the IfBeginWith{} function …

Any other thoughts where we might go from here? Is there another function or command I can use in lieu of IfBeginWith{} ? (I’m not aware of a possible replacement for the \url{…} function.)

Thanks for all your help,
scrive
:thinking:

You should take this problem to a dedicated LaTeX forum. See what some experts can tell you.

gr

P.S. I am able reproduce the problem using the hyperref package for the url{} command. But it is a bit hard to tell which package is choking here, hyperref or xstring.

Hi gr,

Thanks for getting back.

If you have the equivalent of a Minimum Working Example (MWE) available, I’d be glad to post it on StackExchange.

Otherwise, when I have a bit of time, I’ll try to put together a MWE to post on StackExchange.

I’m sure, with a MWE, someone on SE will have an answer.

Thanks again,
scrive
:thinking:

\documentclass{article}
\usepackage{endnotes} %
\usepackage{ifthen}
\usepackage{xstring}
\usepackage{hyperref}

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

\begin{document}
Lorem ipsum dolor sit amet.\footnote{\url{https://google.com}}

% Nesting of \footnote{ ... \url{...} ... } throws an error.

\theendnotes %
\end{document}

This is only almost minimal. You can comment out the two %-marked lines and replace the call to endnote with another call to fnote in the %%-marked line. But the resulting function will likely cause consternation among the LaTeXnicians about what the hell you are doing.

1 Like

You might be hanging fire with your use of hyperref anyway. I note the documentation (in my installation) for hyperef indicates the endnotes package is “unsupported” by it. (That isn’t the trouble with the code above though.)

Also, just noticed the ifthen package is not really used in the above MWE.

1 Like

Hi gr,

I just posted the error with \fnote on StackExchange … see:

“Undefined control sequence” when using footnote-to-endnote MWE

Thanks for the update!
scrive
:thinking:

One answer has been posted on StackExchange … I’ll give their solution a try once I’ve had a chance to rest … the answer was posted 4 hours after I posted it on StackExchange … what a resource!

scrive
:thinking:

The answer you got (Domenjoud’s) is written by someone who knows the TeX under LaTeX.(^fn1) He knew how to run the test for an initial character without using the string package. His diagnosis of why the original code was unhappy with url{} makes good sense also.

I pulled his code and it works for me as promised.

Note that because the original code posted used a single @ as the endnote trigger, the solution you got was written in a way that is specific to using a single-character trigger. I had not anticipated that someone might give a less than general answer. But maybe it is just as well. A single character trigger is most convenient and @ is a great choice!

I know it goes without saying, but don’t forget to thank Eric and mark his solution as accepted (once you confirm it for yourself)!

And with that, I think you now have a functional footnote+endnote workflow.

All Best,
gr

fn1: Aside from specific-purpose delving, my knowledge is pretty much limited to the LaTeX level of life. So, the elegant simpicity of hiving off the first char simply by concatenating the argument parameters (#1#2) would never have occurred to me!

For completeness, here is Eric’s solution:

\usepackage{endnotes}
\usepackage{hyperref}
 
\let\fnote\footnote
\edef\otherat{\string @}

\long\def\xfnt#1#2\xfnt{%
	\def\temp{#1}%
	\ifx\temp\otherat
		\endnote{#2}%
	\else
		\fnote{#1#2}
	\fi
}
\renewcommand\footnote[1]{\xfnt#1\xfnt}
1 Like

Hi gr,

I ran into an issue with the above code when I include the following URL in as a footnote. As an endnote with a preceding @ sign, the URL seems to work fine, but it throws an error w/o the endnote @ sign:

https://www.ilo.org/wcmsp5/groups/public/---ed_dialogue/---sector/documents/meetingdocument/wcms_741659.pdf

I’ve posted the issue on StackExchange beneath the original posting and answer that was provided. I’ll have to wait to see if there is a response.

Thanks for all your help!
scrive
:thinking:

This can be fixed by getting the full footnote content lashed back together before passing it to fnote. The following seems to do the trick (though Eric might have a more elegant soln).

UPDATE: Eric’s solution on SE was indeed more elegant (if somewhat more mysterious) as it required only a small modification of the last line, so I give it here instead of my own.

\usepackage{endnotes}
\usepackage{hyperref}
 
\let\fnote\footnote
\edef\otherat{\string @}

\long\def\xfnt#1#2\xfnt{%
	\def\temp{#1}%
	\ifx\temp\otherat
		\endnote{#2}%
	\else
		\fnote{#1#2}
	\fi
}
\renewcommand\footnote[1]{\xfnt#1\empty\xfnt}
1 Like