[Tex/LaTex] Citation Style: (Vgl. Author and year, S. 58) – \bibliographystyle{agsm}

bibliographiescitingharvard-style

I use following example

\documentclass[]{scrreprt}

\usepackage{filecontents}
\usepackage{harvard}

\begin{filecontents}{literatur.bib}
@BOOK{Szyperski2002,
    title = {Component Software: Beyond Object-Oriented Programming},
    year = {2002},
    author = {Clemens Szyperski},
    edition = {2},
    month = nov
}
\end{filecontents}


\begin{document}
\bibliographystyle{agsm}
test \cite[S .58]{Szyperski2002}    

\bibliography{Literatur.bib}
\end{document}

Output:

test (Szyperski 2002, S.58)

But I need

test (Vgl. Szyperski 2002, S.58)

My question is how I have to solve this problem?

Best Answer

To change the \cite command only occasionally, define a new command \citevgl as follows.

\usepackage{harvard}
\let\harvardleftorig\harvardleft
\newcommand\citevgl
  {\def\harvardleft{(vgl.\ \global\let\harvardleft\harvardleftorig}%
   \cite
  }

enter image description here

\documentclass[]{scrreprt}
\usepackage{filecontents}

\usepackage{harvard}
\let\harvardleftorig\harvardleft
\newcommand\citevgl
  {\def\harvardleft{(vgl.\ \global\let\harvardleft\harvardleftorig}%
   \cite
  }

\begin{filecontents}{literatur.bib}
@BOOK{Szyperski2002,
    title = {Component Software: Beyond Object-Oriented Programming},
    year = {2002},
    author = {Clemens Szyperski},
    edition = {2},
    month = nov
}
\end{filecontents}

\begin{document}
\cite[S.~58]{Szyperski2002} \cite{Szyperski2002}

test \citevgl[S.~58]{Szyperski2002} \citevgl{Szyperski2002}

\cite[S.~58]{Szyperski2002} \cite{Szyperski2002}

\bibliographystyle{agsm}
\bibliography{literatur.bib}
\end{document}

To change the \cite command permanently, it is sufficient to add one line:

\usepackage{harvard}
\renewcommand\harvardleft{(vgl.\ }

enter image description here

\documentclass[]{scrreprt}

\usepackage{filecontents}
\usepackage{harvard}
\renewcommand\harvardleft{(vgl.\ }

\begin{filecontents}{literatur.bib}
@BOOK{Szyperski2002,
    title = {Component Software: Beyond Object-Oriented Programming},
    year = {2002},
    author = {Clemens Szyperski},
    edition = {2},
    month = nov
}
\end{filecontents}


\begin{document}
\bibliographystyle{agsm}
test \cite[S.~58]{Szyperski2002}    

\bibliography{literatur.bib}
\end{document}
Related Question