10

I'm embarking on a journey to create a conference abstract book using XeTeX and got stuck within five minutes:

enter image description here

The missing 'g' in 'somethin' influences the line height of the following line. How can I correct this?

At the end I want to be able to include the abstracts and corresponding information through our online registration system, so this should be a global setting.

My MWE:

\documentclass[10pt, a5paper]{article}
\usepackage{fontspec}

%% GEOMETRY
\usepackage[left=2cm, right=1.5cm]{geometry} % to change the page dimensions

\newenvironment{AbsHead}
{
    \fontsize{16}{22}\headfont\noindent
}%
{
    \vspace{0.5 cm}
}

\newenvironment{AbsAuthors}
{
    \fontsize{12}{14}\authorfont\noindent
}%
{
   \vspace{0.5 cm}
}

\begin{document}

\setmainfont{Minion Pro}
\newfontfamily\authorfont{Helvetica Neue Light}
\newfontfamily\headfont{Helvetica Neue Condensed Bold}

\begin{AbsHead}The XIAP  something something something somethin somethin somethin somethin somethin somethin somethin something something\end{AbsHead} 

\begin{AbsAuthors}Somebody Someone\end{AbsAuthors} 

\noindent Purpose: Lorem ipsum
\end{document}

2 Answers 2

11

\fontsize{}{}\selectfont changes the font size and the baseline setting, but the font change happens immediately but the baseline that is used is the one in effect at the end of the paragraph, so you need to ensure that the paragraph ends within the scope of the change.

Not

\newenvironment{AbsHead}
{
    \fontsize{16}{22}\headfont\noindent
}%
{
    \vspace{0.5 cm}
}

But

\newenvironment{AbsHead}
{
    \fontsize{16}{22}\headfont\noindent
}%
{
    \par
    \vspace{0.5 cm}
}

Or better not to use \noindent and instead

\newenvironment{AbsHead}
{   \setlength\parindent{0pt}%
    \fontsize{16}{22}\headfont
}%
{
    \par
    \vspace{0.5 cm}
}
0

You can always add a strut (an invisible character of maximum vertical size). That way every line will think it has a "g" in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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