引用样式:(Vgl. 作者和年份,第 58 页)- \bibliographystyle{agsm}

引用样式:(Vgl. 作者和年份,第 58 页)- \bibliographystyle{agsm}

我使用以下示例

\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}

输出:

test (Szyperski 2002, S.58)

但是我需要

test (Vgl. Szyperski 2002, S.58)

我的问题是我该如何解决这个问题?

答案1

仅偶尔更改\cite命令,定义一个新命令\citevgl如下。

\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}

\cite要永久更改命令,只需添加一行即可:

\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}

相关内容