liantze / AltaCV

Yet another alternative curriculum vitae/résumé class with LaTeX
Other
1.32k stars 338 forks source link

Add documentation for compiling with XeLaTeX #80

Closed logological closed 3 years ago

logological commented 3 years ago

The README.md file claims that CVs produced with AltaCV can be compiled with XeLaTeX, though doing so is not trivial. Simply running xelatex results in an unhelpful error message:

$ xelatex sample
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./sample.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18> (./altacv.cls
Document Class: altacv 2021/04/12 AltaCV v1.4, yet another alternative class fo
r a resume/curriculum vitae.
(/opt/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/opt/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/2021/texmf-dist/tex/latex/pdfx/pdfx.sty
(/opt/texlive/2021/texmf-dist/tex/generic/iftex/iftex.sty)
(/opt/texlive/2021/texmf-dist/tex/generic/iftex/ifpdf.sty)
(/opt/texlive/2021/texmf-dist/tex/generic/iftex/ifxetex.sty)
(/opt/texlive/2021/texmf-dist/tex/latex/base/everyshi-ltx.sty)
(/opt/texlive/2021/texmf-dist/tex/generic/iftex/ifluatex.sty)
(/opt/texlive/2021/texmf-dist/tex/latex/pdfx/l8u-penc.def)

LaTeX Warning: File `creationdate.lua' already exists on the system.
               Not generating it from this source.

! Package pdfx Error: CreationDate is not properly supported;
 PDF validation may fail..

See the pdfx package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.1285 ...put-driver="xdvipdfmx -z 0" <filename> }

?

This error message arises because the pdfx package loaded by altacv.cls is incompatible with how XeLaTeX processes files by default. One possible workaround would be to run xelatex as follows, per the pdfx documentation:

xelatex -shell-escape -output-driver="xdvipdfmx -z 0" sample.tex

If this is the way you intend for people to compile AltaCV documents, then it would be helpful if a note to this effect were added to the AltaCV documentation.