使用 natbib 在参考文献和参考书目中将“and”替换为“og”,将“In”替换为“I”

使用 natbib 在参考文献和参考书目中将“and”替换为“og”,将“In”替换为“I”

由于我用的是挪威语,因此我想将“and”和“in”这两个词改成挪威语。“And”在文中的参考文献和参考书目中均有出现,而“in”则出现在参考书目中。

我的文件:

\documentclass[a4paper, norsk, 12pt]{article} 
\usepackage[latin1]{inputenc}       
\usepackage [norsk] {babel}                          
\usepackage[round, longnamesfirst]{natbib}      

\begin{document}

If I have more than one author, the reference would be a list of alle the authors the first time i cite it \citep{fysdid}. 
The problem is that I can not have the word ''and'' in the reference when I am writing i norwegian. I would like to replace it by ''og''.

\renewcommand{\refname}{Litteratur}
\addcontentsline{toc}{section}{\refname}
\bibliography{litteratur}
\bibliographystyle{abbrvnat}


\end{document}     

bibtex 文件:

@book{fysdid,
title= {Fysikkdidaktikk},
author= {Carl Angell and Berit Bungum and Ellen K. Henriksen and Stein Dankert Kolstø and Jonas Persson and Reidun Renstrøm},
year= {2011},
publisher={Manusutkast},
}

结果:

If I have more than one author, the reference would be a list of alle the
authors the rst time i cite it (Angell, Bungum, Henriksen, Kolst, Persson,
and Renstrm, 2011). The problem is that I can not have the word "and"
in the reference when I am writing i norwegian. I would like to replace it by
"og".

Litteratur

C. Angell, B. Bungum, E. K. Henriksen, S. D. Kolst, J. Persson, and
R. Renstrm. Fysikkdidaktikk. Manusutkast, 2011.

答案1

您可以使用 创建与挪威语兼容的 BibTeX 样式makebst,但还有更简单的方法。复制一份并abbrvnat.bst命名为abbrvnat-no.bst。在此文件中搜索字符串" and "并将其更改为" og ";我猜想应该对 进行类似操作in。然后使用命令调用此新样式\bibliographystyle

新样式应放在 TeX 系统已知的位置,可以是工作目录。如果您在其他项目中也需要,则应查阅 TeX 发行版的文档,以找到正确的位置和使它为人所知的必要步骤。

答案2

另一个非常简单的解决方案(如图所示)这里)是在序言中调用 natbib 后添加一行。因此,对于西班牙语:

\usepackage{natbib}
\AtBeginDocument{\renewcommand\harvardand{y}} % change 'author and author' by 'author y author'

不太简单的是样式不依赖的情况\harvardand(例如 abbrvnat.bst)。以下建议这里在这种情况下应该可以解决问题:复制/重命名abbrvnat.bst并通过找到该format.names函数来编辑它。在函数内部,替换

          if$
          t "others" =
            { " et~al." * }
            { " and " * t * }

(西班牙语)

          if$
          t "others" =
            { " et~al." * }
            { " y " * t * }

不要忘记使用以下方法加载编辑后的样式

\bibliographystyle{renamed-abbrvnat}

最后,我了解到书目中的“in”部分是拉丁文(等人) 因此无需翻译。

相关内容