3

I'm looking for some help. I'm writing my master's thesis in German using the APA style (apacite package). So since the document is in German it automatically deletes the commas in the reference list and the in-text citations. Theoretically this would be right, but I'm told to do the citations APA style including the commas. I already found out how I can re-establish the commas, redefining the BCBL and BCBT commands. It works fine, but now in the in-text citations, I also get the commas, which is wrong in German. So for example Solymosi, Bowers, und Fujiyama (2015) should be Solymosi, Bowers und Fujiyama (2015) in the text. Is there any way to delete this comma? So I only need this change to happen, when I'm not citing in parentheses.

Thank you! Anita

Here's what I've done

\documentclass[a4paper,12pt,DIV=10,bibliography=totoc,listof=totoc]{scrreprt}

\usepackage[ngerman]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,siunitx,booktabs,caption}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[natbibapa]{apacite}

\RequirePackage[ngerman=ngerman-x-latest]{hyphsubst}


\begin{document}
\renewcommand{\BCBL}{,}
\renewcommand{\BCBT}{,}

Edit: Here's the bibentry

\bibliographystyle{apacite}
\bibliography{Diplomarbeit}

And here's an example

Nach \cite{Cozens2002CriminogenicDesigns} gibt es Orte, an denen  Menschen sich mehr vor eventuellen Verbrechen fürchten als an anderen. Kriminalitätsfurcht ist zum Beispiel höher, wenn Vegetation die Sicht versperrt \citep{Kuo1998TransformingPreference}. 

It then looks like this: Example

So the red comma shouldn't be there, but the green commas should.

And here are the bibentries for \cite{Cozens2002CriminogenicDesigns} and \citep{Kuo1998TransformingPreference}. Basically \citep works fine and \cite should be changed.

@article{Cozens2002CriminogenicDesigns,
    title = {Criminogenic Associations and Characteristic British Housing Designs},
    year = {2002},
    journal = {International Planning Studies},
    author = {Cozens, Paul Michael and Hillier, David and Prescott, Gwyn},
    doi = {10.1080/13563470220132218},
    pages = {119--136},
    volume = {7}
}

@article{Kuo1998TransformingPreference,
    title = {Transforming inner-city landscapes: Trees, sense of safety, and preference},
    year = {1998},
    journal = {Environment and Behavior,},
    author = {Kuo, Frances E. and Bacaicoa, Magdalena and Sullivan, William C.},
    pages = {28--59},
    volume = {30}
}
  • Welcome to TeX.SX! Can you please supplement the code with the bib entry and also the part of text with the citation? – egreg Dec 1 '15 at 17:05
  • Welcome to TeX SX! This probably would be easier to do with biblatex. Would you consider using biblatex-apa? – Bernard Dec 1 '15 at 17:06
  • thank you! i edited my entry, i hope it helps :) bernard, would it really be easier using biblatex-apa. what would i have to do? – Anita Dec 1 '15 at 17:50
  • Could you provide the contents of the bib entries Cozens2002CriminogenicDesigns and Kuo1998TransformingPreference? – Mico Dec 1 '15 at 17:55
  • Incidentally, the "green" commas just ahead of & make the citation call-outs look awful. – Mico Dec 1 '15 at 17:56
2

I sympathize with you, who are subject to such dreadful specifications.1

Anyway, here's a redefinition of \BCBL that should do what you need. Perhaps also \BCBT should be treated in the same way, but I don't know where it's used.

\begin{filecontents*}{\jobname.bib}
@article{testa,
  author={A. Uthor and W. Riter and P. Laywright},
  title={A paper},
  journal={Journal},
  year=2015,
}
@article{testb,
  author={S. C. I. Entist and W. Riter and P. Laywright},
  title={A paper},
  journal={Journal},
  year=2015,
}
\end{filecontents*}

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

\usepackage[natbibapa]{apacite}

\makeatletter
\AtBeginDocument{\protected\def\BCBL{\ifNAT@swa,\fi}}
\makeatother

\begin{document}

\cite{testa}

\citep{testb}

\bibliographystyle{apacite}
\bibliography{\jobname}

\end{document}

The trick is to make \BCBL append a comma only when & is to be output, which can be checked by \ifNAT@swa. The \protected is needed because the macro undergoes full expansion at an unwanted time.

enter image description here

1 It is well known that all professors in humanities know the one and the only right citation style, that is, their own.

| improve this answer | |

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.