December 17, 2022

Faster citation with the Lyx software

 

The LaTeX typesetting system allows to cite external literature. instead of providing one or two footnotes, LaTeX can create a reference list with hundreds of items. A huge amount of references is a typical requirement for an academic paper and it is not possible to redefine the rule. The only detail question is, how many citations are needed for each us-letter page. Are 8 references enough or does the paper needs 12 and more citations for every page?
 
Unfortunately it is a complicated to format the citations from the authors perspective. Sure, Tex has a built in bibtex format and the Lyx frontend allows to include a bibtex file at the end. The problem is, that most lliterature databases are not supporting bibtex, and adding new items on the fly might be a bit complicated. 
 
Let us make a practical example to show the bottleneck. Suppose somebody likes to insert a reference in lyx. First, he has to search in the internet for the correct bibtex string. Then, he has to insert it at the end of the bibtex file in an external texteditor. Then, he needs to know the bibtex key and the key is inserted in Lyx. Such a workflow can be mastered for one or two references but if someone likes to cite hundreds of papers a different approach is needed.
 
A possible, easier to manage alternative, is to avoid the bibtex format and cite everything in footnotes. Advantage is that the plain text citation can be inserted directly in lyx. To aggregate all the footnotes at the end of the document a bit of LateX programming is needed:
\usepackage{enotez}
\let\footnote=\endnote
\newcommand{\bracketme}[1]{\,[#1]}
\setenotez{
  totoc,
  backref=true,
  mark-cs={\bracketme},
  list-style=plain,
}
\DeclareInstance{enotez-list}{plain}{paragraph}{
  format=\normalsize\leftskip1.25em ,
}
\printendnotes
The enotez package is included in the preamble and some adjustment are made (increased font size, better indentation, square brackets for the footnotes and so on).