bug-groff
[Top][All Lists]
Advanced

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

[bug #55806] [PATCH] tmac/doc-ditroff-u: Remove spaces in an aritmetic e


From: Bjarni Ingi Gislason
Subject: [bug #55806] [PATCH] tmac/doc-ditroff-u: Remove spaces in an aritmetic expression
Date: Fri, 1 Mar 2019 21:18:11 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

URL:
  <https://savannah.gnu.org/bugs/?55806>

                 Summary: [PATCH] tmac/doc-ditroff-u: Remove spaces in an
aritmetic expression
                 Project: GNU troff
            Submitted by: bjarniig
            Submitted on: Sat 02 Mar 2019 02:18:10 AM UTC
                Category: Macro - mdoc
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:


>From df313f748a22a72d88eeaff548760d72f56fb8f6 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <address@hidden>
Date: Sat, 2 Mar 2019 02:09:39 +0000
Subject: [PATCH] tmac/doc-ditroff-u: Remove spaces in an aritmetic expression

  Spaces in the string

.ds doc-Tn-font-size \s[(\n[.ps]u - 1z)]

  cause trouble in the unquoted argument \*(Px in

.It \e*(Px   Ta \*(Px       Ta POSIX standard name

  defined as

.ds Px \*[doc-Tn-font-size]\%POSIX

  in the file "tmac/doc-syms-u".

  Output from "groff -ww -mandoc mandoc_char.7 > /dev/null" where
"mandoc_char.7" is from the "mandoc" (Debian
"[mdocml_1.14.4.orig.tar.gz]") package:

  (Line 741 shows the effect of the spaces in the string.)

troff: mandoc_char.7:402: warning: can't find special character 'vA'
troff: mandoc_char.7:428: warning: can't find special character '-+'
troff: mandoc_char.7:471: warning: can't find special character 'coproduct'
troff: mandoc_char.7:606: warning: can't find special character '.j'
troff: mandoc_char.7:688: warning: can't find special character '+e'
troff: mandoc_char.7:726: warning: macro 'R' not defined
troff: mandoc_char.7:727: warning: macro 'Tm' not defined
troff: mandoc_char.7:733: warning: macro 'lq' not defined
troff: mandoc_char.7:734: warning: macro 'rq' not defined
troff: mandoc_char.7:736: warning: macro 'va' not defined
troff: mandoc_char.7:741: warning: missing ')' (got '"')
troff: mandoc_char.7:741: missing ']'
troff: mandoc_char.7:741: warning: missing closing delimiter
troff: mandoc_char.7:741: warning: missing ')' (got '"')
troff: mandoc_char.7:741: missing ']'
troff: mandoc_char.7:741: warning: missing closing delimiter
troff: mandoc_char.7:741: warning: missing ')' (got '')
troff: mandoc_char.7:741: missing ']'
troff: mandoc_char.7:741: warning: missing ')' (got '.')
troff: mandoc_char.7:741: missing ']'
troff: mandoc_char.7:741: warning: number register 'doc-punct\s[(10000u' not
defined
troff: mandoc_char.7:741: warning: missing closing delimiter
troff: mandoc_char.7:741: warning: missing ')' (got newline)
troff: mandoc_char.7:741: warning: unbalanced .el request
troff: mandoc_char.7:741: warning: missing ')' (got '\&')
troff: mandoc_char.7:741: missing ']'
troff: mandoc_char.7:742: warning: missing ')' (got '"')
troff: mandoc_char.7:742: missing ']'
troff: mandoc_char.7:742: warning: missing closing delimiter
troff: mandoc_char.7:742: warning: missing ')' (got '"')
troff: mandoc_char.7:742: missing ']'
troff: mandoc_char.7:742: warning: missing closing delimiter
troff: mandoc_char.7:742: warning: missing ')' (got '')
troff: mandoc_char.7:742: missing ']'
troff: mandoc_char.7:742: warning: missing ')' (got '.')
troff: mandoc_char.7:742: missing ']'
troff: mandoc_char.7:742: warning: missing closing delimiter
troff: mandoc_char.7:742: warning: missing ')' (got newline)
troff: mandoc_char.7:742: warning: unbalanced .el request
troff: mandoc_char.7:742: warning: missing ')' (got '\&')
troff: mandoc_char.7:742: missing ']'


Signed-off-by: Bjarni Ingi Gislason <address@hidden>
---
 tmac/doc-ditroff-u | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tmac/doc-ditroff-u b/tmac/doc-ditroff-u
index 18aa5db8..a75f1d59 100644
--- a/tmac/doc-ditroff-u
+++ b/tmac/doc-ditroff-u
@@ -92,7 +92,9 @@
 .ds doc-Sx-font \f[B]\s[\n[.ps]u]
 .ds doc-Tn-font-shape \f[R]
 \# XXX: adapt to discrete LaTeX font sizes
-.ds doc-Tn-font-size \s[(\n[.ps]u - 1z)]
+\# Use no spaces in the arithmetic expression as the string could be
+\# (is) used in an argument, that is not quoted
+.ds doc-Tn-font-size \s[(\n[.ps]u-1z)]
 .ds doc-Va-font \f[I]\s[\n[.ps]u]
 .ds doc-Xr-font \f[C]\s[\n[.ps]u]
 .
-- 
2.20.1






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55806>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]