[Tex/LaTex] Linebreak and \enquote

csquotesline-breakingpunctuationxecjk

Using the \enquote{} command from the csquotes package my quotes seem to be wrapped to the next line a lot of times like this:

This is an "example
" sentence.

Without the extra whitespace.
Now I know I could use an \mbox{} around the \enquote{} command but this doesn't work for longer quotes, since they would protrude outside the page margin. Basically I want LaTeX to properly hyphenate words including their quotes.

Edit: Thanks for the reply but there is no white space in my quotes environment.

Edit 2: Oh poo. I think I have found the error. It seems to be a bug in the xeCJK package which is very unfortunate since I depend on it a lot. This also makes it impossible to use the \enquote{} environment inside of \chapter{} commands.

Edit 3: Alright, there are two distinctive errors here:

  1. The quotes problem. This one disappears after disabling either the xeCJK package or the babel package. Any solutions for this?

  2. There are loads of errors when using the \enquote{} command inside the \chapter{} command. This seems to stem from an incompatibility of the xeCJK package with the csquotes package. Any tips for resolving this one?

The buggy xeCJK is really quite terrible as I only have another two weeks to hand in my paper. Any help would be greatly appreciated.

Here is my minimal working example that produces the error if you remove the chapter command. Otherwise nothing is working at all:

%%%%%% Grunddeklarationen 

\documentclass[fontsize=12pt, parskip=half+]{scrreprt} % Parskip für den Abstand zwischen Absätzen

%%%%% Pakete

\usepackage[style=authortitle-dw, idembib=true, firstfull=true, nopublisher=false, idembibformat=dash, backend=biber, eprint=false, isbn=false, doi=false, url=false]{biblatex} %für deutsche bibliographie
\usepackage{fontspec} %Wichtig um Fonts systemweit zu benutzen
\usepackage{xunicode} %Unicode für Akzente? Bei Bedarf.
\usepackage{xltxtra} %xetex Extras
\usepackage[german]{babel} %Deutsche Sprachunterstützung
\usepackage[babel,german=quotes]{csquotes} % Für gute Anführungszeichen
\usepackage{xeCJK} %japanisch/chinesisch

\setmainfont[Mapping=tex-text,Ligatures=Common, Numbers=OldStyle]{Chaparral Pro}
\setsansfont[Mapping=tex-text]{Trade Gothic LT Std}
\setmonofont[Mapping=tex-text]{Lucida Sans Typewriter Std}
\setCJKmainfont{Ryo Text PlusN} %Hauptfont mit Serifen
\setCJKsansfont{Ryo Gothic PlusN} %Serifenlose Schrift

\KOMAoptions{DIV=11} % Kram für den Satzspiegel damit ca. 256 Wörter auf einer Seite sind

%%%%%%%% AB HIER FRONTMATTER %%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%% AB HIER HAUPTTEXT PASTEN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 text text text text text text text text text
 text text text text text text text text text
 \enquote{foo}

\chapter{Testing \enquote{test}}

\end{document}

Best Answer

I guess ;-)

You have an extra space before you type the closing braces.

Correct:

\enquote{foo}

False

\enquote{foo }

To demonstrate the behavior here an example:

\documentclass{article}
\usepackage{showframe}
\usepackage{csquotes}
\begin{document}
 text text text text text text text text text
 text text text text text text \enquote{foo }

 text text text text text text text text text
 text text text text text text \enquote{foo}
\end{document}

enter image description here

Related Question