我正在研究 moderncv 并尝试编辑默认的附加文件图标(图钉)以使用回形针,但它返回错误。
这是我的 MWE:
\documentclass[11pt,spanish,a4paper,sans]{moderncv}
\usepackage[utf8]{inputenc}
\usepackage[unicode]{attachfile}
\firstname{Peter} % Your first name
\familyname{Peter Peter} % Your last name
%--------------------------------------------------------------------------
%ATTACHFILE: pdf-generating mode
\RequirePackage{ifpdf}
\ifpdf
\else
\PackageWarningNoLine{attachfile}{%
attachfile works _only_ with pdfLaTeX and LuaLaTeX\MessageBreak
and _only_ in PDF-generating mode. For this run,\MessageBreak
placeholders will be substituted for all\MessageBreak
attachfile commands%
}
\fi
%ATTACHFILE: packages required
\RequirePackage{keyval}
\RequirePackage{calc}
\RequirePackage{color}
%--------------------------------------------------------------------------
\begin{document}
%Recreate Adobe Acrobat’s Paperclip icon
\newcommand{\atfi@acroPaperclip@data}{%
q 0.75 G 0 i 2.5 w 1 J 4 M 1.9619 11.7559 m 1.9619 3.3037
1.9619 2.5059 v 1.9619 1.707 4.0947 1.25 y 7.4141 1.25 l 9.4292
1.8223 9.4292 3.3066 v 9.4292 4.79 9.4292 16.8945 y 9.7852
18.1514 8.481 18.1514 v 7.1768 18.1514 5.1616 18.1514 y 3.8574
17.9209 3.8574 16.8945 v 3.8574 15.8652 3.8574 6.6172 y 4.3325
5.418 5.1025 5.418 v 5.8726 5.418 6.5845 5.418 y 7.6812 5.6455
7.6812 6.4736 v 7.6812 7.3027 7.6812 11.5264 y S 0 G 1.2495
12.4404 m 1.2495 3.9883 1.2495 3.1895 v 1.2495 2.3906 3.3833
1.9326 y 6.7026 1.9326 l 8.7178 2.5068 8.7178 3.9902 v 8.7178
5.4736 8.7178 17.5781 y 9.0732 18.834 7.769 18.834 v 6.4653
18.834 4.4497 18.834 y 3.146 18.6055 3.146 17.5781 v 3.146
16.5498 3.146 7.3018 y 3.6201 6.1016 4.3911 6.1016 v 5.1611
6.1016 5.873 6.1016 y 6.9692 6.3301 6.9692 7.1572 v 6.9692
7.9863 6.9692 12.21 y S \atfi@color@rgb\space RG 1 w
1.2495 12.4404 m 1.2495 3.9883 1.2495 3.1895 v 1.2495 2.3906
3.3833 1.9326 y 6.7026 1.9326 l 8.7178 2.5068 8.7178 3.9902 v
8.7178 5.4736 8.7178 17.5781 y 9.0732 18.834 7.769 18.834 v
6.4653 18.834 4.4497 18.834 y 3.146 18.6055 3.146 17.5781 v
3.146 16.5498 3.146 7.3018 y 3.6201 6.1016 4.3911 6.1016 v
5.1611 6.1016 5.873 6.1016 y 6.9692 6.3301 6.9692 7.1572 v
6.9692 7.9863 6.9692 12.21 y S Q
}
%Draw \atfi@acroPaperclip@data in a box of the appropriate size
\DeclareRobustCommand{\atfi@acroPaperclip}{%
\raisebox{-1.25bp}{\parbox[b][21bp]{12bp}{%
\rule{0pt}{0pt}\pdfliteral{\atfi@acroPaperclip@data}}%
}%
}
错误:
!缺少数字,视为零。a l.55 } 这里应该有一个数字;我0'. (If you can't figure out why I needed to see a number, look up
在 The TeXbook 索引中插入了“奇怪的错误”。)
答案1
我不明白你为什么认为你需要重新创建一些东西,回形针默认是起作用的:
\documentclass[11pt,spanish,a4paper,sans]{moderncv}
\usepackage[utf8]{inputenc}
\usepackage[unicode]{attachfile}
\firstname{Peter} % Your first name
\familyname{Peter Peter} % Your last name
\begin{document}
\attachfile[icon=Paperclip]{article.cls}
article.cls
\end{document}