1

I'm trying to write the following equation:

\rho = \max \left\{ \frac{|\mathbf{w} \cdot \mathbf{x^{(i)}} + b|}{\|\mathbf{w}\|} \right\}

but the PDF output renders the math operator \max in italic instead of upright. I've tried the same with \log and \cos, and they behave just the same. What am I doing wrong here?

Document class: memoir

Packages: pgf, fontspec, graphicx, microtype, unicode-math, amsmath

The following code reproduces the problem in different systems:

\documentclass{memoir}
\usepackage{unicode-math}
\usepackage{amsmath}
\begin{document}
Yay, a dual problem:
\begin{equation}
\max_{\mathbf{\alpha}} \left\{ \sum_{i=1}^m \alpha{(i)} \right\}
\end{equation}
\end{document}
  • 2
    welcome to tex.sx. i'm afraid we don't have enough information to guess what the problem is, since the code you show looks correct. please provide a small compilable example that produces the unwanted result, starting with \documentclass and ending with \end{document} so that we can test it. – barbara beeton Oct 18 '16 at 16:25
  • 1
    Probably it is effect of document class you are using. – Sigur Oct 18 '16 at 16:32
  • Please tell us which document class you use, and do tell us if you load any math-related packages. – Mico Oct 18 '16 at 16:49
  • Sorry for that, I've added some info to the post. – soldeace Oct 18 '16 at 17:01
  • 3
    stop making everyone guess! it is impossible to help as you have shown no code that could account for the described behaviour. Make a small 5 or 6 line document, complete from \documentclass to \end{document} that has the problem, then people can easily reproduce and debug it. – David Carlisle Oct 18 '16 at 17:46
1

The solution: Load the amsmath package before the unicode-math package. (I think this is mentioned in the user guide of the unicode-math package...)

  • @soldeace - Glad to be of assistance. :-) – Mico Oct 18 '16 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.