我在软件包方面遇到了一些麻烦biblatex
。当我尝试编译(使用 pdflatex)时,返回了以下 WARN 消息:
Process started: biber.exe AuxDirectory/"example"
INFO - This is Biber 2.12
INFO - Logfile is 'AuxDirectory/example.blg'
INFO - Reading 'AuxDirectory/example.bcf'
INFO - Found 2 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'example.bib' for section 0
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'example.bib'
INFO - Overriding locale 'pt-BR' defaults 'variable = shifted' with 'variable = non-ignorable'
INFO - Overriding locale 'pt-BR' defaults 'normalization = NFD' with 'normalization = prenormalized'
INFO - Sorting list 'none/global//global/global' of type 'entry' with template 'none' and locale 'pt-BR'
INFO - No sort tailoring available for locale 'pt-BR'
INFO - Writing 'AuxDirectory/example.bbl' with encoding 'latin1'
WARN - The entry 'Adam2009' has characters which cannot be encoded in 'latin1'.
- Recoding problematic characters into macros.
WARN - The entry 'Adam2010' has characters which cannot be encoded in 'latin1'.
- Recoding problematic characters into macros.
INFO - Output to AuxDirectory/example.bbl
INFO - WARNINGS: 2
Process exited normally
我已经为我的 tex 文件使用了以下最少代码:
\documentclass[a4paper,twoside,openright,final]{memoir}%
\usepackage{fouriernc}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lastpage}
\usepackage{indentfirst}
\usepackage[backend=biber,style=numeric-comp,sorting=none,sortlocale=auto,bibencoding=auto,backref=true,date=year]%
{biblatex}
\usepackage{url}
\usepackage[english,brazilian]{babel}
\usepackage{csquotes}
\settrimmedsize{297mm}{210mm}{*}
\setlength{\trimtop}{0pt}
\setlength{\trimedge}{\stockwidth}
\addtolength{\trimedge}{-\paperwidth}
\settypeblocksize{247mm}{160mm}{*}
\setulmargins{3cm}{*}{*}
\setlrmargins{*}{*}{1.5}
\setmarginnotes{17pt}{51pt}{\onelineskip}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\checkandfixthelayout
\frenchspacing
\addbibresource{example.bib}
\makeatother
\begin{document}
\cite{Adam2009}
\cite{Adam2010}
\printbibliography
\end{document}
下面,我还提供了带有有问题的两个参考文献的最小 bib-code。
@Article{Adam2009,
author = {Adam, C. and Klimas, P. and S{\'a}nchez-Guill{\'e}n, J. and Wereszczy{\'n}ski, A.},
title = {Compact baby Skyrmions},
journal = {Physical Review D},
year = {2009},
volume = {\bfseries 80},
issue = {10},
month = {11},
pages = {105013},
doi = {10.1103/PhysRevD.80.105013},
url = {https://link.aps.org/doi/10.1103/PhysRevD.80.105013},
urldate = {2019-01-31},
numpages = {14},
publisher = {American Physical Society},
}
@Article{Adam2010,
author = {Adam, C. and Roma{\'n}czukiewicz, T. and S{\'a}nchez-Guill{\'e}n, J. and Wereszczy{\'n}ski, A.},
title = {Investigation of restricted baby Skyrme models},
journaltitle = {Phys.ical Review D},
year = {2010},
volume = {\bfseries 81},
number = {8},
month = {4},
pages = {085007},
doi = {10.1103/PhysRevD.81.085007},
url = {https://link.aps.org/doi/10.1103/PhysRevD.81.085007},
urldate = {2019-01-31},
numpages = {10},
publisher = {American Physical Society},
}
显然,问题是由于{\'n}
无法用“ ”对字符进行编码而发生latin1
的。我试图更改代码,但没有成功。如果有人知道如何解决这个问题,我将不胜感激。
答案1
此消息仅仅是一个警告,如果您认为采取行动(即使用utf8
而不是latin1
)对您来说不值得,则可以安全地忽略此消息(让我补充一点,我绝对认为使用 UTF-8 编码所有内容是最好的解决方案,但您会有自己的理由)。
出现警告的原因是ń不包含在 Latin-1 中,因此如果您坚持使用 Latin-1,则只能将其导出为 LaTeX 宏组合,而不是真实字符(事实上,Biber 可能比这里需要的更激进一些:它将使用 ASCII 宏写出整个条目,而不仅仅是有问题的字符)。这与字符的输入无关,因为 Biber 在内部将所有内容转换为 UTF-8 以便能够进行排序。它只关心如何将字符写入文件.bbl
以供进一步处理biblatex
。
您可以通过使用选项调用 Biber 来避免警告--output-safechars
,即
biber --output-safechars <filename>
.bbl
这将使所有非 ASCII 字符保留为宏形式,并且不会尝试将任何字符转换为 Latin-1 的非 ASCII 范围。(因此,如果您的条目包含所有 Latin-1 字符,您会看到差异。)
注意
volume = {\bfseries 80},
语义不太好。尝试
volume = {80},
和
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}% volume of a journal
反而。