Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In biblatex we find the commands \citetitle, \citeauthor ... In scientific articles etc. you sometimes need to cite other entries of the bibliography.

For example, you need to cite just the name of a journal. So you need a command like \citejournal. Does anyone know how to create commands like these?

share|improve this question
    
Doesn't \citetile or \citetitle* do what you want? –  Gonzalo Medina Aug 27 '11 at 22:39
    
@Medina: \citetitle and \citetitle* were typesetted as the title of the article, not the title of the journal. –  Philip Aug 27 '11 at 23:18
    
Ah, right. I've posted an answer showing one possible definition for the command. –  Gonzalo Medina Aug 27 '11 at 23:32

1 Answer 1

up vote 13 down vote accepted

You can use something like this:

\documentclass{article}
\usepackage[style=authoryear,backend=biber]{biblatex}

\DeclareCiteCommand{\citejournal}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
    \usebibmacro{journal}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{test,
  author = {Author, A.},
  year = {2011},
  title = {Some relevant article},
  journal = {Test journal}
}
\end{filecontents}

\bibliography{\jobname}

\begin{document}

Some text~\citejournal{test}

\printbibliography

\end{document}

enter image description here

EDIT: the following refinements were provided by Audrey:

\citetitle and \citetitle* disable citation tracking. The new command could be defined to be consistent. Generic bibliography macros print the whole title, including subtitles and title add-ons, which can be avoided. A single command could also be used to cite the "main" title of the reference. All this is demonstrated below.

\documentclass{article}
\usepackage{biblatex}

\DeclareCiteCommand{\citejournal}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
    \usebibmacro{journal}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citebooktitle}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
    \usebibmacro{booktitle}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citeintitle}% Based on \citetitle from biblatex.def
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexfield{indextitle}}
     {}%
   \iffieldundef{journaltitle}
     {\iffieldundef{booktitle}
        {\iffieldundef{maintitle}
          {\printfield[citetitle]{labeltitle}}% Behave like \citetitle if no "main" title
          {\printtext[maintitle]{\printfield[titlecase]{maintitle}}}}
        {\printtext[booktitle]{\printfield[titlecase]{booktitle}}}}
     {\printtext[journaltitle]{\printfield[titlecase]{journaltitle}}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@Article{yoon,
  author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo Han},
  title = {Palladium pincer complexes with reduced bond angle strain: efficient catalysts
    for the Heck reaction},
  journaltitle = {Organometallics},
  volume = {25},
  number = {10},
  date = {2006},
  pages = {2409--2411}}
@InProceedings{salam,
  author = {Salam, Abdus},
  editor = {Svartholm, Nils},
  title = {Weak and Electromagnetic Interactions},
  booktitle = {Elementary Particle Theory},
  booksubtitle = {Relativistic Groups and Analyticity},
  booktitleaddon = {Proceedings of the Eighth Nobel Symposium},
  eventdate = {1968-05-19/1968-05-25},
  venue = {Aspen{\"a}sgarden, Lerum},
  publisher = {Almquist \& Wiksell},
  location = {Stockholm},
  date = {1968},
  pages = {367--377}}
@InProceedings{moraux,
  author = {Moraux, Paul},
  editor = {Lloyd, G. E. R. and Owen, G. E. L.},
  title = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
  subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}
    Themistius},
  shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque},
  booktitle = {Aristotle on Mind and the Senses},
  booktitleaddon = {Proceedings of the Seventh Symposium Aristotelicum},
  eventdate = {1975},
  publisher = cup,
  location = {Cambridge},
  date = {1979},
  pages = {281--324}}
@InCollection{pines,
  author = {Pines, Shlomo},
  editor = {Twersky, Isadore},
  indextitle = {Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and
    Maimonides, The},
  title = {The Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and
    Maimonides},
  shorttitle = {Limitations of Human Knowledge},
  booktitle = {Studies in Medieval Jewish History and Literature},
  publisher = hup,
  location = {Cambridge, Mass.},
  date = {1979},
  pages = {82--109}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\noindent
\citeintitle{yoon} versus \citejournal{yoon} \\\\
\citeintitle{salam} versus \citebooktitle{salam} \\\\
\citeintitle{moraux} versus \citebooktitle{moraux} \\\\
\citeintitle{pines} versus \citebooktitle{pines}
\printbibliography

\end{document}

enter image description here

share|improve this answer
    
@Medina & Audrey: Thanks for your help. It works perfectly. –  Philip Aug 30 '11 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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