From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2O2vOWFygWd4fwAAe85BDQ:P1 (envelope-from ) for ; Fri, 10 Jan 2025 19:17:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2O2vOWFygWd4fwAAe85BDQ (envelope-from ) for ; Fri, 10 Jan 2025 20:17:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=berkeley.edu header.s=google header.b=UJU+0Mb0; 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"; dmarc=pass (policy=reject) header.from=berkeley.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736536673; 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=84rynC7X9ylE8048LT68/aUWU7dQL2KIRAtywgRpUsQ=; b=iHtOOWE0+4C7lmrqOwJsDv5oPzeEtWlhKrDLYXdT+FDpyV76cGZzg/nHCN8vvrhkAIEzu8 cen/CK+EV5qeT2qLhbjTPJuiV4d7m4EdQlVG0ElDJdLfQ1d4mm4e0pBZxYLe54E9DGA6LY 1kh+fkb9z3UdQ1/fXuAk0RyOHT1cQaDA+ZHwB+1Dr81/m2DDWLDHe0TOLCJpnui5WdZmIW x5p9g4o2vPGP+YMD02LX1G3elyM33xKY1Pw93FbrPrW1ktcK6p4BS+wpcomIgS1ntIybQg cgEWlXdlwYwO0pT23C8YcjB4edMXoxLQnxxmhLmWQJJ335gEB0bfCjhDRKXJcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=berkeley.edu header.s=google header.b=UJU+0Mb0; 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"; dmarc=pass (policy=reject) header.from=berkeley.edu ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736536673; a=rsa-sha256; cv=none; b=K9NGz6RSAlz1CtHLjfpuk+fM4CneISrlJGnYZM9fBtNODAMdjpIh+IgGPqBprozVnEVaXE XER/fn27uc+/5NppUrh9BSnPXmsolpB0LG+cnjd6amfF6WGMaetEuBPIX4Y0ZWfC/sLMvU 6Bg7rOW0YdyK/xFnaGluJPXaf6w/7MYMvOTYvCGwK7t/aoFedjV/RgI5GsysWYAzul4XQ2 Z9H759KZtyugbo3PHmYc22NsL5ggQVv9HUXRdCPd9c+8y3BjMqgQ4qOHoUXZE78fqLdnRl x+3oBowUgcApQwC7QdaGnl+sVgHUZmvoEIgkKn4CDCMlO8phhaFefv4IaV4DEw== 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 7A9AF58A44 for ; Fri, 10 Jan 2025 20:17:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tWKV3-0004Cc-UZ; Fri, 10 Jan 2025 14:16:53 -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 1tWKUs-0004BU-38 for emacs-orgmode@gnu.org; Fri, 10 Jan 2025 14:16:51 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWKUm-0005LX-9Q for emacs-orgmode@gnu.org; Fri, 10 Jan 2025 14:16:39 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2162c0f6a39so62008245ad.0 for ; Fri, 10 Jan 2025 11:16:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berkeley.edu; s=google; t=1736536594; x=1737141394; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=84rynC7X9ylE8048LT68/aUWU7dQL2KIRAtywgRpUsQ=; b=UJU+0Mb0wmW80eosn+ZNmtrIe6uFCG5xsColR210JBCDkmZ5JaMCUOIVo9LESqu6ag JQg+7wIv8iOQXVY2p4wGgYG6vVO9CD5iugtE2ekTuy1EzxzHEC+EciqNDqDJ9LZW4Fnd 19ciObmhSfgllP03mxBMOoIG78ofrdiYNB9WZKX7ozS6XM0xlPF9/AVdk6EiX11lvAGA cyxOwlGusTUNLKiEmZovq5TmuY0sS95DKbwlK1zzA+tld/SmbFebYswdfsZ/OCSPGAMj 6XVwUmqyJC7BXX1cn+Z3JQm5mZQJ4B0zaMlf40fk/7bkzR4mJeAvPjRQdo4rWSS1bkOu /9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736536594; x=1737141394; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=84rynC7X9ylE8048LT68/aUWU7dQL2KIRAtywgRpUsQ=; b=qLHoTm7DibXQMCFTaVu+/JS7kRnpIyv1mwOWpc27PKKdNIr+kECQRREg4EtOZlNUww DhCX+dcvspVnP1lJjaTw1+oMBARSAft7KH8tp+Jm2xZFrrRMPhupPARy5oOC6GaN9mim GRIvVZ5vMRhy5PtsH8+I5m31aMG2h3tUFVfQ9DvvIKMNxj3TPoWSwGHbRyx49nmbd9u1 wI8HXGGwpirfGitLH8xIm04ToNxtiX3bZ5D0o6SFuv72TumSh0fFimMyqm/HkCgbiSg1 D+sjEEKWEVa+2PJ0gQOEelm5NNcXNeZ7JyAJgEcXVBXD0C8+LtULMT3Hm/ub9wgFGeO3 5u5g== X-Gm-Message-State: AOJu0YxR3EtAhi6bC2bVgaIHJn3KZNdPv6tV2KE/4B9XnNHTUuTjOHqu 1AJYczG5hOYozssIBxKL/A0fZQENtz+JcOTMwTb+rEgkPrUN8N3OvvJvPlV7vgFjNc+uhPTryDk clw== X-Gm-Gg: ASbGncsNDUKo4b9/Pfm4XR7GwSgpByo5mm+sRfSMLDOSrm/AgH/T4aRZCXxkIJsdf5Y p5kexFYg86eM3fZu4s5guxDPmcmOc+7ktzMpHjw8G3I1p8KdP2v8xohOyBKO12rnwLM042He1WB TFg/aBiqRRFb6bn5prUyM3teg5OqogjKNf5JX8++JRYEOa+QKKDkBy7WYYgd9iH4Jf4FMFSaDHu egZFaOImtEtvKD00zNB0QarCqorZRfkvxuaLDodsWz7qt4jFrWDVvoKCA6bRFlapXsqON+3F7gt xrjskUUxyARARnuRV0ZdGzI0TuPBF3/2qiu9mQPcFqIkZJw= X-Google-Smtp-Source: AGHT+IHob0bL+s0+uhfuo8iUTCAzlrxfkqGBYXSJuAcw2T7SIRVsEds1ZVmSJ/flOAQIXSHG66B68w== X-Received: by 2002:a17:902:d4cc:b0:216:4676:dfb5 with SMTP id d9443c01a7336-21a8d6b4a45mr144239475ad.21.1736536593218; Fri, 10 Jan 2025 11:16:33 -0800 (PST) Received: from smtpclient.apple (157-131-199-171.fiber.dynamic.sonic.net. [157.131.199.171]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21a9f23496csm16694225ad.208.2025.01.10.11.16.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2025 11:16:32 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.4.3\)) Subject: Re: How to specify column alignment in LaTeX table output? From: Richard H Stanton In-Reply-To: <87r05acx6f.fsf@rensoliemans.nl> Date: Fri, 10 Jan 2025 11:16:21 -0800 Cc: emacs-orgmode@gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <87wmf4qoju.fsf@rensoliemans.nl> <9F2C7295-E505-47DA-BF76-078F0C28B9E6@berkeley.edu> <87wmf3vw3i.fsf@rensoliemans.nl> <87r05acx6f.fsf@rensoliemans.nl> To: Rens Oliemans X-Mailer: Apple Mail (2.3826.300.87.4.3) Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=rhstanton@berkeley.edu; helo=mail-pl1-x634.google.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.369, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 7A9AF58A44 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.66 X-Spam-Score: -2.66 X-TUID: bvpDzshrYvvv On Jan 10, 2025, at 10:59=E2=80=AFAM, Rens Oliemans = wrote: >=20 > Richard H Stanton writes: >=20 >> Here=E2=80=99s an example: >>=20 >> #+begin_src python :results output replace raw=20 >> print("a") >> #+end_src >>=20 >> Every time I run this code block, I get another line containing = =E2=80=9Ca=E2=80=9D. If I don't use the raw option, e.g., >>=20 >> #+begin_src python :results output >> print("a") >> #+end_src >>=20 >> the multiple-output problem goes away, but now it appears as=20 >>=20 >> #+RESULTS: >> : a >>=20 >> ... >>=20 >> But is there a =E2=80=9Cpreferred=E2=80=9D way to output arbitrary = text (e.g., LaTeX equations) from Python code blocks so that they = compile fine *and* don=E2=80=99t append? >=20 > Generally, I don't know. Perhaps someone else can enlighten us on this = part. >=20 > Since you are using \begin{equation} which is definitively = LaTeX-specific, you > can always use the "latex" header option, say >=20 > #+begin_src python :results output latex > print("a") > #+end_src >=20 > #+RESULTS: > #+begin_export latex > a > #+end_export >=20 > This is more or less what you had with your flushleft drawer, so I'm = not sure > whether this fixes anything or not. >=20 >> Thanks for this discussion. This is about where I get to every time I = think I want to use org mode to create LaTeX documents with embedded, = live calculations, and then after wrestling with the headers for a while = I tend to go back again to separate .py and .tex files controlled by GNU = Make... >=20 > I know how you feel! I'm currently writing my master's thesis, and had = written > the first part of it in Org. However, there were some stumbling = blocks, and > whenever deadlines loom I tend to choose the quickest option, which = was separate > .tex files in this case. This isn't too bad though, AUCTeX and RefTeX = are > fantastic, and I'm not really combinining LaTeX with the results of = code blocks. Yes, I mostly have Python files that generate the output under the = control of GNU Make, and then import the resulting tables/figures as = external files into my LaTeX document. And I agree, AUXTeX and reflex = are indeed excellent! A big reason I don=E2=80=99t use org-mode more: pesky coauthors who = refuse to use Emacs=E2=80=A6!=20 By the way, for writing up exam solutions and the like, PythonTeX is = another nice solution that allows you to embed Python code into your = LaTeX document. Just like using org-mode, if you change the numbers in = the question, the solution automatically regenerates without your = needing to manually cut and paste numbers from elsewhere. And you can = share it with, for example, TAs who don=E2=80=99t use Emacs. Though = it=E2=80=99s possible we=E2=80=99re getting a bit off-topic here=E2=80=A6