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 IAqyAPqVD2KyAQAAgWs5BA (envelope-from ) for ; Fri, 18 Feb 2022 13:50:02 +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 YMClOfmVD2KTwwAA9RJhRA (envelope-from ) for ; Fri, 18 Feb 2022 13:50:01 +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 4143830AF0 for ; Fri, 18 Feb 2022 13:50:01 +0100 (CET) Received: from localhost ([::1]:39092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nL2i0-0007WI-9F for larch@yhetil.org; Fri, 18 Feb 2022 07:50:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nL2W5-0006ja-IL for emacs-orgmode@gnu.org; Fri, 18 Feb 2022 07:37:41 -0500 Received: from mail-vi1eur05on2131.outbound.protection.outlook.com ([40.107.21.131]:47009 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nL2W1-0000qo-8u for emacs-orgmode@gnu.org; Fri, 18 Feb 2022 07:37:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWgTdvmHvT9ATLX32OIh5UNxDdIJrwtWtPA79Yo5nuPfxQO5Zk8VvBuUz3bnH+zgD30WnscCucHs3I/tDMqxLRgBomVCEQ28P2nQb52VEl3eRrCZGGQxveWeNmSFDTnXPaKu3stCg/dwrLC71qB6JWWse8hp+keRz8StqTKp5YXNj9qutaTYA9fiZgTls2zqDbGL+XcbhdR7oZltp7FuQkpswNPpNjy3biFiWgwe7kCDVC3jj2ZD1iOlEVBqEmRceKM7vCd+STMfYezTOdOnk+DEYKfcWQM5r1BtSHLGJYicalYO23lVy9rBB8yH81rs73MnxYJZIP7PP53+7Kkg0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kH+vgaLRSE9nU47dOIy6J1psH49iEuEmCyBzWFUZoQk=; b=OmIx10YQTLcLdsV2rz1zcDRSlg/GFJqt8+Q+foaEtWD+xY2ErGp8G2v3BUrj4qi8rvi/42QgPxOj74v1ZhhkebVmlQ82iWu1SJWbDnQAIJ6zyg9pU/gVfYtdj12q6gpQ6673pb6jl8hoagZMH6N6urzQ7RMy8YBjiBypbbOvox5cA+HKJXcAJTNQmC8mJ2pNrHYDGIquEIvDu68tWmL5tAZ/8cUtciL8RdoVIRsMO8UAgxQl7OnBN5UExPbz65FdVpw+VMqowRRp0QUVc5dWRPbV96Mhev67+9+5Jynq8RON8QlPZ4Nuzlli9GvuSpWlRwD0S/YF4vkswdpgwlBsmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ucl.ac.uk; dmarc=pass action=none header.from=ucl.ac.uk; dkim=pass header.d=ucl.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucl.ac.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kH+vgaLRSE9nU47dOIy6J1psH49iEuEmCyBzWFUZoQk=; b=CBGLCQJ7yc9BgAUWlZDqMQ1XVHJ+0EImSLtbA3Z/3zJspdIh+Nf//zZIon+WhJFJNux0MWvpENSsPbU52zUZKpppud/vE2D04gN9dgRmiHeRM0MAcsWllueYegoXaltyjgv/ditKBgRs7TClbQKvkZl6NV1p/QWNEyFD6oUnTVc= Received: from DU2PR01MB8429.eurprd01.prod.exchangelabs.com (2603:10a6:10:2e4::16) by VI1PR0101MB2335.eurprd01.prod.exchangelabs.com (2603:10a6:800:54::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Fri, 18 Feb 2022 12:37:33 +0000 Received: from DU2PR01MB8429.eurprd01.prod.exchangelabs.com ([fe80::19ef:9685:f72:e81e]) by DU2PR01MB8429.eurprd01.prod.exchangelabs.com ([fe80::19ef:9685:f72:e81e%8]) with mapi id 15.20.4995.024; Fri, 18 Feb 2022 12:37:32 +0000 From: Eric S Fraga To: Emacs Org mode mailing list Subject: [patch] give tables their own default placement in LaTeX export Organization: On the Interweb somewhere X-Url: http://www.ucl.ac.uk/~ucecesf/ Mail-Followup-To: Org Mode List Date: Fri, 18 Feb 2022 12:37:31 +0000 Message-ID: <87sfsgs644.fsf@ucl.ac.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-ClientProxiedBy: LO4P123CA0314.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::13) To DU2PR01MB8429.eurprd01.prod.exchangelabs.com (2603:10a6:10:2e4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bbb7bf7a-0402-4292-d5d6-08d9f2db6f16 X-MS-TrafficTypeDiagnostic: VI1PR0101MB2335:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UixIy9sw59BARM2i8Kl5qvfL0ee5wyf1ya6jykIawEpsc10I4k1IKDI8ihv1+g8eqc8AoplMQxS3nNLQGZyF0umpHWAsKIEEdzwL3q8+XTMmK9iBpF9TMKvI1M34N9EVF9BTfi7zcsM60jNfxfhpB6Vsvy4LaiHS9h7pkVVmswetm3D/Ipi50MpZXiyojOi7DnjIm2RpvzLepKMSd96j/k6U0YQhqoqEmn1PYjD/DYppdK/v1JFluyaEHCuhdPTDzw5c19/gHexgddqGNmBaxXcpWMvsg/w9dMDNIVP0AvgXKUlfQ75ydKub0kom0rlmpWp/5Ay/RURM/n/pOHzWwCxVN2ZVnxhZKi8mcbgvEFB479OAeD1XgR/byG2BUtVCRMNE9rgyd8AYyk33M23I+yGhk6sNS9BrulJpZSBz9xFyDj2FIyzTHDXCTQth3uW+IoD8KKDD2T17tripDDMRNn5nMYWY+wqkj8A++3oKboOnB85ZsAC2iOFisAx1OdmOqZkPhtxzbGYf2NA645WnfA3uwWEaAAd2eL5kngfI9Hhps3xWYa44FuoktEBJbDLTbxhqZS2B8Lpq3HOX05KFRsp4gCF5uAhak37BzuCzX7+e/11T1e1kNcaB+8srIn8NOfcvB7mORwE6VP2/2SZAaaXZCjF4r4zsx1D6FkkfbZjoZLXdWrKnhR4vH80HEnUXAk6u1qkk6hOWm2KQyOJUwg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR01MB8429.eurprd01.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230001)(6029001)(4636009)(366004)(2906002)(36756003)(8676002)(38100700002)(6506007)(8936002)(38350700002)(235185007)(5660300002)(508600001)(66476007)(66556008)(2616005)(6486002)(66946007)(6916009)(26005)(52116002)(36916002)(316002)(86362001)(186003)(786003)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DAw3u4t2VQLRX3YLuAXMDzAljuk1Zr+oF2U4fw2cUNsMHTtkQkRrG/9CKtY+?= =?us-ascii?Q?WdkxD6QffYFU+/0kpqH+JjsTmJsgaJ6pcQ2Uf0il/jBfK7A+HZxlUcrjIwsO?= =?us-ascii?Q?rSVI+hQJpReXv6GdWKbWFbcVLSs0UXQCGwYyApleOTDFW+jJ3xIurIZvsvns?= =?us-ascii?Q?rT7QZlWclbPDRon8b93+u6h0DwOHNVBP9xGmYSomYssSxjMM0/EnHlQh6vqe?= =?us-ascii?Q?0VicV3sL66xpcRFmMY+ij+g8nhkv+E74FTqSfJqWGBmvk2m4sRv34WqM+BoH?= =?us-ascii?Q?lryhUc+ko3nNrk9HPwjwbiplTSUYo5Eh1xQ6++iYmgku7MU8YeWIASmH5z0d?= =?us-ascii?Q?MBYUmP9kgUe59wigwNkvk75nXXYHamfxOvYsIBMqqc3xBwfHYfpmXp41Gp4g?= =?us-ascii?Q?W2GIDhw1TIyEFDpB6Aw7+r/hwijYCAgPl3pZP2vGB3NQXpFWryf1r1gh2L6s?= =?us-ascii?Q?a/9cnhwPfac+yM/0EFaHmV4yynC7J4VboC05+pZijFw3+e/egikHRz2yv6/8?= =?us-ascii?Q?bi4Ton/MVp/yludtQalNvq80YB/tN6B7Q8e7N99vvvd50t0WzadX7SKIGbnb?= =?us-ascii?Q?b+pjrOxSvTvINtVixR1kZMkYrNUbaXSOiv3qR5S6stERS+l6XdNyRfhdVAO8?= =?us-ascii?Q?+7+rI7DOTon0TBVuIirZwGgpqMVc3if1QHWuuF1sxdTClwr9TyWsO0EvLuPB?= =?us-ascii?Q?WsONw5HBSCVHwb99428Ga47nlZhTp1MdE/CMf4Hn/tnV+zZlbNy7QlaVU25k?= =?us-ascii?Q?J7o9Wru390edSD7g7DU/2MonsK1Jc7aVKKfrUmC9DWWSB59OuxwZ300opXI0?= =?us-ascii?Q?8j92jdda9zsCAH4LK5+pXk6z6MGLli4R+6pz+MuSE/aeg7ow3u11W/KSBCxY?= =?us-ascii?Q?mAguWQT3m7Lrkf5MSmUrgV1HmgHS7TdWlABhyBN/YFetOwsXEOqIT0WEM/4D?= =?us-ascii?Q?pWwXKri1yMfBHL2PdZkGVYakpxkogv2MCzsdj5D/iKBDFKnWpMYKntvQlJPE?= =?us-ascii?Q?o7ncqrJmu5QMzMEV1ib/qn+E6ykKEsGMmuXkYq7F+AQd/IhAUNs2kjArwaK7?= =?us-ascii?Q?v+JoMpCsHPriLV6HsIjLi/nRU83BNRyE87f73n8ADz8lZid4/q/CbEj9G/rA?= =?us-ascii?Q?aQTdEgYLKoh5jkOzq3fvBLwJEYOlTymg9QlvMtmKQxNahjgLw9BXSBxMuAnK?= =?us-ascii?Q?R1IdwYcnUQRPGME7aHBRjFj8q0nBc1Bu8mNgfoyjBp3qm/d2WdJQA9c3sLR6?= =?us-ascii?Q?zkBGdKIyCKMpSB2r5Sf3NfEIJqHqCAYVSG+QH52zqQz31rxOj93GmLmY3cuQ?= =?us-ascii?Q?HjrrSRW51zW59k0xfsylTVZREwjlOgloVL288uoTMJ7ODSgxjecZ1d6vlzyS?= =?us-ascii?Q?jaFYJDTu7Wab0hi41RRFGLuI6SKs8W/oUDCZ86hV7rFZl94Omm3R3aTOJ6yT?= =?us-ascii?Q?VXRGt8K53OtPqDyshlrA3NMWPF8KUnhk6/boDDb08Jbo5AZlj5At9BamP9cy?= =?us-ascii?Q?tpEkIFpm968jciwinQQHaYA2aniaRGpx+86wsCXmtX8oNk8HUDwf5owIM683?= =?us-ascii?Q?VsOsnHMOo+VjUJhOqct9S5XaeLQ/cp04CqELSThdDl/kCAvMG3w9OtqGNOG2?= =?us-ascii?Q?nwbM1I5JSGKqYZiMDftdaCc=3D?= X-OriginatorOrg: ucl.ac.uk X-MS-Exchange-CrossTenant-Network-Message-Id: bbb7bf7a-0402-4292-d5d6-08d9f2db6f16 X-MS-Exchange-CrossTenant-AuthSource: DU2PR01MB8429.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2022 12:37:32.7818 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1faf88fe-a998-4c5b-93c9-210a11d9a5c2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6MoXmNWgHVKjStl2baT6y7MRG/63Ta3YXmB5S3+NtoZ5GP9YYpdowcDUQ+HgWM0sTkiCaxHQ5Xb6IBoDxVoU4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0101MB2335 Received-SPF: pass client-ip=40.107.21.131; envelope-from=e.fraga@ucl.ac.uk; helo=EUR05-VI1-obe.outbound.protection.outlook.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: , 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645188601; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kH+vgaLRSE9nU47dOIy6J1psH49iEuEmCyBzWFUZoQk=; b=fHFcLhLTI7TMEdDIS2ipWmbLPRPBJr5zRxoNyata2UETuh6vGkJJ6CCHnfDde/hN6vXPbE U16WOwcM1UZh9EiWIa5thgCvk7o2THCVc1y55AH5tJ0BqV+Atad0iwCbdfx0dzEwnRdHAp qT5dVzD0AjCKVLEcMEoNx0lEt0nxAu103Ba0GHNn+xt49ubJ9KAs3ceMLNaGmGFSMlUTvc OoclGxYT6suFSJJKrY38Od+Vl1kGYdhoBpht4+ed+QMoTZb0apwUdy+3eG91Y6ul/GfhXv Lz936zUupFR+wIQX1FxYEERvtCO14W1M9OeYPEaApiogiKKIscNVCBYyPhhzzw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1645188601; a=rsa-sha256; cv=pass; b=gbyVyqoFq40DwPZquZ5yGSqozVFwfoVF9HrOyliXSMUyEW4bRYGIg+VzTFhpC+e/11Bpri Rwt4Fo4w6oGWwBUXo/tRuDnvi9XghGDL6ButFT70gbs1G5X+A/i6sjgObjVnJwmeDkuAfG /aMU4MIcuqYAJwfiwxNVB+ZvIZL5HULVxizWx53rjixwwGgyWXfiuNeHFFC9xHhA8L1eXs 4412kAuXPi1JQ1HXkGwV/7g2YdxApF5eEQ2wREImLefDUpVTNiRrlxSsLTHQ3zRW01ys3U h/pgqVAZ78+4VY2Y+Pznu6dy/WCKx8nOzQrhSQdGmYc8+Gcu25X324VLool3og== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=ucl.ac.uk header.s=selector1 header.b=CBGLCQJ7; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=ucl.ac.uk; 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: -7.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ucl.ac.uk header.s=selector1 header.b=CBGLCQJ7; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=ucl.ac.uk; 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: 4143830AF0 X-Spam-Score: -7.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: S6W9I9qWzyG1 --=-=-= Content-Type: text/plain Hello, 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. 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. Thank you, eric -- : Eric S Fraga, with org release_9.5.2-385-g37d8bc in Emacs 29.0.50 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-ox-latex.el-give-tables-their-own-placement-def.patch >From 77d94298beb3a1b215e7602beba46b81e827b3a1 Mon Sep 17 00:00:00 2001 From: Eric S Fraga Date: Fri, 18 Feb 2022 12:23:01 +0000 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. --- etc/ORG-NEWS | 5 +++++ lisp/ox-latex.el | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 5a94e737e..506161937 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -100,6 +100,11 @@ argument. ** Miscellaneous +*** Tables now have separate default placement option for LaTeX export + +Tables and figures now have separate settings for the default +placement in LaTeX export. + *** Styles are customizable in ~biblatex~ citation processor It is now possible to add new styles or modify old ones in ~biblatex~ diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 5dda9b3ab..48efc7d98 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -120,6 +120,7 @@ (:latex-caption-above nil nil org-latex-caption-above) (:latex-classes nil nil org-latex-classes) (:latex-default-figure-position nil nil org-latex-default-figure-position) + (:latex-default-table-position nil nil org-latex-default-table-position) (:latex-default-table-environment nil nil org-latex-default-table-environment) (:latex-default-quote-environment nil nil org-latex-default-quote-environment) (:latex-default-table-mode nil nil org-latex-default-table-mode) @@ -753,6 +754,14 @@ environment." :package-version '(Org . "9.0") :safe #'stringp) +(defcustom org-latex-default-table-position "htbp" + "Default position for LaTeX tables." + :group 'org-export-latex + :type 'string + :version "26.1" + :package-version '(Org . "9.0") + :safe #'stringp) + (defcustom org-latex-inline-image-rules `(("file" . ,(rx "." (or "pdf" "jpeg" "jpg" "png" "ps" "eps" "tikz" "pgf" "svg") @@ -3274,7 +3283,7 @@ Return new environment, as a string." (t nil)))) (placement (or (plist-get attributes :placement) - (format "[%s]" (plist-get info :latex-default-figure-position)))) + (format "[%s]" (plist-get info :latex-default-table-position)))) (center? (if (plist-member attributes :center) (plist-get attributes :center) (plist-get info :latex-tables-centered))) -- 2.30.2 --=-=-=--