Re: [Rd] Sweave/ESS-like tools for HTML
On 10/18/07, Ben Bolker [EMAIL PROTECTED] wrote: Tom Short-2 wrote: See this link for more on creating/converting to HTML: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/SweaveConvert For using ESS with mixed HTML/R files, see this: https://stat.ethz.ch/pipermail/ess-help/2006-December/003826.html A couple of other bits of information: (1) I started writing a LaTeX-to-Rwiki translator, anyone who wants to try it should contact me. (It sounds, though, as though the wiki that Doug Bates is going to use accepts HTML rather than the Rwiki format? (2) I have trouble getting through to Ian Hutchinson's web site to get tth. If you do get there, check out ttm (TeX-to-MathML) as well. I found the links that Tom sent to be very helpful and did install both the tth and tex4ht Debian packages. Both approaches are interesting but there are some inherent limitations to HTML and the course management system that are difficult to overcome. I haven't found a way to include an expression like $\bar{x}$ without resorting to images and the course management system goes to great lengths to hide the file hierarchy so including an image in part of the wiki is difficult. Perhaps it is better if I create stand-alone PDF documents but then linking becomes difficult. The SGML approach does seem like the wave of the future, but in the meanwhile TeX/tth works well for me. Ben Bolker -- View this message in context: http://www.nabble.com/Sweave-ESS-like-tools-for-HTML-tf4635106.html#a13272187 Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Sweave/ESS-like tools for HTML
Tom Short-2 wrote: See this link for more on creating/converting to HTML: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/SweaveConvert For using ESS with mixed HTML/R files, see this: https://stat.ethz.ch/pipermail/ess-help/2006-December/003826.html - Tom Tom Short Electric Power Research Institute __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel A couple of other bits of information: (1) I started writing a LaTeX-to-Rwiki translator, anyone who wants to try it should contact me. (It sounds, though, as though the wiki that Doug Bates is going to use accepts HTML rather than the Rwiki format? (2) I have trouble getting through to Ian Hutchinson's web site to get tth. If you do get there, check out ttm (TeX-to-MathML) as well. The SGML approach does seem like the wave of the future, but in the meanwhile TeX/tth works well for me. Ben Bolker -- View this message in context: http://www.nabble.com/Sweave-ESS-like-tools-for-HTML-tf4635106.html#a13272187 Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Sweave/ESS-like tools for HTML
Hi Duncan, your approach looks _quite_ useful to me! I'm a bit afraid it will be a very hard jump to get on that tool, but riding it must be fun. Yes, I'm interested! Detlef On Wed, 17 Oct 2007 08:59:13 +1300 Duncan Temple Lang [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Doug. This is probably more than you want - either to know or to use for your specific task, but I'll throw it out there for general information. I write documents using XML, specifically an extended version of Docbook with elements for describing R concepts (e.g. code, plot, output, function name, argument, ...). Then, I use XSL to transform this to either HTML, FO and on to PDF, or to LaTeX (via db2latex). As for processing the R code and inserting the output into the resulting view/document, I use the Sxslt package from within R which allows me to combine XSL rules with those that also call R functions. I author the documents using the nxml mode in emacs and have some basic gestures for sending code from the document to R. Deb Nolan and I use this for creating dynamic and interactive documents which can be transformed to HTML with embedded controls for the reader to control the R computations interactively. Rather than thinking of the document as being one whose primary purpose is to be displayed to readers, the approach allows us to put arbitrary things into the document as part of our work but render only the bits we want for a particular audience, e.g. mix code, pedagogical material, R documentation, data, code from other languages. The XML/Docbook-XSL-R approach is very general and flexible with possibly too many degrees of freedom. If the document is destined only for HTML, then writing in HTML directly may be best. The generality is useful when there are multiple targets and one wants to extract information programmatically, e.g. extract subsets of the code within the document such as that in section 2, or only Matlab code. I will be packaging up all the material we have on this soon, so if anyone wants a copy, let me know. D. Douglas Bates wrote: My university provides me with a powerful course management system for the courses that I teach. Among other things I can create a wiki for the course, which is very convenient for cross-linking different bits of the course. Naturally I use R extensively in my teaching and I want to incorporate R code, output and graphics in such a wiki. If I were producing LaTeX sources instead of HTML sources I create .Rnw files for Sweave and I would edit them using ESS in emacs. What options do I have for producing HTML with embedded R content and what is a good, preferably emacs-based, way of editing the source code? One basic problem is trying to present mathematical expressions in HTML (see http://www.cs.tut.fi/~jkorpela/math/) but, aside from that, there are questions of presenting input R expressions and the corresponding output and of incorporating graphics files produced by R. I could try to use latex2html or texi2html but the output from latex2html at least would be quite inconvenient to use because it generates so many linked files. Once they are uploaded it would be horrible trying to get all the links straightened out. In a sense there are already tools for this type of output from .Rd files. Would it be best to use those tools or to use texinfo tools or ...? __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHFRgR9p/Jzwa2QP4RAi2vAJ0S+Mnbjvt6z9pe1kPoIxHeaaZQkACggHOL GflkuedfvPVQfm6fayigGK0= =4fKz -END PGP SIGNATURE- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Somebody once said, If you lend someone $10 and never see that person again, it was probably worth it. --- found in a mailing list __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Sweave/ESS-like tools for HTML
My university provides me with a powerful course management system for the courses that I teach. Among other things I can create a wiki for the course, which is very convenient for cross-linking different bits of the course. Naturally I use R extensively in my teaching and I want to incorporate R code, output and graphics in such a wiki. If I were producing LaTeX sources instead of HTML sources I create .Rnw files for Sweave and I would edit them using ESS in emacs. What options do I have for producing HTML with embedded R content and what is a good, preferably emacs-based, way of editing the source code? One basic problem is trying to present mathematical expressions in HTML (see http://www.cs.tut.fi/~jkorpela/math/) but, aside from that, there are questions of presenting input R expressions and the corresponding output and of incorporating graphics files produced by R. I could try to use latex2html or texi2html but the output from latex2html at least would be quite inconvenient to use because it generates so many linked files. Once they are uploaded it would be horrible trying to get all the links straightened out. In a sense there are already tools for this type of output from .Rd files. Would it be best to use those tools or to use texinfo tools or ...? __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Sweave/ESS-like tools for HTML
Douglas Bates wrote: My university provides me with a powerful course management system for the courses that I teach. Among other things I can create a wiki for the course, which is very convenient for cross-linking different bits of the course. Naturally I use R extensively in my teaching and I want to incorporate R code, output and graphics in such a wiki. If I were producing LaTeX sources instead of HTML sources I create .Rnw files for Sweave and I would edit them using ESS in emacs. What options do I have for producing HTML with embedded R content and what is a good, preferably emacs-based, way of editing the source code? One basic problem is trying to present mathematical expressions in HTML (see http://www.cs.tut.fi/~jkorpela/math/) but, aside from that, there are questions of presenting input R expressions and the corresponding output and of incorporating graphics files produced by R. I could try to use latex2html or texi2html but the output from latex2html at least would be quite inconvenient to use because it generates so many linked files. Once they are uploaded it would be horrible trying to get all the links straightened out. In a sense there are already tools for this type of output from .Rd files. Would it be best to use those tools or to use texinfo tools or ...? I have never tried it, but have you looked into using the RweaveHTML driver in the RHTML package for processing .Rnw files? Sean __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Sweave/ESS-like tools for HTML
See this link for more on creating/converting to HTML: http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/SweaveConvert For using ESS with mixed HTML/R files, see this: https://stat.ethz.ch/pipermail/ess-help/2006-December/003826.html - Tom Tom Short Electric Power Research Institute __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Sweave/ESS-like tools for HTML
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Doug. This is probably more than you want - either to know or to use for your specific task, but I'll throw it out there for general information. I write documents using XML, specifically an extended version of Docbook with elements for describing R concepts (e.g. code, plot, output, function name, argument, ...). Then, I use XSL to transform this to either HTML, FO and on to PDF, or to LaTeX (via db2latex). As for processing the R code and inserting the output into the resulting view/document, I use the Sxslt package from within R which allows me to combine XSL rules with those that also call R functions. I author the documents using the nxml mode in emacs and have some basic gestures for sending code from the document to R. Deb Nolan and I use this for creating dynamic and interactive documents which can be transformed to HTML with embedded controls for the reader to control the R computations interactively. Rather than thinking of the document as being one whose primary purpose is to be displayed to readers, the approach allows us to put arbitrary things into the document as part of our work but render only the bits we want for a particular audience, e.g. mix code, pedagogical material, R documentation, data, code from other languages. The XML/Docbook-XSL-R approach is very general and flexible with possibly too many degrees of freedom. If the document is destined only for HTML, then writing in HTML directly may be best. The generality is useful when there are multiple targets and one wants to extract information programmatically, e.g. extract subsets of the code within the document such as that in section 2, or only Matlab code. I will be packaging up all the material we have on this soon, so if anyone wants a copy, let me know. D. Douglas Bates wrote: My university provides me with a powerful course management system for the courses that I teach. Among other things I can create a wiki for the course, which is very convenient for cross-linking different bits of the course. Naturally I use R extensively in my teaching and I want to incorporate R code, output and graphics in such a wiki. If I were producing LaTeX sources instead of HTML sources I create .Rnw files for Sweave and I would edit them using ESS in emacs. What options do I have for producing HTML with embedded R content and what is a good, preferably emacs-based, way of editing the source code? One basic problem is trying to present mathematical expressions in HTML (see http://www.cs.tut.fi/~jkorpela/math/) but, aside from that, there are questions of presenting input R expressions and the corresponding output and of incorporating graphics files produced by R. I could try to use latex2html or texi2html but the output from latex2html at least would be quite inconvenient to use because it generates so many linked files. Once they are uploaded it would be horrible trying to get all the links straightened out. In a sense there are already tools for this type of output from .Rd files. Would it be best to use those tools or to use texinfo tools or ...? __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHFRgR9p/Jzwa2QP4RAi2vAJ0S+Mnbjvt6z9pe1kPoIxHeaaZQkACggHOL GflkuedfvPVQfm6fayigGK0= =4fKz -END PGP SIGNATURE- __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel