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.

Here's an example of terrible (and non-constant) leading in titles that is causing me trouble:

\documentclass[a4paper, 12pt]{memoir}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Cardo}

\begin{document}

\begin{titlingpage}
\begin{center} 
{ \fontsize{36pt}{72pt}\selectfont \bfseries A Title To Show Off The Poor Leading In Titles and How the aaaaaaaaaaaaaaaaaaaaa Skip in Fontsize is Ignored }
\end{center}
\end{titlingpage}

\end{document}

Note how the second argument in \fontsize is completely ignored. I've tried various things to fix this, to no avail. Firstly, why does it do this and, secondly, what can I do to fix it?

NOTE: I would post an example image, but I don't have enough reputation yet. Sorry.

share|improve this question
4  
Welcome to TeX.sx! As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again. –  N.N. Jul 10 '12 at 19:42
    
Fantastic, thanks very much for the useful tip. –  rbobbington Jul 10 '12 at 20:16

1 Answer 1

up vote 18 down vote accepted
\begin{titlingpage}
\begin{center} 
\fontsize{36pt}{72pt}\selectfont\bfseries A Title To Show Off 
The Poor Leading In Titles and How the aaaaaaaaaaaaaaaaaaaaa
Skip in Fontsize is Ignored
\end{center}
\end{titlingpage}

The extra braces are not necessary, as the font size declaration will end with the environment (center) it's in.

A paragraph can have only one baselineskip; what happens with the extra braces is that when TeX evaluates the end-of-paragraph the effect of the font size declaration is already finished, so the baseline skip used is the default one.

In other cases the braces may be necessary, because the font change is not in some environment; issue \par before the closing brace in those situations.

Also \selectfont is not necessary, in this case, because \bfseries executes it anyway.

The image shows "before and after" removal of the extra braces.

enter image description here

share|improve this answer
    
Excellent, thanks very much for your help. The brackets were there because in my actual document there are multiple things within the center environment, but I never thought to remove them to see what happens. –  rbobbington Jul 10 '12 at 20:17
    
@rbobbington Just add \par before the closing brace, as explained. –  egreg Jul 10 '12 at 20:20
    
@rbobbington: I don’t know the {titelingpage} environment but I prefer to use \centering instead of {center} on {titlepage} since the latter doesn’t add extra white space, i.e. vertical skips before and after it. –  Tobi Jul 10 '12 at 21:07
    
@Tobi I too thought about it. But it depends whether all elements are centered. –  egreg Jul 10 '12 at 21:09
    
Sure, but even to center only some lines I use {\centering text\par} to have a better control of the white space with \vspace. I use {center} in the document body where the extra space is desirable. :) –  Tobi Jul 10 '12 at 21:11

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.