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

Adding textcase.sty test #977

Merged
merged 4 commits into from Apr 28, 2018
Merged

Conversation

dginev
Copy link
Collaborator

@dginev 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
Copy link
Owner

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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!

@brucemiller brucemiller merged commit 38fc034 into brucemiller:master Apr 28, 2018
@dginev dginev deleted the textcase-test branch March 20, 2019 22:28
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

Successfully merging this pull request may close these issues.

None yet

2 participants