我正在用法语编写文档,XeLaTeX
并用它biblatex
来管理包含其他语言的参考资料。当我需要更改某些字段的语言设置时,我通常会手动将文本封装在包otherlanguage
提供的环境中babel
。我最近发现了这一点,biblatex-ms
并biber-ms
提供了一种使用注释和mslang
标签的方法(请参阅https://github.com/plk/biblatex/issues/895)。但是,我无法让它工作。考虑这个 MWE:
\documentclass[a4paper,12pt]{article}
\usepackage{fontspec}
\usepackage[english, french]{babel}
\usepackage{csquotes}
\begin{filecontents}[force]{\jobname.bib}
@article{Coles59a,
author = {Coles, John M.},
date = {1959/1960},
doi = {10.9750/psas.093.16.134},
journal = {\begin{otherlanguage}{english}Proceedings of the Society of Antiquaries of Scotland\end{otherlanguage}},
pages = {16-134},
title = {\begin{otherlanguage}{english}Scottish Late Bronze Age Metalwork: Typology, Distribution and Chronology\end{otherlanguage}},
volume = {93}}
}
@article{Coles59b,
author = {Coles, John M.},
date = {1959/1960},
doi = {10.9750/psas.093.16.134},
journal = {Proceedings of the Society of Antiquaries of Scotland},
journal+an:mslang = {=en},
pages = {16-134},
title = {Scottish Late Bronze Age Metalwork: Typology, Distribution and Chronology},
title+an:mslang = {=en},
volume = {93}}
}
\end{filecontents}
\usepackage[style=authoryear, autofieldlang=other, dashed=false]{biblatex-ms}
\addbibresource{./\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
输出为:
第二篇参考文献的标题按照法国规则处理,在“Metalwork”后添加了一个额外的不间断空格。如何使用biblatex-ms
注释系统避免这种情况?
我正在使用biblatex-ms
4.0biber-ms
和最新的 Tex Live 2024 发行版。
.bbl
生成的文件如下biber-ms
所示:
\refsection{0}
\datalist[entry]{nyt/global//global/global}
\entry{Coles59a}{article}{}
\name[default][fr-fr]{author}{1}{}{%
{{un=0,uniquepart=base,hash=c4358b6a0351f56cc2935f5f1b4a4b37}{%
family={Coles},
familyi={C\bibinitperiod},
given={John\bibnamedelima M.},
giveni={J\bibinitperiod\bibinitdelim M\bibinitperiod},
givenun=0}}%
}
\namepartms{author}{1}{%
familydefaultfr-fr={Coles},
familydefaultfr-fri={C\bibinitperiod},
givendefaultfr-fr={John\bibnamedelima M.},
givendefaultfr-fri={J\bibinitperiod\bibinitdelim M\bibinitperiod}
}
\strng{namehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{fullhash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{bibnamehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{authordefaultfr-frbibnamehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{authordefaultfr-frnamehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{authordefaultfr-frfullhash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\field{extraname}{1}
\field{sortinit}{C}
\strng{sortinithash}{4d103a86280481745c9c897c925753c0}
\field{extradate}{1}
\field{extradatescope}{labelyear}
\field{labeldatesource}{}
\fieldmssource{labelname}{author}{default}{fr-fr}
\fieldmssource{labeltitle}{title}{default}{fr-fr}
\field{endyear}{1960}
\field[default][fr-fr]{journaltitle}{\begin{otherlanguage}{english}Proceedings of the Society of Antiquaries of Scotland\end{otherlanguage}}
\field[default][fr-fr]{title}{\begin{otherlanguage}{english}Scottish Late Bronze Age Metalwork: Typology, Distribution and Chronology\end{otherlanguage}}
\field{volume}{93}
\field{year}{1959}
\field{enddateera}{ce}
\field{dateera}{ce}
\true{nocite}
\field{pages}{16\bibrangedash 134}
\range{pages}{119}
\verb{doi}
\verb 10.9750/psas.093.16.134
\endverb
\endentry
\entry{Coles59b}{article}{}
\name[default][fr-fr]{author}{1}{}{%
{{un=0,uniquepart=base,hash=c4358b6a0351f56cc2935f5f1b4a4b37}{%
family={Coles},
familyi={C\bibinitperiod},
given={John\bibnamedelima M.},
giveni={J\bibinitperiod\bibinitdelim M\bibinitperiod},
givenun=0}}%
}
\namepartms{author}{1}{%
familydefaultfr-fr={Coles},
familydefaultfr-fri={C\bibinitperiod},
givendefaultfr-fr={John\bibnamedelima M.},
givendefaultfr-fri={J\bibinitperiod\bibinitdelim M\bibinitperiod}
}
\strng{namehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{fullhash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{bibnamehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{authordefaultfr-frbibnamehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{authordefaultfr-frnamehash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\strng{authordefaultfr-frfullhash}{c4358b6a0351f56cc2935f5f1b4a4b37}
\field{extraname}{2}
\field{sortinit}{C}
\strng{sortinithash}{4d103a86280481745c9c897c925753c0}
\field{extradate}{2}
\field{extradatescope}{labelyear}
\field{labeldatesource}{}
\fieldmssource{labelname}{author}{default}{fr-fr}
\fieldmssource{labeltitle}{title}{default}{fr-fr}
\field{endyear}{1960}
\field[default][fr-fr]{journaltitle}{Proceedings of the Society of Antiquaries of Scotland}
\field[default][fr-fr]{title}{Scottish Late Bronze Age Metalwork: Typology, Distribution and Chronology}
\field{volume}{93}
\field{year}{1959}
\field{enddateera}{ce}
\field{dateera}{ce}
\true{nocite}
\field{pages}{16\bibrangedash 134}
\range{pages}{119}
\verb{doi}
\verb 10.9750/psas.093.16.134
\endverb
\annotation[default][fr-fr]{field}{journaltitle}{mslang}{}{}{0}{en}
\annotation[default][fr-fr]{field}{title}{mslang}{}{}{0}{en}
\endentry
\enddatalist
\endrefsection
\msforms{default}
\msentrylangs{fr-fr}
\mslangs{fr-fr}
\endinput