2

For a larger book project containing two languages I use polyglossia with the babelshorthands option. For the German style quotes I used the shorthands "` (opening) and "' (closing). This worked perfectly.

Now that I got the layout rules from my publisher I have to change all quotation marks to guillemets. I did this by loading csquotes with the german=guillemets option.

But only with partial success. All biblatex references correctly use guillemets now, also all quotes that are envoked with \enquote. But all quotations using the mentioned shorthand still use the normal German style of quotation marks.

Alas, I do not have the extra two months of time to replace all the shorthands with a correct \enquote command. How do I tell csquotes to interpret the shorthands according to the default setting? Or where else do I find this configuration?

MWE:

\documentclass[10pt]{book}
\usepackage[paperheight=22.2cm,paperwidth=14cm,bottom=2.11cm,top=1.6cm,right=1.6cm,textwidth=10.8cm,textheight=18.49cm,includeheadfoot]{geometry}
\setlength{\parindent}{3.5mm}
\usepackage{ebgaramond}
\usepackage[german=guillemets]{csquotes}

\usepackage{polyglossia}%
\setmainlanguage[babelshorthands=true]{german}
\setotherlanguage{hebrew}
\defaultfontfeatures{RawFeature={-clig}}
\setmainfont[Mapping=tex-text,Numbers=OldStyle,Ligatures=TeX]{EB Garamond}
\addfontfeature{Language=German}
\newfontfamily\hebrewfont{Linux Libertine O}

\begin{document}

Quotation with enquote looks like \enquote{this}.

Quotation with babelshorthands  looks like "`this"'. Which is not intended.

\end{document}
2

I could get it to work with \defineshorthand (but I had to trim down your example, for I miss stuff in my system which was required to build it).

\documentclass{book}

\usepackage{fontspec}
\setmainfont{URW Palladio L}

\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{german}

\usepackage[german=guillemets]{csquotes}

\defineshorthand{"`}{\openautoquote}
\defineshorthand{"'}{\closeautoquote}

\begin{document}

Quotation with enquote looks like \enquote{this}.

Quotation with babelshorthands also looks like "`this"'. Which is what is sought for.

\end{document}

% Local Variables:
% TeX-engine: xetex
% End:

enter image description here

  • Great, thank you! The clue was to invoke \defineshorthand after polyglossia package is loaded. Stupid me. Could you add that to your answer? (And I'll delete this utterly wrong sentence from my question). – shevek Feb 3 at 20:19
  • @shevek You probably have to call it after babelshorthands has been specified. – gusbrs Feb 3 at 20:55

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.