Package: hunspell
Version: 1.7.2+really1.7.2-10+b4
Severity: minor
Tags: patch

   * 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=10 -ww -z < "man 
page"

  [Use "groff -e ' $' -e '\\~$' <file>" to find obvious 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?

an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
troff:<stdin>:12: warning: trailing space in the line
troff:<stdin>:90: warning: trailing space in the line
troff:<stdin>:275: warning: trailing space in the line
an.tmac:<stdin>:331: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
troff:<stdin>:383: warning: trailing space in the line
troff:<stdin>:390: warning: trailing space in the line
an.tmac:<stdin>:398: misuse, warning: .BI is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:401: misuse, warning: .BI is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:405: misuse, warning: .BI is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.


   * 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: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.17-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 hunspell depends on:
ii  hunspell-de-de [hunspell-dictionary]  20161207-15
ii  hunspell-en-us [hunspell-dictionary]  1:2020.12.07-3
ii  hunspell-is [hunspell-dictionary]     1:25.2.1-1
ii  libc6                                 2.41-4
ii  libgcc-s1                             14.2.0-17
ii  libhunspell-1.7-0                     1.7.2+really1.7.2-10+b4
ii  libncursesw6                          6.5+20250216-2
ii  libreadline8t64                       8.2-6
ii  libstdc++6                            14.2.0-17
ii  libtinfo6                             6.5+20250216-2

hunspell recommends no packages.

Versions of packages hunspell suggests:
ii  unzip  6.0-28

-- no debconf information
Input file is hunspell.1

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

      1 fill mode already enabled, skipping: fi
      1 input text line longer than 80 bytes: Author of Hunspell e...
      1 input text line longer than 80 bytes: hunspell [\-1aDGHhLl...
      1 input text line longer than 80 bytes: will display each wo...
      1 line scope broken: SH breaks TP
      1 skipping unknown macro: .LO 1
      8 whitespace at end of input line


Remove trailing space with: sed -e 's/  *$//'

-.-.

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

      4         Use macro '.B' for one argument or split argument.
      3 .BI is for at least 2 arguments, got 1
      1 .BR is for at least 2 arguments, got 1
      1 Content of macro 'LO' is 1
      5 trailing space in the line


Remove trailing space with: sed -e 's/  *$//'

-.-.

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

8

-.-.

Reduce space between words.

hunspell.1:191:changed;  the '+' command must be used to change the formatter.

-.-.

Use the word (in)valid instead of (il)legal,
if not related to legal matters.

See "www.gnu.org/prep/standards".

Think about translations into other languages!

hunspell.1:105:word unless such capitalization is illegal;

-.-.

Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.

18:$ hunspell -d en_US
25:Correct words signed with an '*', '+' or '-', unrecognized
146:without -a, too).
374:.B hunspell -p unrecognized_but_good *.odt

-.-.

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"

41:suggested words. Commands are single characters as follows
275:without affix file. Special dictionaries are optional extension
277:terms. There is no naming convention for special dictionaries,
280:order of the parameter list needs for good suggestions). First
304:morphological analysis). Without dictionary morphological data,
320:The default dictionary depends on the locale settings. The
322:LC_MESSAGES, and LANG. If none are set then the default personal
337:stemming). It depends from the dictionary data.
392:The default dictionary depends on the locale settings. The
394:LC_MESSAGES, and LANG. If none are set then the following
398:Path of default affix file. See hunspell(5).
409:Author of Hunspell executable is László Németh. For Hunspell library,
412:This manual based on Ispell's manual. See ispell(1).

-.-.

Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Add "\:" to split the string for the output, "\<newline>" in the source.  

Line 6, length 211

hunspell [\-1aDGHhLlmnOrstvwX] [\-\-check\-url] [\-\-check\-apostrophe] [\-d 
dict[,dict2,...]] [\-\-help] [\-i enc] [\-p dict] [\-vv] [\-\-version] 
[text/OpenDocument/TeX/LaTeX/HTML/SGML/XML/nroff/troff file(s)]

Line 32, length 82

will display each word of the files which does not appear in the dictionary at 
the

Longest line is: 211 characters.

-.-.

Split a punctuation mark from a single argument for a two-font macro

404:.BI $HOME/.hunspell_default.

-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

