从 LaTeX 包加载单个符号
当使用 MnSymbol 包时,pdflatex 会给出两个字体警告:
LaTeX Font Warning: Encoding 'OMS' has changed to 'U' for symbol font
(Font) 'symbols' in the math version 'normal' on input line 120.
LaTeX Font Info: Overwriting symbol font 'symbols' in version 'normal'
(Font) OMS/cmsy/m/n --> U/MnSymbolF/m/n on input line 120.
事实证明,这可能是由于与 AMSSymb 包发生冲突。
由于我只需要包中的几个符号:有没有一种方法可以从包中加载一个符号,而不是全部?
When using the MnSymbol package, pdflatex gives two font warnings:
LaTeX Font Warning: Encoding 'OMS' has changed to 'U' for symbol font
(Font) 'symbols' in the math version 'normal' on input line 120.
LaTeX Font Info: Overwriting symbol font 'symbols' in version 'normal'
(Font) OMS/cmsy/m/n --> U/MnSymbolF/m/n on input line 120.
It turns out that this is probably due to a clash with the AMSSymb package.
Since I need just a few symbols from the package: is there a way to load one symbol from a package, in stead of all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我是这样解决这个问题的:
从综合乳胶符号文档源下载 perl 脚本“makefakeMnSymbol”:
http://mirror.ctan.org/info/symbols/compressive/source/ makefakeMnSymbol
接下来,在命令行执行
chmod +x makefakeMnSymbol
使其可执行。 然后,在选择的 texmf 目录(全局或本地)中运行 Put fakeMnSymbol.sty,然后运行
texhash
如果您现在放入
序言,则现在可以使用任何 MnSymbol,例如
\powerset
加上前缀如\MNSpowerset
非常感谢 Scott Pakin 的这个 hack...以及他的全面的符号指南...
这个 hack 在下标/上标中的符号方面存在问题。 解决方法是查看
fakeMnSymbol.sty
源来查找所需符号的加载字体及其编号。 这是我的序言之一中的示例,其中我使用 MnSymbol 覆盖内置\boxminus
:Here's how I solved this:
Download the perl script "makefakeMnSymbol" from the comprehensive latex symbol document source:
http://mirror.ctan.org/info/symbols/comprehensive/source/makefakeMnSymbol
Next, at command line do
chmod +x makefakeMnSymbol
to make it executable. Then, runPut fakeMnSymbol.sty in a texmf directory of choice (global or local), and run
texhash
If you now put
in your preamble, you can now use any MnSymbol, like
\powerset
by prefixing it like\MNSpowerset
Big thanks to Scott Pakin for this hack... and for his comprehensive symbol guide...
This hack has problems with symbols in subscripts/superscripts. A work-around is to use look at the
fakeMnSymbol.sty
source to find which font the symbol you want was loaded from, along with its number. Here's an example from one of my preambles where I override the built-in\boxminus
with an MnSymbol:这些警告无需担心。 事实上,在下一个 LaTeX 版本中它们将消失(请参阅 原始错误报告)。 然而,没有预计到达时间。
没有。
可以在加载包之前修补 LaTeX 警告消息代码,然后在之后再次恢复它(这是我过去在自己的包中所做的),但作为用户,我只是学会忽略警告。
These warnings are nothing to worry about. In fact, in the next LaTeX release they'll disappear (see the original bug report). No ETA on that, however.
Nope.
Can patch the LaTeX warning message code before loading the package, and then restore it again afterwards (this is what I've done in the past in my own packages), but as a user I'd just learn to ignore the warning.
以下内容可能会有所帮助。 这是我必须添加的代码,以便从 MnSymbol 包中获取 \bigominus 符号。
The following might help. This is the code I had to add in order to get just the \bigominus symbol out of the MnSymbol package.