Download one character from LaTeX

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 collision with the AMSSymb package.

Since I need only a few characters from the package: is there a way to load one character from the package, instead of everything?

+4
source share
3 answers

Here is how I solved it:

Download the perl script "makefakeMnSymbol" from the exhaustive latex document source: http://mirror.ctan.org/info/symbols/comprehensive/source/makefakeMnSymbol

Then at the command line, run chmod +x makefakeMnSymbol to make it executable. Then run

 ./makefakeMnSymbol `kpsewhich MnSymbol.sty` > fakeMnSymbol.sty 

Place fakeMnSymbol.sty in your texmf directory (global or local) and run texhash

If you put now

 \usepackage{fakeMnSymbol} 

in your preamble you can now use any MnSymbol, for example \powerset , prefix it as \MNSpowerset

Many thanks to Scott Pakin for this hack ... and for his comprehensive guide to symbols ...


This hack has problems with characters in indexes / superscripts. The fakeMnSymbol.sty is to use the source fakeMnSymbol.sty to find which font you need and its number. Here is an example from one of my preambles where I override the built-in \boxminus using MnSymbol:

 \usepackage[]{fakeMnSymbol} \DeclareSymbolFont{mnsymbolc}{U}{MnSymbolC}{m}{n} \let\boxminus=\undefined \DeclareMathSymbol{\boxminus}{2}{mnsymbolc}{112} 
+2
source

These warnings have nothing to worry about. In fact, they will disappear in the next release of LaTeX (see the original bug report ). However, there is no ETA.

In addition, is there a real possibility that this will affect the layout of the document?

Nope.

Is there any way to prevent this?

You can fix the LaTeX warning message code before downloading the package and then restore it again (this is what I did in the past in my own packages), but as a user, I just learned to ignore the warning.

+2
source

Perhaps this will help. This is the code I had to add in order to get only the \ bigominus character from the MnSymbol package.

\ DeclareFontFamily {U} {MnSymbolF} {}
\ DeclareSymbolFont {mnsymbols} {U} {MnSymbolF} {t} {n}
\ DeclareFontShape {U} {MnSymbolF} {t} {n} {
<-6> MnSymbolF5
<6-7> MnSymbolF6
<7-8> MnSymbolF7
<8-9> MnSymbolF8
<9-10> MnSymbolF9
<10-12> MnSymbolF10
<12-> MnSymbolF12} {}
\ DeclareMathSymbol {\ bigominus} {\ mathop} {mnsymbols} {55}

+1
source

Source: https://habr.com/ru/post/1286402/


All Articles