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
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)
st use arbitrary context code in xml:
>>
>>
>>
>> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}}
>>
>>
>>
>> \xmlinstalldirective{tex}{xmltexdirective}
>>
>>
>>
>>
>>
>>
>>
>>
tive}
>
>
>
>
>
>
>
>
>
>
>
> Best,
>
> Denis
>
>
>
> *Von:* Maier, Denis Christian (UB)
> *Gesendet:* Montag, 2. Mai 2022 09:45
> *An:* 'mailing list for ConTeXt users'
> *Cc:* Duncan Hothersall
> *
'
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>>
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
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
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
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
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
: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
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
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
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
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
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
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
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:
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
\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
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
; > 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
=,
]
\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
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
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
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
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?
-
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
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
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
> -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
> -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
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
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 {
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
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
: 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
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
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
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
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
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
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
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
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
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 :
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
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:
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:
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
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
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
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
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
54 matches
Mail list logo