Skip to content

Spellchecking Sweave documents

2 messages · Michael Hoffman, Duncan Murdoch

#
I have been using Aspell on a Linux system, but it doesn't
understand the noweb chunks, which I'd rather it not spellcheck. I
can run it on the generated .tex files, but then changes I make
during the spellcheck will not be propagated back to the original
source. Any suggestions on how to spellcheck Sweave documents?

I see from a search that some people seem to be trying Flyspell on 
Emacs. I'd rather have a solution that runs outside of Emacs, but if 
anyone is using Flyspell successfully, I'd love to know of their 
experiences.
#
On 01/12/2007 11:11 AM, Michael Hoffman wrote:
If you want the concordance between the lines in the original file and 
those in the .tex file, you can get it (with the concordance=TRUE Sweave 
option).  Then it would be theoretically possible to convert reports 
about errors in the .tex into reports about the .Rnw.  I don't know if 
Aspell provides information in a form where you could actually make use 
of this, but if so, it might be a nice contribution to do so.

(For sample code decoding the concordance, see my patchDVI package:  it 
converts source links in .dvi files to point to the .Rnw instead of the 
.tex file.)

Duncan Murdoch