Question

I use odfWeave for purposes of reproducible research. I've discovered it generally works well on MS Office 2007 using .odt files generated in Word, but \Sexpr{} commands almost always fail. I suspect Word is treating the underlying XML in a strange way, but I'm curious if anyone has seen that problem and figured out how to make it work.

Thanks,

Bill

Was it helpful?

Solution

My not use odfCat? E.g.:

> odfCat(mean(runif(100)))
<text:p text:style-name="ArialNormal">0.4411</text:p>

Also see this post, might be related. Good luck anyway!

OTHER TIPS

I've had the same problem. And I have found (by examining content.xml inside the .odt) that often LibreOffice will insert various inline formatting markup inside \Sexpr{...}, thereby preventing odfWeave() from working.

The solution to that is simply to mark the \Sexpr{...} (or the entire paragraph, or the entire document) inside LibreOffice Writer and click on "Clear direct formatting". I've never had an \Sexpr{...} that didn't work after doing this!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top