0

As I would like to occasionally reference certain results or more sources in my flashcards, I tried to find a way to display the reference entries in my .bib file at the end of my flashcard document as separate, succeeding page(s) (in a similar way as they appear in the article documentclass for instance).

With the document class being fixed to flashcards in the preamble, I could not find a way how to set up a reference page that ignores the flashcards layout and simply prints one or more pages with the heading References followed by several, cited bibitem entries, displayed as defined in the bibliographystyle command.


main.tex file

Here is a small working example for my flashcard document, with one flashcard citing an arXiv article. I use \nobibliography{...}, but of course to achieve a reference page one has to write the \bibliography{...} instead. However, this not only produces an ill-formated Reference at the top of the .pdf but also errors. Is there some way to circumvent this?

\documentclass[avery5371, grid]{flashcards}

\cardfrontstyle[\small\slshape]{headings}
\cardbackstyle[\small]{empty}

% v. https://tex.stackexchange.com/questions/115141/how-can-i-aboxed-a-matrix
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{geometry}
\geometry{
        a4paper,
        total={210mm,297mm}, %instead of {210mm, 297mm}
        left=0mm,
        top=0mm,
}
%

%
\setlength{\cardheight}{74.25mm}  % 297/4 = 74.25
\setlength{\cardwidth}{105mm} % {a4-width} / 2 = 105 mm
\setlength{\topskip}{0mm}

\setlength{\cardmargin}{15 pt}
%

\cardfrontheadstyle[\bfseries\scshape]{left}
\cardfrontfootstyle[\small\itshape\em\bfseries]{right}

\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage[round]{natbib}
\usepackage{braket}
\usepackage{bm}
\usepackage{ulem}



\usepackage{inlinebib}
% % v. https://tex.stackexchange.com/questions/37747/which-package-for-oiint-symbol
\usepackage{esint} % various fancy integral symbols
% \usepackage{stix}


% in-math colorboxed, inspired by https://tex.stackexchange.com/questions/33401/a-version-of-colorbox-that-works-inside-math-environments 
\newcommand{\highlightg}[1]{\colorbox{green!40}{$\displaystyle #1$}}

\newcommand{\highlightb}[1]{\colorbox{blue!20}{$\displaystyle #1$}}

\newcommand{\highlightpink}[1]{\colorbox{red!40}{$\displaystyle #1$}}

\newcommand{\highlightorange}[1]{\colorbox{orange!40}{$\displaystyle #1$}}

\usepackage{bibentry}
\usepackage{amsfonts}
\usepackage{mathtools} % for commands such as '\coloneqq'
\usepackage{xcolor}
\usepackage{bold-extra}

\definecolor{my-lightblue}{HTML}{00aedb}

\newcommand{\R}{\mathbb{R}}
\newcommand{\Rn}{\mathbb{R}^{n}}
\newcommand{\Rm}{\mathbb{R}^{m}}
\newcommand{\nbyn}{n\!\times\!n}
\newcommand{\nbym}{n\times m}


\begin{document}


\cardfrontfoot{GRT}


%=========================================================%

\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...\citet{TahaS_VectorCalculus_prePrint}

\vspace*{\stretch{1}}
\end{flashcard}



\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}

%=========================================================%

\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}



\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}

%=========================================================%

\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}



\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}

%=========================================================%


\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}



\begin{flashcard}[{\color{my-lightblue} Definition} {\normalfont - \textbf{25.1.} Concepts of GRT}]{Front Page}

Explanations ...

\vspace*{\stretch{1}}
\end{flashcard}

%=========================================================%

\newpage
\nobibliography{References.bib} % for the purpose of getting a Reference page the \bib... must be uncommented of course, but this gives rise to not just an ugly formatted text but also errors...
% \bibliography{References.bib} 
\bibliographystyle{apalike} % e.g.: plainnat, apalike

\end{document}

References.bib file

@article{TahaS_VectorCalculus_prePrint,
  author  = {{Taha}, Sochi}, 
  title   = {Tensor Calculus},
  journal = {arXiv pre-print},
  year    = {2016},
  number  = {},
  pages   = {},
  month   = {},
  note    = {\url{https://arxiv.org/abs/1610.04347}}, 
  volume  = 4
}
0

There are two issues here. The major one is that you want to add pages that aren't flashcards at the end of a flashcards document. I don't know if that is possible and suspect that the easiest way to do that would be to make two documents and then join them – which would be tricky here. So in this answer I ignore this and put the reference list on a flashcard instead. That will of course not be practical if it is too long.

The minor issue is that by default \bibliography will make a Chapter, but \chapter is not defined in the flashcards environment. I solve this by cheating and letting \chapter be a synonym of \section. You can see solutions that are less about cheating for example here.

I thought there was so much irrelevant stuff in your example, so I trimmed it down to a smaller example to make it clearer. Also I used one of the standard bibtex files to get something to cite so I wouldn't need an extra bib file.

\documentclass[avery5371, grid]{flashcards}

\cardfrontstyle{headings}
\cardbackstyle{empty}

\setlength{\cardheight}{50mm}
\setlength{\cardwidth}{80mm}

\usepackage[round]{natbib}

% By default \bibliography will make a \chapter,
% which is undefined in "flashcards".
\let\chapter\section
\begin{document}

\begin{flashcard}{Front Page}
  \citet{Knuth:ct-a}
\end{flashcard}

\begin{flashcard}{References}
  \bibliography{texbook1} 
  \bibliographystyle{apalike}
\end{flashcard}

\end{document}

Here the backs will look like this:

enter image description here

I realize this is not a full answer to your question, but hopefully still a bit useful.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.