![为什么在将语言传递给我的文档类和/或明确传递给 biblatex 时,我的 biblatex 语言没有改变?](https://linux22.com/image/404384/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%E5%B0%86%E8%AF%AD%E8%A8%80%E4%BC%A0%E9%80%92%E7%BB%99%E6%88%91%E7%9A%84%E6%96%87%E6%A1%A3%E7%B1%BB%E5%92%8C%2F%E6%88%96%E6%98%8E%E7%A1%AE%E4%BC%A0%E9%80%92%E7%BB%99%20biblatex%20%E6%97%B6%EF%BC%8C%E6%88%91%E7%9A%84%20biblatex%20%E8%AF%AD%E8%A8%80%E6%B2%A1%E6%9C%89%E6%94%B9%E5%8F%98%EF%BC%9F.png)
如果我创建以下文档,其语言设置为brazil
:
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{koma-scrguien,
author = {Markus Kohm},
edition = {2017-04-13},
howpublished = {\url{http://mirrors.ibiblio.org/CTAN/.../scrguien.pdf}},
publisher = {Online Material; \url{https://www.ctan.org/pkg/koma-script}},
title = {The Guide KOMA -Script},
urlaccessdate = {2017-08-28},
year = {2017},
}
\end{filecontents*}
% \PassOptionsToPackage{brazil,main=english,spanish,french}{babel}
\documentclass[12pt,a4paper,english]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\selectlanguage{english}
\usepackage[
style=abnt,repeatfields=true,backend=biber,backref=true,language=english]{biblatex}
\pdfstringdefDisableCommands{\let\uppercase\relax}
\addbibresource{\jobname.bib}
\begin{document}
Citing \cite{koma-scrguien}. \printbibliography
\end{document}
然而,其语言应该设置为,english
因为:
- 在我的
\documentclass
,我通过english
作为最后一类选项 - 我
english
选择biblatex
\usagepackage
将文档语言设置为英语的唯一方法是取消注释该行\PassOptionsToPackage{brazil,main=english,spanish,french}{babel}
english
为什么通过将语言作为最后一个选项传递给文档,文档语言没有更改为英语\documentclass
?
答案1
我刚刚放进\selectlanguage{english}
去\begin{document}
,它就起作用了。
\documentclass[english]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{koma-scrguien,
author = {Markus Kohm},
edition = {2017-04-13},
howpublished = {\url{http://mirrors.ibiblio.org/CTAN/.../scrguien.pdf}},
publisher = {Online Material; \url{https://www.ctan.org/pkg/koma-script}},
title = {The Guide KOMA -Script},
urlaccessdate = {2017-08-28},
year = {2017},
}
\end{filecontents*}
\usepackage[
style=abnt,repeatfields=true,backend=biber,backref=true,language=english]{biblatex}
%\pdfstringdefDisableCommands{\let\uppercase\relax}
\addbibresource{\jobname.bib}
\begin{document}
\selectlanguage{english}
Citing \cite{koma-scrguien}. \printbibliography
\end{document}