[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert subtree or nested list to table

From: Tim Cross
Subject: Re: convert subtree or nested list to table
Date: Tue, 06 Jul 2021 15:10:16 +1000
User-agent: mu4e 1.5.13; emacs 28.0.50

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 <moptop99@gmail.com> 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 <theophilusx@gmail.com> wrote:
>  Matt Price <moptop99@gmail.com> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]