Register Guidelines E-Books Search Today's Posts Mark Forums Read

 MobileRead Forums ἐγκώμιον: A (Xe)LaTeX Poetry Template

10-17-2009, 08:41 PM   #1
ahi
Wizard

Posts: 1,791
Karma: 507333
Join Date: May 2009
Device: none
ἐγκώμιον: A (Xe)LaTeX Poetry Template

Please find attached a (Xe)LaTeX template intended for poetry or similarly short pieces of content. This is, perhaps, not entirely practical (given that most of the PDF crew probably reads novels and non-fiction rather than contemporary poetry), but I'm hoping it will illustrate that one can fairly easily take (Xe)LaTeX from bland defaults to something distinctly more.

The template is called ἐγκώμιον.

Due to the fragile nature of the verse environment, in some cases the width of the environment must be explicitly specified to avoid unsightly line-breaks. For the same reason, it would probably be difficult to make large print eBooks with this template... but with some patience and fiddling it might be doable.

Note: This is a XeLaTeX source file, so generating the PDF you need to do:

Code:
xelatex filename.tex

Code:
pdflatex filename.tex
Note: If you do not have "Garamond Premier Pro", you will need to change the font used in the source file. You need to use the "official" name (spaces and all)... something everybody should have that ought to produce similar (if perhaps lesser) results is "Palatino".

- Ahi
Attached Thumbnails

Attached Files
 encomium.pdf (115.6 KB, 517 views) encomium.zip (68.8 KB, 620 views)

Last edited by ahi; 10-17-2009 at 08:49 PM.

 10-18-2009, 03:40 AM #2 HarryT eBook Enthusiast     Posts: 67,400 Karma: 46930449 Join Date: Nov 2006 Location: UK Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7 Forgive my curiosity, but why have you called it "encomion" in Greek, but transliterated it as "encomium" in English?
 10-18-2009, 07:23 AM #3 Jellby frumious Bandersnatch     Posts: 6,606 Karma: 5002613 Join Date: Jan 2008 Location: Spaniard in Sweden Device: Cybook Orizon, Kobo Aura Doesn't the Greek "ἐγκώμιον" read "egkomion", or is gamma read as "n" before k? Other than that, for extensive poetry typesetting I like the package "poetry", which is part of the "technica" suite.
 10-18-2009, 08:18 AM #4 frabjous Wizard     Posts: 1,213 Karma: 12890 Join Date: Feb 2009 Location: Amherst, Massachusetts, USA Device: Sony PRS-505 Thanks for this, Ahi. How hard would it be to modify it to use URW Garamond from the mathdesign LaTeX package, which is freely and widely available as part of most TeX distributions anyway? You lose some advanced features (e.g., access to Old Style numerals), but it would make it far easier for someone who doesn't have hundreds or thousands of dollars to spend on fonts!
10-18-2009, 08:44 AM   #5
Latinandgreek
Warrior Princess

Posts: 5,035
Karma: 9721499
Join Date: Sep 2009
Quote:
 Originally Posted by Jellby Doesn't the Greek "ἐγκώμιον" read "egkomion", or is gamma read as "n" before k? Other than that, for extensive poetry typesetting I like the package "poetry", which is part of the "technica" suite.
Gamma is read as n (or rather as ŋ) before kappa and gamma. for example, ¥ggeloj is what english angel ultimately derives from.

Thank you for putting this up here, I've had trouble with line breaks when trying to make PDF's out of text written in dactylic hexametre, hopefully this will fix that! It looks great, I can't wait to give it a go.

10-18-2009, 11:13 AM   #6
ahi
Wizard

Posts: 1,791
Karma: 507333
Join Date: May 2009
Device: none
Quote:
 Originally Posted by HarryT Forgive my curiosity, but why have you called it "encomion" in Greek, but transliterated it as "encomium" in English?
Your curiosity is not only forgiven, but applauded!

Encomium is the latin word, which I use when writing the name in the latin alphabet. i.e.: It's a translation instead of a transcription.

Quote:
 Originally Posted by Jellby Other than that, for extensive poetry typesetting I like the package "poetry", which is part of the "technica" suite.
ἐγκώμιον is meant for poetry eBooks that wish to offer the content with a certain visual aesthetic. (And, of course, the corner.png graphics in the zip file can be easily replaced with other corner decoration. As can the patriarchal cross.)

