12

This is a series of books, the margins, page sizes are all identical. Depends on the content, the design of inner pages are slightly different, i.e. different type sizes, leading, etc.

The question is: I would like to set a consistent cover design through out the series with simple title and author.

Here is how I did it:

\clearpage
\pagestyle{empty}
\begin{center}
\fontsize{17pt}{19pt}\rmfamily The Metamorphosis
\vspace*{8pt}
\fontsize{14pt}{14.5pt}\it Franz Kafka
\vfill{}
\end{center}
\pagebreak{}

the typography aspect:

\usepackage{ebgaramond}
\usepackage[T1]{fontenc}

\input{glyphtounicode}
\pdfgentounicode=1

However, I found a small inconsistency in the author alignment—it is just a fractional difference across the series, very annoying. Please see the blue line. I thought I had not refer to any preamble so that such design will be independent, but somehow there is something that still exerts influence on the typeset. Wondered if anyone can spot it? The document class is Book, KOMA Script.

leading difference

Update A:

The problem seems to be caused by certain combination of letters in both title and author. Please find the following example, once I introduced certain letters, the leading is changed by the system.

enter image description here

egreg
  • 1,121,712
Shi Yuan
  • 895
  • What if you add a \vphantom{p} near "Howards End" ? – Lionel MANSUY Feb 05 '13 at 17:32
  • @LionelMANSUY it doesn't do much Lionel... – Shi Yuan Feb 05 '13 at 17:42
  • 2
    It is minor tinkering by the TeX engine. Kafka has the lowecase 'f', whereas Forster doesn't. Can you try Forsterf and see if they are the same? – yannisl Feb 05 '13 at 18:47
  • @YiannisLazarides you are right! I have to introduce descenders into the title in order to replicate this! – Shi Yuan Feb 05 '13 at 19:13
  • @YiannisLazarides it seems to be an automatic thing, if that is the case, it is not a big deal. I was worrying that it might related to certain parameters which may exasperate in later days. however, still would like to fix it though.... – Shi Yuan Feb 05 '13 at 19:16
  • 1
    Might this help? http://tex.stackexchange.com/questions/86569/creating-uniformly-sized-boxes-around-text/86592#86592 – Ethan Bolker Feb 05 '13 at 19:47
  • @ShiYuan I would recommend against any tinkering. What if the author is Hàn Thế Thành? Some fonts also the baseline is NOT at the bottom of the letters. – yannisl Feb 05 '13 at 19:48
  • 3
    @ShiYuan To fix use a strut see http://tex.stackexchange.com/a/7531/963 – yannisl Feb 05 '13 at 19:56
  • @YiannisLazarides Struts would solve the problem, but introduce another one: the distance between baselines can be predicted only by knowing the height and depth of both struts. In this case it would be 16.2pt (plus the explicit additional 8pt, for a total of 24.2pt); there is a formula, but I believe that setting a correct baselineskip is much easier as it doesn't require any computation. – egreg Feb 05 '13 at 22:29
  • 1
    Just to keep the site consistent; would not a tag like [tag:vertical-alignment] or [tag:spacing] be more accurate than [tag:horizontal-alignment]? – Johan_E Feb 05 '13 at 22:43

1 Answers1

16

The problem is due to your setting of the baseline skip, that is too small, so in one case it makes the \lineskip glue to come into action.

Indeed, if you say \vspace*{9pt} before "E. M. Forster" you get almost perfect alignment, as the difference of a bit less than 0.025pt is very tiny; the default value of \lineskip is exactly 1pt.

The descender in "Metamorphosis" is the factor that triggers insertion of \lineskip glue.

Let's do some computations; the depth of the "p" in the title line is 4.87898pt, the height of "Franz Kafka" in the author line is 9.646pt and the sum is 14.52498pt, which is bigger than the current value 14.5 of the baselineskip when the lines are to be set on the page, so the \lineskip glue is inserted.

Indeed, if we try with \fontsize{14}{15} for the author line, the alignment is perfect. However, I'd be more generous with the baseline skips, so to be sure these problems don't appear.

enter image description here

In all cases I've added \par (an empty line is the same) just before \vspace*{8pt}, or there wouldn't be two lines.

Some theory

When TeX breaks paragraphs into lines it stacks the lines one above the other with some glue between them. When a paragraph is finished, another one is typeset and put on the galley in the same way.

The distance from the baseline of a line (where the letters sit) to the following is, normally, regulated by the value of \baselineskip current for the line below (the value can change only when two distinct paragraphs are concerned, because only one value of \baselineskip is used for a single paragraph).

When stacking two lines, TeX computes the depth d of the line above (how much it sticks down the baseline) and the height h of the line below (how much it sticks over the baseline). If b is the value of \baselineskip (for the paragraph the second line belongs to), TeX computes

b - (d + h)

and, if the result is less than the current value of \lineskiplimit (default 0), TeX inserts \lineskip glue. Otherwise the glue inserted is exactly b - (d + h).

Let's assume b = 14.5pt.

In the first case the distance between the baselines will be

d + 1pt + h = 4.87898pt + 1pt + 9.646pt = 15.52498pt

In the second case, the depth of the line above is 0.31448pt and the height of the line below is 9.07199pt, so

b - (d + h) = 14.5pt - 9.38647pt = 5.11353pt

and this will be the glue inserted, making the distance exactly 14.5pt.

To this distance explicit (\vspace) or implicit (\parskip) glues are added. Thus the final distance between the baselines will be 23.52498pt for Kafka and 22.5pt for Forster.

The computations show why using b = 15pt doesn't show the problem.

egreg
  • 1,121,712