# Conflict between \mathabx and \amssymb

I need to use \ldbrack and \rdbrack symbols from the package \mathabx, but when I use the \mathabx with the \amssymb package (previously installed) it is causing me an issue with symbols: \subseteq, \cap, \cup, etc

\documentclass{book}
\usepackage{amssymb}
\usepackage{mathabx}

\begin{document}

This a example,

$$A\subseteq B=\emptyset A\cap B\cup C$$

$$x + y \ldbrack z \rdbrack$$
\end{document}


The following picture was created using \mathabx and \amssymb.

And the following picture was created using only \amssymb.

Please notice that on imagen 1, \cap, \cup, etc; are different and I require the other ones.

Is there a way to use both packages without mess up my document symbols? Thanks.

• Most likely you can solve your problem using Importing a single symbol from a different font. – Werner Aug 5 '16 at 20:15
• Welcome to TeX.SX! mathabx provides also the symbols in amssymb, but uses its own version. See Importing a single symbol from a different font for adding just a few ones from mathabx. – egreg Aug 5 '16 at 20:17
• if it's only the double brackets you need, those are also available as \llbracket and \rrbracket in the st. mary road font; \usepackage{stmaryrd}. (texdoc stmaryrd for the documentation.) – barbara beeton Aug 5 '16 at 20:44

The mathabx package is not compatible with amssymb; besides, it changes all math symbols.

You can use, instead, stmaryrd.

\documentclass{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{stmaryrd}

\begin{document}

\begin{gather*}
A\subseteq B=\emptyset \\
A\cap B\cup C \\
x + y \llbracket z \rrbracket
\end{gather*}

\end{document}


If you want to import the symbols from mathabx, according to the guidelines in Importing a Single Symbol From a Different Font you can do as follows.

\documentclass{book}
\usepackage{amsmath}
\usepackage{amssymb}

\DeclareFontFamily{U}{matha}{}
\DeclareFontShape{U}{matha}{m}{n}{
<-5.5>    matha5
<5.5-6.5> matha6
<6.5-7.5> matha7
<7.5-8.5> matha8
<8.5-9.5> matha9
<9.5-11>  matha10
<11->     matha12
}{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}
\DeclareFontSubstitution{U}{matha}{m}{n}
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{<-> mathx10}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}

\DeclareMathDelimiter{\ldbrack}{4}{matha}{"76}{mathx}{"30}
\DeclareMathDelimiter{\rdbrack}{5}{matha}{"77}{mathx}{"38}

\begin{document}

\begin{gather*}
A\subseteq B=\emptyset \\
A\cap B\cup C \\
x + y \ldbrack z \rdbrack
\end{gather*}

\end{document}


• Would the cheap \let\oldcup\cup \usepackage{mathabx} \let\cup\oldcup work? – Manuel Aug 5 '16 at 21:32
• @Manuel They're not the only symbols that get changed. And that method won't work. – egreg Aug 5 '16 at 21:39