-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ascii to print table for correct rendering in all formats #1
Conversation
Thanks! It is painful that we have to lose one of GitHub and LaTeX. we can probably just use the mpg cyl disp hp drat 21.00 6.00 160.00 110.00 3.90 this is +-------+------+--------+--------+------+ |
I just realized that it does not have to be that way. Actually One issue with using shell scripts is that it does not handle the dependencies smartly, as a result of which it ends up doing a lot of repetitive work. I would recommend a The 'html' vs 'latex' issue means that you need to generate two sets of *.md files, one for 'latex'/'epub' formats and the other for 'github'/'html'. I have scrapped up a I have scrapped up a |
absolutely, a |
Haven't quite figured out how this should work. I can set xtable.type to html when i want github output just fine, but what's the strategy when I want pdf output? It seems like I need to first generate a markdown file for pandoc to chew on, which means I want html output for that too? |
You have to re-compile the whole document for different types of output. To save time, I set the |
Sorry I didn't explain my question well. I'm using a custom version of your knit file, along with a makefile. I'm curious about where and when to set the option You have the type hardwired in as I'm getting incorrectly formatted tables out doing this at the moment, not On Wed, Mar 28, 2012 at 4:13 PM, Yihui Xie <
Carl Boettiger |
You will need to compile your It is easy to put all this in a |
I don't see the use case for xtable.type="latex" when the knit source file On Wed, Mar 28, 2012 at 4:38 PM, Ramnath Vaidyanathan <
Carl Boettiger |
When asked to generate |
I guess I see where is the confusion now. The fact is I have not set |
Thanks ramnathv, I hadn't realized that pandoc was okay with latex in the markdown. I had tried it before, but it was failing with the tables that I had -- it seems pandoc can't handle the latex tables that have math in the columns, such as xtable produces for the summary of a linear model. See this example (knit-source). |
Carl, it is not the math that is confusing |
Unfortunately that means manually correcting the output of summary/xtable,
|
Use ascii to print table for correct rendering in all formats
Using the
html
format does not lead to correct rendering of tables. Pandoc recognizes multiple table formats, of which therest
format is already included inascii
. I have modified these lines so that they are correctly rendered in the pdf format.