ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Eidenbenz  Michael" <eidenbenz@arch.ethz.ch>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: custom cite in \externalfigure
Date: Wed, 4 May 2016 21:31:46 +0000	[thread overview]
Message-ID: <FBF637CA-1231-46E4-950F-18CE01AC32CD@ethz.ch> (raw)
In-Reply-To: <20906210-f6c1-9875-072f-a0028bc68079@wxs.nl>

thats what i already have:

>> \startsetups btx:duane:cite:filename
>>   {\btxfield{url_image}}
>> \stopsetups


so you mean i have to use btxfield outside a setups?

what seems strange to me is that \cite[filename] works as such, but not as an argument to \externalfigure
i thought it might have to do with the data (url_image) not being available in the first pass.

thanks michael

> On 04 May 2016, at 10:02, Hans Hagen <pragma@wxs.nl> wrote:
> 
> On 4/30/2016 10:06 PM, eidenbenz wrote:
>> Could somebody explain me why this (the part that is commented) doesn't work?
>> I get the following error:
>> 
>> tex error       > tex error on line 0 in file : ! Emergency stop
>> <*> cont-yes.mkiv
>> <empty file>
>> *** (job aborted, no legal \end found)
> 
> because \cite does a lot more than just returning a filename ... you need to use the low more level btxfield commands to get the more raw data
> 
>> 
>> Thanks Michael
>> 
>> 
>> -------------------------------------------
>> 
>> 
>> \startbuffer[duane]
>> 
>>    @image {tug2014,
>>        title       = "TUG 2014",
>>        url         = "http://tug.org/tug2014/",
>>        url_image   = "http://tug.org/art/tug2014-color.jpg",
>>        url_thumb   = "http://tug.org/tug2014/t2014-thumb.jpg",
>>        description = "Official drawing of the TUG 2014 conference",
>>        author      = "Duane Bibby",
>>        year        = 2014,
>>    }
>> 
>> \stopbuffer
>> 
>> \definebtxdataset
>> [duane]
>> 
>> \usebtxdataset
>> [duane]
>> [duane.buffer]
>> 
>> \usebtxdefinitions
>> [duane]
>> 
>> \definebtxrendering
>>    [duane]
>>    [dataset=duane,
>>     method=local,
>>    ]
>> 
>> \setupbtxlist
>>    [duane]
>>    [number=no]
>> 
>> \startsetups btx:duane:list:image
>>  \btxfield{title}
>> \stopsetups
>> 
>> \startsetups btx:duane:cite:external
>>   {\externalfigure[\btxfield{url_image}][width=10cm]}
>> \stopsetups
>> 
>> \startsetups btx:duane:cite:filename
>>   {\btxfield{url_image}}
>> \stopsetups
>> 
>> \starttext
>> 
>>   \cite[filename][duane::tug2014]\par
>>   \cite[external][duane::tug2014]\par
>> 
>>   % Why does this not work?
>>   %\externalfigure[\cite[filename][duane::tug2014]][width=10cm]\par
>> 
>>   \placebtxrendering[duane]
>> 
>> \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
>> ___________________________________________________________________________________
>> 
> 
> 
> -- 
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________

  reply	other threads:[~2016-05-04 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30 20:06 eidenbenz
2016-05-04  8:02 ` Hans Hagen
2016-05-04 21:31   ` Eidenbenz  Michael [this message]
2016-05-04 21:39     ` Alan Braslau
2016-05-06  7:47       ` eidenbenz
2016-05-06 19:09         ` Alan BRASLAU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FBF637CA-1231-46E4-950F-18CE01AC32CD@ethz.ch \
    --to=eidenbenz@arch.ethz.ch \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).