I have this error Too many math alphabets used in version normal, when I use \usepackage{mathrsfs}. I tried in different ways for example I added
\newcommand\hmmax{0}
\newcommand\bmmax{0}
in the preamble before including the font packages. And it does not work. This is my preamble
\documentclass[11pt,letterpaper,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{biblatex}
\usepackage{enumerate}
\usepackage[shortlabels]{enumitem}
\usepackage{amsthm}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage{physics}
\usepackage{float}
\usepackage{tkz-fct}
\usepackage[left=2.50cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry}
\usepackage{txfonts}
\usepackage{tkz-euclide}
\usepackage{tikz-cd}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LO]{\nouppercase\leftmark} % En las páginas impares, parte izquierda del encabezado, aparecerá el nombre de capítulo
\fancyhead[RE]{\nouppercase\rightmark} % En las páginas pares, parte derecha del encabezado, aparecerá el nombre de sección
\fancyhead[RO,LE]{\thepage} % Números de página en las esquinas de los encabezados
\DeclareSymbolFont{cmsymbols}{OMS}{cmsy}{m}{n}
\DeclareSymbolFontAlphabet{\mathcal}{cmsymbols}
\DeclareMathAlphabet{\mathbb}{U}{msb}{m}{n}
\setlength{\parindent}{0mm}
\usepackage[spanish]{babel}
\DeclareMathOperator{\fr}{fr}
\DeclareMathOperator{\interior}{int}
\DeclareMathOperator{\diam}{diam}
\newcommand*\closure[1]{\overline{#1}}
\newcommand{\bd}{\mbox{$\bar{d}$}}
\usepackage{cleveref}
\DeclareSymbolFont{cmsymbols}{OMS}{cmsy}{m}{n}%
\SetSymbolFont{cmsymbols}{bold}{OMS}{cmsy}{b}{n}%
\DeclareSymbolFont{cmlargesymbols}{OMX}{cmex}{m}{n}%
\SetSymbolFont{cmlargesymbols}{bold}{OMX}{cmex}{b}{n}%%
\DeclareSymbolFont{CMsymbols}{OMS}{cmsy}{m}{n}
\SetSymbolFont{CMsymbols}{bold}{OMS}{cmsy}{b}{n}
\DeclareMathSymbol{\forall}{\mathord}{CMsymbols}{"38}
\DeclareMathSymbol{\exists}{\mathord}{CMsymbols}{"39}
\DeclareMathSymbol{\pi}{\mathord}{letters}{"19}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
\DeclareMathDelimiter{\rbrace} {\mathclose}{cmsymbols}{"67}{cmlargesymbols}{"09}
\DeclareMathDelimiter{\lbrace} {\mathopen}{cmsymbols}{"66}{cmlargesymbols}{"08}
\newcommand{\R}{\mbox{$\mathbb{R}$}}
\newcommand{\C}{\mbox{${\mathbb C}$}}
\newcommand{\F}{\mbox{${\mathbb F}$}}
\newcommand{\N}{\mbox{$\mathbb{N}$}}
\newcommand{\Z}{\mbox{${\mathbb Z}$}}
\newcommand{\Q}{\mbox{${\mathbb Q}$}}
\newcommand{\ap}{\mbox{${\phiup}$}}
\newcommand{\Q}{\mbox{${\mathbb Q}$}}
that will produce poor subscript and superscript spacing and be slow and produce wrong sizes in sunscripts simply use\newcommand{\Q}{\mathbb{Q}}