![嵌套枚举环境的计数器未显示](https://linux22.com/image/334720/%E5%B5%8C%E5%A5%97%E6%9E%9A%E4%B8%BE%E7%8E%AF%E5%A2%83%E7%9A%84%E8%AE%A1%E6%95%B0%E5%99%A8%E6%9C%AA%E6%98%BE%E7%A4%BA.png)
我正在使用两个嵌套enumerate
环境,虽然没有收到任何错误或警告,但第 6 个计数器未显示。这是为什么?我该如何修复?
平均能量损失
\documentclass{article}
\usepackage{unicode-math}
\usepackage[english,greek]{babel}
\usepackage{fontspec}
\setmainfont
[
UprightFont = *,
BoldFont = *Bold,
ItalicFont = *It,
BoldItalicFont = *BoldIt,
Extension = .otf,
Ligatures = TeX,
Mapping = tex-text
]{GFSArtemisia}
\setsansfont
[
Mapping = tex-text
]{GFSArtemisia.otf}
\usepackage{multicol}
\begin{document}
Text
\begin{enumerate}
\item Item 1
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{enumerate}
\end{enumerate}
\end{document}
答案1
babel
您在加载后说得对fontspec
。但是,GSF Artemisia 字体在 U+03DB GREEK SMALL LETTER STIGMA 处没有字形,而在 U+03DA GREEK LETTER STIGMA 处只有大写变体。
幸运的是,U+03DA 处的字形是小写的,因此您可以使用它。
\documentclass{article}
\usepackage{unicode-math}
\usepackage{fontspec}
\usepackage[english,greek]{babel}
\setmainfont[
UprightFont = *,
BoldFont = *Bold,
ItalicFont = *It,
BoldItalicFont = *BoldIt,
Extension = .otf,
]{GFSArtemisia}
\setsansfont[
]{GFSArtemisia.otf}
\let\textstigma\textStigma
\begin{document}
Text
\begin{enumerate}
\item Item 1
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{enumerate}
\end{enumerate}
\end{document}
替代解决方案:对两种柱头变体使用 GFS Didot。
\documentclass{article}
\usepackage{unicode-math}
\usepackage{fontspec}
\usepackage[english,greek]{babel}
\setmainfont[
UprightFont = *,
BoldFont = *Bold,
ItalicFont = *It,
BoldItalicFont = *BoldIt,
Extension = .otf,
]{GFSArtemisia}
\setsansfont[
Extension = .otf,
]{GFSArtemisia}
\newfontfamily{\didot}[
Extension = .otf,
]{GFSDidot}
\DeclareTextCommand{\textStigma}{\LastDeclaredEncoding}{{\didot Ϛ}}
\DeclareTextCommand{\textstigma}{\LastDeclaredEncoding}{{\didot ϛ}}
\begin{document}
Text
\begin{enumerate}
\item Item 1
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{enumerate}
\end{enumerate}
\end{document}
如果您想要用“στ”代替旧字母,您可以按照以下步骤操作。
\documentclass{article}
\usepackage{unicode-math}
\usepackage{fontspec}
\usepackage[english,greek]{babel}
\setmainfont[
UprightFont = *,
BoldFont = *Bold,
ItalicFont = *It,
BoldItalicFont = *BoldIt,
Extension = .otf,
]{GFSArtemisia}
\setsansfont[
Extension = .otf,
]{GFSArtemisia}
\DeclareTextCommand{\textStigma}{\LastDeclaredEncoding}{ΣΤ}
\DeclareTextCommand{\textstigma}{\LastDeclaredEncoding}{στ}
\begin{document}
Text
\begin{enumerate}
\item Item 1
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{enumerate}
\end{enumerate}
\end{document
答案2
unicode-math
应始终在其他字体设置之后加载,这将解决缺少项目编号的问题。
另外,我建议使用polyglossia
而不是babel:
\documentclass{article}
%\usepackage[english,greek]{babel}
\usepackage{polyglossia}
\setdefaultlanguage[variant=modern]{greek}
\setotherlanguage{english}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont
[
UprightFont = *,
BoldFont = *Bold,
ItalicFont = *It,
BoldItalicFont = *BoldIt,
Extension = .otf,
Ligatures = TeX,
Mapping = tex-text
]{GFSArtemisia}
\setsansfont
[
Mapping = tex-text
]{GFSArtemisia.otf}
\usepackage{multicol}
\begin{document}
Text
\begin{enumerate}
\item Item 1
\begin{enumerate}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\item Item 7
\item Item 8
\item Item 9
\item Item 10
\end{enumerate}
\end{enumerate}
\end{document}