-
Long lones of text (e.g. SHA512 hashes) in verbatim blocks run beyond the text area (and off the end of the page), unlike for text which contains spaces. $ sile --version
SILE v0.14.9 (Lua 5.3) |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
If the question is not just theoretical (a SHA512 in print, really?), what is the expectation on where to break such text? |
Beta Was this translation helpful? Give feedback.
-
I'm exploring the viability of sile and other solutions for unattended typesetting... Long lines of text are certainly possible in transcripts of terminal output and it can't be guaranteed there's any spaces in that text. This pipeline of mine would handle arbitrary documents in an automated fashion, so these cases would need to be handled sensibly. Suboptimal linebreaking is OK, so long as it doesn't run off the text area. Would it be possible? |
Beta Was this translation helpful? Give feedback.
-
Yes, that would be doable, and I can even think of several ways to achieve it :)
But I'll be real honest, I am not sure how it really relates to "the viability" of a solution (would it be SILE or another). As I use to say to friends (whatever tool they are using), the ultimate aim is before all about getting typography done right in print-like quality, but please "Be Good Typographers"... Breaking lines at random points cannot be good typography, however one looks at it, it can only be a last-chance way of handling bad things with a weird fallback ultimately, IMHO. Also, as of "viability" of a typesetting software is concerned, is "verbatim" the right thing to pick and compare? (This is a serious question.) Nevertheless, I can however imagine and code such a thing -- One good point about SILE is that nearly everything is replaceable, so everything doable in Lua can make its way into it even in the most obscure place of it (i.e. it's not limited to a few hooks, literally everything is replaceable)... But as for the standard distribution, this shouldn't be the role of the "default" environments such as There are no dumb questions, and yours is certainly not2. The question however still boils down to what would be the best typographic approach. Do you really think "random breaks" (likely unnoticed) are more satisfying than an overfull line (that one can notice and add a manual Footnotes
|
Beta Was this translation helpful? Give feedback.
-
It's certainly true that an unattended typesetting flow isn't going to get perfect 'hand-tuned' output for everything one runs through it. But for my use case — which involves generating XHTML, PDF, etc. from a single source XML file — it's essential that if things aren't optimal, at least some basic parameters are met. So with the above example for example, not only do things overrun the text area, they actually run off the page and characters are lost. I will say I find that a very strange default, both in TeX and SILE. I can't really imagine the circumstances in which anyone might want it to handle things like this... 1 My basic ambition here is to get something that a) will perform adequately for essentially all input tldr; I'm actually quite passionate about optimal typesetting... but when producing documentation one doesn't always have time to get there initially. Especially when one considers the alternatives are toolchains like FOP, which frankly produces far inferior output, one can't help but feel like this approach of TeX/SILE is making the perfect the enemy of the good... 2 Admittedly the TeX (and descendant) typesetting world seems so set on the idea of painstaking, hand-tuned typesetting, maybe I'm just going against the grain trying to do this. Yet there's a surprising dearth of other open source PDF tooling that really generates good output. Though it seems like plenty of people have used TeX in automated ways... 3 Thanks for the thoughtful response & for making SILE. 4 Footnotes
|
Beta Was this translation helpful? Give feedback.
-
@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.
|
Beta Was this translation helpful? Give feedback.
@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...