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

French space for guillemets #141

Closed
maieul opened this issue Apr 13, 2016 · 26 comments
Closed

French space for guillemets #141

maieul opened this issue Apr 13, 2016 · 26 comments

Comments

@maieul
Copy link
Contributor

maieul commented Apr 13, 2016

The @hugoroy commit 6bcba5a breaks the csquotes french guillemets

Cf this MWE

_\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage{english}
\usepackage[french=guillemets]{csquotes} \MakeOuterQuote{"}
\begin{document}
\enquote{s}

"s"

\enquote{x}

«x»_
\end{document}
Before the commit
before.pdf

After the commit

after.pdf

cf @aurelberra

@reutenauer
Copy link
Owner

Hum, that’s bad, thanks for the report. I’ll have a look.

@maieul
Copy link
Contributor Author

maieul commented Apr 13, 2016

I think the problem is that \MakeOuterQuote{"} already insert a space,

cf

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage{english}
\usepackage[french=guillemets]{csquotes} \MakeOuterQuote{"}
\makeatletter
\apptocmd{\french@punctuation}{%
     \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "«  " -> "«~"
     \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% "  »" -> "~»"  
}{}{}
\makeatother
\begin{document}
\enquote{s}

"s"

\enquote{x}

« x »

" s "

«x»
\end{document}

@reutenauer
Copy link
Owner

Yes, clearly there’s a conflict between the two requirements. It’s really not clear to me what’s the best choice is.

@aurelberra
Copy link

Indeed. Uncommenting the lines which deal with 255 + quotes in
gloss-french.ldf solves the problem, I think.

A.
On mer. 13 avr. 2016 at 16:10, Maïeul Rouquette notifications@github.com
wrote:

I think the problem is that \MakeOuterQuote{"} already insert a space,

cf

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage{english}
\usepackage[french=guillemets]

{csquotes} \MakeOuterQuote{"}
\makeatletter
\apptocmd{\french@punctuation}{%
\XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "« " -> "«"
\XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% " »" -> "
»"
}{}{}
\makeatother
\begin{document}
\enquote{s}

"s"

\enquote{x}

« x »

" s "

«x»
\end{document}


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#141 (comment)

@maieul
Copy link
Contributor Author

maieul commented Apr 13, 2016

@aurelberra it solves our problem, but reinstalls @hugoroy problem :-)

@aurelberra
Copy link

Yes, sorry: I had missed the motivation for the commit. But isn't it a
clear logical principle to simplify input (" or «) or make it semantic
(\enquote) rather than mix it with presentation of the content («\space) ?

On mer. 13 avr. 2016 at 16:13, Maïeul Rouquette notifications@github.com
wrote:

@aurelberra https://github.com/aurelberra it solve us problem, but
reinstall @hugoroy https://github.com/hugoroy problem :-)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#141 (comment)

@maieul
Copy link
Contributor Author

maieul commented Apr 13, 2016

Yes, sorry: I had missed the motivation for the commit. But isn't it a
clear logical principle to simplify input (" or �) or make it semantic
(\enquote) rather than mix it with content (�\space) ?

yes indeed, but it should be to automatically clean the �\space, and I think Arthur will find the way ;-)

@maieul
Copy link
Contributor Author

maieul commented Apr 19, 2016

hi @reutenauer some news about this issue ?

@maieul
Copy link
Contributor Author

maieul commented May 1, 2016

\XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace\ignorespaces}% "« " -> "«~"
seems to be the good one. Allow both « s » and «s»

@maieul
Copy link
Contributor Author

maieul commented May 1, 2016

ah thats does not work for " s "

@maieul
Copy link
Contributor Author

maieul commented May 1, 2016

but for " s " concerned csquotes, and so it is a bug in this one. So I suggest to integrate my solution, and I will open an issue for csquotes.

@hugoroy
Copy link
Contributor

hugoroy commented May 1, 2016

\XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace\ignorespaces}% "« " -> "«~"
seems to be the good one. Allow both « s » and «s»

No because it does not work for «s» or « s » (with non breakable space character)

@maieul
Copy link
Contributor Author

maieul commented May 2, 2016

hum, in this case I afraid the only solution will be to add an option.
But the default one should be the historical behavior: automatically inserting space.

@hugoroy
Copy link
Contributor

hugoroy commented May 2, 2016

Wouln't be better fixed in csquotes? If I understand correctly, everything works fine except in combination with csquotes.

@maieul
Copy link
Contributor Author

maieul commented May 3, 2016

hum… maybe we should test for «s» in csquotes.

@hugoroy
Copy link
Contributor

hugoroy commented May 3, 2016

Yes I think so, especially because this facilitates compatibility with document written with babel/latex in mind and probably other contexts as well.

Envoyé de mon appareil mobile.
Sent from my mobile device.

@aurelberra
Copy link

I also think that this is to be dealt with in the csquotes issue opened by @maieul.

@maieul
Copy link
Contributor Author

maieul commented Jan 28, 2017

The csquotes mainteners close the issue.

I suggest to revert the commit @hugoroy and to come back to the previous behavior. No one should add space around guillemet in the code.

Maybe we could get the code of @hugoroy as an option, but not the default behavior.

@aurelberra
Copy link

I fully agree with @maieul's proposal. Such spaces should be an option.

@aurelberra
Copy link

I would like to know if there has been any progress on this problem. Cf. #145.

maieul added a commit to maieul/polyglossia that referenced this issue Apr 5, 2017
…emets (problem introduced by 6bcba5a)

With this, the example in this MWE are working
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage{english}
\usepackage[]{csquotes}
 \MakeOuterQuote{"}
 \begin{document}

 \enquote{x}

 «a»

 « a »

 " a "
 \end{document}
@ArchangeGabriel
Copy link

ArchangeGabriel commented Apr 5, 2017

I’m not sure what this issue is about, but I personally type thing as « s » or « s » when unbreakable spaces are not supported by the other people working with me on a doc. Because I want my source code to already be the most typographically right as possible.

Anyway, I’ve been using Babel for a long time now since it now seems to be superior to polyglossia, at least for my use.

@maieul
Copy link
Contributor Author

maieul commented Apr 6, 2017 via email

@ArchangeGabriel
Copy link

I’m concerned about being able to extract my “code” and use it in something else than a LaTeX document without having to run a script on it or modify things by hand. But anyway, I’m not an user of polyglossia, so if you’re all fine with that then it’s your right. ;)

@jspitz
Copy link
Collaborator

jspitz commented Aug 26, 2019

This problem is apparently solved in current master. The MWE

% !TeX TS-program = xelatex
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage{english}
\usepackage[french=guillemets]{csquotes}
\MakeOuterQuote{"}

\begin{document}
	\enquote{x}
	
	"x"
	
	\enquote{x}
	
	«x»
	
	« x »
\end{document}

comes out with the same spacing in all quote variants (see
texstudio_fFbKBr.pdf).

@maieul if this output looks correct to you, please close the ticket.

@maieul
Copy link
Contributor Author

maieul commented Aug 26, 2019

yes, of course, I did the pull request. @jspitz are you the new maintener for polyglossia?

@maieul maieul closed this as completed Aug 26, 2019
@reutenauer
Copy link
Owner

No, he’s just a volunteer.

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

6 participants