From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SCDHKhro42CslwAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 07:20:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4L9mJhro42AdTwAAbx9fmQ (envelope-from ) for ; Tue, 06 Jul 2021 05:20:26 +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 E4FE61AC8A for ; Tue, 6 Jul 2021 07:20:25 +0200 (CEST) Received: from localhost ([::1]:42030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0dVP-0005Cm-TC for larch@yhetil.org; Tue, 06 Jul 2021 01:20:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0dUm-0005CZ-Su for emacs-orgmode@gnu.org; Tue, 06 Jul 2021 01:19:45 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:39495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0dUl-0001p3-9e for emacs-orgmode@gnu.org; Tue, 06 Jul 2021 01:19:44 -0400 Received: by mail-pf1-x42b.google.com with SMTP id b12so17337317pfv.6 for ; Mon, 05 Jul 2021 22:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=pHyZT5Tfz1IFgvpf7/g/G7ZvCxVMedv3dH1C1ehxYhk=; b=uwReyQOKUiWY2LpMD5XXQaXBPPBAcqEd9KXAxAPry2xQfLAX3qURGQvKgUiZ65Vrlt lUfU7u/OFelxv8VtLQb95KxJBMUuK3K1dSDgtGPo+ec+TtaULvYhLvW6LSQm753cZZrn ovFqE0uOp88Y/cgt5+wZmnH2OCwJK/ehMWPZ/tUDeCklDwZ9gTZX1mWnVVb0w9G5ANky JqOcCULp7QDQEL3OG454MhVqIyQRlhcigbTSOxPXnTVMvHoMjRy1SEGECEEZpQ5lP35z NEzwDfoWd0qZN/gkIVzYBrbzuOlQKzDAKX/SAnJta+UmKtE2IFCmqgMlx3Gl7moJmh4U TAnA== 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:cc:subject:date :in-reply-to:message-id:mime-version; bh=pHyZT5Tfz1IFgvpf7/g/G7ZvCxVMedv3dH1C1ehxYhk=; b=GgcH+otS5qSfz0iKAPQp0OHNN6LArfc5kiiFPTaEWpuRxsKrk29xh1oXjBGa4ytU9Y 7Ck7XWlPs/B12yEaw0T3A6xraubkNq8+n7XNyxk/p1F8hVr8qj2Hihmsns6KPsZh8nq+ sguQA1GoRs+c9GuJehBHQ8JFJ4FD+lHUfLvF5pifcO4aG0Ml8kpDVqkpO5ykeVzceefB Ca4rkfEZzokIm7b2HP5YTH1SmI2a8CAtMvEzXBfuZyMoRqtKjPBraU8CeZVr2GMbB5dA 9IgJj95LcJo8KW4LejNXUBA0FlopB328XBd/8ah7i+Fw3HXpyrFRajR4/FwQKW2Vm30t lQiA== X-Gm-Message-State: AOAM530qEQNlgS6ghNsitky6ZVmPd27iJeeozhqpK7NU/ONHwVRYvpQU 4i9rPNXLFLoar+YuQoUSPnXyoKSJrfY= X-Google-Smtp-Source: ABdhPJw9VNGUW7ZF2VmIhGEbAMPjobURgRrOF66vLenaVlU6kWzTjwpgf69hojD8NLQjlyJQgDVkcw== X-Received: by 2002:a65:64c4:: with SMTP id t4mr19249764pgv.222.1625548781403; Mon, 05 Jul 2021 22:19:41 -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 s8sm9361357pfd.82.2021.07.05.22.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 22:19:41 -0700 (PDT) References: <87r1gcbdnb.fsf@gmail.com> User-agent: mu4e 1.5.13; emacs 28.0.50 From: Tim Cross To: Matt Price Subject: Re: convert subtree or nested list to table Date: Tue, 06 Jul 2021 15:10:16 +1000 In-reply-to: Message-ID: <87k0m4m32u.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42b.google.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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode 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=1625548826; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pHyZT5Tfz1IFgvpf7/g/G7ZvCxVMedv3dH1C1ehxYhk=; b=lUueexJSpuj0lWfmEsSZ+oFgm6udkrcF2g4CcAm0vdt4MwvPH2Oa3Ch0eaaMit+3xK79pA hyLNy7VpCQU2gasAHFHPq0Z2BJQ5lDi3uby1QnhmzEd/Pj90GjbI1L1GDkTXXIBuh4yOcS A0WoYD5LzjvJSZbgTMbQqbEUCVsA9r/PyCdoDJ9Dq3MOYpJpOvsKO/6fzMuq4O3MgtVVxL MWppEETpNy05kEQpxxXsLcRGbW2g74xxDalPwXBNcm/R8isTNPDfLPTnxl+x82VLzSEZhP eGd9CgtRyCbXueMJ7/EflJDc0atsq12w+gDU0Fhr+2qE6/XckeJNC5lyjFlh4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625548826; a=rsa-sha256; cv=none; b=UN9dKQQwRYoVmtbB5FCDnmAzO1G78kg6a9nt6MrAi0RdTZMc0EElzWouZVqsDbOiJBPxyt g9cLbjlEh2YAAUqo6qv8sBlitXt2f6lpjC77sgTKNBsytyiWUv9JflzUV1RvbGW8oPtCkP mtD7TB99IiyAUGBCGH9wmEDkxEtvCY9YAGaEsb6S5xdtfLTPapK0YTv7HE+AfBuq8cUHd+ NZy9L80DpliL6gLkEJk1r9pgofAAE07TQoLZSv08fiu+0F9/GkOCinFiI8oprd0nEFHOyb 9got/XOEoqy+SN9JFWznmQMzKlIBfutci6JK98mJAJ0HNWWWkRZX2mOUn0AsTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=uwReyQOK; 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=uwReyQOK; 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: E4FE61AC8A X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: djHHOoKOYSni Nearly every day, I'm filled with joy because I no longer have to battle brain dead LMS! If your forced to use HTML tables, that is a pain - it will be like stepping back to the turn of the century when we used tables as the basic layout structure. It may be worthwhile verifying what/which styling the system strips. I battled with one system which stripped in-line 'style' attributes, but it did allow CSS blocks in the header. It probably isn't too hard to write a function which will generate your subtree as a table. One advantage working with HTML has over latex is that you don't have to worry about lines and line breaks and can have really long cell lines which will get wrapped in HTML rendering. The complexity of your function will probably depend on how deeply your tree goes and how much data is in each node. Matt Price writes: > Thanks for the thoughts, Tim. > > My preference is generally to work in HTML, and in fact if I had a decent platform to work on I could just use a container class and grid or flex > layouts, but the learning management system at my institution strips out most styling information when HTML is uploaded, so I will probably need a > real table. > > I odn't think I could really handle doing this in latex. I am a terrible latex user! > > On Mon, Jul 5, 2021 at 9:27 PM Tim Cross wrote: > > 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 -- Tim Cross