I am having a hard time with the "Too many math alphabets in version bold" error. Here is the minimal working example on the latest version of Texlive that comes with Ubuntu 18.04:
\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
$\widetilde{\boldsymbol{\mathsf{x}}}_n$
\begin{equation}
\widetilde{\boldsymbol{\mathsf{x}}}_n
\end{equation}
\end{document}
I have been searching around but could not find the reason why this causes an error. It seems like having both \widetilde{\boldsymbol{\mathsf{x}}}_n in in-line and displayed equation causes this error, but I have absolutely no clues why and how to fix this :-(.
My question: Is there a way to fix this?
Any help/hint is highly appreciated.
PS 1: This error appears to be different than the one in "Too many math alphabets" error so I believe it is not a duplicate.
PS 2: As David Carlisle kindly pointed out in the comment, the first error in the log file is
! Use of \reserved@a doesn't match its definition.
\reserved@b ->\relax \ifmmode \else \non@alpherr \mathsf \fi \use@mathgroup
apt-get....According to the log file, it is TexLive 2017. – weirdo Nov 29 '20 at 23:35! Use of \reserved@a doesn't match its definition.first? – David Carlisle Nov 29 '20 at 23:38! Use of \reserved@a doesn't match its definition.But I have no clues why....:-( – weirdo Nov 30 '20 at 00:05