-
Notifications
You must be signed in to change notification settings - Fork 18
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
Do not blindly lowercase language names #37
Conversation
Rather than that, only do that if they are completely uppercased (which is probably the cause of a \MakeUppercase e.g. in headings) This assures miced-case names such as USenglish are treated correctly Fixes issue #12.
This has been addressed. |
Looks broadly good, though I'd like some groups/private vars. Longer-term, with the |
All comments have been addressed. |
\begingroup | ||
\def\csq@tempa{#1}% | ||
\def\csq@tempb{\MakeUppercase{#1}}% | ||
\ifx\csq@tempa\csq@tempb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this test always false, given the two non equal definitions above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I forgot \MakeUppercase
is not expandable.
@josephwright please revert my commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ifx would be false even if it were expandable (but you could have fixed it with edef in that case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming that the names are always ascii (so the later \lowercase
is safe) you could do \uppercase{\def\csq@tempb{#1}}
then \ifx\csq@tempa\csq@tempb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this seems to work.
diff --git a/csquotes.sty b/csquotes.sty
index dacb622..50a5401 100644
--- a/csquotes.sty
+++ b/csquotes.sty
@@ -832,7 +832,7 @@
\def\csq@lc@if@uc#1{%
\begingroup
\def\csq@tempa{#1}%
- \def\csq@tempb{\MakeUppercase{#1}}%
+ \uppercase{\def\csq@tempb{#1}}%
\ifx\csq@tempa\csq@tempb
\lowercase{#1}%
\else
@josephwright, interested?
Rather than that, only do that if they are completely uppercased
(which is probably the cause of a
\MakeUppercase
e.g. in headings)This assures mixed-case names such as
USenglish
are treated correctlyFixes issue #12.
This revokes #13 which was screwed.
I've addressed #13 (comment)
If you dislike the approach in general, feel free to close this.