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.