Biblatex - 数字引用样式在包含多语言参考的阿拉伯语文档中不起作用

Biblatex - 数字引用样式在包含多语言参考的阿拉伯语文档中不起作用

对于显示的 MWE,我正在使用 Lualatex(Babal:默认语言为阿拉伯语)+ Biblatex(引用的数字样式和参考书目样式),我遇到了以下问题:

  • 书目和引用样式设置为数字,但是生成的书目没有提供数字书目。

  • 参考文献编号使用的语言在全文献中并不是统一的,它是根据参考文献文件中的“langid”生成的,我使用“langid”根据参考文献的语言对其进行排序,那么如何选择用于设置参考文献编号的语言呢?

  • 当在同一个“cite”命令中放置大量引用时,例如“cite{ref1,ref2,.....}”,并非所有引用都会生成

  • 有时引用太多,所以为了避免混淆,我将每个引用放在同一个“引用”命令中的单独一行上,在这种情况下引用也无法正确生成。

  • 此外,除了生成带有页码的大量引用之外,我还使用了“cites”命令,但这也不起作用。


\documentclass[a4paper,12pt,twoside]{book}

%==================================================================================================
%CROSS-Referencing
%==================================================================================================

 \usepackage{tocbibind} 
\usepackage[multiple]{footmisc} 
\usepackage{footnoterange} 

\usepackage[%
  hidelinks,
  hyperindex,
  colorlinks=true,
  breaklinks,
  allcolors=blue]{hyperref} 

\usepackage{bookmark}

%======================================================================================================
%Babel Package Settings%
%======================================================================================================

\usepackage{filecontents}


\usepackage[bidi=basic,layout=lists.tabular]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}

\babelfont{rm}{Latin Modern Roman}
\babelfont[arabic]{rm}{Simplified Arabic}
\babelfont[english]{rm}{Times New Roman}

\babelcharproperty{980000}[990000]{direction}{al} 


%=============================================================
%BIBLIOGRAPHY SETTINGS%
%=============================================================
\begin{filecontents}{\jobname.bib}
@book{Sharoni1969,
 author = {ميخائيل، ملاك  and  الشاروني، حبيب},
 year = {1969},
 title = {المرجع فى قواعد اللغة القبطية},
 address = {الاسكندرية},
 publisher = {جمعية مارمينا العجايبي},
 langid = {arabic}
}
@book{Browning1983,
 author = {Browning, Robert},
 year = {1983},
 title = {Medieval and Modern Greek},
 publisher = {Cambridge University Press},
 langid = {english}
}
@book{bob,
 author = {Browning, Robert},
 year = {1983},
 title = {Medieval and Modern Greek},
 publisher = {Cambridge University Press},
 langid = {english}
}
\end{filecontents}

\begin{filecontents}{arabic.lbx}
\ProvidesFile{arabic.lbx}
\InheritBibliographyExtras{english}
\DeclareBibliographyStrings{%
  inherit          = {english},
  and              = {{و}{و}},
  page             = {{صفحة}{صفحة}},
  pages            = {{صفحات}{صفحة}},
  references       = {{مراجع}{مراجع}},
  seenote          = {{انظر الملاحظة}{انظر الملاحظة}},
}
\end{filecontents}

\usepackage{csquotes}
\DeclareQuoteStyle{arabic}
  {\guillemotleft}
  {\guillemotright}
  {\textquotedblright}
  {\textquotedblleft}



\usepackage[%
  language=auto,
  autolang=other,
  citestyle=numeric-comp,
  bibstyle=numeric,
  backend=biber,
  doi=false,
  isbn=false]{biblatex}   
  
\addbibresource{\jobname.bib}

\defbibenvironment{bibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item\leavevmode}% add \leavevmode to align English bibliography items RTL

