> > > This does finish and they are numbered but now the formatting > > > is broken. Text all dumped to page without any section > > > headers, missing content, unusable. > > > > Do all the manpages use the classical "man" markup, or do they > > use the "doc" macros? If the latter, then "an-old.tmac" is > > not the correct package to load, and "doc.tmac" must be used. > > Deciding which one to load is exactly what "andoc.tmac" (via > > "an.tmac") was supposed to do (but the implemented solution > > was perhaps not quite optimal). > > It is a mix. Using -mdoc I get warnings like: > > Not a \-mdoc command: .LP (#2959) > Not a \-mdoc command: .SH (#2972) > mdoc warning: Empty input line #2973
Been having a look at this, and my impression is that switching back and forth between two macro packages that haven't been explicitly designed to cooperate isn't something to be recommended in general. Nevertheless, apart from some strange behavior of the macros themselves [it seems to me that the BSD macros do not start a new page for a new entry -- is this really intended?] and a bug in an-old.tmac [where it says ".nr FT -.5i" it should really be ".nr FT 0-.5i"] I've (mostly) gotten it to work (I think) with the following package switcher, to be used instead of andoc.tmac. What still doesn't always work are the page footers -- when switching from man to doc or vice versa, the last footer will already be in the style of the new package. Fixing this isn't impossible, but it will probably require modifying the initialization procedures in doc.tmac and an-old.tmac (I haven't yet attempted to do this). By the way, the "input stack limit exceeded" problem was a result of page footer traps from both macro packages being active at the same time. .\" andoc.tmac -- load either an-old.tmac or doc.tmac. .if !\n(.g .ab These macros require groff. .de reload-doc .ch an-header \" remove trap set by an-old.tmac .ch an-footer \" remove trap set by an-old.tmac .ch an-p-footer \" remove trap set by an-old.tmac .rm Dd .do mso doc.tmac .ds str-dfp NAME\" this triggers setup-header .Dd \\$* .do als TH reload-man .. .de reload-man .ch header \" remove trap set by doc.tmac .ch footer \" remove trap set by doc.tmac .rm RI \" disable load-only-once, see an-old.tmac .rn e@ em \" doc.tmac disables end-macro defining .rm TH .do so an-old.tmac .TH \\$* .do als Dd reload-doc .. .als TH reload-man .als Dd reload-doc .\" dummy equation macros -- eqnrc is read before .TH or .Dd is parsed. .de EQ .. .de EN ..