SimonGoring / neotoma_paper

Repository for the neotoma package paper.
MIT License
3 stars 2 forks source link

Getting code block to be nicely formatted in html and docx? #20

Closed andydawson closed 9 years ago

andydawson commented 10 years ago

Is there an automated way to get the code blocks in the html file to be formatted nicely as they are in R? Code formatting (spacing mostly) looks messy in html and docx files.

gavinsimpson commented 10 years ago

I'm surprised HTML doesn't work; it should be rendered in <pre> or <code> chunks with opportunities to style these via CSS. As for docx, I think we're at the liberty of the template that Pandoc uses when converting from .md to .docx. When I last saw a rendered version of the paper in .docx format it seemed that an sans serif variable space was being used instead of a monospace one.

In knitr there is an option to stop it tidying your R code if the problems were with the code we'd included in the paper rather than the output?

Whether we need to worry about this or not will depend on whether the journal requires the manuscript to be submitted as a Word file? If they don't I think we can ignore that aspect.

I'll find a few minutes today to render the paper to HTML and see if I can see what is going wrong there.

karthik commented 10 years ago

Hey @andydawson Take a look at the PDF and Word doc in this branch. Hopefully this fixes code block problems in both versions. I also tidied up other blocks (e.g. suppressing startup messages, removing row numbers from printing etc).

karthik commented 10 years ago

PS: Close this issue if you think it's resolved.

SimonGoring commented 9 years ago

I'm closing this issue. I think things look okay now. @andydawson is free to re-open, but only until the paper is re-submitted. :)

gavinsimpson commented 9 years ago

Also, do we care? We can render a PDF which looks much nicer and the journal will (or can be asked to) render the code blocks in a monospace font when we get whatever passes for proofs at Open Quaternary.