Writers of GNU manuals should consult GNU Manuals in GNU Coding Standards. Here are some other tips for writing Texinfo documentation:
In the example that follows, a blank line comes after the index entry for “Leaping”:
@section The Dog and the Fox @cindex Jumping, in general @cindex Leaping @cindex Dog, lazy, jumped over @cindex Lazy dog jumped over @cindex Fox, jumps over dog @cindex Quick fox jumps over dog The quick brown fox jumps over the lazy dog.
(Note that the example shows entries for the same concept that are written in different ways—‘Lazy dog’, and ‘Dog, lazy’—so readers can look up the concept in different ways.)
Complete phrases are easier to read than …
For example, in the following, the terms “check in”, “register” and “delta” are all appearing for the first time; the example sentence should be rewritten so they are understandable.
The major function assists you in checking in a file to your version control system and registering successive sets of changes to it as deltas.
@dfn command around a word being introduced, to indicate
that the reader should not expect to know the meaning already, and
should expect to learn the meaning from this passage.
Here are a few examples of bad writing to avoid:
When you are done editing the file, you must perform a
@dfn{check in}.
In this example, say, “ … you must @dfn{check
in} the new version.” That flows better.
SCCS, RCS and other version-control systems all perform similar functions in broadly similar ways (it is this resemblance which makes a unified control mode like this possible).
In this example, say, “… makes a unified interface such as VC mode possible.”
Place periods and other punctuation marks outside of quotations, unless the punctuation is part of the quotation. This practice goes against some publishing conventions in the United States, but enables the reader to distinguish between the contents of the quotation and the whole passage.
For example, you should write the following sentence with the period outside the end quotation marks:
Evidently, ‘au’ is an abbreviation for ``author''.
since ‘au’ does not serve as an abbreviation for ‘author.’ (with a period following the word).
@table command and after an
@end table command; but never insert a blank line after an
@table command.
For example,
Types of fox: @table @samp @item Quick Jump over lazy dogs.
@item Brown Also jump over lazy dogs. @end table
@noindent On the other hand, ...
Insert blank lines before and after @itemize … @end
itemize and @enumerate … @end enumerate in the
same way.
Do not use spaces to format a Texinfo file, except inside of
@example … @end example and other literal
environments and commands.
For example, TeX fills the following:
@kbd{C-x v}
@kbd{M-x vc-next-action}
Perform the next logical operation
on the version-controlled file
corresponding to the current buffer.
so it looks like this:
‘C-x v’ ‘M-x vc-next-action’ Perform the next logical operation on the version-controlled file corresponding to the current buffer.
In this case, the text should be formatted with
@table, @item, and @itemx, to create a table.
@code around Lisp symbols, including command names.
For example,
The main function is @code{vc-next-action}, ...
@var around meta-variables. Do not write angle brackets
around them.
You can invoke programs such as Emacs, GCC, and gawk from a
shell. The documentation for each program should contain a section that
describes this. Unfortunately, if the node names and titles for these
sections are all different, they are difficult for users to find.
So, there is a convention to name such sections with a phrase beginning with the word ‘Invoking’, as in ‘Invoking Emacs’; this way, users can find the section easily.
When you use @example to describe a C function’s calling
conventions, use the ANSI C syntax, like this:
void dld_init (char *@var{path});
And in the subsequent discussion, refer to the argument values by
writing the same argument names, again highlighted with
@var.
Also, it is best to avoid writing #include above the
declaration just to indicate that the function is declared in a
header file. The practice may give the misimpression that the
#include belongs near the declaration of the function. Either
state explicitly which header file holds the declaration or, better
yet, name the header file used for a group of functions at the
beginning of the section that describes the functions.
Keep nodes (sections) to a reasonable length, whatever reasonable might be in the given context. Don’t hesitate to break up long nodes into subnodes and have an extensive tree structure; that’s what it’s there for. Many times, readers will probably try to find a single specific point in the manual, using search, indexing, or just plain guessing, rather than reading the whole thing from beginning to end.
You can use the texi-elements-by-size utility to see a list
of all nodes (or sections) in the document, sorted by size (either
lines or words), to find candidates for splitting. It’s in the
util/ subdirectory of the Texinfo sources.
@TeX{} command. Note the uppercase
‘T’ and ‘X’. This command causes the formatters to
typeset the name according to the wishes of Donald Knuth, who wrote
TeX. (Likewise @LaTeX{} for LaTeX.)
@bye. None of the processors process text after the
@bye; it is as if the text were within @ignore …
@end ignore.