# How can I replace “S.” (German abbreviation for page) with “Sp.” (German abbreviation for column) in the Apacite-package for only two entries?

I've got a question concerning the replacement of "Sp" instead of "S" in a reference. For example, instead of getting

XXX, Y. (ABCD). YYY. In Y. XXX. (Ed.), FGAH. (A. ed., S. 01-03). VVVV: ZZZZ.

I would like to get the following reference:

XXX, Y. (ABCD). YYY. In Y. XXX. (Ed.), FGAH. (A. ed., Sp. 01-03). VVVV: ZZZZ.

How can I change the page-numbering from "S." to "Sp." for only two entries?

Here is a minimal example:

\documentclass{scrbook}
\pagestyle{plain}
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}
\usepackage[natbibapa]{apacite}
\author{XX} \title{YYY}
\begin{document}
\maketitle
\citep{Example1}
\bibliographystyle{apacite}
\bibliography{test}
\end{document}


The bib-file (test.bib) contains the following entry:

@inbook{Example1,
author = {XXX, Y},
title = {YYY},
booktitle = {FGAH},
editor = {XXX, Y},
publisher = {ZZZZ},
edition = {A.},
pages = {01-03},
year = {ABCD},
}


Thank you very much for any solution!

• Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Henri Menke Nov 23 '13 at 14:04
• O.k. I have finished my working example. Excuse my mistake, but I thought that this would not be necessary in this case. – Friedrich Nov 23 '13 at 14:17
• In a strict sense this is still no minimal working example (MWE), because it incorporates too many packages, which are not needed to illustrate your problem. A further suggestion: Do us a favour and change your username to something more telling than "user2314393". – Henri Menke Nov 23 '13 at 14:41
• I'm sorry. Hopefully, it's better right now. – Friedrich Nov 23 '13 at 14:48

Given that you appear to need to use "Sp." instead of "S." for only two entries, it doesn't seem to be a good use of your time to edit the bibliography style file apacite.bst to (a) create a new entry type called, say, @inencyclopedia, (b) create at least two new functions to generate the new look, and (c) rename the entries in question from @inbook to @inencyclopedia.

Instead, I would suggest you do the following:

• After creating the bibliography using apacite (by running LaTeX, BibTeX, and LaTeX twice more), open the file \jobname.bbl in your favorite text editor -- the one you're using for your .tex files will do fine -- and locate the \bibitem named Example1 (or whatever the real key is).

• A few lines down, you'll see a line that looks like this:

\BPG~01-03).


Change it to

Sp.~01--03).

• Repeat this for the other entry in question.

• Save the .bbl file and run LaTeX (but not BibTeX!) once more.

The only downside I can see to this approach is that you will have to remember to re-apply these edits after rerunning BibTeX.

# Remarks

The only thing to do was changing two control sequences from german.apc. Note that this is global now. I don't see a way to distinguish between various citations. Also you need to enclose it into \AtBeginDocument{...}, because apacite loads the file german.apc when \begin{document} is issued.

# Implementation

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
@inbook{Example1,
author = {XXX, Y},
title = {YYY},
booktitle = {FGAH},
editor = {XXX, Y},
publisher = {ZZZZ},
edition = {A.},
pages = {01-03},
year = {ABCD},
}
\end{filecontents}
\pagestyle{empty}
\usepackage[utf8]{inputenc}
\usepackage[english,ngerman]{babel}
\usepackage[natbibapa]{apacite}
% Needs to appear after \usepackage{apacite}
\AtBeginDocument{
% Extracted from german.apc
\renewcommand{\BPG}{Sp.\hbox{}}
\renewcommand{\BPGS}{Sp.\hbox{}}
}
\begin{document}
\citep{Example1}
\bibliographystyle{apacite}
\bibliography{test}
\end{document}


# Output

• Thanks a lot, but I need this change only for two references (encyclopedia entries which were organized in columns and not in pages). Therefore, the remaining references must have "S." (=page). – Friedrich Nov 23 '13 at 14:42