From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67228 Path: news.gmane.org!not-for-mail From: "R. Ermers" Newsgroups: gmane.comp.tex.context Subject: Re: referring to floats in xml Date: Mon, 21 Mar 2011 07:28:53 +0100 Message-ID: <3BE7A960-6099-48D3-9D37-F5DAA0DD61C6@hccnet.nl> References: <123216F8-B630-4FB5-AF30-0A3A4CE3BC79@hccnet.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1300688957 17856 80.91.229.12 (21 Mar 2011 06:29:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2011 06:29:17 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 21 07:29:13 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1Yc5-0003xx-7G for gctc-ntg-context-518@m.gmane.org; Mon, 21 Mar 2011 07:29:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5F11CAB2B; Mon, 21 Mar 2011 07:29:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id h7jvTS6TR0xp; Mon, 21 Mar 2011 07:29:01 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E5C24CAB1E; Mon, 21 Mar 2011 07:29:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6F660CAB1E for ; Mon, 21 Mar 2011 07:28:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UkAzrcG-TsGA for ; Mon, 21 Mar 2011 07:28:47 +0100 (CET) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id DAE3DCAB19 for ; Mon, 21 Mar 2011 07:28:46 +0100 (CET) Original-Received: from cpsmtpb-ews07.kpnxchange.com (cpsmtpb-ews07.kpnxchange.com [213.75.39.10]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p2L6SsIF020603 for ; Mon, 21 Mar 2011 07:28:55 +0100 Original-Received: from cpbrm-ews12.kpnxchange.com ([10.94.84.143]) by cpsmtpb-ews07.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 21 Mar 2011 07:28:54 +0100 Original-Received: from CPSMTPM-CMT105.kpnxchange.com ([195.121.3.21]) by cpbrm-ews12.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 21 Mar 2011 07:28:54 +0100 Original-Received: from imac-van-robert.lan ([77.168.85.243]) by CPSMTPM-CMT105.kpnxchange.com with Microsoft SMTPSVC(7.0.6002.18264); Mon, 21 Mar 2011 07:28:53 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1082) X-OriginalArrivalTime: 21 Mar 2011 06:28:53.0794 (UTC) FILETIME=[3FDD6820:01CBE791] X-RcptDomain: ntg.nl X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.75.39.10; country=NL; latitude=52.5000; longitude=5.7500; http://maps.google.com/maps?q=52.5000,5.7500&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xElGsSlM - b515b2043253 - 20110321 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:67228 Archived-At: Thanks, Aditya, The first problem is adequately solved by adding []. I'll prepare an example for the second problem. A related problem is referring to sections and other blocks.
Cows cows cows cows. As I told in
The title is mapped as follows (lpath): \xmlsetsetup{#1}{section/title}{xml:section/title} \startxmlsetups xml:section:title \section{\xmlflush{#1}} \stopxmlsetups The section is not mapped: \startxmlsetups xml:section \xmlflush{#1} \stopxmlsetups Adding [\xmlatt{#1}{id}] to xml:section:title does not work of course. Using [\xmlatt{#1}{id}] with xml:section puts the id before the \section command. I think one of the other commands has to be used in such a way that the id is flushed forward after the \section command. Regards, Robert Op 20 mrt 2011, om 17:05 heeft Aditya Mahajan het volgende geschreven: > On Sun, 20 Mar 2011, R. Ermers wrote: > >> Dear All, >> >> My xml docbook file contains a number of graphics. Some are regular figures, some are edgefigures. I have two questions in this respect. > > Understanding these snippets is difficult without a minimal working example. > >> A. referring to floats >> >> \placeedgefigure >> [\xmlatt{#1}{id}] >> {\xmlfirst{#1}{/caption}} >> {\framed[frame=off]{\setlayer[graphics]{\xmlfirst{#1}{/imageobject}}}} >> >> \definefloat[edgefigure][figure] >> \setupfloat[edgefigure] >> [leftmargindistance=-\innercombitotal,rightmargindistance=-\outercombitotal, >> default={outer,low,long}, criterium=.65\textwidth,numbering=no] >> >> >> >> >> >> >> >> I now wonder how to refer to these floats. That is, referring through is not difficult to implement, but for some reason the mapping of the id is not that obvious. I tried it like this: >> >> \startxmlsetups xml:mediaobject:edgefigure >> \placeedgefigure >> [\xmlatt{#1}{id}] >> {\xmlfirst{#1}{/caption}} >> {\framed[frame=off]{\setlayer[graphics]{\xmlfirst{#1}{/imageobject}}}} >> \stopxmlsetups > > > Try > > \placeedgefigure > [] > [\xmlatt{#1}{id}] > {....} > {....} >> B. edgefigures and regular figures >> >> The document contains two types of figures. >> >> \xmlsetsetup{#1}{mediaobject[@role='fig']}{xml:mediaobject:fig} >> \xmlsetsetup{#1}{mediaobject[@role='edgefigure']}{xml:mediaobject:edgefigure} >> >> I have noticed that when contains both the attributes id and role, such as the cow example, the figure is considered a regular figure automatically and will not typeset as an edgefigure. > > Please provide a minimal working example. > > Aditya > ___________________________________________________________________________________ > 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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________