Closed rami3l closed 1 year ago
你的问题无法复现,我是TeX Live 2023,Windows 10,XeLaTeX编译;Times New Roman的版本是7.00。
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\begin{document}
Čebirić, Šejla and Goasdoué, François and Guzewicz, Pawel and Manolescu, Ioana
\end{document}
@note286 感谢你的回复。
在我的论文中,正文的 Š
能正常显示。
上面的源码我也能够通过编译(环境为 MiKTeX 23.1 on Windows 10,XeLaTeX 编译,Times New Roman v7.00),显示结果正常。
怀疑为 natbib
相关问题。我将尝试给出最小复现。
test.tex
\documentclass{article}
\usepackage[english]{babel}
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}
\begin{document}
This document is citing \cite{cebiric_compact_2018}.
\medskip
\bibliography{ref.bib}
\end{document}
test.log
...
Invalid UTF-8 byte or sequence at line 10 replaced by U+FFFD.
Missing character: There is no � in font [lmroman10-regular]:mapping=tex-text;!
...
ref.bib
@article{cebiric_compact_2018,
title = {Compact {Summaries} of {Rich} {Heterogeneous} {Graphs}},
abstract = {Large data graphs with complex and heterogeneous structure, possibly featuring typed data and an ontology encoding the application-domain semantics, are widely used nowadays. The literature provides many solutions for building succinct representations of graphs, called summaries, in particular based on graph quotients through an equivalence relation between graph nodes.},
language = {en},
author = {Čebirić, Šejla and Goasdoué, François and Guzewicz, Pawel and Manolescu, Ioana},
year = {2018},
pages = {44},
}
test.pdf
PS: lmroman10
将不支持的 �
字符显示为空白,而 Times New Roman 显示为方框。若换用 Garamond 等支持字体,则 �
正常显示,和本问题并无直接关系。
参考 bibtex - "Invalid UTF-8 byte sequence" with Springer LNCS bst (splncs04) - TeX - LaTeX Stack Exchange 解决了,可以使用bibtexu
而不是bibtex
。
另外,是\bibliography{ref}
而不是\bibliography{ref.bib}
。
@note286 感谢你提供的链接,但我这里还是没能解决这个问题。
在改动 \bibliography
后:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}
\begin{document}
This document is citing \cite{cebiric_compact_2018}.
\medskip
\bibliography{ref}
\end{document}
latexmkrc
$bibtex = 'bibtexu %O %S'
似乎和 bibtexu
的返回值有关。
更新:将 latexmkrc
内容替换为
$bibtex = 'bibtex %O %S > nul'
之后问题解决。不过该语法似乎仅限 Windows。
你直接四步编译即可。
pdflatex -synctex=-1 main
bibtexu main
pdflatex -synctex=-1 main
pdflatex -synctex=-1 main
如下的由 Zotero 导出的 BibTeX 条目(导出选项为 UTF-8 with BOM)
在参考文献列表中显示为
log 中对应报错信息为
但替换
Š
为{\v{S}}
后能正常显示。