1

I am trying to produce an A4 page for our doors. I have used LuaLaTeX. In the spirit of exploration, I tried to use \begin{czech} and \begin{english} from polyglossia package. The MWE is this:

\documentclass[12pt,a4paper,landscape,oneside]{minimal}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{czech}
\setotherlanguage{english}

\begin{document}
\begin{center}

\begin{czech}
\fontsize{1.5cm}{1em}\selectfont
\textsc{Až projdete, \textbf{otočte} se a ujistěte se, že jsou \textbf{dveře \underline{úplně zavřené}}.} \\
\end{czech}
\hrule
\begin{english}
\fontsize{1.5cm}{1em}\selectfont
\textsc{After you walk through, \textbf{turn around} and make sure the \textbf{door is \underline{completely closed}}.}
\end{english}

\end{center}
\end{document}

The resulting document looks like this:

result

Notice how the line spacing is different for the English message part. Commenting out the polyglossia language selections fixes the result for me.

Why is using the \begin{english} breaking the line spacing and how can I avoid it / fix it?

UPDATE

It appears that 1em is not accepted format of the size for the \fontsize macro. Using 1.8cm works and fixes the issue.

wilx
  • 2,339
  • 2
    You are using a much too small baselineskip (1em). Use something like \fontsize{1.5cm}{1.8cm}\selectfont. And add a \par before closing the language environments. The czech is faulty too but there the accents forces the lines more apart. – Ulrike Fischer Dec 09 '14 at 12:37
  • It has nothing to do with english. Leave the \fontsize and the exglish text and you will see the same thing. Not sure why, but it is a bit odd to have a line spacing that is smaller than the font size. – daleif Dec 09 '14 at 12:38

2 Answers2

5

You have several errors in your example code.

  1. You should never set the baselineskip less than the font size for typesetting a paragraph, or the spacing between lines will be uneven.

  2. You should set the font size in the whole center environment.

  3. Before and after the \hrule some vertical space is needed.

  4. You should never use the minimal class.

Here's a fixed version, you might want to adjust the baselineskip.

\documentclass[12pt,a4paper,landscape,oneside]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{fix-cm} % for avoiding spurious error messages

\setdefaultlanguage{czech}
\setotherlanguage{english}

\begin{document}
\pagestyle{empty}

\begin{center}
\fontsize{1.5cm}{1.8cm}\selectfont

\begin{czech}
Až projdete, \textbf{otočte} se a ujistěte se,
že jsou \textbf{dveře \underline{úplně zavřené}}.\\
\end{czech}

\bigskip
\hrule
\bigskip

\begin{english}
After you walk through, \textbf{turn around} and make
sure the \textbf{door is \underline{completely closed}}.
\end{english}

\end{center}
\end{document}

I removed \textsc because the Latin Modern fonts don't have bold small caps.

enter image description here

egreg
  • 1,121,712
2

As mentioned in the comments, the fontsize is the culprit here. See the proposed change below. I have added a \vspace{1em} to create some more distance between the underline and the separating line and before the English part. Drop either one of these if it suits you.

\documentclass[12pt,a4paper,landscape,oneside]{minimal}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fontspec}
\usepackage{polyglossia}

\setdefaultlanguage{czech}
\setotherlanguage{english}

\begin{document}
\begin{center}

\begin{czech}
\fontsize{20mm}{24mm}\selectfont
\textsc{Až projdete, \textbf{otočte} se a ujistěte se, že jsou \textbf{dveře \underline{úplně zavřené}}.} \\
\end{czech}
\vspace{20mm}
\hrule
\vspace{1em}
\begin{english}
\fontsize{20mm}{24mm}\selectfont
\textsc{After you walk through, \textbf{turn around} and make sure the \textbf{door is \underline{completely closed}}.}
\end{english}

\end{center}
\end{document}