ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XML and title page rule
@ 2006-03-24  4:36 Johannes Graumann
  2006-03-24  9:12 ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Graumann @ 2006-03-24  4:36 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1848 bytes --]

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                                                             |
+----------------------------------------------------------------------+

[-- Attachment #1.2: Type: application/pgp-signature, Size: 829 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: XML and title page rule
  2006-03-24  4:36 XML and title page rule Johannes Graumann
@ 2006-03-24  9:12 ` Hans Hagen
  2006-03-24 18:04   ` Johannes Graumann
  2006-03-28 16:12   ` Jano Kula
  0 siblings, 2 replies; 9+ messages in thread
From: Hans Hagen @ 2006-03-24  9:12 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: XML and title page rule
  2006-03-24  9:12 ` Hans Hagen
@ 2006-03-24 18:04   ` Johannes Graumann
  2006-03-28 16:12   ` Jano Kula
  1 sibling, 0 replies; 9+ messages in thread
From: Johannes Graumann @ 2006-03-24 18:04 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: XML and title page rule
  2006-03-24  9:12 ` Hans Hagen
  2006-03-24 18:04   ` Johannes Graumann
@ 2006-03-28 16:12   ` Jano Kula
  2006-03-28 16:40     ` Hans Hagen
  2006-03-29 14:15     ` documents to (print and) read Geert Stappers
  1 sibling, 2 replies; 9+ messages in thread
From: Jano Kula @ 2006-03-28 16:12 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: XML and title page rule
  2006-03-28 16:12   ` Jano Kula
@ 2006-03-28 16:40     ` Hans Hagen
  2006-03-28 17:38       ` Jano Kula
  2006-03-29 14:15     ` documents to (print and) read Geert Stappers
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2006-03-28 16:40 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: XML and title page rule
  2006-03-28 16:40     ` Hans Hagen
@ 2006-03-28 17:38       ` Jano Kula
  0 siblings, 0 replies; 9+ messages in thread
From: Jano Kula @ 2006-03-28 17:38 UTC (permalink / raw)


>>>   <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 &amp; entity did work (yes, I know it has a special 
meaning in XML, so it is probably predefined).

Jano

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: documents to (print and) read
  2006-03-28 16:12   ` Jano Kula
  2006-03-28 16:40     ` Hans Hagen
@ 2006-03-29 14:15     ` Geert Stappers
  2006-03-30  8:38       ` Taco Hoekwater
  1 sibling, 1 reply; 9+ messages in thread
From: Geert Stappers @ 2006-03-29 14:15 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 2562 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: documents to (print and) read
  2006-03-29 14:15     ` documents to (print and) read Geert Stappers
@ 2006-03-30  8:38       ` Taco Hoekwater
  2006-04-03 17:43         ` Jano Kula
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2006-03-30  8:38 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: documents to (print and) read
  2006-03-30  8:38       ` Taco Hoekwater
@ 2006-04-03 17:43         ` Jano Kula
  0 siblings, 0 replies; 9+ messages in thread
From: Jano Kula @ 2006-04-03 17:43 UTC (permalink / raw)



> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-04-03 17:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-24  4:36 XML and title page rule Johannes Graumann
2006-03-24  9:12 ` Hans Hagen
2006-03-24 18:04   ` Johannes Graumann
2006-03-28 16:12   ` Jano Kula
2006-03-28 16:40     ` Hans Hagen
2006-03-28 17:38       ` Jano Kula
2006-03-29 14:15     ` documents to (print and) read Geert Stappers
2006-03-30  8:38       ` Taco Hoekwater
2006-04-03 17:43         ` Jano Kula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).