Intro Site
  English Greek
» Back to my home page

Installing the Greek Option of Babel in MikTeX


There is also a Greek version of this document available



Note: The following instructions have been successfully applied by the author of this article
      to several systems. However, the author takes no responsibility for the correctness or
      completeness of any information in this page, and will take no legal responsibility for
      any data loss or damage caused by using the information presented in this page. 

1. Introduction

This page is the result of all my efforts to write Greek with LaTeX and specifically with the MikTeX distribution. Everything was quite difficult in the beginning, due to the fact that I was not able to find a document with all necessary information to install and use Greek with LaTeX. Based on the article "Installing the Greek option of Babel in LaTeX" (Note: This article is available only in Greek), which explains how to install the Greek option of Babel in RedHat Linux 5.1 and the tetex distribution, I created the first version of this page, after much experimentation and several re-installations of MikTeX. At that time, the only information available here was how to install the Greek option of Babel in Windows and MikTeX version 1.2. Much has changed since then. Newer versions of MikTeX have been released, in addition to a newer release of the Greek option of Babel (8 November 2002), which has unfortunately not been included in MikTeX yet. Moreover, searching through mailing lists I discovered that it is also possible to produce PDF files with an exceptionally high resolution, either from the DVI files or directly from the corresponding LaTeX source files.

Being aware how difficult it is to collect all this information, to evaluate sometimes contradictory methodologies and adapt them to newer versions of MikTeX, I decided from time to time to update this page with new information. My aim remains to provide a single point of access, where anyone trying to write Greek with LaTeX can find all necessary information, which was either previously scattered around the Internet and found in numerous articles and messages or discovered by me while experimenting with MikTeX.

With the hope that this page will be useful to quite a few people, I present in the following paragraphs every piece of information I was able to gather, adapted for the use with MikTeX.

2. Requirements

Firstly, we assume that you have a correctly installed and running version of MikTeX in your system. If you don't have MikTeX, you can download it from http://www.miktex.org, where you can also find instructions on how to install it. For the rest of this document we will assume that you have installed MikTeX under the directory C:\Program Files\texmf and that the local font directory used by MikTeX is C:\Program Files\localtexmf. You also need a program that can handle compressed archives created with the combination of the programs tar and gzip. For that you can use Winzip, which can be downloaded from http://www.winzip.com. Moreover, you have to download the file ftp://obelix.ee.duth.gr/pub/TeX/TeXgreek.tar.gz and save it on your hard disk. Finally, if you wish to produce PDF files with a very good resolution of greek fonts, you have to download the file ftp://ftp.ntua.gr/mirror/ctan/language/greek/cb/type1.tar.gz. Please notice that this file is 67,6MB large, so download it only if you really need to convert your documents into PDF files. The instructions found in the current article have been successfully applied to versions 2.2, 2.3 and 2.4 of MikTeX, in combination with the latest version of Texgreek.tar.gz, which was released on 8 November 2002. Using Winzip (or any other suitable program) decompress the file Texgreek.tar.gz. We will assume that you decompressed the file in the directory C:\Temp of your hard disk. After decompression a new directory named Texgreek should have been created, which contains more subdirectories. These directories are structured as follows:

While installing the Greek option of Babel you will need to copy some files located in the above directories over existing files of MikTeX. We suggest that you create backup copies of these files so that you can restore your original MikTeX installation, in case you fail to install the Greek option.

3. The basic part of Babel

  1. Although after decompressing the file Texgreek.tar.gz the file C:\Temp\Texgreek\encodings\iso-8859-7.def has been created, it is recommended that you download the latest version of the iso-8859-7.def file and save it under the directory C:\Program Files\texmf\tex\latex\base