% Always use Arabic digits for see note.
\usepackage{xpatch}
\xpatchbibmacro{footcite:note}
  {\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}
  {\foreignlanguage{arabic}{\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
  {}
  {}

% Just to test if quotes work
\DeclareFieldFormat{title}{\mkbibquote{\mkbibemph{#1}}}

\usepackage{footnote} % For footcite to work in talbes and captions fgures
\makesavenoteenv{figure}
\makesavenoteenv{table}

%So as to have commas between consecutive \footcite command, declare after bibaltex package so as to see the command
\usepackage{fnpct}
\AdaptNoteOpt\footcite\multfootcite
\setfnpct{punct-after=true,mult-fn-sep =،} 

%==================================================
%Start actual document %
%===================================================
\begin{document}

\begin{otherlanguage}{english}
All citations appear correctly upon using a cite command on each citation
\cite{Browning1983}
\cite{Sharoni1969}
\cite{bob}
\newline
Citation numbering appear according to the "langid" in reference definition, how to unify output language to a chosen language??
\newline
English numbering \cite{Browning1983}
\newline
Arabic numbering \cite{Sharoni1969}
\newline
English numbering \cite{bob}
\newline
Issue displaying the second reference upon putting each citation on a separate line
\cite
{
Browning1983,
Sharoni1969
}
\newline
Issue displaying the second reference in the same "cite" command
\cite{Browning1983,Sharoni1969}
\\
Issue using the cites command
\cites[30]{bob};[40]{bob};[60]{Sharoni1969};{Browning1983}

\newline

Issue using citec command on more than one line for clarity of coding
\cites
[30]{bob};
[40]{bob};
[60]{Sharoni1969};
{Browning1983}


\end{otherlanguage}

\printbibliography

\end{document}
 


``````````````````````````````````````````````

[![enter image description here][1]][1]

[![enter image description here][2]][2]


  [1]: https://i.stack.imgur.com/KOyoI.jpg
  [2]: https://i.stack.imgur.com/56NlM.jpg

答案1

  1. \defbibenvironment{bibliography}
      {\list
         {}
         {\setlength{\leftmargin}{\bibhang}%
          \setlength{\itemindent}{-\leftmargin}%
          \setlength{\itemsep}{\bibitemsep}%
          \setlength{\parsep}{\bibparsep}}}
      {\endlist}
      {\item\leavevmode}% add \leavevmode to align English bibliography items RTL
    

    您正在定义不使用数字标签的参考书目环境。这看起来像是一个适用于style=authoryear或 的定义style=authortitle,但不适用于style=numeric。对于您想要采用的数字样式

    \defbibenvironment{bibliography}
      {\list
         {\printtext[labelnumberwidth]{%
            \printfield{labelprefix}%
            \printfield{labelnumber}}}
         {\setlength{\labelwidth}{\labelnumberwidth}%
          \setlength{\leftmargin}{\labelwidth}%
          \setlength{\labelsep}{\biblabelsep}%
          \addtolength{\leftmargin}{\labelsep}%
          \setlength{\itemsep}{\bibitemsep}%
          \setlength{\parsep}{\bibparsep}}%
          \renewcommand*{\makelabel}[1]{\hss##1}}
      {\endlist}
      {\item}
    

    作为基础,所以也许

    \defbibenvironment{bibliography}
      {\list
         {\printtext[labelnumberwidth]{%
            \printfield{labelprefix}%
            \printfield{labelnumber}}}
         {\setlength{\labelwidth}{\labelnumberwidth}%
          \setlength{\leftmargin}{\labelwidth}%
          \setlength{\labelsep}{\biblabelsep}%
          \addtolength{\leftmargin}{\labelsep}%
          \setlength{\itemsep}{\bibitemsep}%
          \setlength{\parsep}{\bibparsep}}%
          \renewcommand*{\makelabel}[1]{\hss##1}}
      {\endlist}
      {\item\leavevmode}
    

    作品。

  2. 选项biblatexlanguage=auto,切换参考书目条目根据 进行引用langid。如果您删除language=auto,(从而返回到默认的language=autobib,),则只有参考书目条目会根据 进行更改langid。引用将使用周围的语言设置。

  3. 我在 MWE 中没有看到这个问题。

  4. biblatex将引用读取为逗号分隔的列表。列表项开头(即逗号后)的空格会被删除,但列表项结尾(即逗号前)的空格不会被删除。这意味着当您说

    \cite
    {
    Browning1983,
    Sharoni1969
    }
    

    biblatex查找名为Browning1983(找到)和Sharoni1969(末尾有空格,未找到)的引文。您可以使用

    \cite
    {
    Browning1983,
    Sharoni1969%
    }
    

    来避开隐含的空间,但我真的不推荐这样做。我建议使用稍微紧凑一点的输入,例如

    \cite{Browning1983,
    Sharoni1969}
    

    这肯定会起作用。

  5. 多重引用命令的正确语法如下\cites如下不是引用之间使用分号。

    \cites[30]{bob};[40]{bob};[60]{Sharoni1969};{Browning1983}
    

    应该

    \cites[30]{bob}[40]{bob}[60]{Sharoni1969}{Browning1983}
    

    相似地,

    \cites
    [30]{bob};
    [40]{bob};
    [60]{Sharoni1969};
    {Browning1983}
    

    应该

    \cites
    [30]{bob}
    [40]{bob}
    [60]{Sharoni1969}
    {Browning1983}
    

相关内容