![Font Awesome 图标未出现在 ModernCV 中](https://linux22.com/image/345616/Font%20Awesome%20%E5%9B%BE%E6%A0%87%E6%9C%AA%E5%87%BA%E7%8E%B0%E5%9C%A8%20ModernCV%20%E4%B8%AD.png)
我正在尝试使用 Font Awesome 图标编写我的 ModernCV 简历。
这是我正在尝试编译的 LaTeX:
\documentclass[10pt,sans,letterpaper]{moderncv}
\usepackage[margin=0.5in]{geometry}
\moderncvstyle{classic}
\moderncvcolor{orange}
\moderncvicons{awesome} % this should force font-awesome icons
\name{First}{Last}
\title{Title Here}
\email{[email protected]}
\homepage{example.com}
\social[linkedin]{LinkedIn}
\social[github]{GitHub}
\begin{document}
\makecvtitle
\end{document}
当我使用 Arch Linux 时,一切都按预期工作;出现的图标是 Font Awesome 图标。但是,当我使用 Ubuntu 12.04 时,文档编译(没有错误),但图标似乎回退到 MarVoSym 集。这似乎也发生在 Ubuntu 16.04 中,我不确定为什么会发生这种情况。
以下是我用来设置 LaTeX 环境的命令:
sudo add-apt-repository ppa:texlive-backports/ppa -y
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty main"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe"
sudo apt-get update
sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra
mkdir -p ~/texmf/tex/latex/
wget https://launchpad.net/moderncv/trunk/1.5.1/+download/moderncv-1.5.1.zip
unzip moderncv-1.5.1.zip
mv moderncv/ ~/texmf/tex/latex/
mktexlsr
我还可以验证 Font Awesome 是否已安装,因为它可以正确编译和显示:
\documentclass{moderncv}
\usepackage{fontawesome}
\name{First}{Last}
\begin{document}
\faLinkedin
\end{document}
最后,我用来编译的命令是pdflatex <filename>
。
编辑:
我检查了日志输出并发现了以下有问题的行:
WARNING: to use the awesome icon set, please use XeTeX or LuaTeX to compile you
r document; switching to the marvosym icon set.
) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX
编辑2:
我把它放在\listfiles
文件顶部并运行了pdflatex
三次。这是我获得的文件列表:
*File List*
moderncv.cls 2013/04/29 v1.5.1 modern curriculum vitae and letter document c
lass
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
etoolbox.sty 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
ifthen.sty 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
lmodern.sty 2009/10/30 v1.6 Latin Modern Fonts
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
graphics.sty 2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
fancyhdr.sty
tweaklist.sty
calc.sty 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
xparse.sty 2016/01/19 v6377 L3 Experimental document command parser
expl3.sty 2016/01/19 v6377 L3 programming layer (loader)
expl3-code.tex 2016/01/19 v6377 L3 programming layer
l3pdfmode.def 2015/11/11 v6250 L3 Experimental driver: PDF mode
microtype.sty 2013/05/23 v2.5a Micro-typographical refinements (RS)
microtype-pdftex.def 2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg 2013/05/23 v2.5a microtype main configuration file (RS)
moderncvcollection.sty 2013/04/29 v1.5.1 moderncv collections
moderncvcompatibility.sty 2013/04/29 v1.5.1 modern curriculum vitae and lett
er compatibility patches
geometry.sty 2010/09/12 v5.6 Page Geometry
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
moderncvstyleclassic.sty 2013/04/29 v1.5.1 modern curriculum vitae and lette
r style scheme: classic
moderncviconsmarvosym.sty 2013/04/29 v1.5.1 modern curriculum vitae and lett
er icons: marvosym
tikz.sty 2015/08/07 v3.0.1a (rcs-revision 1.151)
pgf.sty 2015/08/07 v3.0.1a (rcs-revision 1.15)
pgfrcs.sty 2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v3.0.1a (rcs-revision 1.7)
pgfsys.sty 2014/07/09 v3.0.1a (rcs-revision 1.48)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v3.0.1a (rcs-revision 1.1)
pgffor.sty 2013/12/13 v3.0.1a (rcs-revision 1.25)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
umvs.fd
moderncvcolororange.sty 2013/04/29 v1.5.1 modern curriculum vitae and letter
color scheme: orange
moderncviconsawesome.sty 2013/04/29 v1.5.1 modern curriculum vitae and lette
r icons: awesome
hyperref.sty 2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
hobsub.sty 2012/05/28 v1.13 Construct package bundles (HO)
intcalc.sty 2007/09/27 v1.1 Expandable calculations with integers (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2012/04/08 v1.3 Expandable calculations on big integers (HO)
bitset.sty 2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty 2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
hopatch.sty 2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty 2011/01/30 xcolor patch
atveryend.sty 2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty 2011/10/16 v3.4 Data extraction from label references (HO)
hycolor.sty 2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
auxhook.sty 2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
puenc.def 2012/11/06 v6.83m Hyperref: PDF Unicode definition (HO)
hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
supp-pdf.mkii
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Manage graphics extensions (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
mt-cmr.cfg 2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
t1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
nameref.sty 2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
DentonLiuResume.out
DentonLiuResume.out
ot1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
omllmm.fd 2009/10/30 v1.6 Font defs for Latin Modern
omslmsy.fd 2009/10/30 v1.6 Font defs for Latin Modern
omxlmex.fd 2009/10/30 v1.6 Font defs for Latin Modern
mt-mvs.cfg 2006/07/05 v1.1 microtype config. file: Marvosym Euro (RS)
***********
答案1
使用我当前的 MiKTeX,我获得了以下软件包和版本号列表:
*File List*
moderncv.cls 2015/07/28 v2.0.0 modern curriculum vitae and letter document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
etoolbox.sty 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW)
ifthen.sty 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
xcolor.sty 2016/05/11 v2.12 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
pdftex.def 2016/07/10 v0.06j Graphics/color for pdfTeX
infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO)
ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
colortbl.sty 2012/02/13 v1.0a Color table columns (DPC)
array.sty 2014/10/28 v2.4c Tabular extension package (FMi)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO)
fontenc.sty
t1enc.def 2016/06/19 v1.99m Standard LaTeX file
lmodern.sty 2009/10/30 v1.6 Latin Modern Fonts
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
graphics.sty 2016/07/10 v1.0t Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
fancyhdr.sty 2016/09/06 3.8 Extensive control of page headers and footers
tweaklist.sty
calc.sty 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
xparse.sty 2016/05/18 v6512 L3 Experimental document command parser
expl3.sty 2016/05/18 v6512 L3 programming layer (loader)
expl3-code.tex 2016/05/18 v6512 L3 programming layer
l3pdfmode.def 2016/03/26 v6465 L3 Experimental driver: PDF mode
microtype.sty 2016/05/14 v2.6a Micro-typographical refinements (RS)
microtype-pdftex.def 2016/05/14 v2.6a Definitions specific to pdftex (RS)
microtype.cfg 2016/05/14 v2.6a microtype main configuration file (RS)
moderncvcollection.sty 2015/07/28 v2.0.0 moderncv collections
moderncvcompatibility.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter compatibility patches
geometry.sty 2010/09/12 v5.6 Page Geometry
ifpdf.sty 2016/05/14 v3.1 Provides the ifpdf switch
ifvtex.sty 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
geometry.cfg
moderncvstyleclassic.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: classic
moderncviconsmarvosym.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter icons: marvosym
tikz.sty 2015/08/07 v3.0.1a (rcs-revision 1.151)
pgf.sty 2015/08/07 v3.0.1a (rcs-revision 1.15)
pgfrcs.sty 2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty 2001/05/15 v3.00 EveryShipout Package (MS)
pgfrcs.code.tex
pgfcore.sty 2010/04/11 v3.0.1a (rcs-revision 1.7)
pgfsys.sty 2014/07/09 v3.0.1a (rcs-revision 1.48)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2013/09/09 (rcs-revision 1.9)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v3.0.1a (rcs-revision 1.1)
pgffor.sty 2013/12/13 v3.0.1a (rcs-revision 1.25)
pgfkeys.sty
pgfkeys.code.tex
pgfmath.sty
pgfmath.code.tex
pgffor.code.tex
tikz.code.tex
moderncvheadi.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 1
moderncvbodyi.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 1
umvs.fd
moderncvcolororange.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: orange
moderncviconsawesome.sty 2015/07/28 v2.0.0 modern curriculum vitae and letter icons: awesome
fontawesome.sty 2016/05/15 v4.6.3.1 font awesome icons
fontawesomesymbols-generic.tex
fontawesomesymbols-pdftex.tex
hyperref.sty 2016/06/24 v6.83q Hypertext links for LaTeX
hobsub-hyperref.sty 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
hobsub.sty 2016/05/16 v1.14 Construct package bundles (HO)
intcalc.sty 2016/05/16 v1.2 Expandable calculations with integers (HO)
etexcmds.sty 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty 2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty 2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2016/05/16 v1.4 Expandable calculations on big integers (HO)
bitset.sty 2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty 2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty 2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
hopatch.sty 2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty 2016/05/16 xcolor patch
atveryend.sty 2016/05/16 v1.9 Hooks at the very end of document (HO)
atbegshi.sty 2016/06/09 v1.18 At begin shipout hook (HO)
refcount.sty 2016/05/16 v3.5 Data extraction from label references (HO)
hycolor.sty 2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
auxhook.sty 2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty 2016/05/16 v3.12 Key value format for package options (HO)
pd1enc.def 2016/06/24 v6.83q Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
puenc.def 2016/06/24 v6.83q Hyperref: PDF Unicode definition (HO)
hpdftex.def 2016/06/24 v6.83q Hyperref driver for pdfTeX
rerunfilecheck.sty 2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
supp-pdf.mkii
epstopdf-base.sty 2016/05/15 v2.6 Base part for package epstopdf
grfext.sty 2016/05/16 v1.2 Manage graphics extensions (HO)
mt-cmr.cfg 2013/05/19 v2.2 microtype config. file: Computer Modern Roman (RS)
t1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
nameref.sty 2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty 2016/05/16 v1.5 Cleanup title references (HO)
342789.out
342789.out
ot1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
omllmm.fd 2009/10/30 v1.6 Font defs for Latin Modern
omslmsy.fd 2009/10/30 v1.6 Font defs for Latin Modern
omxlmex.fd 2009/10/30 v1.6 Font defs for Latin Modern
ufontawesometwo.fd 2016/05/22 Font definitions for U/fontawesometwo.
***********
正如您所见,它与您的有很多不同。
请更新您的系统。然后应该能够像在我当前的系统上一样fontawesome
运行......pdflatex
请注意,当前版本moderncv
是 2.0,而不是 1.5.1。据我所知,fontawesome 有问题。因此,请更新您的完整 TeX 发行版。由于moderncv
版本 2 中有一些更改,您可能会收到一些警告,但这最终没有问题...