Skip to content

Support `\fullcite`, `\citeauthor`, `\citetitle` biblatex commands #2335

Open
DOFfactory opened this Issue · 11 comments

4 participants

@DOFfactory

I would like to report the issue that basic (and critical) biblatex commands are not converted from TeX > docx with pandoc. These commands are:

1. Creating a MWE with the following code in file pandoc.tex:

\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{abc,
author = {John Doe},
year = {1970},
title = {Article Title},
journaltitle = {Journal Name},
volume = {1},
number = {2},
pages = {13--17},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
abcdefgh
ijklmnop
xyvwz

cite: \cite[Cf.][13--17]{abc}
Cite: \Cite[Cf.][13--17]{abc}
parencite: \parencite[Cf.][13--17]{abc}
Parencite: \Parencite[Cf.][13--17]{abc}
footcite: \footcite[Cf.][13--17]{abc}
footcitetext: \footcitetext[Cf.][13--17]{abc}
textcite: \textcite[Cf.][13--17]{abc}
Textcite: \Textcite[Cf.][13--17]{abc}
smartcite: \smartcite[Cf.][13--17]{abc}
Smartcite: \Smartcite[Cf.][13--17]{abc}
fullcite: \fullcite[Cf.][13--17]{abc}
footfullcite: \footfullcite[Cf.][13--17]{abc}
citeauthor: \citeauthor[Cf.][13--17]{abc}
Citeauthor: \Citeauthor[Cf.][13--17]{abc}
citetitle: \citetitle[Cf.][13--17]{abc}
citeyear: \citeyear[Cf.][13--17]{abc} 

\printbibliography
\end{document}

The commands are from the official biblatex manual http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf

2. Typed in command line:

pdflatex pandoc.tex
biber pandoc
pdflatex pandoc.tex
pandoc --bibliography=pandoc.bib -o pandoc.docx pandoc.tex

3. List of non-functional commands

Using pandoc 1.15.0.6 the following commands are not working (highlighted in bold):

  • \cite
  • \Cite
  • \parencite
  • \Parencite
  • \footcite
  • \footcitetext
  • \textcite
  • \Textcite
  • \smartcite
  • \Smartcite
  • \fullcite
  • \footfullcite
  • \citeauthor
  • \Citeauthor
  • \citetitle
  • \citeyear

Could you, please, provide functionality for the missing biblatex commands? IMHO \citetitle, \footcite and \fullcite are pretty critical.

EDIT: Attached screenshots

4. Result in LaTeX

latex

5. Result from pandoc in DOCX

pandoc

@mpickering
Collaborator

These are very easy to add in general. You can see an example of how cite is implemented here.

@DOFfactory

Thanks @mpickering, though have no idea how to make a patch for this. Anybody can help with this?

@DOFfactory

Looked into the link you provided. While few of the citation formats are simply missing (i.e. they are easy to add), I could not figure out how to introduce the \citetitle command. Could somebody here have a look into this please?

@jgm
Owner
@DOFfactory

Why not to add it? We have a bib(la)tex file, all the data are there ... Just as one calls the author, one should be able to call the title from the same file.

@jgm
Owner
@jgm
Owner
jgm commented

@DOFfactory, it would help if you were more specific about what is "not working" in your list, and how.

\footcite and footcitetext do get parsed as citations in notes.

As I've indicated, \citeauthor and \citetitle can't be done without signficant changes in pandoc and pandoc-citeproc architecture. (Though we could parse them as regular citations, which would be better than doing nothing.) \fullcite is probably in the same boat, though I'm not really sure what it's supposed to do. \Cite should be easy enough to add.

@DOFfactory

Hi @jgm, I attached the screenshots. You are right, \footcite and \footcitetext does get parsed, my bad. \Cite should be also easily implemented.

What this ticket initially supposed to point out was that biblatex is getting to be used widely in the LaTeX-using community. It would be great if biblatex commands would be parsed straightforward in pandoc because, I believe, a big group this community (mostly from academia) will then use pandoc and markdown for conversion/writing.

@jgm jgm added a commit that referenced this issue
@jgm LaTeX reader: Implement \Cite.
See #2335.
bf7d858
@jgm
Owner
jgm commented

I've implemented \Cite. Getting \fullcite, \citeauthor, and \citetitle would require major architectural changes in pandoc and pandoc-citeproc.

@DOFfactory

Many thanks! Since I do not have an expertise to re-write your pandoc-citeproc code either, I will leave this issue open as a reminder and future reference for others. It would be great to have fully implemented biblatex for the reasons mentioned above. Thanks again.

@jgm jgm changed the title from Critical Biblatex commands unsupported (yet) to Support `\fullcite`, `\citeauthor`, `\citetitle` biblatex commands
@jgm jgm added the enhancement label
@nickbart1980

It would be nice to have an equivalent of \fullcite in markdown, though.

In a syllabus, e.g., you might want to use an author-date style in general, but still occasionally give the full details of a recommended textbook, or of the reading for a particular date in the text itself, like:

Blah blah blah. The recommended textbook for this course is:

Knox, Paul L., and Steven Pinch. 2006. Urban Social Geography: An Introduction. 5th ed. Harlow: Pearson/Prentice Hall.

Blah blah blah.

Since this would just have to copy the entry that is being generated anyway for the list of references, this might not be too difficult.

As to syntax, we’d have to invent something; maybe a plus sign (+) before the @ would do, like [+@knox], or just +@knox.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.