From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2CLtHJdaDWKlUAEAgWs5BA (envelope-from ) for ; Wed, 16 Feb 2022 21:12:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CIlAGpdaDWLgxAAA9RJhRA (envelope-from ) for ; Wed, 16 Feb 2022 21:12:07 +0100 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 0B61046A26 for ; Wed, 16 Feb 2022 21:12:06 +0100 (CET) Received: from localhost ([::1]:47590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKQei-0006TC-3h for larch@yhetil.org; Wed, 16 Feb 2022 15:12:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKQME-0000Ax-VL for emacs-orgmode@gnu.org; Wed, 16 Feb 2022 14:52:59 -0500 Received: from mout02.posteo.de ([185.67.36.66]:34203) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKQMA-0007LD-VI for emacs-orgmode@gnu.org; Wed, 16 Feb 2022 14:52:58 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6A697240105 for ; Wed, 16 Feb 2022 20:52:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1645041160; bh=yzFFanOKNBlYfMt84Mn9hTyQRsh5h024OwZTgPjdEvQ=; h=From:To:Cc:Subject:Date:From; b=Ayc3Qu0X8XFb0vefiKndRlGA023//tKRr2XKXbQaIL9oqfWLf9AnHqVA/yxqhjDhM Pql33FFE0Bz2vMkvHwngG4knaLHLhk0Sax0qyFMsN4i147W6fyJpBPPo5mbba57xbt KIXfc1SdbIghDoJH3JHmvcpCq01KJ9J8VwDUfLYaZQF9ABgY/WDil4OgOFYyleGJEn yNae8ERwcsirbNYLQMukFHbTkxa6fwozqXWZcEnJVF+rFrRvWdIMVyOkkUWWMw7ewk /iRwzoUE6YO+hkpxA+eGot4LyRPgms3IMXvVPrnzB7tfWeK5yqcyA8/xImDy99MY+W twqQtQqe5ik5A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JzTBv4Bwsz6tmk; Wed, 16 Feb 2022 20:52:39 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Re: [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures (was: update and add info for arbitrary :float values) References: <878ruhrvfq.fsf@posteo.net> <87h792tqhw.fsf@nicolasgoaziou.fr> <87sfsms904.fsf@posteo.net> <87czjoqn3i.fsf@nicolasgoaziou.fr> Date: Wed, 16 Feb 2022 19:52:36 +0000 In-Reply-To: <87czjoqn3i.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 15 Feb 2022 14:24:33 +0100") Message-ID: <87leyasi63.fsf_-_@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: Nicolas Goaziou Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645042327; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jmhCPHAeXscp8S47LGk57PKlfiAeGrqnkmKCkktEB0Y=; b=nMSSeDGeJQIBAi69Xbx18g/GE22gCxxG30Q2yEHhVhXvJkf7VRNpZATar/B9rq+Vxte2xO 07xp8vpMowEO75PS7F2ayUZLv6+IYI5z1PBlvEwZ0wlzi4BbLfEOMmkqCnPFYlVGDJCMB4 cztCljVu/Hm8q1Ux5qohSs085UkKNrvRlNkPPsdu6oq34qd5NkMHeeAE+9FJEMlRaUKmyW wrPwmpScqJtp0+cLscuIMhCfJxiISQTdlpGEgfMQrNisY5LfPnXLuq/HEH9xHLDcwv3LJs /FbLWdDSu6CIM1Hl/Oh70lp/6t9c6vB/ZbeJObOagf1XfICzDzZMQeVil/x2Lw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645042327; a=rsa-sha256; cv=none; b=T0rroljvqJ63y/SGN7PaVpVYr3ZaR2NpLncnrJhLcniUpOdxReXf2XvXUv2CtHNDfIriIs 6cVt4tw8bBToPMeoKcRD/BVNfvsAU4LQ+tiQ3iH/J5ieg/4+tXYNK7JUEv9ECMiKfn/MvD /Ej4yfU2cwgva8xRffaERHwBShMWL6qQcl7Zt5gxuFsSvBwNTiL6E9Igzatf+RIFaZOSIm qqciH1VBFGowumb59uK70x4XX3GU0Do3zeJYwG/NtANBDAPdTntWX8f1orR/GxnFW1qF+e mJIgQl4d92zF4MJgYl4KMvty/E2Jo8WPChKAZrTrNVW4todsKo5GMVTtwJJwxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Ayc3Qu0X; 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" X-Migadu-Spam-Score: -4.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Ayc3Qu0X; 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" X-Migadu-Queue-Id: 0B61046A26 X-Spam-Score: -4.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: At1gu5mkB8mD --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I am attaching an updated version of the patch, which retrieves the `t' value for `:float' in tables and figures. The necessary information in the Manual is also updated. Best regards, Juan Manuel=20 Nicolas Goaziou writes: > Hello, > > Juan Manuel Mac=C3=ADas writes: > >> Ah, sorry, I hadn't noticed that :-). The thing is that I have in my >> ~/.emacs `sentence-end-double-space' set to nil. > > Yes, .dir-locals.el files contains (sentence-end-double-space . t). > Somehow, you are not evaluating it. > >>> However, isn't it a bug? Shouldn't t value default to "figure" >>> environment, if only for the sake of backward compatibility? >> >> I think you're right. t value should be figure and table, I agree. Would >> it be appropriate to add these two lines: >> >> In org-latex--inline-image: >> >> ((string=3D float "t") 'figure) >> >> And in org-latex--decorate-table >> >> ((string=3D float "t") "table") > > I think so. > > Regards, --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ox-latex.el-Add-a-t-value-for-float-in-tables-a.patch >From b00b1d30d66d0932d4becb3c74fe3c3837dbdec1 Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Wed, 16 Feb 2022 20:27:38 +0100 Subject: [PATCH] lisp/ox-latex.el: Add a `t' value for `:float' in tables and figures * org-latex--inline-image: default `figure' environment * org-latex--decorate-table: default table environment * doc/org-manual.org (Tables in LaTeX export): add `t' and arbitrary `:float' values * doc/org-manual.org (Images in LaTeX export): add `t' and arbitrary `:float' values --- doc/org-manual.org | 15 ++++++++++++--- lisp/ox-latex.el | 2 ++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index b8c61fddd..d58f80523 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -13572,7 +13572,12 @@ include: The table environments by default are not floats in LaTeX. To make them floating objects use =:float= with one of the following - options: =sideways=, =multicolumn=, =t=, and =nil=. + options: =t= (for a default =table= environment), =sideways= (for a + =sidewaystable= environment), =multicolumn= (to span the table + across multiple columns of a page in a =table*= environment) and + =nil=. In addition to these three values, =:float= can pass through + any arbitrary value, for example a user-defined float type with the + =float= LaTeX package. LaTeX floats can also have additional layout =:placement= attributes. These are the usual =[h t b p ! H]= permissions @@ -13686,8 +13691,7 @@ attribute to one of the following: - =t= :: - For a standard =figure= environment; used by default whenever an - image has a caption. +For a default =figure= environment. - =multicolumn= :: @@ -13708,6 +13712,11 @@ attribute to one of the following: To avoid a =:float= even if using a caption. +- Any arbitrary value :: + + For example, a user-defined float type with the =float= LaTeX package. + + Use the =placement= attribute to modify a floating environment's placement. diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 5dda9b3ab..0edba9e52 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2414,6 +2414,7 @@ used as a communication channel." (cond ((string= float "wrap") 'wrap) ((string= float "sideways") 'sideways) ((string= float "multicolumn") 'multicolumn) + ((string= float "t") 'figure) ((and (plist-member attr :float) (not float)) 'nonfloat) (float float) ((or (org-element-property :caption parent) @@ -3269,6 +3270,7 @@ Return new environment, as a string." (cond ((and (not float) (plist-member attributes :float)) nil) ((member float '("sidewaystable" "sideways")) "sidewaystable") ((equal float "multicolumn") "table*") + ((string= float "t") "table") (float float) ((org-string-nw-p caption) "table") (t nil)))) -- 2.35.0 --=-=-=--