khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

latex table layout ends up looking bad, suggest using ordinary l,c,r column kinds #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the table output for LaTex uses fixed width columns via things like:

>{\PBS\raggedright\hspace{0pt}}p{0.14\columnwidth}

The problem is, this ends up looking terrible when the number of columns
starts to get near to the width of the page. There is far too much space
between columns and (for reasons I do not understand) table entries for the
same row end up on multiple lines. Here's a crude rendering into ASCII of
the latex pdf output:

Col1 Col2     Col3     Col4    Col5   Col6   Col7
                                                   Col8
--------------------------------------------------------
5                      1234567 ABC    DEF    17:07
     01/11/08 30/03/09                             18:37

To make it look ok I'm using the following change to the LaTex module, to
just use the ordinary latex tabular 'l', 'r', 'c' column types.

  let colDescriptors = concatMap (\align -> case align of
                                       AlignLeft    -> "l"
                                       AlignRight   -> "r"
                                       AlignCenter  -> "c"
                                       AlignDefault -> "r")
                                aligns

My suggestion is that for Pandoc's "simple tables" (ie not the multi-line
ones), pandoc should not try to compute column widths and just let LaTex do
the right thing. I appreciate that for multi-line tables, one does have to
use p{} and specify a width.

Original issue reported on code.google.com by duncan.c...@googlemail.com on 12 Nov 2009 at 5:55

GoogleCodeExporter commented 9 years ago
I agree, this would be better.  Pandoc tables include information about column
widths, so the proposed solution is to have the simple table parser in the 
markdown
reader set all column widths to 0, and treat 0 in the writer as "use the 
default."

Original comment by fiddloso...@gmail.com on 15 Nov 2009 at 9:32

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1631.

Original comment by fiddloso...@gmail.com on 28 Nov 2009 at 3:22

GoogleCodeExporter commented 9 years ago
This change has been made in r1631.

Original comment by fiddloso...@gmail.com on 28 Nov 2009 at 3:32