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

Adding textcase.sty test #977

Merged
merged 4 commits into from Apr 28, 2018

Conversation

Projects
None yet
2 participants
@dginev
Collaborator

dginev commented Apr 27, 2018

I was using this test to develop, but now that @brucemiller beat me to the punchline, I'm offering it as a PR to ward off regressions

@brucemiller

This comment has been minimized.

Owner

brucemiller commented Apr 27, 2018

Cool! But as long as you're testing, wouldn't it be good to embed some of the special junk (math, \ref,..) that cause it to split into separate \uppercases?

@dginev

This comment has been minimized.

Collaborator

dginev commented Apr 28, 2018

Good call with adding the complex cases. I updated with the documentation examples from CTAN at:
http://mirrors.nxthost.com/ctan/macros/latex/contrib/textcase/textcase.pdf

And regenerated the PDF and XML for the new test. I noticed two problems when inspecting by hand:

  • Unicode macro seem iffy - \ae was capitalized in the PDF, but not in the XML
  • Citations are left unfilled during core processing so the trick with renewing the \citeform macro is a no-op for latexml, and the citation text's case remains unchanged. The parts that get filled during the core processing are capitalized correctly.

But at least no errors and meaningful output! And tables, environments, math and nested groups seem to work ok.

@dginev

This comment has been minimized.

Collaborator

dginev commented Apr 28, 2018

I think I'm ready to get back to PR comments.

I pushed a commit that fixes the \ae capitalization issue, but at the cost of the custom binding for the latex-native \MakeUppercase and \MakeLowercase macros regressing.

Interestingly if I replace the binding with the raw code from latex.ltx they work again!

So feel free to examine my last commit, which should entirely fix the macro capitalization issue.

As to the citation-specific parts - it is a limitation we should probably ignore for now, until we want to model it explicitly, as you mentioned via email. Could be good to merge!

@dginev dginev force-pushed the dginev:textcase-test branch from ce10b56 to b44bee5 Apr 28, 2018

@brucemiller brucemiller merged commit 38fc034 into brucemiller:master Apr 28, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment