Note that in braket.sty
there is:
{\catcode`\|=\active
\xdef\set{\protect\expandafter\noexpand\csname set \endcsname}
\expandafter\gdef\csname set \endcsname#1{\mathinner
{\lbrace\,{\mathcode`\|32768\let|\midvert #1}\,\rbrace}}
\xdef\Set{\protect\expandafter\noexpand\csname Set \endcsname}
\expandafter\gdef\csname Set \endcsname#1{\left\{%
\ifx\SavedDoubleVert\relax \let\SavedDoubleVert\|\fi
\:{\let\|\SetDoubleVert
\mathcode`\|32768\let|\SetVert
#1}\:\right\}}
}
\def\midvert{\egroup\mid\bgroup}
\def\SetVert{\@ifnextchar|{\|\@gobble}% turn || into \|
{\egroup\;\mid@vertical\;\bgroup}}
\def\SetDoubleVert{\egroup\;\mid@dblvertical\;\bgroup}
The detail what the code does exactly is not important, however note that \:
and \;
is used in the code. If tipa
redefines these commands, of course there will be problems.
One way is to redefine these macros in braket.sty
.
%! TEX program = pdflatex
\documentclass{amsart}
\usepackage{tipa}
\usepackage{braket}
\makeatletter
{\catcode`\|=\active
\xdef\set{\protect\expandafter\noexpand\csname set \endcsname}
\expandafter\gdef\csname set \endcsname#1{\mathinner
{\lbrace\,{\mathcode`\|32768\let|\midvert #1}\,\rbrace}}
\xdef\Set{\protect\expandafter\noexpand\csname Set \endcsname}
\expandafter\gdef\csname Set \endcsname#1{\left\{%
\ifx\SavedDoubleVert\relax \let\SavedDoubleVert\|\fi
\medspace{\let\|\SetDoubleVert
\mathcode`\|32768\let|\SetVert
#1}\medspace\right\}}
}
\def\midvert{\egroup\mid\bgroup}
\def\SetVert{\@ifnextchar|{\|\@gobble}% turn || into \|
{\egroup\thickspace\mid@vertical\thickspace\bgroup}}
\def\SetDoubleVert{\egroup\thickspace\mid@dblvertical\thickspace\bgroup}
\makeatother
\begin{document}
\[
\Set{x|y}
\]
\end{document}
Another way is to use \tipasafemode
every time you need \Set
, as suggested in tipa
documentation (this is obviously clunky).
%! TEX program = pdflatex
\documentclass{amsart}
\usepackage{tipa}
\usepackage{braket}
\begin{document}
{\tipasafemode
\[
\Set{x|y}
\]
}
\end{document}