Package: docutils-common
Version: 0.22.4+dfsg-1
Severity: minor
Tags: patch, upstream

Dear Maintainer,

>From "/usr/share/doc/debian/bug-reporting.txt.gz":

  Don't file bugs upstream

   If you file a bug in Debian, don't send a copy to the upstream software
   maintainers yourself, as it is possible that the bug exists only in
   Debian. If necessary, the maintainer of the package will forward the
   bug upstream.

-.-

  I do not send reports upstream if I have to get an account there.
The Debian maintainers have one already.

  If I get a negative (or no) response from upstream, I send henceforth
bugs to Debian.

-.-

   * What led up to the situation?

     Checking for defects with a new version

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z < "man page"

  [Use 

grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>

  to find (most) trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":

troff:<stdin>:326: warning: trailing space in the line

Output from "test-nroff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":

troff:<stdin>:326: warning: trailing space in the line


   * What outcome did you expect instead?

     No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.12+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), 
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages docutils-common depends on:
ii  sgml-base  1.31+nmu1
ii  xml-core   0.19

Versions of packages docutils-common recommends:
ii  python3-docutils  0.22.4+dfsg-1

docutils-common suggests no packages.

-- no debconf information
Input file is rst2latex.1

Output from "mandoc -T lint  rst2latex.1": (shortened list)

      1 STYLE: input text line longer than 80 bytes: 
      1 STYLE: whitespace at end of input line
      1 WARNING: missing date, using "": TH
      2 WARNING: skipping paragraph macro: sp after SH

Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

-.-.

Output from
test-nroff -mandoc -t -ww -z rst2latex.1: (shortened list)

      1 line(s) with a trailing space

Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

-.-.

Input file is rst2latex.1

Show if generated from reStructuredText or rd2

1:.\" Man page generated from reStructuredText

Latest version: docutils (Docutils 0.22.4, Python 3.13.11, on linux)

-.-.

Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

Number of lines affected is

1

-.-.

Reduce space between words.

