0

I am working on a document where I want to cite one source in one specific way and all the other sources in a different way. More specifically, I want to cite the source named "drama" like this:

"some citation from the drama" (p. 54)

whilst all the other sources shall be cited like this:

"now something else" (Shakespeare, Hamlet, p. 123)

How can I achieve this?

Currently, all my citations are done with the \autocite command.

2
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – TobiBS
    Sep 14, 2020 at 13:33
  • See bib by category.
    – Bernard
    Sep 14, 2020 at 13:49

2 Answers 2

0

You can try to suppress all citation output for a particular work. But then you have to be careful to only cite this work with page references.

In the example below we suppress sigfridsson. The implementation here is for the authoryear style. Other styles can be handled similarly (at least in principle), but the exact implementation will look different and may be significantly more complex.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\newcommand*{\ifhidecite}{\iffieldequalstr{entrykey}{sigfridsson}}

\renewbibmacro*{cite}{%
  \ifhidecite
    {}
    {\iffieldundef{shorthand}
       {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
          {\usebibmacro{cite:label}%
           \setunit{\printdelim{nonameyeardelim}}}
          {\printnames{labelname}%
           \setunit{\printdelim{nameyeardelim}}}%
        \usebibmacro{cite:labeldate+extradate}}
       {\usebibmacro{cite:shorthand}}}}

\renewbibmacro*{postnote}{%
  \iffieldundef{postnote}
    {\ifhidecite
       {\PackageWarning{biblatex}{%
          Hidden citation without postnote.\MessageBreak
          The citation outout may look weird}}
       {}}
    {\setunit{\printdelim{postnotedelim}}%
     \printfield{postnote}}}

\addbibresource{biblatex-examples.bib}


\begin{document}
\autocite[45]{sigfridsson}

\autocite[380]{worman}

\printbibliography
\end{document}

(p. 45)

2
  • Hi, and thanks for the answer. As a follow-up now: I am using a custom citation style called "uni-wtal-ger", which is based upon biblatex-dw. Within this style, I would like to quote everything as set up by the style and all sources in {drama} as mentioned above. How can I change the references to the drama to be rendered as parenthesis rather than footnotes?
    – Floris
    Sep 16, 2020 at 12:26
  • @Floris I suggest you ask a new question about that. But, please include a short example document (similar to the one posted in this answer) that shows your current bibliography and citation setup.
    – moewe
    Sep 16, 2020 at 14:04
0

You probably don't want to include every page reference to the topic drama in an index. In that case you could use a hack like this snippet of code:

. . . from the drama'' (p.~54)

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.