I want to use a greek typewriter font. So far I can't manage to find any font of that kind. Can someone tell me where I can find one?
I know at least three of them, that can be used quite easily with fontspec
and XeLaTeX
or LuaLaTeX
: Microsoft's Consolas
and Courier New
, and DejaVu Sans Mono
. They all have monotoniko and polytoniko characters, that you may enter directly if you have a suitable keyboard.
Here is a demo. Note that Courier New
seems to have problems with polyglossia
(‘No Greek script loaded for the current font’), so I loaded babel
:
\usepackage{fontspec}
\setmainfont{Minion Pro}
\setsansfont{Myriad Pro}
\setmonofont{Courier New}
%
%\usepackage{polyglossia}
%\setdefaultlanguage{greek}
\usepackage[greek]{babel}
\usepackage{array, tabularx}
\renewcommand\arraystretch{2}
\setlength\parindent{0pt}
\begin{document}
\begin{tabularx}{\linewidth}{>{\ttfamily}lX}
Minion Pro: & \textbf{Πυθαγόρειο Θεώρημα}\newline
Εν τοις ορθογωνίοις τριγώνοις το από της την ορθήν γωνίαν υποτεινούσης πλευράς τετράγωνον ίσον εστί τοις από των την ορθήν γωνίαν περιεχουσών πλευρών τετραγώνοις. \\
Myriad Pro: & \sffamily \textbf{Πυθαγόρειο Θεώρημα} \newline
Εν τοις ορθογωνίοις τριγώνοις το από της την ορθήν γωνίαν υποτεινούσης πλευράς τετράγωνον ίσον εστί τοις από των την ορθήν γωνίαν περιεχουσών πλευρών τετραγώνοις.\\
Courier New: & \ttfamily
\textbf{Πυθαγόρειο Θεώρημα} \newline
Εν τοις ορθογωνίοις τριγώνοις το από της την ορθήν γωνίαν υποτεινούσης πλευράς τετράγωνον ίσον εστί τοις από των την ορθήν γωνίαν περιεχουσών πλευρών τετραγώνοις\\
DejaVu Sans Mono: & \fontspec{DejaVu Sans Mono} \textbf{Πυθαγόρειο Θεώρημα} \newline
Εν τοις ορθογωνίοις τριγώνοις το από της την ορθήν γωνίαν υποτεινούσης πλευράς τετράγωνον ίσον εστί τοις από των την ορθήν γωνίαν περιεχουσών πλευρών τετραγώνοις\\
Consolas: & \fontspec{Consolas}\textbf{Πυθαγόρειο Θεώρημα} \newline
Εν τοις ορθογωνίοις τριγώνοις το από της την ορθήν γωνίαν υποτεινούσης πλευράς τετράγωνον ίσον εστί τοις από των την ορθήν γωνίαν περιεχουσών πλευρών τετραγώνοις
\end{tabularx}
Amazingly, this comes built into TeX!
\documentclass{article}
\renewcommand*\rmdefault{\ttdefault}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\begin{document}
Knuth really planned ahead, since he included a typewriter Greek font
as part of the Computer Modern Typewriter series.
And now you can use Unicode input:
\textgreek{Ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν,
καὶ θεὸς ἦν ὁ λόγος.} ---Jn 1:1
\end{document}
-
@user153012, this is just adding on to your answer to show how to get unicode support, and to clarify that Computer Modern really does support Greek text. – musarithmia Aug 20 '14 at 2:54
-
-
1@NVaughan The European Modern Typewriter font has no em-dash ligature. If the call to
T1
is omitted, one would get---
, because Computer Modern Typewriter has no ligatures except!`
and?`
– egreg Aug 20 '14 at 9:14 -
1@AndrewCashner Knuth has nothing to do with this; the font used is by Claudio Beccari, part of the CB-fonts distribution. – egreg Aug 20 '14 at 9:15
-
1@alfC Those engines treat fonts differently. You can't use the fontenc package, instead you use fontspec and select the font families you need. – musarithmia Sep 20 '15 at 2:44
If xelatex
or lualatex
is an option for you, you can try TeX Gyre Cursor
, which is a free Courier clone with greek support or Courier New
which looks even more like a typewriter face. I don't know how to get the later one, since it was already installed on my PC, so it probably comes with Win 7 or Office. Here is an example (I don't speek or write greek, so this is some random text from wikipedia):
% !TeX program=lualatex
\documentclass{article}
\usepackage{fontspec}
\setmonofont{TeX Gyre Cursor}
\newfontfamily\ttdifferent{Courier New}
\def\test{Some english words for comparison.
Η σύγχρονη αγγλική γλώσσα, η οποία μερικές φορές χαρακτηρίζεται ως η πρώτη επιστήμης, των επιχειρήσεων, της πολιτικής και της διπλωματίας, της ψυχαγωγίας, της αεροναυτιλίας και της}
\begin{document}
\ttfamily\test
\ttdifferent\test
\end{document}
-
Thank you for your answrer I will try it and I will see if it is what I want. – Adam Aug 20 '14 at 0:25
-
Tex Gyre Cursor does not seem to support accents at all. Notice how ί is missing from χαρακτηρίζεται in the example text. I use Cousine as my editor-font since it supports full polytonic greek while being quite readable (even enjoyable). – Stenskjaer Aug 20 '14 at 6:48
\documentclass{article}
\usepackage[greek,english]{babel}
\begin{document}
Let's see some typewriter greek:
\begin{otherlanguage}{greek}
\texttt{Oper Edei Deixai.}
\end{otherlanguage}
\end{document}
-
1
-
-
-
and we all know everybody have: compileonline.com/try_latex_online.php – user153012 Aug 21 '14 at 10:13
-
I hadn't used that site before, but had tried sharelatex. It's not really the point though - when the visual effect of the output is so important most people would post an image (see the other answers here). – Chris H Aug 21 '14 at 10:41
If you use xetex
or luatex
, then Frederic Goudy’s Remington Typewriter font (to be precise, only the italic is Goudy’s), in the Pro version published by Lanston, seems to have what you need for both monotonic and polytonic Greek. You can preview the glyphs at www.myfonts.com/fonts/lanston/ltc-remington-typewriter/. The italic has only a little Greek, but the upright seems complete.
The version of Courier from ParaType also supports polytonic Greek: preview the glyphs at www.myfonts.com/fonts/paratype/courier/.
It is not immediately apparent which fonts support Cyrillic and Greek, but you can find a fairly wide assortment of excellent fonts with broad language support if you subscribe to Typekit.
See e.g. the Typewriter Fonts list
Typekit is a pay service, but you will be supporting typographers. :)
Some of the fonts on Typekit may be licensed for free elsewhere e.g. Anonymous Pro.
-
None of those fonts support Greek. (You can check if you click on them and scroll down to 'Language Support' on the right.) – cfr Aug 20 '14 at 0:14
-
@cfr It's a good point, I should have mentioned: Some of the Typekit fonts support Greek (e.g. Source Sans Pro) but for some reason do not list it. I thought to suggest Typekit, at any rate - just in case. – Brian M. Hunt Aug 20 '14 at 1:22
-
1Definitely worth mentioning. When you said it was not obvious which supported Greek, I assumed you meant it didn't say and not that it does say but isn't accurate! Strange that they would leave that information out, too. I think it would be worth adding that into your answer when you edit it so that it does not get lost in the comments. – cfr Aug 20 '14 at 2:26
lmtt
doesn't support greek. – yo' Aug 19 '14 at 23:48