TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some text with a couple of footnotes in tables which I handle with the footnote package. The footnote text is very very long and it makes the code unreadable, it happened already that I had to bisect the entire code to find small syntax error in tables which I missed because of the really ugly code.

Is it possible to move the footnote text away from the footnote command in code?

I know already about the footnotemark-footnotetext solution, but I would like a general solution that could be used for other commands to. For example with hyperlinks and similar stuff. Is there any way to achieve this?

What I would like is something like this (this is not real code):


main text here\footnote{1}
more main text\footnote{2}
more text\href{3}{name}
% footnote contents
[1] footnote 1 text
[2] footnote 2 text
% email addresses
[3] mailto:mail@server.com

share|improve this question
Welcome to TeX.SX! You may have a look on our starter guide. – texenthusiast May 8 '13 at 7:38
I believe you're looking for the sepfootnotes package, see my answer to “Can Footnotes reside in another file? – clemens May 8 '13 at 7:45
Yes this is the way to go, but does it work only with footnotes? Is there a way to a generalized approach for other commands to? The footnote case is the most common, but this may be useful elsewhere too. – marcinkus May 8 '13 at 8:01
@marcinkus Have a look at Is it possible to write all mathematical formulas in a separate file and add them in main file on-demand?. The methods outlined there should easily be adapted to other cases. – clemens May 8 '13 at 8:22
thank you, I'll look into that – marcinkus May 8 '13 at 13:40

Just to point out what you probably already know: that if you don't want email addresses cluttering the main body of your text, you can factor them out just by using vanilla LaTeX macros, like this:





Email \href{\harryemail}{Harry} or \href{\sallyemail}{Sally}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.