From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: Thangalin via ntg-context <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: Re: Set up external figure for particular image type
Date: Mon, 1 Aug 2022 09:07:50 +0200 [thread overview]
Message-ID: <64495bfc-7a74-cd4d-6713-bbf1b33e7047@freedom.nl> (raw)
In-Reply-To: <CAANrE7rTYPMU6+pAqS8kP4ZSWStR79tCbkkcb+Dht0H5vXLxSA@mail.gmail.com>
On 8/1/2022 2:29 AM, Thangalin via ntg-context wrote:
> Got it working. Complete solution:
>
> |\setupexternalfigures[ location={local,global,default},
> width=\textwidth ] \defineexternalfigure[svg][width=1cm]
> \defineexternalfigure[jpg][width=2cm]
> \defineexternalfigure[png][width=4cm] % Won't be applied because there's
> no process action. % Default (\textwidth) is used, as defined above.
> \defineexternalfigure[pdf][width=6cm] \starttexdefinition
> includegraphics #1 \splitfilename{#1} \processaction[\splitofftype][
> jpg=>{\externalfigure[#1][jpg]}, png=>{\externalfigure[#1][png]},
> svg=>{\externalfigure[#1][svg][conversion=mp]},
> default=>{\externalfigure[#1]}, unknown=>{\externalfigure[#1]} ]
> \stoptexdefinition \starttext \includegraphics{kitten.jpg}
> \includegraphics{mill.png} \includegraphics{cow.pdf}
> \includegraphics{tiger.svg} \stoptext |
I've added:
\setfigureconversion[svg][mp]
So that this works:
\starttext
\externalfigure[kitten.jpg][width=2cm]
\externalfigure[mill.png] [width=4cm]
\externalfigure[cow.pdf] [width=6cm]
\externalfigure[tiger.svg] [width=1cm]
\stoptext
But after we release you need to wikify it.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2022-08-01 7:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 15:46 Thangalin via ntg-context
2022-07-08 16:29 ` Henning Hraban Ramm via ntg-context
2022-07-12 18:11 ` Thangalin via ntg-context
2022-07-12 19:01 ` Rik Kabel via ntg-context
2022-07-18 16:01 ` Thangalin via ntg-context
2022-07-12 19:07 ` Wolfgang Schuster via ntg-context
2022-07-18 17:10 ` Thangalin via ntg-context
2022-07-18 20:14 ` Wolfgang Schuster via ntg-context
2022-08-01 0:29 ` Thangalin via ntg-context
2022-08-01 7:07 ` Hans Hagen via ntg-context [this message]
2022-07-12 22:33 ` Albert Krewinkel via ntg-context
2022-07-18 16:03 ` Thangalin via ntg-context
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=64495bfc-7a74-cd4d-6713-bbf1b33e7047@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.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).