如何显示 Unicode 杂项符号块中的三字母组合?

如何显示 Unicode 杂项符号块中的三字母组合?

如何对特殊 Unicode 符号进行编码这里在乳胶中?

在此处输入图片描述

答案1

第一次误解了您的问题,我深表歉意。这是一个模板,它重现了您在 XeLaTeX 中给出的示例。(好吧,我用破折号替换了波浪号。)

\documentclass[varwidth = 10cm, preview]{standalone}
% This document class is appropriate for a TeX.SX MWE.  In a real document,
% you will want to change it.
\usepackage{fontspec}
\usepackage[english]{babel}
\usepackage{newunicodechar}

% Workaround for a bug in Babel 3.22:
\babelprovide[script = CJK, language = {Chinese Simplified}]{chinese-simplified}

% This example uses the Noto font family.  Any OpenType font should work.
\babelfont{rm}[Scale = 1.0, Ligatures = TeX ]{Noto Serif}
\defaultfontfeatures{ Scale = MatchUppercase, Ligatures = TeX }
\babelfont{sf}{Noto Sans}
\babelfont[chinese-simplified]{rm}[Ligatures = Common]{Noto Serif CJK SC}
\babelfont[chinese-simplified]{sf}[Ligatures = Common]{Noto Sans CJK SC}

\newfontfamily\miscsymfont{DejaVu Sans}

\newunicodechar{:}{\foreignlanguage{chinese-simplified}{:}}
\newunicodechar{⚊}{{\miscsymfont\symbol{"268A}}}
\newunicodechar{⚋}{{\miscsymfont\symbol{"268B}}}
\newunicodechar{⚌}{{\miscsymfont\symbol{"268C}}}
\newunicodechar{⚍}{{\miscsymfont\symbol{"268D}}}
\newunicodechar{⚎}{{\miscsymfont\symbol{"268E}}}
\newunicodechar{⚏}{{\miscsymfont\symbol{"268F}}}
\newunicodechar{☰}{{\miscsymfont\symbol{"2630}}}
\newunicodechar{☱}{{\miscsymfont\symbol{"2631}}}
\newunicodechar{☲}{{\miscsymfont\symbol{"2632}}}
\newunicodechar{☳}{{\miscsymfont\symbol{"2633}}}
\newunicodechar{☴}{{\miscsymfont\symbol{"2634}}}
\newunicodechar{☵}{{\miscsymfont\symbol{"2635}}}
\newunicodechar{☶}{{\miscsymfont\symbol{"2636}}}
\newunicodechar{☷}{{\miscsymfont\symbol{"2637}}}
% Also define U+4DC0-U+4DFF.

\begin{document}
\begin{enumerate}
    \item Miscellaneous Symbols (U+2600--U+26FF):
      \begin{itemize}
        \item \foreignlanguage{chinese-simplified}{兩儀:}U+268A--U+268B (⚊ ⚋)
        \item \foreignlanguage{chinese-simplified}{四象:}U+268C--U+268F (⚌ ⚍ ⚎ ⚏)
        \item \foreignlanguage{chinese-simplified}{八卦:}U+2630--U+2637 (☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷)
      \end{itemize}
    \item \foreignlanguage{chinese-simplified}{六爻符號:}
      \begin{itemize}
        \item \foreignlanguage{chinese-simplified}{六十四卦、易經:}U+4DC0--U+4DFF
      \end{itemize}
\end{enumerate}
\end{document}

三字汉字字体样本

您需要从包含三字母符号的字体中加载它们。另一个选项是使用ucharclasses字符类MiscellaneousSymbols,尽管这在 Babel 中效果不佳。

相关内容