Using stix2 with amsart and not running out of math alphabets

I generally typeset my documents using lualatex or xelatex but many math journals seem to default to pdflatex and I'd like to use the stix2 package to use those nice fonts. Unfortunately, I also need to use mathrsfs to get a seperate script font (under unicode-math for lua/xe latex I just use the alternate stylistic set but haven't seen any way to do this with stix2 under pdflatex) and when I combine this with a brush script (defined with \DeclareMathAlphabet{\mathbrush}{T1}{pbsi}{xl}{n}) as well as the fix to corner quotes that makes them look nice stolen from another answer on this site I run out of math alphabets. Is there a way to fix this without just giving up on the nicer corner quotes?

I've provided a minimal example illustrating the problem below:


% \documentclass[leqno]{amsart}
\documentclass{amsart}

\usepackage[lcgreekalpha]{stix2}
\usepackage{mathrsfs}
\DeclareMathAlphabet{\mathbrush}{T1}{pbsi}{xl}{n}

\makeatletter

% \usepackage{rec-thy}
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareSymbolFont{MnLargeSymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{MnLargeSymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
<-6>  MnSymbolE5
<6-7>  MnSymbolE6
<7-8>  MnSymbolE7
<8-9>  MnSymbolE8
<9-10> MnSymbolE9
<10-12> MnSymbolE10
<12->   MnSymbolE12
}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
<-6>  MnSymbolE-Bold5
<6-7>  MnSymbolE-Bold6
<7-8>  MnSymbolE-Bold7
<8-9>  MnSymbolE-Bold8
<9-10> MnSymbolE-Bold9
<10-12> MnSymbolE-Bold10
<12->   MnSymbolE-Bold12
}{}
\DeclareMathDelimiter{\@recthy@ulcorner}
{\mathopen}{MnLargeSymbols}{'036}{MnLargeSymbols}{'036}
\DeclareMathDelimiter{\@recthy@urcorner}
{\mathclose}{MnLargeSymbols}{'043}{MnLargeSymbols}{'043}
\let\ulcorner=\@recthy@ulcorner
\let\urcorner=\@recthy@urcorner
\newcommand*{\godelnum}[1]{\left\ulcorner #1 \right\urcorner}

\begin{document}

$$\mathbrush{b}$$

\end{document}

• You ask about stix2 and show MnSymbol. And no, amsart doesn't load amssymb. A single math alphabet can be easily emulated without allocating a math group. Please, complete to a full example showing the issue. Mar 9, 2021 at 18:26
• Thanks, I've done that. Mar 9, 2021 at 19:20
• the stix(2) packages offer \mathcal and \mathscr do you need mathrsfs as well? Mar 9, 2021 at 19:55
• It does? How do I activate that? I know how to do that using unicode-math I need to use the other stylistic set…or is this just by default using stix2? Mar 9, 2021 at 19:56
• you don't have to do anything: \documentclass{article}\usepackage{stix2}\begin{document}$ABC\mathscr{ABC}\mathcal{ABC}$\end{document} Mar 9, 2021 at 19:59

\documentclass[noamsfonts]{amsart}

• @PeterGerdes sorry I don't understand what you mean at all. you can use \documentclass[noamsfonts]{amsart} with pdflatex or xelatex or lualatex so why do you need an iftex test? what do you want to do differently in each case? Mar 9, 2021 at 20:04