I tried odfWeave to create an OpenOffice file and found that it exhausted the memory of my large linux machine and took a long time to run. LaTeX with Sweave is blazing fast and extremely flexible. Most of the time I can give clients a pdf file. Sometimes I'd like to make Sweave LaTeX files more accessible (and editable) to (gulp) Word users, mainly so they can extract tables and other pieces of the output. I tried latex2rtf, HeVeA, and latex2html without much luck. Has anyone been able to get tth to work with Sweave, defining Sweave.sty and other needed .sty files to be accepted by tth? I really appreciate Max Kuhn's efforts with odfWeave and hope to keep up with its development. Thanks. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
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
Dr. Harrell,> I tried odfWeave to create an OpenOffice file and found that it > exhausted the memory of my large linux machine and took a long time to> run.Do you have any details about the problem that you encountered? A bug that someone else had pointed out might be the culprit. I have the default image format as png, but since a lot of linux systems don't have that device automatically available to them, I have a switch for the device in odfWeaveControl: plotDevice = ifelse(.Platform$OS.type == "windows", "png", "bitmap"), The bitmap device units are in inches and the bmp device is in pixels. The bug is the default image size if 480 inches (whoops). Can you try using: odfWeaveControl( plotHeight = 5, plotWidth = 5, dispHeight = 5, dispWidth = 5) in your odfWeave call and let me know if this was the issue? I was able to reproduce the error on our linux systems and this fix worked (strange that the package passes R CMD check though). If this works, Section 7 of the odfWeave manual lists two command line tools (not included in my package) that can do the conversion from odt to Word (or other formats)> I really appreciate Max Kuhn's efforts with odfWeave and hope to keepup> with its development.No problem. I'll be releasing a bug fix version to solve the device units issue. Also, others have reported problems with locales. I believe I have a fix for this issue too.> > Thanks. > -- > Frank E Harrell Jr Professor and Chair School of Medicine > Department of Biostatistics VanderbiltUniversity Max ---------------------------------------------------------------------- LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}