3

My workplace requires me to submit lists of my published papers in a specific tabular format. I already have my papers in a BibTeX file, and I'd like to use this to generate a table in LaTeX such as this:

year & title & jorunal name, etc. & ISSN, DOI, etc. & comment \\

The BibTeX data look like this:

@article{id,
  title={Lorum Ipsum Dolor Sit Amet},
  author={LastName, FirstName},
  journal={Journal of Some Fancy Studies},
  volume={1},
  year={2018},
  doi={DOI},
  issn={ISSN},
  comment={indexed by Scopus},
  langid = "english"
}

Any pointers on how I can extract the relevant BibTeX fields?

Alex
  • 31

1 Answers1

1

You could use the package usbib to extract fields from your .bib entries and build a tabular bibliography with it. But I feel that using usebib to create a fully fledged bibliography is an abuse of the package. The package also has some limitations when it comes to name fields (it doesn't parse them) and does not do any sorting and other extra stuff that BibTeX and Biber can do.

If you want to (have to) stick to BibTeX you would have to roll your own .bst style that produces tabular bibliography output. That is certainly not impossible, but it is going to be a bit of work and the stack-based reverse Polish notation of BibTeX files is not for the faint-hearted. I did not manage to find a .bst file that produces a tabular environment, so you would be on your own there and have nothing to build on.

If you can use biblatex and have my biblatex-ext bundle installed, you can use its biblatex-ext-tabular (sub)package to produce tabular bibliographies. The main idea comes from Audrey's answer to tabular bibliography with biblatex, but the code is nicely hidden in a package so you don't have to worry about the details.

The following works for @articles and gives roughly the output in your question.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authortitle, sorting=ydnt, backend=biber]{biblatex}
\usepackage{biblatex-ext-tabular}


\usepackage{longtable}
\usepackage{array}
\newcolumntype{L}[1]{%
  >{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\defbibtabular{bibtabular}
  {\renewbibmacro{issue+date}{\printfield{issue}}%
   \setlength{\LTpre}{0pt}%
   \setlength{\LTpost}{0pt}%
   \renewcommand*{\arraystretch}{2}%
   \begin{longtable}{%
     @{}
     L{\dimexpr0.08\textwidth-\tabcolsep\relax}
     L{\dimexpr0.3\textwidth-2\tabcolsep\relax}
     L{\dimexpr0.25\textwidth-2\tabcolsep\relax}
     L{\dimexpr0.25\textwidth-2\tabcolsep\relax}
     L{\dimexpr0.12\textwidth-\tabcolsep\relax}
     @{}}}
  {\end{longtable}}
  {\anchorlang{\usebibmacro{date}} &
   \plainlang{\usebibmacro{title}} &
   \plainlang{\usebibmacro{journal+issuetitle}} &
   \plainlang{\usebibmacro{doi+eprint+url}} &
   \plainlang{\printfield{note}}\\}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{id,
  title={Lorum Ipsum Dolor Sit Amet},
  author={LastName, FirstName},
  journal={Journal of Some Fancy Studies},
  volume={1},
  year={2018},
  doi={DOI},
  issn={ISSN},
  note={indexed by Scopus},
  langid = "english"
}
\end{filecontents}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}


\begin{document}
\nocite{sigfridsson,id}
\printbibtabular[title={Publications}]
\end{document}

Tabular bibliography.

moewe
  • 175,683
  • Excellent. This is just what I need! Just one question: how do I create several such tables in my document, which list different items based on some key, for example langid. – Alex Apr 04 '19 at 11:43