I want to do a basic command called \footcite to write a text, and any number of citations to write them in the footnote.
It's basically this command \newcommand{\footcite}[2]{\footnote{#1 \cite{#2}}} but with 2-n parameters. An use case of this would be \footcite{LLM like ChatGPT or BERT}{chatgpt}{bert},
resulting in a footnote like "LLM like ChatGPT or BERT [1] [2]"

I don't know anything about xparse or macros, etc...

1 Answer 1


A command \footcite is defined. It takes 2 arguments. The second argument is a list. A loop is performed on this list with \clist_map_inline:nn. Here each element in the list is given by ##1 on which \cite is applied with a space ~ before that.

enter image description here

\NewDocumentCommand \footcite { m m }
        \clist_map_inline:nn {#2}
          { ~ \cite {##1} }
Some text\footcite{LLM like ChatGPT or BERT}{chatgpt,bert}

You must log in to answer this question.

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