Re: [R] Sweave and tth

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Wed 26 Jul 2006 - 05:45:36 EST

Ben Bolker wrote:
> Frank E Harrell Jr <f.harrell <at> vanderbilt.edu> writes:
>

>> Has anyone 
>> been able to get tth to work with Sweave, defining Sweave.sty and other 
>> needed .sty files to be accepted by tth?
>>
>> Thanks.

>
> I use tth and ttm (Tex to MathML) -- not for Word users,
> just for easier web posting.
>
> I just use a crude little script to translate Sinput/Soutput into
> color/verbatim chunks.
>
> #!/bin/sh
> for i in `echo $1-[0-9]*.eps | sed -e 's/\.eps//g'`; do
> convert $i.eps $i.png
> done
> sed -e 's/\\begin{Sinput}/ { \\color{red} \\begin{verbatim}/
> s/\\end{Sinput}/ \\end{verbatim} }/
> s/\\begin{Soutput}/ { \\color{blue} \\begin{verbatim}/
> s/\\end{Soutput}/ \\end{verbatim} }/
> s/\\begin{Schunk}/ /
> s/\\end{Schunk}/ /' $1.tex | \
> tth -e2 -L$1 >$1.html
>
> ## notes: a, e, i, o, s, u, y get transmuted by TtH
> ## when they have " in front of them -- protect with
> ## verbatim environment!
>
> Ben Bolker

Thanks Ben. That works great. Word can open the resulting html file. Frank



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Jul 26 05:49:31 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 26 Jul 2006 - 06:24:07 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.