1

A short description of the problem

In a bilingual document whose main language is Hebrew and whose secondary language is English, using the csquotes package to typeset quotes produces wrong quotation marks even when the active language is set to English.

A demonstration of the problem by way of a minimal working example

I will perform two "experiments" in order to compare their results. I consider the results of the first experiment as demonstrating expected, desirable behavior, whereas the results of the second experiment demonstrate unexpected, undesirable behavior.

Experiment 1: Expected, desirable behavior

I saved the following LaTeX code in ~/Test.tex.

\documentclass{article}
%\usepackage[bidi=basic,english,hebrew,provide=*]{babel}
%\babelfont{rm}[Renderer=HarfBuzz]{FreeSerif}
\usepackage{csquotes}
\begin{document}
%\selectlanguage{english}
\enquote{hello}
\end{document}

The code typesets the word hello as a quote, using the quoting mechanism provided by the package csquotes.

I then executed the following commands in the Terminal:

> cd ~
> lualatex Test

The compilation completed successfully. The file ~/Test.log contained no warnings. As a result of the compilation, the file ~/Test.pdf was created. When opened in a PDF viewer, the file displayed as follows. (I screenshot only the relevant part of the display.)

Quoting in an English document

Experiment 2: Unexpected, undesirable behavior

In the LaTeX code listed above I uncommented the three commented-out lines. The resulting code uses the babel package to configure the document's main language as Hebrew, and the document's secondary language as English. The document's body sets the active language to be English, and then typesets the word hello as a quote, using the quoting mechanism provided by the package csquotes.

Compiling as before, the compilation completed successfully, however ~/Test.log contained a single warning:

Package csquotes Warning: No style for language 'hebrew'.
(csquotes)                Using fallback style on input line 7.

And ~/Test.pdf displayed as follows.

Quoting in a bilingual Hebrew-English document

As can be seen, the quotation marks used are ? rather than " as in the first experiment.

Questions

  1. In the second experiment, why didn't the quotation marks typeset as " as in the first experiment, despite the fact that the active language at the time the quote was typeset was English?

  2. How to change the second example in such as a way as to achieve a correct typesetting of English quotations, while keeping the document a bilingual Hebrew-English document as configured by babel?

Similar questions

This question is similar to mine, however in that question the English quotation marks are typeset correctly, whereas in mine they are not.

2
  • 1
    by default csquotes uses the quotes of the main language, you should load it with \usepackage[autostyle]{csquotes} if you want that it adapts the quotes to the "local" language. Commented Jan 19, 2023 at 11:12
  • @UlrikeFischer Thanks. This solves the problem.
    – Evan Aad
    Commented Jan 19, 2023 at 11:18

1 Answer 1

1

By default csquotes uses the quotes of the main language.

You should load it with \usepackage[autostyle]{csquotes} if you want that it adapts the quotes to the "local" language.

You must log in to answer this question.

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