[英]Bibtex wrongly compiles accent mark
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).我正在尝试编译我的乳胶文件,并且我有一个带有重音符号(字母 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在 .bib 文件中我有
@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.但是,当我编译时(我正在使用 TeXStudio),我得到了您在图像中看到的内容。
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).它似乎没有认识到有两个引号(' 在我使用的 IDE 中以蓝色突出显示,然后 ' 以黑色突出显示)。 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: .tex 文件的代码:
\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: .bib 文件的代码:
@phdthesis{konig2014,
author = {K\''{o}nig, R.},
title = {Enhancing genetic programming for predictive modeling},
school = {\''{O}rebro University},
year = {2014}
}
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 '
).由于您的编辑,你的
.bib
文件显示\\''
反斜杠,单引号,单引号),这是错误的,导致奇怪的口音,你所看到的:它把一个重音符( ´
,编码为\\'
上)单引号的顶部( '
,也编码为'
)。 The correct syntax is \\"
(backslash, double quote).正确的语法是
\\"
(反斜杠,双引号)。
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}
.如果我在 TeXworks 程序中编写
.bib
文件,那么\\"
(反斜杠,双引号)会自动变成\\''
(反斜杠,单引号,单引号)。即使我编译了引用.bib
.tex
文件在 TeXstudio 中的文件,我仍然得到奇怪的符号,如上图所示,而不是 o 上方预期的两个点,因为 TeXworks 似乎无法识别双引号。但是如果我在 TeXstudio 程序中编写.bib
文件,然后它按预期编译。我不确定幕后发生了什么(也许我必须更改某个设置?),但问题是 TeXworks,而不是\\"{o}
。
Thanks all for your help!感谢你的帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.