From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id V0o7I6wqwF7pegAA0tVLHw (envelope-from ) for ; Sat, 16 May 2020 18:02:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uI3XHqwqwF5SWwAAB5/wlQ (envelope-from ) for ; Sat, 16 May 2020 18:02:20 +0000 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 943F994050F for ; Sat, 16 May 2020 18:02:19 +0000 (UTC) Received: from localhost ([::1]:39456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja18c-0000bL-Jf for larch@yhetil.org; Sat, 16 May 2020 14:02:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja17x-0000av-Oo for emacs-orgmode@gnu.org; Sat, 16 May 2020 14:01:38 -0400 Received: from gateway36.websitewelcome.com ([50.116.124.69]:27843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja17w-000377-8k for emacs-orgmode@gnu.org; Sat, 16 May 2020 14:01:37 -0400 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 346A5401389C6 for ; Sat, 16 May 2020 12:19:34 -0500 (CDT) Received: from box2035.bluehost.com ([74.220.219.237]) by cmsmtp with SMTP id a16ej4zPe1s2xa16ejceaj; Sat, 16 May 2020 13:00:16 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsdye.online; s=default; h=Content-Type:MIME-Version:Message-ID:Date: In-reply-to:Subject:Cc:To:From:References:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EXnfDlqfnfjJUG5MU79qrEQBcXexp6BvrPk4Tmzxra8=; b=f91dzqPUQfKrrxmygx5Skv3ST nhdBZ4oR4bJm6W9S+6TYxu8IAh889T/h6C3pVmlsLgRYHULLzT4jDCvgELtdNZq5MqXzuyZQIU/+t dUONAQuietsBqj4SCPqJU4JDjdH79K1W3kqH59uWwTZyOTFYr/3IWZAo34zNolfQxwdxNHvvrYon8 n1B3A85X0HEuke644VsiHxPSFdMFXQfvle739pCAHl6g1Fu8TFfVFF0JzjjZoSTWfxshHtVbQ7WV+ kqR0+Rz9Hd0VDqqmeD7xMy5mo30prTb0NHAZV8pym3fR+SYPBEjWanXzpcjv6s7vHl/HZLfPEPvAh kTzcPEt2Q==; Received: from cpe-98-155-168-227.hawaii.res.rr.com ([98.155.168.227]:58796 helo=lekeleka.tsdye.online) by box2035.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1ja16d-000Xlw-LY; Sat, 16 May 2020 12:00:15 -0600 References: <87o8qoqtau.fsf@kyleam.com> User-agent: mu4e 1.2.0; emacs 26.3 From: "Thomas S. Dye" To: Kyle Meyer Subject: Re: [PATCH] Add margin option to float for figure in ox-latex.el In-reply-to: <87o8qoqtau.fsf@kyleam.com> Date: Sat, 16 May 2020 08:00:13 -1000 Message-ID: <87wo5b7ob6.fsf@tsdye.online> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box2035.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tsdye.online X-BWhitelist: no X-Source-IP: 98.155.168.227 X-Source-L: No X-Exim-ID: 1ja16d-000Xlw-LY X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-98-155-168-227.hawaii.res.rr.com (lekeleka.tsdye.online) [98.155.168.227]:58796 X-Source-Auth: tsd@tsdye.online X-Email-Count: 3 X-Source-Cap: dHNkeWVvbmw7dHNkeWVvbmw7Ym94MjAzNS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Received-SPF: pass client-ip=50.116.124.69; envelope-from=tsd@tsdye.online; helo=gateway36.websitewelcome.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/16 14:01:22 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org, Pablo Palazon , Louis Gostiaux , "Thomas S. Dye" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=tsdye.online header.s=default header.b=f91dzqPU; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.49 X-TUID: 6eSiTNknANxB Aloha Kyle, This patch produces a LaTeX environment, marginfigure, that isn't part of the standard. AFAIK, marginfigure is defined in the sidenotes package and separately in the tufte-latex class, neither of which Org mode loads by default. If the patch is applied, then one of these packages should be added to the list of default LaTeX packages so ox-latex doesn't export code it is unable to compile. My takeaway from the discussion surrounding ox-tufte-latex several years ago is that support for non-standard LaTeX constructs should not be part of Org mode core because they complicate maintenance unduly. I haven't used ox-tufte-latex since I last used paper handouts at a presentation several years ago, so I don't know if it still works. However, it really was cobbled together, a process that involved copying big chunks of Org mode code. I knew then this approach is sub-optimal, but never found the time to puzzle out how to turn it into advice that could sit on top of a possibly changing code base. Also, FYI, I found the tufte-latex class a bit difficult to use. Objects in the margin can easily overwrite one another and the author has to fix these manually, which can be tricky. The upside is that when everything is right, the output can be terrific to look at. All the best, Tom Kyle Meyer writes: > Pablo Palazon writes: > >> I've created a path to add a new option to float properties for >> figures on >> latex. This is my first change for org-mode, and I don't really >> sure if >> this is the correct way to do it. > > Thank you! > >> * lisp/ox-latex.el (org-latex--inline-image): Include margin >> option >> to create marginfigure environment for figures. It's useful for >> tufte >> latex class, where with this environment shows the figure in >> the margin. > > I wondered if something like this had been proposed or discussed > before. > Searching the list, I see a patch [0] very similar to yours from > a > couple of months back that didn't get a response (author added > to cc). > > Further back, there is a thread about an exporter Thomas Dye > (+cc) wrote > to handle marginfigure and some other Tufte-y things [1]. It > looks like > the code is available at > , > though I'm not sure if it still works with the current Org. > > As for the proposed patch, while I think the specific code > change itself > looks fine, skimming through the above thread makes me think > that adding > marginfigure to ox-latex.el without considering similar cases > may not be > the right approach. What do others think? > > > [0]: > https://yhetil.org/orgmode/35aac187-b751-5723-0f15-be6605fb8ea2@free.fr/ > [1]: https://yhetil.org/orgmode/m2h9hsgdo2.fsf@tsdye.com/ -- Thomas S. Dye https://tsdye.online/tsdye