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} 
8
  • 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. Commented Oct 18, 2016 at 16:25
  • 1
    Probably it is effect of document class you are using. Commented Oct 18, 2016 at 16:32
  • Please tell us which document class you use, and do tell us if you load any math-related packages. Commented Oct 18, 2016 at 16:49
  • Sorry for that, I've added some info to the post. Commented Oct 18, 2016 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. Commented Oct 18, 2016 at 17:46

1 Answer 1

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...)

1
  • @soldeace - Glad to be of assistance. :-) Commented Oct 18, 2016 at 19:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.