1

I looked up the tutorial on how to Importing a Single Symbol From a Different Font but it's still not clear for me to make changes myself.

In my case I'd like to use mathabx as my main font, but import the default \in, \subset, \supset, \cap, \cup, \land, \lor, \Leftarrow, \Rightarrow, \Leftrightarrow.

How can I do that?

2

You just look in fontmath.ltx, where the standard definitions are made.

Since mathabx doesn't override the standard symbol fonts, they are still available. Just copy the relevant lines.

\documentclass{article}
\usepackage{mathabx}

\DeclareMathSymbol{\in}{\mathrel}{symbols}{"32}
\DeclareMathSymbol{\subset}{\mathrel}{symbols}{"1A}
\DeclareMathSymbol{\supset}{\mathrel}{symbols}{"1B}
\DeclareMathSymbol{\cup}{\mathbin}{symbols}{"5B}
\DeclareMathSymbol{\cap}{\mathbin}{symbols}{"5C}
\DeclareMathSymbol{\wedge}{\mathbin}{symbols}{"5E}
\DeclareMathSymbol{\vee}{\mathbin}{symbols}{"5F}
\DeclareMathSymbol{\land}{\mathbin}{symbols}{"5E}
\DeclareMathSymbol{\lor}{\mathbin}{symbols}{"5F}
\DeclareMathSymbol{\Leftarrow}{\mathrel}{symbols}{"28}
\DeclareMathSymbol{\Rightarrow}{\mathrel}{symbols}{"29}
\DeclareMathSymbol{\Leftrightarrow}{\mathrel}{symbols}{"2C}

\begin{document}

$\in\subset\supset\cup\cap\land\lor\Leftarrow\Rightarrow\Leftrightarrow$

\end{document}

enter image description here

The following would be the output with just mathabx.

enter image description here

1
  • Exactly what I was looking for. Thank you! – antshar Apr 6 at 16:30
2

Instead of importing the symbols from Computer Modern after loading mathabx, you can use \let to define aliases to the corresponding commands before to load the package. This way, you will still be able to use the symbols from Computer Modern with these aliases.

\documentclass{article}
\let\cmin\in
\let\cmsubset\subset
\let\cmsupset\supset
\let\cmcap\cap
\let\cmcup\cup
\let\cmland\land
\let\cmlor\lor
\let\cmLeftarrow\Leftarrow
\let\cmRightarrow\Rightarrow
\let\cmLeftrightarrow\Leftrightarrow
\usepackage{mathabx}
\begin{document}
\( \in\subset\supset\cap\cup\land\lor\Leftarrow\Rightarrow\Leftrightarrow \)

\( \cmin\cmsubset\cmsupset\cmcap\cmcup\cmland\cmlor\cmLeftarrow\cmRightarrow\cmLeftrightarrow \)
\end{document}

If you want, you can of course renew all of these commands so that the usual commands refer to the symbols from Computer Modern rather than those of mathabx.

\documentclass{article}
\let\cmin\in
\let\cmsubset\subset
\let\cmsupset\supset
\let\cmcap\cap
\let\cmcup\cup
\let\cmland\land
\let\cmlor\lor
\let\cmLeftarrow\Leftarrow
\let\cmRightarrow\Rightarrow
\let\cmLeftrightarrow\Leftrightarrow
\usepackage{mathabx}
\let\in\cmin
\let\subset\cmsubset
\let\supset\cmsupset
\let\cap\cmcap
\let\cup\cmcup
\let\land\cmland
\let\lor\cmlor
\let\Leftarrow\cmLeftarrow
\let\Rightarrow\cmRightarrow
\let\Leftrightarrow\cmLeftrightarrow
\begin{document}
\( \in\subset\supset\cap\cup\land\lor\Leftarrow\Rightarrow\Leftrightarrow \)
\end{document}

2
  • But I'd like to use default aliases, without that "cm" prefix. – antshar Apr 5 at 19:04
  • @antshar It is indeed possible, as I remarked in the comment at the end of my answer. I'll edit it to make it more explicit. – Vincent Apr 5 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.