4

Following some earlier code I've been given, I'm creating macros for meta-data about my papers (such as title, author, etc.). Now I'd like to create my own \thanks macro that should follow the title. Yet in this case the result is simply that the content of \mythanks is printed after the title, instead of creating a footnote. How can I make it produce a footnote instead?

\documentclass{article}

\makeatletter
    \newcommand\@mytitle{} % create macro for title
    \newcommand\mytitle[1]{\renewcommand\@mytitle{#1}}
    \newcommand\@mythanks{\footnote} % create macro for thanks note
    \newcommand\mythanks[1]{\renewcommand\@mythanks{#1}}
    \newcommand\@myauthor{} % create macro for author
    \newcommand\myauthor[1]{\renewcommand\@myauthor{#1}}
    \newcommand{\articletitle}{%
        \begingroup%
            \centering%
            \fontsize{18bp}{18bp}\selectfont%
            \@mytitle\@mythanks\par%
            \vspace{\baselineskip}%
            \fontsize{14bp}{14bp}\selectfont%
            \@myauthor\par%
            \fontsize{12bp}{12bp}\selectfont%
            \vspace{2\baselineskip}%
        \endgroup}
\makeatother

\mytitle{This is my title}
\mythanks{These are my acknowledgements}
\myauthor{This is the author}

\AtBeginDocument{\articletitle}

\begin{document}
I start writing here
\end{document}

enter image description here

10
  • \textsuperscript{} is what you want?
    – Sigur
    Aug 30, 2015 at 15:19
  • @Sigur No, I'd like a footnote.
    – Sverre
    Aug 30, 2015 at 15:20
  • So you want to insert some symbol as superscript and also the text as a footnote? What is the problem with \footnote{\@mythanks}?
    – Sigur
    Aug 30, 2015 at 15:21
  • @Sigur Yes, that's right. Actually, I want the symbol to be a star and not the numeral 1, and then I actually don't want that symbol to appear after the title at all, but only in the footnote (I wanted to wait and open separate questions about those things, since I like to limit my questions to one thing at a time - that's more helpful for later visitors).
    – Sverre
    Aug 30, 2015 at 15:24
  • 1
    This could help you to create a footnote without numbers: tex.stackexchange.com/a/127258/14757
    – Sigur
    Aug 30, 2015 at 15:28

1 Answer 1

2

enter image description here

enter image description here

MWE

\documentclass{article}

\makeatletter
    \newcommand\@mytitle{} % create macro for title
    \newcommand\mytitle[1]{\renewcommand\@mytitle{#1}}
    \newcommand\@mythanks{} % create macro for thanks note
    \newcommand\mythanks[1]{\renewcommand\@mythanks{%
      \gdef\@thefnmark{*}\@footnotetext{#1}}
    }
    \newcommand\@myauthor{} % create macro for author
    \newcommand\myauthor[1]{\renewcommand\@myauthor{#1}}
    \newcommand{\articletitle}{%
        \begingroup%
            \centering%
            \fontsize{18bp}{18bp}\selectfont%
            \@mytitle%
            \@mythanks%
            \par
            \vspace{\baselineskip}%
            \fontsize{14bp}{14bp}\selectfont%
            \@myauthor\par%
            \fontsize{12bp}{12bp}\selectfont%
            \vspace{2\baselineskip}%
        \endgroup}
\makeatother

\mytitle{This is my title}
\mythanks{These are my acknowledgements}
\myauthor{This is the author}

\AtBeginDocument{\articletitle}

\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
4
  • There's no footnotemarker in the footnote here.
    – Sverre
    Aug 30, 2015 at 15:55
  • 1
    Ow, sorry, I swapped what you want. I put the symbol in the wrong place. Edited. You can change the symbol, if you wish.
    – Sigur
    Aug 30, 2015 at 15:56
  • 1
    Add \lipsum to the document, and you'll see a problem.
    – Sverre
    Aug 30, 2015 at 16:07
  • 1
    @Sverre, please, see it now.
    – Sigur
    Aug 30, 2015 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .