From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2OjHCLdfbGMScQAAbAwnHQ (envelope-from ) for ; Thu, 10 Nov 2022 03:19:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uM/TCLdfbGMnjgAAauVa8A (envelope-from ) for ; Thu, 10 Nov 2022 03:19:35 +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 D33CD3E971 for ; Thu, 10 Nov 2022 03:19:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osx9E-0003tD-AY; Wed, 09 Nov 2022 21:18:32 -0500 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 1osx9C-0003t3-Dg for emacs-orgmode@gnu.org; Wed, 09 Nov 2022 21:18:30 -0500 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 1osx9A-0002aY-67 for emacs-orgmode@gnu.org; Wed, 09 Nov 2022 21:18:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E1717240103 for ; Thu, 10 Nov 2022 03:18:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668046705; bh=EoYXVJ+0JAPt1A+XVtFgqSrG0VXk7uQlo+1V+CXXY5w=; h=From:To:Cc:Subject:Date:From; b=Epi9hO+OrenXSIXXwElhqbE3al4P3TbPlzRymMIGqS00dW8gT4cBjzEO+y9RZCmlP 50VlnWgspIpuqZPZP2m1kWON0PLYIZ7CjDJMLFGLBJFixvY76WwNs8WidUO+Ynwpjt uUpDYcIc1GQMQwL1GWMH5VlsK7mMKFeMkYmfaecRY5f64JvB73o5sv8l3BWKyXlw2z QIG+6K/zJcHx0c2EMC2FkokJPtl8v+O8l91mZjtNgvhKyyDRGPw6jI0Q5JF2CAsyDI eXGWJV5c0lJ5AM7kbQU4QyQhdULnQt5dvaS5i1Ja1s4l5l3JlOgM+p7eu8ZJ5kAvjL ORuXKvWETgDsg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N75996z4mz9rxB; Thu, 10 Nov 2022 03:18:21 +0100 (CET) From: Ihor Radchenko To: Eric S Fraga Cc: Emacs Org mode mailing list Subject: Re: [patch] give tables their own default placement in LaTeX export In-Reply-To: <87sfsgs644.fsf@ucl.ac.uk> References: <87sfsgs644.fsf@ucl.ac.uk> Date: Thu, 10 Nov 2022 02:19:02 +0000 Message-ID: <87sfirk0vd.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668046770; 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=J8tqbIVbn+XuEg3gKrB2TNFcDQGr2u8GFgEM13LvCFk=; b=AurijKtjqtXSJXBnrPk5QqnP22+4pO0EN09FrGUaeN1l9YlSsyiDNmEMqKhj07n+BnbGMH Blh/T72IV9jWrgH7j9kMQ2+WiuwrPw1V0zRI0/EQ+3Y9q06z8rsdRcKtkQ5rx770QHt2i5 4SsLtUNv8Sirgq7T2S5PuKIrZqgO0on1fpPw10Mt5e+oaZH0sxaf6wAmNusP/UUnG7dxQY tL7Nbm9GO+ls/XL0G9gBb4Bck2ZCDS9mY4saWGoql21A1P4cOSO+7PhLXsVb/Zu1yd63us xEAaHLvurhgn9xLYvx1/a8T9izFMFdNZbJlIgTrBd0X5I/8mLLXbkdfWf9gm4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668046770; a=rsa-sha256; cv=none; b=lOUVTp49QfG/utxwkqot5mADZLrSW/cDZSlLnWwVXPT0i5mm4cyzXLKYoGORdyEveFNZW9 vFl0d1v7xg9pnxbJqrVhMWy1DGTuVe6RoXecgNqhH/cB0jeqduDyyq7AL7ZkaT7g37P0jO KyqpQ3axs7bDe4Rm2MYG2HVKb9ZctxuAYXV9u8kZuj6/xHKj2KP7GcR7/56OGTUa3yDznD 6ZuiYwfn0YjuUclG7l2gE27eqa+ZcC5CKbs4CHge/NDU0F/weaahHP9ChpMVrSaYEEJDyd lcvvKWONBxWsc2Jm5oM1/UlBD71IzvbSeG381AaeLIg3WwIglr/o3XvECNcbJg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Epi9hO+O; 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: -2.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Epi9hO+O; 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: D33CD3E971 X-Spam-Score: -2.03 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZcYcp/47YF+N Eric S Fraga writes: > attached is a small patch to give tables their own default placement in > LaTeX export. Up to now, tables have used the default placement for > figures but figures and tables are very different creatures so it does > not make sense to have just one default for both. Thanks for the patch, and sorry for the late reply. This looks like a useful addition. > This patch unfortunately could break documents (if people have changed > the default for figures, expecting that change to apply to tables as > well) but I see no way to avoid this. So maybe not worth incorporating > but I leave that decision to others. There is a way to avoid this. See the comments below. > Subject: [PATCH] lisp/ox-latex.el: give tables their own placement default > > * ox-latex.el (org-latex--org-table): define and use a new variable, > org-latex-default-table-position, for setting the default placement > option for the export of tables. Please start sentences from capital letter and quote `symbols'. > +*** Tables now have separate default placement option for LaTeX export > + > +Tables and figures now have separate settings for the default > +placement in LaTeX export. Please mention the new variable name. > +(defcustom org-latex-default-table-position "htbp" You can use (defcustom org-latex-default-table-position nil as the default value. Then, you can fallback for figure position in the code when the value is nil. Need to update docstring accordingly. > + "Default position for LaTeX tables." > + :group 'org-export-latex > + :type 'string > + :version "26.1" :version is not needed. > + :package-version '(Org . "9.0") 9.6 > (or (plist-get attributes :placement) > - (format "[%s]" (plist-get info :latex-default-figure-position)))) > + (format "[%s]" (plist-get info :latex-default-table-position)))) Can use (or (plist-get info :latex-default-table-position) (plist-get info :latex-default-figure-position)) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at