From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CFceKFyx42DtSAAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 03:26:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4KTZI1yx42BVHgAAB5/wlQ (envelope-from ) for ; Tue, 06 Jul 2021 01:26:52 +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 1AFF521F8C for ; Tue, 6 Jul 2021 03:26:52 +0200 (CEST) Received: from localhost ([::1]:50918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0ZrP-0003y3-2D for larch@yhetil.org; Mon, 05 Jul 2021 21:26:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0Zqk-0003wK-Ek for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 21:26:11 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:46655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0Zqh-0006la-Mz for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 21:26:09 -0400 Received: by mail-pl1-x62f.google.com with SMTP id c15so11107610pls.13 for ; Mon, 05 Jul 2021 18:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:message-id:in-reply-to :mime-version; bh=DBL9boqDzakVe3ajoPERIeBobpWVvHQaaZGLuwDRkt0=; b=mYyKSh9PW5+yNDDGNU2oiUz5DV3+FN2/HDtf2Kw8iVJowAIPvWcF8qUICKFwzu3ZbO 39BJwt2sUB43raz7WHTBEpbyBH2GQksZfu1A0jk2LDOmUblVi3sMEwPCi3N53mK+qRx5 l/hdS8cHT8JwDIEhMglWReL+39ERyqRSKf4Vbv5YyCxDtJAfJo/tI8bCcS3F2Lk9G0Vm xKYI5O84On7vvjEAr36zEkjV5gKT3L7h4p9GTIcnCzMKA+6KTigg3IIbgRhWQu3M+1gq sNqM/luq3bVTmbup+oyQTQZZ1Zr7TYGeDDzA6ibdiq25QaJmh1LqSfanxggsfazqB9qV VQZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :message-id:in-reply-to:mime-version; bh=DBL9boqDzakVe3ajoPERIeBobpWVvHQaaZGLuwDRkt0=; b=qPFphR2JUh1RC/51DOeQXdQHto1pH6SDkfVsGSGgOxp3idH8nh3v3xtj/pObFVVEm3 JTovNROt0pG62Wa5jygLevMstpKdGAg4yDM0winyvDAFx+NEWB7ZMIiHj0d/7Kn1OemB S6aGUBCwhTdJ0PCnFfXCNBkGMeWi7z9/Ciaph3Y2Dp9gAis0VybLxq1ysVNnYWw0IW9t Nn3pFO5x1IR60xbGaABTOAL7HZJgtL+/tM12RAh1ViTbvQhu2b7WZPPHyzYu48vh2aWL eifGVa4V28khiD/hH94ZgTg1gQXjus8Z3CWUgB4ko32maOr+PpmoADQbpRjpKKRC6Uiq dOQA== X-Gm-Message-State: AOAM532++v/MnnI4JbsA9S2kWZUVVMV7qjjgE7lYMhjbcyYmkPVv2y4r eJTvXXORc5bVV6sXIeL0hSKfezhs6g4= X-Google-Smtp-Source: ABdhPJwrOu4KqXL0yYeCmCSq9vz0W/oAz18rZxbmzmQe515U8Ic9ZEBRbjC0Fks0lEOvc2E2qDeeDg== X-Received: by 2002:a17:902:bd03:b029:11c:d504:c1ce with SMTP id p3-20020a170902bd03b029011cd504c1cemr14669603pls.7.1625534765608; Mon, 05 Jul 2021 18:26:05 -0700 (PDT) Received: from tim-desktop (220-235-1-69.dyn.iinet.net.au. [220.235.1.69]) by smtp.gmail.com with ESMTPSA id p20sm16418418pgi.94.2021.07.05.18.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 18:26:05 -0700 (PDT) References: User-agent: mu4e 1.5.13; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: convert subtree or nested list to table Date: Tue, 06 Jul 2021 08:10:02 +1000 Message-ID: <87r1gcbdnb.fsf@gmail.com> In-reply-to: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625534812; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DBL9boqDzakVe3ajoPERIeBobpWVvHQaaZGLuwDRkt0=; b=ICaXQHDMSvOUSTKOkfbOyZ6rR8n73Xv/XqERsGfbn4FAWtjJa4TWANEjex0M2p5F9o8Ha1 /pKgoQjTGJOLyL7Mq+2wrbCCxBxkPcTVHoFXVIvB2p8+QQGx9/GliwTh2kHv1MNFS28HfL CeM7kfwasmFGBfzuAybr2pe2OeGLa60ZbTOphGt0vSG8Pkch8GkFcWIgOuoo/TbJYh2T1U So3sVpewW7cMa70EnX81bSzb8xhbiSAkjRoBk3hZgTtn9N9t8ssQvAq62+UmgJ5DWuT5lH 56tHT1vhoOcYBMeEqOkiDB0wznG63sPVlbp04h+yYZMbz2hb2fN8Z1MqkefGOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625534812; a=rsa-sha256; cv=none; b=HrtOo98nrUFWwA17SVcT8LjHvQeyn8D7aLtwNxQXU39Rxdryc/7OilXN/+Mtjb5qONnVj3 QWFIa+eMWhXzQS6ygHcXeexOUCNtZT8vdErR0vVhZBMSCoHxFuW+YdfkZYCMMEo1B1WGWM lij38rQWpMwO+CzHSj+2RsA+Wzb+XzSX6jh+D1U2LmCq7+Szicr5q5s1pBN0+Glprzn0Nk hWWgsYSmY0V4Vs4AG8oqC2eydl9CC5YizpuYFDLSexPpuzTl4fK9NlP9ofybQldcoOc3UH UTb2Ha7iVsmNYgyUN1lWVdNjPGecXhUENlWALWqU9ObifRcG5IL7wc/L2zNHlw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=mYyKSh9P; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=mYyKSh9P; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: 1AFF521F8C X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: EswcA9VdBg3k Matt Price writes: > I have to write a number of text-heavy documents which need to be delivered as tables with wrapped paragraphs in most cells. Working directly in > table format is pretty arduous and uncomfortable. Has anyone ever written a function to accept a list or subtree as input and process it into a table? > > If anyone has done something similar, I'd love some tips! No, have not done that. What formats do you need to export the documents in? I ask because if all you need to produce is Latex derived documents (i.e. PDF, ps etc) and you do plan to write a function yourself to do this, I would work backwards. Latex tables are not very good for your use case, but Latex can support what you want to do. Most of the Latex table packages are not terribly good at formatting tables containing paragraphs of data. They will typically require lots of hand tweaking to get the formatting looking right. Getting the right latex package to support what you need to do will make the function you will need to write a lot easier. Therefore, I would start with a search of the latex package archives to find the right package and then write an elisp function that generates a latex block which formats your subtree using that package. You probably want something which will format a table with minipage or similar environments in the cells. -- Tim Cross