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

Sverre
  • 20,729
  • \textsuperscript{} is what you want? – Sigur Aug 30 '15 at 15:19
  • @Sigur No, I'd like a footnote. – Sverre Aug 30 '15 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 '15 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 '15 at 15:24
  • 1
    This could help you to create a footnote without numbers: http://tex.stackexchange.com/a/127258/14757 – Sigur Aug 30 '15 at 15:28
  • @Sigur Thanks, that's useful, but I would still need to figure out how to define my \mythanks as this alternative \Footnote. – Sverre Aug 30 '15 at 15:36
  • the document class amsart contains code for "thanks" footnotes associated with the author. they are unnumbered, but changing that to include a star shouldn't be too problematic. – barbara beeton Aug 30 '15 at 15:51
  • Should \mythanks behave as the standard \thanks? I mean, besides giving you a footnote, should it be used inside the \mytitle command? – Gonzalo Medina Aug 30 '15 at 16:48
  • @GonzaloMedina Actually, I always strongly disliked the placement of the standard \thanks command inside \title. So I'd prefer to do \mytitle{} \mythanks{} \myauthor{} as above. – Sverre Aug 30 '15 at 16:50
  • @Sverre I see. My answer is useless then. I'll delete it. – Gonzalo Medina Aug 30 '15 at 16:53

1 Answers1

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}
Sigur
  • 37,330