BibTeX, biblatex and biberText before citation using multibib (e.g. [see Aut00, p. 100])

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
timmydove
Posts: 4
Joined: Wed Jun 29, 2022 8:00 pm

Text before citation using multibib (e.g. [see Aut00, p. 100])

Post by timmydove »

Hello,

I need to implement quite specific citations. I need multiple bibliographies (using multibib for that) and a citation should look like this example:
[see Aut00, p. 100]

So there needs to be text before and after the author/year abbreviation.

The Bibliography should consist of sections in a chapter.

In the example below I accomplished everything except the text before the author abbreviation.
Is there any way to achieve this?
I apprechiate your help

Code: Select all

\documentclass[fontsize=12pt,BCOR=5mm,DIV=12,parskip=half,listof=totoc,
               paper=a4,toc=bibliography,pointlessnumbers]{scrreprt}

\usepackage{multibib}
\usepackage[nottoc]{tocbibind}
\usepackage{filecontents}

\begin{filecontents}{biba.bib}
@book{a,
    author = {Author1},
    year = {2000},
    title = {Book A}
}
\end{filecontents}

\begin{filecontents}{bibb.bib}
@book{b,
    author = {Author2},
    year = {2001},
    title = {Book B}
}
\end{filecontents}

\newcites{A}{Bib A}
\newcites{B}{Bib B}

\begin{document}
\citeA[see][p. 100]{a} % this does not work using multibib (Result: '[?, see]p. 100]a'), but does work without

\citeB[p. 100]{b} % this works fine

\chapter*{Literature}
\renewcommand{\bibsection}{\section*{\bibname}}
\bibliographystyleA{alphaurl}
\bibliographyA{biba}

\bibliographystyleB{alphaurl}
\bibliographyB{bibb}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
Kreuz Elf
Posts: 22
Joined: Thu Mar 04, 2021 7:33 pm

Text before citation using multibib (e.g. [see Aut00, p. 100])

Post by Kreuz Elf »

why don't you put the information about page 100 into the bibfile? I think that would be easier
timmydove
Posts: 4
Joined: Wed Jun 29, 2022 8:00 pm

Text before citation using multibib (e.g. [see Aut00, p. 100])

Post by timmydove »

Kreuz Elf wrote:why don't you put the information about page 100 into the bibfile? I think that would be easier
Sorry, I don't exactly understand what you mean.
The author abbreviation is generated, and I need custom text before and after it, is this possible by adding something to the bibfile?
Also e.g. this should be possible:
Sentence 1 [Aut00, p. 42]. Sentence 2 [see Aut00, p. 100].
Kreuz Elf
Posts: 22
Joined: Thu Mar 04, 2021 7:33 pm

Text before citation using multibib (e.g. [see Aut00, p. 100])

Post by Kreuz Elf »

what I meant is:

@book{a,
author = {Author1},
year = {2000},
title = {Book A},
pages = {100}
}

I never saw something like

Code: Select all

\citeA[see][p. 100]{a}
timmydove
Posts: 4
Joined: Wed Jun 29, 2022 8:00 pm

Text before citation using multibib (e.g. [see Aut00, p. 100])

Post by timmydove »

Okay, I see. But this does not help in my case because I need to cite several pages from a book and they need to be displayed in the text.

\cite[see][p. 100]{a} works using biblatex, see the example below.

Code: Select all

\documentclass{article}

\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{biba.bib}
    @book{a,
        author = {Author1},
        year = {2000},
        title = {Book A}
    }
\end{filecontents}
\addbibresource{biba.bib}

\begin{document}
    \cite[see][p. 100]{a}

    \printbibliography
\end{document}
timmydove
Posts: 4
Joined: Wed Jun 29, 2022 8:00 pm

Text before citation using multibib (e.g. [see Aut00, p. 100])

Post by timmydove »

I finally found a solution, biblatex is able to do this without mutlibib. Section 3.14.3 (Multiple Bibliographies) in their documentations explains multiple ways.
Post Reply