Skip to content

使用unicode字符形式的「en-dash(U+2013)」和「em-dash(U+2014)」的空格问题 #755

@Explorer-cc

Description

@Explorer-cc

已知有如下的三种「连字符」(From TeXbook):

Image

其中:

看来自这里tex-text.map的信息,理论上:

  • 「U+002D U+002D」等价于「U+2013」
  • 「U+002D U+002D U+002D」等价于「U+2014」

但如下例子所示:

% XeLaTeX
\documentclass[border=5pt]{standalone}
\usepackage{xeCJK}
\begin{document}

\begin{tabular}{|*{6}{p{2cm}|}}
\hline
& \texttt{-}(U+002D) & \texttt{--}(U+2013) & \texttt{---}(U+2014) & –(U+2013) & —(U+2014) \\
\hline
无空格 & A-B & A--B & A---B & A–B & A—B \\
\hline
有空格 & A - B & A -- B & A --- B & A – B & A — B \\
\hline
无空格 & 你-好 & 你--好 & 你---好 & 你–好 & 你—好 \\
\hline
有空格 & 你 - 好 & 你 -- 好 & 你 --- 好 & 你 – 好 & 你 — 好 \\
\hline
\end{tabular}
\end{document}

Image

如上图所指,此处的「U+2013」和「U+2014」在处理其后的西文间隔时似乎是不符合预期的(且与-----的行为不一致)?

Maybe related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions