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
roffitall's TOC generation broken #11739
Comments
From @nwc10Created by @nwc10In the words of perlutil.pod, The C<roffitall> utility is not installed on your system but lives in Its table of contents generation has been broken for almost 4 years, and Reversing part of the change restores the TOC generation: Inline Patchdiff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
index 96f3fcc..5b86776 100644
--- a/cpan/podlators/lib/Pod/Man.pm
+++ b/cpan/podlators/lib/Pod/Man.pm
@@ -1391,19 +1391,15 @@ sub preamble_template {
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
-.el \{\
-. de IX
-..
-.\}
----END OF PREAMBLE----
if ($accents) {
$preamble .= <<'----END OF PREAMBLE----'
diff --git a/pod/rofftoc b/pod/rofftoc
However, this will introduce a regression. The change is described as: 2007-11-28 Russ Allbery <rra@stanford.edu> * VERSION: podlators 2.0.6 released. * lib/Pod/Man.pm (preamble_template): Define the IX macro to empty [snip]. As best I can work out from TFM, the above code written to the start of each * If register F is set, then the if block (re)defines the macro IX to output roffitall runs roff with a command line flag to set the F register, then The problem comes when one attempts to render 2 or more man pages in one go, I'm not sure what the right solution is. From scanning TFM, there doesn't I don't know why the preamble clears the F register. That roff code to set It would be nice to fix this, as roff generates very pleasant typeset output. Nicholas Clark Perl Info
|
From tchrist@perl.com
I'm going to quote most of this to keep the context. It's really esoteric. Congratulations on your archaeological expedition, Nick; I'm sorry to have I've cc'd Russ and Larry, because they're the only other ones I can think
Actually, if it has been accessed. See below.
Actually, it removes the register. See below.
What you can do is ask whether a certain number register has ever been accessed. .if !rD .nr D 0 That's because apart from a bit of numeric handling in certain kinds of
Actually, it doesn't "clear" it, per se. That would be .nr F 0 if you think like a C programmer with an integer variable. Instead it's .rr F That makes a subsequent nF test come up false for never having I'm not convinced I understand why the else block became necessary.
Oops. From perlhist: Tom 5.002b1g 1995-Dec-21 Doc release. So I'm pretty sure you have me to blame for almost all of this. I wish I What was going on is that I created a way to troff the entire docset as As to why the F register gets cleared, the only thing that now comes to Notice roffitall also sets the C and D registers, but nothing in the .\" -rC1 => number pages continuously, rather than start each at 1 The D register's use for *D*ouble-sided printing makes sense when you understand I cannot swear that this is why, but I *think* I grabbed the F register because But F for First-time-through sounds good enough to use from now on, even if it
Indeed so. The other translators have never managed to do as attractive a These days with Camel4 the pod turns into DocBook XML, clearly a deficient --tom |
The RT System itself - Status changed from 'new' to 'open' |
From rra@stanford.eduTom Christiansen <tchrist@perl.com> writes:
Thank you *very* much for your thorough investigation of this bug, Nick.
Sort of. I believe what happened is that Debian asked groff to get mouthy Debian, in an effort to clean up problems with man pages and proactively
If we just remove the line that removes the register, will that work? Failing that, we could undefine .IX before defining it, or we could set or -- |
From @nwc10On Tue, Nov 08, 2011 at 04:53:09PM -0800, Russ Allbery wrote:
Um, I'm feeling somewhat lost for words. I just kept digging into behaviour At least, not any further without attempting "teach yourself *roff", because
It's really obscure. I wouldn't have noticed it except that I've been
I did this: $ git diff Inline Patchdiff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm
index 96f3fcc..4b19cb2 100644
--- a/cpan/podlators/lib/Pod/Man.pm
+++ b/cpan/podlators/lib/Pod/Man.pm
@@ -1397,7 +1397,6 @@ sub preamble_template {
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
-. rr F
.\}
.el \{\
. de IX
diff --git a/pod/rofftoc b/pod/rofftoc
and everything seems to work. (didn't spot any warnings while running make install, cursory test of 1
It doesn't seem to need much "set up." Both a Mac laptop and an Ubuntu
I don't know *roff at all. (Other than roughly "what it's used for". It's about the same as my knowledge The manual suggests that there's no distinction between defining a macro and The irony is that my understanding of C is that * a compiler is allowed to issue as many diagnostics as it feels like for It was very fortunate that my bisect run turned up a commit with a small
Not clearing F seems to have no issues. But I don't know *roff, so I don't Nicholas Clark * and garrulous compilers make me think of jokes such as |
From @nwc10On Wed, Nov 09, 2011 at 09:59:13PM +0000, Nicholas Clark wrote:
No.
But the page numbers in the TOC reset for every man page. Nicholas Clark |
From rra@stanford.eduNicholas Clark <nick@ccl4.org> writes:
Ah, because we reset the % register on the start of each man page using I wonder if something like: .ie \nF \{\ would work. I'm not sure which number registers are already in use and -- |
From rra@stanford.eduNicholas Clark <nick@ccl4.org> writes:
I finally got a chance to look at this in more detail, in combination with .\" If the F register is turned on, we'll generate index entries on stderr for (The rF logic is to suppress groff warnings.) This will be in the next podlators release. -- |
From @cpansproutOn Sat May 26 13:41:11 2012, rra@stanford.edu wrote:
I’m marking this as resolved, seeing it is now a podlators problem, not -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#103202 (status was 'resolved')
Searchable as RT103202$
The text was updated successfully, but these errors were encountered: