1

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?

1

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}
  • thx, do you also now how to add vgl. not to every cite? – C-Jay Jan 5 '17 at 19:02
  • @C-Jay I have extended my answer by the definition of a separate \cite command. – gernot Jan 5 '17 at 19:22
  • Do you also know how to make the cite work as hyperlink? – C-Jay Jan 18 '17 at 17:55

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.