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

LuaTeX linebreaks #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

HermannDppes
Copy link
Contributor

When I implemented the unicode support for LuaTeX, I just plain forgot to test for the linebreaking behaviour in the notes. Consequently, there is no linebreaking currently and \\ does not work as advertised. This PR should not be merged but after some discussion either thrown away or cherry-picked, squashed and rebased.

Less relevant changes:

  • Since stringenc is currently implied by hyperxmp anyway, I moved it out of the LuaTeX conditional.
  • I updated the required packages in the documentation (but b754dd7 did that, too).

Relevant changes:

  • This monstrosity of a code runs through the hex expansion of the UTF-16BE encoding and looks for double backslashes which it then turns into line feeds.

Caveats:

  • I tried for a bit to find a cleaner solution, but as I did not find any and I felt responsible for screwing that up, I decided to sit down and try for the ugly (but hopefully working) one.
  • I have definitely not tested this code thoroughly so far. I do not expect it to be bug-free as-is.

Going forth:

  • Do you want to go for the ugly solution as presented here?
  • If so, I'm planning to create some sort of test-suite (though I'm not quite sure how yet).
  • Obviously, I'm not the best judge whether I've covered all the (edge)cases, so if people (including non-maintainers) have the time, I'd definitely welcome ≥4 eyes of scrutiny so I'll lose less sleep over this. ^^

@HermannDppes
Copy link
Contributor Author

I had at some point convinced myself that the hyperref option I was exploring for PDFTeX did not work for LuaTeX but right now I tested it and it seemed to work? So that might be a cleaner way to do it unless taking on hyperref seems like a larger detriment than pdftexcmds.

@HermannDppes
Copy link
Contributor Author

I do not expect it to be bug-free as-is.

For example, even though it should not have made any difference in the result, checking for surrogate pairs was entirely unnecessary …

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant