2 ms·
You could just do a naive 4spaces to 1tab conversion.
by Senji 10y ago
You could just do a naive 4spaces to 1tab conversion.
- greggyb 10y agoThis breaks for spacing between non-whitespace character. E.g. the list of flags, which may have varying lengths, but all descriptions start on the same alignment. This is a man page with a list of flags below --flag1 Description of flag1 --secondflag Description of secondflag If we naively replaced the above with 4spaces=1tab we'd get the whitespace between flag1 and its description replaced with two tabs, and we'd get the whitespace between secondflag and its description left as a string of three space characters. I have no idea what is actually used in man pages for alignment and spacing, but the example above is only to illustrate that 4space=1tab breaks even on trivial examples as a conversion rule.
- mzs 10y agoThat does not matter for single dash and letter options. For double dash long options I like to split them on different lines so that you still have a lot of horizontal space for the descriptions themselves even with very ling option names, so a brute force way: This is a man page with a list of .I flags below .P .BR --flag : .RS Description of flag1 .RE .P .BR --secondflag : .RS Description of secondflag .RE .P Also for real tables: $ man tbl