0

I am attempting to compile my latex file and I have a source with author's last name with an accent mark (two dots above the letter o). In the preamble of my file, I have

\documentclass[twoside,11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{listings}
\usepackage{xcolor, color}
\usepackage{graphics, graphicx, rotating}
\usepackage{float}
\usepackage[caption=false]{subfig}
\usepackage{algpseudocode, algorithm}
\usepackage{url, hyperref}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

Then, at the end of the file, I have

\bibliographystyle{plain}
\bibliography{bib}

In the .bib file I have

@phdthesis{kon,
    author = {K\"{o}n},
    title = {TITLE}
    year = {2014}
}

However, when I compile (I'm using TeXStudio), I get what you see in the image.

what I see from the pdf file

It doesn't seem to be recognizing that there are two quotes (' is highlighted in blue and then ' is highlighted in black in the IDE I'm using). I'm not sure how to get the correct accent mark. I can't seem to find this issue elsewhere, and there are no other ways in latex literature (that I can find). Thank you!

Code for .tex file:

\documentclass[twoside,11pt]{article}
\usepackage{jmlr2e}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{listings}
\usepackage{xcolor, color}
\usepackage{graphics, graphicx, rotating}
\usepackage{float}
\usepackage[caption=false]{subfig}
\usepackage{algpseudocode, algorithm}
\usepackage{url, hyperref}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\begin{document}
    Here is how it gets cited: \citep{konig2014}
    
    \bibliographystyle{plain}
    \bibliography{bibl}
\end{document}

Code for .bib file:

@phdthesis{konig2014,
    author = {K\''{o}nig, R.},
    title = {Enhancing genetic programming for predictive modeling},
    school = {\''{O}rebro University},
    year = {2014}
}
user1723196
  • 125
  • 1
  • 10

2 Answers2

1

Since your edit, your .bib file shows \'' (backslash, single quote, single quote), which is wrong and results in the weird accents you're seeing: it's putting an acute accent (´, coded as \') on top of a single quote (', also coded as '). The correct syntax is \" (backslash, double quote).

Thomas
  • 174,939
  • 50
  • 355
  • 478
0

If I write the .bib file in the program TeXworks, then \" (backslash, double quotes) automatically turns into \'' (backslash, single quote, single quote). Even if I compile my .tex file that references the .bib file in TeXstudio, I still get weird symbols as show in the image above, rather than the expected two dots above the o because TeXworks doesn't seem to recognize the double quotes. BUT if I write the .bib file in the TeXstudio program, then it compiles as expected. I'm not sure what's going on behind the scenes (maybe there is a setting I have to change?), but the issue was TeXworks, not the \"{o}.

Thanks all for your help!

user1723196
  • 125
  • 1
  • 10