A Personal Greek Reader
The number of people who will actually find this blog post useful is probably very close to zero but just in case you happen to need any of the following things, you might get something out of this:
- You want to know how to create a personal Greek (or insert whatever language you are interested in) reader for yourself.
- You want a programmer-friendly way of doing so.
- You are new to LaTeX and Python and wanted to see some simple examples.
Please note that I’m not particularly good with either of these technologies. Python is pretty straightforward but I'm just unpracticed. My limited experience with LaTeX leads me to think that competence probably comes from a mixture of technical expertise, arcane wizardry, and archaological skills. This certainly works but please don’t take either of this as beautiful examples to emulate. Over time this will evolve though and hopefully it will get better. :) If you are interested, the code is all up on Github here.
Note, I’m not sharing this so you can use a reader with my notes (though it’s out there if you want them for some reason). I’m not being systematic about these notes, putting them in based on what I don’t know (which will be different from what you don’t know) or whenever it strikes my fancy. That’s why I’m calling this a personal Greek reader! I’m not trying to create a open-source Greek reader for everyone to use (though that would actually be kinda fun). I’m just putting the tools out there for you to use if you want one for yourself.
If you want to use this for your own personal uses, you’ll need to have Python 3 installed, the Gentium font installed (the best Greek typeface ever!) and MacTeX. This should work on Windows with slight modifications but I’m a Mac guy these days so that's what I am focusing on.
Origin Story (Warning: Not as Exciting as a Super-Hero Origin Story)
This first came about because of a thread on the bgreek forum started by Ken Penner proposing some reading of Eusebius’ commentary on Isaiah. I need more time in patristic Greek so I jumped in. At this point I don’t if anyone other than Ken and myself are going along with this but just having a thread to remind me that more Greek needs to happen is a good motivator for me.
So I started creating a little reader for myself so I could make notes. Sure, I could have done this in Word but doing this in LaTeX has a few advantages for me.
First, it’s in an easily parseable format. If I want to do anything with this in the future, I can quite easily read the data out and do whatever I need. Of course you can do this with Word. I’ve done that before and it’s not very pleasant. This is much easier!
Second, I want the same material in two formats. I want a reader when I’m sitting in my chair, chillin’. This reader can have normal or even small-size text. I’m getting older and my eyes are blurring a bit but I can still read small-ish text. But I also spend a lot of time on the treadmill and I want to spend some of that time learning Greek. And small text is not good when you’re walking at an average of 5.4km an hour. So I need the same reader, but at two drastically text different sizes.
To solve this, I used a little Python with a little LaTeX to generate two readers. And it worked so well, I’ve started using it for my other reading as well.
So What Is This?
As I said, it’s a combination of a tiny bit of Python with a bit more LaTeX to create a personal Greek reader. The LaTeX bits are broken up into pieces. There is the template where I specify my formatting and create various custom macros. It has a few markers in it that I replace with values in the output to be rendered by LaTeX, including two markers for font size ($textsize$ and $footnotesize$) and one for the primary text. The text itself is broken into separate files so they’re easier to deal with. I’m breaking it down by work but you could break it down however you like for your own personal reader.
The Python script combines those content files and the template, replaces the font sizes for a specific configuration, then uses xelatex to create the pdfs. The script is annotated a bit to help those who aren’t familiar with Python to follow along.
So you can see how it actually looks, here is the “normal” type size reader and this is the treadmill version. I’m not going to keep these updated for your use here because, as I said, this is a personal Greek reader! This just to show you what I’m going for. Over time the format will get tweaked and you can watch the repo for that.
Maybe I’ll get lucky and be able to help someone out there by posting this. If so, have some code. Happy Greeking!
comments powered by Disqus