rst2latex.1:55:.B  \-\-generator\fP,\fB  \-g
rst2latex.1:58:.B  \-\-no\-generator
rst2latex.1:61:.B  \-\-date\fP,\fB  \-d
rst2latex.1:64:.B  \-\-time\fP,\fB  \-t
rst2latex.1:67:.B  \-\-no\-datestamp
rst2latex.1:74:.B  \-\-source\-link\fP,\fB  \-s
rst2latex.1:80:.B  \-\-no\-source\-link
rst2latex.1:83:.B  \-\-toc\-entry\-backlinks
rst2latex.1:86:.B  \-\-toc\-top\-backlinks
rst2latex.1:89:.B  \-\-no\-toc\-backlinks
rst2latex.1:92:.B  \-\-footnote\-backlinks
rst2latex.1:95:.B  \-\-no\-footnote\-backlinks
rst2latex.1:98:.B  \-\-section\-numbering
rst2latex.1:101:.B  \-\-no\-section\-numbering
rst2latex.1:104:.B  \-\-strip\-comments
rst2latex.1:107:.B  \-\-leave\-comments
rst2latex.1:125:.B  \-\-verbose\fP,\fB  \-v
rst2latex.1:128:.B  \-\-quiet\fP,\fB  \-q
rst2latex.1:135:.B  \-\-strict
rst2latex.1:142:.B  \-\-debug
rst2latex.1:145:.B  \-\-no\-debug
rst2latex.1:151:.B  \-\-traceback
rst2latex.1:154:.B  \-\-no\-traceback
rst2latex.1:179:.B  \-\-version\fP,\fB  \-V
rst2latex.1:182:.B  \-\-help\fP,\fB  \-h
rst2latex.1:188:.B  \-\-no\-file\-insertion
rst2latex.1:193:.B  \-\-file\-insertion\-enabled
rst2latex.1:197:.B  \-\-no\-raw
rst2latex.1:201:.B  \-\-raw\-enabled
rst2latex.1:208:.B  \-\-validate
rst2latex.1:211:.B  \-\-no\-validation
rst2latex.1:217:.B  \-\-pep\-references
rst2latex.1:229:.B  \-\-rfc\-references
rst2latex.1:240:.B  \-\-trim\-footnote\-reference\-space
rst2latex.1:243:.B  \-\-leave\-footnote\-reference\-space
rst2latex.1:258:.B  \-\-word\-level\-inline\-markup
rst2latex.1:264:.B  \-\-character\-level\-inline\-markup
rst2latex.1:273:.B  \-\-no\-doc\-title
rst2latex.1:278:.B  \-\-no\-doc\-info
rst2latex.1:282:.B  \-\-section\-subtitles
rst2latex.1:286:.B  \-\-no\-section\-subtitles
rst2latex.1:303:.B  \-\-use\-latex\-citations
rst2latex.1:306:.B  \-\-figure\-citations
rst2latex.1:334:.B  \-\-link\-stylesheet
rst2latex.1:338:.B  \-\-embed\-stylesheet
rst2latex.1:354:.B  \-\-use\-latex\-toc
rst2latex.1:357:.B  \-\-use\-docutils\-toc
rst2latex.1:360:.B  \-\-use\-part\-section
rst2latex.1:363:.B  \-\-use\-docutils\-docinfo
rst2latex.1:367:.B  \-\-use\-latex\-docinfo
rst2latex.1:370:.B  \-\-topic\-abstract
rst2latex.1:373:.B  \-\-use\-latex\-abstract
rst2latex.1:384:.B  \-\-compound\-enumerators
rst2latex.1:388:.B  \-\-no\-compound\-enumerators
rst2latex.1:392:.B  \-\-section\-prefix\-for\-enumerators
rst2latex.1:397:.B  \-\-no\-section\-prefix\-for\-enumerators
rst2latex.1:433:.B  \-\-legacy\-class\-functions
rst2latex.1:437:.B  \-\-new\-class\-functions
rst2latex.1:441:.B  \-\-legacy\-column\-widths
rst2latex.1:445:.B  \-\-new\-column\-widths
rst2latex.1:449:.B  \-\-docutils\-footnotes

-.-.

Add a "\&" (or a comma (Oxford comma)) after an abbreviation
or use English words
(man-pages(7)).
Abbreviation points should be marked as such and protected against being
interpreted as an end of sentence, if they are not, and that independent
of the current place on the line.

