[NTG-context] style=underbar output in export

Rik Kabel context at rik.users.panix.com
Thu Oct 4 00:01:06 CEST 2018


List,

With recent betas, since a fix for tagged elements in tables, underbar 
processing seems to have changed (or perhaps I just noticed it after 
that fix).

Previously, the following highlight definition worked for both pdf and 
export outputs:

    \definehighlight [Term][style={{\underbar}}]

With the current betas (2018-10-02 and 2018-10-03) this no longer works 
for all output formats. I have tried a few variants, and the results are 
as follows:

Using [style={{\underbar}}], the pdf output now shows no underlining, 
while the html export has the expected underlining.

Using [style={\underbar}] or [style=\underbar] or [style=underbar], the 
pdf output shows the expected underlining, while the html export may 
show continuous underlining after the first use, and in any case 
eventually loses all formatting. In a large enough document, an error is 
generated in the html, but not in the log as far as I can tell:

    <div class="error">...eXt/tex/texmf-context/tex/context/base/mkiv/lxml-tab.lua:1192:
      backtrack stack overflow (current limit is 1000)</div>

A test harness:

xxx.css:

    highlight[detail="Term"],
    div.highlight.Term {
         display         : inline ;
         font-style      : inherit ;
         font-variant    : inherit ;
         font-weight     : inherit ;
         font-family     : inherit ;
         color           : inherit ;
         text-decoration : underline ;
    }

xxx.tex:

    \setupbackend[export=yes]
    \setupexport[cssfile=xxx.css]
    \definehighlight[Term][style=underbar]%       pdf ok, html bad
    %\definehighlight[Term][style={{\underbar}}]% pdf bad, html ok
    \starttext
    \dorecurse{200}{%
       \startparagraph
         \samplefile{ward}
         \Term{pollakis legomenon}
         \samplefile{bryson}
       \stopparagraph}
    \stoptext

The html output of the above shows the text as a single long line and 
when displayed the last paragraph are run together with no formatting. 
For a larger recurse (250 does it for me) the error described above is 
triggered.

As a work-around, I can enable one variant or the other based on the 
output mode, but clearly there is an issue here.

-- 
Rik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181003/f4ed372f/attachment.html>


More information about the ntg-context mailing list