我已经成功使用该moderncv
软件包好几年了。几个月前,突然出现了以下错误:
Command \mobilesymbol undefined. \renewcommand*{\mobilesymbol}
Command \phonesymbol undefined. \renewcommand*{\phonesymbol}
Command \faxsymbol undefined. \renewcommand*{\faxsymbol}
Undefined control sequence. \firstname
Missing \begin{document}. \firstname{F
Undefined control sequence. \familyname
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \begin{document}
Undefined control sequence. \makelettertitle
Undefined control sequence. \makelettertitle
Undefined control sequence. \makelettertitle
Undefined control sequence. \makecvtitle
Package graphics Error: Division by 0. \makecvtitle
Undefined control sequence. \makecvtitle
Undefined control sequence. \makecvtitle
以下是 MWE:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{fontspec}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand*{\namefont}{\fontsize{20}{0}\mdseries\upshape}
\firstname{Firstname}
\familyname{Lastname}
\title{Profession}
\phone{+33 (0)x xx xx xx xx}
\email{[email protected]}
\photo[70pt][0.4pt]{pictures/file.jpg}
\begin{document}
\clearpage
\recipient{Recipient}{}
\date{\today}
\opening{Madame, Monsieur,}
\closing{}
\makelettertitle
Blabla...
\makecvtitle
\section{Education}
\cventry{2017--2019}{Master Degree}{University X}{Country X}{}{}
\section{Professional experience}
\cventry{2018}{Job X}{Company X}{Country X}{}{}
\end{document}
从序言中删除fontspec
包,这里是日志文件,但由于太长而不完整:
This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/Arch Linux) (preloaded format=xelatex 2019.7.4) 4 JUL 2019 15:51
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**CV-LM.tex
(./CV-LM.tex
LaTeX2e <2018-12-01>
(./moderncv.cls
Document Class: moderncv 2015/07/28 v2.0.0 modern curriculum vitae and letter d
ocument class
(/usr/share/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count80
)
(/usr/share/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: xetex.def on input line 225.
(/usr/share/texmf-dist/tex/latex/graphics-def/xetex.def
File: xetex.def 2017/06/24 v5.0h Graphics/color driver for xetex
)
(/usr/share/texmf-dist/tex/latex/colortbl/colortbl.sty
Package: colortbl 2018/12/12 v1.0d Color table columns (DPC)
(/usr/share/texmf-dist/tex/latex/tools/array.sty
Package: array 2018/12/30 v2.4k Tabular extension package (FMi)
\col@sep=\dimen102
\ar@mcellbox=\box27
\extrarowheight=\dimen103
\NC@list=\toks14
\extratabsurround=\skip41
\backup@length=\skip42
\ar@cellbox=\box28
)
\everycr=\toks15
\minrowclearance=\skip43
)
\rownum=\count81
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348.
Package xcolor Info: Model `RGB' extended on input line 1364.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371.
)
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package
(/usr/share/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 48.
)
LaTeX Font Info: Try loading font information for T1+lmr on input line 105.
(/usr/share/texmf-dist/tex/latex/lm/t1lmr.fd
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
))
(/usr/share/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info: Overwriting symbol font `letters' in version `normal'
(Font) OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info: Overwriting symbol font `symbols' in version `normal'
(Font) OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal'
(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info: Overwriting symbol font `letters' in version `bold'
(Font) OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info: Overwriting symbol font `symbols' in version `bold'
(Font) OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `bold'
(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `bold'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
)
(/usr/share/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip10
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 99.
)
\Gin@req@height=\dimen104
\Gin@req@width=\dimen105
)
(/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
Package: fancyhdr 2019/01/31 v3.10 Extensive control of page headers and footer
s
\f@nch@headwidth=\skip44
\f@nch@O@elh=\skip45
\f@nch@O@erh=\skip46
\f@nch@O@olh=\skip47
\f@nch@O@orh=\skip48
\f@nch@O@elf=\skip49
\f@nch@O@erf=\skip50
\f@nch@O@olf=\skip51
\f@nch@O@orf=\skip52
) (./tweaklist.sty)
(/usr/share/texmf-dist/tex/latex/tools/calc.sty
Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count82
\calc@Bcount=\count83
\calc@Adimen=\dimen106
\calc@Bdimen=\dimen107
\calc@Askip=\skip53
\calc@Bskip=\skip54
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
\calc@Ccount=\count84
\calc@Cskip=\skip55
)
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2019-04-06 L3 programming layer (loader)
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2019-04-06 L3 programming layer (code)
\c_max_int=\count85
\l_tmpa_int=\count86
\l_tmpb_int=\count87
\g_tmpa_int=\count88
\g_tmpb_int=\count89
\g__kernel_prg_map_int=\count90
\c__ior_term_ior=\count91
\c_log_iow=\count92
\l_iow_line_count_int=\count93
\l__iow_line_target_int=\count94
\l__iow_one_indent_int=\count95
\l__iow_indent_int=\count96
\c_zero_dim=\dimen108
\c_max_dim=\dimen109
\l_tmpa_dim=\dimen110
\l_tmpb_dim=\dimen111
\g_tmpa_dim=\dimen112
\g_tmpb_dim=\dimen113
\c_zero_skip=\skip56
\c_max_skip=\skip57
\l_tmpa_skip=\skip58
\l_tmpb_skip=\skip59
\g_tmpa_skip=\skip60
\g_tmpb_skip=\skip61
\c_zero_muskip=\muskip11
\c_max_muskip=\muskip12
\l_tmpa_muskip=\muskip13
\l_tmpb_muskip=\muskip14
\g_tmpa_muskip=\muskip15
\g_tmpb_muskip=\muskip16
\l_keys_choice_int=\count97
\l__intarray_loop_int=\count98
\c__intarray_sp_dim=\dimen114
\g__intarray_font_int=\count99
\c__fp_leading_shift_int=\count100
\c__fp_middle_shift_int=\count101
\c__fp_trailing_shift_int=\count102
\c__fp_big_leading_shift_int=\count103
\c__fp_big_middle_shift_int=\count104
\c__fp_big_trailing_shift_int=\count105
\c__fp_Bigg_leading_shift_int=\count106
\c__fp_Bigg_middle_shift_int=\count107
\c__fp_Bigg_trailing_shift_int=\count108
\g__fp_array_int=\count109
\l__fp_array_loop_int=\count110
\l__sort_length_int=\count111
\l__sort_min_int=\count112
\l__sort_top_int=\count113
\l__sort_max_int=\count114
\l__sort_true_max_int=\count115
\l__sort_block_int=\count116
\l__sort_begin_int=\count117
\l__sort_end_int=\count118
\l__sort_A_int=\count119
\l__sort_B_int=\count120
\l__sort_C_int=\count121
\l__tl_analysis_normal_int=\count122
\l__tl_analysis_index_int=\count123
\l__tl_analysis_nesting_int=\count124
\l__tl_analysis_type_int=\count125
\l__regex_internal_a_int=\count126
\l__regex_internal_b_int=\count127
\l__regex_internal_c_int=\count128
\l__regex_balance_int=\count129
\l__regex_group_level_int=\count130
\l__regex_mode_int=\count131
\c__regex_cs_in_class_mode_int=\count132
\c__regex_cs_mode_int=\count133
\l__regex_catcodes_int=\count134
\l__regex_default_catcodes_int=\count135
\c__regex_catcode_L_int=\count136
\c__regex_catcode_O_int=\count137
\c__regex_catcode_A_int=\count138
\c__regex_all_catcodes_int=\count139
\l__regex_show_lines_int=\count140
\l__regex_min_state_int=\count141
\l__regex_max_state_int=\count142
\l__regex_left_state_int=\count143
\l__regex_right_state_int=\count144
\l__regex_capturing_group_int=\count145
\l__regex_min_pos_int=\count146
\l__regex_max_pos_int=\count147
\l__regex_curr_pos_int=\count148
\l__regex_start_pos_int=\count149
\l__regex_success_pos_int=\count150
\l__regex_curr_char_int=\count151
\l__regex_curr_catcode_int=\count152
\l__regex_last_char_int=\count153
\l__regex_case_changed_char_int=\count154
\l__regex_curr_state_int=\count155
\l__regex_step_int=\count156
\l__regex_min_active_int=\count157
\l__regex_max_active_int=\count158
\l__regex_replacement_csnames_int=\count159
\l__regex_match_count_int=\count160
\l__regex_min_submatch_int=\count161
\l__regex_submatch_int=\count162
\l__regex_zeroth_submatch_int=\count163
\g__regex_trace_regex_int=\count164
\c_empty_box=\box29
\l_tmpa_box=\box30
\l_tmpb_box=\box31
\g_tmpa_box=\box32
\g_tmpb_box=\box33
\l__box_top_dim=\dimen115
\l__box_bottom_dim=\dimen116
\l__box_left_dim=\dimen117
\l__box_right_dim=\dimen118
\l__box_top_new_dim=\dimen119
\l__box_bottom_new_dim=\dimen120
\l__box_left_new_dim=\dimen121
\l__box_right_new_dim=\dimen122
\l__box_internal_box=\box34
\l__coffin_internal_box=\box35
\l__coffin_internal_dim=\dimen123
\l__coffin_offset_x_dim=\dimen124
\l__coffin_offset_y_dim=\dimen125
\l__coffin_x_dim=\dimen126
\l__coffin_y_dim=\dimen127
\l__coffin_x_prime_dim=\dimen128
\l__coffin_y_prime_dim=\dimen129
\c_empty_coffin=\box36
\l__coffin_aligned_coffin=\box37
\l__coffin_aligned_internal_coffin=\box38
\l_tmpa_coffin=\box39
\l_tmpb_coffin=\box40
\g_tmpa_coffin=\box41
\g_tmpb_coffin=\box42
\l__coffin_bounding_shift_dim=\dimen130
\l__coffin_left_corner_dim=\dimen131
\l__coffin_right_corner_dim=\dimen132
\l__coffin_bottom_corner_dim=\dimen133
\l__coffin_top_corner_dim=\dimen134
\l__coffin_scaled_total_height_dim=\dimen135
\l__coffin_scaled_width_dim=\dimen136
\c__coffin_empty_coffin=\box43
\l__coffin_display_coffin=\box44
\l__coffin_display_coord_coffin=\box45
\l__coffin_display_pole_coffin=\box46
\l__coffin_display_offset_dim=\dimen137
\l__coffin_display_x_dim=\dimen138
\l__coffin_display_y_dim=\dimen139
\g__file_internal_ior=\read1
\l__seq_internal_a_int=\count165
\l__seq_internal_b_int=\count166
\c__deprecation_minus_one=\count167
)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def
File: l3xdvipdfmx.def 2019-04-06 v L3 Experimental driver: xdvipdfmx
\g__driver_image_int=\count168
\g__driver_pdf_object_int=\count169
))
Package: xparse 2019-03-05 L3 Experimental document command parser
\l__xparse_current_arg_int=\count170
\g__xparse_grabber_int=\count171
\l__xparse_m_args_int=\count172
\l__xparse_v_nesting_int=\count173
)
(/usr/share/texmf-dist/tex/latex/microtype/microtype.sty
Package: microtype 2019/02/28 v2.7b Micro-typographical refinements (RS)
\MT@toks=\toks17
\MT@count=\count174
LaTeX Info: Redefining \textls on input line 790.
\MT@outer@kern=\dimen140
LaTeX Info: Redefining \textmicrotypecontext on input line 1336.
\MT@listname@count=\count175
(/usr/share/texmf-dist/tex/latex/microtype/microtype-xetex.def
File: microtype-xetex.def 2019/02/28 v2.7b Definitions specific to xetex (RS)
LaTeX Info: Redefining \lsstyle on input line 258.
)
Package microtype Info: Loading configuration file microtype.cfg.
(/usr/share/texmf-dist/tex/latex/microtype/microtype.cfg
File: microtype.cfg 2019/02/28 v2.7b microtype main configuration file (RS)
))
(/usr/share/texmf-dist/tex/latex/moderncv/moderncvcollection.sty
Package: moderncvcollection 2015/07/28 v2.0.0 moderncv collections
\c@collection@iterator=\count176
)
(./moderncvcompatibility.sty
Package: moderncvcompatibility 2012/10/31 v1.2.0 modern curriculum vitae and le
tter compatibility patches
)
\c@collection@phones@count=\count177
\c@collection@socials@count=\count178
\c@cvcolumnscounter=\count179
\c@cvcolumnsautowidthcounter=\count180
\c@tmpiteratorcounter=\count181
\cvcolumnsdummywidth=\skip62
\cvcolumnswidth=\skip63
\cvcolumnsautowidth=\skip64
\cvcolumnautowidth=\skip65
\bibindent=\skip66
) (./moderncvstyleclassic.sty
Package: moderncvstyleclassic 2012/10/31 v1.2.0 modern curriculum vitae and let
ter style scheme: classic
! LaTeX Error: Command \mobilesymbol undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.41 \renewcommand*{\mobilesymbol}
{\marvosymbol{72}~}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Command \phonesymbol undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.42 \renewcommand*{\phonesymbol}
{\marvosymbol{84}~}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! LaTeX Error: Command \faxsymbol undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.43 \renewcommand*{\faxsymbol}
{\marvosymbol{117}~}
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
\quotewidth=\skip67
\hintscolumnwidth=\skip68
\separatorcolumnwidth=\skip69
\maincolumnwidth=\skip70
\doubleitemmaincolumnwidth=\skip71
\listitemsymbolwidth=\skip72
LaTeX Font Info: Try loading font information for OMS+lmr on input line 78.
(/usr/share/texmf-dist/tex/latex/lm/omslmr.fd
File: omslmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info: Try loading font information for OMS+lmsy on input line 78.
(/usr/share/texmf-dist/tex/latex/lm/omslmsy.fd
File: omslmsy.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info: Font shape `OMS/lmr/m/n' in size <12> not available
(Font) Font shape `OMS/lmsy/m/n' tried instead on input line 78.
\listitemmaincolumnwidth=\skip73
\listdoubleitemmaincolumnwidth=\skip74
\makecvtitlenamewidth=\skip75
\baseletterheight=\skip76
\cvitemwithcommentmainbox=\box47
\cvitemwithcommentmainlength=\skip77
\cvitemwithcommentcommentlength=\skip78
) (./moderncvcolorblue.sty
Package: moderncvcolorblue 2012/10/31 v1.2.0 modern curriculum vitae and letter
color scheme: blue
)
(/usr/share/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2018/04/16 v5.8 Page Geometry
(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
\Gm@cnth=\count182
\Gm@cntv=\count183
\c@Gm@tempcnt=\count184
\Gm@bindingoffset=\dimen141
\Gm@wd@mp=\dimen142
\Gm@odd@mp=\dimen143
\Gm@even@mp=\dimen144
\Gm@layoutwidth=\dimen145
\Gm@layoutheight=\dimen146
\Gm@layouthoffset=\dimen147
\Gm@layoutvoffset=\dimen148
\Gm@dimlist=\toks18
)
(/usr/share/texmf-dist/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count185
\float@exts=\toks19
\float@box=\box48
\@float@everytoks=\toks20
\@floatcapt=\box49
)
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2019/04/03 3.29 The Babel package
(/usr/share/texmf-dist/tex/generic/babel/switch.def
File: switch.def 2019/04/03 3.29 Babel switching mechanism
)
(/usr/share/texmf-dist/tex/generic/babel-french/french.ldf
Language: french 2019/03/30 v3.5e French support from the babel system
(/usr/share/texmf-dist/tex/generic/babel/babel.def
File: babel.def 2019/04/03 3.29 Babel common definitions
\babel@savecnt=\count186
\U@D=\dimen149
(/usr/share/texmf-dist/tex/generic/babel/xebabel.def
(/usr/share/texmf-dist/tex/generic/babel/txtbabel.def))
\bbl@dirlevel=\count187
)
\l@acadian = a dialect from \language\l@french
\FB@nonchar=\count188
Package french.ldf Info: No need for active punctuation characters
(french.ldf) with this version of XeTeX!
(french.ldf) reported on input line 326.
\FB@punctthick=\XeTeXcharclass1
\FB@punctthin=\XeTeXcharclass2
\FB@punctnul=\XeTeXcharclass3
\FB@guilo=\XeTeXcharclass4
\FB@guilf=\XeTeXcharclass5
\FB@guilnul=\XeTeXcharclass6
\FBguill@level=\count189
\FBold@everypar=\toks21
\FB@Mht=\dimen150
LaTeX Info: Redefining \degres on input line 777.
\mc@charclass=\count190
\mc@charfam=\count191
\mc@charslot=\count192
\std@mcc=\count193
\dec@mcc=\count194
\c@FBcaption@count=\count195
\listindentFB=\dimen151
\descindentFB=\dimen152
\labelindentFB=\dimen153
\labelwidthFB=\dimen154
\leftmarginFB=\dimen155
\parindentFFN=\dimen156
\FBfnindent=\dimen157
))
(/usr/share/texmf-dist/tex/latex/carlisle/scalefnt.sty)
(/usr/share/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2018/08/11 v2.0j Standard LaTeX package
(/usr/share/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2018/08/11 v2.0j Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 48.
))
! Undefined control sequence.
l.24 \firstname
{Firstname}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
我已经更新了 TeX Live 和我的发行版 (4.14.130-1-MANJARO x86_64),但无济于事。我已经下载了最新的moderncv.cls
文件。日志的前三个错误指向该moderncvstyleclassic.sty
文件,而其余的错误也指向该.tex
文件。
任何帮助均感激不尽。
更新:删除 moderncvcompatibility.sty
后,许多错误都消失了。重新填充文件夹中的所有文件现代简历解决了 MWE 中剩余的错误。FontAwesome
我的“真实”CV 文件夹(而不是 MWE)中的包中出现的其他问题也得到了解决。
答案1
您的代码中存在几个问题:
你同时使用
\usepackage{fontspec} \usepackage[T1]{fontenc}
它们根本不能一起工作!使用其中之一,但不要同时使用。我建议使用第二个,你的 mwe 中没有显示需要用 XeLaTeX 编译的特殊代码。所以我还建议使用来
pdflatex
编译 cv...您使用的代码
\firstname{Firstname} \familyname{Lastname}
moderncv
向我显示,您的原始代码是在命令未知的旧版本中使用的\name{firstname}{lastname}
。考虑更改您的完整代码以使用新命令。这也意味着进行更改\phone
,您将能够将新信息(例如您的 xing 联系人等)添加到您的简历中...您正在使用的当前版本
moderncv
如日志文件 (moderncv 2015/07/28 v2.0.0
) 中所示,但(./moderncvcompatibility.sty Package: moderncvcompatibility 2012/10/31 v1.2.0 modern curriculum vitae and le tter compatibility patches )
表明你有一个当地的工作目录中的过时版本
moderncvcompatibility 2012/10/31 v1.2.0
。删除它!同样适用于日志文件的这一部分:(./moderncvstyleclassic.sty Package: moderncvstyleclassic 2012/10/31 v1.2.0 modern curriculum vitae and let ter style scheme: classic ! LaTeX Error: Command \mobilesymbol undefined.
它还显示您
moderncvstyleclassic.sty
的工作目录中有一个本地过时的版本:moderncvstyleclassic 2012/10/31 v1.2.0
!删除它以及 1.2 版的所有其他过时文件的本地副本moderncv
!正如您在日志文件中看到的那样(./moderncvcolorblue.sty Package: moderncvcolorblue 2012/10/31 v1.2.0 modern curriculum vitae and letter color scheme: blue )
您的本地文件夹中的包
moderncvcolorblue.sty
也已过时......
使用以下 mwe(已删除fontspec
)
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\usepackage{graphicx}
%\usepackage{float}
%\usepackage{fontspec} % <========================================= ?????
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand*{\namefont}{\fontsize{20}{0}\mdseries\upshape}
\firstname{Firstname}
\familyname{Lastname}
\title{Profession}
\phone{+33 (0)x xx xx xx xx}
\email{[email protected]}
\photo[70pt][0.4pt]{example-image} % <==================================
\begin{document}
\clearpage
\recipient{Recipient}{}
\date{\today}
\opening{Madame, Monsieur,}
\closing{}
\makelettertitle
Blabla...
\clearpage % <==========================================================
\makecvtitle
\section{Education}
\cventry{2017--2019}{Master Degree}{University X}{Country X}{}{}
\section{Professional experience}
\cventry{2018}{Job X}{Company X}{Country X}{}{}
\end{document}
并且编译时pdflatex
没有出现错误消息,我得到以下两个页面(请参阅添加的内容\clearpage
):
和
总结一下问题:
- 安装只有当前版本使用 tex 发行版的命令进入
moderncv
你的系统(使用 MiKteX 时,你必须使用 MiKTeX 控制台,还有管理器Package
,我不知道 TeX Live,抱歉) - 绝不安装/复制旧版本的部分过时版本到您的本地目录中。如果您的系统上
moderncv
已正确安装当前版本,则根本不需要它们。moderncv
- 检查给定的示例以
moderncv
查看可以与当前版本一起使用的新定义的命令moderncv
。