我已经自动创建了(Mendeley - 因此手动编辑将在下次自动创建文件时变得有用)bib 文件,其中包含例如“。不幸的是,那些“”被视为 LaTeX 指令,例如在后面的 i 中添加一个额外的点。
我该怎么做才能让 LaTeX “自动屏蔽”它们或类似的东西?问题本身似乎与 babel 有关 - 但 shorthandoff 并不能解决我的问题 :-(。
测试.tex:
\documentclass[10pt,a4paper]{article}
\usepackage[ngerman,english,german]{babel} % deutschsprachig
\usepackage[utf8]{inputenc} % utf8 encoding
\usepackage[T1]{fontenc} % Schriftkodierung
\usepackage{csquotes}
\usepackage[backend=biber, style=numeric-comp, language=english]{biblatex}
\addbibresource{lit.bib}
\begin{document}
I do cite\cite{Tsuzuki2012}.
\shorthandoff{"}
\printbibliography{}
\end{document}
lit.bib:
Automatically generated by Mendeley Desktop 1.10.3
Any changes to this file will be lost if it is regenerated by Mendeley.
BibTeX export options can be customized via Options -> BibTeX in Mendeley Desktop
@article{Tsuzuki2012,
annote = {in-depth discussion of the interactions},
author = {Tsuzuki, Seiji},
doi = {10.1039/c2pc90003c},
file = {:home/guntram/Dropbox/Uni/Literatur/Mendeley/pdf/Tsuzuki/Annual Reports Section C (Physical Chemistry)/Tsuzuki - 2012 - CH$\pi$ interactions.pdf:pdf},
issn = {0260-1826},
journal = {Annual Reports Section "C" (Physical Chemistry)},
keywords = {CH-pi,Methyl,Phenyl,bonding theory,hbb,review,theory,weak interactions},
language = {en},
mendeley-tags = {CH-pi,Methyl,Phenyl,bonding theory,hbb,review,theory,weak interactions},
month = may,
number = {1},
pages = {69},
publisher = {The Royal Society of Chemistry},
title = {{CH/$\pi$ \" interactions}},
url = {http://pubs.rsc.org/en/content/articlehtml/2012/pc/c2pc90003c},
volume = {108},
year = {2012}
}
问题在于标题中的“”和期刊名称并没有这样出现。
pdflatex 没有任何抱怨,biber 产生:
比伯测试
INFO - This is Biber 1.8
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf'
INFO - Found 1 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'lit.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'lit.bib'
WARN - BibTeX subsystem: /tmp/zhImWwyF7r/lit.bib_7291.utf8, line 6, warning: 172 characters of junk seen at toplevel
INFO - Overriding locale 'de_DE.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting 'entry' list 'nty' keys
INFO - No sort tailoring available for locale 'de_DE.UTF-8'
INFO - Writing 'test.bbl' with encoding 'UTF-8'
INFO - Output to test.bbl
INFO - WARNINGS: 1
有人知道如何在 LaTeX 端改变这种行为吗?
答案1
babel
将通过选项传递给它的最后一种语言作为文档的主要语言。在您的例子中,文档的主要语言是german
(即采用旧规则正字法的德语)。
虽然看起来biblatex
与 一起玩起来不是german
特别好,但与 一起ngerman
一切都很好。
所以你可以加载
\usepackage[german,english,ngerman]{babel}
这构成了ngerman
主要语言(如果您现在写一些东西,建议您遵守新规则,但我想这也是个人品味的问题)。
该问题与 biber 无关,因为该.bbl
文件具有预期的内容(至少当我在我的计算机上运行您的示例时)。