ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Extraneous spaces in XML documents
@ 2003-02-10  2:58 Robbie Pickering
  2003-02-10  9:26 ` Hans Hagen
  2003-02-10 22:05 ` Simon Pepping
  0 siblings, 2 replies; 7+ messages in thread
From: Robbie Pickering @ 2003-02-10  2:58 UTC (permalink / raw)



I'm typesetting some XML text with comments in and for the working
version the comments are to go in the margin. For the final version the
comments are simply to be ignored.

In the end result there is a noticeably larger space between the words
where the comma had been. Apparently more than one space is reaching
TeX's stomach, though it's beyond me to work out how.

I suppose I need a more sophisticated \gobble definition than the
simple TeXbook one, yes?


----file minimal.tex



%now we will map XML arguments to context ones.

\defineXMLargument [title] \title
\defineXMLargument [footnote] \footnote
\defineXMLargument [section] \section  % et cetera....

% this definition for drafts where comments are printed 
%in the margin
%\defineXMLargument [comment] \inmargin

%this definition for the final version where the
% remaining comments are ignored

\def\gobble#1{}

\defineXMLargument [comment] \gobble


\starttext

\processXMLfilegrouped {sample.xml}

\stoptext



--- file sample.xml

<article>
<title>Nonsense</title>
<text>

<section>A section
</section>


Makes complicated pages by starting with simple individual characters
and putting them together in larger units, and putting these together
<comment>what does he mean here, putting these together???</comment> in
still larger units, and so on. Conceptually, it's a big paste-up
job.<footnote>From The TeXbook.</footnote>

</text>
</article>

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

end of thread, other threads:[~2003-02-14 20:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-10  2:58 Extraneous spaces in XML documents Robbie Pickering
2003-02-10  9:26 ` Hans Hagen
2003-02-10 18:11   ` Robbie Pickering
2003-02-10 22:05 ` Simon Pepping
2003-02-11 13:30   ` Robbie Pickering 
2003-02-11 20:18     ` Hans Hagen
2003-02-14 20:17     ` Simon Pepping

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