LaTeX forum ⇒ XeTeXpolytonic Greek

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
wegelin
Posts: 15
Joined: Sun Oct 13, 2013 2:25 am

Re: polytonic Greek

Postby wegelin » Tue Feb 03, 2015 11:30 pm

Here are two examples, with identical text, which compiled on my Mac OS 10.7.5 under TexLive 2014. Both rendered the English and the polytonic Greek. But forlatex.tex, compiled in latex, put the soft breathing over the uppercase Alpha; it stands on top of the letter and looks silly. Whereas forxelatex.tex, compiled in xelatex, rendered the soft breathing snuggling against the left side of the Alpha as one expects.

Thus, as hoped, it seems that xelatex handles polytonic Greek better.

What explains the difference between the English fonts in the two documents? The xelatex document is explicitly declared to be Times New Roman, but what is the font of the latex document? The latex document looks like the same font in its shape but it is not as dark as the xelatex document.

forlatex.tex:
  1. \documentclass[12pt]{article}
  2. \usepackage[utf8]{inputenc} % without this, "Ἀφροδίτη" compiles but does not show up.
  3. \usepackage[greek,english]{babel} % Without this, "Ἀφροδίτη" throws an error
  4. \usepackage{textalpha} % Without this, "Ἀφροδίτη" throws an error
  5. \begin{document}
  6. English.
  7. Ἀφροδίτη
  8. \end{document}


forxelatex.tex:
  1. \documentclass[12pt]{article}
  2. \usepackage{fontspec}
  3. \setmainfont{Times New Roman}
  4. \begin{document}
  5. English.
  6. Ἀφροδίτη
  7. \end{document}

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3550
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Feb 04, 2015 12:05 am

I cannot really test the xelatex example as i don't have the font.
Looking at the doc of textalpha though, i takes the greek charackters of computer moderns math font and makes them available in the text.

So what you see, are serif fonts in both outputs, but one serif font is not like the other. There are sooooo many.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

wegelin
Posts: 15
Joined: Sun Oct 13, 2013 2:25 am

Postby wegelin » Wed Feb 04, 2015 2:15 am

Do you mean that the computer on which you work does not have Times New Roman font? I thought it was a standard font. Do you mean that you cannot compile forxelatex.tex on your computer, it throws an error?

I have not installed any special font on my computer. I simply typed the Greek unicode characters into a *.tex file. They are plainly visible in the *tex file.

A primary attraction of xelatex over pdflatex is that it uses standard fonts: http://tex.stackexchange.com/questions/ ... -and-xetex.

Another reason I want to use xelatex instead of pdflatex is that it does not keep throwing errors every time it encounters an unfamiliar character. To handle Western European languages and polytonic Greek in the same document, pdflatex requires special libraries; and with these libraries loaded, pdflatex frequently throws an error when it encounters an unfamiliar Unicode character. For instance, if I copy what looks like plain English text from an email in my inbox, into a tex file, frequently pdflatex throws an error because it has encountered an invisible character that it does not recognize.

Why do you refer me to textalpha? My example above compiles on my standard Mac without the need of any special libraries. It was to get away from the need to load special libraries that I switched from pdflatex to xelatex.

The link to which you refer, http://www.tug.dk/FontCatalogue/seriffonts.html, appears to be TeX fonts. But does not xelatex access standard fonts? Are not standard fonts on any contemporary computer, whether unix, linux, Mac, or Windows? I am puzzled by your saying you "don't have the font."

User avatar
Johannes_B
Site Moderator
Posts: 3550
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Feb 04, 2015 4:55 pm

You can believe me when i say i don't have the font.

XeLaTeX is able to use open type fonts, a big advantage over pdflatex. It supports unicode as well, making the use of different alphabets easy.

In you pdflatex example, you used package textalpha. Packages are a very basic and not to be afraid of thing in LaTeX. You need them to do special stuff more efficiently.

So, what i wanted to say: Both documents look different, because they use different fonts. Times New Roman (<- please look at the variants section) might look similar to Computer Modern, but they are not. Completely inappropriate comparison: Two chinese guys might look alike, but if you get closer, you notice the differences.

All that was answering your second question. The first problem you described, i didn't understand.

EDIT: I just tried to reproduce what you are describing. Please click on OPEN IN WRITELATEX just above you latex-example. It shows the little thing on the left side of the alpha in aphrodite, but the Times example doesn't render the Alpha in Writelatex (which is know known as overleaf). Maybe the font does not include the glyph.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 1 guest