Skip to content

LuaTeX linebreaks#7

Open
HermannDppes wants to merge 5 commits intopdfpc:masterfrom
HermannDppes:lualatex-fixes
Open

LuaTeX linebreaks#7
HermannDppes wants to merge 5 commits intopdfpc:masterfrom
HermannDppes:lualatex-fixes

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