From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/115435 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thangalin via ntg-context Newsgroups: gmane.comp.tex.context Subject: Set up external figure for particular image type Date: Fri, 8 Jul 2022 08:46:59 -0700 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9204448903888084105==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20435"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Thangalin To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jul 08 17:47:49 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9qCq-0004wx-Gw for gctc-ntg-context-518@m.gmane-mx.org; Fri, 08 Jul 2022 17:47:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7576628A4C8; Fri, 8 Jul 2022 17:47:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a39phU4PHUvJ; Fri, 8 Jul 2022 17:47:14 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2C13628A4DC; Fri, 8 Jul 2022 17:47:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5FB7928A4C8 for ; Fri, 8 Jul 2022 17:47:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6nOsC4Bl-1LS for ; Fri, 8 Jul 2022 17:47:11 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.174; helo=mail-lj1-f174.google.com; envelope-from=thangalin@gmail.com; receiver= Original-Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id D851228A3E4 for ; Fri, 8 Jul 2022 17:47:10 +0200 (CEST) Original-Received: by mail-lj1-f174.google.com with SMTP id 19so5526555ljz.4 for ; Fri, 08 Jul 2022 08:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=OOS5wIo9npZrn3V5FyV8R6VishJg5kjHDGsp0RVj6Tk=; b=hxZ8Spotn+O33W+X81rljouFjQlRvyCG5DhjL6eG6UZT9WDzjh/JEfDTl4Rzbe9++s 9ZlQoN2Z2Ufdh2J3aXg3SV10YnGAF8AP6AG2pMj7wWlB4NY6D/hzvWYlgrOw2HiOeWwg 2z5IJtKedTP1+KdIo/7WcTJlLpdFYGxjmIR8HVFcKBCjZvfRhtM+ZSKMS4fVgSph+Tx3 SDTHKwEsG7itmxHbqAUi4/25GqDjCAyEIkdCIdm7KDFq3gVHA3vL6v1iNXXw3eNG5Xlp mZkblC80eTYn0HEecyqWX4p1RK5XaOIVFKtRBIvOAUQ4yLHeisjD9fHzsWC8eR8J/JNi dgxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OOS5wIo9npZrn3V5FyV8R6VishJg5kjHDGsp0RVj6Tk=; b=6X/cXp6JRwEtbNH+tIwK6F6jpu9TYKiMErEqQi/dClzQc8B5bdBc8x/pvCZJFr8ml5 IKUs/wH9HNMa2ZZDIZuWz23B6EtgM//vMRUfQgQPmUkhfxEx8JRNPwFxX4PvZ40+urxb gFrIp1RSQCGiXWLe6FY/KViM8Wo9opG78Vqq6asmDrvGmkrCX/O89tlQYOEPx6QubMDV QVUjg9D94JF/Cc9kICQKkov5M/Dv8O56kfhqXbl6aUH09N7FWPuKEFVRlOLfrKXMnrjy LaywTxlki4PIx6NS7isRtG/r4XymqrYmrFPT0dWwGZR3HixOQi9DPR8/vRwWPbZo3nch O5Cw== X-Gm-Message-State: AJIora+okldmYhIFWQg/6zJBbYpRxbFUqf7JVg7lHQEkKGdUPgSj6iql EhIZtUO1DP+YfTfoizuDt9m/cCO2FoxL0c+3kEJ3rZMppd0= X-Google-Smtp-Source: AGRyM1sc7XlOLvnDhoTDD6W2OAhtGaYGNPK0zdYNnecqDZPBRKx42bwe7Ft0aF3qYz4A8+/W6dhL8g760Gbe6fy8Rps= X-Received: by 2002:a2e:2284:0:b0:25d:490f:60d3 with SMTP id i126-20020a2e2284000000b0025d490f60d3mr2468071lji.486.1657295229863; Fri, 08 Jul 2022 08:47:09 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:115435 Archived-At: --===============9204448903888084105== Content-Type: multipart/alternative; boundary="00000000000076ce2505e34d1d1f" --00000000000076ce2505e34d1d1f Content-Type: text/plain; charset="UTF-8" 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}, maxwidth=\textwidth, maxheight=0.4\textheight ] I'd like to change the `maxheight` option for only PNG images, such as: \setupexternalfigure[ method=png, maxwidth=\textwidth, maxheight=\textheight, ] However, this affects SVG images as well. How do you apply different external figure setups based on image type? Thank you! --00000000000076ce2505e34d1d1f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
A d= ocument has a mix of SVG and PNG images. Changing the parameters for `\setu= pexternalfigure` affects both SVG and PNG images. Consider the following co= de:

=C2=A0 =C2=A0 \setupexternalfigures[
=C2=A0 =C2=A0 =C2=A0 ord= er=3D{svg,pdf,png,jpg},
=C2=A0 =C2=A0 =C2=A0 location=3D{local,default,g= lobal},
=C2=A0 =C2=A0 =C2=A0 directory=3D{images},
=C2=A0 =C2=A0 =C2= =A0 maxwidth=3D\textwidth,
=C2=A0 =C2=A0 =C2=A0 maxheight=3D0.4\textheig= ht
=C2=A0 =C2=A0 ]

I'd like to change the `maxheight` option = for only PNG images, such as:

=C2=A0 =C2=A0 \setupexternalfigure[=C2=A0 =C2=A0 =C2=A0 method=3Dpng,
=C2=A0 =C2=A0 =C2=A0 maxwidth=3D\tex= twidth,
=C2=A0 =C2=A0 =C2=A0 maxheight=3D\textheight,
=C2=A0 =C2=A0 ]=

However, this affects SVG images as well.

How do you apply d= ifferent external figure setups based on image type?

Thank you!
--00000000000076ce2505e34d1d1f-- --===============9204448903888084105== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============9204448903888084105==--