Mac编译后章节号不显示
cuge1995 opened this issue · 5 comments
我这边是有章节号的。
问一下是用XeLaTeX编译的吗?
主tex的开头把windows的注释了吗?
可以把相关的错误、截图贴出来
%!TEX program = xelatex
%macOS用户
\documentclass[UTF8, punct,fontset=mac,oneside]{ctexbook}
\usepackage{nsfcysf}
%windows用户
%\documentclass[UTF8, punct,fontset=windows,oneside]{ctexbook}
%\usepackage[windows]{nsfcysf}
Missing character: There is no 3 ("33) in font nullfont!
(./sections/二3正承担.tex
Missing character: There is no x ("78) in font nullfont!
Missing character: There is no x ("78) in font nullfont!
)
Missing character: There is no 4 ("34) in font nullfont!
Missing character: There is no 5 ("35) in font nullfont!
Missing character: There is no 0 ("30) in font nullfont!
Missing character: There is no 0 ("30) in font nullfont!
(./sections/二4已完成.tex
Missing character: There is no x ("78) in font nullfont!
Missing character: There is no x ("78) in font nullfont!
)
Missing character: There is no 1 ("31) in font nullfont!
(./sections/三1同年申请.tex
Missing character: There is no x ("78) in font nullfont!
Missing character: There is no x ("78) in font nullfont!
) [2]
Missing character: There is no 2 ("32) in font nullfont!
(./sections/三2同年不一致.tex)
Missing character: There is no 3 ("33) in font nullfont!
(./sections/三3已有不一致.tex)
Missing character: There is no 4 ("34) in font nullfont!
(./sections/三4其他.tex) [3] (./2022.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)
(see the transcript file for additional information)
Output written on 2022.pdf (3 pages).
Transcript written on 2022.log.
本机缺少一些字体的原因。
可以看看nsfcysf.sty的相关说明,如下:
%设置模版字体
% 默认是macOS系统,使用本机自带字体
\newcommand{\zhYSFkai}{\CJKfamily{MACkai}}
\newcommand{\enYSFkai}{\MACkai}
%
\newcommand{\zhYSFsong}{\CJKfamily{MACsong}}
\newcommand{\enYSFsong}{\MACsong}
% 如果是Windows系统,或者如果你编译中发现缺少字体,可以选择使用./fonts/中的字体
%即在主tex文件中,使用\usepackage[windows]{nsfcysf}
\DeclareOption{windows}{%
\renewcommand{\zhYSFkai}{\CJKfamily{WINkai}}
\renewcommand{\enYSFkai}{\WINkai}%{\WINkai}
%
\renewcommand{\zhYSFsong}{\CJKfamily{WINsong}}
\renewcommand{\enYSFsong}{\WINsong}
}
\ProcessOptions\relax
%查看本机字体的方式
%打开程序“字体册.app”,看看本机都有什么字体,修改成对应的字体名称即可。
简单来说,就是主tex文件的开头,使用\usepackage[windows]{nsfcysf},效果是./fonts/中的字体,而不是本机字体。
我使用的Mac OS呀,不应该本来就有吗?
随着系统版本的更新,本机自带的字体也会变化,这是macOS的一个问题