1

I am writing an article and I wan't to change the citation style in the text to that of my native language. Example:

(Surname1 and Surname2 (2020)) --> (Surname1 og/& Surname2 (2020))

while the reference list should look like:

Surname1, X og Surname2, Y, ...

"og" being the Danish word for "and".

I've seen a similar question but the bibliography did not have the same bibliography style as mine so I'm quite confused and don't know what to add. I already have the \usepackage[danish]{babel}

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\bibliographystyle{unsrtnat}
\usepackage{hyperref}
\usepackage[round]{natbib}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[font=small]{caption}
\usepackage[margin=2.5cm,headheight=26pt,includeheadfoot]{geometry}
\setlength{\marginparwidth}{2.5cm}
\usepackage{tabularx}
\setcounter{secnumdepth}{3}
\usepackage{times}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}

\end{document}
1
  • Welcome to TeX.SE.
    – Mico
    Jan 19, 2022 at 22:20

1 Answer 1

0

I suggest you proceed as follows:

  • Find the file unsrtnat.bst in your TeX distribution. Make a copy of this file and call the copy, say, unsrtnat-dk.bst.

  • Open the file unsrtnat-dk.bst in a text editor. (The program you use to edit your tex files will do fine.)

  • Locate the three instances of " and " and change them to " og ". (In my copy of the file, these instances occur on lines 232, 325, and 1111.

  • Save the file unsrtnat-dk.bst either in the folder that contains your main tex files or in a folder that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution suitably. (If you have no idea what the preceding sentence means, you should probably choose the former option.)

  • In your main tex file, change the instruction \bibliographstyle{unsrtnat} to \bibliographstyle{unsrtnat-dk} and perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.

Happy BibTeXing!


enter image description here

\documentclass[11pt]{article} 
\begin{filecontents}[overwrite]{sample.bib}
@misc{ ab:3001, author = "A and B", title = "Tanker", year=3001 }
\end{filecontents}

\usepackage[danish]{babel}
\usepackage[authoryear]{natbib}
\bibliographystyle{unsrtnat-dk}

\begin{document}
\cite{ab:3001}
\bibliography{sample}
\end{document}
6
  • Thanks @Mico. I find the first steps confusing as I am new to this. I know nothing of these files. Is there another way?
    – Mei
    Jan 19, 2022 at 23:15
  • @Mei - Not that I know of.
    – Mico
    Jan 19, 2022 at 23:18
  • Do you mind explaining how I ''find the file unsrtnat.bst in your TeX distribution''? I have no idea what this means. The rest seems manageable. @Mico
    – Mei
    Jan 19, 2022 at 23:58
  • @Mei - Please tell us which operating system (Windows? MacOS? something else?) runs on your computer and which TeX distribution you employ (TeXlive? MikTeX? Something else?).
    – Mico
    Jan 20, 2022 at 6:11
  • apologies for the disappearing. It was a group assignment and we ran out of time. The issue remains and will come back to haunt me in the future so I hope you can pick up where we left; The main issue with my understanding is that I write in the overleaf-cloud you get when you google. I have nothing else. I use Mac OS and I assume this is the content I need to download? tug.org/mactex (MacTeX Download) If so, it provides me with 4 new programs: LaTeXiT, TeXShop, BibDesk, TeX Live Utility. I am unsure of what to do next and which one to pick. thanks in advance @Mico
    – Mei
    Feb 5, 2022 at 1:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .