From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/18002 Path: main.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: TeX control sequence inside XML param Date: Thu, 27 Jan 2005 16:54:40 +0100 Message-ID: <41F90EC0.4050606@seznam.cz> References: <41F8B82C.30105@seznam.cz> <41F8D636.8090600@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1106841275 20278 80.91.229.6 (27 Jan 2005 15:54:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Jan 2005 15:54:35 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 27 16:54:17 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CuByL-0003FT-00 for ; Thu, 27 Jan 2005 16:54:17 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2CC0D127C4; Thu, 27 Jan 2005 16:54:16 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20043-05; Thu, 27 Jan 2005 16:54:14 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 347C712796; Thu, 27 Jan 2005 16:54:14 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4851112796 for ; Thu, 27 Jan 2005 16:54:13 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20103-04-2 for ; Thu, 27 Jan 2005 16:54:12 +0100 (CET) Original-Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id 4C8CD1278D for ; Thu, 27 Jan 2005 16:54:12 +0100 (CET) Original-Received: (qmail 5769 invoked from network); 27 Jan 2005 15:53:59 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (vit.zyka@82.142.74.35) by smtp.seznam.cz with SMTP; 27 Jan 2005 15:53:59 -0000 User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <41F8D636.8090600@wxs.nl> X-Antivirus: avast! (VPS 0502-3, 14.01.2005), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:18002 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:18002 Hans Hagen wrote: > Vit Zyka wrote: > >> Hallo, >> >> it is possible to use TeX control sequence inside XML param? How? >> Example: >> >>
>> ^^^^^^^^^^ >> \defineXMLenvironment[figure][file=,width=] >> {} >> {\externalfigure[\XMLop{file}][width=\XMLop{width}]} > > > Hm. You're lucky. We should make a test suite (at the wiki) to make sure > that this kind of stuff keeps working -) > > \starttext > > \defineXMLentity[ctx-var-textwidth] {\textwidth} I seeee! I might come to me... Actually I'd like to solve a bit more complex task: \starttext \defineXMLentity[ctx-var-textwidth] {\textwidth} \newcount\FigNo \defineXMLenvironment[float][] {\defineXMLpush[caption]% \global\FigNo=0 } {\placefigure{\XMLflush{caption}}% {\dorecurse{\FigNo}% {\edef\filewithpath{\XMLpop{dir-fig}\getvalue{file:\recurselevel}}% \edef\param{\getvalue{param:\recurselevel}}% \externalfigure[\filewithpath][\param]}}% } \defineXMLenvironment[figure][file=,context=] {} {\global\advance\FigNo by1 % \expanded{\setvalue{file:\the\FigNo}{\XMLop{file}}}% \expanded{\setvalue{param:\the\FigNo}{\XMLop{context}}}% } \startXMLdata
Cow and hacker. \stopXMLdata \stoptext