引號(引號) xelatex + polyglossia + csquotes

引號(引號) xelatex + polyglossia + csquotes

我遇到的問題是“" 在引用/引用外語文本時顯示而不是適當的引號(符號)。我搜尋了諸如polyglossia或 之類的軟體包的手冊csquotes

不幸的是,我還沒有找到允許我為我打算在文件中使用的語言聲明引號(符號)的命令。

在純文本中,我當然可以使用,,''來模仿 的行為,enquote但書目條目 ale 也受到這種令人不快的現象的影響:(

% !TEX TS-program = arara
% !TEX encoding = UTF-8 Unicode

% arara: xelatex: { shell: true }
% arara: biber
% arara: xelatex: { shell: true }

\documentclass[12pt]{article}

\usepackage[no-math]{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\newfontfamily\greekfont[Script=Greek,Scale=MatchUppercase]{Linux Libertine O}
\newfontfamily\cyrillicfont[Script=Cyrillic,Scale=MatchUppercase]{Linux Libertine O}

\usepackage{polyglossia}
\setdefaultlanguage{polish}
\setotherlanguages{english,latin,greek,russian,german}

\usepackage[strict=false,autostyle=true,english=american,german=guillemets]{csquotes}

\PassOptionsToPackage{%
        natbib=true,
        style=authoryear-comp,
        hyperref=true,
        backend=biber,
        maxbibnames=99,
        firstinits=true,
        uniquename=init,
        maxcitenames=1,
        citetracker=true,
        parentracker=true,
        backref=true,
        backrefstyle=two,
            }   {biblatex}
\usepackage{biblatex}

\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
@article{Author2014,
    author      = {Joe, Smith},
    title       = {Publication title in polish language},
    journal     = {Journal of Journals},
    pages       = {1},
    year        = {2014},
    month       = {March}
    }
\end{filecontents}

\addbibresource{bibliography.bib}

\begin{document}

    \noindent{}{\enquote{\languagename{} \today}}\\
    \textenglish{\enquote{\languagename{} \today}}\\
    \textgerman{\enquote{\languagename{} \today}}\\
    \textlatin{\enquote{\languagename{} \today}}\\
    \textgreek[variant=ancient]{\enquote{\languagename{} \today}}\\
    \textrussian{\enquote{\languagename{} \today}}\\
    \textpolish{\enquote{\languagename{} \today}}\\
    \cite{Author2014}

    \printbibliography

\end{document}

在此輸入影像描述

答案1

問題是csquotes不知道波蘭語和拉丁語,正如您在日誌檔案中看到的那樣。

Package csquotes Warning: No style for language 'polish'.

因此,您必須告訴csquotes您希望在波蘭文本中看到哪種引號。

你可能會發出

\DeclareQuoteStyle{polish}% I looked it up on Wikipedia, no idea if it's right
  {\quotedblbase}
  {\textquotedblright}
  [0.05em]
  {\textquoteleft}
  {\textquoteright}

\DeclareQuoteStyle{latin}% this is just a copy of the German definition
  {\quotedblbase}
  {\textquotedblleft}
  [0.05em]
  {\quotesinglbase}
  {\fixligatures\textquoteleft}

在序言中。

一般來說,你必須\DeclareQuoteStyle對每種語言都有一個csquotes不認識的。支援的語言清單位於csquotes.def(您可以使用 找到該檔案kpsewhich csquotes.def)。您可以在那裡找到其他定義進行比較。

該指令的語法如下(參見csquotes文件,特別是。 §8.1定義報價樣式)。

\DeclareQuoteStyle[variant]{styl}[outer init][inner init]%
  {opening outer mark}
  [middle outer mark]
  {closing outer mark}
  [kern]
  {opening inner mark}
  [middle inner mark]
  {closing inner mark}

如果您知道如何設定您的語言的引號,csquotes而該套件目前不支援您的語言,您可能需要考慮建議維護者將其包含在內https://github.com/josephwright/csquotes/issues

在此輸入影像描述

相關內容