I am working on a project that deals with polytonic Greek, and wish to write everything in Org mode, and export to a PDF with one of the compilers (like XeLaTeX).
I have spent hours today reading posts and StackExchange threads about Unicode and Org mode, but feel no closer to solving my problem than when I first started. For example, I have a table like the following in my Org file:
| Greek letter | IPA | English match |
|--------------+--------------------------+---------------|
| Α α | [a], [aː] | A |
| Β β | [b] | B |
| Γ γ | [g], [ŋ] (before velars) | G |
| Δ δ | [d] | D |
| Ε ε | [e] | E |
| Ζ ζ | [zd] | Z |
| Η η | [ɛː] | |
| Θ θ | [θ] | |
| Ι ι | [i], [iː] | I |
| Κ κ | [k] | K |
| Λ λ | [l] | L |
| Μ μ | [m] | M |
| Ν ν | [n] | N |
| Ξ ξ | [ks] | X |
| Ο ο | [o] | O |
| Π π | [p] | P |
| Ρ ρ | [r] | R |
| Σ σ | [s] | S |
| Τ τ | [t] | T |
| Υ υ | [y], [yː] | U |
| Φ φ | [f] | F |
| Χ χ | [kʰ] | |
| Ψ ψ | [ps] | |
| Ω ω | [ɔː] | |
And these lines in my .spacemacs file (evidently XeLaTeX supports Unicode better than PDFLaTeX?):
;; Use XeLaTeX
(setq org-latex-pdf-process
'("xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f")) ;; for multiple passes
I have been unable to get any of the Greek characters in the table to show up in the PDF when I use C-C C-e l p
. I am not getting any build errors: the intermediate .tex file is produced and looks absolutely fine. It's just that when the PDF is produced, it doesn't have any of the Unicode characters I want. I am at a complete loss as to what I need to do, what packages I need to install, and so forth.
I'd like to get a handle on how to include Unicode symbols in general as I'll probably need to use IPA symbols and Hebrew letters as well in this project. But I'd be happy to get even just basic Greek letters working at this point.
Help?
#+latex_header: \usepackage[utf8]{inputenc}
in your Org file? Is org file itself encoded using some Unicode coding? (does Emacs showU
in the bottom left corner of the buffer?) (but don't mix the two). WithXeLaTeX
you need to specify fonts you want for languages and then use the font you defined: pokristensson.com/unicodelatex.html\usepackage[utf8]{inputenc}
is used by default in the Org mode export to .tex. Here's the relevant header info in the .tex file produced: ``` \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{grffile} \usepackage{longtable} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} ``` There is noU
in the bottom left corner. I haveunix
in the bottom right of the Spacemacs modeline?\usepackage[T1]{fontenc}
to something different? How would I say "use this font for English stuff and this font for Greek stuff?"M-: buffer-file-coding-system
(it should beutf-8
).