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 cKnOJmJed2IR1QAAbAwnHQ (envelope-from ) for ; Sun, 08 May 2022 08:08:34 +0200 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 4BPWJmJed2JPzgAAauVa8A (envelope-from ) for ; Sun, 08 May 2022 08:08:34 +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 D8FB240EA for ; Sun, 8 May 2022 08:08:33 +0200 (CEST) Received: from localhost ([::1]:49060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nna5o-0004uk-3L for larch@yhetil.org; Sun, 08 May 2022 02:08:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nna3m-0004q6-4R for emacs-orgmode@gnu.org; Sun, 08 May 2022 02:06:31 -0400 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:33082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nna3k-0005AH-1b for emacs-orgmode@gnu.org; Sun, 08 May 2022 02:06:25 -0400 Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id 878E81004847F for ; Sun, 8 May 2022 06:06:22 +0000 (UTC) Received: from box2035.bluehost.com ([74.220.219.237]) by cmsmtp with ESMTP id na3inz6Gxkku4na3inELnt; Sun, 08 May 2022 06:06:22 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=ANANYO9+ c=1 sm=1 tr=0 ts=62775dde a=VozZY++RX3oc2UgfNhVfaA==:117 a=VozZY++RX3oc2UgfNhVfaA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=MKtGQD3n3ToA:10:nop_fastflux_from_domain_1 a=1oJP67jkp3AA:10:nop_fastflux_mid_domain_1 a=oZkIemNP1mAA:10:nop_rcvd_month_year a=DPR-AOO6AYYA:10:endurance_base64_authed_username_1 a=A2tt7buDTgEA:10:from_fastflux_domain1 a=ZZnuYtJkoWoA:10:nop_header_rescan a=pGLkceISAAAA:8 a=o9zw6IYYAAAA:8 a=uq6GhxRSH9_edFbP9JQA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=-FEs8UIgK8oA:10:nop_fastflux_domain_1 a=NWVoK91CQyQA:10:nop_rescan a=BtxB1_lq3pBo68oZtZ_9:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsdye.online; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:In-reply-to:Subject:Cc:To:From:References:Sender :Reply-To: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=exIt3G9VcFvOqiz1kCOCZ5KLFpzi96B2EmjyxVpR7js=; b=qEdcqzaI+sWSYO6iG9M7IM9rcl Jsg6D9V5/Uft8Mn+UFOTajGdeH8htvXZKC9csOHAJOEu4ou08jLVFuWSPrDEej1dIP2A4C0C0r1W9 Y+XfigH62Cs8udp4N7wYVn+8f9P8B+GV/kQz6BqF43bkCFY4GegWL/8dCTacE20H0ANb2bDUP03Fg oujp/ODUgKHzkP5nBSTmrI3DCa6Xq94Nwspdg3x+9kNgTDGO+zF3gKlh7FBrIFHjRBYhFCUkjFY+T 1mxoyzGfPvpJ5XkadxH5ZOFuWYr0WA4pZbkfTmaFXbSOfLawiMZ/IJDwptxTfuDapv0mrT1M9vX03 QQG50lRQ==; Received: from cpe-50-113-33-148.hawaii.res.rr.com ([50.113.33.148]:45626 helo=poto-foou.tsdye.online) by box2035.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nna3h-0042BD-Ss; Sun, 08 May 2022 00:06:22 -0600 References: <871qx4c3ii.fsf@tsdye.online> <874k20dfwh.fsf@posteo.net> User-agent: mu4e 1.4.15; emacs 27.1 From: "Thomas S. Dye" To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Export LaTeX command inside figure environment In-reply-to: Date: Sat, 07 May 2022 20:06:20 -1000 Message-ID: <87v8uga78j.fsf@tsdye.online> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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: 50.113.33.148 X-Source-L: No X-Exim-ID: 1nna3h-0042BD-Ss X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-50-113-33-148.hawaii.res.rr.com (poto-foou.tsdye.online) [50.113.33.148]:45626 X-Source-Auth: tsd@tsdye.online X-Email-Count: 2 X-Source-Cap: dHNkeWVvbmw7dHNkeWVvbmw7Ym94MjAzNS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Received-SPF: pass client-ip=69.89.23.142; envelope-from=tsd@tsdye.online; helo=gproxy4-pub.mail.unifiedlayer.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.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, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.997, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651990114; 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=exIt3G9VcFvOqiz1kCOCZ5KLFpzi96B2EmjyxVpR7js=; b=prdRLnmo0bmyxGs3fBhdbT8Vi6EsTgXYpYKjmrOm58DY0S64hL0kQpEsr8EfJN7mmW8Cor xcFDXxJsU+KjcPHnAyMqwIDau4Z3ARuYvRSLyXEnl9hqTnITIic7Go1XSGZtyhuH3oF2FX xVjIzyP/hV/oRpj2nUa5HOmxyHzvOJJomiqeQqOEuObpi0lJQ7NYiKERVpGN1r0UW4ETiP /ucBXHO0hwYBrnN0ziLjY04sMkEIu0aUhotIFQzPKf73Eh9L2r5/BPfZpMdzduJxFTeheR ZXW9RB0x5kOq1ouJLGhrMn7PdnGj+adrmxgi1oMWT0Rcm5l/TCK+5oIv0AcVFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651990114; a=rsa-sha256; cv=none; b=TiIwt9EBAR3bI/2dQKn8khfV0SS3HfpwvMpGlcN2yJcLzBKbNY3FH/8YM9hOLAjU6PSV0e ebFG59UFNX5hFT2c4M+ak0/ZI66F/lMQOLY01R7I9XPPVTFvB5x0Xmn8QrVd7U4Hmb4Fuq tLBk//3IwSD3ncZAtMxMg+zgfqouzUz9VhUvFVIPOBPUsJf6k2n+cvG3UaDb6ImIfIJYwE 6pXQOFJ8aEwPDhDBa5uRQsUgz0THjOzyxux+2WfJfRScFnUjIMxuvViZSMxQCXECNHwF7c G9vpnyPVaN1nTyr9tkMUqHmPf3xDb8XkjVoO5cIwlSIqPLvx/lx6/EanB9DUOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tsdye.online header.s=default header.b=qEdcqzaI; dmarc=none; 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: 1.20 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tsdye.online header.s=default header.b=qEdcqzaI; dmarc=none; 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: D8FB240EA X-Spam-Score: 1.20 X-Migadu-Scanner: scn1.migadu.com X-TUID: JUwavBWQ4rCT Aloha Max, Max Nikulin writes: > On 08/05/2022 07:30, Juan Manuel Mac=C3=ADas wrote: >> Thomas S. Dye writes: >>=20 >>> Is there a way to add an arbitrary LaTeX command between >>> \begin{figure} ... \end{figure} during LaTeX export? I want=20 >>> to end up >>> with the following snippet, but can't figure out how to slip=20 >>> in >>> \setfloatalignment{b}. \begin{figure}[htb] >>> \centering >>> \includegraphics[width=3D.9\linewidth]{hilbertcurves.pdf} >>> \caption[Hilbert curves]{\label{fig:orgparagraph1} Hilbert=20 >>> curves of >>> various degrees \emph{n}.} >>> \setfloatalignment{b} >>> \end{figure} >> I think the :caption attribute could do the trick (of course=20 >> everything >> must be on one line): >> #+ATTR_LaTeX: :caption \caption[Hilbert >> curves]{\label{fig:orgparagraph1} Hilbert curves of various=20 >> degrees >> \emph{n}.}\setfloatalignment{b} > > Would it work if \setfloatalignment{b} is added before=20 > \includegraphics? From > my point of view, it is still a hack due to abusing the=20 > :placement attribute, > but it is backend agnostic, so reuses caption for HTML and=20 > relieves requirement > of single long line: > > #+caption[Hilbert curves]: Hilbert curves of various degrees=20 > \(n\) > #+name: orgparagraph1 > #+attr_latex: :placement [b]\setfloatalignment{b} > [[file:hilbertcurves.pdf]] > > # Local Variables: > # org-latex-prefer-user-labels: t > # End: > > P.S. Math and absence of period are intentional. I never used=20 > tufte, so unsure > if something besides b is meaningful with \setfloatalignment{b}.=20 > I dropped "ht" > to make inconsistency apparent and expecting that when figures=20 > are moved to the > end of document, "ht" should be used instead with removing of > \setfloatalignment. Yes, this works, too. It is a convenient hack. Thanks! It would be better to have a LaTeX attribute, say :commands, that=20 places commands within \begin{figure} ... \end{figure}. I'm circling back to Tufte handouts for a course I'm offering in=20 the Fall. It is great that ox-latex has the flexibility to export=20 to tufte-latex now. I haven't prepared any handouts yet, but all=20 the pieces seem to work in a straightforward way. Org-cite is=20 performing like a champ, too! All the best, Tom --=20 Thomas S. Dye https://tsdye.online/tsdye