12

Using the csquotes package and polyglossia with French, i want to transform only \foreignquote{english}{my text is write in english italics with « » typography} into italics.

\documentclass[a4paper, 12pt,twoside, openright]{memoir}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{fontspec}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}
\usepackage{xparse}
\usepackage{graphicx}
\usepackage[protrusion=true]{microtype}
\sidecapmargin{outer}
\setsidecappos{t}

\usepackage[backend=biber,backref=true, natbib=true, isbn=false, doi=false, url=false, style=authoryear,maxcitenames=1, maxbibnames=999, sorting=nyt, refsection=chapter, hyperref]{biblatex}

\addbibresource[datatype=bibtex]{library.bib}

\begin{document}

\chapterstyle{bringhurst}

\foreignquote{english}{my text is write in english italics with « » typography}

\printbibliography

\end{document}

For example on Wikipedia, the French citation page says " only use «» " : Voici « une citation en français », mais « here is a quotation in English ».

Update 1 :

Example given by egreg work only for one level of nested quote at this time, and often you can have some citation like this :

\foreignquote{english}{my text is write in english italics with « » typography, and a \foreignquote{english}{ nested level of citation like this }  }

Give something like this : « my text is write in english italics with « » typography, and a "nested level of citation" like this »

3 Answers 3

7

We can exploit the fact that \em is a switch:

\documentclass[a4paper, 12pt,twoside, openright]{memoir}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguage{english}
\usepackage{fontspec}
\usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}

\DeclareQuoteStyle{english}
  {\mkfrenchopenquote{\guillemotleft}\em}
  {\em\mkfrenchclosequote{\guillemotright}}
  {\textquotedblleft\em}
  {\em\textquotedblright}


\begin{document}

Des mots français \foreignquote{english}{with an English quote} suivi
par mots français.

\end{document}

enter image description here

10
  • Great ! thanks, that work's for all type of csquote item ?
    – reyman64
    Mar 21, 2014 at 14:13
  • @reyman64 I just duplicated the French style, adding \em for the text, so it should work as required. Please, do some experiments and report the result as I don't know how you'll be using the command.
    – egreg
    Mar 21, 2014 at 14:21
  • Hum, i test with foreignblockquote{} and italics don't work, perhaps because there is some type of recursion in this command ? Documentation says : If it exceeds the threshold, it will be wrapped in an otherlanguage* environment which is in turn wrapped in a block quotation environment.
    – reyman64
    Mar 21, 2014 at 14:32
  • is there a way to take nested \foreignquote{english} with your work, because at this time it don't work :/
    – reyman64
    May 16, 2014 at 15:43
  • @reyman64 Nested? Please, make a followup question with a proper example.
    – egreg
    May 16, 2014 at 15:49
4

How about this? It creates a new (cs-)quote style named fquotes and a corresponding command named \myfquote. (I don't know if one can define csquote command immediately, however.)

\documentclass{article}
\usepackage{csquotes}

\DeclareQuoteStyle{fquotes}
  {\em}{}{\em}{}

\newcommand*{\myfquote}[1]{%
  \begingroup%
    \setquotestyle{fquotes}%
    \enquote{#1}%
  \endgroup%
}

\begin{document}
  bla bla bla \enquote{testing \myfquote{foreign quote}} bla bla bla 
\end{document}

output

1

I have recently stumbled upon the very same problem but found a simpler and (I think) cleaner solution, as it only uses the features of the loaded packages.

\documentclass[a4paper, 12pt,twoside, openright]{memoir}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguage{english}
\newfontfamily{\englishfont}{Linux Libertine O Italic}
\usepackage{fontspec}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[autopunct,french=guillemets]{csquotes}
%\usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}
\usepackage{xparse}
\usepackage{graphicx}
\usepackage[protrusion=true]{microtype}
\sidecapmargin{outer}
\setsidecappos{t}

\usepackage[backend=biber,backref=true, natbib=true, isbn=false, doi=false, url=false, style=authoryear,maxcitenames=1, maxbibnames=999, sorting=nyt, refsection=chapter, hyperref]{biblatex}

\addbibresource[datatype=bibtex]{library.bib}

\begin{document}

\chapterstyle{bringhurst}

Essai de texte en français \foreignquote{english}{my text is write in english italics with « » typography \textquote[][]{still quoted in english}}.

\printbibliography

\end{document}

Basically, you declare \setotherlanguage{english} and then you create a new font family for this language, choosing an italic font : \newfontfamily{\englishfont}{Linux Libertine O Italic}.

Then, you remove at least the autostyle=true option when loading the csquotes package. That way, it will fall back to default autostyle=tryonce, meaning it will use the main language quotes (in your case french) even if you switch for another language somewhere in your document.

I would also recommend you leave the french=guillemets behind, first because you clearly misinterpret the Wikipedia page you're referring to and then because once you enter a foreign language you must use the typographic conventions of this language (you wouldn't put a non-breaking space before a question mark in a quote in English, would you?), so in a quote in English you must use English quotes. So using the package default (french=quotes) will be correct both for inner quotes in French or in English.

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.