如何覆盖 LaTeX 模板的字符串常量
我正在使用 europecv LaTeX 类排版我的简历。我实际上不需要遵守欧盟的标准化简历表格,但我喜欢它的总体布局。该课程让我困扰的一件事是它如何设置某些标题,例如
姓氏/名字:Smith,John
我宁愿有
姓名:约翰史密斯
我发现这些英语字符串常量是在一个名为“ecven.def”的文件中定义的,因此:
\def\ecv@infosectionkey{\ecv@utf{Personal information}}
\def\ecv@namekey{\ecv@utf{Surname(s) / First name(s)}}
\def\ecv@addresskey{\ecv@utf{Address(es)}}
\def\ecv@telkey{\ecv@utf{Telephone(s)}}
\def\ecv@mobilekey{\ecv@utf{Mobile}}
我想我可以编辑这个文件来更改它们,但这似乎是错误的方法。我尝试在文档顶部执行此操作:
\renewcommand{\ecv@namekey}{\ecv@utf{Name}}
给出了此错误:
./eurocv.tex:22: LaTeX Error: Missing \begin{document}.
我尝试过此操作:
\def\ecv@namekey{\ecv@utf{Name}}
不会给出错误,但不会更改输出。有什么想法吗?
I'm typesetting my CV using the europecv LaTeX class. I don't actually need to conform to the EU's standardized CV form, but I like the general layout of it. One thing that bothers me about the class is how it sets certain headings, for instance
Surname(s) / First name(s): Smith, John
Where I'd rather have
Name: John Smith
I've found that these string constants for English are defined in a file called "ecven.def" thus:
\def\ecv@infosectionkey{\ecv@utf{Personal information}}
\def\ecv@namekey{\ecv@utf{Surname(s) / First name(s)}}
\def\ecv@addresskey{\ecv@utf{Address(es)}}
\def\ecv@telkey{\ecv@utf{Telephone(s)}}
\def\ecv@mobilekey{\ecv@utf{Mobile}}
I guess I could just edit this file to change them, but that seems like the wrong approach. I tried to do this at the top of my document:
\renewcommand{\ecv@namekey}{\ecv@utf{Name}}
which gives this error:
./eurocv.tex:22: LaTeX Error: Missing \begin{document}.
And I've tried this:
\def\ecv@namekey{\ecv@utf{Name}}
which doesn't give an error, but doesn't change the output. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用 \makeatletter 和 \makeatother 命令来包装您的更改。
You need to use the \makeatletter and \makeatother commands wrapping your changes.