ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Simon Pepping <spepping@scaprea.hobby.nl>
Subject: Expansion problem in natural table
Date: Sat, 8 Feb 2003 21:52:54 +0100	[thread overview]
Message-ID: <20030208205254.GA1686@scaprea> (raw)

I have an expansion problem in natural tables. I need to have this:

\bTD\XMLDBcontinuepartrue\ignorespaces\XMLflush{revremark}\eTD

but \XMLflush{revremark} must be expanded. When I do that using
\expanded,

\expanded{\bTD\noexpand\XMLDBcontinuepartrue\ignorespaces\XMLflush{#1}}\eTD

I get errors when I have compound characters:

\XMLDBcontinuepartrue\ignorespaces 
  Kleine \dobuildtextaccent\char 127 A{}nderung

It should be 

\dobuildtextaccent{\char 127} A 

for it to be valid. Or it should be 

\buildtextaccent\textdiaeresis A

In other words, \XMLflush{#1} should be expanded, but not all the way
down. How do I get that?

This is my hack, but it is awful because it relies on an exact number
of expansions:

\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\!!stringa
\expandafter\expandafter\expandafter{\csname XML:dat:#1\endcsname}
\@EA\bTD\@EA\XMLDBcontinuepartrue\@EA\ignorespaces\!!stringa\eTD}

Error log:

\XMLDBshowElementTD #1->\expanded {\bTD \noexpand \XMLDBcontinuepartrue \ignore
spaces \XMLflush {#1}}\eTD 
#1<-revremark

\expanded #1->\long \edef \@@expanded {\noexpand #1}\@@expanded 
#1<-\bTD \noexpand \XMLDBcontinuepartrue \ignorespaces \XMLflush {revremark}
{\long}
{\noexpand}
{\noexpand}

\XMLflush #1->\csname \@@XMLdata :#1\endcsname 
#1<-revremark
{\csname}

\@@XMLdata ->\@@XML dat

\@@XML ->XML:

\XML:dat:revremark ->Kleine Änderung

Ä->\Adiaeresis {}

\Adiaeresis ->\dohandlecharacter {Adiaeresis}

\dohandlecharacter #1->\csname \ifcsname \characterencoding #1\endcsname \chara
cterencoding \else \nocharacterencoding \fi #1\endcsname 
#1<-Adiaeresis
{\csname}
{\ifcsname}

\characterencoding ->@default@
{true}

\characterencoding ->@default@
{\else}

\@default@Adiaeresis ->\buildtextaccent \textdiaeresis A

\buildtextaccent ->\ifignoreaccent \expandafter \nobuildtextaccent \else \expan
dafter \dobuildtextaccent \fi 
{\iffalse}
{false}
{\expandafter}
{\fi}

\textdiaeresis ->\dohandlecharacter {textdiaeresis}

\dohandlecharacter #1->\csname \ifcsname \characterencoding #1\endcsname \chara
cterencoding \else \nocharacterencoding \fi #1\endcsname 
#1<-textdiaeresis
{\csname}
{\ifcsname}

\characterencoding ->@default@
{true}

\characterencoding ->@default@
{\else}

\@default@textdiaeresis ->\char 127 

\@@expanded ->\bTD \XMLDBcontinuepartrue \ignorespaces Kleine \dobuildtextaccen
t \char 127 A{}nderung

\bTD ->\dodoubleempty \parseTD 

... snip ...

\parseTD [#1][#2]#3\eTD ->\getparameters [\@@tbl ][\c!ny =\tblnr ,\c!nx =\tblnc
 ,nc=1,nr=1,#1]\doloop {\increment \currentcol \doifnottbltag \maximumrow \curr
entcol \exitloop }\let \row \maximumrow \let \col \currentcol \dorecurse {\tbln
y } {\let \col \currentcol \settblcol \row \col \tblnx \ifnum \tblnx >\maximumr
owspan \relax \let \maximumrowspan \tblnx \fi \dorecurse {\tblnx } {\settbltag 
\row \col \tblnone \increment \col }\increment \row }\decrement \col \ifnum \co
l >\maximumcol \relax \let \maximumcol \col \fi \settbltag \maximumrow \current
col \tblcell \settblcol \maximumrow \currentcol \tblnx \settblrow \maximumrow \
currentcol \tblny \edef \celltag {{\maximumrow }{\currentcol }}\@EA \settbltxt 
\@EA \maximumrow \@EA \currentcol \@EA {\@EA \handleTBLcell \celltag [#1]{#3}}
#1<-
#2<-
#3<-\XMLDBcontinuepartrue \ignorespaces Kleine \dobuildtextaccent \char 127 A{}
nderung

... snip ...

\dobuildtextaccent #1#2->{\let \char \normalaccent #1\let \char \normalchar #2}
#1<-\char 
#2<-1
{begin-group character {}
{\let}
{\accent}
! Missing number, treated as zero.
<to be read again> 
                   \let 
\dobuildtextaccent ... \char \normalaccent #1\let 
                                                  \char \normalchar #2}
<argument> ...es Kleine \dobuildtextaccent \char 1
                                                  27 A{}nderung


-- 
Simon Pepping
email: spepping@scaprea.hobby.nl

             reply	other threads:[~2003-02-08 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-08 20:52 Simon Pepping [this message]
2003-02-09 18:39 ` Simon Pepping
2003-02-09 20:43   ` Hans Hagen
2003-02-09 20:26 ` Hans Hagen
2003-02-18 20:11   ` Simon Pepping

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=20030208205254.GA1686@scaprea \
    --to=spepping@scaprea.hobby.nl \
    --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).