-
-
Notifications
You must be signed in to change notification settings - Fork 789
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
Manpage converter removes spaces in literal block #3583
Comments
I'm unaware of how to do this in groff. This post seems to provide some hints https://unix.stackexchange.com/questions/481343/embed-ascii-diagram-in-groff, though it didn't seem to work for me when I tried it. |
The solution here is simple, asciidoctor should just escape spaces. Just doing that seems to work for all ASCII art. For RGB hex colors, asciidoctor should consider providing a way for user to specify groff defines, I mean embedding raw groff code, just like you have ways for users to embed html/css content. |
If this is something you want, you can create a custom inline macro (or some other type of extension). I don't want to introduce raw groff code into AsciiDoc. That's outside the scope of this language. |
That didn't work because it was an example for the ms macro package, not the man macro package. If you have groff installed, you can read the man pages for each of these, groff_ms(7) and groff_man(7). What you want for "ASCII art" in a man page is to turn filling off and select a monospaced font. The I will quote their descriptions from groff_man_style(7), including a paragraph of user advice.
It will be important to keep those rules in mind when generating man output if you want to support fully general ASCII art. Also don't forget that a control character You can find an example of ASCII art in one of groff's own man pages, that for soelim(1). |
It appears that what fixes it is to introduce (What's strange is that it doesn't seem to be needed in every instance, though it doesn't hurt to use it in every instance). |
…nt in manpage output
Looking at the commit, it appears that what you're observing is use of the dummy character escape sequence after a period. Like TeX, *roff programs attempt to detect boundaries between sentences, and the period, question mark, and exclamation mark are all sentence-ending punctuation, so the formatter enters a special interpretation state when encountering them at the end of a word. https://www.gnu.org/software/groff/manual/groff.html.node/Sentences.html It is indeed harmless to include |
Consider the following manpage that contains a literal block (ASCII art):
The text was updated successfully, but these errors were encountered: