tech@mandoc.bsd.lv
 help / color / Atom feed
* eqn(7): equations with no output shouldn't emit <math>
@ 2017-07-14  6:34 Anthony J. Bentley
  2017-07-14 13:35 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony J. Bentley @ 2017-07-14  6:34 UTC (permalink / raw)
  To: tech

Hi,

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.

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: eqn(7): equations with no output shouldn't emit <math>
  2017-07-14  6:34 eqn(7): equations with no output shouldn't emit <math> Anthony J. Bentley
@ 2017-07-14 13:35 ` Ingo Schwarze
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2017-07-14 13:35 UTC (permalink / raw)
  To: Anthony J. Bentley; +Cc: tech

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14  6:34 eqn(7): equations with no output shouldn't emit <math> Anthony J. Bentley
2017-07-14 13:35 ` Ingo Schwarze

tech@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-tech

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.tech


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git