Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyglossia vs. Csquotes #421

Closed
DenMesh opened this issue May 20, 2020 · 6 comments
Closed

Polyglossia vs. Csquotes #421

DenMesh opened this issue May 20, 2020 · 6 comments
Milestone

Comments

@DenMesh
Copy link

DenMesh commented May 20, 2020

\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage{russian}
\setotherlanguage{english}
\defaultfontfeatures{Ligatures=TeX}

\setmainfont{Liberation Serif}
\setsansfont{Liberation Sans}
\setmonofont{Liberation Mono}

\usepackage{csquotes}
	\MakeOuterQuote{"}

\begin{document}

\enquote{в кавычках}% line 1

"ещё в кавычках"% line 2

\end{document}

Line 1 produces expected results; line 2 outputs two ". If I change the style (ex. using the style option for package) it correctly changes line 1 but still ignores line 2.

Polyglossia 2020/04/08 v1.49
Csquotes 2019-12-06 v5.2j

Log file attached
debug.log

I first reported this behavior to the Csquotes issues josephwright/csquotes#44 , but was told it was Polyglossia overwriting Csquote's settings. Am I doing something wrong in the MWE or is this (somehow) intended behavior?

@jspitz
Copy link
Collaborator

jspitz commented May 20, 2020

You can't use " as active quote character with polyglossia language that feature babelshorthands (such as Russian), as this also activates the " char.

Long term, we need to find a way to only activate it if babelshorthands are actually used. But currently, this is not possible.

@DenMesh
Copy link
Author

DenMesh commented May 20, 2020

Can I manually disable babelshorthands then? Or somehow force csquote's activation over polyglossia's?

@jspitz
Copy link
Collaborator

jspitz commented May 21, 2020

You can remove or comment out the following block from gloss-russian.ldf:

\ifcsundef{initiate@active@char}{%
  \input{babelsh.def}%
  \initiate@active@char{"}%
  \shorthandoff{"}%
}{}

jspitz added a commit that referenced this issue May 21, 2020
Otherwise we overwrite other activations (such as csquotes')

Addresses #421
@jspitz
Copy link
Collaborator

jspitz commented May 21, 2020

Actually, the fix was easier than I thought. Fixed at af00c26 for next polyglossia version.

@jspitz jspitz added the FIXED IN DEV This bug is fixed for the next release label May 21, 2020
@jspitz
Copy link
Collaborator

jspitz commented May 21, 2020

The bug was that we used \deactivate@char{"} in \noextras@russian and friends unconditionally. This changed the active state that was set by csquotes.

Now we only do that if babelshorthands=true.

@DenMesh
Copy link
Author

DenMesh commented May 21, 2020

Manually updated the lines I needed and yep, works as a charm. Thanks!

@jspitz jspitz closed this as completed Oct 9, 2020
@jspitz jspitz removed the FIXED IN DEV This bug is fixed for the next release label Oct 9, 2020
@jspitz jspitz added this to the 1.50 milestone Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants