Skip to content

Adding textcase.sty test#977

Merged
brucemiller merged 4 commits into
brucemiller:masterfrom
dginev:textcase-test
Apr 28, 2018
Merged

Adding textcase.sty test#977
brucemiller merged 4 commits into
brucemiller:masterfrom
dginev:textcase-test

Conversation

@dginev

@dginev dginev commented Apr 27, 2018

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

dginev commented Apr 28, 2018

Copy link
Copy Markdown
Collaborator Author

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

dginev commented Apr 28, 2018

Copy link
Copy Markdown
Collaborator Author

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.

2 participants