258:(see WORDCHARS, ICONV and OCONV in hunspell(5)).
303:Analyze the words of the input text (see also hunspell(5) about
336:Stem the words of the input text (see also hunspell(5) about
346:Print ispell(1) compatible version number.
398:Path of default affix file. See hunspell(5).
402:See hunspell(5).
407:.B hunspell (3), hunspell(5)
410:see hunspell(3).
412:This manual based on Ispell's manual. See ispell(1).

-.-.

Split a punctuation from a single argument, if a two-font macro is meant.

390:.I \-p.

-.-.

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 after a possible end of sentence
(after a punctuation, that can end a sentence).

[List of affected lines removed.]


hunspell.1:41:suggested words. Commands are single characters as follows
hunspell.1:275:without affix file. Special dictionaries are optional extension
hunspell.1:277:terms. There is no naming convention for special dictionaries,
hunspell.1:280:order of the parameter list needs for good suggestions). First
hunspell.1:304:morphological analysis). Without dictionary morphological data,
hunspell.1:320:The default dictionary depends on the locale settings. The
hunspell.1:322:LC_MESSAGES, and LANG. If none are set then the default personal
hunspell.1:337:stemming). It depends from the dictionary data.
hunspell.1:392:The default dictionary depends on the locale settings. The
hunspell.1:394:LC_MESSAGES, and LANG. If none are set then the following
hunspell.1:398:Path of default affix file. See hunspell(5).
hunspell.1:409:Author of Hunspell executable is László Németh. For Hunspell 
library,
hunspell.1:412:This manual based on Ispell's manual. See ispell(1).

-.-.

Put a subordinate sentence (after a comma) on a new line.

[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.

hunspell.1:1:.TH hunspell 1 "2014-05-27"
hunspell.1:231:.IP "`"

-.-.

Space character after a macro call.

269:.PP          
271:.PP          
383:.I \-d. 

-.-.

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

an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project 
name and version (e.g., "groff 1.23.0")
<stdin>:2: Content of macro 'LO' is 1
troff:<stdin>:11: warning: trailing space in the line
troff:<stdin>:89: warning: trailing space in the line
troff:<stdin>:274: warning: trailing space in the line
an.tmac:<stdin>:330: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
troff:<stdin>:382: warning: trailing space in the line
troff:<stdin>:389: warning: trailing space in the line
an.tmac:<stdin>:397: misuse, warning: .BI is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:400: misuse, warning: .BI is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
an.tmac:<stdin>:404: misuse, warning: .BI is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.

-.-.

Additionally:

Increase the size of tilde (~) to make it more obvious in troff-mode.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- hunspell.1  2025-03-15 04:01:19.904820700 +0000
+++ hunspell.1.new      2025-03-15 15:17:59.002520514 +0000
@@ -1,36 +1,39 @@
-.TH hunspell 1 "2014-05-27"
-.as LO \" define macro
-.LO 1
+.TH hunspell 1 2014-05-27
+.\".LO 1 is undefined
 .SH NAME
 hunspell \- spell checker, stemmer and morphological analyzer
 .SH SYNOPSIS
-hunspell [\-1aDGHhLlmnOrstvwX] [\-\-check\-url] [\-\-check\-apostrophe] [\-d 
dict[,dict2,...]] [\-\-help] [\-i enc] [\-p dict] [\-vv] [\-\-version] 
[text/OpenDocument/TeX/LaTeX/HTML/SGML/XML/nroff/troff file(s)]
+hunspell [\-1aDGHhLlmnOrstvwX] [\-\-check\-url] [\-\-check\-apostrophe]
+[\-d dict[,dict2,...]] [\-\-help] [\-i enc] [\-p dict] [\-vv]
+[\-\-version] [text/OpenDocument/TeX/LaTeX/HTML/SGML/XML/nroff/troff
+file(s)]
 .SH DESCRIPTION
 .I Hunspell
 is fashioned after the
 .I Ispell
-program.  The most common usage is "hunspell" or "hunspell filename". 
+program.  The most common usage is "hunspell" or "hunspell filename".
 Without filename parameter, hunspell checks the standard input.
 Typing "cat" and "exsample" in two input lines, results an asterisk
 (it means "cat" is a correct word) and a line with corrections:
 .PP
 .RS
 .nf
-$ hunspell -d en_US
+$ hunspell \-d en_US
 Hunspell 1.2.3
 *
 & exsample 4 0: example, examples, ex sample, ex-sample
 .fi
 .RE
 .PP
-Correct words signed with an '*', '+' or '-', unrecognized
+Correct words signed with an '*', '+' or '\-', unrecognized
 words signed with '#' or '&' in output lines (see later).
 (Close the standard input with Ctrl-d on Unix/Linux and
 Ctrl-Z Enter or Ctrl-C on Windows.)
 .PP
 With filename parameters,
 .I hunspell
-will display each word of the files which does not appear in the dictionary at 
the
+will display each word of the files
+which does not appear in the dictionary at the
 top of the screen and allow you to change it.  If there are "near
 misses" in the dictionary, then they are
 also displayed on following lines.
@@ -39,7 +42,8 @@ word and the previous line
 are printed at the bottom of the screen.  If your terminal can
 display in reverse video, the word itself is highlighted.  You have the
 option of replacing the word completely, or choosing one of the
-suggested words. Commands are single characters as follows
+suggested words.
+Commands are single characters as follows
 (case is ignored):
 .PP
 .RS
@@ -87,7 +91,7 @@ a single line is written to the standard
 checked for spelling on the line.  If the word
 was found in the main dictionary, or your personal dictionary, then the
 line contains only a '*'.  If the word was found through affix removal,
-then the line contains a '+', a space, and the root word. 
+then the line contains a '+', a space, and the root word.
 If the word was found through compound formation (concatenation of two
 words, then the line contains only a '\-'.
 .IP ""
@@ -103,7 +107,7 @@ misses separated by
 commas and spaces.
 .IP ""
 Also, each near miss or guess is capitalized the same as the input
-word unless such capitalization is illegal;
+word unless such capitalization is invalid;
 in the latter case each near miss is capitalized correctly
 according to the dictionary.
 .IP ""
@@ -144,14 +148,14 @@ command "echo 'frqy refries | hunspell \
 This mode
 is also suitable for interactive use when you want to figure out the
 spelling of a single word (but this is the default behavior of hunspell
-without -a, too).
+without \-a, too).
 .IP ""
 When in the
 .B \-a
 mode,
 .I hunspell
 will also accept lines of single words prefixed with any
-of '*', '&', '@', '+', '\-', '~', '#', '!', '%', '`', or '^'.
+of '*', '&', '@', '+', '\-', '\s+2~\s-2', '#', '!', '%', '`', or '^'.
 A line starting with '*' tells
 .I hunspell
 to insert the word into the user's dictionary (similar to the I command).
@@ -179,8 +183,8 @@ to nroff/troff mode (but these commands
 However, the string character type is
 .I not
 changed;
-the '~' command must be used to do this.
-A line starting with '~' causes
+the '\s+2~\s-2' command must be used to do this.
+A line starting with '\s+2~\s-2' causes
 .I hunspell
 to set internal parameters (in particular, the default string
 character type) based on the filename given in the rest of the line.
@@ -189,7 +193,7 @@ Instead of a file name or suffix, a uniq
 affix file, may be specified.)
 However, the formatter parsing is
 .I not
-changed;  the '+' command must be used to change the formatter.
+changed; the '+' command must be used to change the formatter.
 A line prefixed with '#' will cause the
 personal dictionary to be saved.
 A line prefixed with '!' will turn on
@@ -202,7 +206,7 @@ this mode can only be disabled by turnin
 .IP ""
 Any input following the prefix
 characters '+', '\-', '#', '!', '%', or '`' is ignored, as is any input
-following the filename on a '~' line.
+following the filename on a '\s+2~\s-2' line.
 To allow spell-checking of lines beginning with these characters, a
 line starting with '^' has that character removed before it is passed
 to the spell-checking code.
@@ -219,7 +223,7 @@ Add to personal dictionary
 Accept word, but leave out of dictionary
 .IP #
 Save current personal dictionary
-.IP ~
+.IP \s+2~\s-2
 Set parameters based on filename
 .IP +
 Enter TeX mode
@@ -229,11 +233,10 @@ Exit TeX mode
 Enter terse mode
 .IP %
 Exit terse mode
-.IP "`"
+.IP `
 Enter verbose-correction mode
 .IP ^
 Spell-check rest of line
-.fi
 .RE
 .IP ""
 In
@@ -256,7 +259,8 @@ interaction for some programs.
 .IP \fB\-\-check\-apostrophe\fR
 Check and force Unicode apostrophes (U+2019), if one of the ASCII or Unicode
 apostrophes is specified by the spelling dictionary, as a word character
-(see WORDCHARS, ICONV and OCONV in hunspell(5)).
+(see WORDCHARS, ICONV and OCONV in
+.BR hunspell (5)).
 .IP \fB\-\-check\-url\fR
 Check URLs, e-mail addresses and directory paths.
 
@@ -267,19 +271,21 @@ search path and the available dictionari
 .IP \fB\-d\ dict,dict2,...\fR
 Set dictionaries by their base names with or without paths.
 Example of the syntax:
-.PP          
+.PP
 \-d en_US,en_geo,en_med,de_DE,de_med
-.PP          
+.PP
 en_US and de_DE are base dictionaries, they consist of
 aff and dic file pairs: en_US.aff, en_US.dic and de_DE.aff, de_DE.dic.
-En_geo, en_med, de_med are special dictionaries: dictionaries 
-without affix file. Special dictionaries are optional extension
+En_geo, en_med, de_med are special dictionaries: dictionaries
+without affix file.
+Special dictionaries are optional extension
 of the base dictionaries usually with special (medical, law etc.)
-terms. There is no naming convention for special dictionaries,
+terms.
+There is no naming convention for special dictionaries,
 only the ".dic" extension: dictionaries without affix file will
 be an extension of the preceding base dictionary (right
-order of the parameter list needs for good suggestions). First
-item of \-d parameter list must be a base dictionary.
+order of the parameter list needs for good suggestions).
+First item of \-d parameter list must be a base dictionary.
 
 .IP \fB\-G\fR
 Print only correct words or lines.
@@ -301,8 +307,10 @@ The "list" option
 is used to produce a list of misspelled words from the standard input.
 
 .IP \fB\-m\fR
-Analyze the words of the input text (see also hunspell(5) about
-morphological analysis). Without dictionary morphological data,
+Analyze the words of the input text (see also
+.BR hunspell (5)
+about morphological analysis).
+Without dictionary morphological data,
 signs the flags of the affixes of the word forms for dictionary
 developers.
 
@@ -318,9 +326,10 @@ Set password for encrypted dictionaries.
 
 .IP \fB\-p\ dict\fR
 Set path of personal dictionary.
-The default dictionary depends on the locale settings. The
-following environment variables are searched: LC_ALL,
-LC_MESSAGES, and LANG. If none are set then the default personal
+The default dictionary depends on the locale settings.
+The following environment variables are searched:
+LC_ALL, LC_MESSAGES, and LANG.
+If none are set then the default personal
 dictionary is $HOME/.hunspell_default.
 
 Setting
@@ -328,14 +337,16 @@ Setting
 or  the
 .I DICTIONARY
 environmental variable, personal dictionary will be
-.BR $HOME/.hunspell_dicname
+.B $HOME/.hunspell_dicname
 
 .IP \fB\-r\fR
 Warn of the rare words, which are also potential spelling mistakes.
 
 .IP \fB\-s\fR
-Stem the words of the input text (see also hunspell(5) about
-stemming). It depends from the dictionary data.
+Stem the words of the input text (see also
+.BR hunspell (5)
+about stemming).
+It depends from the dictionary data.
 
 .IP \fB\-t\fR
 The input file is in TeX or LaTeX format.
@@ -344,7 +355,9 @@ The input file is in TeX or LaTeX format
 Print version number.
 
 .IP \fB\-vv\fR
-Print ispell(1) compatible version number.
+Print
+.BR ispell (1)
+compatible version number.
 
 .IP \fB\-w\fR
 Print misspelled words (= lines) from one word/line input.
@@ -372,42 +385,49 @@ List bad words of ODF documents
 .B hunspell \-l *.odt | sort | uniq >unrecognized
 Saving unrecognized words of ODF documents (filtering duplications).
 .TP
-.B hunspell -p unrecognized_but_good *.odt
+.B hunspell \-p unrecognized_but_good *.odt
 Interactive spell checking of ODF documents, using the previously
 saved and reduced word list, as a personal dictionary, to speed up
 spell checking.
-.TP
 .SH ENVIRONMENT
 .TP
 .B DICTIONARY
-Similar to 
-.I \-d. 
+Similar to
+.IR \-d .
 .TP
 .B DICPATH
 Dictionary path.
 .TP
 .B WORDLIST
-Equivalent to 
-.I \-p.
+Equivalent to
+.IR \-p .
 .SH FILES
-The default dictionary depends on the locale settings. The
-following environment variables are searched: LC_ALL,
-LC_MESSAGES, and LANG. If none are set then the following
+The default dictionary depends on the locale settings.
+The following environment variables are searched: LC_ALL,
+LC_MESSAGES, and LANG.
+If none are set then the following
 fallbacks are used:
 
-.BI /usr/share/myspell/default.aff
-Path of default affix file. See hunspell(5).
+.B /usr/share/myspell/default.aff
+Path of default affix file.
+See
+.BR hunspell (5).
 .PP
-.BI /usr/share/myspell/default.dic
+.B /usr/share/myspell/default.dic
 Path of default dictionary file.
-See hunspell(5).
+See
+.BR hunspell (5).
 .PP
-.BI $HOME/.hunspell_default.
+.BR $HOME/.hunspell_default .
 Default path to personal dictionary.
 .SH SEE ALSO
-.B hunspell (3), hunspell(5)
+.BR hunspell "(3), " hunspell (5)
 .SH AUTHOR
-Author of Hunspell executable is László Németh. For Hunspell library,
-see hunspell(3).
+Author of Hunspell executable is László Németh.
+For Hunspell library,
+see
+.BR hunspell (3).
 .PP
-This manual based on Ispell's manual. See ispell(1).
+This manual based on Ispell's manual.
+See
+.BR ispell (1).
  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>

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

  For a style guide use

  mandoc -T lint

-.-

  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.

  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