Closed nanmu42 closed 8 years ago
我看了一下,从Web of Science上下载的BibTeX文件的doi字段基本上是双括号的。
关于DOI 的处理,我沿用了 natbib 的处理方式,没有任何修改。
可能:
"\expandafter\ifx\csname urlstyle\endcsname\relax"
write$ newline$
" \providecommand{\doi}[1]{DOI: #1}\else"
write$ newline$
" \providecommand{\doi}{DOI: \begingroup \urlstyle{rm}\Url}\fi"
write$ newline$
引号里的是直接输出到bbl 文件,它定义了 \doi
的行为,你可以改成符合你需要的。
我做了一些功课,这个似乎是两个阵营之间的标准大战,有用户也遇到过类似的问题,用户是永远的受害者。(Sad)
从Web of Science导出的数据应该或多或少都有这个问题,使用JabRef,全选后使用Entry Cleanup
功能能够解决。
用 bibtool 等工具应该也可以清理
On May 15, 2016, at 2:09 PM, Nanmu42 notifications@github.com wrote:
我做了一些功课,这个似乎是两个阵营之间的标准大战,有用户也遇到过类似的问题 http://tex.stackexchange.com/questions/67780/how-to-tell-latex-to-automatically-remove-envelopping-curly-braces-in-a-string-t,用户是永远的受害者。(Sad) 从Web of Science导出的数据应该或多或少都有这个问题,使用JabRef,全选后使用Entry Cleanup功能能够解决。
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/ustctug/gbt-7714-2015/issues/9#issuecomment-219268505
嗯嗯,大家都很苦恼:
According to our software development engineers, we need to keep these double braces within the BibTex export syntax, a full explanation of which is provided below.
The outer braces are simply quote marks. In other words, in BibTeX this: title = {Getting cold feet}
means exactly the same as this:
title = "Getting cold feet"
The additional inner braces prevent BibTeX from adjusting the capitalization of the letters within them. They are used in many common cases where the choice of placement directly affects the output of data, as illustrated below with this made-up example article title: "AIDS in Sub-Saharan Africa"
Here are some examples of capitalization schemes that BibTeX might be asked to apply:
AIDS in Sub-Saharan Africa (same as above - with only short prepositions and some other special words in lower case) AIDS in sub-Saharan Africa (all but proper nouns and acronyms in lower case, reputedly common usage in Europe) AIDS In Sub-Saharan Africa (all words capitalized - a possible default to cover difficult cases) AIDS IN SUB-SAHARAN AFRICA (all letters capitalized - some notable journals do require this) The inner braces are used to mark letters and words whose capitalization is significant, like this:
title = {{AIDS} in sub-{S}aharan {A}frica}
If we simply omit the inner braces, the styles 2 and 3 above, one or both of which are reputedly very common in European usage, may be interpreted as something like this:
Aids in sub-saharan africa Aids In Sub-saharan Africa Web of Science output would not be able to place the inner braces automatically, consistently, and correctly on the basis of the databases that we use and in a manner that would satisfy everyone. Therefore our current implementation forces BibTeX to present the only capitalization that we know is more-or-less correct, which is the exact capitalization of the data that is actually present within the databases. For the above example, it means we output the data like this (hence the reason for the double braces):
title = {{AIDS in sub-Saharan Africa}}
A researcher who needs a different capitalization could perhaps inspect the capitalization that we provide, or possibly the item to which it refers, and then make an informed judgment about where they feel the inner braces actually belong. In our example already displayed above, the inner braces might be considered to belong in the following locations:
title = {{AIDS} in sub-{S}aharan {A}frica}
问题叙述
你好。
在使用
gbt-7714-2015-numerical.bst
的时候我发现列出的参考文献的DOI部分有时会被{ }
括起来,有时不会。我看了一下国标,应该是始终都没有这个花括号的。问题重现
我检查了一下两项的DOI字段,分别是:
doi = {10.1016/j.electacta.2012.12.121},
和doi = {{10.1016/j.electacta.2006.05.054}},
解决方案
我并不会撰写bst文件,但我想这里应该是一个小瑕疵。bst文件应该可以更新一下,从而具有处理单层花括号和双层花括号包裹的DOI的能力。
谢谢。