From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31039 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: How to size images? Date: Wed, 20 Jul 2022 15:54:42 +0200 Message-ID: <87tu7bdbfl.fsf@zeitkraut.de> References: <7aa4ae72-1fae-49a3-bb91-035b78b92dean@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38610"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBY6L4CLAMGQEWVOAV3I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jul 20 17:57:27 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f56.google.com ([209.85.128.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oEC4k-0009sS-JJ for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 20 Jul 2022 17:57:26 +0200 Original-Received: by mail-wm1-f56.google.com with SMTP id v67-20020a1cac46000000b003a2be9fa09csf8574617wme.3 for ; Wed, 20 Jul 2022 08:57:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658332646; cv=pass; d=google.com; s=arc-20160816; b=X/mjR/ikN7jiYRpeBaH0nii3kHz9CL+2TQcDSnKgZnAlZBuA/uFA9xUUrbVC3Zl3m7 qYq4aDuTC/ZobNq2lNBaQLbnV7F5Hxuz6pMJdyIPxg3EE/tQS37jpnGAV/8p2bWudxod dN9EltpXkE+SGevpIFTWvhu9l2cWYPf35GWvR1uCEcG08M5Aa+s7AUvXfBqU3UPbzYEc yGCREMyHUyYzZHcDLILx9ze2BLVSVZwXwuLovV12blp7ubq0csQmTs4u17xj/aMBj1WA uHqLp13IWEDEnnV85ObBfcTXnMKBDM4nelmf/JJTnEbhfUthJG75Eo64CHv3PX5HILAw Y0Aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :in-reply-to:date:subject:to:from:references:sender:dkim-signature; bh=A/IrihmdeRxG2Wh6Nx8p0U/u4T18ZK9FoHyH8y+OqYY=; b=k7dN9Nsktxos6pTP6To5LdsPhBkQVQZhqcellu/TvIN2sSW3jXwMIeIS8Ua9bbcyn+ 3Ljq1Cf7c5RsMSb2FSBv6VnLhJWITPGXUtfs4qy2GFMd6hAC5aBQR8N5wNOqEEeihDs6 2L15SDRRfQM7FgLcxbAoGHkZViIHm2fjg7MBSc8FZZYuGLismbd/pWuMuYa+CEnuQzxY e75v66hyEYVTJcaOA0cSfhPjqDVUqAZ9pniA4TIIZkgGekg+oJ8ZF36egstuN/aRFel6 HGbHAsiEbHPzF8euR+OdlVhtwn8dtL7N7LoN6/ed5+a92xwKowWCkwG9vfaN+TEs3iBv 8TrQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:references:from:to:subject:date:in-reply-to:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=A/IrihmdeRxG2Wh6Nx8p0U/u4T18ZK9FoHyH8y+OqYY=; b=MUboXc8efiR3QfAbZuJG+M8CTHa+kcAOQtXDz9XsymrQrclLO4nGJcx4F7P1/2agav JVHFyseewBVoq1Fsfl2KMuwlXGXZ3LVctJzr/DqZD9JWa75NrzI4z6NXl5YLp1ntWrcc tJbavGlpnVLMSaWNpze54gyeV+wBVAobLZFVn6gpqjL7INA5K11alfHQtTKMoKhLMX1Z SwznIuh03B+3G8Bgw7pMyLbecfBokeq6eJZ6NVRpvkUTanYPk/wk1N3xxaIuReg2hQH3 M+xgFSgGF2PhX70WXxox0FFMqF+EFdqvyO5xV1jptM7698c1p8J2w8t/jnZe3we+I4/Q JNCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:references:from:to:subject:date :in-reply-to:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=A/IrihmdeRxG2Wh6Nx8p0U/u4T18ZK9FoHyH8y+OqYY=; b=aSA307L7gMoBN9f3cQaUUu4MXcDP76lr+FtoVIJSGP0NF0c5BcADzoZ54fCcsibXUO tu232wBWBvRSDFSJdIFUT52K7k98otYEfisK3P/GNFjMcsUv72xcmGYubNAvBhc7p0Wl MQnwiSO26SzkTwT3NaMArx1/D85Fn58VS8hDEBrLUDqZtusZXnL5az5BeLZM2l4qUrYj CmXPmqkkrnNVTmyRaMHDq0lMKH+v0emfm40nH8jW2nyTmhDMVoq0gG6Ap0jB5qmSzlBU aBlXKQsagzbamUsm1MD56q+3M6TpBPML+i6930xtPUBvFc/gEAaAyiDSOQ6nov2kqNoz anFg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora8Vyy6lTMSt+zeCb8U48f17taYSuqSdYs/9/AqN6Iv40f8F0mpV txSyViVwgEOPB+CoZcWnH/k= X-Google-Smtp-Source: AGRyM1tfiFahXIMkqWpC2WBTGpJYrWjpiiioA72qfeZQfQCOeNQiHN/EWl5hVPkDvF6aEQVQfedtdQ== X-Received: by 2002:a7b:c2aa:0:b0:39c:9039:e74b with SMTP id c10-20020a7bc2aa000000b0039c9039e74bmr4555478wmk.127.1658332646272; Wed, 20 Jul 2022 08:57:26 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:2ccb:b0:3a2:f8a9:7a35 with SMTP id l11-20020a05600c2ccb00b003a2f8a97a35ls158987wmc.1.-pod-preprod-gmail; Wed, 20 Jul 2022 08:57:22 -0700 (PDT) X-Received: by 2002:a05:600c:4f83:b0:3a1:7310:62e7 with SMTP id n3-20020a05600c4f8300b003a1731062e7mr4607657wmq.84.1658332642467; Wed, 20 Jul 2022 08:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658332642; cv=none; d=google.com; s=arc-20160816; b=kiX72woC8uXu6jjLqpW/b6VZ4F3ceon+61yCbn1fzWUmyvw1WrGf54AzjvyfcMLOvD DjzhRShpKB34vIrpuTOIyCfDlzzu2LZj41Fe5gn5PYKAEDc2b9DpRBI/mtjCPSPBrMcO VWqpD4VJ0WROk2Fx7zcPPXD9wRurkEajZicjiU1qHTlR6b2rIq6RUqe9A6WCUavclvMd vptNoKZcnDQ9/5VkBaGD2R5/HurGHUHcr4TqcKFzva/AKKpng5O4lr65ByNCyzF94/mQ laCpwheQb7Cc+8W8KexAYKW1dHPybpZ6P+NaWlwNFwD5dbq0XvOFbxIUkv2Xv6XQ0VeH wJ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:to:from:references; bh=obKg9ZUw/x1Klke6RMfdzNayru9Gj8SwIp/bq2tddeA=; b=aXydbenWcm0Gj7ySXCr7j1xhYxvUU2H/6aUATeMtrdJUJD8e/MMp0R8g7tOjPJ/m5W oTLS0P3W0XF5AJgns4VLw/A12r+qrQnAU75xjJZzD4qaERbT0c5g3FsJrayu2m0FJDiy ucRcBimSJ/DMceg0/6EZcIcZDyajdgRHqx/C4McorfZOHZ3pt9i2IBgGfwsET4PcKCln O9XDCRAgNHQTLi1uuz7DsDXJNZrDN7EBQmTyyti+gMc3LEZ+T0i7M/ZUeF9GOXqdXgPC lPcSUlKbs0ortBFRw7veS83CiLeI7hK10attS+3WvdGJ2XkpwPicQhdULTTa0PQbvTJJ Rc9g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org. [80.241.56.172]) by gmr-mx.google.com with ESMTPS id bd14-20020a05600c1f0e00b003a03ade6826si114646wmb.0.2022.07.20.08.57.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:57:22 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) client-ip=80.241.56.172; Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Lp0hJ0kB0z9sWd for ; Wed, 20 Jul 2022 17:57:20 +0200 (CEST) In-reply-to: <7aa4ae72-1fae-49a3-bb91-035b78b92dean-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31039 Archived-At: Richard Huntsinger writes: > Is there a way, perhaps with a lua filter, to capture the src="image.jpg" width=600> with the sizing > information [...] Lua filter to do this: ``` lua function RawInline (raw) if raw.format:match 'html' then return pandoc.utils.blocks_to_inlines( pandoc.read(raw.text, 'html').blocks ) end end ``` This tries to convert *all* inline HTML code. Modify the `if` condition in case you want this behavior only for images: if raw.text:match '^