[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#971930: a2ps-lpr-wrapper.1: fix some typographic issues



On Tue, Dec 29, 2020 at 08:16:30PM -0800, Vagrant Cascadian wrote:
> Control: tags 971930 - patch
> 
[...]
> Thanks for the patch!
> 
> Unfortunately it cannot be applied to the package, as a2ps-lpr-wrapper.1
> is generated from debian/manpages/a2ps-lpr-wrapper.sgml:
> 
>   https://browse.dgit.debian.org/a2ps.git/tree/debian/manpages/a2ps-lpr-wrapper.sgml
> 
> In debian/rules:
> 
>   https://browse.dgit.debian.org/a2ps.git/tree/debian/rules#n27
> 
> 
> Can you update your patch to apply to the .sgml source?
> 
> 

  A diff-file for the sgml-file is in the first attachment.

  There is a missing command in the sgml-file,
that suppresses a space character after a '<arg/>' command.

  The example is where one line ends with '<arg/>' and
the next line begins with '<arg>',
resulting in two space characters between words.

  The addition of '\&' before a period in the middle or
end of a word is wrong.

  The output of programs, that transform docbook files to man files,
needs postprocessing.

  A shell script for the postprocessing is in a second attachment.


-- 
Bjarni I. G�ason
--- a2ps-lpr-wrapper.sgml	2021-01-08 23:40:51.000000000 +0000
+++ a2ps-lpr-wrapper.sgml.new	2021-01-09 01:22:00.000000000 +0000
@@ -63,23 +63,21 @@ manpage.1: manpage.sgml
     <cmdsynopsis>
       <command>&dhpackage;</command>
 
-      <arg><option>-d <replaceable>printer</replaceable></option></arg>
-
-      <arg><option><replaceable>files</replaceable></option></arg>
+      <arg><option>\-d</option> <replaceable>printer</replaceable></arg>
+      <arg><replaceable>files</replaceable></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
   <refsect1>
     <title>DESCRIPTION</title>
 
     <para>This manual page documents briefly the
-      <command>&dhpackage;</command>
-      command.</para>
+      <command>&dhpackage;</command> command.</para>
 
     <para><command>&dhpackage;</command> uses either
       <application>lp</application> or <application>lpr</application> to send
-      <replaceable>files</replaceable> to <replaceable>printer</replaceable>. It
-      determines which of the two programs is currently installed and adds the
-      appropriate parameters.</para>
+      <replaceable>files</replaceable> to <replaceable>printer</replaceable>.
+      It determines which of the two programs is currently installed and
+      adds the appropriate parameters.</para>
 
   </refsect1>
   <refsect1>
@@ -87,15 +85,13 @@ manpage.1: manpage.sgml
 
     <variablelist>
       <varlistentry>
-        <term><option>-d <replaceable>printer</replaceable></option>
-        </term>
+        <term><option>\-d <replaceable>printer</replaceable></option></term>
         <listitem>
           <para>Destination system printer.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
-        <term><option><replaceable>files</replaceable></option>
-        </term>
+        <term><replaceable>files</replaceable></term>
         <listitem>
           <para>List of files to be printed.</para>
         </listitem>
@@ -105,7 +101,7 @@ manpage.1: manpage.sgml
   <refsect1>
     <title>SEE ALSO</title>
 
-    <para>a2ps (1).</para>
+    <para><command>a2ps</command>(1).</para>
 
     <para>The programs are documented fully by the a2ps documentation available via the
       <application>Info</application> system.</para>
@@ -116,13 +112,12 @@ manpage.1: manpage.sgml
     <para>This manual page was written by &dhusername; &dhemail; for
       the &debian; system (but may be used by others).  Permission is
       granted to copy, distribute and/or modify this document under
-      the terms of the &gnu; General Public License, Version 2 any 
-	  later version published by the Free Software Foundation.
+      the terms of the &gnu; General Public License, Version 2 any
+      later version published by the Free Software Foundation.</para>
+    <para>
+      On Debian systems, the complete text of the GNU General Public
+      License can be found in /usr/share/common-licenses/GPL.
     </para>
-	<para>
-	  On Debian systems, the complete text of the GNU General Public
-	  License can be found in /usr/share/common-licenses/GPL.
-	</para>
 
   </refsect1>
 </refentry>
#!/bin/sh
set -efu

# Skip lines with comments.
# Skip tables.
# Remove trailing spaces.
# Remove .PP after .SH and .SH.
# Remove '\&' before a period inside or after a word.
#  '\&' suppresses kerning between characters on both sides of it
# Break lines after a punctuation mark, before a parentheses,


sed -e '/\\"/n' -e '/^\.TS,^\.TE/n' \
  -e 's/  *$//' -e '/^\.S[SH]/{n; /\.PP/d}' -e 's/\([^ ]\)\\&\./\1./g' \
  -e 's/\([^ ][.,;!]\)  */\1\n/g' -e 's/ (/\n(/g' $1

Reply to: