[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 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)

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 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
ftrag von Thomas > A. > > Schmitz > > Gesendet: Mittwoch, 21. April 2021 08:45 > > An: ntg-context@ntg.nl > > Betreff: [NTG-context] xml processing in latest > > > > > > Hi all, > > > > the latest has some strange problems with xml processing. The exampl

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 Processing with Verbatim (VIM-Typing)

2015-02-13 Thread Andreas Schneider
Am 12.02.2015 15:44, schrieb Hans Hagen: so then you have to wikify it (or add it to the t-vim module docu) You are right ofcourse :-) Done: http://wiki.contextgarden.net/Verbatim_XML ___ If your question is of

Re: [NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-12 Thread Aditya Mahajan
On Thu, 12 Feb 2015, Hans Hagen wrote: On 2/11/2015 12:15 PM, Andreas Schneider wrote: Am 10.02.2015 22:45, schrieb Hans Hagen: \startluacode function xml.functions.processJSON(t) buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t)) .. \n\\stopJSON) context.getbuffer

Re: [NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-12 Thread Hans Hagen
On 2/11/2015 12:15 PM, Andreas Schneider wrote: Am 10.02.2015 22:45, schrieb Hans Hagen: \startluacode function xml.functions.processJSON(t) buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t)) .. \n\\stopJSON) context.getbuffer { foo } end \stopluacode

Re: [NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-11 Thread Andreas Schneider
Am 10.02.2015 22:45, schrieb Hans Hagen: \startluacode function xml.functions.processJSON(t) buffers.assign(foo,\\startJSON\n .. tostring(xml.text(t)) .. \n\\stopJSON) context.getbuffer { foo } end \stopluacode \startxmlsetups xml:json \pushcatcodetable

[NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-10 Thread Andreas Schneider
Hello, as a few other topics on this Mailing List already discussed, it's not (easily?) possible to use \starttyping\stoptyping within XML setups. If it was simple verbatim, there would be a few workarounds. However, I want to provide formatted verbatim (i.e. \startJSON \stopJSON, after

Re: [NTG-context] XML Processing with Verbatim (VIM-Typing)

2015-02-10 Thread Hans Hagen
On 2/10/2015 5:59 PM, Andreas Schneider wrote: Hello, as a few other topics on this Mailing List already discussed, it's not (easily?) possible to use \starttyping\stoptyping within XML setups. If it was simple verbatim, there would be a few workarounds. However, I want to provide formatted

Re: [NTG-context] xml processing

2012-01-01 Thread Hans Hagen
On 31-12-2011 21:55, Meer, H. van der wrote: Is there a macro to retrieve the name of the file when inside a call to \xmlprocessfile? no, there isn't -- - Hans Hagen | PRAGMA ADE

[NTG-context] xml processing

2011-12-31 Thread Meer, H. van der
Is there a macro to retrieve the name of the file when inside a call to \xmlprocessfile? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

[NTG-context] xml processing in lua

2011-09-26 Thread Thomas A. Schmitz
Hi all, after boring people with xml processing in TeX at the meeting in Bassenge, I'm looking for new challenges and am trying my hand at processing xml in lua. But so far, even the simplest things escape me. Here's an example: \startbuffer[test] a bOne/b cTwo/c /a \stopbuffer

Re: [NTG-context] xml processing in lua

2011-09-26 Thread Wolfgang Schuster
Am 26.09.2011 um 20:57 schrieb Thomas A. Schmitz: Hi all, after boring people with xml processing in TeX at the meeting in Bassenge, I'm looking for new challenges and am trying my hand at processing xml in lua. But so far, even the simplest things escape me. Here's an example:

Re: [NTG-context] xml processing in lua

2011-09-26 Thread Aditya Mahajan
On Mon, 26 Sep 2011, Thomas A. Schmitz wrote: Hi all, after boring people with xml processing in TeX at the meeting in Bassenge, I'm looking for new challenges and am trying my hand at processing xml in lua. But so far, even the simplest things escape me. Here's an example:

Re: [NTG-context] xml processing in lua

2011-09-26 Thread Thomas A. Schmitz
On 09/26/2011 09:15 PM, Aditya Mahajan wrote: On Mon, 26 Sep 2011, Thomas A. Schmitz wrote: Hi all, after boring people with xml processing in TeX at the meeting in Bassenge, I'm looking for new challenges and am trying my hand at processing xml in lua. But so far, even the simplest things

[NTG-context] xml-processing: missing or ungrouped '='

2011-01-07 Thread Achim Jander
Hi all a problem with processing XML data (maybe a lack of knowledge). If in the example below I set the chapter-attributes directly in \startxmlsetups xml:title (commented out) everything is like I expected. Because I have headings to be treated equally in multiple hierarchies I tried to

Re: [NTG-context] xml-processing: missing or ungrouped '='

2011-01-07 Thread Hans Hagen
On 7-1-2011 7:04, Achim Jander wrote: \startxmlsetups xml:title \startchapter[ \xmlcommand{#1}{.}{xml:splitHeader} title=... %number=\xmldoifelse{#1}{/num}{yes}{no}, %works %ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},%works %title={\xmlflush{#1}},%works

[NTG-context] XML processing not understood

2010-03-08 Thread Hans van der Meer
Starting the typesetting in mkiv of xml data I cannot get a simple example working. I studied both the recent MyWay document and Hans Hagens xml-mkiv reference manual (especially page 11). From these I concocted the following simple test: file typeset from TeXShop is dvd-setup.tex

Re: [NTG-context] XML processing not understood

2010-03-08 Thread Hans Hagen
On 8-3-2010 21:53, Hans van der Meer wrote: Starting the typesetting in mkiv of xml data I cannot get a simple example working. I studied both the recent MyWay document and Hans Hagens xml-mkiv reference manual (especially page 11). From these I concocted the following simple test: file