moderncv 和 moderntimeline 中的错误“!非法测量单位(插入 pt)”

moderncv 和 moderntimeline 中的错误“!非法测量单位(插入 pt)”

我正在写一份带有moderncv包裹的简历moderntimeline

上个月一切顺利,但从上周开始,我收到了这个错误:

! Illegal unit of measure (pt inserted).
<to be read again> 
                   \unskip 
l.27 ...ewhere University}{Republic of Negara}{}{}
                                                  {}

错误显示到就业/教育的第一个条目。我正在使用\tlcventry

这是我的 TeX Live 版本:

TeX 3.14159265(TeX Live 2016/Debian)
kpathsea 版本 6.2.2
版权所有 2016 DE Knuth。

使用的包 :geometry,,,。urleurosymmoderntimeline

以下是代码(MWE):

\documentclass[11pt,a4paper,sans]{moderncv}   
\definecolor{darkgreen}{rgb}{0,0.5,0.0}
\moderncvstyle{banking}                
\moderncvcolor{blue}                   
\usepackage[scale=0.8]{geometry}
\firstname{Kisu}
\familyname{Terduba}
\title{Curriculum Vita{\ae}}                          
\address{8888 Kota 16419}{Republic of Negara}    
\mobile{+88~88~8888~8888}                     
\phone{+88~(88)~888~8888}                     
\fax{+88~(88)~888~8888}                       
\email{[email protected]}                      
\homepage{https://about.me/kisu}
\usepackage{url}
\usepackage{eurosym}
\usepackage{moderntimeline}

\begin{document}
\makecvtitle

\tlwidth{0.8ex}
\tltext{\tiny}

\section{Employment}
\tlmaxdates{2007}{2019}
\tlcventry{2010}{0}{Assistant Professor}{Somewhere University}{Republic of Negara}{}{}{}
\tlcventry{2012}{2015}{Assistant Professor}{President University}{Tengah}{}{}{}
\tlcventry{2007}{2010}{Assistant Professor}{The University of Naughty}{Semenanjung Campus}{}{}{}

\section{Education}
\tlmaxdates{1997}{2006}
\tlcventry{2003}{2006}{PhD in Applied Mathematics}{Universiteit Enskede}{Belanda}{}{}
\tlcventry{2001}{2003}{Master of Mathematical Sciences}{Universiteit Tyreso}{Tyreso}{}{}
\tlcventry{1997}{2001}{BS in Mathematics}{Institute of Technology}{Java}{}{}

\end{document}

以下是删除包\listfiles之后得到的。moderntimeline

*File List*
moderncv.cls    2015/07/28 v2.0.0 modern curriculum vitae and letter
document class
size11.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    2016/01/02 v1.6 sample color configuration
pdftex.def    2011/05/27 v0.06d 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    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/05/09 v1.0r Standard LaTeX Graphics (DPC,SPQR)
trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/01/02 v1.10 sample graphics configuration
fancyhdr.sty    
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
moderncvstylebanking.sty    2015/07/28 v2.0.0 modern curriculum vitae
and letter style scheme: banking
tgpagella.sty    2009/09/27 v1.2 TeX Gyre Pagella as default roman family
kvoptions.sty    2016/05/16 v3.12 Key value format for package options   
(HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands 
(HO)
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
moderncvheadiii.sty    2015/07/28 v2.0.0 modern curriculum vitae and 
letter header variant: 3
moderncvbodyiii.sty    2015/07/28 v2.0.0 modern curriculum vitae and 
letter body variant: 3
t1qpl.fd    2009/09/25 v1.2 font definition file for T1/qpl
ufontawesometwo.fd    2016/05/15 Font definitions for U/fontawesometwo.
moderncvcolorblue.sty    2015/07/28 v2.0.0 modern curriculum vitae and 
letter color scheme: blue
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)
eurosym.sty    1998/08/06 v1.1 European currency symbol ``Euro''
hyperref.sty    2016/05/05 v6.83n 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)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty    2016/05/10 v0.21 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/05/16 v1.17 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)
pd1enc.def    2016/05/05 v6.83n Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
puenc.def    2016/05/05 v6.83n Hyperref: PDF Unicode definition (HO)
hpdftex.def    2016/05/05 v6.83n Hyperref driver for pdfTeX
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files  
(HO)
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)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX 
Live
mt-ppl.cfg    2005/11/16 v1.6 microtype config. file: Palatino (RS)
nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
kisu.out
kisu.out
ufontawesomeone.fd    2016/05/15 Font definitions for U/fontawesomeone.
ot1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern   
Roman (RS)
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
***********

