15

I'd like to extract the title from a bibtex file and use it in the main document text. I'm using \citetitle, but this adds the title plus whatever markup is defined for the bibliography style I'm using. How do I get the article title as-is, without anything attached?

My minimal working example:

\documentclass{article}
\usepackage[style=authoryear-comp]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{refs_local.bib}
@Article{fubar,
  author =       {J. Doe},
  title =        {A fabulous finding},
  journal =  {Journal of Improbable Results},
  year =         2010,
  volume =   42,
}
\end{filecontents}
\addbibresource{refs_local.bib}
\begin{document}%
Test: {\bfseries \sffamily \citetitle*{fubar}}\\
\rule{\textwidth}{0.4mm}
\printbibliography
\end{document}

The generated document (cropped):

Compiled document

The desired document would not affect layout of the References, but would show the text A fabulous finding in the main document without any quotes.

Do I need to define my own citation command to get this effect, or is there a more low-level way to extract information directly from bibtex fields?

14

The formatting of \citetitle is done by the field formatting citetitle. You can change it in the following way:

\DeclareFieldFormat*{citetitle}{#1}

The star version is used to redefine citetitle for all entry types.

6

It's actually a way easier, just use \citefield

\citefield{my-referenc}{title}
  • 1
    You might want to add that this works because \citefield uses the generic format defined via \DeclareFieldFormat{citefield}{#1} (so no formatting is applied, everything comes out bare), while \citetitle uses the citetitle format that follows the definition of the title format (as explained in Marco Daniel's answer). – moewe Aug 23 '17 at 16:07
  • moewe: Thanks for an explanation, I wasn't aware of that. I just accidentally found this works. You're welcome to edit my post and provide the explanation. – ziima Aug 26 '17 at 13:30

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.