ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issue with environment and Lua
@ 2020-05-26 18:24 Pablo Rodriguez
  2020-05-26 19:01 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2020-05-26 18:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have added an \xmlflushcontext to a non-minimal environment file and
it crashes again and again.

I get the following errors:

lua error       > lua error on line 8 in file cont-yes.mkiv:
function call [560]:
...ext/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:918: bad
argument #2 to 'lpegmatch' (string expected, got table)
<empty file>
mtx-context     | fatal error: return code: 256

Is there any way to be able to know which XML code outputs a table
instead of the string ConTeXt expects and complaints about?

I already spent three hours and I got nothing.

In cases like that, it would be useful that ConTeXt could translate XML
+ environments to ConTeXt sources.

This would make easier to spot errors on documents or issues in ConTeXt.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: issue with environment and Lua
  2020-05-26 18:24 issue with environment and Lua Pablo Rodriguez
@ 2020-05-26 19:01 ` Hans Hagen
  2020-05-27 15:04   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2020-05-26 19:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/26/2020 8:24 PM, Pablo Rodriguez wrote:

> I have added an \xmlflushcontext to a non-minimal environment file and
> it crashes again and again.

then you probably use the wrong command

> I get the following errors:
> 
> lua error       > lua error on line 8 in file cont-yes.mkiv:
> function call [560]:
> ...ext/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:918: bad
> argument #2 to 'lpegmatch' (string expected, got table)
> <empty file>
> mtx-context     | fatal error: return code: 256
> 
> Is there any way to be able to know which XML code outputs a table
> instead of the string ConTeXt expects and complaints about?

hard to say as in xml there can be strings as well as tables so it all 
depends on what you do .. normally ther eis checking but not for cases 
where we're sure wat to expect (no need for overhead)

> I already spent three hours and I got nothing.
> 
> In cases like that, it would be useful that ConTeXt could translate XML
> + environments to ConTeXt sources.

\enabletrackers[context*]

in the xml setups that you use, something \xmlshow{#1} will give you a 
clue of what you're dealing with

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: issue with environment and Lua
  2020-05-26 19:01 ` Hans Hagen
@ 2020-05-27 15:04   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2020-05-27 15:04 UTC (permalink / raw)
  To: ntg-context

On 5/26/20 9:01 PM, Hans Hagen wrote:
> On 5/26/2020 8:24 PM, Pablo Rodriguez wrote:
>
>> I have added an \xmlflushcontext to a non-minimal environment file and
>> it crashes again and again.
>
> then you probably use the wrong command

Many thanks for your reply, Hans.

I have just discovered that I get different HTML math output in pandoc.

From these inputs in the same source file:

 1 $I = V × D$

 2 $\top{v_e} \approx \top{v}_t$

I get these HTML outputs:

 1 <span class="math inline"><em>I</em> = <em>D</em> × <em>V</em></span>

 2 <span class="math inline">$\bar{v}_e \approx \bar{v}_t $</span>

The first one is problematic to get with \xmlflushcontext. This was the
problem and I have to check this with the pandoc people.

Sorry for the noise and many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-05-27 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 18:24 issue with environment and Lua Pablo Rodriguez
2020-05-26 19:01 ` Hans Hagen
2020-05-27 15:04   ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).