I am new to LaTeX and have some questions regarding biblatex
.
For my thesis, there will be "Primary Sources" and "Secondary Sources" in the Bibliography section. The abbreviations are for these primary sources only. When I first cite them, I only need the short titles, but I need to let the shorthand start to work when I cite a text for the second time.
Therefore, I would like to know how to use \citetitle
to enjoy the function of shorthandintro
? I have learnt from here (Custom abbreviation for citation in bibtex) that the second solution only works for \cite
. However, what I want to have is to cite a book title (the short one) with "hereafter xxx", and cite only the acronym next time.
For instance:
- in a paragraph: Manusmṛti (hereafter MS)… From the MS we know …
- in the bibliography:
Primary sources: [MS] Manusmṛti with Manubhāṣya. Edited by …
Secondary sources: Karl, M. (1987). How to cite something. Oxford.
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{filecontents}
\usepackage[backend=biber,
citestyle=authoryear,
bibstyle=alphabetic,
sorting=nty,
citetracker=true]{biblatex}
\begin{filecontents*}{\jobname.bib}
@book{ms32,
editor = {XXX},
title = {MS in wonderland with others and so on},
shorttitle = MS in wonderland
year = {1932},
publisher = {YYY},
shorthand = {MS},
keywords = {Primary},
}
@book{Karl87,
author = {Mark Karl},
title = {How to cite something},
year = {1987},
publisher = {Oxford},
keywords = {Secondary},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\newbibmacro*{longcite}{%
\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
{\usebibmacro{cite:lable}%
\setunit{\addspace}}
{\printnames{labelname}%
\setunit{\nameyeardelim}}%
\usebibmacro{cite:labelyear+extrayear}}
%Can I make some changes here, so \citetitle also works?
\renewbibmacro*{cite:title}{%
\ifciteseen
{\iffieldundef{shorthand}
{\usebibmacro{longcite}}
{\usebibmacro{cite:shorthand}}}
{\usebibmacro{longcite}
\usebibmacro{shorthandintro}}}
\begin{document}
This is found in \citetitle{ms32} (the short title "MS in wonderland" is shown here). Something else... and cite again but use the acronym MS, \cite{ms32} works perfectly as showing only the MS.
To cite a secondary source, \textcite[36]{Karl87}.
\printbibliography[keyword={Primary},title={Primary Sources}]
\printbibliography[keyword={Secondary},title={Secondary Sources}]
\end{document}
Best Answer
If we can assume that an entry has a
shorthand
field if and only if it is a primary source, I would suggest the following approach.We no longer filter by keyword, but instead use the bibcheck suggested in biblatex: excluding shorthand entries from the main bibliography to filter entries with
shorthand
s. To print theshorthand
s we can use\printshorthand
s.Note that you get better results with
options = {useeditor=false},
if you don't want the editor to be displayed before the title in the list ofshorthand
s for the relevant work.