yihui/knitr — pull request #218 by jrnold (2012-04-30 03:57:34+00:00)
Title: Fix format_sci to work with restructured text

Right now inline code in render_rst uses format_sci(x, "html") which produces output that breaks restructured text. I edited format_sci to produce output for restructured text with a new option "rst".

For this to work properly, a line

```
.. include
```

needs to be included at the top the file. restructuredText doesn't have a begin document pattern, the line would just need to be included at the top of the document. The current approach defined in header.R does not seem to support this.