如何讓「Ł」在參考書目(bibtex/natbib)中正確顯示?

如何讓「Ł」在參考書目(bibtex/natbib)中正確顯示?

標題是非常不言自明的,我在下面。當我引用其中包含「Ł」時,該字元就會從參考書目中消失;即“Łukasz”變成“ukasz”。然而,在普通乳膠中,效果很好。

問題建議使用{\L},有效;但是我正在生成我的 *.bib 文件佐特羅,每次重新生成 bib 檔案時手動編輯它會很痛苦(我不能只將特殊字元輸入 Zotero,因為{\L}它會轉義命令)。

我的參考清單中的所有其他特殊字元都有效!

乳膠:

\documentclass[a4paper, oneside, 12pt, openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[super, sort]{natbib}
\DeclareUnicodeCharacter{0141}{\L{}}
\begin{document}
    sometext Ł \cite{sivanesan_nanostructured_2014}
    \bibliographystyle{ieeetr}
    \bibliography{somebib}
\end{document}

書目:

@article{sivanesan_nanostructured_2014,
    title = {Nanostructured silver-gold bimetallic {SERS} substrates for selective identification of bacteria in human blood},
    volume = {139},
    issn = {0003-2654, 1364-5528},
    url = {http://xlink.rsc.org/?DOI=c3an01924a},
    doi = {10.1039/c3an01924a},
    language = {en},
    number = {5},
    urldate = {2017-06-29},
    journal = {The Analyst},
    author = {Sivanesan, Arumugam and Witkowska, Evelin and Adamkiewicz, Witold and Dziewit, Łukasz and Kamińska, Agnieszka and Waluk, Jacek},
    year = {2014},
    pages = {1037},
    annote = {Łukasz},
    file = {c3an01924a.pdf:C\:\\Users\\bluet_000\\AppData\\Roaming\\Zotero\\Zotero\\Profiles\\9p6n5zoc.default\\zotero\\storage\\Q7F4GE2G\\c3an01924a.pdf:application/pdf}
}

答案1

你可以讓 LaTeX 將 bib 檔案複製到 bibtex 友善的版本:

在此輸入影像描述

\documentclass[a4paper, oneside, 12pt, openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[super, sort]{natbib}
\DeclareUnicodeCharacter{0141}{\L{}}

\def\outcodes{%
\catcode`\\=12
\let\protect\string
\def\IeC##1{{##1}}%
}
\newwrite\mybibout
\immediate\openout\mybibout=somebib2.bib
\newread\mybibin
\openin\mybibin=somebib.bib
{
\loop
\ifeof\mybibin
\else
{\outcodes
\read\mybibin to \tmp
\immediate\write\mybibout{\tmp}%
}
\repeat
\immediate\closeout\mybibout
}

\begin{document}
    sometext Ł \cite{sivanesan_nanostructured_2014}
    \bibliographystyle{ieeetr}
    \bibliography{somebib2}
\end{document}

相關內容