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}

shorttitle = MS in wonderlandin the.bibentry will error. Also\begin{filecontents*}{\Bibliography.bib}and then\addbibresource{Bibliography.bib}is a bit risky. I suggest you use the placeholder\jobname.bibin each case:\begin{filecontents*}{\jobname.bib}&\addbibresource{\jobname.bib}. – moewe May 18 '22 at 16:01style=alphabetic, citestyle=authoryear,. This makes the bibliography use alphabetic labels, but the citations will not use them. If all your works haveshorthands you might not notice something weird, but if you have works withoutshorthands this will look odd. – moewe May 18 '22 at 16:07shorthands at all? What should they look like (in citations and especially in the bibliography)? Do you actually use the bibmacrolongciteyou define in code not shown in the question or is this a straight copy from the linked answer to show what you have tried? – moewe May 19 '22 at 15:09