From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Placing a figure with a command for the file in mkiv
Date: Sat, 27 Jan 2018 12:39:09 +0100 [thread overview]
Message-ID: <5A6C64DD.3090503@gmail.com> (raw)
In-Reply-To: <32046D73-C04E-4B87-B47D-28BB09F7D935@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1673 bytes --]
> Otared Kavian <mailto:otared@gmail.com>
> 27. Januar 2018 um 12:31
>
>
> Hi Wolfgang,
>
> Thanks again! Indeed
>
> \defineexpandable\authorpicture{hacker.jpg}
>
> solves the problem in the simplified case I was reporting.
> However in the real case, the file « hacker.jpg » is in fact a file
> which depends on other variables, and when I include \defineexpandable
> in the \getvariable environment then it does not work anymore: saying
>
> \defineexpandable\authorpicture{\getvariable{talk}{picture}}
> or
> \defineexpandable\authorpicture{\expanded{\getvariable{talk}{picture}}}
> or
> \defineexpandable\authorpicture{\expandafter\getvariable{talk}{picture}}
> does not solve the problem.
>
> Below is a minimal example showing the issue (with what you taught me
> last week…).
>
> Best regards: OK
>
> \starttext
> \startbuffer[pagetalk]
> \starttabulate[|f{\bi}l|p|][before=]%
> \NC Speaker \EQ \getvariable{talk}{speakerfirstname} {\sc
> \getvariable{talk}{speakername}}
> \NC\NR
> \NC Title \EQ \getvariable{talk}{title} \NC\NR
> \stoptabulate
> \defineexpandable\authorpicture{\getvariable{talk}{picture}}
> \placefigure[here][]{}
> {\externalfigure[\authorpicture]}
You can put the \getvariable command in \externalfigure.
\startplacefigure[location=here]
\externalfigure[\getvariable{talk}{picture}]
\stopplacefigure
> \page
> \stopbuffer
>
> \setvariable{talk}{set}{\getbuffer[pagetalk]}
>
> \setvariables[talk]%
> [speakername={Hacker},
> title={Up to date hacking},
> picture=hacker.jpg
> ]
You’re missing a coma after “picture=hacker.jpg” which results in “jpeg ”
(which a space at the end) as file extension for the image.
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 3077 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2018-01-27 11:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-27 10:28 Otared Kavian
2018-01-27 10:43 ` Wolfgang Schuster
2018-01-27 11:31 ` Otared Kavian
2018-01-27 11:39 ` Wolfgang Schuster [this message]
2018-01-27 13:36 ` Otared Kavian
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=5A6C64DD.3090503@gmail.com \
--to=schuster.wolfgang@gmail.com \
--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).