Latex 中的特殊名称
在我的英语论文乳胶文件中,如何提及以下非英语单词:François、École Fédérale?
谢谢和问候!
In my english thesis latex file, how to mention the following non English words: François, École Fédérale?
Thanks and regards!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
传统的方法是使用重音添加宏:(
也可以编写
Fran\c{}cois
或Fran\c cois
;\c< /code> 宏不使用参数;大括号或空格只是让 LaTeX 看到正确的宏名称的技巧。)
否则,请尝试以下操作:
并使用 UTF-8 编码直接键入重音符号。
字体和连字符存在许多或多或少微妙的问题。
The traditional way is to use the accent-adding macros:
(You can also write
Fran\c{}cois
orFran\c cois
; the\c
macro uses no parameter; the braces or space are just a trick to allow LaTeX to see the proper macro name.)Otherwise, try this:
and type the accents directly, with UTF-8 encoding.
There are a host of more-or-less subtle issues with fonts and hyphenation.
如果您不采用 UTF8 inputenc 路线,但发现自己编写了很多这些名称,我建议为它们定义宏。最简单的,你可以说
but then you need to be sure to use it as such:
\Francois{}
so that any spaces afterwards don't get gobbled.另一方面,以下技术也非常有效(尽管我不能将其归功于发明 - 我最初在 Philip Taylor 在 BachoTeX 2009 的简短演讲中看到它):
定义特殊名称
现在您可以使用例如和 稍后您可以在文本中使用它们,
您可以使您的标签(纯 ASCII 版本)成为您想要的任何内容 - 它们实际上不必与正确重音的名称相关。
EDIT: in response to the issue that misspelled names don't produce errors, you can change the definition of
\find@name
to请注意,
\@latex@warning{...}
可以更改为\@latex@error{...}\@eha
,它会更强烈地抱怨。或者,如果您想假装是(或实际上是)一个包,您可以使用\Package(Warning|Error){}
代替\@latex@( warning|error)
并且它不会再假装是内置的 LaTeX 错误。If you don't go the UTF8 inputenc route, and yet find yourself writing a lot of these names, I'd suggest defining macros for them. At the simplest, you can say
but then you need to be sure to use it as such:
\Francois{}
so that any spaces afterwards don't get gobbled.On the other hand, the following technique works pretty well too (though I can't take credit for inventing it - I saw it originally in a short talk at BachoTeX 2009 by Philip Taylor):
Now you can define special names using, e.g.
and later on you can use them in text with
You can make your tags (the plain ASCII versions) be whatever you want - they don't have to actually be related to the properly accented names.
EDIT: in response to the issue that misspelled names don't produce errors, you can change the definition of
\find@name
toNote that
\@latex@warning{...}
can be changed to\@latex@error{...}\@eha
and it will complain more forcefully. Or if you want to pretend to be (or actually be) a package you can use\Package(Warning|Error){<package name>}
in place of\@latex@(warning|error)
and it won't pretend to be a built-in LaTeX error anymore.