On using ancient Greek
in a LaTeX document
This page is a lab notebook. The most recent comments are at the top.
December 24, 2008
I changed operating system from Fedora to Ubuntu yesterday and re-installed LaTeX from the 2008 DVD (TeX Live). I then installed psgreek, and had the same sorts of problems as described below, owing mainly to a confusion between the texmf and texmf-var directories. I seem to have sorted things out, more or less as before. But this time I learned to restart the computer after the changes, before getting worried that I didn't have all the fonts.
Indeed, I had a file showing the various series, shapes, and families that might be available in the nine fonts of psgreek:
- regular,
- garamond,
- oxonia,
- oldface,
- milan,
- kerkis,
- cmr,
- cmss,
- cmtt.
Before I managed to apply updmap appropriately, I could not get Greek letters for the roman families in the first five of these fonts.
May 3, 2007
Recently my operating system was changed (from Debian to Fedora), and I re-installed LaTeX from the 2004 CD. (Somebody else has my 2005 CD at the moment.) I used the full installation of TeX Live 2004. The first time I made the installation, there were problems. These problems seemed to come from the existing installation (teTeX?) that came along with the operating system. I was not able just to direct the computer to use only the new TeX files. So I just deleted all of the TeX directories I could find, and started over. Then things seemed to be fine, except that I wanted the psgreek fonts again.
The full installation of TeX Live does not include psgreek. As pointed out by The Digital Classicist, this is apparently because not all fonts included in the package are free. I had once installed the package (as noted below), but the installation was not completely successful; perhaps I could see the new fonts in a dvi viewer, but could not convert them to ps or pdf. I do not remember the problem clearly, but I just resorted to using the font that I got by means of the preamble instruction
\usepackage[polutonikogreek,english]{babel}(This did not require psgreek.)
Installing psgreek yesterday, I mostly followed the installation instructions in ctan/nonfree/fonts/greek/psgreek/doc/fonts/psgreek/psgreek.dvi (as The Digital Classicist page suggests); but some changes were necessary. I go through the instructions, step by step:
- The first step is to copy the *.afm, *.ofm, *.ovf, *.tfm, *.pfb, and *.vf files into the directory .../texmf/fonts in one's own machine. Now, in the directory ctan/nonfree/fonts/greek/psgreek/fonts/, one finds the subdirectories afm, ofm, ovf, tfm, type1, and vf. So one just wants to copy these directories into .../texmf/fonts. (The *.pfb files are apparently in the type1 directory.)
- In .../texmf/tex/latex/ create the directory psgreek and put there the contents of ctan/nonfree/fonts/greek/psgreek/tex/latex/psgreek, that is, the *.fd files and psgreek.sty. (I suppose that the files TRANS.TBL can be ignored, that is, copied or not.)
- After following this instruction and going to Step 5(a), I got an error message, which told me that the file ctan/nonfree/fonts/greek/psgreek/dvips/config/psgreek.map must not be put in the corresponding place in my machine, but rather in (for example) .../texmf/fonts/map/dvips/psgreek/. (So I created the subdirectory psgreek here.)
- This instruction regarding VTeX does not apply.
-
Here it is not clear whether an adjustment must be made. One is told to
add to the file .../texmf/web2c/updmap.cfg the line
Map psgreek.map
I did this. (I included the line in its alphabetical order, but I don't suppose it matters.) Then one is to run the script updmap (just by typing its name). The script creates various output files, such as psfonts.map. However, by default, the script uses, not the file .../texmf/web2c/updmap.cfg, but rather .../texmf-var/web2c/updmap.cfg. So when psgreek did not seem to be working, I edited the updmap.cfg file in the texmf tree and made updmap to work on this and to send its output files into the texmf tree. (One can see how to do this by typing updmap --help or man updmap.) - I don't think this step—mktexlsr—is necessary; I think updmap already does it.
\documentclass[a4paper,12pt]{article} \usepackage[polutonikogreek,english]{babel} \usepackage[oxonia]{psgreek} \begin{document} This should be the first line of the \emph{Iliad:} \begin{greektext} M\~hnin >'aeidh je`a phlhi'adew >aqill\~hoc. \end{greektext} The same, italic: \begin{greektext} \emph{M\~hnin >'aeidh je`a phlhi'adew >aqill\~hoc.} \end{greektext} \end{document}The log file is the following, with my observations inserted:
This is pdfeTeXk, Version 3.141592-1.20a-2.2 (Web2C 7.5.3) (format=latex 2007.4.26) 3 MAY 2007 15:54 entering extended mode %&-line parsing enabled. **\nonstopmode\input 2007test.tex (./2007test.tex (/usr/local/texlive2004/texmf-dist/tex/latex/base/article.cls Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/local/texlive2004/texmf-dist/tex/latex/base/size12.clo File: size12.clo 2004/02/16 v1.4f Standard LaTeX file (size option) ) \c@part=\count79 \c@section=\count80 \c@subsection=\count81 \c@subsubsection=\count82 \c@paragraph=\count83 \c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) (/usr/local/texlive2004/texmf-dist/tex/generic/babel/babel.sty Package: babel 2004/11/20 v3.8d The Babel package (/usr/local/texlive2004/texmf-dist/tex/generic/babel/greek.ldf Language: greek 2004/02/19 v1.3l Greek support from the babel system (/usr/local/texlive2004/texmf-dist/tex/generic/babel/babel.def File: babel.def 2004/11/20 v3.8d Babel common definitions \babel@savecnt=\count87 \U@D=\dimen103 ) Loading the definitions for the Greek font encoding (/usr/local/texlive2004/texmf-dist/tex/generic/babel/lgrenc.def File: lgrenc.def 2001/01/30 v2.2e Greek Encoding )) (/usr/local/texlive2004/texmf-dist/tex/generic/babel/english.ldf Language: english 2004/06/14 v3.3o English support from the babel system \l@british = a dialect from \language\l@english \l@UKenglish = a dialect from \language\l@english \l@canadian = a dialect from \language\l@american \l@australian = a dialect from \language\l@british \l@newzealand = a dialect from \language\l@british ))None of the foregoing used anything from psgreek; but the rest does:
(/usr/local/texlive2004/texmf/tex/latex/psgreek/psgreek.sty Package: psgreek 2003/04/16 Babel support for Greek PostScript fonts (/usr/local/texlive2004/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 1999/03/16 v1.13 key=value parser (DPC) \KV@toks@=\toks14 ) LaTeX Info: Redefining \greektext on input line 99. LaTeX Info: Redefining \latintext on input line 122. ) (./2007test.aux) \openout1 = `2007test.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for LGR/cmr/m/n on input line 5. LaTeX Font Info: Try loading font information for LGR+cmr on input line 5. (/usr/local/texlive2004/texmf-dist/tex/generic/babel/lgrcmr.fd File: lgrcmr.fd 2001/01/30 v2.2e Greek Computer Modern ) LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Try loading font information for LGR+fof on input line 8. (/usr/local/texlive2004/texmf/tex/latex/psgreek/lgrfof.fd File: lgrfof.fd 2004/04/23 Fontinst v1.926 font definitions for LGR/fof. )I think yesterday TeX could not find this file lgrfof.fd; now it can; but what explains the following?
LaTeX Font Info: Try loading font information for OT1+fof on input line 9. LaTeX Font Info: No file OT1fof.fd. on input line 9. LaTeX Font Warning: Font shape `OT1/fof/m/n' undefined (Font) using `OT1/cmr/m/n' instead on input line 9. LaTeX Font Warning: Font shape `OT1/fof/m/it' undefined (Font) using `OT1/fof/m/n' instead on input line 15. [1 ] (./2007test.aux) LaTeX Font Warning: Some font shapes were not available, defaults substituted. ) Here is how much of TeX's memory you used: 747 strings out of 94711 9840 string characters out of 1176664 58284 words of memory out of 1510127 3972 multiletter control sequences out of 10000+50000 4825 words of font info for 17 fonts, out of 1000000 for 2000 397 hyphenation exceptions out of 1000 25i,4n,33p,211b,112s stack positions out of 5000i,500n,6000p,200000b,40000s 0 PDF objects out of 300000 0 named destinations out of 131072 1 words of extra memory for PDF output out of 65536 Output written on 2007test.dvi (1 page, 532 bytes).
November 8, 2005, and earlier
This page is a sort of lab notebook. Other people have found the page and offered some improvements; some of these are noted in italics below.I wanted to be able to include quotations from, say, Plato or Aristotle in an English-language document typeset by LaTeX. I could not find complete instructions on what to do. This is what I did.
Installation
I have Linux on my computer. (I didn't install it.) I have the TeX Live CDs (2003.9 edition) from the TeX Users Group. On the demo CD, in the readme.html file, there are two useful links: to The TeX Live Guide, and to a List of all documentation. From the latter link, one learns that there is a texmf/doc/fonts/kdgreek directory, containing install.dvi and usage.dvi. I didn't need the former. The latter was useful, but described using Greek only in documents compiled by TeX, not LaTeX.When viewing usage.dvi, I saw that Greek characters in the examples were missing. Thus I learned that my current TeX installation did not support the display of these characters. (Also, when I used dvips on the dvi file, I didn't get Greek characters; I got Latin transliterations.)
In the TeX Live Guide, I went to section 3, Unix installation, subsection 3, Installing individual packages to disc. The reference there to Rock Ridge extensions is confusing; either these are enabled automatically, I think, or one's system is too old to support them anyway. Also, if one is reading the Guide from the CD, then one has already successfully mounted the CD.
As root, in the /mnt/cdrom directory, I typed sh install-pkg.sh --package=kdgreek. Afterwards, I typed texconfig, though I'm not sure what this did.
Added 2005.11.08: I have installed TeX more times, as above. Today, from the “TeX Collection 2004” DVD, I installed psgreek (found in /cdrom/ctan/nonfree/fonts/greek/psgreek/) by following the instructions in doc/fonts/psgreek/psgreek.dvi. However, it wasn't completely obvious what to do. Files with extensions pfb, afm, and so forth, are mentioned; these turn out to be in certain subdirectories, which I copied as instructed.
Then I added
\usepackage[oxonia]{psgreek}to a document; but LaTeX could not find psgreek.sty until I ran the program texconfig, selecting REHASH.
I was then able to view the usage.dvi file properly. By consulting also The LaTeX Companion by Goossins, Mittelbach and Samarin (Addison-Wesley, 1994), I learned to do the following:
Usage
In the preamble of a tex file, include:\documentclass[greek,english]{article} \usepackage{babel}After greek should come english, assuming the latter describes the first language to appear in the document.
Andrew Schepler observes that for ancient Greek, one should write polutonikogreek instead of just greek. One's preamble might then include:
\documentclass{article} \usepackage[polutonikogreek,english]{babel}However, this change doesn't seem to solve for me the problems mentioned below.
Greek text should be in a greektext environment:
\begin{greektext}...\end{greektext}Added 2005.11.08: No, this seems to be the cause of the problems mentioned below. As I have now been shown by Colin McLarty, one should enter Greek with
\selectlanguage{polutonikogreek}and turn back to English with
\selectlanguage{english}To save typing, I am using the definition
\newcommand{\Gk}[1]{\selectlanguage{polutonikogreek}#1\selectlanguage{english}}Now, for example, one can get the circumflex accent with ~ alone (rather than the \~ given below).
Latin letters will give Greek according to the following scheme:
a α | h η | n ν | t τ |
b β | j θ | x ξ | u υ |
g γ | i ι | o ο | f φ |
d δ | k κ | p π | q χ |
e ε | l λ | r ρ | y ψ |
z ζ | m μ | s σ | w ω |
A macron over a letter can be achieved with
\=
For use in Greek numerals, one has
\stigma \qoppa \sampiOne gets breathing-marks by prefixing < and > respectively, and the rising and falling tone-marks by prefixing right and left quote-marks. To get the circumflex requires prefixed \~ in LaTeX. For an iota subscript, use a following |. Two problems arise in LaTeX:
-
If one types, say
e\~{>i}nai
Then the circumflex will be properly over the rough-breathing mark, but the combination will be between the epsilon and iota. A solution is to typee\~{>\!i}nai
But a better solution is to use ASCII (actually it's not quite ASCII). In this case, one can typee\char0218nai
-
If one types, say
t\~w|
then the circumflex will be properly over the omega, but the iota-subscript will follow the omega. A solution is to typet\~{w\!\!|}
Rather, typet\char0196