答案1

好吧,我稍微重新整理了一下你的代码并进行了编译。

使用以下 MWE,使用当前 MiKTeX 2.9 进行编译 pdflatex

\listfiles
\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[scale=0.8]{geometry}

\usepackage{url}
\usepackage{eurosym}
\usepackage{moderntimeline}

\firstname{Kisu}
\familyname{Terduba}
\title{Curriculum Vita{\ae}}                          
\address{8888 Kota 16419}{Republic of Negara}    
\mobile{+88~88~8888~8888}                     
\phone{+88~(88)~888~8888}                     
\fax{+88~(88)~888~8888}                       
\email{[email protected]}                      
\homepage{https://about.me/kisu}

\definecolor{darkgreen}{rgb}{0,0.5,0.0}


\begin{document}

\makecvtitle

\tlwidth{0.8ex}
\tltext{\tiny}

\section{Employment}
\tlmaxdates{2007}{2019}
\tlcventry{2010}{0}{Assistant Professor}{Somewhere University}{Republic of Negara}{}{}{}
\tlcventry{2012}{2015}{Assistant Professor}{President University}{Tengah}{}{}{}
\tlcventry{2007}{2010}{Assistant Professor}{The University of Naughty}{Semenanjung Campus}{}{}{}

\section{Education}
\tlmaxdates{1997}{2006}
\tlcventry{2003}{2006}{PhD in Applied Mathematics}{Universiteit Enskede}{Belanda}{}{}
\tlcventry{2001}{2003}{Master of Mathematical Sciences}{Universiteit Tyreso}{Tyreso}{}{}
\tlcventry{1997}{2001}{BS in Mathematics}{Institute of Technology}{Java}{}{}

\end{document}

没有任何错误,我在日志文件中得到了以下部分(我从你在评论中提到的行开始):

LaTeX Font Info:    Font shape `T1/lmss/b/n' in size <14.4> not available
(Font)              Font shape `T1/lmss/bx/n' tried instead on input line 34.
LaTeX Font Info:    Font shape `T1/lmss/b/n' in size <10.95> not available
(Font)              Font shape `T1/lmss/bx/n' tried instead on input line 36.
LaTeX Font Info:    Font shape `T1/lmss/m/it' in size <10.95> not available
(Font)              Font shape `T1/lmss/m/sl' tried instead on input line 36.
LaTeX Font Info:    Font shape `T1/lmss/m/it' in size <6> not available
(Font)              Font shape `T1/lmss/m/sl' tried instead on input line 36.
\fullcolorwidth=\dimen256
[1

{C:/Users/Internet/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 46.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 46.
 (325380.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 46.


 *File List*
moderncv.cls    2015/07/28 v2.0.0 modern curriculum vitae and letter document class
  size11.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    
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
moderncvstylebanking.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: banking
tgpagella.sty    2009/09/27 v1.2 TeX Gyre Pagella as default roman family
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
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
moderncvheadiii.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 3
moderncvbodyiii.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 3
   t1qpl.fd    2009/09/25 v1.2 font definition file for T1/qpl
ufontawesometwo.fd    2016/05/22 Font definitions for U/fontawesometwo.
moderncvcolorblue.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: blue
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
 eurosym.sty    1998/08/06 v1.1 European currency symbol ``Euro''
moderntimeline.sty    
    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
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)
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)
  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)
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-ppl.cfg    2005/11/16 v1.6 microtype config. file: Palatino (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)
  325380.out
  325380.out
ufontawesomeone.fd    2016/05/22 Font definitions for U/fontawesomeone.
  ot1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (RS)
  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
 ***********

并获取上面显示的文件列表。

最后,看来您的系统上 Latin Modern 字体系列的安装有问题:

T1/lmss/b/n' in size <14.4> not available
 (Font) Font shape T1/lmss/bx/n' tried instead on input line 26.
 ! Illegal unit of measure (pt inserted).
<to be read again> 
 \unskip 
l.28 ...ewhere University}{Republic of Negara}{}{}
   {}

正如您在我的日志文件中看到的,没有问题......

尝试在没有类选项的情况下编译您的代码sans并报告结果。

可能是您用 来编译latexpdflatex

相关内容