From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 wDPWHN0tOmWXZAEA9RJhRA:P1 (envelope-from ) for ; Thu, 26 Oct 2023 11:14:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wDPWHN0tOmWXZAEA9RJhRA (envelope-from ) for ; Thu, 26 Oct 2023 11:14:05 +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 A68D8642F7 for ; Thu, 26 Oct 2023 11:14:04 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=P0E8g6RZ; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698311645; a=rsa-sha256; cv=none; b=mZB6M/K9kezjpzO4Zd+u3KlYD4IqhI96IEJAINM13DbBUD1nlBreXSveckj65ENnNonwBH j8RB/8CwH44Z4MPoEzrxSmUlahY66sgWCLyCV1ng65uoWXQk3c9/ws/0QmQPZBA07WihIU /nWDq0MFZCUpkZ2A79CnyHEvS/56MH5A4L6h4CQTNjm/w+I0EoNlHXyN8zWKz5vkyRIXaa tfFeylJDGIlxRfh8huFrw35SntKcfDMWFoMMFFzJIFlLqmlktSQebn8iPUPxd6kmy0AlVy NxKJjtqLIfz9/JSgt14NsNltUYwdKShdVoxCSYwSuQS6bPtuBSmm2Lde2lfptQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=P0E8g6RZ; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698311645; 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=SBhM1cJzHWFIooh/WHNXnKFavkgYQ4+ZMLsWJhVpkQU=; b=pPvZDDSWghJSGc0iChSgdmRkR2x7aF1XNQSoaYAW+gq05Mxa+VqV72yjpZqljDWsPOXjJb hIRkd/A0toauwxzvS7fpyHz0XRJi7QlrNcEML0N2kr2Llf1qx4YuoZNeFeTfe2iag+2Lt7 gYxcZkbUz7BW7rs2qLRq1Z9nOs1UB7VFVapfLQ5d57ykcCR+/K/TgJJv1nANe+Ujq2Sjjh DqmB1JTAt5DS7SKWJGHlWaIPRYOZhaLVeNIrqN1rI/5wltZJxFYLWNlz6S/kDHCPUswdxE yPh2TGgIHn0e/QSif+6SoTFdTzypIntsRT+BCPHVw4eDg76/A1O7TDX8TbnVug== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvwQP-0006Lm-LY; Thu, 26 Oct 2023 05:13:09 -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 1qvwQL-0006KL-Cq for emacs-orgmode@gnu.org; Thu, 26 Oct 2023 05:13:05 -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 1qvwQH-00037h-My for emacs-orgmode@gnu.org; Thu, 26 Oct 2023 05:13:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0AA54240101 for ; Thu, 26 Oct 2023 11:12:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698311577; bh=KsR5vVLLeCmL058TbVOuXZsA2UQDQ6wvzBwtwRmy8s4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=P0E8g6RZqx93ioy6B9Wb1xTVrgLpE/n7RAiWdzMwRCuZ9ve3MelPcZ128n1Wfj33p WQTcquErdhTCOUHLsgC+IMSImOUnBEFrfJsqk/RPazRQkn/TdFhDGeJfkk5AStiO8y lk2Uve4aDLQEPnRfi1CIv4vSzPGmr3GqHFBvssl2pEIqsqlpgmBHhqp8WiTfeTIXOO EYtAjKhARFB59lJGA/lRvYK4XPSjJFoZk2ENGHOK6DAVwWHVplB50shujpN4aluYiD VrY+rxL7tKjb3UPW1kBrD+qT1s4KaLpvYfqGbzRtoQzQ9Ptnn73klSdPHRdGyzYk+m ptImg36gfXtgA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SGKnz6VRHz6tws; Thu, 26 Oct 2023 11:12:55 +0200 (CEST) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode Subject: Re: Are 'placement' and 'float' "obsolete terms" in inline images export In-Reply-To: <87o7gpjhaf.fsf@posteo.net> References: <877cneicop.fsf@posteo.net> <87zg098z93.fsf@localhost> <87o7gpjhaf.fsf@posteo.net> Date: Thu, 26 Oct 2023 09:14:36 +0000 Message-ID: <87il6td9tv.fsf@localhost> 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=yantar92@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-Migadu-Spam-Score: -6.40 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Queue-Id: A68D8642F7 X-Spam-Score: -6.40 X-TUID: vcL+LkFur0dF Juan Manuel Mac=C3=ADas writes: >> 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{= minipage}=20 > #+CAPTION: caption > [[file:foo.png]] > ... > #+ATTR_LaTeX: :float minipage :placement [b]{10pc} :caption \captionof{fi= gure}{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... What about making :wrap override :float completely + obsoleting :float. We can allow wrap to have special values like in float: :wrap t/:wrap multicolumn/:wrap sideways With these special values, :placement will be taken into account. Further, we can make templates a bit more detailed. Starting from similar to what you proposed in the above :wrap \begin{minipage}[b]{10pc}\small\n%{body}\n\end{minipage} to more granular control over caption, centering, comment-include, and image-code: %{caption} %{caption-text} %{centering} %{comment} %{comment-text} %{image} %{image-path}. If the :wrap text does not contain %{...} placeholder, it will be treated as what :float artbirary-environment does. We may even consider something like #+name: latex-template #+begin_src latex :export none \begin{minipage}[b]{10pc}\small %{body} \end{minipage} #+end_src #+attr_latex: :wrap latex-template[] As a bonus, :wrap may allow prepending/appending arbitrary code to headings: * Heading starting at a new page :PROPERTIES: :ATTR_LATEX: :wrap \clarpage%{default} :END: >>> ... 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. We might also consider :caption-template \captionof{figure}{%{caption-text}} --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at