From: Tony R. <ant...@ad...> - 2011-11-06 01:26:37
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, thanks for all your suggestions. I think Robodoc or dtx-like will work. However, I believe I have worked with equivalent systems and while easily workable, they are both a bit of a pain. * Robodoc looks equivalent to ProTeX package for LaTeX which is what I do but it involves extra steps that slows me down. * dtx-like I have used for my matlab/octave DAE package and while beautifully flexible, I find it such a pain having to always start all LaTeX lines with % etc Unfortunately, upon looking at tok.red I doubt I have the expertise to fiddle with it successfully, Tony On 6/11/11 5:49 AM, die...@gm... wrote: > Good evening. > > The idea of using in-comment documentation seems better, since there > are systems built with the purpose of processing code documentation > and outputting it in Html, LaTeX or PDF. Some examples are Javadoc > for Java or and Doxygen is an option for C-like languages. For > Reduce, ROBOdoc may be a good option. > http://rfsber.home.xs4all.nl/Robo/index.html > > It can be used by configuring it to employ a tex-like comments > syntax (which reduce has) > http://rfsber.home.xs4all.nl/Robo/manual.html#id2496750 > > This way, it would be possible to document code without modifying > the input-output system. > > 2011/11/5 Rainer Schöpf <rai...@gm... > <mailto:rai...@gm...>> > > On Sat, 5 Nov 2011 at 14:45 +1030, Tony Roberts wrote: > > > would it be feasible to extend the action of "in", maybe have a > > pre-filter, so that upon executing "in filename.tex", say, reduce > > ignored everything except text that was between each pair of > > "^\begin{reduce}" and "^\end{reduce}"? To be compatible, > this should > > only be switched into action when the first (non-whitespace) > character > > in the source file is a backslash. > > That is one possibility. The other is to enter all the > documentation as Reduce > comments, i.e., start all documentation lines with % and modify > LaTeX to ignore > the % character. > > Actually, right now this is one of the methods to document LaTeX > code - the > whole LaTeX source code itself is documented in that way, and > the necessary > tools (doc.dtx) are part of Standard LaTeX. Since TeX uses % as > comment > character as well as Reduce, I am pretty sure that this method > can easily be > adapted to Reduce. For example, the doc package has an > environment called > "macrocode" instead of your "reduce" environment. > > You would need a small driver file that loads the doc package > and inputs > filename.tex to produce the documentation, along the lines of > > \documentclass{article} > \usepackage{doc} > \DisableCrossrefs > \begin{document} > \DocInput{filename.tex} > \end{document} > > An very simple filename.tex could be (note that there are > exactly 4 space > characters between "%" and "\end{macrocode}"!). > > % This is an example Rdoc file > % \begin{macrocode} > (a+b)**10; > % \end{macrocode} > will compute $(a+b)^{10}$. > > Rainer > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > <mailto:Red...@li...> > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > > > > > -- > Diego Esteban Alonso Blas. > Becario Predoctoral UCM. > Departamento de Sistemas Informáticos y Computación. > Facultad de Informática. Universidad Complutense de Madrid. > - -- - --------------------------------------------------------------------- Professor A.J. Roberts School of Mathematical Sciences phone: +61 8 8313 3035 University of Adelaide fax: +61 8 8313 3696 South Australia 5005. mailto:ant...@ad... http://www.maths.adelaide.edu.au/anthony.roberts/ ==.0000001000000100000110001000011010001111110010111011101000010000== I have a smoke free office and a Microsoft free computer. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk614kIACgkQ7TX8dTbro1s2RgCeNw2vgOYt/Ink1Y7DPpt7EtaA A8YAoJqu6sXOXkPbY8ne/4IjpxieCfdo =JUIw -----END PGP SIGNATURE----- |