Open spenteco opened 7 years ago
On formatting Greek in pdflatex: I ran into this issue last year, since my novel had frequent quotes in Latin and Greek. I'd have to go back and test it to be sure, but I believe the key was to add a command in the .latex template:
\newcommand\rendergreek[1]{\fontspec{GFS Bodoni}\selectlanguage{greek}#1\selectlanguage{english}}
and to include -V otherlangs=polutonikogreek,greek
in my Pandoc arguments. Greek sections were then surrounded by the \rendergreek{}
command, like so: \rendergreek{ζυγά}. (Which was the only part where I had to alter the generator's output to get the greek rendering to work. And wasn't strictly necessary.)
Thanks for the tip, Issac (and apologies for being late in responding . . . I've been off doing the family-holiday thing).
I'll give this a try this week. When I was looking into this last week, I stumbled across the business of wrapping the text in \rendergreek{ . . . }, but I didn't have a good strategy for finding and wrapping such text automatically, and I didn't want to do it by hand. Since then, I'm pretty sure I've identified a feasible and scaleable way to go about it, at least for my corpus.
Thanks again,
Steve
On 11/23/2016 11:56 PM, Isaac Karth wrote:
On formatting Greek in pdflatex: I ran into this issue last year, since my novel had frequent quotes in Latin and Greek. I'd have to go back and test it to be sure, but I believe the key was to add a command in the .latex template:
|\newcommand\rendergreek[1]{\fontspec{GFS Bodoni}\selectlanguage{greek}#1\selectlanguage{english}} |
and to include |-V otherlangs=polutonikogreek,greek| in my Pandoc arguments. Greek sections were then surrounded by the |\rendergreek{}| command, like so: \rendergreek{ζυγά}. (Which was the only part where I had to alter the generator's output to get the greek rendering to work. And wasn't strictly necessary.)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NaNoGenMo/2016/issues/121#issuecomment-262696388, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSSdyMViMR4ZYfpsaFhojcW5Ba96lLMks5rBSccgaJpZM4K7RXS.
The hardest part is getting LaTeX to use a Greek font. You'll probably have to switch from pdflatex to xelatex, since that has much better non-Latin-character unicode support.
. . . is done!
The output is on my website, and I've pushed the code to a github repo, which also contains my notes on the process, etc.
There is also a messy list of the documents not linked to from my site, which offers a way to quickly see what texts are in the, uhm, Treasury, along with information about each text's size and the degree to which it is was transformed by the process.