Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am text-typing a set of poems in Greek polytonic and my problem is that the upper case letters alignment is being set according to the accents rather than the letters themselves. Here is an example where E is not properly aligned in the middle line:

\documentclass[12pt]{book}

%\font\1="Times New Roman"
%\usepackage{fontspec}
%\setmainfont{Times New Roman}

\usepackage{polyglossia}

\setdefaultlanguage{greek}
\setotherlanguage{english}
\newfontfamily\greekfont[Script=Greek,Ligatures=TeX]{Times New Roman}

%\usepackage[english,polutonikogreek]{babel}
%\usepackage[utf8x]{inputenx}

%\usepackage{fontspec}
%\setmainfont[Ligatures=TeX]{Linux Libertine O}

\usepackage{verse}
\usepackage{marginnote}

\newcommand{\en}[1]{\foreignlanguage{english}{#1}}

\usepackage{refcount}

\begin{document}

A\\
Eτοὺς τὸ πρὶν πεφυκότας\\
ἙΘεοῦ ζῶντος εἰργάσω\\
Εἀληθεῖς προσκυνητὰς\\

\end{document}

enter image description here

In a philological text editor I have used, there was an option called "smart line start" which enabled you to align by the letters and not the accents. After some search, I haven't found something similar for latex. Is anyone of you aware of a command / package which can deal with this? Some ideas on which terminology to use to search for this would also be helpful.

Up to now the best solution I've come up with is to define commands with \hspace{} for some of the combinations of letters and accents. This is a bit cumbersome, plus I am not aware of a way to program latex to do this automatically when meeting a capital letter in the beginning of a verse. Some guidance on this direction could also solve my problem.

Thanks in advance, Marios

PS: The new command I defined for E with the above is simply:

\newcommand{\pneumae}{\hspace{-0.57mm}}

which pushes the character to the left.

share|improve this question
1  
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  yo' Feb 9 at 23:01
1  
I guess it can be done with microtype and (left margin) protrusion, but it requires computing the protrusion factors for each character. –  egreg Feb 9 at 23:13

1 Answer 1

up vote 7 down vote accepted

A full solution might use microtype and its left margin protrusion, but it requires computing the protrusion factors for each character with side accents.

Here's a quicker hack:

\documentclass[12pt]{book}

\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{greek}
\newfontfamily\greekfont[Script=Greek,Ligatures=TeX]{Times New Roman}

\newcommand{\bs}[2]{%
  \sbox0{#1}\sbox2{#2}%
  \hspace*{\dimexpr\wd0-\wd2}#2%
}

\begin{document}

\begin{verse}
Eτοὺς τὸ πρὶν πεφυκότας\\
\bs{E}{Ἑ}οῦ ζῶντος εἰργάσω\\
Εἀληθεῖς προσκυνητὰς
\end{verse}

\end{document}

The first argument to \bs is the character without side accents, to allow measuring the difference in width.

enter image description here

share|improve this answer
    
Thanks, this makes the procedure easier! –  MariosCool Feb 11 at 8:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.