ox-ipynb icon indicating copy to clipboard operation
ox-ipynb copied to clipboard

rendering of table with vertical lines

Open uliw opened this issue 5 years ago • 2 comments

Hi John,

the following table


| 100-999 | 10-99 | 0-9 | Name        |
|---------+-------+-----+-------------|
|       / |     < |   < | <           |
|         |       |   . | .           |
|---------+-------+-----+-------------|
|         |       |   . | .           |
|---------+-------+-----+-------------|
|         |       |   8 | eight       |

renders ok in pdf format, but the export to notebook format creates spurious rows and columns for the vertical and horizontal separators. Assuming that there is no easy translation, could they simply be ignored for notebook export?

Cheers

Uli

uliw avatar Jan 26 '20 20:01 uliw

See if this recent push helps. It looks like maybe markdown tables can only have one rule in them.

jkitchin avatar Jan 26 '20 21:01 jkitchin

Hi John,

no luck with the recent push. However, I learned that this table had a couple of issues.

  1. export to ipynb will fail if a table has empty cells/rows
  2. otherwise the vertical markers are simply ignored upon output. However, since they are ignored, we can simply declare them for latex output only as
#+attr_latex: :align c|c|c|c

Horizontal separators in addition to the headline will fail however. A simple way around this is to use the xcolor package for latex. The only hiccup is that xcolor is impliciltly loaded by some of the default scimax packages. So the table option needs to be part of the latex class options

#+LATEX_CLASS_OPTIONS: [table]

and then add somewhere in the text.

@@latex:\rowcolors{1}{blue!15}{white}@@
```

Cheers

Uli
On Sun, Jan 26, 2020 at 4:06 PM John Kitchin <[email protected]>
wrote:

> See if this recent push helps. It looks like maybe markdown tables can
> only have one rule in them.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/jkitchin/ox-ipynb/issues/23?email_source=notifications&email_token=ABWSVAQMHHAJFALNJ6Q6OYDQ7X3O5A5CNFSM4KLZCCXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ554OI#issuecomment-578543161>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABWSVAXLS3VBEIA5HLBQ6UTQ7X3O5ANCNFSM4KLZCCXA>
> .
>


-- 
Ulrich G. Wortmann
*http://www.es.utoronto.ca/people/faculty/wortmann-ulrich/
<http://webcan.es.utoronto.ca/people/faculty/wortmann-ulrich/>*
Dept. of Earth Sciences     Fax  : 416 978 3938
University of Toronto       Phone: 416 978 7084
22 Russell Street, Toronto, ON, Canada M5S 3B1

uliw avatar Jan 28 '20 18:01 uliw