Importing just a single symbol from a font family
There are a lot of packages providing symbols. Often, you get the new commands for additional symbols by simply loading the package by using the \usepackage
command. However, there can be name conflicts in case the other packages already use the same command name. It can result in an error or in silently overwriting the command.
In this recipe, we will see how to choose one or more specific symbols from a package and access them without loading the whole package.
We will choose a binary relation symbol from the mathabx
package. This will be the sign for less or equal. Later, we will import its negation.
Getting ready
In this recipe, we need to take a look at the source code of the symbol package to imitate part of what it does, so prepare yourself:
Locate the file
mathabx.sty
and open it. At the Command Prompt,kpsewhich mathabx.sty
gives you the location. But you can also use your file manager.In
mathabx.sty
, you can see\input mathabx.dcl
. There...