3

csquote's \foreignquote{<inner lang>}{<quote>} command switch to <inner lang> before enquoting, so as a result, the enclosing quotes are those configured for <inner lang>. E.g. in an document in english, \foreignquote{french}{bonjour \enquote{salut}} gives « bonjour « salut » ».

Is there a way to do the opposite, i.e. using the outer language quotes but still switch the language inside to get “bonjour « salut »”? I have tried defining

\NewDocumentCommand\quoteforeign{m m}{\enquote{\textlang{#1}{#2}}}

(using polyglossia lang switching) but it inserts an unwanted space between the opening quote and the text. I suppose that there is a way to simply fix the command to get rid of the space, but I'd rather have a more idiomatic fix.

MCE

\documentclass[a4paper, 12pt]{article}
\usepackage{xparse}

\usepackage{polyglossia}
    \setmainlanguage{english}
    \setotherlanguage{french}

\usepackage[autostyle=true]{csquotes}

\NewDocumentCommand\quoteforeign{m m}{\enquote{\textlang{#1}{#2}}}


\begin{document}
    This \enquote{is} a test or as they say in french an \foreignquote{french}{essai or \enquote{preuve de concept}}.

    This \enquote{is} a test or as they say in french an \quoteforeign{french}{essai or \enquote{preuve de concept}}.
\end{document}

MCE result

2
  • Make a complete example. This will make it much easier to run tests. Commented Nov 18, 2019 at 14:44
  • @UlrikeFischer Woops, indeed, there it is.
    – Evpok
    Commented Nov 18, 2019 at 14:51

1 Answer 1

3

The additional space is due to a bug in gloss-french which contains a spurious space. Beside this I don't think that there is anything better than your \quoteforeign command.

\documentclass[a4paper, 12pt]{article}
\usepackage{xparse}

\usepackage{polyglossia-test}
    \setmainlanguage{english}
    \setotherlanguage{french}

\usepackage[autostyle=true]{csquotes}

\NewDocumentCommand\quoteforeign{m m}{\enquote{\textlang{#1}{#2}}}
\makeatletter
\def\french@language{%
   \polyglossia@setup@language@patterns{\french@variant}%<-- missing
}%
\makeatother


\begin{document}
    This \enquote{is} a test or as they say in french an \foreignquote{french}{essai or \enquote{preuve de concept}}.

    This \enquote{is} a test or as they say in french an \quoteforeign{french}{essai or \enquote{preuve de concept}}.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .