使用 biber 和 xelatex 编译时仅缺少一个特定字符

使用 biber 和 xelatex 编译时仅缺少一个特定字符

我无法显示正确的参考列表 - 一个字母就是不显示。我在 Google 上搜索了可能的解决方案,并更新了字体和软件包,但仍然无法解决这个问题。

以下是 MWE 的内容:

\documentclass[12pt,a4paper,oneside]{article}
\usepackage[T1]{fontenc} % Unicode in references
\usepackage[utf8]{inputenc} % Unicode in references
\usepackage[backend=biber, style=chicago-authordate, autocite=inline,bibencoding=utf8, sorting=nyt, language=false, doi=false, url=false, isbn=false, hyperref=true, maxcitenames=2, maxbibnames=100, dashed=false, uniquelist=false, refsegment=chapter, defernumbers=true]{biblatex} 
\bibliography{mylibrary}
\begin{document}
The problem letter \u{g}.
\textcite{javorcik2011migrant}
\printbibliography
\end{document}

mylibrary 文件包含以下内容(该文件保存为 utf-8 编码文件):

@article{javorcik2011migrant,
    Author = {Javorcik, Beata S and {\"O}zden, \c{C}a\u{g}lar and Spatareanu, Mariana and Neagu, Cristina},
    Date-Added = {2016-05-23 20:21:57 +0000},
    Date-Modified = {2016-05-27 19:12:23 +0000},
    Doi = {http://dx.doi.org/10.1016/j.jdeveco.2010.01.012},
    Issn = {0304-3878},
    Journal = {Journal of Development {E}conomics},
    Keywords = {Brain drain},
    Number = {2},
    Pages = {231 - 241},
    Title = {Migrant networks and foreign direct investment},
    Volume = {94},
    Xurl = {http://www.sciencedirect.com/science/article/pii/S0304387810000222},
    Year = {2011},
    Bdsk-Url-1 = {http://dx.doi.org/10.1016/j.jdeveco.2010.01.012}}

这是我在编译文件中看到的内容: 我在输出中看到的内容

请注意,字母 ğ 在文本中显示没有问题,但由于某种原因,它没有出现在参考列表中。这是日志输出:

This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015) (preloaded format=xelatex 2016.5.27)  27 MAY 2016 22:06
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.tex
(/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.tex
LaTeX2e <2016/03/31>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2015/03/17 v1.2c Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15


Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/biblatex.sty
Package: biblatex 2016/03/03 v3.3 programmable bibliographies (PK/JW/AB)

(/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/biblatex_.sty
Package: biblatex_ 2016/03/03 v3.3 programmable bibliographies (biber) (PK/JW/A
B)

(/usr/local/texlive/2015/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count87
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)

(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)

(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)

(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/logreq/logreq.sty
Package: logreq 2010/08/04 v1.0 xml request logger
\lrq@indent=\count88

(/usr/local/texlive/2015/texmf-dist/tex/latex/logreq/logreq.def
File: logreq.def 2010/08/04 v1.0 logreq spec v1.0
))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip10
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
)
\c@tabx@nest=\count89
\c@listtotal=\count90
\c@listcount=\count91
\c@liststart=\count92
\c@liststop=\count93
\c@citecount=\count94
\c@citetotal=\count95
\c@multicitecount=\count96
\c@multicitetotal=\count97
\c@instcount=\count98
\c@maxnames=\count99
\c@minnames=\count100
\c@maxitems=\count101
\c@minitems=\count102
\c@citecounter=\count103
\c@savedcitecounter=\count104
\c@uniquelist=\count105
\c@uniquename=\count106
\c@refsection=\count107
\c@refsegment=\count108
\c@maxextratitle=\count109
\c@maxextratitleyear=\count110
\c@maxextrayear=\count111
\c@maxextraalpha=\count112
\c@abbrvpenalty=\count113
\c@highnamepenalty=\count114
\c@lownamepenalty=\count115
\c@maxparens=\count116
\c@parenlevel=\count117
\blx@tempcnta=\count118
\blx@tempcntb=\count119
\blx@tempcntc=\count120
\blx@maxsection=\count121
\blx@maxsegment@0=\count122
\blx@notetype=\count123
\blx@parenlevel@text=\count124
\blx@parenlevel@foot=\count125
\blx@sectionciteorder@0=\count126
\labelnumberwidth=\skip43
\labelalphawidth=\skip44
\biblabelsep=\skip45
\bibitemsep=\skip46
\bibnamesep=\skip47
\bibinitsep=\skip48
\bibparsep=\skip49
\bibhang=\skip50
\blx@bcfin=\read1
\blx@bcfout=\write3
\c@mincomprange=\count127
\c@maxcomprange=\count128
\c@mincompwidth=\count129
Package biblatex Info: Trying to load biblatex default data model...
Package biblatex Info: ... file 'blx-dm.def' found.

(/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/blx-dm.def)
Package biblatex Info: Trying to load biblatex style data model...
Package biblatex Info: ... file 'chicago-authordate.dbx' not found.
Package biblatex Info: Trying to load biblatex custom data model...
Package biblatex Info: ... file 'biblatex-dm.cfg' not found.
\c@afterword=\count130
\c@savedafterword=\count131
\c@annotator=\count132
\c@savedannotator=\count133
\c@author=\count134
\c@savedauthor=\count135
\c@bookauthor=\count136
\c@savedbookauthor=\count137
\c@commentator=\count138
\c@savedcommentator=\count139
\c@editor=\count140
\c@savededitor=\count141
\c@editora=\count142
\c@savededitora=\count143
\c@editorb=\count144
\c@savededitorb=\count145
\c@editorc=\count146
\c@savededitorc=\count147
\c@foreword=\count148
\c@savedforeword=\count149
\c@holder=\count150
\c@savedholder=\count151
\c@introduction=\count152
\c@savedintroduction=\count153
\c@namea=\count154
\c@savednamea=\count155
\c@nameb=\count156
\c@savednameb=\count157
\c@namec=\count158
\c@savednamec=\count159
\c@translator=\count160
\c@savedtranslator=\count161
\c@shortauthor=\count162
\c@savedshortauthor=\count163
\c@shorteditor=\count164
\c@savedshorteditor=\count165
\c@labelname=\count166
\c@savedlabelname=\count167
\c@institution=\count168
\c@savedinstitution=\count169
\c@lista=\count170
\c@savedlista=\count171
\c@listb=\count172
\c@savedlistb=\count173
\c@listc=\count174
\c@savedlistc=\count175
\c@listd=\count176
\c@savedlistd=\count177
\c@liste=\count178
\c@savedliste=\count179
\c@listf=\count180
\c@savedlistf=\count181
\c@location=\count182
\c@savedlocation=\count183
\c@organization=\count184
\c@savedorganization=\count185
\c@origlocation=\count186
\c@savedoriglocation=\count187
\c@origpublisher=\count188
\c@savedorigpublisher=\count189
\c@publisher=\count190
\c@savedpublisher=\count191
\c@language=\count192
\c@savedlanguage=\count193
\c@pageref=\count194
\c@savedpageref=\count195
\shorthandwidth=\skip51
\shortjournalwidth=\skip52
\shortserieswidth=\skip53
\shorttitlewidth=\skip54
\shortauthorwidth=\skip55
\shorteditorwidth=\skip56
Package biblatex Info: Trying to load compatibility code...
Package biblatex Info: ... file 'blx-compat.def' found.

(/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/blx-compat.def
File: blx-compat.def 2016/03/03 v3.3 biblatex compatibility (PK/JW/AB)
)
Package biblatex Info: Trying to load generic definitions...
Package biblatex Info: ... file 'biblatex_.def' found.

(/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/biblatex_.def
File: biblatex_.def 
\c@textcitecount=\count196
\c@textcitetotal=\count197
\c@textcitemaxnames=\count198
\c@biburlnumpenalty=\count199
\c@biburlucpenalty=\count266
\c@biburllcpenalty=\count267
\c@smartand=\count268
)
Package biblatex Info: Trying to load bibliography style 'chicago-authordate'..
.
Package biblatex Info: ... file 'chicago-authordate.bbx' found.

(/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex-chicago/chicago-authorda
te.bbx
File: chicago-authordate.bbx 2016/03/21 v 2.9a biblatex bibliography style
\lositemsep=\skip57
)
Package biblatex Info: Trying to load citation style 'chicago-authordate'...
Package biblatex Info: ... file 'chicago-authordate.cbx' found.

(/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex-chicago/chicago-authorda
te.cbx
File: chicago-authordate.cbx 2016/03/18 v 2.9a biblatex citation style
Package biblatex Info: Redefining '\cite'.
Package biblatex Info: Redefining '\parencite'.
Package biblatex Info: Redefining '\footcite'.
Package biblatex Info: Redefining '\footcitetext'.
Package biblatex Info: Redefining '\textcite'.
Package biblatex Info: Redefining '\textcites'.
Package biblatex Info: Redefining '\cites'.
Package biblatex Info: Redefining '\parencites'.
Package biblatex Info: Redefining '\footcites'.
Package biblatex Info: Redefining '\footcitetexts'.
)
Package biblatex Info: Trying to load configuration file...
Package biblatex Info: ... file 'biblatex.cfg' found.
 (/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/biblatex.cfg
File: biblatex.cfg 
)

! Package biblatex Error: Language 'false' not supported.

See the biblatex package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11475 \blx@processoptions

Failed to find a matching 'false.lbx' file.


! Package keyval Error: dashed undefined.

See the keyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11475 \blx@processoptions

Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

))
Package biblatex Info: Trying to load language 'english'...
Package biblatex Info: ... file 'english.lbx' found.
 (/usr/local/texlive/2015/texmf-dist/tex/latex/biblatex/lbx/english.lbx
File: english.lbx 2016/03/03 v3.3 biblatex localization (PK/JW/AB)
)

Package biblatex Warning: Missing 'hyperref' package.
(biblatex)                Setting hyperref=false.

\@quotelevel=\count269
\@quotereset=\count270

! Package biblatex Error: \chapter not provided by class.

See the biblatex package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.6 \begin{document}

The document class does not seems to support chapters.

(/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.aux)
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
Package biblatex Info: XeTeX detected.
(biblatex)             Assuming input encoding 'utf8'.
Package biblatex Info: Data encoding 'utf8' specified.
(biblatex)             No need to reencode data.
\openout3 = `test.bcf'.

Package biblatex Info: Trying to load bibliographic data...
Package biblatex Info: ... file 'test.bbl' found.

(/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.bbl)
Package biblatex Info: Reference section=0 on input line 6.
Package biblatex Info: Reference segment=0 on input line 6.
Missing character: There is no ğ in font ecrm1200!

[1

] (/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.aux)
Package logreq Info: Writing requests to 'test.run.xml'.
\openout1 = `test.run.xml'.

 ) 
Here is how much of TeX's memory you used:
 6710 strings out of 493632
 118771 string characters out of 6144722
 555720 words of memory out of 5000000
 10109 multiletter control sequences out of 15000+600000
 6931 words of font info for 19 fonts, out of 8000000 for 9000
 1328 hyphenation exceptions out of 8191
 44i,4n,43p,911b,930s stack positions out of 5000i,500n,10000p,200000b,80000s

Output written on /Users/removed/Dropbox/Thesis/currentdraft/temptexfil
es/test.pdf (1 page).

这是 .blg 文件的内容:

[0] Config.pm:340> INFO - This is Biber 2.4
[0] Config.pm:343> INFO - Logfile is '/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.blg'
[44] biber-darwin:287> INFO - === Fri May 27, 2016, 22:06:51
[59] Biber.pm:347> INFO - Reading '/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.bcf'
[153] Biber.pm:741> INFO - Found 1 citekeys in bib section 0
[163] Biber.pm:3150> INFO - Processing section 0
[202] Biber.pm:3307> INFO - Looking for bibtex format file 'mylibrary.bib' for section 0
[380] bibtex.pm:1124> INFO - Decoding LaTeX character macros into UTF-8
[487] bibtex.pm:985> INFO - Found BibTeX data source '/Users/removed/Library/texmf/bibtex/bib/local/mylibrary.bib'
[583] UCollate.pm:65> INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
[583] UCollate.pm:65> INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
[583] Biber.pm:3027> INFO - Sorting list 'nyt/global' of type 'entry' with scheme 'nyt' and locale 'en-US'
[583] Biber.pm:3031> INFO - No sort tailoring available for locale 'en-US'
[585] bbl.pm:519> INFO - Writing '/Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.bbl' with encoding 'UTF-8'
[585] bbl.pm:615> INFO - Output to /Users/removed/Dropbox/Thesis/currentdraft/temptexfiles/test.bbl

我可以看到许多 Unicode 字符,但就是看不到 ğ。为什么?

我在 OSX El Capitan 上。所有与 TeX 相关的内容都通过 TeXLive 更新。

答案1

与 XeLaTeX 一起使用fontenc是错误的,因为引擎使用基于 Latin-1 的 Unicode 作为最低块,而 T1 与 Latin-1 不一致。

该字形ğ被 T1 覆盖,但它所处的位置无法与 XeTeX 所看到的字形相对应,因为它不在 Latin-1 中。其他字形也有同样的问题;其他在 Latin-1 中的字形在 T1 中的位置不同。

可以使用pdflatex或 loadfontspec代替fontenc。请注意inputenc不会执行任何操作,但最好也将其删除。

\documentclass{article}
\usepackage{fontspec}

\usepackage[<options>]{biblatex}

\addbibresource{mylibrary.bib}

是正确的前导码(添加其余部分)。请注意,\addbibresource建议超过\bibliography.bib扩展需要使用推荐命令)。

答案2

不要将 fontenc 与 xetex 一起使用,你指定的是 T1 编码字体,这是一种非 unicode 编码,只有 256 个字符,而 biber 和 xetex 需要 unicode,因此你会在日志中看到

 Missing character: There is no ğ in font ecrm1200!

ğ 为 U+011f,因此不能出现在仅具有最多 FF 插槽的 T1 编码字体中

相反使用

\usepackage{fontspec}

并删除

\usepackage[T1]{fontenc} % Unicode in references
\usepackage[utf8]{inputenc} % Unicode in references

相关内容