[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] mom: Combining CODE with QUOTE creates excessive vertical space
From: |
Chris Marusich |
Subject: |
[Groff] mom: Combining CODE with QUOTE creates excessive vertical space |
Date: |
Wed, 16 Mar 2016 03:33:56 -0700 |
Hi,
First off, I'd like to say that mom is very impressive! The
documentation is great, and she creates some very fine-looking
documents! I'm writing to the list because I want to confirm whether or
not the behavior I'm observing is expected. I suspect it isn't.
Specifically, when I render the attached file "groff-mom-problem.mom", I
see more vertical space below the code snippet than above it. Is this
expected behavior? I expected to see equal amounts of vertical space
above and below. I'm using the following groff version:
--8<---------------cut here---------------start------------->8---
$ groff --version
GNU groff version 1.22.3
Copyright (C) 2014 Free Software Foundation, Inc.
GNU groff comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of groff and its subprograms
under the terms of the GNU General Public License.
For more information about these matters, see the file
named COPYING.
called subprograms:
GNU grops (groff) version 1.22.3
GNU troff (groff) version 1.22.3
--8<---------------cut here---------------end--------------->8---
The reason I wanted to enclose CODE within QUOTE in the first place is
because I wanted to insert a block of code into my document, and that is
the recommended way to do so according to the mom documentation:
http://www.schaffter.ca/mom/momdoc/docelement.html#code
> In all likelihood, if you want the situation described above (ie a
> break before and after CODE), what you probably want is to use QUOTE
> in conjunction with CODE
However, the only examples I have seen in the wild for embedding a block
of code suggest that the recommended approach may not be the one people
normally use:
* The mom-pdf.mom file in the groff source eschews the recommended
method and instead issues typesetting commands to make QUOTE look like
CODE. Probably because SMARTQUOTES are still on, it uses \[dq] for
quotation marks in code snippets to get the inch mark.
* That appears to be the same recommendation which was made in this post
to the email list a few years ago:
https://lists.gnu.org/archive/html/groff/2004-01/msg00087.html
Especially if the behavior I'm seeing is expected, then I think it would
be good if the mom documentation mentioned this alternative
explicitly. As a newcomer to mom, the alternative to the recommended
approach was not obvious to me.
--
Chris
groff-mom-problem.mom
Description: Binary data
signature.asc
Description: PGP signature