Define environment `Question` when loading package `unicode-math`

The command \Question is defined to represent the double question mark character, along with a whole bunch of other unicode character mapping definitions ("mathtable"), done at begin document. You should choose a non-clashing environment name.

I agree it is annoying that \Question isn't defined immediately by unicode-math, so it would be detected by the \newcommand; and unicode-math issues no warning about the changed definition when it does get defined. (The command that fails to give warning is \__um_sym:nnn.)

But why is there no double-question character in the output?? There WILL be a warning in the log file explaining that:

Missing character: There is no ⁇ in font [lmroman10-regular]:mapping=tex-text;!

Explanation

\Question is one of math symbol commands unicode-math provides. Therefore after your \newenvivonment{Question}..., \Question is redefined to the double question mark (U+2047) at the beginning of document (\begin{document}) by unicode-math. Since the default unicode math font Latin Modern Math font does not provide this symbol, XeLaTeX (or LuaLaTeX) writes

Missing character: There is no ⁇ in font [lmroman10-regular]:mapping=tex-text;!

to the log and leaves a blank before environment content test in the output. It is a pity that this error is not filtered by most editors.

If you move \newenvivonment{Question}... after \begin{document}, you will get

! LaTeX Error: Command \Question already defined.
               Or name \end... illegal, see p.192 of the manual.

which reminds you that \Question is already defined.

Workaround

Probably you need to use another environment name, or redefine \Question at the beginning of document like

\usepackage{unicode-math}

% this must appear after unicode-math
\AtBeginDocument{
  \renewenvironment{Question}{\textbf{envname}}{}
  % or let \Question to undefined, then \newenvironment{Question}
}
``

Tags:

Unicode Math