I'm interested in using the standard \cup
, i.e.
and the one given by importing the mathabx
\cup
in the same document.
Does anyone know how to do that?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI'm interested in using the standard \cup
, i.e.
and the one given by importing the mathabx
\cup
in the same document.
Does anyone know how to do that?
\documentclass{article}
\usepackage[T1]{fontenc}
\let\ltxcup\cup
\usepackage{mathabx}
\begin{document}
$\ltxcup \cup$
\end{document}
Unlike @Herbert's solution, this solution does not change any math font. It just add an \abxcup
we defined.
Some of the code is copied from mathabx.sty
:
\documentclass{article}
\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{
<5> <6> <7> <8> <9> <10> gen * matha
<10.95> matha10 <12> <14.4> <17.28> <20.74> <24.88> matha12
}{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}
\DeclareFontSubstitution{U}{matha}{m}{n}
\DeclareMathSymbol{\abxcup}{\mathbin}{matha}{'131}
\begin{document}
$A\cup B \abxcup C$
\end{document}
And this code showed how to get the glyph slot:
\documentclass{article}
\usepackage{fonttable}
\begin{document}
\fonttable{matha10}
\end{document}
\cup
for union and the mathabx\cup
for cup product.\smile
looks better for a cup product, and is different enough from\cup
that the two shouldn't get confused.\smile
is of type\mathrel
whereas\cup
is of type\mathbin
, so, to get correct spacing, you should use something like\newcommand{\cupproduct}{\mathbin{\smile}}
.\smile
is what worked for me, and it's simple, in that the\cup
conflict is completely circumvented rather than resolved.