0

I want to make a few footnotes that aren't counted in numbers, but in asterisks - like this:

Text*, more text**, more text***.

*   Footnote1
**  Footnote2
*** Footnote3

Here's my minimal example:

\documentclass[10pt, a4paper, notitlepage, twoside, twocolumn, openany]{book}

\begin{document}
    \setcounter{footnote}{0}
    \renewcommand{\thefootnote}{\fnsymbol{footnote}}
    Test1\footnotemark[*], 
    Test2\footnotemark[**] und
    Test3\footnotemark[***]

    \footnotetext[*]{test1}
    \footnotetext[**]{test2}
    \footnotetext[***]{test3}

\end{document}

I'm almost there, but the footnote asterisks are not where I want them to be, as you can see: Minimal Example

2 Answers 2

2

Your code produces errors because the optional argument of \footnotemark and \footnotetext must be a number, which *, ** and *** are not. When a LaTeX run has errors, interpreting the output isn't very useful. The priority must be to fix the errors before looking at the DVI or PDF output.

Here is one way to achieve what you want, using \prg_replicate:nn from expl3. The \relax isn't necessary unless some other place has sloppy code, but it doesn't hurt.

\documentclass{article}
\usepackage[paperwidth=8cm,paperheight=6.5cm]{geometry} % for the screenshot
\usepackage{expl3}

\ExplSyntaxOn
\renewcommand{\thefootnote}{\prg_replicate:nn{\value{footnote}}{\relax*}}
\ExplSyntaxOff

\begin{document}

Test1\footnote{test1}
Test2\footnote{test}
Test3\footnote{test3}

\end{document}

enter image description here

4
  • Why \the and \relax?
    – egreg
    Apr 16, 2020 at 23:16
  • @egreg I think \the is indeed not necessary. I hadn't checked the doc and thought it expected an integer denotation, but in fact an integer expression is enough. I've removed it. The \relax is for the unlikely case where \thefootnote would be expanded after a command with a star form... Is it a sin? :-)
    – frougon
    Apr 16, 2020 at 23:19
  • @egreg (also, the star form of \relax is quite powerful :)
    – frougon
    Apr 16, 2020 at 23:31
  • To be clear, the \relax prevents mistakenly triggering the use of a star form in cases like: \edef\x{\thefootnote}\expandafter\foowithstarform\x, \edef\x{\noexpand\foowithstarform\thefootnote}\x or \expandafter\foowithstarform\expanded{\thefootnote}, etc.
    – frougon
    Apr 17, 2020 at 7:34
0

I actually found out later, that I oversimplified my minimal example, because I hade a \twocolumn command in my original document, which did not work with the original answer. But I did figure it out - so here my solution for \twocolumn:

\documentclass{article}
\usepackage[paperwidth=8cm,paperheight=6.5cm]{geometry} % for the screenshot
\usepackage{expl3}

\ExplSyntaxOn
\renewcommand{\thefootnote}{\prg_replicate:nn{\value{footnote}}{\relax*}}
\ExplSyntaxOff

\begin{document}
    \twocolumn[{%
        Test1\footnotemark,
        Test2\footnotemark,
        Test3\footnotemark
    }]
    \footnotetext[1]{Hi1}
    \footnotetext[2]{Hi2}
    \footnotetext[3]{Hi3}

%   continue with regular footnotes
    \setcounter{footnote}{0}
    \renewcommand{\thefootnote}{\arabic{footnote}}
    Test\footnote{test1}
    Test\footnote{test2}
    Test\footnote{test3}

\end{document}

twocolumn solution

You must log in to answer this question.

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