386:lists (e.g. \(dq1.2.a.ii\(dq).

-.-.

Wrong distance (not two spaces) between sentences in the input file.

  Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").

  The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

Mark a final abbreviation point as such by suffixing it with "\&".

Some sentences (etc.) do not begin on a new line.

Split (sometimes) lines after a punctuation mark; before a conjunction.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

[List of affected lines removed.]

-.-

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

[List of affected lines removed.]

-.-.

Only one space character is after a possible end of sentence
(after a punctuation, that can end a sentence).

[List of affected lines removed.]

-.-

Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.

rst2latex.1:31:.TH "rst2latex" "1" "" "" "text processing"

-.-.

Add "\&" after an ellipsis, when it does not end a sentence.

393:Enable section (\(dq.\(dq subsection ...) prefixes for

-.-.

Output from "test-nroff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":

troff:<stdin>:326: warning: trailing space in the line

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- rst2latex.1 2025-12-23 22:27:18.778179467 +0000
+++ rst2latex.1.new     2025-12-24 00:01:10.143068634 +0000
@@ -28,14 +28,12 @@ level margin: \\n[rst2man-indent\\n[rst2
 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 ..
-.TH "rst2latex" "1" "" "" "text processing"
+.TH rst2latex 1 "" "" "text processing"
 .SH Name
 rst2latex \- convert reST documents to LaTeX
 .SH Synopsis
-.sp
 rst2latex [options] [<source> [<destination>]]
 .SH Description
-.sp
 Generate LaTeX documents from standalone reStructuredText sources
 <\%<https://\:docutils\:.sourceforge\:.io/\:docs/\:user/\:latex\:.html>>.  
Reads from <source>
 (default is stdin) and writes to <destination> (default is stdout).  See
@@ -52,59 +50,59 @@ positional argument. Default: None (stdo
 .BI \-\-title\fB= <title>
 Specify the document title as metadata.
 .TP
-.B  \-\-generator\fP,\fB  \-g
+.B \-\-generator\fP,\fB \-g
 Include a \(dqGenerated by Docutils\(dq credit and link.
 .TP
-.B  \-\-no\-generator
+.B \-\-no\-generator
 Do not include a generator credit.
 .TP
-.B  \-\-date\fP,\fB  \-d
+.B \-\-date\fP,\fB \-d
 Include the date at the end of the document (UTC).
 .TP
-.B  \-\-time\fP,\fB  \-t
+.B \-\-time\fP,\fB \-t
 Include the time & date (UTC).
 .TP
-.B  \-\-no\-datestamp
+.B \-\-no\-datestamp
 Do not include a datestamp of any kind.
 .TP
 .BI \-\-root\-prefix\fB= <path>
 Base directory for absolute paths when reading from
 the local filesystem. Default \(dq\(dq.
 .TP
-.B  \-\-source\-link\fP,\fB  \-s
+.B \-\-source\-link\fP,\fB \-s
 Include a \(dqView document source\(dq link.
 .TP
 .BI \-\-source\-url\fB= <URL>
 Use <URL> for a source link; implies \-\-source\-link.
 .TP
-.B  \-\-no\-source\-link
+.B \-\-no\-source\-link
 Do not include a \(dqView document source\(dq link.
 .TP
-.B  \-\-toc\-entry\-backlinks
+.B \-\-toc\-entry\-backlinks
 Link from section headers to TOC entries.  (default)
 .TP
-.B  \-\-toc\-top\-backlinks
+.B \-\-toc\-top\-backlinks
 Link from section headers to the top of the TOC.
 .TP
-.B  \-\-no\-toc\-backlinks
+.B \-\-no\-toc\-backlinks
 Disable backlinks to the table of contents.
 .TP
-.B  \-\-footnote\-backlinks
+.B \-\-footnote\-backlinks
 Link from footnotes/citations to references. (default)
 .TP
-.B  \-\-no\-footnote\-backlinks
+.B \-\-no\-footnote\-backlinks
 Disable backlinks from footnotes and citations.
 .TP
-.B  \-\-section\-numbering
+.B \-\-section\-numbering
 Enable section numbering by Docutils.  (default)
 .TP
-.B  \-\-no\-section\-numbering
+.B \-\-no\-section\-numbering
 Disable section numbering by Docutils.
 .TP
-.B  \-\-strip\-comments
+.B \-\-strip\-comments
 Remove comment elements from the document tree.
 .TP
-.B  \-\-leave\-comments
+.B \-\-leave\-comments
 Leave comment elements in the document tree. (default)
 .TP
 .BI \-\-strip\-elements\-with\-class\fB= <class>
@@ -122,36 +120,36 @@ Report system messages at or higher than
 \(dqinfo\(dq or \(dq1\(dq, \(dqwarning\(dq/\(dq2\(dq (default), 
\(dqerror\(dq/\(dq3\(dq,
 \(dqsevere\(dq/\(dq4\(dq, \(dqnone\(dq/\(dq5\(dq
 .TP
-.B  \-\-verbose\fP,\fB  \-v
+.B \-\-verbose\fP,\fB \-v
 Report all system messages.  (Same as \(dq\-\-report=1\(dq.)
 .TP
-.B  \-\-quiet\fP,\fB  \-q
+.B \-\-quiet\fP,\fB \-q
 Report no system messages.  (Same as \(dq\-\-report=5\(dq.)
 .TP
 .BI \-\-halt\fB= <level>
 Halt execution at system messages at or above <level>.
 Levels as in \-\-report.  Default: 4 (severe).
 .TP
-.B  \-\-strict
+.B \-\-strict
 Halt at the slightest problem.  Same as \(dq\-\-halt=info\(dq.
 .TP
 .BI \-\-exit\-status\fB= <level>
 Enable a non\-zero exit status for non\-halting system
 messages at or above <level>.  Default: 5 (disabled).
 .TP
-.B  \-\-debug
+.B \-\-debug
 Enable debug\-level system messages and diagnostics.
 .TP
-.B  \-\-no\-debug
+.B \-\-no\-debug
 Disable debug output.  (default)
 .TP
 .BI \-\-warnings\fB= <file>
 Send the output of system messages to <file>.
 .TP
-.B  \-\-traceback
+.B \-\-traceback
 Enable Python tracebacks when Docutils is halted.
 .TP
-.B  \-\-no\-traceback
+.B \-\-no\-traceback
 Disable Python tracebacks.  (default)
 .TP
 .BI \-\-input\-encoding\fB= <name[:handler]>
@@ -176,45 +174,45 @@ Write output file dependencies to <file>
 .BI \-\-config\fB= <file>
 Read configuration settings from <file>, if it exists.
 .TP
-.B  \-\-version\fP,\fB  \-V
+.B \-\-version\fP,\fB \-V
 Show this program\(aqs version number and exit.
 .TP
-.B  \-\-help\fP,\fB  \-h
+.B \-\-help\fP,\fB \-h
 Show this help message and exit.
 .UNINDENT
 .SS Generic Parser Options
 .INDENT 0.0
 .TP
-.B  \-\-no\-file\-insertion
+.B \-\-no\-file\-insertion
 Disable directives that insert the contents of an
 external file; replaced with a \(dqwarning\(dq system
 message.
 .TP
-.B  \-\-file\-insertion\-enabled
+.B \-\-file\-insertion\-enabled
 Enable directives that insert the contents of an
 external file. (default)
 .TP
-.B  \-\-no\-raw
+.B \-\-no\-raw
 Disable the \(dqraw\(dq directive; replaced with a \(dqwarning\(dq
 system message.
 .TP
-.B  \-\-raw\-enabled
+.B \-\-raw\-enabled
 Enable the \(dqraw\(dq directive. (default)
 .TP
 .BI \-\-line\-length\-limit\fB= <length>
 Maximal number of characters in an input line. Default
 10 000.
 .TP
-.B  \-\-validate
+.B \-\-validate
 Validate the document tree after parsing.
 .TP
-.B  \-\-no\-validation
+.B \-\-no\-validation
 Do not validate the document tree. (default)
 .UNINDENT
 .SS reStructuredText Parser Options
 .INDENT 0.0
 .TP
-.B  \-\-pep\-references
+.B \-\-pep\-references
 Recognize and link to standalone PEP references (like
 \(dqPEP 258\(dq).
 .TP
@@ -226,7 +224,7 @@ Base URL for PEP references (default
 Template for PEP file part of URL. (default
 \(dqpep\-%04d\(dq)
 .TP
-.B  \-\-rfc\-references
+.B \-\-rfc\-references
 Recognize and link to standalone RFC references (like
 \(dqRFC 822\(dq).
 .TP
@@ -237,10 +235,10 @@ Base URL for RFC references (default
 .BI \-\-tab\-width\fB= <width>
 Set number of spaces for tab expansion (default 8).
 .TP
-.B  \-\-trim\-footnote\-reference\-space
+.B \-\-trim\-footnote\-reference\-space
 Remove spaces before footnote references.
 .TP
-.B  \-\-leave\-footnote\-reference\-space
+.B \-\-leave\-footnote\-reference\-space
 Leave spaces before footnote references.
 .TP
 .BI \-\-syntax\-highlight\fB= <format>
@@ -255,13 +253,13 @@ one of \(dqyes\(dq, \(dqno\(dq, \(dqalt[
 .BI \-\-smartquotes\-locales\fB= <language:quotes[,language:quotes,...]>
 Characters to use as \(dqsmart quotes\(dq for <language>.
 .TP
-.B  \-\-word\-level\-inline\-markup
+.B \-\-word\-level\-inline\-markup
 Inline markup recognized at word boundaries only
 (adjacent to punctuation or whitespace). Force
 character\-level inline markup recognition with \(dq\(dq
 (backslash + space). Default.
 .TP
-.B  \-\-character\-level\-inline\-markup
+.B \-\-character\-level\-inline\-markup
 Inline markup recognized anywhere, regardless of
 surrounding characters. Backslash\-escapes must be used
 to avoid unwanted markup recognition. Useful for East
@@ -270,20 +268,20 @@ Asian languages. Experimental.
 .SS Standalone Reader Options
 .INDENT 0.0
 .TP
-.B  \-\-no\-doc\-title
+.B \-\-no\-doc\-title
 Disable the promotion of a lone top\-level section
 title to document title (and subsequent section title
 to document subtitle promotion; enabled by default).
 .TP
-.B  \-\-no\-doc\-info
+.B \-\-no\-doc\-info
 Disable the bibliographic field list transform
 (enabled by default).
 .TP
-.B  \-\-section\-subtitles
+.B \-\-section\-subtitles
 Activate the promotion of lone subsection titles to
 section subtitles (disabled by default).
 .TP
-.B  \-\-no\-section\-subtitles
+.B \-\-no\-section\-subtitles
 Deactivate the promotion of lone subsection titles.
 .UNINDENT
 .SS LaTeX\-Specific Options
@@ -300,10 +298,10 @@ given, separated by commas.  Default: \(
 Format for footnote references: one of \(dqsuperscript\(dq
 or \(dqbrackets\(dq.  Default: \(dqsuperscript\(dq.
 .TP
-.B  \-\-use\-latex\-citations
+.B \-\-use\-latex\-citations
 Use cite command for citations. (future default)
 .TP
-.B  \-\-figure\-citations
+.B \-\-figure\-citations
 Use figure floats for citations (might get mixed with
 real figures). (provisional default)
 .TP
@@ -323,7 +321,7 @@ Comma separated list of LaTeX packages/s
 Relative paths are expanded if a matching file is
 found in the \-\-stylesheet\-dirs. With \-\-link\-
 stylesheet, the path is rewritten relative to the
-output 
+output
 .nf
 *
 .fi
@@ -331,11 +329,11 @@ output
 .IP "System Message: WARNING/2 (debian/tmp/man/rst2latex.txt:, line 182)"
 Inline emphasis start\-string without end\-string.
 .TP
-.B  \-\-link\-stylesheet
+.B \-\-link\-stylesheet
 Link to the stylesheet(s) in the output file.
 (default)
 .TP
-.B  \-\-embed\-stylesheet
+.B \-\-embed\-stylesheet
 Embed the stylesheet(s) in the output file.
 Stylesheets must be accessible during processing.
 .TP
@@ -351,26 +349,26 @@ select PDF standard fonts (Times, Helvet
 .BI \-\-template\fB= <file>
 Specify the template file. Default: \(dqdefault.tex\(dq.
 .TP
-.B  \-\-use\-latex\-toc
+.B \-\-use\-latex\-toc
 Table of contents by LaTeX. (default)
 .TP
-.B  \-\-use\-docutils\-toc
+.B \-\-use\-docutils\-toc
 Table of contents by Docutils (without page numbers).
 .TP
-.B  \-\-use\-part\-section
+.B \-\-use\-part\-section
 Add parts on top of the section hierarchy.
 .TP
-.B  \-\-use\-docutils\-docinfo
+.B \-\-use\-docutils\-docinfo
 Attach author and date to the document info table.
 (default)
 .TP
-.B  \-\-use\-latex\-docinfo
+.B \-\-use\-latex\-docinfo
 Attach author and date to the document title.
 .TP
-.B  \-\-topic\-abstract
+.B \-\-topic\-abstract
 Typeset abstract as topic. (default)
 .TP
-.B  \-\-use\-latex\-abstract
+.B \-\-use\-latex\-abstract
 Use LaTeX abstract environment for the document\(aqs
 abstract.
 .TP
@@ -381,20 +379,20 @@ Color of any hyperlinks embedded in text
 .BI \-\-hyperref\-options\fB= <options>
 Additional options to the \(dqhyperref\(dq package.
 .TP
-.B  \-\-compound\-enumerators
+.B \-\-compound\-enumerators
 Enable compound enumerators for nested enumerated
-lists (e.g. \(dq1.2.a.ii\(dq).
+lists (e.g.\& \(dq1.2.a.ii\(dq).
 .TP
-.B  \-\-no\-compound\-enumerators
+.B \-\-no\-compound\-enumerators
 Disable compound enumerators for nested enumerated
 lists. (default)
 .TP
-.B  \-\-section\-prefix\-for\-enumerators
-Enable section (\(dq.\(dq subsection ...) prefixes for
+.B \-\-section\-prefix\-for\-enumerators
+Enable section (\(dq.\(dq subsection ...\&) prefixes for
 compound enumerators.  This has no effect without
 \-\-compound\-enumerators.
 .TP
-.B  \-\-no\-section\-prefix\-for\-enumerators
+.B \-\-no\-section\-prefix\-for\-enumerators
 Disable section prefixes for compound enumerators.
 (default)
 .TP
@@ -430,23 +428,23 @@ get the section number or the page numbe
 Specify style and database(s) for bibtex, for example
 \(dq\-\-use\-bibtex=unsrt,mydb1,mydb2\(dq. Provisional!
 .TP
-.B  \-\-legacy\-class\-functions
+.B \-\-legacy\-class\-functions
 Use legacy functions with class value list for
 DUtitle and DUadmonition.
 .TP
-.B  \-\-new\-class\-functions
+.B \-\-new\-class\-functions
 Use DUrole and \(dqDUclass\(dq wrappers for class values.
 Place admonition content in an environment. (default)
 .TP
-.B  \-\-legacy\-column\-widths
+.B \-\-legacy\-column\-widths
 Use legacy algorithm to determine table column widths.
 (provisional default)
 .TP
-.B  \-\-new\-column\-widths
+.B \-\-new\-column\-widths
 Use new algorithm to determine table column widths.
 (future default)
 .TP
-.B  \-\-docutils\-footnotes
+.B \-\-docutils\-footnotes
 Footnotes with numbers/symbols by Docutils. (default)
 (The alternative, \-\-latex\-footnotes, is not
 implemented yet.)
  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>

  To find trailing space use

grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>

  The same goes for man pages that are used as an input.

-.-

  For a style guide use

  mandoc -T lint

-.-

  For general input conventions consult the man page "nroff(7)" (item
"Input conventions") or the Texinfo manual about the same item.

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

  The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.

-.-

  Common defects:

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

-.-

  Not beginning each input sentence on a new line.

Line length and patch size should thus be reduced when that has been fixed.

  The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.

  See man-pages(7), item "semantic newline".

-.-

The difference between the formatted output of the original
and patched file can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -d -u <out1> <out2>

and for groff, using

\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"

instead of 'nroff -mandoc'

  Add the option '-t', if the file contains a table.

  Read the output from 'diff -d -u ...' with 'less -R' or similar.

-.-.

  If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

  The option "-warnings=w"

  The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

  or

  (produce only warnings):

export MANROFFOPT="-ww -b -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)

-.-

Reply via email to