From unknown Tue Jun 17 20:13:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51119 <51119@debbugs.gnu.org> To: bug#51119 <51119@debbugs.gnu.org> Subject: Status: 28.0.50; shr displays inline images on new line Reply-To: bug#51119 <51119@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:13:59 +0000 retitle 51119 28.0.50; shr displays inline images on new line reassign 51119 emacs submitter 51119 Matt Huszagh severity 51119 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 10 13:51:08 2021 Received: (at submit) by debbugs.gnu.org; 10 Oct 2021 17:51:08 +0000 Received: from localhost ([127.0.0.1]:55809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZcya-0004Ul-4L for submit@debbugs.gnu.org; Sun, 10 Oct 2021 13:51:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:44912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZcyV-0004Ua-ST for submit@debbugs.gnu.org; Sun, 10 Oct 2021 13:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZcyS-0001V9-Tb for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:51:01 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:52916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZcyP-0006S0-4k for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 13:51:00 -0400 Received: by mail-pj1-x1029.google.com with SMTP id oa4so10751773pjb.2 for ; Sun, 10 Oct 2021 10:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version; bh=AwsZi1RDNLVCxN7rEU7CO3E+tGlxGyXMtYomIKNWHcA=; b=iHs87E5MUSC7BfLSdnoMe5jZSSoRpUKFcl2pRCBfHa7DSDLgkgpoYU+bbO9USLh+CX 627pTTX/H7vdp7t4vYzV8IJeENOs+ko4JYgYOLmFUc7fqxg0FMUlOyHZQWJwXmht8syA ki2fs2wRrl7Ysv7lkK5g10H1XGJQkfpb6Nma0KXBoZspZtiMF7cwG5YTSxnzUcL4HoP9 6K5VvAebdXFgJcyMjwBX46isNG+7V4jbsLDcxl1viLMSVX80mg8vx0D5sbBDB+yRBELP ozzaHs9xnZwOuZ79DVVsXeCRGKXXRqTwh8RheFsPsRwO3VM+MEuNWuc5Z2p/bh6GguRc l6cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=AwsZi1RDNLVCxN7rEU7CO3E+tGlxGyXMtYomIKNWHcA=; b=Vpn/Pn8HJxeAL44wicKvs3069TSISGAvKcd+XK4Slonu05GGIEsccMpoldHpPmxnaW UOGO44Ja2Y5pKq3n4QcYlGR5yUk3PNyZv+ub1+yB5JVDKZpGWh7msYFF2Yr1RB6CWknR 2rmAksVfgqIZ9WmVuuT0b/OhN5AK3WgGVHAVMxw3pA10DP9U6lHXjZNiqapEJ7azpFgG zQ+/wQora4tndCUE6kmTnxDmmwCfMvbu/tXaxmMsrxuhq4CZxz2iP9Uh+IwCwaw4mTqp PCeFYxVVzXmHyF7vMk17CDD1fGhcG3cA2BLYnbfZ4ZnHsjz3IrY8nIkUqE3P6YmbRRWT FaZg== X-Gm-Message-State: AOAM533lZGXEaja2UQqo//kHhmLC7bxiRSRQgI44dtEUUC+aQEmpm44O lNzUIbpB9csAXhld91n5TE7LWh+1WSE= X-Google-Smtp-Source: ABdhPJy0M7PrQRuKIvYxoXyIOOQDw7CyfEeyvOQeVRcPqaUmcmtB3c5RUaVoFtuKNOt+7x5V8nweYQ== X-Received: by 2002:a17:902:930c:b029:12c:d5c8:61c4 with SMTP id bc12-20020a170902930cb029012cd5c861c4mr20557407plb.73.1633888254088; Sun, 10 Oct 2021 10:50:54 -0700 (PDT) Received: from ryzen3950 (c-73-170-21-48.hsd1.ca.comcast.net. [73.170.21.48]) by smtp.gmail.com with ESMTPSA id q35sm16703674pjk.41.2021.10.10.10.50.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Oct 2021 10:50:53 -0700 (PDT) From: Matt Huszagh To: bug-gnu-emacs@gnu.org Subject: 28.0.50; shr displays inline images on new line Date: Sun, 10 Oct 2021 10:50:52 -0700 Message-ID: <87mtng93b7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=huszaghmatt@gmail.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) shr appears to display all images on their own line, irrespective of whether they are intended to be inline. An example of this can be seen at https://en.wikipedia.org/wiki/Chain_rule: (eww "https://en.wikipedia.org/wiki/Chain_rule") For example, the equation showing h as the composition of f and g is displayed on its own line, but should be displayed in line with the surrounding text (as confirmed by viewing the page in a GUI-based browser such as Firefox). I took a quick look at the shr source code but couldn't determine why this was actually happening. In particular, I couldn't find anything in the shr-put-image function that might cause this. Using the above example, the text that is overlayed with the image is "{\\displaystyle h=f\\circ g}" The insert-image function documentation indicates that the image should be displayed at the location of that text. I additionally tested this by downloading the SVG image file and using some simple elisp code: cd /tmp wget https://wikimedia.org/api/rest_v1/media/math/render/svg/a14345f3938c66b1fde08e18d8b301a59c5775a5 (let ((data (with-temp-buffer (insert-file-contents "/tmp/img/a14345f3938c66b1fde08e18d8b301a59c5775a5") (buffer-string)))) (with-current-buffer (get-buffer-create "*test*") (insert "some text ") (insert-image (create-image data 'svg t :ascent 100) "{\\displaystyle h=f\\circ g}"))) The image displays inline as expected. Why is shr displaying the image on its own line? How can I remedy this? Thanks! Matt In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0) Repository revision: 662f91a795c0b5480b1733a99ef478c94d6f1426 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Ubuntu-Server 20.04.1 2021.08.24 customized using Cubic on 2021-08-24 19:22 Configured using: 'configure --prefix=/nix/store/2qsaw18gfmfic2g1rhjpj03g5an325dn-emacs-gcc-20210722.0 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo --with-xwidgets --with-native-compilation 'CFLAGS=-O3 -march=native -momit-leaf-frame-pointer'' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB Important settings: value of $EMACSLOADPATH: /nix/store/r841j70wgcbsk5rps4xq9xvg1gsjljhf-emacs-packages-deps/share/emacs/site-lisp: value of $EMACSNATIVELOADPATH: /nix/store/r841j70wgcbsk5rps4xq9xvg1gsjljhf-emacs-packages-deps/share/emacs/native-lisp:: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: eww Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail vc-git diff-mode easy-mmode vc-dispatcher pp parse-time iso8601 jka-compr cl-extra help-mode gnutls network-stream url-http mail-parse rfc2231 url-gw nsm rmc url-cache url-auth format-spec eww xdg url-queue thingatpt shr kinsoku svg xml dom browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars mailcap puny mm-url gnus nnheader gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map rfc2047 rfc2045 ietf-drums text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mail-utils wid-edit mm-util mail-prsvr cl-loaddefs cl-lib iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads xwidget-internal dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 234829 10481) (symbols 48 10417 0) (strings 32 58196 2316) (string-bytes 1 2743688) (vectors 16 20394) (vector-slots 8 466525 17485) (floats 8 171 482) (intervals 56 9147 11) (buffers 992 12)) From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 11 03:14:45 2021 Received: (at 51119) by debbugs.gnu.org; 11 Oct 2021 07:14:45 +0000 Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZpWG-0003yg-UG for submit@debbugs.gnu.org; Mon, 11 Oct 2021 03:14:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZpWC-0003yK-Sj for 51119@debbugs.gnu.org; Mon, 11 Oct 2021 03:14:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=am5UP0KRhKQ7CDMoD0eYe+5XV6lhCK+3o5UgKW4etgg=; b=K8hLrcWHLjNM9iN+Wxy/j0LjZh HOM3XpgpiG7+4UsDuozAdZCkujKCmhhC6LlgjAJfYwRfgLMv6beATSqcXsdy1MFdrP72GiksX+Sgu FpBJPmu86Enai98iRheSQ8dBdUZY4dFIpQje+95AFjmXAyo3olCO7xpKlI5TKNc5EFVM=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZpW3-0000JK-F9; Mon, 11 Oct 2021 09:14:34 +0200 From: Lars Ingebrigtsen To: Matt Huszagh Subject: Re: bug#51119: 28.0.50; shr displays inline images on new line References: <87mtng93b7.fsf@gmail.com> X-Now-Playing: Epic 45's _In All The Empty Houses_: "Ghosts on Tape" Date: Mon, 11 Oct 2021 09:14:29 +0200 In-Reply-To: <87mtng93b7.fsf@gmail.com> (Matt Huszagh's message of "Sun, 10 Oct 2021 10:50:52 -0700") Message-ID: <87czockp7u.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matt Huszagh writes: > shr appears to display all images on their own line, irrespective of > whether they are intended to be inline. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47705#8 Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51119 Cc: 51119@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Matt Huszagh writes: > shr appears to display all images on their own line, irrespective of > whether they are intended to be inline. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47705#8 -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no