# Upright Greek letters in text mode (not upgreek)

How do I type upright Greek letters? I have tried upgreek but it uses specific fonts (Euler or Adobe Symbol).

I want to use the upright Greek letters in the actual font being used. I'm thinking of the following solutions:

1. XeTeX
2. Direct ASCII code input
3. \alpha, beta, \mu, etc. but in text mode

I am inclined to #3. Hopefully it doesn't require inputenc modifications. But of course any solution is welcome.

-

You can pass the options [greek,english] to the babel package. Then you can switch between them using \greektext and \latintext.

\documentclass{minimal}
\usepackage[greek,english]{babel}
\begin{document}

\greektext
A whole paragraph in greek letters
\latintext

% If we only want a single letter, it might make sense to define commands:

\newcommand{\ga}{\greektext a\latintext}
\newcommand{\gA}{\greektext A\latintext}

\gA lph\ga
\end{document}


-
Good answer and you can use "polutoniko" as a babel option to get accents if you wish. – Yiannis Lazarides Jan 18 '11 at 16:45
This does not work for me. If I try something like this, greek mode appears in many more places. – Raphael Sep 6 '13 at 14:48
@Raphael: It's probably best if you open a new question for this. – Jake Sep 6 '13 at 14:51
@Jake I have not been able to come up with a MFE, so it was probably some weird interaction of packages. Luckily, I found another solution. – Raphael Sep 6 '13 at 15:02
There's also \textgreek that takes an argument and is better than switching languages back and forth. And, of course, \textlatin. So \textgreek{A}lph\textgreek{a} might be better. – egreg Sep 6 '13 at 15:06

Package textgreek seems to work without any hassle. It provides commands like \textalpha and allows you to choose between fonts cbgreek, euler and artemisia.

-

Two solutions involving XeLaTeX

## Polyglossia

With Polyglossia the hyphenations rules are loaded correctly for all the declared languages.

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage[variant=mono]{greek}

% Fonts
\setmainfont[Mapping=tex-text]{Linux Libertine O}

\begin{document}
\section{Τίτλος Κεφαλαίου}
English text.  % Main language doesn't need declaration.

\begin{greek} % Secondary languages need to be declared.
Ελληνικό κείμενο.
\end{greek}

\end{document}


You could probably define a shortcut for the greek environment, like

\newcommand{\gr}[1]{\begin{greek}#1\end{greek}}
...
\gr{Και άλλο ελληνικό κείμενο}
...


## xgreek

With xgreek you can use upright letters for both languages out of the box. Keep in mind that this package is mainly used for the typesetting of greek texts. If the main language of your documents is english, better stick with polyglossia.

In your case, the main problems with xgreek is that in order to have hyphenation in english, you must explicitly declare the text as english one and that chapters, sections, captions etc would be translated in greek.

\documentclass{article}
\usepackage{fontspec}
\usepackage{xgreek}
\setmainfont{Linux Libertine O}

% This command allows the use of both english and greek text with correct hyphenation.
% English text must be placed in braces. Example:
% Ελληνικό κείμενο. \en{English text.} Ελληνικό κείμενο.
\newcommand{\en}[1]{\setlanguage{american}#1\setlanguage{monogreek}}

\begin{document}
\en{I want to use the upright Greek letters in the actual font being used and I want the hyphenation rules to work correctly!}

Οι ελληνικοί κανόνες συλλαβισμού δουλεύουν χωρίς προβλήματα.
\end{document}

-
Seems like you interchanged the languages in the comment in your xgreek code … ;-) – Tobi Sep 6 '13 at 15:54
@Tobi: I proposed an edit to the post for fixing that. – Blaisorblade Nov 23 '13 at 0:30