[NTG-context] XML processing, unwanted indentation/alignment

2024-02-15 Thread Michael Guravage
Greetings, I'm typesetting an address book whose addresses are in XML. A typical entry has this structure: initials and birthday are required, first_name can be left blank and email, mobile and maiden_name are optional. I've written a macro (name) to

[NTG-context] XML: flush to lua function

2023-09-11 Thread denis.maier
Hi, I have the following xml setup with a lua function: \startluacode function markingLength(s) _,n = s:gsub("%S+","") if n > 3 then context("yes" .. " ...") else context("no") end end \stopluacode \startxmlsetups

[NTG-context] XML, multiple spaces encoded as %20 get merged into one space

2023-09-06 Thread denis.maier
Hi, I have the example below that uses the three images in the attachment. For some reason multiple spaces encoded as %20 get merged into a single %20. The first image () does not get included even though the name is correct. The second image () gets included. Filename is correct. The third

[NTG-context] XML: Correct usage of hash symbol in url

2023-08-25 Thread denis.maier
Hi, I need to process URLs in XML documents differently depending on the target. Thanks to Hans and Thomas I can now deal with the attributes. Now I need to prefix certain kind of targets with a certain URL (a web viewer for IIIF images in this particular case). The prefix contains a #, which,

[NTG-context] XML processing beginner's question

2023-08-21 Thread Michael Löscher
Hello list, having the xml data at the bottom, I would like to process it so that the result is like this: --- What it is (e.g. bold formatted) date: 2023-08-01 (italic) Description (small font size) Another text (small font size) hd1 - Header 1 § 1 First (A first short description)

[NTG-context] xml: matches always child of other element

2023-07-24 Thread denis.maier
Hi, I must be missing something obvious, but in this example the pattern for always matches the first element, not the one under the current . Interestingly, using xml:index-entry-2 instead of the normal version matches correctly... Any hints what is going off the rails here? Best, Denis

Re: [NTG-context] xml nbsp?

2023-06-13 Thread Bruce Horrocks via ntg-context
is not a pre-defined named character in XML (but it is in HTML which lulls you into a false sense of security). See the link below for some more detail and a fix. > On 13 Jun 2023, at 11:01, Hans van der Meer via

[NTG-context] xml nbsp?

2023-06-13 Thread Hans van der Meer via ntg-context
What happened to the non breaking space in XML? It has disappeared in a way. See the minimal example attached.dr. Hans van der Meer test-nbsp.pdf Description: Adobe PDF document ___ If your question is of interest to

Re: [NTG-context] Xml filtering in Lua

2022-11-21 Thread Thomas A. Schmitz via ntg-context
On 11/20/22 19:19, Thomas A. Schmitz via ntg-context wrote: I load data from an external xml file (not the one I'm processing) and store some of it in a lua table. local examples = lxml.load ("my_examples", "examples.xml") Replying to myself, and sorry for the noise (this was fairly easy,

Re: [NTG-context] Xml filtering in Lua

2022-11-20 Thread Thomas A. Schmitz via ntg-context
On 11/17/22 11:04, Hans Hagen via ntg-context wrote: so, basically you collect data and use it later ... for huge datasets that saves some time if you have only chapters to process you can even decide to flush in that function Alright, I'm making very good progress here, but right now I'm

Re: [NTG-context] Xml filtering in Lua

2022-11-17 Thread Thomas A. Schmitz via ntg-context
> On 17. Nov 2022, at 11:04, Hans Hagen via ntg-context > wrote: > > so, basically you collect data and use it later ... for huge datasets that > saves some time > > if you have only chapters to process you can even decide to flush in that > function > > Hans I think this is exactly the

Re: [NTG-context] Xml filtering in Lua

2022-11-17 Thread Hans Hagen via ntg-context
On 11/16/2022 8:56 PM, mf via ntg-context wrote: This works: local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id .. '"]') also this: local lpath = string.format('../../topics/topic[@t:id=="%s"]', ch_id) local metadata = xml.filter (t, lpath) It looks like xml.filter

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Hans Hagen via ntg-context
On 11/16/2022 10:09 PM, Thomas A. Schmitz via ntg-context wrote: On 11/16/22 21:51, Denis Maier via ntg-context wrote: Just a quick question regarding this? Is xml.filter equivalent to \xmlfilter? If so, how do you pass the match to a command as you'd do with \xmlfilter? I'm still digesting

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context
On 11/16/22 21:51, Denis Maier via ntg-context wrote: Just a quick question regarding this? Is xml.filter equivalent to \xmlfilter? If so, how do you pass the match to a command as you'd do with \xmlfilter? I'm still digesting and playing with Massi's reply; will probably be back with more

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Denis Maier via ntg-context
16. November 2022 20:56 > An: ntg-context@ntg.nl > Cc: mf > Betreff: Re: [NTG-context] Xml filtering in Lua > > This works: > > local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id .. > '"]') > > also this: > > local lpath = string.f

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread mf via ntg-context
This works: local metadata = xml.filter (t, '../../topics/topic[@t:id=="' .. ch_id .. '"]') also this: local lpath = string.format('../../topics/topic[@t:id=="%s"]', ch_id) local metadata = xml.filter (t, lpath) It looks like xml.filter supports only 2 arguments (see lxml-tex.lua), and

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context
On 11/16/22 19:56, mf via ntg-context wrote: local ch_id = t.at["ch:id"] You're right, of course, using a colon was a stupid idea. When I replace it with an underscore, you can see that both are in fact identical: \startbuffer[test] This is the first test 22/11/16

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread mf via ntg-context
Il 16/11/22 18:33, Thomas A. Schmitz via ntg-context ha scritto: \startbuffer[test] This is the first test 22/11/16 This is the second test 22/11/17 This will be the content of the first chapter.

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context
Hi Duncan, Thank you for pointing this out! I knew this was true inside the xmlns namespace, so you can’t have identical xml:id tags, but you’re probably right that it’s better to avoid this confusion altogether. Alas, this doesn’t help with my problem. Since there was a type in my minimal

Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Duncan Hothersall via ntg-context
Hi Thomas. I'm not sure about the code, sorry, but I do know that an XML document can't have two IDs of the same value. Typically you would use a linkend attribute on the element which is referencing an id (in this case the topics, I think). Probably doesn't help with your problem, but it's

[NTG-context] Xml filtering in Lua

2022-11-16 Thread Thomas A. Schmitz via ntg-context
Hi all, I thought this was easy, but I overestimated my competence… I want to filter xml elements via their attributes and retrieve and typeset parts belonging together. Here is a small test file that explains what I’m trying: \startbuffer[test] This is the first test

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-24 Thread Bruce Horrocks via ntg-context
I haven't seen it explicitly documented - my cue to add it to the Wiki I guess! I work with XML a fair bit and, IMHO, the WWW consortium docs do a very poor job of explaining namespaces because they make them seem much more complicated than they are. Essentially, a tag with a namespace

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-24 Thread Duncan Hothersall via ntg-context
Yes, it does! Thanks Bruce. Is this documented somewhere already and I missed it? Cheers. Duncan On Mon, 23 May 2022 at 21:14, Bruce Horrocks wrote: > Does this help? > > \startxmlsetups xml:demo:base > \xmlsetsetup{#1}{tag}{xml:demo:tag} > \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <--- >

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-23 Thread Bruce Horrocks via ntg-context
Does this help? \startxmlsetups xml:demo:base \xmlsetsetup{#1}{tag}{xml:demo:tag} \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <--- \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:tag \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:otag %% <---

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-23 Thread Duncan Hothersall via ntg-context
I found this unanswered question on the list from November 2020 and find today that I have the same question. How can one handle elements with the same name but in different namespaces? How should the different \startxmlsetups commands be written? Thanks. Duncan On Mon, 16 Nov 2020 at 13:37,

Re: [NTG-context] XML: calculations on attribute values before output

2022-05-05 Thread Duncan Hothersall via ntg-context
Thanks so much Taco, that opens the door to a lot for me. It's a tricky learning curve. Just in case anyone else is copying code in future for CALS, there's a tiny tweak to the rows calculation, it should be (t.at.morerows or 0) + 1. I see a route to solving lots of other problems here too.

Re: [NTG-context] XML: calculations on attribute values before output

2022-05-05 Thread Taco Hoekwater via ntg-context
> On 4 May 2022, at 22:10, Duncan Hothersall via ntg-context > wrote: > > Hi. > > I'm processing an XML table and need to set a row span. Because we use a > variant of the CALS table model, spans are defined by an attribute saying how > many *additional* rows should be spanned, as opposed

[NTG-context] XML: calculations on attribute values before output

2022-05-04 Thread Duncan Hothersall via ntg-context
Hi. I'm processing an XML table and need to set a row span. Because we use a variant of the CALS table model, spans are defined by an attribute saying how many *additional* rows should be spanned, as opposed to how many *in total*. So to translate this into TABLE \bTD[nr=X] syntax I need to add

Re: [NTG-context] XML processing instructions

2022-05-03 Thread Duncan Hothersall via ntg-context
st use arbitrary context code in xml: >> >> >> >> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} >> >> >> >> \xmlinstalldirective{tex}{xmltexdirective} >> >> >> >> >> >> >> >>

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
tive} > > > > > > > > > > > > Best, > > Denis > > > > *Von:* Maier, Denis Christian (UB) > *Gesendet:* Montag, 2. Mai 2022 09:45 > *An:* 'mailing list for ConTeXt users' > *Cc:* Duncan Hothersall > *

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Denis Maier via ntg-context
' Cc: Duncan Hothersall Betreff: AW: [NTG-context] XML processing instructions Von: ntg-context mailto:ntg-context-boun...@ntg.nl>> Im Auftrag von Duncan Hothersall via ntg-context Gesendet: Montag, 2. Mai 2022 09:20 An: mailing list for ConTeXt users mailto:ntg-context@ntg.nl>>

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Denis Maier via ntg-context
An: mailing list for ConTeXt users Cc: Duncan Hothersall Betreff: [NTG-context] XML processing instructions I have a big set of existing XML books (held in a derivative of DocBook) which I'm looking to start processing directly with ConTeXt. (Up to now I have a system which converts the XML into ConTeXt

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
Apologies, there are two rogue * in the lxml.preprocessor code, but even when they are removed it doesn't work. On Mon, 2 May 2022 at 08:19, Duncan Hothersall wrote: > I have a big set of existing XML books (held in a derivative of DocBook) > which I'm looking to start processing directly with

[NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
I have a big set of existing XML books (held in a derivative of DocBook) which I'm looking to start processing directly with ConTeXt. (Up to now I have a system which converts the XML into ConTeXt code which is then processed, but this is inefficient and lots of the code is now unsupported.) I've

Re: [NTG-context] Xml - Lua - context

2022-03-28 Thread Thomas A. Schmitz via ntg-context
> On 28. Mar 2022, at 18:21, Adam Reviczky via ntg-context > wrote: > > Hi Thomas, > > Not sure whether it helps or not, but in regards to combinations and Lua I > have had some challenges as well, but Hans' and Wolfgangs' solution with > externalfigures works fine for me now: > >

Re: [NTG-context] Xml - Lua - context

2022-03-28 Thread Adam Reviczky via ntg-context
Hi Thomas, Not sure whether it helps or not, but in regards to combinations and Lua I have had some challenges as well, but Hans' and Wolfgangs' solution with externalfigures works fine for me now: https://mailman.ntg.nl/pipermail/ntg-context/2021/103822.html

[NTG-context] Xml - Lua - context

2022-03-28 Thread Thomas A. Schmitz via ntg-context
And here comes question 2, a very basic one: on A4 landscape pages, I want to place two images next to each other (like the spread pages of a book). What would be the preferred way of the really competent users to do this, again keeping in mind that I want to loop over page numbers in a pdf

[NTG-context] Xml - lua - context

2022-03-28 Thread Thomas A. Schmitz via ntg-context
Dear all, For a small project, I have two questions (without MWE…) on processing xml via Lua and context. I’ll write two messages so eager volunteers can reply more easily! So question one: given an xml structure like this Introduction: the Iliad Introduction:

Re: [NTG-context] XML, dealing with whitespace

2022-01-17 Thread Denis Maier via ntg-context
Hi Wolfgang, Von: Wolfgang Schuster Gesendet: Samstag, 15. Januar 2022 20:28 An: mailing list for ConTeXt users ; Denis Maier via ntg-context Cc: Maier, Denis Christian (UB) Betreff: Re: [NTG-context] XML, dealing with whitespace Denis Maier via ntg-context schrieb am 15.01.2022 um 13:04

Re: [NTG-context] XML, dealing with whitespace

2022-01-15 Thread Wolfgang Schuster via ntg-context
Denis Maier via ntg-context schrieb am 15.01.2022 um 13:04: Hi all, I have sources that look like this: %    Bla Bla Bla   Bla   , Bla Bla. % Typesetting this with context gives me a spurious space after the underlined

[NTG-context] XML, dealing with whitespace

2022-01-15 Thread Denis Maier via ntg-context
Hi all, I have sources that look like this: % Bla Bla Bla Bla , Bla Bla. % Typesetting this with context gives me a spurious space after the underlined Bla in italics. Complete MWE : % \startxmlsetups

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-10 Thread Denis Maier via ntg-context
with an example next week... Denis > -Ursprüngliche Nachricht- > Von: Wolfgang Schuster > Gesendet: Donnerstag, 9. Dezember 2021 18:32 > An: mailing list for ConTeXt users ; Denis Maier via ntg- > context > Cc: Maier, Denis Christian (UB) > Betreff: Re: [NTG-context] xml

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Wolfgang Schuster via ntg-context
Denis Maier via ntg-context schrieb am 09.12.2021 um 18:24: Thanks for all the answers. That's helpful. But I think that does not work with the xml tests, or does it? I mean, is this a general mechanism? Since you didn't provide a example with your problem there is no way to tell how to

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Denis Maier via ntg-context
:53:42 An: mailing list for ConTeXt users Cc: Hans Hagen Betreff: Re: [NTG-context] xml processing: if elseif else / switch case On 12/9/2021 5:30 PM, Joey McCollum via ntg-context wrote: > Thanks for correcting that, Wolfgang. I must have added the other \fi > instances because I was trying

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Hans Hagen via ntg-context
On 12/9/2021 5:30 PM, Joey McCollum via ntg-context wrote: Thanks for correcting that, Wolfgang. I must have added the other \fi instances because I was trying to use \orelse in MKIV and couldn't get it to work. Is it only supported in LMTX? yes, it's one of the native luametatex features

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Joey McCollum via ntg-context
Thanks for correcting that, Wolfgang. I must have added the other \fi instances because I was trying to use \orelse in MKIV and couldn't get it to work. Is it only supported in LMTX? Joey On Thu, Dec 9, 2021 at 11:30 AM Hans Hagen via ntg-context < ntg-context@ntg.nl> wrote: > On 12/9/2021 5:11

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Hans Hagen via ntg-context
On 12/9/2021 5:11 PM, Wolfgang Schuster via ntg-context wrote: Joey McCollum via ntg-context schrieb am 09.12.2021 um 15:08: I believe \orelse might be what you want. It works with most \if... macros, and it avoids nesting of \doifelse constructs. Here's an example, which I use in

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Wolfgang Schuster via ntg-context
Joey McCollum via ntg-context schrieb am 09.12.2021 um 15:08: I believe \orelse might be what you want. It works with most \if... macros, and it avoids nesting of \doifelse constructs. Here's an example, which I use in conditionally removing preceding punctuation if any other keys are defined

Re: [NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Joey McCollum via ntg-context
I believe \orelse might be what you want. It works with most \if... macros, and it avoids nesting of \doifelse constructs. Here's an example, which I use in conditionally removing preceding punctuation if any other keys are defined before a specific one in an assignment: ``` % If any of the

[NTG-context] xml processing: if elseif else / switch case

2021-12-09 Thread Denis Maier via ntg-context
Hi, I was wondering whether we have tests similar to or in context's xml processing. (And even in context more general...) I have found these doifelse tests, but elseif doesn't seem to exist. Is that correct? If yes, could that be added? Of course, you can always just nest

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Thangalin via ntg-context
Confirmed that the following worked: 1. Run: rm -rf /tmp/luatex-cache/ (your cache directory location will differ) 2. Edit ./tex/texmf-context/tex/context/base/mkiv/scrn-ref.lua 3. Replace line 15 to assign the empty function as Hans indicated 4. Save the file 5. Run:

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Pablo Rodriguez via ntg-context
On 12/1/21 2:03 PM, Denis Maier via ntg-context wrote: > Sorry for spamming the list, but I was able to narrow it further down: > [...] > \setupinteraction > [state=start, >openaction=FitWidth] % comment this out to make it work > [...] > Can anyone confirm this? Hi Denis, I can confirm

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Hans Hagen via ntg-context
\stoptext % Can anyone confirm this? -Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von Denis Maier via ntg-context Gesendet: Mittwoch, 1. Dezember 2021 11:44 An: j.ha...@xs4all.nl; ntg-context@ntg.nl Cc: Maier, Denis Christian (UB) Betreff: Re: [NTG-context] xml

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
this? > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Denis Maier > via ntg-context > Gesendet: Mittwoch, 1. Dezember 2021 11:44 > An: j.ha...@xs4all.nl; ntg-context@ntg.nl > Cc: Maier, Denis Christian (UB) > Betreff: Re: [NTG-context] xml processing errors

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
; > Von: Hans Hagen > > Gesendet: Mittwoch, 1. Dezember 2021 10:52 > > An: mailing list for ConTeXt users > > Cc: Maier, Denis Christian (UB) > > Betreff: Re: [NTG-context] xml processing errors after latest upgrade > > > > On 12/1/2021 10:41 AM, De

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
=, ] \starttext asdf \stoptext Best, Denis > -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Mittwoch, 1. Dezember 2021 10:52 > An: mailing list for ConTeXt users > Cc: Maier, Denis Christian (UB) > Betreff: Re: [NTG-context] xml processing errors af

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
Still the same error. > -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Mittwoch, 1. Dezember 2021 11:02 > An: 'Hans Hagen' ; 'mailing list for ConTeXt users' cont...@ntg.nl> > Betreff: AW: [NTG-context] xml processing errors after latest u

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
Trying a fresh installation. > -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Mittwoch, 1. Dezember 2021 10:59 > An: 'Hans Hagen' ; mailing list for ConTeXt users cont...@ntg.nl> > Betreff: AW: [NTG-context] xml processing errors after lates

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
s Christian (UB) > Betreff: Re: [NTG-context] xml processing errors after latest upgrade > > On 12/1/2021 10:41 AM, Denis Maier via ntg-context wrote: > > > Not sure what is going wrong. Any hints how I can start debugging? Any > > ideas what could have caused that change? &g

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Hans Hagen via ntg-context
On 12/1/2021 10:41 AM, Denis Maier via ntg-context wrote: Not sure what is going wrong. Any hints how I can start debugging? Any ideas what could have caused that change? (Ok, let’s build a MWE..) a mix of old / new files? -

[NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Denis Maier via ntg-context
Hi, the latest update may have introduced problems for xml processing : For a document I could convert with version 2021.10.24 21:45 without problems gives me now this error : % ... structure > sectioning > title @ level 2 : 0.0 -> \documentvariable {title} fatal

Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Hans Hagen via ntg-context
On 10/27/2021 5:37 PM, Denis Maier via ntg-context wrote: Oh, actually that leads to a similar problem as in my original question where Wolfgang suggested using \expandUx: if the URL is broken across lines, the link content is also broken. Interestingly, the plain \startxmlsetups

Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Pablo Rodriguez via ntg-context
On 10/27/21 5:37 PM, Denis Maier via ntg-context wrote: > [...] > Oh, actually that leads to a similar problem as in my original > question where Wolfgang suggested using \expandUx: if the URL is > broken across lines, the link content is also broken. Interestingly, > the plain> > \startxmlsetups

Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Mittwoch, 27. Oktober 2021 16:31 > An: 'mailing list for ConTeXt users' > Cc: Pablo Rodriguez > Betreff: AW: [NTG-context] XML-processing: Error with hyphenatedurl > > > -Ursprüngl

Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Denis Maier via ntg-context
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Pablo > Rodriguez via ntg-context > Gesendet: Mittwoch, 27. Oktober 2021 15:43 > An: Denis Maier via ntg-context > Cc: Pablo Rodriguez > Betreff: Re: [NTG-context] XML-processing: Error with hyphenatedu

Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Pablo Rodriguez via ntg-context
On 10/27/21 3:03 PM, Denis Maier via ntg-context wrote: > [...] > I’ve receiving errors that seem to be related to hyphenatedurl. The > problem is I cannot really reproduce it in a MWE. The example below > works, but if I include the link in my real document, I’am getting this > error message

[NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Denis Maier via ntg-context
Hi, I've receiving errors that seem to be related to hyphenatedurl. The problem is I cannot really reproduce it in a MWE. The example below works, but if I include the link in my real document, I'am getting this error message (copied from -error.log): % return {

Re: [NTG-context] xml processing in latest

2021-04-21 Thread Thomas A. Schmitz
On 4/21/21 10:34 AM, denis.ma...@ub.unibe.ch wrote: Hi What's the exact issue? You're not using the latest version: 2021.04.20 18:45 Thomas ___ If your question is of interest to others as well, please add an

Re: [NTG-context] xml processing in latest

2021-04-21 Thread denis.maier
Ah, now I see ConTeXt ver: 2021.04.20 18:45 LMTX fmt: 2021.4.21 int: english/english gives me the attached result. Denis > -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Mittwoch, 21. April 2021 10:34 > An: ntg-context@ntg.nl > Betreff: AW: [N

Re: [NTG-context] xml processing in latest

2021-04-21 Thread denis.maier
: 2021.04.18 18:12 MKIV fmt: 2021.4.21 int: english/english Always the result as attached. Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Thomas A. > Schmitz > Gesendet: Mittwoch, 21. April 2021 08:45 > An: ntg-context@ntg.nl > Betreff: [NTG-conte

[NTG-context] xml processing in latest

2021-04-21 Thread Thomas A. Schmitz
Hi all, the latest has some strange problems with xml processing. The example below shows an issue with itemize. In my real file, I also get pages that are filled only two thirds and rugged right instead of justified, but I haven't been able to reproduce this in a MWE. Maybe this one can

Re: [NTG-context] XML/MathML namespace handling bug

2021-03-26 Thread Hans Hagen
On 3/26/2021 6:02 AM, Hugo Landau wrote: in x-math.mkiv search for \startxmlsetups mml:apply and replace this bit: \edef\mmlapplyaction{\xmlfilter{#1}{/*/tag()}} \doifelsesetups {mml:apply:mml:\mmlapplyaction} {

Re: [NTG-context] XML/MathML namespace handling bug

2021-03-25 Thread Hugo Landau
> in x-math.mkiv search for > >\startxmlsetups mml:apply > > and replace this bit: > > \edef\mmlapplyaction{\xmlfilter{#1}{/*/tag()}} > \doifelsesetups {mml:apply:mml:\mmlapplyaction} { > \xmlsetup{#1}{mml:apply:mml:\mmlapplyaction} > } {

Re: [NTG-context] XML/MathML namespace handling bug

2021-03-20 Thread Hans Hagen
On 3/20/2021 10:52 PM, Hugo Landau wrote: Thanks for ConTeXt, it is an amazing system. The following test case demonstrates the bug. \usemodule[mathml] \starttext \xmlprocessdata{}{ http://www.example.com/ns/foo; xmlns:m="http://www.w3.org/1998/Math/MathML;> ab

[NTG-context] XML/MathML namespace handling bug

2021-03-20 Thread Hugo Landau
Thanks for ConTeXt, it is an amazing system. The following test case demonstrates the bug. \usemodule[mathml] \starttext \xmlprocessdata{}{ http://www.example.com/ns/foo; xmlns:m="http://www.w3.org/1998/Math/MathML;> ab ab }{} \stoptext No output is

[NTG-context] XML Namespaces and XML Setups

2020-11-16 Thread Christoph Reller
Dear List, Consider the following MWE: \startxmlsetups xml:demo:base \xmlsetsetup{#1}{tag}{xml:demo:tag} \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:tag %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:} \xmlflush{#1} \stopxmlsetups \starttext

Re: [NTG-context] xml bookmarks + chapter no. in header

2020-10-07 Thread Pablo Rodriguez
On 10/7/20 5:06 PM, Tomas Hala wrote: > Hi, > > I tried > \setuphead[section][expansion=yes] > with no effect before I wrote my question to the list here. > > With the \setuphead, the .tuc file still contains macro names instead of the > text: > ["title"]="\\expanded \\name ", > whereas without

Re: [NTG-context] xml bookmarks + chapter no. in header

2020-10-07 Thread Tomas Hala
Hi, I tried \setuphead[section][expansion=yes] with no effect before I wrote my question to the list here. With the \setuphead, the .tuc file still contains macro names instead of the text: ["title"]="\\expanded \\name ", whereas without it only: ["title"]=" \\name ", So is there any way

Re: [NTG-context] xml bookmarks

2020-10-07 Thread Jano Kula
On Wed, 7 Oct 2020 at 15:04, Pablo Rodriguez wrote: > On 10/7/20 1:28 PM, Jano Kula wrote: > > Hello to everybody! > > > > I have a similar problem as Tomas two days ago. When inserting bookmarks > > from XML the reference to the node is stored in TUC file > > > > ["titledata"]={ > >

Re: [NTG-context] xml bookmarks

2020-10-07 Thread Pablo Rodriguez
On 10/7/20 1:28 PM, Jano Kula wrote: > Hello to everybody! > > I have a similar problem as Tomas two days ago. When inserting bookmarks > from XML the reference to the node is stored in TUC file > >   ["titledata"]={ >    ["label"]="section", >    ["title"]="\\xmlatt {xml:name::4}{title}" > > and

[NTG-context] xml bookmarks

2020-10-07 Thread Jano Kula
Hello to everybody! I have a similar problem as Tomas two days ago. When inserting bookmarks from XML the reference to the node is stored in TUC file ["titledata"]={ ["label"]="section", ["title"]="\\xmlatt {xml:name::4}{title}" and this reference ends up in bookmarks. Any advice on how

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Hans Hagen
On 3/11/2020 4:54 PM, Axel Kielhorn wrote: Hello Hans and mailing list! Thank you so much. With this example and the help I received earlier from Massi, I’ve been able to write my first finalizer today. It is amazing how powerful luatex is. indeed (and luametatex is supposed to be even bit

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Axel Kielhorn
Hello Hans and mailing list! Thank you so much. With this example and the help I received earlier from Massi, I’ve been able to write my first finalizer today. It is amazing how powerful luatex is. My project needs some cleanup and documentation but I hope to put it on GitHub soon. After

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Axel Kielhorn
> Am 11.03.2020 um 15:19 schrieb Hans Hagen : > > On 3/11/2020 3:12 PM, Axel Kielhorn wrote: >>> Am 11.03.2020 um 15:01 schrieb Hans Hagen : >>> >>> On 3/11/2020 2:14 PM, Axel Kielhorn wrote: Had to change it to: \startluacode function

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Hans Hagen
On 3/11/2020 2:14 PM, Axel Kielhorn wrote: Am 15.08.2018 um 14:04 schrieb Hans Hagen : On 8/15/2018 12:27 PM, Mike O'Connor wrote: G’Day, Having a first go at converting TEI XML to ConTeXt. Steep learning curve, but easier (for me) than XSLT, and first results were amazing. Using

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Axel Kielhorn
> Am 15.08.2018 um 14:04 schrieb Hans Hagen : > > On 8/15/2018 12:27 PM, Mike O'Connor wrote: >> G’Day, >> Having a first go at converting TEI XML to ConTeXt. >> Steep learning curve, but easier (for me) than XSLT, and first results were >> amazing. Using

Re: [NTG-context] xml differences between old context and lmtx

2019-12-27 Thread Jan U. Hasecke
Am 27.12.19 um 14:03 schrieb Hans Hagen: > On 12/26/2019 1:19 PM, Jan U. Hasecke wrote: >> Hi all, >> >> are there any documented differences between the xml features of normal >> context and lmtx? >> >> In a fun project I compile xml sources from www.deutschestextarchiv.de >> to pdf via context

Re: [NTG-context] xml differences between old context and lmtx

2019-12-27 Thread Hans Hagen
On 12/26/2019 1:19 PM, Jan U. Hasecke wrote: Hi all, are there any documented differences between the xml features of normal context and lmtx? In a fun project I compile xml sources from www.deutschestextarchiv.de to pdf via context using xmlsetups which kinda works with normal context current

[NTG-context] xml differences between old context and lmtx

2019-12-26 Thread Jan U. Hasecke
Hi all, are there any documented differences between the xml features of normal context and lmtx? In a fun project I compile xml sources from www.deutschestextarchiv.de to pdf via context using xmlsetups which kinda works with normal context current version: 2019.08.09 18:29 With lmtx current

Re: [NTG-context] XML/HTML output of Math

2019-08-09 Thread Atsuhito Kohda
Hi all, I will attach a screenshot of firefox on Ubuntu 10.04 but I'm not familiar with Gmail so I'm uncertain if it goes well or not. Thanks for your help. Best regards, Atsuhito Kohda ___ > If your question is of

Re: [NTG-context] XML/HTML output of Math

2019-08-09 Thread Hans Hagen
On 8/8/2019 9:41 AM, Taco Hoekwater wrote: In case display math mode, we get very weird output of "\int_a^b”. ConTeXt outputs b_a^\int in display mode; the order of the objects inside the generated is wrong, which is clearly a bug. And it seems to do this for all large operators. i'll look

Re: [NTG-context] XML/HTML output of Math

2019-08-09 Thread Taco Hoekwater
Hi, > On 9 Aug 2019, at 07:35, Atsuhito Kohda wrote: > > Dear Taco, thanks for your reply. > > > I opened the xhtml with firefox and the only problem I see > > is the ignored \displaystyle (which is why the integral looks small). > > Inline looks fine otherwise, no interchanging of limits. >

Re: [NTG-context] XML/HTML output of Math

2019-08-08 Thread Atsuhito Kohda
Dear Taco, thanks for your reply. > I opened the xhtml with firefox and the only problem I see > is the ignored \displaystyle (which is why the integral looks small). > Inline looks fine otherwise, no interchanging of limits. Hmm, I use firefox 68.0.1 of Ubuntu 19.04 and firefox 60.8.0 of

Re: [NTG-context] XML/HTML output of Math

2019-08-08 Thread Taco Hoekwater
Hi, > On 8 Aug 2019, at 01:06, Atsuhito Kohda wrote: > > Hi all, > I used to compile a beamer file with LuaLaTeX to generate a PDF > for presentation then convert the beamer file to XHTML with LaTeXML > for Web page. > Recently I begin to use ConTeXt so I try to get a PDF for presentation > and

[NTG-context] XML/HTML output of Math

2019-08-07 Thread Atsuhito Kohda
Hi all, I used to compile a beamer file with LuaLaTeX to generate a PDF for presentation then convert the beamer file to XHTML with LaTeXML for Web page. Recently I begin to use ConTeXt so I try to get a PDF for presentation and also XML/HTML output from a single ConTeXt file. I have a few

[NTG-context] XML Export: Suppressing Presentation Forms in Arabic Script Fonts

2019-06-19 Thread Hamid,Idris
Dear gang, Just documented the following in the wiki: https://wiki.contextgarden.net/Export#Suppressing_Presentation_Forms_in_Arabic_Script_Fonts For those who use certain commercial Arabic-script fonts with XML export: In the course of ConTeXt processing, many standard codepoints from the

Re: [NTG-context] XML in latest betas (MkIV & LMTX)

2019-06-02 Thread Hans Hagen
On 6/2/2019 3:07 PM, Pablo Rodriguez wrote: Font expansion (as reported in https://mailman.ntg.nl/pipermail/ntg-context/2019/095175.html). font expansion is always slower (but i admit that i never use it) Hans -

Re: [NTG-context] XML in latest betas (MkIV & LMTX)

2019-06-02 Thread Pablo Rodriguez
On 6/2/19 2:12 PM, Hans Hagen wrote: > On 6/2/2019 1:17 PM, Pablo Rodriguez wrote: >> [...] >> Compiling exactly the same XML sources (a book on ConTeXt in Spanish), >> MkIV needs 40s and LMTX more than 52s. > > Hm. Is that the first time you compare a MKIV runs with an LMTX run for > that

Re: [NTG-context] XML in latest betas (MkIV & LMTX)

2019-06-02 Thread Hans Hagen
On 6/2/2019 1:17 PM, Pablo Rodriguez wrote: Dear list, I have just installed latest betas for both MkIV and LMTX. Compiling exactly the same XML sources (a book on ConTeXt in Spanish), MkIV needs 40s and LMTX more than 52s. Hm. Is that the first time you compare a MKIV runs with an LMTX run

[NTG-context] XML in latest betas (MkIV & LMTX)

2019-06-02 Thread Pablo Rodriguez
Dear list, I have just installed latest betas for both MkIV and LMTX. Compiling exactly the same XML sources (a book on ConTeXt in Spanish), MkIV needs 40s and LMTX more than 52s. This is the first time I get such a difference in compilation times. I’m afraid I can’t be sure that output is the

  1   2   3   4   5   6   >