4. The Greek bibliographic style

  1. Copy the file C:\Temp\Texgreek\BibTeX\hellas.bst into the directory C:\Program Files\texmf\bibtex\bst\base
  2. In order to have the heading of the bibliography being shown with greek letters (and not with their latin counterparts), open the file C:\Program Files\texmf\tex\generic\babel\greek.ldf using a text editor. Locate the line:

    \def\bibname{Bibliograf'ia}%

    change it into:

    \def\bibname{\textgreek{Bibliograf'ia}}%

    and save your changes.

5. Fonts

?he font files provided with MikTeX 2.2, 2.3 and 2.4 are older than the ones contained in the TeXgreek.tar.gz file. Therefore, replace the fonts according to the following instructions:

  1. Delete all files from the directory C:\Program Files\texmf\fonts\source\public\cbgreek. Copy all files from the C:\Temp\Texgreek\mf directory into the above directory.
  2. Delete all files from the directory C:\Program Files\texmf\fonts\tfm\public\cbgreek. Copy all files from the C:\Temp\Texgreek\tfm directory into the above directory.
  3. Open the file C:\Program Files\texmf\fontname\special.map using a text editor. Locate and delete all lines that contain the word cbgreek. Now open the file C:\Temp\Texgreek\misc\special.map, copy it's contents to the file C:\Program Files\texmf\fontname\special.map, in place of the lines that you deleted and save your changes.
  4. Delete all files from the directory C:\Program Files\localtexmf\fonts. MikTeX is using the above directory to store all fonts it processed during previous invocations. Using this technique, it doesn't need to process the fonts every time it is invoked. However, almost all problems reported, regarding the installation of the Greek option of Babel described here, can be traced back to this directory. Deleting all of it's contents just forces MikTeX to process and store all fonts again and, aditionally, you avoid having a possible source of problems.
  5. If you downloaded the file type1.tar.gz, you will have to follow these additional steps:
    1. Decompress the file type1.tar.gz in the directory C:\Program Files\texmf\fonts\type1\public\cbgreek. Make sure that all files with a pfb extension are located in the above directory. Now you will be able to produce PDF files with a very good resolution of greek fonts from the corresponding DVI file, using the dvipdfm application.
    2. How PDF files are directly produced from the corresponding LaTeX source file, using the pdflatex application, depends on the version of pdflatex you are using. In order to check the version that is installed on your system, execute the command "pdflatex -version" from the command prompt.
      • If the installed version is 1.20a or a newer one then save the file cbgreek.map under the directory C:\Program Files\localtexmf\miktex\config and then open the file C:\Program Files\localtexmf\miktex\config\updmap.cfg using a text editor. If the file does not exist create it. In any case add the line:

        Map cbgreek.map

        to the file and save the changes. Now execute the command "mkfntmap" from the command prompt.
      • If the installed version is 1.11b or an older one then save the file cbgreek.map under the directory C:\Program Files\localtexmf\pdftex\config and then open the file C:\Program Files\localtexmf\pdftex\config\pdftex.cfg using a text editor. If the file does not exist create it. In any case add the line:

        map +cbgreek.map

        to the file and save the changes.

6. Final adjustments

  1. Go to the taskbar of your desktop and execute the "MikTeX Options" command, which is located in "Start → Programs → MikTeX". The following window will appear:
  2. Click on the "Languages" tab and make sure that the Greek language is checked in the column labeled "Language". Check also the column labeled "Hyphenation Table" and make sure that the selected hyphenation file is grhyph.tex. If the hyphenation file isn't grhyph.tex (as in the folowing example), then follow these additional steps, else go directly to step 3:
    1. Click on "Edit...":
    2. Now click on "Browse...", select the file C:\Program Files\texmf\tex\generic\hyphen\grhyph.tex and click on "Open":
    3. Activate Greek hyphenation by clicking on "Active" and finally click on "OK":
  3. Now go to the "General" tab and click first on the "Refresh Now" and then on the "Update Now" button:
  4. This completes the installation of the Greek option of Babel. To check that everything has been correctly installed go to the directory C:\Temp\Texgreek\tests and run LaTeX on the file test2.tex:

    latex test2

    Open the file test2.dvi using Yap. If you see text in Greek your installation was successful and you can delete the directory C:\Temp\Texgreek.

7. How to use the Greek option of Babel

To use the Greek option of Babel in a LaTeX document, the following statements have to be added after the \documentclass{} and before the \begin{document} command:

\usepackage{indentfirst}
\usepackage[greek]{babel}
\usepackage[iso-8859-7]{inputenc}

Now it is possible to write text in Greek. If we wish to add some text in English we can use the \textlatin{} command, e.g.:

...
Some text in Greek: \textlatin{Text in English} and here we use again Greek
...

The Greek bibliographic style is activated with the \bibliographystyle{hellas} command.

For more information on how to use the Greek option of Babel consult the above mentioned test2.tex file or refer to the article "The Greek option of Babel in LaTeX". (Note: This article is available only in Greek.)

8. What remains to be done

What I would like to add to this page is some information on how to use the hyperref package, which adds support for hyperlinks in PDF files. Clicking, for example, on a hyperlink in the Table of Contents of a PDF file, you are automatically transfered to the appropriate point in the text. Although all hyperlinks are correctly added in a Greek text, the Bookmarks tab in Adobe Acrobat Reader refuses to display the text in Greek and uses instead Latin characters. Despite searching thoroughly, I was not able to find a good solution to this problem. If someone has more information on this issue, please contact me at one of the e-mail addresses I provide at the end of this page.

9. Comments - Suggestions

For any comments, suggestions and corrections please send an e-mail to one of the following addresses:
iev@hpclab.ceid.upatras.gr or venetis@ceid.upatras.gr

Last Revision: 29 July 2004

» Back to my home page


Identity | Historical | Infrastructure | Staff | Technical Profile
Academic Activities     | Courses | Diploma Dessertation | Projects | Contact | Search