How to have BibLaTeX’s shorthand displayed without square brackets

biblatexciting

I'd like to reference sources “in the flow in the text”, for example:

As described in the User Manual, …

Now, if I use the default BibLaTeX style (whichever it is), I get

As described in the [User Manual], …

or, using \citetitle

As described in the User Manual, …

How can I cite without either brackets or italics but with a prenote and the hyperlink?
Or maybe it's possible with shorttitle?

I would prefer a solution “out of the box”: using BibLaTeX's options or just switching the style, rather than writing some custom code for citations.


\documentclass[]{article}
\usepackage[
backend = biber
]{biblatex}
\usepackage{hyperref}

\begin{filecontents}[overwrite]{biblio.bib}
@Online{key,
    author       = {author},
    title        = {title},
    shorthand    = {User Manual},
    shorttitle   = {User Manual}
}
\end{filecontents}

\addbibresource{biblio.bib}

\begin{document}

\cite[in the first half of the][]{key} % brackets

\textcite[in the first half of the][]{key} % not needed author

\citetitle[in the first half of the][]{key} % % no hyperlink, italic

\printbibliography

\end{document}

Best Answer

There are many possible solutions here. What is easiest depends on the context and on what else you would like to achieve.

If you don't select a style, biblatex defaults to style=numeric,. That explains the brackets you see everywhere: Numeric citations are usually given in brackets. And the shorthand is just treated as a replacement for the numeric label.

If you don't need numeric citations, you can choose a different style like authortitle, that does not come with brackets. \printbibliography will not print any labels/shorthands in that style, though, but if you want to see the shorthand in the bibliography section at the end you can use \printshorthands.

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

\begin{filecontents}{\jobname.bib}
@Online{key,
    author       = {author},
    title        = {title},
    shorthand    = {User Manual},
    shorttitle   = {User Manual},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite[in the first half of the][]{key}

\textcite[in the first half of the][]{key}

\citetitle[in the first half of the][]{key}

\printshorthands
\end{document}

in the first half of the User Manual
author (in the first half of the User Manual)
in the first half of the User Manual


An alternative solution if you stick with style=numeric, would be to tell \cite to lose the brackets.

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

\DeclareCiteCommand{\cite}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareFieldFormat{labelnumberwidth}{#1}
\DeclareFieldFormat{shorthandwidth}{#1}

\begin{filecontents}{\jobname.bib}
@Online{key,
    author       = {author},
    title        = {title},
    shorthand    = {User Manual},
    shorttitle   = {User Manual},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite[in the first half of the][]{key}

\textcite[in the first half of the][]{key}

\citetitle[in the first half of the][]{key}

\printbibliography
\end{document}

in the first half of the User Manual
author [in the first half of the User Manual]
in the first half of the User Manual

Related Question