On 2/17/2015 3:25 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
a slightly modified example:
t.xml
a
aa number=111AA/aa
ab number=222AB/ab
/a
and the Ctx source:
t.mkiv
\startxmlsetups xml:T
\xmlfunction{#1}{test}
\xmlsetsetup{\xmldocument}{*}{+}
%
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
With the following example, the output xml writer fails to properly
transform to the html entity amp; in some urls; \hyphenatedurl works
fine.
The generated xhtml and html files have this problem as well as more
issues with the transformation, including what appears to be mistaken
The best commercial XML editor is oxygenxml IMHO. If you need free, look at
xmlmind.
-m
On August 27, 2014 7:03:06 AM PDT, Procházka Lukáš Ing. - Pontex s. r. o.
l...@pontex.cz wrote:
Hello Thomas,
I'm just curious:
- Which editor(s) (including commercial one(s)) do you usually use to
create
On 8/28/2014 6:20 PM, Rik Kabel wrote:
With the following example, the output xml writer fails to properly
transform to the html entity amp; in some urls; \hyphenatedurl works
fine.
The generated xhtml and html files have this problem as well as more
issues with the transformation, including
Hello Thomas,
I'm just curious:
- Which editor(s) (including commercial one(s)) do you usually use to create
XML source for Ctx? (Under Windows?)
- XML input vs. .tex (.cld) source:
IMHO, when one needs to program parts of Ctx source, it's better to use TeX
source/language combined with Lua
On 2014-08-27 Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Which editor(s) (including commercial one(s)) do you usually use to
create XML source for Ctx? (Under Windows?)
This is IMO the best you can currently get:
http://www.oxygenxml.com/xml_author.html
- XML input vs. .tex (.cld) source:
On 12/27/2013 1:15 AM, Steve Anderson wrote:
I'm following the instructions in
http://pragma-ade.com/general/manuals/xml-mkiv.pdf for using XML in
ConTeXt.
When I run the first example, I get a PDF, but only the hard-coded text
string Contents is in the PDF; none of the strings from the XML
I'm following the instructions in
http://pragma-ade.com/general/manuals/xml-mkiv.pdf for using XML in
ConTeXt.
When I run the first example, I get a PDF, but only the hard-coded text
string Contents is in the PDF; none of the strings from the XML file are
in the PDF.
Any ideas?
- Steve
Mac
Following an example in the chapter on Expressions and filters for
xml-processing one can select on an attribute ‘name’ in the node file
name=“whatever”/
file[@name==whatever”]/command(todo)
However, I would like to select on a combination of alternatives, so that
equivalent are
file
Sorry for the noise, but I just forget to try the obvious and correct solution:
\xmlfilter{#1}{file[@name==whatever or @src==whatever]/command(todo)}
Must have been a temporary ‘blindness’.
Hans van der Meer
On 3 dec. 2013, at 10:14, H. van der Meer h.vanderm...@uva.nl wrote:
Following
On 10/13/2013 12:42 AM, Marco Patzer wrote:
Hi,
certain font switches fail when XML export is used. Example:
\setupbackend [export=foo.xml]
\definehighlight
[emph]
[style=\ita] %% \bfa works
\starttext
\ita Foobar%% works
Foo \emph{Bar} %% fails
\stoptext
LuaTeX error
On 2013–10–13 Hans Hagen wrote:
On 10/13/2013 12:42 AM, Marco Patzer wrote:
Hi,
certain font switches fail when XML export is used. Example:
\setupbackend [export=foo.xml]
\definehighlight
[emph]
[style=\ita] %% \bfa works
\starttext
\ita Foobar%% works
Foo
On 5/6/2013 1:53 PM, Meer, H. van der wrote:
In the xml setup one may call a command on the current node like:
\startxmlsetups xam:define:get
\xmlcommand{#1}{}{xmlcommon:whatever}
\stopxmlsetups
The current node will have attributes and these can be used in the execution of
the command
In the xml setup one may call a command on the current node like:
\startxmlsetups xam:define:get
\xmlcommand{#1}{}{xmlcommon:whatever}
\stopxmlsetups
The current node will have attributes and these can be used in the execution of
the command xmlcommon:whatever.
The question is the following:
Having for example xml-structure:
rootnode
node1subnode1../subnode1/node1
node2/
/node3/
/rootnode
With the path expression \xmlall{#1}{!node1} the node1 should be suppressed,
as happens in case. However, nodes under node1 like subnode1 should be
suppressed because
On 03/05/2013 10:59 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
which XML processing Lua engine is used by ConTeXt?
There are more XML processors developed for Lua - LuaXML, LuaExpat etc.
Does ConTeXt use one of these or another, or its own - a built-in one?
As I'm processing XML tables
Hello,
I've read that when Ctx is to process a XML file, the whole XML tree is loaded
first and processed as wanted.
I'd need to process a XML file which represents an Excel workbook saved as .xml.
When working in pure Lua, I'm using Expat library
Hello,
I've read that when Ctx is to process a XML file, the whole XML tree is loaded
first and processed as wanted.
I'd need to process a XML file which represents an Excel workbook saved as .xml.
When working in pure Lua, I'm using Expat library
On Wed, Nov 14, 2012 at 4:44 PM, Procházka Lukáš Ing. - Pontex s. r. o.
l...@pontex.cz wrote:
Hello,
I've read that when Ctx is to process a XML file, the whole XML tree is
loaded first and processed as wanted.
I'd need to process a XML file which represents an Excel workbook saved as
On Wed, 14 Nov 2012 16:50:50 +0100, luigi scarso luigi.sca...@gmail.com wrote:
However, this solution cannot be used with Ctx as it causes Ctx to crash.
Windows , Linux or MacOS ?
WinXP 32b
--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o. [mailto:pon...@pontex.cz]
On Wed, Nov 14, 2012 at 4:52 PM, Procházka Lukáš Ing. - Pontex s. r. o.
l...@pontex.cz wrote:
On Wed, 14 Nov 2012 16:50:50 +0100, luigi scarso luigi.sca...@gmail.com
wrote:
However, this solution cannot be used with Ctx as it causes Ctx to crash.
Windows , Linux or MacOS ?
WinXP 32b
On 09/11/2012 08:18 PM, Hans Hagen wrote:
If the number of bib items is not that large hashing does not save
much. (In x-xfdf.mkiv you can see another example).
\starttext
\startbuffer[demo] document bibitem xml:id=hagen2011
authorHans Hagen/author titleThe Meaning of Life Is 42/title
Hi all,
I have a question about xml processing and I think that what I want/need
can best be achieved by using lua code, but so far, I'm not really sure
how to proceed, so any help from one of the resident lua gurus would be
welcome.
So: the question. xml allows to provide elements with
On 11-9-2012 19:22, Thomas A. Schmitz wrote:
Hi all,
I have a question about xml processing and I think that what I want/need
can best be achieved by using lua code, but so far, I'm not really sure
how to proceed, so any help from one of the resident lua gurus would be
welcome.
So: the
Greetings all,
The document element exported by this small example appears to be prematurely
closed.
Removing either the footnote or the second chapter will hide the problem.
Do I have something wrong here?
Thanks,
Matt
\setupbackend[export=yes]
\starttext
\startchapter
\startsection
I am reporting a typo in the MKIV XML-manual. It can put one on the wrong track.
Section 3.7 Setups:
\xmlsetup{name}{node} expands setup name and pass node as argument
Note that name and node in the parameters are interchanged.
It should read:
\xmlsetup{node}{name} expands setup name and pass
I found something that might be an error in the current xml-processing.
In the following minimal example een Undefined control sequence error occurs
for the \xmldisplayverbatim and \xmlinlineverbatims. The \xmlverbatim doesn't.
\startxmldisplayverbatim ...\doinitializeverbatim
lxml-ini.mkiv defines:
\unexpanded\def\xmlregisteredsetups
{\xmlstarttiming
\xmlflushsetups
\xmldefaulttotext\xmldocument % after include
\xmlstoptiming}
but \xmlflushsetups can be found here only, nowhere else in the ConTeXt
base-files does a search for it match. Calling
Is it possible to have the following order of actions?
root
file name=filename1
file name=filename2
..
/root
The file contains an xml-tree starting at fileroot..
At the moment I am processing the files with
\xmlprocessfile{fileroot}{filename}{}, but this generate separate node-lists
for
I would like to include files with the following input xml-file
root
file location=.. other_attributes/file
/root
In the xmlsetup for file I thought to place a call to \xmlinclude:
\startxmlsetups xml:file
\xmlinclude{#1}{.}{location}
\stopxmlsetups
But this does not work and I get
After a lot of experimenting I finally succeeded including a file with thw
\xmlinclude macro. The next hurdle is how to extend the xml tree with its xml
contents (if that is possibl, of course).
Thus the main file being:
?xml version=1.0 encoding=UTF-8?
main .. /main
I would like to extend
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 :
@xml:id==string.sub('#N020-18', 2) -
(ll.at and ll.at['xml:id'])==string.sub('#N020-18', 2) ! Missing
number, treated as zero.
lua error with sub .. not sure what you want t o test here
indeed an error will prevent the multipass file to be saved (feature)
Hans
Thanks Hans, It's
On 14-12-2011 19:33, Jon Crump wrote:
@xml:id==string.sub('#N020-18', 2) -
(ll.at and ll.at['xml:id'])==string.sub('#N020-18', 2) ! Missing
number, treated as zero.
lua error with sub .. not sure what you want t o test here
indeed an error will prevent the multipass file to be saved
Hans,
Thanks for this. It's almost what I need. I truly appreciate the
effort, and it does give me some ideas about things to try.
However, if I change your example buffer slightly (for clarity) to this:
text
div type='a'
arab ref target=#N01 foo /ref
arab ref target=#N02 bar
On 13-12-2011 00:48, Jon Crump wrote:
All,
I have a conditional expression that checks to see if the current node
has any ancestor whose xml:id attribute matches a string
\xmldoifelse{#1}{ancestor::div[@xml:id='apr_engl']}
What I need is a test to see if the current node has any ancestor
Hans et alia,
Thanks for helping out with the right xpath expression. That was
indeed the problem: div elements in the ancestor axis that had no
xml:id attribute. Unfortunately, this doesn't solve my root problem.
I have a tei/xml marked up text with English and Arabic sections. For
each ref tag
On 13-12-2011 20:21, Jon Crump wrote:
@xml:id==string.sub('#N020-18', 2) -
(ll.at and ll.at['xml:id'])==string.sub('#N020-18', 2) ! Missing
number, treated as zero.
lua error with sub .. not sure what you want t o test here
indeed an error will prevent the multipass file to be saved
All,
I have a conditional expression that checks to see if the current node
has any ancestor whose xml:id attribute matches a string
\xmldoifelse{#1}{ancestor::div[@xml:id='apr_engl']}
What I need is a test to see if the current node has any ancestor
whose xml:id attribute _contains_ a
On 10/27/11 13:05, Hans Hagen wrote:
With “tex.dimen[…]” you get the value in scaled points but
util-dim.lua provides some functions to convert the value in points,
centimeter etc.
\starttext
\startluacode
context.blackrule{ width = number.topoints(tex.dimen[textwidth]/2) }
\stopluacode
On Fri, Oct 28, 2011 at 8:23 AM, Thomas A. Schmitz
thomas.schm...@uni-bonn.de wrote:
On 10/27/11 13:05, Hans Hagen wrote:
With “tex.dimen[…]” you get the value in scaled points but
util-dim.lua provides some functions to convert the value in points,
centimeter etc.
\starttext
\startluacode
On Fri, Oct 28, 2011 at 8:37 AM, luigi scarso luigi.sca...@gmail.com wrote:
soryy, typos
number.topoints(tex.dimen[textwidth]/2) gives XYZ.ABSpt
number.topoints(tex.dimen[textwidth]/2) gives XYZ.ABCpt
TeX reads XYZ.ABC.pt and convert to xyzsp and drops sp
TeX reads XYZ.ABCpt and convert to
context.blackrule{ width = number.topoints(tex.dimen[textwidth]/2) }
or just tex.dimen[textwidth]/2 .. sp
Wait, just so I understand: your solution would imply that
tex.dimen[textwidth] holds a number, not a dimension, right? (Because you
simply concatenate it with a dimension
On 10/28/11 08:44, Patrick Gundlach wrote:
context.blackrule{ width = number.topoints(tex.dimen[textwidth]/2) }
or just tex.dimen[textwidth]/2 .. sp
Wait, just so I understand: your solution would imply that
tex.dimen[textwidth] holds a number, not a dimension, right? (Because you
Am 28.10.2011 um 08:55 schrieb Thomas A. Schmitz:
Luigi, Patrick,
thanks for your explanations! The point of my question was: can I feed the
content of tex.dimen[textwidth] directly back to TeX, and the answer to
this appears to be no; you need to add some unit to it (otherwise, you get
Hi Thomas,
thanks for your explanations! The point of my question was: can I feed
the content of tex.dimen[textwidth] directly back to TeX, and the
answer to this appears to be no; you need to add some unit to it
(otherwise, you get an error message). Which was a bit confusing to me
at first,
On 28-10-2011 10:35, Wolfgang Schuster wrote:
Am 28.10.2011 um 08:55 schrieb Thomas A. Schmitz:
Luigi, Patrick,
thanks for your explanations! The point of my question was: can I feed the content of
tex.dimen[textwidth] directly back to TeX, and the answer to this appears to be no;
you need
On 10/28/11 10:56, Hans Hagen wrote:
Just switch to philosopher mode for a while and ask yourself what
implications that would have in the rather fuzzy world of printing.
What is a 'real' dimension? What we call points (pt) is in other
application also called points but happens to be basepoints
On Fri, Oct 28, 2011 at 10:56 AM, Hans Hagen pra...@wxs.nl wrote:
Hi Thomas,
thanks for your explanations! The point of my question was: can I feed
the content of tex.dimen[textwidth] directly back to TeX, and the
answer to this appears to be no; you need to add some unit to it
(otherwise,
i.e it's a Lua number -- a floating point.
So a kind of conversion can happen between a floating point and a sp
number (which has a limited range)
Of course Lua has its routines, but probably they differs from TeX
If I recall correctly, both use 32 bits, but if you extend to lets say
48 bit
On 10/25/2011 12:27 PM, Thomas A. Schmitz wrote:
Wolfgang, Hans,
thanks a lot, this works now. Will now try and move the code to a
ctxluafile and see if I can make it work again. If not, I'll be back; no
good deed goes unpunished...
Thomas
OK, I'm slowly making progress processing xml in
Am 27.10.2011 um 11:23 schrieb Thomas A. Schmitz:
On 10/25/2011 12:27 PM, Thomas A. Schmitz wrote:
Wolfgang, Hans,
thanks a lot, this works now. Will now try and move the code to a
ctxluafile and see if I can make it work again. If not, I'll be back; no
good deed goes unpunished...
On 10/27/2011 11:53 AM, Wolfgang Schuster wrote:
With “tex.dimen[…]” you get the value in scaled points but util-dim.lua
provides some functions to convert the value in points, centimeter etc.
\starttext
\startluacode
context.blackrule{ width = number.topoints(tex.dimen[textwidth]/2) }
On 27-10-2011 12:32, Thomas A. Schmitz wrote:
On 10/27/2011 11:53 AM, Wolfgang Schuster wrote:
With “tex.dimen[…]” you get the value in scaled points but
util-dim.lua provides some functions to convert the value in points,
centimeter etc.
\starttext
\startluacode
context.blackrule{ width =
On 10/24/11 8:48 PM, Hans Hagen wrote:
sure, oryou can play with
if xml.filter(t,.[@frame=on]) then
the x-*.lua show some tricks
OK, I'm in my stubborn mode then: why doesn't this work:
\startbuffer[test]
a
nattable frame=on
tr
td1/td
td2/td
td3/td
td4/td
Am 25.10.2011 um 11:43 schrieb Thomas A. Schmitz:
On 10/24/11 8:48 PM, Hans Hagen wrote:
sure, oryou can play with
if xml.filter(t,.[@frame=on]) then
the x-*.lua show some tricks
OK, I'm in my stubborn mode then: why doesn't this work:
[…]
\startxmlsetups xml:nattable
On 25-10-2011 11:43, Thomas A. Schmitz wrote:
\startxmlsetups xml:nattable
\startluacode
if xml.attribute(t, /, frame, off) == on then
context(Yes, the frame is really on!)
else
context(Nope, sorry, it's still off.)
end
context(true)
context.placefigure( { here }, none , function()
On 10/25/11 12:17 PM, Hans Hagen wrote:
see Wolfgangs answer
anyway, best move the lua code and wrap it in a function
document.MyWhatever ... now its get defined each time
Hans
Wolfgang, Hans,
thanks a lot, this works now. Will now try and move the code to a
ctxluafile and see if I can
Hi all,
I'm testing the possibilities of xml and ConTeXt. I was wondering if it
is possible to make an extra setup for every text-element. So it would
be possible to have an setup in a very flexible way. It should be
something like this:
\startbuffer[text]
a
b
First text.
hiding
On 25-10-2011 12:52, Martin Fechner wrote:
Hi all,
I'm testing the possibilities of xml and ConTeXt. I was wondering if it
is possible to make an extra setup for every text-element. So it would
be possible to have an setup in a very flexible way. It should be
something like this:
Am 25.10.2011 14:20, schrieb Hans Hagen:
\startxmlsetups xml:hiding
\doifelse {\xmlatt{#1}{type}} {begin} {
\startnointerference
} {
\stopnointerference
}
\stopxmlsetups
\starttext
\xmlprocessbuffer{main}{text}{}
\stoptext
maybe it makes sense to have a 'hide' flag built in the serializer
On 22-10-2011 18:46, Thomas A. Schmitz wrote:
Hi all,
again, I'm playing a bit with processing my xml in lua. I want a simple
interface for processing tables (I don't need all the power and
complexity of cals tables and want to learn something in the process).
And I thought that collecting the
On 10/24/2011 12:17 PM, Hans Hagen wrote:
why so complex
Hi Hans,
yes, I'm aware that this procedure is quite silly for this example, this
was just for myself, for educational purposes. As soon as the setup
becomes more complex, I thought it might be easier to collect and
process the
On 24-10-2011 14:18, Thomas A. Schmitz wrote:
On 10/24/2011 12:17 PM, Hans Hagen wrote:
why so complex
Hi Hans,
yes, I'm aware that this procedure is quite silly for this example, this
was just for myself, for educational purposes. As soon as the setup
becomes more complex, I thought it
On 10/24/2011 02:26 PM, Hans Hagen wrote:
if lxml.att(t, frame) == on then
context(Yes, the frame is really on!)
else
context(Nope, sorry, it's still off.)
end
I don't really understand what kind of object a call such as lxml.att(t,
frame) produces.
all lxml.* calls print something to tex, so
On 24-10-2011 19:00, Thomas A. Schmitz wrote:
On 10/24/2011 02:26 PM, Hans Hagen wrote:
if lxml.att(t, frame) == on then
context(Yes, the frame is really on!)
else
context(Nope, sorry, it's still off.)
end
I don't really understand what kind of object a call such as lxml.att(t,
frame)
Hi Thomas,
Am 22.10.2011 18:46, schrieb Thomas A. Schmitz:
Hi all,
again, I'm playing a bit with processing my xml in lua. I want a simple
interface for processing tables (I don't need all the power and
complexity of cals tables and want to learn something in the process).
And I thought
Hi Peter,
thanks for your reply, and I'll keep the bit about goat milk in mind :-).
frame= .. tostring(framestate)
It has the advantage of making the example compile. It has the drawback
of not doing anything :-)
seems to work. Anyhow, if you are planning to do some more complex
stuff,
Am 23.10.2011 16:37, schrieb Thomas A. Schmitz:
Hi Peter,
thanks for your reply, and I'll keep the bit about goat milk in mind :-).
frame= .. tostring(framestate)
It has the advantage of making the example compile. It has the drawback
of not doing anything :-)
(sadly) true :-)
I
Am 22.10.2011 18:46, schrieb Thomas A. Schmitz:
Hi all,
again, I'm playing a bit with processing my xml in lua. I want a simple
interface for processing tables (I don't need all the power and
complexity of cals tables and want to learn something in the process).
And I thought that
Hi all,
again, I'm playing a bit with processing my xml in lua. I want a simple
interface for processing tables (I don't need all the power and
complexity of cals tables and want to learn something in the process).
And I thought that collecting the setups in lua might be the easiest
way, but
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
On Jun 4, 2011, at 12:14 AM, Peter Münster wrote:
\startluacode
function my_externalfigure(file, t)
local args_present
for k, v in pairs(t) do
if v == then
t[k] = nil
else
args_present = true
end
end
Hi all,
I'm pulling my hair - thought this was easy, but turns out to be more
difficult. The \externalfigure command can take a width and/or a height
parameter, and context will be happy to take either one into account. I'm
trying to translate that into xml syntax. Here's a minimal example
On Fri, 3 Jun 2011, Thomas A. Schmitz wrote:
Hi all,
I'm pulling my hair - thought this was easy, but turns out to be more
difficult. The \externalfigure command can take a width and/or a height
parameter, and context will be happy to take either one into account. I'm
trying to translate
On Jun 3, 2011, at 9:57 PM, Aditya Mahajan wrote:
(untested)
\exeternalfigure[...][height=\doifemptyelse{\xmlatt{#1}{height}}{fit}{\xmlatt{#1}{height}}]
Aditya
Hmm, almost... Gives the dreaded Missing number, treated as zero error. But
your fit gave me an idea: this works:
On 3-6-2011 10:19, Thomas A. Schmitz wrote:
On Jun 3, 2011, at 9:57 PM, Aditya Mahajan wrote:
(untested)
\exeternalfigure[...][height=\doifemptyelse{\xmlatt{#1}{height}}{fit}{\xmlatt{#1}{height}}]
Aditya
Hmm, almost... Gives the dreaded Missing number, treated as zero error. But your
fit
On Jun 3, 2011, at 10:50 PM, Hans Hagen wrote:
On 3-6-2011 10:19, Thomas A. Schmitz wrote:
Hmm, almost... Gives the dreaded Missing number, treated as zero error.
But your fit gave me an idea: this works:
[height=\xmlattdef{#1}{height}{fit}]
but only if I have a real dimension as in
On Fri, Jun 03 2011, Thomas A. Schmitz wrote:
Ah, expdoifelse is for expanded doifelse, right? Any examples for such a lua
helper? Sounds good, but I still haven't been able to understand how to mix
xml and lua code.
\startluacode
function my_externalfigure(file, t)
local args_present
On 4-6-2011 12:14, Peter Münster wrote:
On Fri, Jun 03 2011, Thomas A. Schmitz wrote:
Ah, expdoifelse is for expanded doifelse, right? Any examples for such a lua
helper? Sounds good, but I still haven't been able to understand how to mix
xml and lua code.
\startluacode
function
Dear all,
I converted a latex file to xml docbook by means of pandoc. In intend to
process the file with context. The first results are very promising.
I have some questions on processing graphics.
The source file looks like this:
inlinemediaobject
imageobject
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
Hi all,
I thought I had done this and it was easy, but I can't
find a solution: I want to test whether a xml tag has an
attribute and vary the typeset content accordingly. There
used to be \xmldoifelseempty, but that has been commented
out (lxml-ini.mkiv). What else could I use? Here's a
On 13-12-2010 8:58, Thomas Schmitz wrote:
Hi all,
I thought I had done this and it was easy, but I can't find a solution:
I want to test whether a xml tag has an attribute and vary the typeset
content accordingly. There used to be \xmldoifelseempty, but that has
been commented out
Hans, thanks a lot!
On Mon, 13 Dec 2010 21:17:23 +0100
Hans Hagen pra...@wxs.nl wrote:
something like this:
\doifelse {\xmlatt{#1}{important}} {} {
\color[darkblue]{EMPTY: \xmlflush{#1}}
} {
\color[darkred]{NOTEMPTY: \xmlatt{#1}{important}}
}
\par
Yes, this works!
or (untested):
On 20-11-2010 8:40, Renaud AUBIN wrote:
I have a first operational version of my lpeg-based xml pretty
printer: http://www.nibua-r.org/gitsnap/pret-xml/
operational means:
A remark:
I'm currently replacing the current pretty printing interface
and the new infrastructure is based on lpeg
Hi ConTeXters,
I have a first operational version of my lpeg-based xml pretty
printer: http://www.nibua-r.org/gitsnap/pret-xml/
operational means:
1 − That pretty printer will type only partially valid xml file
test/other will be considered valid
test att=testsome invalid text / is not
Ooops, it's not a detail but I need to precise that if the xml input is
not valid (from my custom pret-xml pov), nothing will be processed!
Renaud
Le 20/11/2010 20:40, Renaud AUBIN a écrit :
Hi ConTeXters,
I have a first operational version of my lpeg-based xml pretty
printer:
+ zip and tar.gz available
http://www.nibua-r.org/gitsnap/
I have a first operational version of my lpeg-based xml pretty
printer: http://www.nibua-r.org/gitsnap/pret-xml/
___
If your question is of interest
201 - 300 of 517 matches
Mail list logo