ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Christopher Creutzig <christopher@creutzig.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: :: in xml?
Date: Wed, 11 Jul 2007 11:29:33 +0200	[thread overview]
Message-ID: <4694A2FD.4030608@creutzig.de> (raw)
In-Reply-To: <46935418.7020108@creutzig.de>

Christopher Creutzig wrote:

> \starttext
> \startXML
> <a>a::b</a>
> \stopXML
> \stoptext

  The problem is the \setpretty`\:=10 in \XMLsetspecials in 
verb-xml.tex. This should only be done inside <...>.

  Suggested patch (I hope it survives being sent by mail):

--- verb-xml.tex.orig   2007-07-11 11:08:45.000000000 +0200
+++ verb-xml.tex        2007-07-11 11:26:59.000000000 +0200
@@ -108,12 +108,13 @@
     \setpretty`\(=30 \setpretty`\)=30 \setpretty`\,=30
     \setpretty`\*=30 \setpretty`\+=30 \setpretty`\#=30
  %  \setpretty`\:=30
-   \setpretty`\:=10 % better for tags
+   \setpretty`\:=18 % better for tags
     \setpretty`\&=41 \setpretty`\;=42 }

  \gdef\XMLsethandlers%
    {\installprettyhandler 17 \XMLnormal
     \installprettyhandler 10 \XMLwhattag
+   \installprettyhandler 18 \XMLmaybewhattag
     \installprettyhandler 11 \XMLstoptag
     \installprettyhandler 12 \XMLtypeonetwo
     \installprettyhandler 13 \XMLtypeonethree
@@ -142,7 +143,15 @@
  \gdef\XMLnormal#1{\getpretty{#1}}

  \gdef\XMLwhattag%
-  {\handlenextnextpretty\XMLdowhattag\XMLstarttag}
+  {\handlenextnextpretty\XMLdowhattag\XMLstarttag}%
+
+% For :, use \XMLwhattag inside tag names, \XMLnormal otherwise
+\gdef\XMLmaybewhattag%
+  {\ifinXMLtagname
+     \expandafter\XMLwhattag
+   \else
+     \expandafter\getpretty
+   \fi}

  \gdef\XMLdowhattag#1#2%
    {\ifinXMLcomment




___________________________________________________________________________________
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-07-11  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10  9:40 Christopher Creutzig
2007-07-11  9:29 ` Christopher Creutzig [this message]

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=4694A2FD.4030608@creutzig.de \
    --to=christopher@creutzig.de \
    --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).