# Background

1. It occupies the same width as two ideographic characters.
2. It aligns with the vertical center of the ideographic em‑box.

In LaTeX, the Western em dash is easily accessed by typing three consecutive ASCII hyphens --- (three U+002D’s). In XeLaTeX and LuaLaTeX, the most common way of accessing the Chinese em dash is to type two consecutive “Western em dashes” —— (two U+2014’s, this is done in most Chinese input method editors).

Due to historical reasons, the Western em dash and the half of the Chinese em dash share the same unicode U+2014, but their lengths and vertical positions are usually different. The team behind Source Han Sans and Source Han Serif resolves this issue in the design phase (e.g., this discussion on GitHub). With the OpenType feature fwid, one is able to obtain the full-width U+2015 output by just typing U+2014.

# Problem

According to Will Robertson’s response in this discussion, the OpenType feature ccmp is supposed to be enabled by default. This means that two U+2014’s should be able to join as one U+2E3A (two‑em dash), while three U+2014’s should be able to join as one U+2E3B (three‑em dash).

Update: However, the ccmp instructions seem to be ignored when using either Source Han Sans or Source Han Serif. I’ll demonstrate the problem using Source Han Serif. Note that the ctexart class loads fontspec and xeCJK.

% !TeX program = XeLaTeX
\documentclass[fontset=none]{ctexart}
\setmainfont[Scale=1.1]{TeX Gyre Termes}% Scale=729/662
\setmonofont[Scale=MatchLowercase]{Latin Modern Mono}
\setCJKmainfont[
RawFeature=+ccmp,% This appears to have no effect
RawFeature=+fwid,
]{SourceHanSerifSC-Regular.otf}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\noindent
\begin{tabular}{l >{\ttfamily}l l l}
\toprule
\midrule
1 hyphen          & 1 U+002D  & 英-连字符 & TeX Gyre Termes \\
2 hyphens         & 2 U+002Ds & 英--连接号 & TeX Gyre Termes \\
3 hyphens         & 3 U+002Ds & 英---破折号 & TeX Gyre Termes \\
\multicolumn{4}{c}{%
\begin{minipage}[t]{0.9\textwidth}
\footnotesize
As expected, two \texttt{U+002D}'s produce an en dash (\texttt{U+2013}),
while three an em dash (\texttt{U+2014}),
all in TeX Gyre Termes.\par
\end{minipage}} \\
\cmidrule{1-4}
1 em dash         & 1 U+2014  & 中—半破折号 & Source Han Serif \\
hspace of 1 ccwd  & N/A       & 中\hspace{\ccwd}半破折号 & \texttt{N/A} \\
2 em dashes       & 2 U+2014s & 中——破折号\ ? & Source Han Serif \\
1 two-em dash     & 1 U+2E3A  & 中⸺破折号 & Source Han Serif \\
hspace of 2 ccwds & N/A       & 中\hspace{2\ccwd}破折号 & \texttt{N/A} \\
3 em dashes       & 3 U+2014s & 中———符号\ ? & Source Han Serif \\
1 three-em dash   & 1 U+2E3B  & 中⸻符号\ ? & \texttt{N/A} \\
hspace of 3 ccwds & N/A       & 中\hspace{3\ccwd}符号 & \texttt{N/A} \\
\multicolumn{4}{c}{%
\begin{minipage}[t]{0.9\textwidth}
\footnotesize
Under the \texttt{fwid} feature, a~\texttt{U+2014} will be rendered as a~\texttt{U+2015}.
However, two~\texttt{U+2014}'s fail to join as a~\texttt{U+2E3A},
while three~\texttt{U+2014}'s fail to join as a~\texttt{U+2E3B}.
Furthermore, the symbol~\texttt{U+2E3B} cannot be rendered.\par
\end{minipage}} \\
\bottomrule
\end{tabular}
\end{document}


This test shows that the U+2014’s cannot be composed to produce the desired single glyph. The first two ? spots: The contents are shorter in widths, and you can actually see the joint between the separate U+2014’s. Furthermore, the symbol U+2E3B simply does not show up (the third ? spot).

Update: If one commented out the line RawFeature=+fwid,, then a single input of U+2014 or U+2E3A will produce an em dash or two‑em dash, respectively, in Source Han Serif pwid (Western punctuation). But the aforementioned problems remain: Two U+2014’s cannot become U+2E3A; Three U+2014’s cannot become U+2E3B; And U+2E3B cannot be rendered.

I’m fine with getting TeX Gyre Termes’ hyphen, en dash and em dash via -, -- and --- (all in ASCII hyphens U+002D). My goal is to get Source Han’s em dash, two‑em dash and three‑em dash via —, —— and ——— (all in U+2014, full-width or proportional-width depending on fwid or pwid).

Are there any workarounds?

Related post: How do I type a Chinese dash in XeLaTex