Skip to content

tidy=T gives extra blank lines in Sweaved file #31

@aecay

Description

@aecay

With the option tidy=T, each Sinput environment gets a spurious blank line. This can be seen with the following example file:

\documentclass{article}
\begin{document}
\SweaveOpts{highlight=FALSE}
\begin{Scode}{print=TRUE,cache=TRUE,tidy=TRUE}
1+1
\end{Scode}
\end{document}

which gives this output after R CMD pgfsweave test.Rtex (excerpted from the long .tex file generated):

\begin{Schunk}
\begin{Sinput}
> 1 + 1

\end{Sinput}
\end{Schunk}

The blank line should not be present, and leads to extra blank space in the pdf document. I think this is due to line 484 in R/pgfSweaveDriver.R, where a blank line is emitted if options$highlight or $tidy is true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions