芝加哥模板 Bib(La)Tex [Biber] 转换为 XeLaTeX 以提供希伯来语支持

芝加哥模板 Bib(La)Tex [Biber] 转换为 XeLaTeX 以提供希伯来语支持

%在 texmaker 中使用 Quickbuild = pdflex->biblatex->pdflatex(x2)->view pdf
%这使得所有 citekeys 连接到 .bib 文件并使 ibid 工作等等

添加一点希伯来语会破坏一切,简单的修复,如更改\usepackage[utf8]{inputenc}utf8x 不起作用,那个破坏了biber

您能重写这个以使用polyglossia和 xelatex 代替吗babel

梅威瑟:

%filename: main.tex
\documentclass[a4paper,hebrew,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
%\usepackage{cjhebrew}
\usepackage[hebrew,english]{babel}
\usepackage{csquotes}

\usepackage[notes,backend=biber]{biblatex-chicago}
\bibliography{sample}

\begin{document}
\title{The Chicago Citation Style with biblatex}
\author{WriteLaTeX}
\maketitle

\section{Demonstration}

laboris nisi ut aliquip ex ea commodo consequat. \autocite{Ful83}
dolor in reprehe\autocite{hello mom, Ful83}
serunt mollit anim id est laborum. \autocite{GMP81}

%\begin{hebrew}עברית\end{hebrew}
%\sethebrewעברית\unsethebrew
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \autocite{GMP81} 

\printbibliography

\end{document}

那个文件主文本借鉴这一点样本自动完成引用键 {Ful83} 和 {GMP81} 并将其替换为作者姓名和书名。我怎样才能在不破坏这个真正有效的芝加哥模板的情况下在正文或脚注中输入希伯来语?

%filename = sample.bib
@conference{Ful83,
   author = "William Fulton",
    title = "Introduction to intersection theory in algebraic geometry",
booktitle = "Regional Conference Series in Mathematics",
   number = 54,
     year = 1983}

@inproceedings{GMP81,
   author = "Mark Goresky and Robert MacPherson",
    title = "On the topology of complex algebraic maps",
booktitle = "Algebraic Geometry Proceedings, La R\'abida,
             Lecture Notes in Mathematics",
   number = 961,
     year = 1981}

答案1

这个问题与 Biblatex 完全无关,我不确定你为什么会认为它与 Biblatex 有关。基本上,cjhebrew它不是为以这种格式输入希伯来语而设计的:它需要音译字符而不是 unicode。此外,hebrew环境不是由cjhebrewbabel选项定义的hebrew

您无法将 Babel 与希伯来语和 XeLaTeX 一起使用,因为babel-hebrew会加载inputenc。(Babel 通常可以很好地与 XeLaTeX/LuaLaTeX 配合使用。)

要切换到 Polyglossia 和 XeLaTeX,您需要如下内容:

\documentclass{article}
\usepackage{polyglossia,fontspec}
\setmainlanguage[variant=british]{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Noto Sans Hebrew}[Script=Hebrew]    

\begin{document}

\section{Demonstration}

\begin{hebrew}
  עברית
\end{hebrew}

\end{document}

请注意多语定义一个hebrew环境。

在上面的代码中,您需要更改Noto Sans Hebrew为可用的合适字体。我的字体配置软件告诉我,那只是适用于希伯来语的字体,所以我使用了它。显然,您可能安装了不同的字体。

希伯来语和英语

完整代码:

\begin{filecontents}{\jobname.bib}
@conference{Ful83,
   author = "William Fulton",
    title = "Introduction to intersection theory in algebraic geometry",
booktitle = "Regional Conference Series in Mathematics",
   number = 54,
     year = 1983}

@inproceedings{GMP81,
   author = "Mark Goresky and Robert MacPherson",
    title = "On the topology of complex algebraic maps",
booktitle = "Algebraic Geometry Proceedings, La R\'abida,
             Lecture Notes in Mathematics",
   number = 961,
     year = 1981}
\end{filecontents}
\documentclass[a4paper,hebrew,british]{article}
\usepackage{geometry,polyglossia,fontspec,csquotes}
\setmainlanguage[variant=british]{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Noto Sans Hebrew}[Script=Hebrew]

\usepackage[notes,backend=biber]{biblatex-chicago}
\bibliography{\jobname}

\begin{document}
\title{The Chicago Citation Style with biblatex}
\author{WriteLaTeX}
\maketitle

\section{Demonstration}

laboris nisi ut aliquip ex ea commodo consequat. \autocite{Ful83}
dolor in reprehe\autocite{hello mom, Ful83}
serunt mollit anim id est laborum. \autocite{GMP81}

\begin{hebrew}
  עברית
\end{hebrew}

adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\autocite{GMP81}

\printbibliography

\end{document}

相关内容