Hello, I'm trying to make the following work: 1) XML: <titlepage authors="Autor Autor" title="Something &emdash; or <i>Something else</i>" subtitle="Much Fun" publisher="Somebody" /> 2) ConTeXt translation rule: \defineXMLargument[titlepage]{% \startstandardmakeup \vfil \bfd \setupinterlinespace Whatever \par \bfb \setupinterlinespace You Want \par \vfil \vfil \stopstandardmakeup } I was intending to feed the variables in through '\XMLvar', but can't get the start working (see 2).). I would be grateful if someone could nudge me into the right direction ... Is it even possible to have XML nodes in the variables evaluated ("<i>")? If the above isn't feasible: how would I write an import rule for something like: <titlepage> <authors>Autor Autor</authors> <title>Something &emdash; or <i>Something else</i></title> <subtitle>Much Fun</subtitle> <publisher>Somebody</publisher> </titlepage> Thanks for any hints - need sleep now ... Joh -- +----------------------------------------------------------------------+ | Johannes Graumann, Dipl. Biol. | | | | Graduate Student Tel.: ++1 (626) 395 6602 | | Deshaies Lab Fax.: ++1 (626) 395 5739 | | Department of Biology | | CALTECH, M/C 156-29 | | 1200 E. California Blvd. | | Pasadena, CA 91125 | | USA | +----------------------------------------------------------------------+
Johannes Graumann wrote:
Hello,
I'm trying to make the following work: 1) XML: <titlepage authors="Autor Autor" title="Something &emdash; or <i>Something else</i>" subtitle="Much Fun" publisher="Somebody" /> 2) ConTeXt translation rule: \defineXMLargument[titlepage]{% \startstandardmakeup \vfil \bfd \setupinterlinespace Whatever \par \bfb \setupinterlinespace You Want \par \vfil \vfil \stopstandardmakeup }
I was intending to feed the variables in through '\XMLvar', but can't get the start working (see 2).). I would be grateful if someone could nudge me into the right direction ... Is it even possible to have XML nodes in the variables evaluated ("<i>")? If the above isn't feasible: how would I write an import rule for something like: <titlepage> <authors>Autor Autor</authors> <title>Something &emdash; or <i>Something else</i></title> <subtitle>Much Fun</subtitle> <publisher>Somebody</publisher> </titlepage>
Thanks for any hints - need sleep now ...
\starttext \defineXMLgrouped [i] {\em} {} \defineXMLcommand [titlepage] {\startstandardmakeup \vfil \bfd \setupinterlinespace \XMLop{title} \par \bfb \setupinterlinespace \XMLop{authors} \par \vfil \vfil \stopstandardmakeup} \startXMLdata <titlepage authors="Autor Autor 1" title="Something &emdash; or Something else" subtitle="Much Fun" publisher="Somebody" /> \stopXMLdata \defineXMLenvironment [titlepage] {\defineXMLsave[authors] \defineXMLsave[title] \defineXMLsave[subtitle] \defineXMLsave[publisher] \startXMLignore} % ignore undefined elements {\stopXMLignore \startstandardmakeup \vfil \bfd \setupinterlinespace \XMLflush{title} \par \bfb \setupinterlinespace \XMLflush{authors} \par \vfil \vfil \stopstandardmakeup} \startXMLdata <titlepage> <authors>Autor Autor 2</authors> <title>Something &emdash; or <i>Something else</i></title> <subtitle>Much Fun</subtitle> <publisher>Somebody</publisher> </titlepage> \stopXMLdata \stoptext Here is the hint - needs to be wikified now ... -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thank you Soooooo much Hans! Joh Hans Hagen wrote:
Johannes Graumann wrote:
Hello,
I'm trying to make the following work: 1) XML: <titlepage authors="Autor Autor" title="Something &emdash; or <i>Something else</i>" subtitle="Much Fun" publisher="Somebody" /> 2) ConTeXt translation rule: \defineXMLargument[titlepage]{% \startstandardmakeup \vfil \bfd \setupinterlinespace Whatever \par \bfb \setupinterlinespace You Want \par \vfil \vfil \stopstandardmakeup }
I was intending to feed the variables in through '\XMLvar', but can't get the start working (see 2).). I would be grateful if someone could nudge me into the right direction ... Is it even possible to have XML nodes in the variables evaluated ("<i>")? If the above isn't feasible: how would I write an import rule for something like: <titlepage> <authors>Autor Autor</authors> <title>Something &emdash; or <i>Something else</i></title> <subtitle>Much Fun</subtitle> <publisher>Somebody</publisher> </titlepage>
Thanks for any hints - need sleep now ...
\starttext
\defineXMLgrouped [i] {\em} {}
\defineXMLcommand [titlepage] {\startstandardmakeup \vfil \bfd \setupinterlinespace \XMLop{title} \par \bfb \setupinterlinespace \XMLop{authors} \par \vfil \vfil \stopstandardmakeup}
\startXMLdata <titlepage authors="Autor Autor 1" title="Something &emdash; or Something else" subtitle="Much Fun" publisher="Somebody" /> \stopXMLdata
\defineXMLenvironment [titlepage] {\defineXMLsave[authors] \defineXMLsave[title] \defineXMLsave[subtitle] \defineXMLsave[publisher] \startXMLignore} % ignore undefined elements {\stopXMLignore \startstandardmakeup \vfil \bfd \setupinterlinespace \XMLflush{title} \par \bfb \setupinterlinespace \XMLflush{authors} \par \vfil \vfil \stopstandardmakeup}
\startXMLdata <titlepage> <authors>Autor Autor 2</authors> <title>Something &emdash; or <i>Something else</i></title> <subtitle>Much Fun</subtitle> <publisher>Somebody</publisher> </titlepage> \stopXMLdata
\stoptext
Here is the hint - needs to be wikified now ... -)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi,
<title>Something &emdash; or <i>Something else</i></title>
can somebody explain to a complete newbie why entity &emdash; isn't expanded out of the box? (I use texexec -pdf document.tex for processing.)
Here is the hint - needs to be wikified now ... -)
I can't resist to do so (that's why I need an explanation), cause as a newbie I see the only weakness of the ConTeXt in the lack of documentation. Well, there is a lot of it, maybe there is too much of it spread all over the different places (that's why wiki is here), maybe I'm not familiar enough with ConTeXt yet, but as a long term user of LaTeX I'm still quite confused after a week or so of browsing through the documentation, trying to find out how the things work and how they are related. Well, it took some time to understand LaTeX, too. I would buy the book mentioned here immediatelly. These are not complaints, just another hint how to smooth starting with ConTeXt. As I see the possibilities I become addicted ;) and I do understand the developers have a lot of work with developing. Would anybody who suggests the wikifying mind the proper place to put it in the wiki, if known? Or I shouldn't care and the administators tide it up occasionally. As a newbie I might not to think of writing to wiki, but better something than nothing, right? As the new one here, I can add some small examples as I learn and test the things, what would be nice for the newcomers, if somebody experienced would add to wiki an explanation of the documentations in terms of user experience 1. "must read" 2. how the things work (texexec, etc.) 3. simple topics 4. advanced features If I see the all-manuals page (http://www.pragma-ade.com/show-man.pdf) I really don't know where to start. All the titles look so interesting! Such overview could postpone the temptation to seek for advanced topic and subsequently get lost, as in my case. (Might be only my fault.) Sorry for the desperade bigginer's notes, hope they help. To finish it why I can't get these two (advanced) pages? http://www.pragma-ade.com/makeres.html http://www.pragma-ade.com/general/manuals/xcorresp.pdf_Serial_Letters Looking forward to use ConTeXt, Jano
Jano Kula wrote:
Hi,
<title>Something &emdash; or <i>Something else</i></title>
can somebody explain to a complete newbie why entity &emdash; isn't expanded out of the box?
(I use texexec -pdf document.tex for processing.)
did you define the entity? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
<title>Something &emdash; or <i>Something else</i></title>
can somebody explain to a complete newbie why entity &emdash; isn't expanded out of the box?
(I use texexec -pdf document.tex for processing.)
did you define the entity?
Thanks. No I expected the example to be a minimal example, where everything else should work. And & entity did work (yes, I know it has a special meaning in XML, so it is probably predefined). Jano
On Tue, Mar 28, 2006 at 06:12:30PM +0200, Jano Kula wrote:
[ "&emdash;" expected to be defined ]
Here is the hint - needs to be wikified now ... -)
I can't resist to do so (that's why I need an explanation), cause as a newbie I see the only weakness of the ConTeXt in the lack of documentation.
Well, there is a lot of it, maybe there is too much of it spread all over the different places (that's why wiki is here), maybe I'm not familiar enough with ConTeXt yet, but as a long term user of LaTeX I'm still quite confused after a week or so of browsing through the documentation, trying to find out how the things work and how they are related. Well, it took some time to understand LaTeX, too. I would buy the book mentioned here immediatelly.
These are not complaints, just another hint how to smooth starting with ConTeXt. As I see the possibilities I become addicted ;) and I do understand the developers have a lot of work with developing.
Would anybody who suggests the wikifying mind the proper place to put it in the wiki, if known? Or I shouldn't care and the administators tide it up occasionally. As a newbie I might not to think of writing to wiki, but better something than nothing, right?
As the new one here, I can add some small examples as I learn and test the things, what would be nice for the newcomers, if somebody experienced would add to wiki an explanation of the documentations in terms of user experience
1. "must read" 2. how the things work (texexec, etc.) 3. simple topics 4. advanced features
If I see the all-manuals page (http://www.pragma-ade.com/show-man.pdf) I really don't know where to start. All the titles look so interesting! Such overview could postpone the temptation to seek for advanced topic and subsequently get lost, as in my case. (Might be only my fault.)
Here the very same situation. My question boils down to Which document should I print, book bundle and read. (Reading the "wrong" manual is only "lost time", printing the wrong manual is waste of time AND materiaals ... )
Sorry for the desperade bigginer's notes, hope they help. To finish it why I can't get these two (advanced) pages?
http://www.pragma-ade.com/makeres.html http://www.pragma-ade.com/general/manuals/xcorresp.pdf_Serial_Letters
On which page were to broken links (404s) encountered?
Looking forward to use ConTeXt,
Jano
Geert
Hi,
Here the very same situation. My question boils down to
Which document should I print, book bundle and read.
In my opinion, you should definately read: "Context, an excursion" http://www.pragma-ade.com/show-man-1.htm "TeXExec manual" http://www.pragma-ade.com/show-man-4.htm "Fonts Explained" http://www.pragma-ade.com/show-man-6.htm And I heartily recommend the not-yet-finished but very beautiful: "Typographic Programming" http://www.pragma-ade.com/show-man-39.htm Cheers, taco
In my opinion, you should definately read:
"Context, an excursion" http://www.pragma-ade.com/show-man-1.htm "TeXExec manual" http://www.pragma-ade.com/show-man-4.htm "Fonts Explained" http://www.pragma-ade.com/show-man-6.htm
And I heartily recommend the not-yet-finished but very beautiful:
"Typographic Programming" http://www.pragma-ade.com/show-man-39.htm
Thanks, I've put this selection to the special section on the wiki documentation page. Jano
participants (6)
-
Hans Hagen
-
Jano Kula
-
Johannes Graumann
-
Johannes Graumann
-
stappers@stappers.nl
-
Taco Hoekwater