From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77781 Path: news.gmane.org!not-for-mail From: Sietse Brouwer Newsgroups: gmane.comp.tex.context Subject: Re: Draft version of document Date: Mon, 6 Aug 2012 18:14:53 +0200 Message-ID: References: <501D04F7.7060407@mun.ca> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344269729 3650 80.91.229.3 (6 Aug 2012 16:15:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 16:15:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 06 18:15:30 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SyPxp-0004kS-PO for gctc-ntg-context-518@m.gmane.org; Mon, 06 Aug 2012 18:15:29 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0878C1020A; Mon, 6 Aug 2012 18:15:26 +0200 (CEST) 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 05ZoXhat6b4I; Mon, 6 Aug 2012 18:15:24 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 26BD710200; Mon, 6 Aug 2012 18:15:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EDED510200 for ; Mon, 6 Aug 2012 18:15:21 +0200 (CEST) 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 vLlDBtDs3w6d for ; Mon, 6 Aug 2012 18:15:20 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id DBFCD101F0 for ; Mon, 6 Aug 2012 18:15:20 +0200 (CEST) Original-Received: from mail-gg0-f169.google.com (mail-gg0-f169.google.com [209.85.161.169]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q76GFEcS004429 for ; Mon, 6 Aug 2012 18:15:19 +0200 Original-Received: by ggnf4 with SMTP id f4so512919ggn.14 for ; Mon, 06 Aug 2012 09:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=R44MWa3JjXBnxpLhrsewjGSSOSP/JMma6BsATkBbetA=; b=TXbYil6+9qaDsK8cCdRnoakLh47weIhR3myEvs1EE0cFgWbkbsAhnZk0X8sG4VtYYc jIZN0mc0QiTaR7ly63UbEjw2ZlccB/hwGKolcnOgocVPwjkhTWQJw7nevoMGGHB79f9A vHycexRhfT0fR1gmDEiPTdP7G2OE7hAGi4FqDaPr1gPjiLiP+DT9besTN2AB8LaGYWC1 BmZzUL95YPkqYMJl4xj1lepz5FswHSyhUYGqH/JGbVcNtxp4IyfCdU/5McQPdtvEFtNg Wu39wAXHkqi47iqKfwO1Xj9xfix3hSGnQR3QmhakEgW3q9O5WitaQcQCXpXqqOeaVz5v mQhQ== Original-Received: by 10.50.163.3 with SMTP id ye3mr5952351igb.24.1344269713900; Mon, 06 Aug 2012 09:15:13 -0700 (PDT) Original-Received: by 10.64.5.234 with HTTP; Mon, 6 Aug 2012 09:14:53 -0700 (PDT) In-Reply-To: <501D04F7.7060407@mun.ca> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.169; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QHHsffjw - f9d872801547 - 20120806 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77781 Archived-At: Hi Roger, Firstly: drafts are indeed the way to go. \completelistoffigures places a complete list of figure *captions*, so that takes care of that. % No need to define a mode: you can simply enable it with % \enablemode[draft] % or % context --mode=draft \enablemode[draft] \startmode[draft] \completelistoffigures \stopmode Figure images, unlike figure captions, are not saved to a list. A pity, as this makes it difficult to get the associated figure image given a figure number (or figure label). I would do this: (1) make it so you can call the figure image with \externalfigure[img:fig:mylabel]. Use \useexternalfigure for this. (2) then label the figure with [fig:mylabel] (3) then simply manually make an entry in the figures section for each figure label. Perhaps some ConTeXt user more familiar with lists can provide a better, list-based, solution? \useexternalfigure[img:fig:pointy graph][pointy-graph.png] \placefigure [here] [fig:pointy graph] {caption of the pointy graph} {\externalfigure[img:fig:pointy graph][width=4cm]} \startmode[draft] \section{Just the figures} \in{Figure}[fig:pointy graph] \externalfigure[img:fig:pointy graph] \stopmode If you want to automate this, you'll want something like this. Untested and probably needs debugging first, but the table names are correct: \startluacode -- we won't need the keys k, but still. for k,v in pairs(structures.lists.ordered.float.figure) do label_string = v.references.reference -- `..` is Lua for string concatenation image_string = "img" .. label_string -- arguments to TeX commands: -- get [stuff] in TeX with { 'stuff' } in Lua -- get [stuff=bother] in TeX with { stuff = 'bother' } in Lua -- get {stuff} in TeX with 'stuff' in Lua context.in("Figure", { label_string }) context.externalfigure( { image_string } ) end \stopluacode I have made this reply long because I lack the time to make it short. Cheers, Sietse ___________________________________________________________________________________ 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 ___________________________________________________________________________________