From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77798 Path: news.gmane.org!not-for-mail From: Sietse Brouwer Newsgroups: gmane.comp.tex.context Subject: Re: Draft version of document Date: Tue, 7 Aug 2012 14:51:26 +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 1344343917 32286 80.91.229.3 (7 Aug 2012 12:51:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2012 12:51:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Aug 07 14:51:55 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 1SyjGL-0006DJ-At for gctc-ntg-context-518@m.gmane.org; Tue, 07 Aug 2012 14:51:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F0B7D1020B; Tue, 7 Aug 2012 14:51:51 +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 yGZ5tMI+Jmq6; Tue, 7 Aug 2012 14:51:50 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 659B4101F8; Tue, 7 Aug 2012 14:51:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFAD7101F8 for ; Tue, 7 Aug 2012 14:51:48 +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 WmEZHtgO4mvz for ; Tue, 7 Aug 2012 14:51:48 +0200 (CEST) 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 46357101F3 for ; Tue, 7 Aug 2012 14:51:48 +0200 (CEST) Original-Received: from mail-gg0-f169.google.com (mail-gg0-f169.google.com [209.85.161.169]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q77CpkAc008464 for ; Tue, 7 Aug 2012 14:51:47 +0200 Original-Received: by ggnf4 with SMTP id f4so1673323ggn.14 for ; Tue, 07 Aug 2012 05:51:46 -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=uyEiX+fOddcVfVdYFyqLVh+VZvOpzv279xu7fUPxdYU=; b=tOkRzQHsj/UFbcg5CC521ac1NUh0O7GgIrD+DM9P8VUiDRsaBzd39ku2GSBu/86wCa zJDIApwO9unhnfu+kh3fQ3QF4VMrwxhSGAG5TrA0tFECYC4gOM8Brg2xRMuwT67Jtf6l M7Drj3G6lIk6oGHzN9I974bxmsiR9Bi6y8pJ12EHs6MCrmZGgQgU/0CASN2W0TJijs9+ npoW9/zFrpjL849yTBP8BCvVSYYE3v2abbyef79+FiQzF2XjZ35JxgUgTbnSQBSDOld3 ZT1MbAGZXfx8Rh206dmE9O6TGWXYOzCLDGyyy1+gwn0Gng7AwHI5coPHx9sR7IIz7BqJ CWig== Original-Received: by 10.50.186.131 with SMTP id fk3mr8550805igc.31.1344343906169; Tue, 07 Aug 2012 05:51:46 -0700 (PDT) Original-Received: by 10.64.5.234 with HTTP; Tue, 7 Aug 2012 05:51:26 -0700 (PDT) In-Reply-To: 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: 06HHMPLJ2 - 71fa82a3f94e - 20120807 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:77798 Archived-At: Hi Robert, Debugged and all, here you go. Cheers, Sietse \useexternalfigure[img:fig:cow][cow.pdf] \useexternalfigure[img:fig:mill][mill.png] \starttext \section{Pictures} % The externalfigure names HAVE TO take the form 'img:FIGURELABEL', % or the automatic image list at the end on won't be able to % guess the image names from the figure labels. \placefigure[here][fig:cow] {cap-cow} {\externalfigure[img:fig:cow]} \section{More pictures} \placefigure[here][fig:mill] {cap-mill} {\externalfigure[img:fig:mill]} %%%% Lists start here %%%%%%% \enablemode[draft] \startmode[draft] % Better list heading --- the captions are what matters \setupheadtext[figures=List of Captions] \completelistoffigures % Now for printing all the images \section{List of Pictures} \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 -- TeX <--> Lua, passing arguments to commands -- [stuff] <--> { 'stuff' } -- [stuff=bother] <--> { stuff = 'bother' } -- {stuff} <--> 'stuff' -- context.in() seems to have some Lua meaning -- so we print the command string directly, instead context("\\in{Figure}[" .. label_string .. "]") context.page( { 'no' } ) context.externalfigure( { image_string }, { 'here' } ) context.hairline() context.par() -- end paragraph end \stopluacode \stopmode \stoptext ___________________________________________________________________________________ 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 ___________________________________________________________________________________