taldcroft / asciitable

Extensible ASCII table reader
http://cxc.harvard.edu/contrib/asciitable/
36 stars 9 forks source link

Support for \cutinhead in AASTex tables #31

Closed joshualande closed 11 years ago

joshualande commented 11 years ago

Hi Tom.

Have you though at all about supporting the \cutinhead and \sidehead commands for AASTex tables.

For documentation on the commands, see http://texdoc.net/texmf-dist/doc/latex/aastex/aasguide.pdf.

Right now, I have a kluge to add them after the fact, but I think other people might appreciate these commands being available inside of asciitable.

Best,

Joshua

taldcroft commented 11 years ago

@joshualande - I have not previously thought about that. If you think that would be useful you might try updating the Latex writer code to handle that and submitting a PR. @hamogu originally wrote the Latex reader.

hamogu commented 11 years ago

@joshualande - I did not look specifically into those two, but I spent quite some time thinking about \multicolumn, which is quite common in my normal LaTeX tables, where I use it for similar purposes as the \cutinhead in AATeX tables. However, I consciously decided not to implement that when I did the latex tables, because the structures asciitables uses (e.g. numpy record arrays) do not have a mechanism for cells that span entire columns. Thus, when used to read tables this information would be lost anyway and when writing tables is would do nothing more than paste the string \cutinhead{XXX} after a specific line. In my opinion this is better done as post-processing of the tables.

However, if you have a clever idea how to implement then I am looking forward to a PR.

joshualande commented 11 years ago

In my opinion this is better done as post-processing of the tables.

That is what I ended up doing. If I have to do this many more times, I will try to think of a better way to do it.

Thanks for your help!

Joshua