我有一个简单的乳胶文档,如下所示:
\documentclass{hijiangtao-resume}
\usepackage{zh_CN-Adobefonts_external}
\usepackage{linespacing_fix}
\usepackage{cite}
\begin{document}
\name{蒋强}
\contactInfo{(+86)156666666}{[email protected]}{https://github.com/demo}{}
\section{教育经历}
\datedsubsection{\textbf{中国药科大学},信息管理与信息系统,\textit{本科}}{2009.09 - 2013.06}
\end{document}
当我尝试使用此命令编译文档时:
xelatex demo.tex
这是完整的日志,如下所示:
/app/output/2023/7/92/26/4 # xelatex demo.tex
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./demo.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-05-15>
(/opt/texlive/texmf-local/tex/latex/hijiangtao-resume.cls
Document Class: hijiangtao-resume 2015/05/25 An elegant Résumé class
(/opt/texlive/2023/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/opt/texlive/2023/texmf-dist/tex/latex/base/size11.clo))
(/opt/texlive/2023/texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
(/opt/texlive/2023/texmf-dist/tex/generic/iftex/ifluatex.sty
(/opt/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty))
(/opt/texlive/2023/texmf-dist/tex/generic/iftex/ifxetex.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/fontspec/fontspec.sty
(/opt/texlive/2023/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/opt/texlive/2023/texmf-dist/tex/latex/l3kernel/expl3.sty
(/opt/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-xetex.def)))
(/opt/texlive/2023/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/opt/texlive/2023/texmf-dist/tex/latex/base/fontenc.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/opt/texlive/2023/texmf-dist/tex/latex/realscripts/realscripts.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/metalogo/metalogo.sty
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/graphicx.sty
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty
(/opt/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/opt/texlive/2023/texmf-dist/tex/latex/graphics-def/xetex.def)))))
(/opt/texlive/2023/texmf-dist/tex/latex/xifthen/xifthen.sty
(/opt/texlive/2023/texmf-dist/tex/latex/tools/calc.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/base/ifthen.sty)
(/opt/texlive/2023/texmf-dist/tex/latex/ifmtarg/ifmtarg.sty))
(/opt/texlive/2023/texmf-dist/tex/latex/fontawesome/fontawesome.sty
(/opt/texlive/2023/texmf-dist/tex/latex/fontawesome/fontawesomesymbols-generic.
tex)
kpathsea: Running mktextfm FontAwesome
/opt/texlive/2023/texmf-dist/web2c/mktexnam: Could not map source abbreviation for FontAwesome.
/opt/texlive/2023/texmf-dist/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input FontAwesome
This is METAFONT, Version 2.71828182 (TeX Live 2023) (preloaded base=mf)
kpathsea: Running mktexmf FontAwesome
! I can't find file `FontAwesome'.
<*> ...r; mag:=1; ; nonstopmode; input FontAwesome
Please type another input file name
! Emergency stop.
<*> ...r; mag:=1; ; nonstopmode; input FontAwesome
Transcript written on mfput.log.
grep: FontAwesome.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input FontAwesome' failed to make FontAwesome.tfm.
kpathsea: Appending font creation commands to missfont.log.
! Package fontspec Error: The font "FontAwesome" cannot be found.
For immediate help type H <return>.
...
l.46
?
这是类文件hijiangtao-resume
:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hijiangtao-resume}[2015/05/25 An elegant Résumé class]
\LoadClass[11pt]{article}
% disable indent globally
\setlength{\parindent}{0pt}
% some general improvements, defines the XeTeX logo
\RequirePackage{xltxtra}
% use xifthen
\RequirePackage{xifthen}
% use fontawesome
\RequirePackage{fontawesome}
% use xcolor for customizing color
\RequirePackage[usenames,dvipsnames]{xcolor}
% loading fonts
\RequirePackage{fontspec}
% Main document font
\setmainfont[
Extension = .otf ,
UprightFont = *-regular ,
BoldFont = *-bold ,
ItalicFont = *-italic ,
BoldItalicFont = *-bolditalic
]{texgyretermes}
\RequirePackage[
a4paper,
left=0.7in,
right=0.7in,
top=0.50in,
bottom=0.5in,
nohead
]{geometry}
\RequirePackage{titlesec}
\RequirePackage{enumitem}
\setlist{noitemsep} % removes spacing from items but leaves space around the whole list
%\setlist{nosep} % removes all vertical spacing within and around the list
\setlist[itemize]{topsep=0.25em, leftmargin=1.5pc}
\setlist[enumerate]{topsep=0.25em, leftmargin=1.5pc}
\RequirePackage[super]{nth}
\titleformat{\section} % Customise the \section command
{\Large\scshape\raggedright} % Make the \section headers large (\Large),
% small capitals (\scshape) and left aligned (\raggedright)
{}{0em} % Can be used to give a prefix to all sections, like 'Section ...'
{} % Can be used to insert code before the heading
[\titlerule] % Inserts a horizontal line after the heading
\titlespacing*{\section}{0cm}{*1}{*1}
\titleformat{\subsection}
{\large\raggedright}
{}{0em}
{}
\titlespacing*{\subsection}{0cm}{*1}{*0.5}
\newcommand{\datedsection}[2]{%
\section[#1]{#1 \hfill #2}%
}
\newcommand{\datedsubsection}[2]{%
\subsection[#1]{#1 \hfill #2}%
}
\newcommand{\datedline}[2]{%
{\par #1 \hfill #2 \par}%
}
\newcommand{\name}[1]{
\centerline{\Huge\scshape{#1}}
\vspace{1.2ex}
}
\newcommand{\contactInfo}[4]{
\centerline{\sffamily\large{\ {#1} \textperiodcentered\ \ {#2}}
\ifthenelse{\isempty{#3}}%
{ } % if {#3} is empty
{\textperiodcentered\ \ {#3} } % homepage, no space before \text...
\ifthenelse{\isempty{#4}}%
{ } % if {#3} is empty
{\textperiodcentered\ \ {#4} }
}
\vspace{0.7ex}
}
\newcommand{\role}[2]{
{\par \textit{#1} ~ #2 \par}
\vspace{0.5ex}
}
我已经安装了 fontawesome5 fontawesome 包,为什么仍然显示此错误?我是否遗漏了什么?这是我安装这些包的方法:
tlmgr install fontawesome fontawesome5
顺便说一句,我的构建环境来自kjarosh/latex:2023.1-small
docker 镜像。这是 fontawesome 包文件夹,如下所示:
/opt/texlive/2023/texmf-dist/fonts/opentype/public # pwd
/opt/texlive/2023/texmf-dist/fonts/opentype/public
/opt/texlive/2023/texmf-dist/fonts/opentype/public # ls
fandol fontawesome fontawesome5 fonts-tlwg lm lm-math philokalia
/opt/texlive/2023/texmf-dist/fonts/opentype/public #
我没有使用此命令找到字体:
/app/output/2023/7/92/26/4 # fc-list|grep "FontAwesome"
/app/output/2023/7/92/26/4 #