2

I am currently working on beamer in LyX, and for some reason, when I use Capital Omega sandwiched between to X's, the output file just produces a dot (.) The source code is as follows:

\item Well, we can then see that:

\[
=\mathbf{\left(X'\Omega^{-1}X\right)^{-1}\left(\mathbf{X'\,\Omega^{-1}}y\right)}
\]

Any thoughts?

Stefan Pinnow
  • 29,535
  • I tried without the boldface option, and it works. However, it should work with the boldface option as well! – Kwame Brown Oct 27 '16 at 14:25
  • You can't use \mathbf for arbitrary symbols. \mathbf is for a-z and A-Z and works also for some other but is not meant as a general "everything bold" command. – Ulrike Fischer Oct 27 '16 at 14:39

1 Answers1

5

The problem is beamer, not LyX, put \usefonttheme{professionalfonts} in your document preamble. I'm using LyX 2.2.2 and it works.

I have found the solution here.

Moreover in your formula you have a \mathbf within another \mathbf.

EDIT: Thinking of Ulrike Fischer's comment, if you use \mathbf to make everything bold, also the exponent -1 is bold.

It's better to put it only before the matrix and vector symbols (in LyX you may use the math bold option selecting only the variable you want in blod, not the whole formula).

In order to avoid repeating \mathbf everywhere, you may create specific new commands (in LyX you may put the \newcommand declarations in your document preamble and use the new commands directly in math mode).

\documentclass[11pt,twoside,british,openright]{beamer}
\usefonttheme{professionalfonts}
\usepackage{babel}

\newcommand{\matrx}{\mathbf{X}} % Matrix X bold
\newcommand{\matromega}{\mathbf{\Omega}} % Matrix Omega bold
\newcommand{\vecy}{\mathbf{y}} % Vector y bold

\begin{document}
This is the result with \verb|\mathbf| for the whole formula:
\[ 
=\mathbf{\left(X'\Omega^{-1}X\right)^{-1}\left(X'\,\Omega^{-1}y\right)} 
\]
but maybe you prefer this:
\[ 
=\left(\mathbf{X}'\mathbf{\Omega}^{-1}\mathbf{X}\right)^{-1}\left(\mathbf{X}'\,\mathbf{\Omega}^{-1}\mathbf{y}\right) 
\]
obviously using some new commands to avoid repeating \verb|\mathbf| everywhere, the result is the same:
\[ 
=\left(\matrx'\matromega^{-1}\matrx\right)^{-1}\left(\matrx'\,\matromega^{-1}\vecy\right) 
\]
\end{document}

enter image description here

CarLaTeX
  • 62,716