Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to acheive something similar to

\title{\myTitle \thanks{ \input{../acknowledgement} }}

(which doesn't work?) in order to load the content for \thanks on the fly?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

I assume "doesn't work" means in this case "Generates the following error:"

! Use of \@xfootnotemark doesn't match its definition.
\@ifnextchar ... \reserved@d =#1\def \reserved@a {
                                                  #2}\def \reserved@b {#3}\f...
l.8 \maketitle

Right?

\thanks expands its argument (at least which the standard classes) and so you need to \protect the \input:

\documentclass{article}

\def\myTitle{My title}

\title{\myTitle\thanks{\protect\input{../acknowledgement}}}

\begin{document}
\maketitle
text
\end{document}

An alternative would be the catchfile package to store the content of the input file in a macro first using \CatchFileDef{\mymacro}{<file>}{}.

share|improve this answer
    
Yes! \protect does the trick! Thanks! –  Chris May 26 '11 at 8:45
add comment

Your Answer

 
discard

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.