3

Supposedly, LaTeX puts a double space after a . (end of sentence), which can be suppressed by a following backslash .\. However, this does not seem to work in LaTeX beamer class. See the following MWE:

\documentclass[11pt]{beamer}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenx}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{verbatim}
\usepackage{ragged2e} 

\title{Beispiel in \LaTeX}
\author{rotton}

\begin{document}

\section{Horizontale Abstände}

\begin{frame}{Punkttest}
Nach Punkt: Stets doppeltes Leerzeichen, unterdrücken mit \texttt{.\textbackslash} : \\
\textbf{Flattersatz, linksbündig} \\
Prof.\ Dr.\ rer.\ nat.\ habil.\ Müller und noch etwas Text bis zum Zeilenende \\
Prof. Dr. rer. nat. habil. Müller und noch etwas Text bis zum Zeilenende

\justifying
\textbf{Der Rest im Blocksatz} \\
Prof.\ Dr.\ rer.\ nat.\ habil.\ Müller und noch etwas Text bis zum Zeilenende \\
Prof. Dr. rer. nat. habil. Müller und noch etwas Text bis zum Zeilenende

\end{frame}

\end{document}

I thought this was due to the ragged-right alignment, but even with \justifying, those spaces do not change at all! Horizontal spacing after period in beamer Can anyone explain this? Is it possible to obtain the default spacing behavior in beamer, and if, how?

  • 1
    This is as a result of using \usepackage[ngerman]{babel}. So yes, it's possible to obtain the default spacing behaviour in beamer after removing said package... :) – Werner Feb 1 '17 at 8:01
  • Ah, so this package option implicitly sets \frenchspacing? Is it possible to restore the default behavior somehow? Nevermind, seems I've found it. – rotton Feb 1 '17 at 8:07
  • 2
    You can issue \nonfrenchspacing. – Werner Feb 1 '17 at 8:08
5

Loading \usepackage[ngerman]{babel} issues \frenchspacing, which affects the spacing (effectively suppressing them) around certain punctuation. These include ., ?, !, :, ; and ,. You can reverse this by issuing \nonfrenchspacing:

enter image description here

\documentclass[11pt]{beamer}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ragged2e} 

\title{Beispiel in \LaTeX}
\author{rotton}

\begin{document}

\nonfrenchspacing

\section{Horizontale Abstände}

\begin{frame}{Punkttest}
Nach Punkt: Stets doppeltes Leerzeichen, unterdrücken mit \texttt{.\textbackslash} : \\
\textbf{Flattersatz, linksbündig} \\
Prof.\ Dr.\ rer.\ nat.\ habil.\ Müller und noch etwas Text bis zum Zeilenende \\
Prof. Dr. rer. nat. habil. Müller und noch etwas Text bis zum Zeilenende

\justifying
\textbf{Der Rest im Blocksatz} \\
Prof.\ Dr.\ rer.\ nat.\ habil.\ Müller und noch etwas Text bis zum Zeilenende \\
Prof. Dr. rer. nat. habil. Müller und noch etwas Text bis zum Zeilenende

\end{frame}

\end{document}
  • Related: Double space between sentences. – Werner Feb 1 '17 at 8:18
  • Got it. Does \nonfrenchspacing apply globally, or only from the point where it is inserted til the end of the document? – rotton Feb 1 '17 at 8:33
  • @rotton: From where it's called. I've placed it immediately after \begin{document} in order for the effect to be visible globally. You should also be able to use \AtBeginDocument{\nonfrenchspacing} within the preamble. – Werner Feb 1 '17 at 17:36

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.