Quote:
 Originally Posted by frabjous Thanks for this, Ahi. How hard would it be to modify it to use URW Garamond from the mathdesign LaTeX package, which is freely and widely available as part of most TeX distributions anyway? You lose some advanced features (e.g., access to Old Style numerals), but it would make it far easier for someone who doesn't have hundreds or thousands of dollars to spend on fonts!
It wouldn't be difficult at all, frabjous. I might just make a version like that of it soon (a pdftex compilable version, to be technical).

However the XeLaTeX version can readily be used with any TrueType and OpenType fonts that you do have... which, if you have either Microsoft or Adobe products installed, you almost certainly have a few of at least (high quality ones, that is).

If you are on windows systems (or can copy over .ttf and .otf fonts from your windows system to /home/user/.fonts/) try and see if you can get the template working with:

- Palatino
- Garamond
- Minion (or is it Minion Pro?)
- Bembo (or is it Bembo Pro?)

I'm sure others can suggest other good-to-high quality fonts that either ship with common software or are free to download.

But even with this version, all you have to do, Frabjous, is to change at the top of the .tex file:

Code:
\newcommand{\bookfont}{Garamond Premier Pro}
to

Code:
\newcommand{\bookfont}{Palatino}
or whichever other font you wish to try to compile with.

Quote:
 Originally Posted by Latinandgreek Thank you for putting this up here, I've had trouble with line breaks when trying to make PDF's out of text written in dactylic hexametre, hopefully this will fix that! It looks great, I can't wait to give it a go.
Due to the narrowness of the content area (made worse by the decorative corners) manual overriding of the width may be necessary for the verse environment:

Code:
\begin{verse}[60mm]
...
\end{verse}
I'm assuming that dactylic hexametre should be of a fairly constant line-width... so once you find the right width, it should be fine for the poem from beginning to end on all pages.

Make sure you try a few different widths... trying both smaller and greater... the poem should, obviously, be centered *visually* (not in terms of raw measurements) and until you've done it a few times, your instinct as to whether or not increase the width or decrease it might be off (unless of course you are increasing the width merely to get rid of unwanted line breaks).

I will definitely be making another poetry template that maximizes the content area's width... so if encomium doesn't work out, stay tuned.

- Ahi

10-18-2009, 04:40 PM   #7
frabjous
Wizard

Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
 However the XeLaTeX version can readily be used with any TrueType and OpenType fonts that you do have... which, if you have either Microsoft or Adobe products installed, you almost certainly have a few of at least (high quality ones, that is).
I generally try to stick with Open Source (or at least free-as-in-beer) software, as much as possible. I have a Windows partition on one of my computers, but it's extremely minimal. I use it only for Netflix watch instantly, and occasionally checking what a webpage I make looks like on Explorer. (Typically leading me to fume over their non-compliance with W3C standards.) I did steal the C-series fonts off of it (Cambria, Consolas, etc.) to install on Linux. I think the only Adobe product I have installed is ADE, which I use to check ePubs. I might have Acrobat reader installed, but I'm not even sure about that. I don't recall either of those coming with fonts. I might have an old copy of Acrobat Pro somewhere but I don't remember fonts coming with that either. Since I mainly use LaTeX for typesetting (and while I've played with XeLaTeX, I haven't made the switch), I haven't made a habit of collecting TrueType fonts.

Quote:
 If you are on windows systems (or can copy over .ttf and .otf fonts from your windows system to /home/user/.fonts/) try and see if you can get the template working with: - Palatino - Garamond - Adobe Garamond - Minion (or is it Minion Pro?) - Bembo (or is it Bembo Pro?)
I don't have any of those installed on any of my systems as true type or open type. I do have URW Palladio as TrueType, which is pretty much identical to Palatino, and of course, I have the Type 1 Palatino for the LaTeX pxfonts package. Not sure what the advantage would be to go with XeLaTeX and True Type fonts.

I actually don't think Garamond and Palatino look that much alike. I can easily tell them apart anyway, though perhaps either would look nice with your template.

I wonder what it would like like with Linux Libertine, though, which I have as all three formats: True Type and Open Type and Type 1, and is a pretty nice looking font in that sort of family.

I don't read a lot of poetry though, so I'm not sure that I'm going to get a lot of use out of this.

