Re: -man fails to use ANSI commands
G. Branden Robinson to Anton Shepelev: > > `export | grep -i sgr' finds nothing, unfortu- > > nately. Where else can I look for the reason of > > -man treating my virtual terminal as a printer? > > Once I find it, I will bring it up with the ad- > > ministrator of that system, and then perhaps > > with the distro maintainers. > > If you're still using groff 1.22.4, some distribu- > tions used a device control command to tell > grotty(1) to shut off SGR support. Indeed. /etc/groff/man.local contains: . if '\V[GROFF_SGR]'' \ .output x X tty: sgr 0 so the solution is to define a GROFF_SGR evironment variable. I wonder what Debian user or developer disliked those SGR sequences emitted by groff...
Re: -man fails to use ANSI commands
Hi Anton, At 2023-11-20T18:38:19+0300, Anton Shepelev wrote: > G. Branden Robinson to Anton Shepelev: > > If you're still using groff 1.22.4, some distribu- > > tions used a device control command to tell > > grotty(1) to shut off SGR support. > > Indeed. /etc/groff/man.local contains: > > . if '\V[GROFF_SGR]'' \ > .output x X tty: sgr 0 > > so the solution is to define a GROFF_SGR evironment > variable. I wonder what Debian user or developer > disliked those SGR sequences emitted by groff... Well, here's one of them. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=312935 ...with my lengthy rebuttal and defense of groff's behavior. The more I learned, the more I realized just how wrong that guy was. Regards, Branden signature.asc Description: PGP signature
Multi-columns in ms, again
Dear All, in April 29, I asked whether there is a possibility to resume one-column text after a two-column text on the same page. Your answers, uni sono, said what the the manual says: returning to one-column mode will always finish the page and begin a new one. The reason for this behaviour is to "[m]ake sure we don't exit if there are still floats or footnotes left-over." (line 578 of s.tmac, groff 1.22.4)* I am by far not familiar enough to modify the macros in s.tmac, so may I kindly ask for some guidance? Task: create a private 1C-style command which - perhaps named .1Cs ("s" as in simplified or stripped down) - flushes the material not yet typeset, happily ignoring any floats of footnotes, in two balanced columns; certainly using .pg*end-col, I assume? - returns to one-column mode, trusting that - my file is a clean text file without surprises, so need to take care of footnotes etc. I could start with line 527 of s.tmac, that's where the definition of .1C starts. But how many lines between 527 and 601 do I really have to copy into a private macro definition file? While I understand individual definitions (the macro names are quite transparent) I fail to make sense of how everything works together. Thank you very much for your occasional enlightenment, Best regards, Oliver. * Please bear with me that this particular machine hasn't yet been upgraded to groff 1.23. It will happen. -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin GERMANY Tel.: +49-30-85727260 mailto:oliver.co...@email.de
Re: Multi-columns in ms, again
Dear All, in a follow-up to myself: If I understood where the whole .1C definition ends, I could copy that block into an own macro definition and from there eliminate just those commands which flush the old page and begin a new page. I could even ignore the tests for floats and footnotes because no such thing will appear in my text. Or I am completely, utterly and totally mistaken? Best regards, Oliver. PS: Why do I want to do that? I am translating a scientific paper which by all appearance seems to be typeset with a troff-like system. It is typeset in two columns (except for title and abstract), and in the center of one of the pages there is a table which, while not being very high, spans across the whole page. The order of text blocks respects the table and shows the following pattern: TEXT 1 TEXT 2 VERY WIDE TABLE TEXT 3 TEXT 4 For the convenience of the reader of the translation (who has access to the original and might want to check a few numbers) I'd like to reproduce the layout. If that is really not possible, I still can shift the very wide, but not very high table to the end. On 20/11/2023 19:55, Oliver Corff wrote: Dear All, in April 29, I asked whether there is a possibility to resume one-column text after a two-column text on the same page. Your answers, uni sono, said what the the manual says: returning to one-column mode will always finish the page and begin a new one. The reason for this behaviour is to "[m]ake sure we don't exit if there are still floats or footnotes left-over." (line 578 of s.tmac, groff 1.22.4)* I am by far not familiar enough to modify the macros in s.tmac, so may I kindly ask for some guidance? Task: create a private 1C-style command which - perhaps named .1Cs ("s" as in simplified or stripped down) - flushes the material not yet typeset, happily ignoring any floats of footnotes, in two balanced columns; certainly using .pg*end-col, I assume? - returns to one-column mode, trusting that - my file is a clean text file without surprises, so need to take care of footnotes etc. I could start with line 527 of s.tmac, that's where the definition of .1C starts. But how many lines between 527 and 601 do I really have to copy into a private macro definition file? While I understand individual definitions (the macro names are quite transparent) I fail to make sense of how everything works together. Thank you very much for your occasional enlightenment, Best regards, Oliver. * Please bear with me that this particular machine hasn't yet been upgraded to groff 1.23. It will happen. -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin GERMANY Tel.: +49-30-85727260 mailto:oliver.co...@email.de -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin G E R M A N Y Tel.: +49-30-85727260 Mail:oliver.co...@email.de
Re: Multi-columns in ms, again
Another follow-up: I just checked the one-column mode across the macro packages ms, me and mm, and lo and behold, the mm man page tells me: 1C [1] Begin one-column processing. A 1 as an argument disables the page break. Use wide footnotes, small foot‐ notes may be overprinted. I never worked with the mm package. I'll give it a try. Best regards, Oliver. On 20/11/2023 19:55, Oliver Corff wrote: Dear All, in April 29, I asked whether there is a possibility to resume one-column text after a two-column text on the same page. Your answers, uni sono, said what the the manual says: returning to one-column mode will always finish the page and begin a new one. The reason for this behaviour is to "[m]ake sure we don't exit if there are still floats or footnotes left-over." (line 578 of s.tmac, groff 1.22.4)* I am by far not familiar enough to modify the macros in s.tmac, so may I kindly ask for some guidance? Task: create a private 1C-style command which - perhaps named .1Cs ("s" as in simplified or stripped down) - flushes the material not yet typeset, happily ignoring any floats of footnotes, in two balanced columns; certainly using .pg*end-col, I assume? - returns to one-column mode, trusting that - my file is a clean text file without surprises, so need to take care of footnotes etc. I could start with line 527 of s.tmac, that's where the definition of .1C starts. But how many lines between 527 and 601 do I really have to copy into a private macro definition file? While I understand individual definitions (the macro names are quite transparent) I fail to make sense of how everything works together. Thank you very much for your occasional enlightenment, Best regards, Oliver. * Please bear with me that this particular machine hasn't yet been upgraded to groff 1.23. It will happen. -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin GERMANY Tel.: +49-30-85727260 mailto:oliver.co...@email.de -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin G E R M A N Y Tel.: +49-30-85727260 Mail:oliver.co...@email.de
Re: Multi-columns in ms, again
Dear All, I tried the mm macros. In general, the idea to have a horizontal object spanning the full page width between two portions of text in two columns can be realized with mm. The .1C 1 macro with the argument "1" does the trick. There is one caveat, though. mm does not balance columns, so I have to insert a break manually. This should now be an obstacle of minor concern. Best regards, Oliver. On 20/11/2023 21:04, Oliver Corff via wrote: Another follow-up: I just checked the one-column mode across the macro packages ms, me and mm, and lo and behold, the mm man page tells me: 1C [1] Begin one-column processing. A 1 as an argument disables the page break. Use wide footnotes, small foot‐ notes may be overprinted. I never worked with the mm package. I'll give it a try. Best regards, Oliver. On 20/11/2023 19:55, Oliver Corff wrote: Dear All, in April 29, I asked whether there is a possibility to resume one-column text after a two-column text on the same page. Your answers, uni sono, said what the the manual says: returning to one-column mode will always finish the page and begin a new one. The reason for this behaviour is to "[m]ake sure we don't exit if there are still floats or footnotes left-over." (line 578 of s.tmac, groff 1.22.4)* I am by far not familiar enough to modify the macros in s.tmac, so may I kindly ask for some guidance? Task: create a private 1C-style command which - perhaps named .1Cs ("s" as in simplified or stripped down) - flushes the material not yet typeset, happily ignoring any floats of footnotes, in two balanced columns; certainly using .pg*end-col, I assume? - returns to one-column mode, trusting that - my file is a clean text file without surprises, so need to take care of footnotes etc. I could start with line 527 of s.tmac, that's where the definition of .1C starts. But how many lines between 527 and 601 do I really have to copy into a private macro definition file? While I understand individual definitions (the macro names are quite transparent) I fail to make sense of how everything works together. Thank you very much for your occasional enlightenment, Best regards, Oliver. * Please bear with me that this particular machine hasn't yet been upgraded to groff 1.23. It will happen. -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin GERMANY Tel.: +49-30-85727260 mailto:oliver.co...@email.de -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin G E R M A N Y Tel.: +49-30-85727260 Mail:oliver.co...@email.de -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin G E R M A N Y Tel.: +49-30-85727260 Mail:oliver.co...@email.de
Re: Multi-columns in ms, again
Dear All, I am not going to bother you anymore with my column journey. .NCOL in the mm package does the trick. It allows breaking a column, and since this is a one-time task, I do not mind searching for the optimal breakpoint by hand. All my questions of April 29 answered! Thank you all for your patience! Best regards, Oliver. PS: So, in mm, a document would contain the following commands: Text text text text .\" and now switch to two columns .2C Text text text text and so on .\" search for best balance of columns manually .NCOL Some more text .\" Switch to one-column mode .1C 1 .TS .\" Your wide table here .TE .\" And back to two-column mode. .2C Rest of the text On 20/11/2023 21:04, Oliver Corff via wrote: Another follow-up: I just checked the one-column mode across the macro packages ms, me and mm, and lo and behold, the mm man page tells me: 1C [1] Begin one-column processing. A 1 as an argument disables the page break. Use wide footnotes, small foot‐ notes may be overprinted. I never worked with the mm package. I'll give it a try. Best regards, Oliver. On 20/11/2023 19:55, Oliver Corff wrote: Dear All, in April 29, I asked whether there is a possibility to resume one-column text after a two-column text on the same page. Your answers, uni sono, said what the the manual says: returning to one-column mode will always finish the page and begin a new one. The reason for this behaviour is to "[m]ake sure we don't exit if there are still floats or footnotes left-over." (line 578 of s.tmac, groff 1.22.4)* I am by far not familiar enough to modify the macros in s.tmac, so may I kindly ask for some guidance? Task: create a private 1C-style command which - perhaps named .1Cs ("s" as in simplified or stripped down) - flushes the material not yet typeset, happily ignoring any floats of footnotes, in two balanced columns; certainly using .pg*end-col, I assume? - returns to one-column mode, trusting that - my file is a clean text file without surprises, so need to take care of footnotes etc. I could start with line 527 of s.tmac, that's where the definition of .1C starts. But how many lines between 527 and 601 do I really have to copy into a private macro definition file? While I understand individual definitions (the macro names are quite transparent) I fail to make sense of how everything works together. Thank you very much for your occasional enlightenment, Best regards, Oliver. * Please bear with me that this particular machine hasn't yet been upgraded to groff 1.23. It will happen. -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin GERMANY Tel.: +49-30-85727260 mailto:oliver.co...@email.de -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin G E R M A N Y Tel.: +49-30-85727260 Mail:oliver.co...@email.de -- Dr. Oliver Corff Wittelsbacherstr. 5A 10707 Berlin G E R M A N Y Tel.: +49-30-85727260 Mail:oliver.co...@email.de