我正在尝试编译二十秒简历但不幸的是我无法正确使用字体。我在 Ubuntu 上按照说明安装了 Texlive这里。一切似乎都运行良好,除了 twenty-seconds-cv 模板中的字体。我正在使用 xelatex 进行编译。
这些是我在日志文件中收到的警告:
LaTeX 警告:您请求的文档类为
../tscv/twentysecondcv', but the document class provides
twentysecondcv'。
我更改了 tex 文件中对包的引用以适合我的目录结构,如下所示:
\documentclass[]{../tscv/twentysecondcv}
不确定这是否已经是一个问题。
然后在日志的末尾我收到这些警告:
T1/ClearSans(0)/m/sc' undefined (Font) using
LaTeX 字体警告:输入行 38 上的字体形状改为 T1/ClearSans(0)/m/n'
。......
(其他情况发生但没有警告)
...
LaTeX 字体警告:T1/ClearSans(0)/m/it' undefined (Font) using
输入行 64 上的字体形状改为 T1/ClearSans(0)/m/n'
。......
(其他情况发生但没有警告)
...
LaTeX 字体警告:某些字体形状不可用,已替换为默认字体。LaTeX
警告:标签可能已更改。重新运行以获取正确的交叉引用
当我运行时locate ClearSans
我得到这个输出:
/usr/local/texlive/2019/texmf-dist/fonts/map/dvips/clearsans/ClearSans.map /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Bold-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-BoldItalic-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Italic-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Light-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Medium-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-MediumItalic-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-Thin-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-ly1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-ly1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-ot1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-t1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-t1.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-ts1--base.tfm /usr/local/texlive/2019/texmf-dist/fonts/tfm/intel/clearsans/ClearSans-lf-ts1.tfm /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-Bold.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-BoldItalic.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-Italic.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-Light.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-Medium.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-MediumItalic.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-Regular.ttf /usr/local/texlive/2019/texmf-dist/fonts/truetype/intel/clearsans/ClearSans-Thin.ttf /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-Bold.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-BoldItalic.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-Italic.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-Light.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-Medium.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-MediumItalic.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-Regular.pfb /usr/local/texlive/2019/texmf-dist/fonts/type1/intel/clearsans/ClearSans-Thin.pfb /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Bold-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Bold-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Bold-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-BoldItalic-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-BoldItalic-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-BoldItalic-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Italic-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Italic-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Italic-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Light-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Light-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Light-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Medium-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Medium-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Medium-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-MediumItalic-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-MediumItalic-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-MediumItalic-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Thin-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Thin-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-Thin-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-lf-ly1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-lf-t1.vf /usr/local/texlive/2019/texmf-dist/fonts/vf/intel/clearsans/ClearSans-lf-ts1.vf /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/ClearSans。sty /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/LY1ClearSans-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/LY1ClearSansLight-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/LY1ClearSansThin-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/OT1ClearSans-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/OT1ClearSansLight-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/OT1ClearSansThin-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/T1ClearSans-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/T1ClearSansLight-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/T1ClearSansThin-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/TS1ClearSans-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/TS1ClearSansLight-LF.fd /usr/local/texlive/2019/texmf-dist/tex/latex/clearsans/TS1ClearSansThin-LF.fd /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/alias/t1fonts/ClearSans-Bold-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/alias/t1fonts/ClearSans-BoldItalic-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Italic-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Light-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Medium-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-MediumItalic-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Thin-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-lf-t1.htfhtf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Medium-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-MediumItalic-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Thin-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-lf-t1.htfhtf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Medium-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-MediumItalic-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-Thin-lf-t1.htf /usr/local/texlive/2019/texmf-dist/tex4ht/ht-fonts/别名/t1fonts/ClearSans-lf-t1.htf
我其实想发布整个日志文件,但它超出了 StackExchange 的字符限制。如果您需要更多信息,请随时询问!
答案1
该文档旨在与 pdfLaTeX 一起使用,而不是与 XeLaTeX 一起使用,因此它fontenc
使用该T1
选项加载。另一方面,TU
如果使用 XeLaTeX,字体会自动检测引擎并使用字体编码准备字体。您可以通过使用 pdfLaTeX 或手动更改回字体编码来解决这个问题TU
:在您的可预处理文件(紧接着\documentclass{...}
)中添加以下行
\usepackage[TU]{fontenc}
然后你就会得到正确的字体。
您可能会注意到您仍然会收到警告
LaTeX 字体警告:
TU/ClearSans(0)/m/sc' undefined (Font) using
输入行 37 上的字体形状为 TU/ClearSans(0)/m/n'。
这是类中的一个错误,您可以忽略它,该sc
字体仅“用于”某些图标,sc
无论如何都会被忽略。
这与示例文档中出现的所有其他警告和编码问题一起,给人的印象是整个模板可能写得不太好,以后会导致很多其他问题。所以我不建议使用它。