white space in documentation strings

John W. Eaton jwe at bevo.che.wisc.edu
Sat Nov 1 15:32:30 CDT 2008


On  1-Nov-2008, Thorsten Meyer wrote:

| Hi,
| 
| I have noticed that white space in the documentation strings of octave
| functions is not deflated in the output of the help command.
| E.g., a line break in the source code will give an additional space
| in the help output. Or as a more extreme example:
| a documentation string like this:
| ## @var{extension} is         created. The original file is not touched.
| ## If @var{rootdir} is defined [...]
| 
| looks like that in the output of the help command:
|      Each file is compressed separately and a new file with the
|      extension EXTENSION is       created. The original file is
|      not touched.   If ROOTDIR is defined  the compressed
| 
| Is that a bug or a feature?

Octave's help command passes the Texinfo source of the doc string
through makeinfo and displays the result.  This is what the Texinfo
manual says about multiple spaces, in the section titled "Multiple
Spaces":

  Ordinarily, TeX collapses multiple whitespace characters (space, tab,
  and newline) into a single space.  Info output, on the other hand,
  preserves whitespace as you type it, except for changing a newline into
  a space; this is why it is important to put two spaces at the end of
  sentences in Texinfo documents.

See the rest of this section in the Texinfo manual for more info.

jwe


More information about the Bug-octave mailing list