[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mandoc-tech
Subject:    Re: eqn(7): equations with no output shouldn't emit <math>
From:       Ingo Schwarze <schwarze () usta ! de>
Date:       2017-07-14 13:35:32
Message-ID: 20170714133532.GC32226 () athene ! usta ! de
[Download RAW message or body]

Hi Anthony,

Anthony J. Bentley wrote on Fri, Jul 14, 2017 at 12:34:59AM -0600:

> It's very common in the libGL manuals to set delimeters early in the
> document:
> 
> .EQ
> delim $$
> .EN
> 
> In -Thtml, this becomes:
> 
> <math class="eqn"><mrow></mrow></math>
> 
> Which results in unneeded vertical space in the output.

Fixed with the following commit.

Thanks for reporting,
  Ingo


Log Message:
-----------
do not print <math class="eqn"><mrow></mrow></math> for empty .EQ;
issue reported by bentley@

Modified Files:
--------------
    mandoc:
        eqn_html.c

Revision Data
-------------
Index: eqn_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn_html.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Leqn_html.c -Leqn_html.c -u -p -r1.16 -r1.17
--- eqn_html.c
+++ eqn_html.c
@@ -231,6 +231,9 @@ print_eqn(struct html *p, const struct e
 {
 	struct tag	*t;
 
+	if (bp->first == NULL)
+		return;
+
 	t = print_otag(p, TAG_MATH, "c", "eqn");
 
 	p->flags |= HTML_NONOSPACE;
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic