How can I get the output I get without unicode-math using unicode-math, preferably (not necessarily) using the same code (\boldmath)? I would like the solution to work with at least the XITS and Latin Modern fonts, both of which have no build-in bold math font..
edit: I can see attention is fading away. Of course it is not possible to make non-bold fonts 'truly bold', but the output Word produces when you make formulae bold is acceptable, and Cambria Math also doesn't have a bold font. You can even make XITS and Latin Modern bold in math just by pressing CTRL+B. I accept any answer that makes LaTeX behave like Word in this.
Without unicode-math
\documentclass{article}
\begin{document}
This should be entirely bold: {\boldmath$O(\log n)$} \\
This should not be bold: $O(\log n)$
\end{document}
I get nice-looking output:
.
With unicode-math, the code
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\begin{document}
This should be entirely bold: {\boldmath$O(\log n)$} \\
This should not be bold: $O(\log n)$
\end{document}
gives
.
I already tried a bunch of things, for example the following code.
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{XITS}
\setmathfont{XITS Math}
\setmathfont[range=\mathup/{greek,Greek,latin,Latin,num}]{XITS}
\setmathfont[range=\mathit/{greek,Greek,latin,Latin,num}]{XITS Italic}
\setmathfont[range=\mathbfup/{greek,Greek,latin,Latin,num}]{XITS Bold}
\setmathfont[range=\mathbfit/{greek,Greek,latin,Latin,num}]{XITS Bold Italic}
\begin{document}
This should be entirely bold: {\boldmath$O(\log n)$} \\
This should not be bold: $O(\log n)$
\end{document}
Which unfortunately gives me this:
.
Word output looks like this:
.

${\boldmath O(\log n)}$instead? – pluton May 11 '12 at 14:44\boldmathdoesn't do anything useful. – egreg May 11 '12 at 14:57version=boldshows that there are big problems when the fonts used don't have the "Math" script. – egreg May 11 '12 at 15:41One very crappy option seems to be to use
– Semafoor May 11 '12 at 15:55\setmathfont[version=bold,FakeBold=3.5]{XITS Math}, but that doesn't look good at all. edit: Also, it only works with XeLaTeX and not LuaLaTeX.FakeBolddoesn't work at all with LuaLaTeX – egreg May 11 '12 at 15:58:). – خالد حسني May 11 '12 at 17:46\mathbfetc?\boldmathis for all bold math (i.e. including non alphanumeric symbols), Word does not even support that. – خالد حسني May 12 '12 at 00:27\boldmaththat produces something like what Word produces would be great (bold alphanumeric symbols). That was actually what I was trying to achieve with my (non-working) 'solutions'.\mathbfmakes cursive text stand up though... I'm definitely no expert:\boldmathwas what I used before usingunicode-mathand custom fonts to make bold math. There may be other solutions. I must admit I didn't think this would be difficult for LaTeX experts to solve :). – Semafoor May 12 '12 at 02:21