ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Richard Gabriel" <rgabriel@kerio.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Problem with XML entities in titles [2]
Date: Thu, 04 Oct 2007 14:33:02 +0200	[thread overview]
Message-ID: <20071004123302.4d9c51ec@mx1.kerio.com> (raw)
In-Reply-To: 115224fb0710040447h6e23e9e6h4b79b3dd0e1df14f@mail.gmail.com


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

Hello Wolfgang,

thanks for Your hint.

> I'm not Hans but I can also give you a solution to your problem.
OK, sorry, maybe I shouldn't address Hans directly when writing to the mailing list... ;-)

> BTW: Your xml file is valied because you forgot to include the
>chapter end tag.

Ooops! I've quickly created a minimal test file; of course I didn't want to attach the real file where I've encountered that problem...

Anyway, the XML file is structured the following way:

<chapter><title>This is a&nbsp;testing chapter</title>
<para>Some meaningless text...</para>
</chapter>

<chapter><title>So &mdash; let's see</title>
<para>Some meaningless text...</para>
</chapter>

... the paragraphs are enclosed inside chapters.
So unfortunately I can't use your solution because the \chapter command needs to be issued at the beginning, not at the end tag.

Got any another idea?


Many thanks,
Richard


 

  _____  

From: Wolfgang Schuster [mailto:schuster.wolfgang@googlemail.com]
To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl]
Sent: Thu, 04 Oct 2007 13:47:27 +0200
Subject: Re: [NTG-context] Problem with XML entities in titles [2]

2007/10/4, Richard Gabriel <rgabriel@kerio.com>:
  > Hello Hans,
  >
  > some time ago I've reported this problem with character entities. I've just
  > upgraded to ConTeXt 2007-09-28, and the problem still persists!
  > Could you please look into it? A simple test file is attached.
  >
  > Many thanks,
  > Richard
  
  Hello Richard,
  
  I'm not Hans but I can also give you a solution to your problem.
  
  This is related to your own definition for the chapter header and
  ConTeXt's mechanism to save the two pass information of the headers,
  you should save the header text and expand the header command
  with the header text, you can use my example for your problem.
  
  BTW: Your xml file is valied because you forgot to include the
  chapter end tag.
  
  \defineXMLenvironment [chapter]
    {\defineXMLsave[title]}
    {\expanded{\chapter{\XMLflush{title}}}}
  
  \defineXMLenvironment[para] \dontleavehmode \par
  
  \defineXMLentities [tex] {tex} {\TeX}
  
  \starttext
  \completecontent
  
  \startXMLdata
  <chapter><title>This is a testing &tex; chapter</title></chapter>
  <para>Some meaningless text...</para>
  \stopXMLdata
  
  \stoptext
  
  Wolfgang
  ___________________________________________________________________________________
  If your question is of interest to others as well, please add an entry to the Wiki!
  
  maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
  webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
  archive  : https://foundry.supelec.fr/projects/contextrev/
  wiki     : http://contextgarden.net
  ___________________________________________________________________________________
    

[-- Attachment #1.2: Type: text/html, Size: 4071 bytes --]

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2007-10-04 12:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04 12:33 Richard Gabriel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-10-05 15:06 Richard Gabriel
2007-10-05 15:55 ` Hans Hagen
2007-10-05 12:47 Richard Gabriel
2007-10-05 10:06 Richard Gabriel
2007-10-05 11:53 ` Hans Hagen
2007-10-05 12:03 ` Thomas A. Schmitz
2007-10-05 14:16   ` Hans Hagen
2007-10-04 14:36 Richard Gabriel
2007-10-04 18:26 ` Hans Hagen
2007-10-04  9:32 Richard Gabriel
2007-10-04 10:52 ` Mojca Miklavec
2007-10-04 11:47 ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071004123302.4d9c51ec@mx1.kerio.com \
    --to=rgabriel@kerio.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).