Last edited by frabjous; 10-18-2009 at 04:44 PM.

10-18-2009, 07:32 PM   #8
ahi
Wizard

Posts: 1,791
Karma: 507333
Join Date: May 2009
Device: none
Quote:
 Originally Posted by frabjous I don't have any of those installed on any of my systems as true type or open type. I do have URW Palladio as TrueType, which is pretty much identical to Palatino, and of course, I have the Type 1 Palatino for the LaTeX pxfonts package. Not sure what the advantage would be to go with XeLaTeX and True Type fonts. I actually don't think Garamond and Palatino look that much alike. I can easily tell them apart anyway, though perhaps either would look nice with your template. I wonder what it would like like with Linux Libertine, though, which I have as all three formats: True Type and Open Type and Type 1, and is a pretty nice looking font in that sort of family. I don't read a lot of poetry though, so I'm not sure that I'm going to get a lot of use out of this.
Well, I'll be making more templates, and the rest will be more general. I just wanted to start with something that I myself wasn't sure was possible in LaTeX (or, rather, possibly for me to achieve in LaTeX)... and the corner decoration was it.

I'll make a version for pdftex, which uses standard LaTeX fonts instead of truetype/opentype.

Edit: I did not mean to suggest that Palatino and Garamond necessarily look alike. They are, however, probably the most common serif fonts that are aesthetically superior to the dread Times New Roman.

- Ahi

Last edited by ahi; 10-19-2009 at 07:41 AM.

10-19-2009, 07:05 AM   #9
Jellby
frumious Bandersnatch

Posts: 6,606
Karma: 5002613
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
 Originally Posted by frabjous I don't have any of those installed on any of my systems as true type or open type. I do have URW Palladio as TrueType, which is pretty much identical to Palatino, and of course, I have the Type 1 Palatino for the LaTeX pxfonts package. Not sure what the advantage would be to go with XeLaTeX and True Type fonts.
It may be worth having a look at TeX Gyre fonts, in particular Pagella should be a replacement for Palatino.

10-19-2009, 06:49 PM   #10
ahi
Wizard

Posts: 1,791
Karma: 507333
Join Date: May 2009
Device: none
Quote:
 Originally Posted by Jellby Doesn't the Greek "ἐγκώμιον" read "egkomion", or is gamma read as "n" before k? Other than that, for extensive poetry typesetting I like the package "poetry", which is part of the "technica" suite.
Can you upload a technica-using source file, Jellby? I'm having trouble getting a start on this...

- Ahi

10-20-2009, 08:42 AM   #11
Jellby
frumious Bandersnatch

Posts: 6,606
Karma: 5002613
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
 Originally Posted by ahi Can you upload a technica-using source file, Jellby? I'm having trouble getting a start on this...
Yes, I remember is what quite strange at first. Here is the source for this book. (As a bonus, note the line numbers are not selected when selecting text in Acrobat Reader.) I found this package when looking for a way of getting verse line wraps as in page 24 of the pdf (line 9).
Attached Files
 FabulasIriarte.zip (88.1 KB, 158 views)

10-20-2009, 08:58 AM   #12
frabjous
Wizard

Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
 Originally Posted by Jellby It may be worth having a look at TeX Gyre fonts, in particular Pagella should be a replacement for Palatino.
Interesting. I have used those LaTeX packages, but I didn't know they were available in other formats. Cool.

10-20-2009, 09:00 AM   #13
ahi
Wizard

Posts: 1,791
Karma: 507333
Join Date: May 2009
Device: none
Quote:
 Originally Posted by Jellby Yes, I remember is what quite strange at first. Here is the source for this book. (As a bonus, note the line numbers are not selected when selecting text in Acrobat Reader.) I found this package when looking for a way of getting verse line wraps as in page 24 of the pdf (line 9).
Thanks, Jellby. That's not bad. I'll check out the source.

Yesterday I eventually opted to use the package dramatist for preparing színjáték, as I was unable to use technica together with memoir, and I also had no luck getting descent drama/play formatting at a 6" paper size.

Though technica is certainly compelling... so I'll revisit it. I just hope it has better internationalization (or at least readily exposed ways to compensate for the lack thereof) than dramatist. Trying to set the language to Hungarian via babel, I had all sorts of untranslated strings and even weird artefacts left where no text should have appeared at all.

- Ahi