7

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}
6

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

  • Thanks for the reply, didn't work though. :( – Kvsieb Feb 7 '12 at 5:03
  • No, that's not true. xeCJK treats as a CJK punctuation but not a german punctuation. A line break is enabled after then. – Leo Liu Feb 12 '12 at 5:18
2

Make sure that you're using latest xeCJK package. There is a bug fix about quotes in xeCJK 2012/01/31 v2.4.5. I'm sorry for the bugs.

xeCJK treats as a CJK punctuation but not a german punctuation. A line break is enabled after then. For new version of xeCJK, \textquoteleft, \textquoteright, \textquotedblleft, \textquoteright are patched to be treated as western punctuations only, csquotes package can work properly. And you should always use and only for CJK texts.

There are some symbols used both in east Asian scripts and western scripts. xeCJK is designed for CJK scripts, and treats these ambiguous symbols as CJK ones. You can use \makexeCJKactive and \makexeCJKinactive to turn on and off xeCJK if you wish.


Related Question:

xeCJK messes with punctuation

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.