Hi. The attached patch fixes the mark-up errors. > In the "UNIT EXPRESSIONS" section, there are two examples of "@samp{ > .... }", I assume these are ntroff commands leaking through.
The contents of the @samp{...} was split across a line-break in the texinfo source, meaning that texi2man didn't spot it. I fixed this by reflowing the source, to avoid the problem. I also replaced the spaces in that @samp{...} text with non-breaking spaces. This avoids inadvertently re-introducing the problem in future with automatic text wrapping, and also improves the output in man because it avoids extra internal spaces being inserted into the sample text when justifying the surrounding paragraphs. > In the "DEFINING NEW UNITS" section, the man page reads > "the backslash character (‘´) acts..". > However the backslash character has been eaten by ntroff. I fixed this by making texi2man double backslashes on the way through. > In the "INVOKING ‘UNITS’" section, there a few long-name only > parameters that are preceeded with a comma. I fixed this by labelling long-name option as being the main @item, rather than as an @itemx ('extra item'?) like they are for options where the long names are alternatives for single-letter options. However I haven't attempted to fix this issue with the content: > In the "UNIT DEFINITIONS" section, where the man page indicates that a > trailing 's' or 'es' is removed to check for a valid unit-name, it > should also mention that 'ies' is replaced with 'y' e.g. 'centuries' > is replaced with 'century'. Cheers Smylers -- http://twitter.com/Smylers2
diff -ur units-1.87/texi2man units_patched/texi2man --- units-1.87/texi2man 2005-04-24 19:14:56.000000000 +0100 +++ units_patched/texi2man 2012-06-06 16:04:20.791710839 +0100 @@ -47,6 +47,7 @@ if (/\@end ifhtml/) { $html=0; next; } if (!$doman && ($ignore || $html || $title || $tex)) { next; } + s/\\/\\\\/g; s/\@cite\{([^}]*)}/`$1'/g; s/\@math\{([^}]*)}/$1/g; s/\@code\{([^}]*)}/`$1'/g; diff -ur units-1.87/units.texinfo units_patched/units.texinfo --- units-1.87/units.texinfo 2007-09-27 02:26:15.000000000 +0100 +++ units_patched/units.texinfo 2012-06-06 16:04:07.951604461 +0100 @@ -407,16 +407,16 @@ as the other multiplication operators described next. Multiplication using a space or using the hyphen has a higher -precedence than division and is evaluated left to right. So @samp{m/s -s/day} is equivalent to @samp{m / s s day} and has dimensions of -length per time cubed. Similarly, @samp{1/2 meter} refers to a unit -of reciprocal length equivalent to .5/meter, which is probably not -what you would intend if you entered that expression. +precedence than division and is evaluated left to right. So +@samp{m/s s/day} is equivalent to @samp{m / s s day} and has +dimensions of length per time cubed. Similarly, @samp{1/2 meter} +refers to a unit of reciprocal length equivalent to .5/meter, which is +probably not what you would intend if you entered that expression. You can indicate division of numbers with the vertical dash -(@samp{|}), so if you wanted half a meter you could write @samp{1|2 -meter}. This operator has the highest precedence so the square root -of two thirds could be written @samp{2|3^1|2}. +(@samp{|}), so if you wanted half a meter you could write +@samp{1|2 meter}. This operator has the highest precedence so the +square root of two thirds could be written @samp{2|3^1|2}. @cindex fractions @@ -742,18 +742,18 @@ operand: @samp{(-3)}. Note that by default @samp{-} is treated as a subtraction operator. -@itemx --oldstar +@item --oldstar @opindex --oldstar @r{(option for} @code{units}@r{)} Causes @samp{*} to have the old style precedence, higher than the precedence of division so that @samp{1/2*3} will equal @samp{6}. -@itemx --newstar +@item --newstar @opindex --newstar @r{(option for} @code{units}@r{)} Forces @samp{*} to have the new (default) precedence which follows the usual rules of algebra: the precedence of @samp{*} is the same as the precedence of @samp{/}, so that @samp{1/2*3} will equal @samp{3/2}. -@itemx --compact +@item --compact @opindex --compact @r{(option for} @code{units}@r{)} Give compact output featuring only the conversion factor. This turns off the @samp{--verbose} option.