From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67219 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: referring to floats in xml Date: Sun, 20 Mar 2011 12:05:24 -0400 (EDT) Message-ID: 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 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1300637156 16788 80.91.229.12 (20 Mar 2011 16:05:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2011 16:05:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 20 17:05:52 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 1Q1L8a-0001vl-68 for gctc-ntg-context-518@m.gmane.org; Sun, 20 Mar 2011 17:05:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1D5BFCAB3A; Sun, 20 Mar 2011 17:05:44 +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 Uod2ZH7RSbHn; Sun, 20 Mar 2011 17:05:41 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9AF68CAB34; Sun, 20 Mar 2011 17:05:41 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 457D6CAB34 for ; Sun, 20 Mar 2011 17:05:40 +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 5oRBryTvjmWJ for ; Sun, 20 Mar 2011 17:05:29 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 3D1BACAB24 for ; Sun, 20 Mar 2011 17:05:29 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p2KG5TV6020987 for ; Sun, 20 Mar 2011 17:05:30 +0100 Original-Received: FROM [10.0.2.15] (bas3-montreal02-1096682363.dsl.bell.ca [65.94.11.123]) By tombraider.mr.itd.umich.edu ID 4D8625C8.4FAF2.19274 ; Authuser adityam; 20 Mar 2011 12:05:28 EDT In-Reply-To: <123216F8-B630-4FB5-AF30-0A3A4CE3BC79@hccnet.nl> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eEls5uPX - c589f77c7988 - 20110320 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:67219 Archived-At: 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 ___________________________________________________________________________________