2

This solution for inserting lowercase greek directly in mathmode works just fine for me.

However I have not yet been able to use the same trick for uppercase letters.

What went wrong?

Here is a working example

\documentclass[a4paper]{article}
\usepackage{fontspec}

\mathcode`ω=\omega
\mathcode`Ω=\Omega

\begin{document}

$$\omega=ω$$ %Just fine!

$$\Omega=Ω$$ %Will not work!

\end{document}
1

Do the assignments at begin document:

\documentclass[a4paper]{article}
\usepackage{fontspec}

\AtBeginDocument{%
  \mathcode`ω=\omega
  \mathcode`Ω=\Omega
}

\begin{document}

\[\omega=ω,\quad \Omega=Ω\]

\end{document}

enter image description here

By the way, with unicode-math you need no special setup.

\documentclass[a4paper]{article}
\usepackage{unicode-math}

\begin{document}

\[\omega=ω,\quad \Omega=Ω\]

\end{document}

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.