2

How can I get a DataFrame in a Julia Notebook to output to a pdf with nbconvert and control the formatting like with knitr::kable or pander tables in an R-markdown document?

Julia notebook:
the following code cell

using DataFrames
A = DataFrame(randn(10, 7))

the pdf from nbconvert shows 10Œ7 DataFrames.DataFrame followed by an un-formatted table. Although display(A) and print(A) show different outputs in the notebook, the pdf from nbconvert shows the same output as the code cell above does in the notebook.

With the Python Markdown Notebook Extension, the following markdown cells display the table in the notebook, but in the nbconvert generated pdf, the DataFrame turns into a one dimensional array.

Test1

{{A}}

Test2

|      |
|------|
|{{A}}|

How can I get output like kable or pander tables in a knitted R-markdown doc in a pdf from a Julia Notebook with nbconvert?

Also on Github.

4

1 回答 1

2

Github讨论中,nbconvert 无法读取 Markdown Notebook Extension html 输出。表格应该从代码单元输出,以便 nbconvert 可以将它们输出到 TeX -> pdf。

下一个关于哪些 Julia 函数可以做到最好的后续问题是关于StackOverflow

于 2016-07-14T00:30:21.207 回答