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

List:       mandoc-tech
Subject:    Re: eqn(7): Brackets and commas as operators
From:       Ingo Schwarze <schwarze () usta ! de>
Date:       2017-07-14 18:24:13
Message-ID: 20170714182413.GH32226 () athene ! usta ! de
[Download RAW message or body]

Hi Anthony,

Anthony J. Bentley wrote on Fri, Jul 14, 2017 at 09:14:43AM -0600:
> Ingo Schwarze writes:
>> Anthony J. Bentley wrote on Thu, Jul 13, 2017 at 07:00:18PM -0600:

>>> .EQ
>>> v[0], v[1]
>>> .EN
>>> 
>>> In HTML output, "]," gets wrapped into a single <mo>, which renders
>>> incorrectly.

>> Incorrectly in which way?  Do you menan that there should be spacing
>> after the comma?

> Incorrectly in that the v[0]'s left bracket and right bracket differ
> in size in the browser.
> 
>   <mi>v</mi><mo>[</mo><mn>0</mn><mo>],</mo>
>   <mi>v</mi><mo>[</mo><mn>1</mn><mo>]</mo>

I don't see a size difference in Firefox 54.0, but maybe there is a
slight vertical offset.

>> What would be a correct rendering?

> This is what it should look like:
> 
>   <mi>v</mi><mo>[</mo><mn>0</mn><mo>]</mo><mo>,</mo>
>   <mi>v</mi><mo>[</mo><mn>1</mn><mo>]</mo>

I see, that makes sense anyway, thanks for explaining.

Fixed with the commit below.

Yours,
  Ingo


Log Message:
-----------
always give commas their own <mo> element,
suggested by bentley@, improves e.g. glMultMatrix(3)

Modified Files:
--------------
    mandoc:
        eqn.c

Revision Data
-------------
Index: eqn.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/eqn.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -Leqn.c -Leqn.c -u -p -r1.76 -r1.77
--- eqn.c
+++ eqn.c
@@ -1041,7 +1041,7 @@ next_tok:
 				/* No boundary after last character. */
 				if (*cpn == '\0')
 					break;
-				if (ccln == ccl)
+				if (ccln == ccl && *cp != ',' && *cpn != ',')
 					continue;
 				/* Boundary found, split the text. */
 				if (parent->args == parent->expectargs) {
--
 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