Re: [R] Sweave and tth

From: Ben Bolker <bolker_at_ufl.edu>
Date: Wed 26 Jul 2006 - 03:16:01 EST

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



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 06:41:34 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 - 08:24:00 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.