# Error message received when typing a strict subset of the Greek alphabet. Why?

My goal is to use Unicode to type Greek letters in LaTeX. Some letters (i.e. α) work fine, but others (i.e. o) give the error LaTeX Error: Command \textomicron unavailable in encoding OT1.

What is so special about omicron?

An example that compiles fine:

% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lgreek}
\usepackage{textgreek}

\begin{document}

Certain letters work, i.e. alpha: α

\end{document}


and one that gives the error:

% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lgreek}
\usepackage{textgreek}

\begin{document}

Certain letters work, i.e. alpha: α
\\
But, with other letters, I get an error, i.e, omicron ο

\end{document}


P.S. If you want to know why I have the line % !TEX encoding=UTF-8 Unicode at the very beginning, see the answer given by @egreg.

My log:

A name conflict: textgreek defines \textomikron, but the LGR encoding has omicron.

You can define aliases.

% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{textgreek}

\let\textOmicron\textOmikron
\let\textomicron\textomikron

\begin{document}

Certain letters work, i.e. alpha: α

Also omicron ο works

\end{document}


Notes.

1. lgreek is not needed and I'd say it's obsolete.
2. The magic line at the beginning is to ensure TeXShop will pick up the right encoding for the file, independently on the set preference.
• I am amazed that you know this! Wow. Excellent answer, it fixed things immediately. Dec 8 '21 at 0:07
• @SamY. I learned it a few minutes ago: looking for \textomicron in textgreek.sty I just found \textomikron. Dec 8 '21 at 0:12
• Omicron? I Remember something 😃😃😃😃😃 Dec 8 '21 at 7:06