# \mathbb not working in \underset

data 08/04/2018. 2 answers, 286 views

I'm trying to put \mathbb{R} in an \underset of \sup in the following way:

\underset{x \in \mathbb{R}}{\sup}

However this sequence does not render as usual. I use following libraries:

\usepackage{amssymb,amsmath, amsthm}
\usepackage{enumitem}
\usepackage{microtype}
\usepackage{idxlayout}
\usepackage{amssymb}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{float}
\usepackage{amsthm}
\usepackage{flexisym}
\usepackage{graphicx}
\usepackage{mathtools}

I'm new to LaTeX and not sure how to approach this problem. Please help.

Full MWE to reproduce this:

\documentclass[oneside,12pt,a4paper]{memoir}
\renewcommand{\baselinestretch}{1.15}
\let\memoldbibsection\bibsection
\let\bibsection\relax
\usepackage[nobysame]{amsrefs}
\let\bibsection\memoldbibsection
\usepackage{amssymb,amsmath, amsthm}
\usepackage{enumitem}
\usepackage{microtype}
\usepackage{idxlayout}
\usepackage{amssymb}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{float}
\usepackage{amsthm}
\usepackage{flexisym}
\usepackage{graphicx}
\usepackage{mathtools}

\makeindex
\makeindex[sym]

\setcounter{secnumdepth}{2}

\makeatletter

\begin{document}
$\underset{x \in \mathbb{R}}{\sup}$
\end{document}

Sebastiano 11/27/2018.

If you delete \usepackage{flexisym} it works well.

In my experience, to put so many packages, often it create conflict or bad compilation. It is important, also, the order of the list the various packages.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsthm}
\usepackage{enumitem}
\usepackage{microtype}
\usepackage{idxlayout}
\usepackage{lmodern}
\usepackage{float}
\usepackage{amsthm}
%\usepackage{flexisym}
\usepackage{graphicx}
\usepackage{mathtools}

\begin{document}

$\underset{x \in \mathbb{R}}{\sup}$
\end{document}

Heiko Oberdiek 08/04/2018.

The problem is caused by package flexisym. Not only \mathbb{R} is affected but also \sup is in an italic font. Anyway, \underset is not the right command for putting something below the "operator" \sup. This is done by a subscript. Compare:

\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{flexisym}

\begin{document}
$\underset{x \in \mathbb{R}}{\sup} = \sup_{x \in \mathbb{R}}$
\end{document}

If you do not need package flexisym, then do not load it.