From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/67208 Path: news.gmane.org!not-for-mail From: "R. Ermers" Newsgroups: gmane.comp.tex.context Subject: referring to floats in xml Date: Sun, 20 Mar 2011 10:46:44 +0100 Message-ID: <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: multipart/mixed; boundary="===============0544389792==" X-Trace: dough.gmane.org 1300614436 8759 80.91.229.12 (20 Mar 2011 09:47:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2011 09:47:16 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 20 10:47:12 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 1Q1FE8-0001Lx-Je for gctc-ntg-context-518@m.gmane.org; Sun, 20 Mar 2011 10:47:12 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0DF86CAB24; Sun, 20 Mar 2011 10:47:05 +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 cKnZJuTR84oW; Sun, 20 Mar 2011 10:46:53 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 10DAFCAB23; Sun, 20 Mar 2011 10:46:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DA1C7CAB23 for ; Sun, 20 Mar 2011 10:46:51 +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 DAveKk4urdAc for ; Sun, 20 Mar 2011 10:46:40 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 2047ACAAFF for ; Sun, 20 Mar 2011 10:46:40 +0100 (CET) Original-Received: from cpsmtpb-ews10.kpnxchange.com (cpsmtpb-ews10.kpnxchange.com [213.75.39.15]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p2K9kkpk017865 for ; Sun, 20 Mar 2011 10:46:46 +0100 Original-Received: from cpbrm-ews13.kpnxchange.com ([10.94.84.144]) by cpsmtpb-ews10.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 20 Mar 2011 10:46:46 +0100 Original-Received: from CPSMTPM-CMT102.kpnxchange.com ([195.121.3.18]) by cpbrm-ews13.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 20 Mar 2011 10:46:46 +0100 Original-Received: from imac-van-robert.lan ([77.168.85.243]) by CPSMTPM-CMT102.kpnxchange.com with Microsoft SMTPSVC(7.0.6002.18264); Sun, 20 Mar 2011 10:46:45 +0100 X-Mailer: Apple Mail (2.1082) X-OriginalArrivalTime: 20 Mar 2011 09:46:45.0375 (UTC) FILETIME=[B97728F0:01CBE6E3] X-RcptDomain: ntg.nl X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.75.39.15; 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: 05EllKKin - 53724225d71a - 20110320 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 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:67208 Archived-At: --===============0544389792== Content-Type: multipart/alternative; boundary=Apple-Mail-606-184657936 --Apple-Mail-606-184657936 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. A. referring to floats \placeedgefigure [\xmlatt{#1}{id}] {\xmlfirst{#1}{/caption}} {\framed[frame=3Doff]{\setlayer[graphics]{\xmlfirst{#1}{/imageobject}}}} \definefloat[edgefigure][figure] \setupfloat[edgefigure] = [leftmargindistance=3D-\innercombitotal,rightmargindistance=3D-\outercombi= total, default=3D{outer,low,long}, criterium=3D.65\textwidth,numbering=3Dno] 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=3Doff]{\setlayer[graphics]{\xmlfirst{#1}{/imageobject}}}} \stopxmlsetups The log file says: references : unknown reference [][fig:cow] The reference is not solved. B. edgefigures and regular figures The document contains two types of figures. \xmlsetsetup{#1}{mediaobject[@role=3D'fig']}{xml:mediaobject:fig} = \xmlsetsetup{#1}{mediaobject[@role=3D'edgefigure']}{xml:mediaobject:edgefi= gure} 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. Regards, Robert --Apple-Mail-606-184657936 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
       =    <imageobject>
       =      <imagedata scale=3D"500" = fileref=3D"cow.jpg"/>
         =  </imageobject>
       =  </mediaobject>

I now = wonder how to refer to these floats. That is, referring through <xref = linkend=3D"cow"/> 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=3Doff= ]{\setlayer[graphics]{\xmlfirst{#1}{/imageobject}}}}
\stopxmlset= ups

The log file = says:
references      : unknown reference = [][fig:cow]

The reference is not = solved.


B. edgefigures and = regular figures

The document contains two = types of = figures.

\xmlsetsetup{#1}{mediaobject[@role=3D'fi= g']}{xml:mediaobject:fig}
\xmlsetsetup{#1}{mediaobject[@role=3D'= edgefigure']}{xml:mediaobject:edgefigure}

I= have noticed that when <mediaobject> 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.


Regards,

Robert





= --Apple-Mail-606-184657936-- --===============0544389792== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0544389792==--