Skip to content

Verbatim line breaking issue #1803

Answered by Omikhleia
hlandau asked this question in Q&A
Discussion options

You must be logged in to vote

@hlandau I moved the topic to Q&A discussions, I don't think it is a bug issue.

This said, here is a "hack", among all the possibilities.
It's clearly ugly to tweak the letter space logic this way, introducing (breakable) glues between nearly every character.
Anyway...

\begin[papersize=a6]{document}
\use[module=packages.verbatim]
\lua{
local class = SILE.documentState.documentClass
class:registerCommand("my-ugly-verbatim", function (_, content)
  local savedLetterSpace = SILE.nodeMakers.unicode.letterspace
  SILE.nodeMakers.unicode.letterspace = function (self)
    if self.token then self:makeToken() end
    if self.lastnode and self.lastnode ~= "glue" then
      coroutine.yield(SILE.node…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hlandau
Comment options

Answer selected by hlandau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Ask for advice or investigate solutions
2 participants
Converted from issue

This discussion was converted from issue #1798 on May 12, 2023 18:40.