From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mL4wHv7CNmXwUgEAG6o9tA:P1 (envelope-from ) for ; Mon, 23 Oct 2023 21:01:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mL4wHv7CNmXwUgEAG6o9tA (envelope-from ) for ; Mon, 23 Oct 2023 21:01:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F036E63B80 for ; Mon, 23 Oct 2023 21:01:17 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=O1hUdhAR; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698087678; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=MEuG61Ryhf7op0DdpV2JtOiBJ7EugwJp+i7vuhoSE/U=; b=jr5yf8g2MEuAdQk7+fOS32LWMRLVUKpvXEEJz20OO1a731YM/sC+SG8FPnk/laVznHxz4U piA7uD1chjn1pvtnr+pfmwFcA2NZZw24qDWdnEDM8r0vIDqLSpLCj/1wxkLqOWSC8jPD3r jR0R1ma2fs/ipyoynKeHKSRqC3n9SO5EgqZEwC31cXBHGEXhXLoZDu09Xe4D8um3UTEriN H7EPKm/LXRLopgkqQA0jvsd4S9doDml+l07Wzbc1ZOuuUUjMjLmFMkULiENyZ0LwaGJMH4 3gWVAcXsJIxSPUw9TH8JPTwMbg1UPDug9ahmDshDnwspXdH4wKcVXrjw3bgQaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698087678; a=rsa-sha256; cv=none; b=gsvkgJJVLp+uZ7rkURV7k6AxayZhTukE5jgmh/j4vRf21p7m3OcPXiGuJ8J8lpavnrqIlD AlP4jCn3iPFNmzpqvck+Bs/Zh8+HXqXklWcdnz4CSEPrWTSuUFtdqfdHaDEkund0mZXfnF lULExRPtdkiB5Xxc9DUGEi5JjbyxO4cpFX/uUw2JyDhHAlNZ4+vFkft/OxWOWPT8DF5jkX ZCAKhByKnsZn6GVZmYN7rezuhrS4torbiROdvnp3RdpuX6Oh/7fleSDa9xFvAhCRzWajIO YEXfSs9nC88p4WcJZdqYquV+PFu246TNxG7I6Ci5b6FpMyzcWSkfy+vOD67CzQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=O1hUdhAR; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qv0AC-0004wv-9q; Mon, 23 Oct 2023 15:00:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qv09x-0004vS-Ag for emacs-orgmode@gnu.org; Mon, 23 Oct 2023 15:00:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qv09u-0008KV-MT for emacs-orgmode@gnu.org; Mon, 23 Oct 2023 15:00:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A1312240101 for ; Mon, 23 Oct 2023 21:00:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698087611; bh=MEuG61Ryhf7op0DdpV2JtOiBJ7EugwJp+i7vuhoSE/U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=O1hUdhARFOGU3WxlfO8nBddiATMdUye33/AbVFz/PTtVOy/6tDHFBmXgppcqVcUg0 W5qg0VNunuBQtOV+d6qdk0XjW+SC9JosD2rdIFtRhEAaG16xHuq7RDBh60H8qG0/36 ed+4UkyC72l8VM9urtPIBGdYwJsVt+QDRhTxo8hpzO/2MKGQFQLRQJhXZxxgusAQTo Iwq3rFKNAK4GHKN/AX6JRaTWP1azbdE8WggyfC4ML0y5qjnQRXjS6op3SZ8Sx7rl5d 9KoWO3QL6OZFIOxei4nSR4n9tRJcsnzrBw9BJSBQ1eXFXeWTckCDbST1qqVCjT6v+D +Mz2gkUIyHIkw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SDkyz0Wf9z6twJ; Mon, 23 Oct 2023 21:00:10 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode Subject: Re: Are 'placement' and 'float' "obsolete terms" in inline images export In-Reply-To: <87zg098z93.fsf@localhost> (Ihor Radchenko's message of "Mon, 23 Oct 2023 09:27:36 +0000") References: <877cneicop.fsf@posteo.net> <87zg098z93.fsf@localhost> Date: Mon, 23 Oct 2023 19:00:08 +0000 Message-ID: <87o7gpjhaf.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.86 X-Migadu-Queue-Id: F036E63B80 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.86 X-TUID: K7+qPBZ9/h1b Ihor Radchenko writes: >> My suggestion is to add a :environment attribute next to another >> :environment-options attr (or something like that, to introduce any >> arbitrary LaTeX code). A LaTeX image can be enclosed in many environment >> types, float or non-float. > > As I said above, I feel that :environment term will be overloaded then. > What about :wrap? I like :wrap. What's more, remembering that old thread where some questions about code before/after the image were discussed, what if the expected value of :wrap were a kind of template? This would allow code to be placed before and/or after (not just an environment) the image, always within the float environment, if it exists. Something like this: #+ATTR_LaTeX: :float nil :wrap \begin{minipage}[b]{10pc}\small\n%s\n\end{mi= nipage}=20 #+CAPTION: caption [[file:foo.png]] Thus :caption with value nil does not add any higher float environment and would enclose (always within the template) the value of #+CAPTION as \captionof{figure}{caption}. Of course, with a float environment declared, :wrap can still be used. An internal environment is unlikely (I can't think of any use case right now), but you can add arbitrary code like \captionsetup{} or \ContinuedFloat, which should always go inside the float environment. The result of the previous example could also be obtained with: #+ATTR_LaTeX: :float minipage :placement [b]{10pc} :caption \captionof{figu= re}{caption}=20 [[file:foo.png]] I don't know if it would be appropriate to explain in the Manual that doing so would not be... "correct"? I don't know if there is any term in programming to designate these situations which, without being bugs, are functionalities not consciously sought... >> ... However, :float can still be useful for >> certain combinations. For example, a minipage environment cannot include >> a caption (it produces an error of the type "LaTeX Error: \caption >> outside float"). > > Do we know in advance which environments support \caption and which not? > I feel that we may handle this programmatically without creating an array > of almost-identical attributes. I like the idea, but unfortunately, apart from the known float environments, there are those that a user can define using the \newfloat command from the float package. --=20 Juan Manuel Mac=C3=ADas https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com