Re: [NTG-context] Set up external figure for particular image type

2022-08-01 Thread Hans Hagen via ntg-context
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

Re: [NTG-context] Set up external figure for particular image type

2022-08-01 Thread Thangalin via ntg-context
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

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Wolfgang Schuster via ntg-context
Thangalin via ntg-context schrieb am 18.07.2022 um 19:10: Thank you, Wolfgang. That looks promising. SVG files are converted using MetaPost. I thought the following would work: svg=>{\externalfigure[#1][svg][conversion=mp]} You can probably remove the second argument ([svg]) which was

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
Thank you, Wolfgang. That looks promising. SVG files are converted using MetaPost. I thought the following would work: svg=>{\externalfigure[#1][svg][conversion=mp]} Is there anything else that needs to happen to ensure SVG files are piped through MetaPost? Thanks again! >

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
Of course, you could also use pandoc to go directly to ConTeXt; that is > currently my preferred way of producing PDF from Markdown. > Thanks Albert! I'm going to stick with my desktop text editor, KeenWrite , rather than use shell scripts

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
Thanks, Rik. Not using Pandoc. I was using Pandoc up until 2020: https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/ I've since authored KeenWrite , which uses flexmark-java to generate XHTML

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Albert Krewinkel via ntg-context
Thangalin via ntg-context writes: > The source comes from Markdown, which is converted to XML, then typeset > using ConTeXt. There's no Markdown-specific mechanism to relate images > to a particular external figure definition, unfortunately. All images > use the same syntax and are treated the

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Rik Kabel via ntg-context
On 2022-07-12 14:11, Thangalin via ntg-context wrote: Thank you for the suggestion Hraban. The source comes from Markdown, which is converted to XML, then typeset using ConTeXt. There's no Markdown-specific mechanism to relate images to a particular external figure definition,

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Wolfgang Schuster via ntg-context
Thangalin via ntg-context schrieb am 12.07.2022 um 20:11: Thank you for the suggestion Hraban. The source comes from Markdown, which is converted to XML, then typeset using ConTeXt. There's no Markdown-specific mechanism to relate images to a particular external figure definition,

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Thangalin via ntg-context
Thank you for the suggestion Hraban. The source comes from Markdown, which is converted to XML, then typeset using ConTeXt. There's no Markdown-specific mechanism to relate images to a particular external figure definition, unfortunately. All images use the same syntax and are treated the same

Re: [NTG-context] Set up external figure for particular image type

2022-07-08 Thread Henning Hraban Ramm via ntg-context
Am 08.07.22 um 17:46 schrieb Thangalin via ntg-context: I'd like to change the `maxheight` option for only PNG images, such as: Define your own figure class with \definexternalfigure: https://wiki.contextgarden.net/Command/defineexternalfigure It won’t automatically chose the file format (or

[NTG-context] Set up external figure for particular image type

2022-07-08 Thread Thangalin via ntg-context
A document has a mix of SVG and PNG images. Changing the parameters for `\setupexternalfigure` affects both SVG and PNG images. Consider the following code: \setupexternalfigures[ order={svg,pdf,png,jpg}, location={local,default,global}, directory={images},