user_doc, line break?




On Tue, 14 Jul 2009, Martin Sch?necker wrote:

< Is there a way to use line feeds in the documentation string such that 
< calling ? myfunction formats nicer?
< 
< I can use a text editor to modify the file maxima-userinfo.lisp and 
< insert lf at the 80th column or so, but can we achieve it directly from 
< within maxima?
 
Yes,
If you enter 'user_doc("name");' on the command line, you will be
prompted to enter the documentation string. That string can include
multiple lf/cr etc. Double quotes must be escaped, because " delimits the
docstring.

I created the docstring for user_doc this way.
Leo




Here is the docstring from user_doc

--------------------------------------------------
(%i1) ? user_doc

 -- Usage: user_doc(name,doc,created)
            user_doc(name,doc)
            user_doc(name)

<snip>

(%i1) user_doc("sin");
Enter documentation string surrounded by quotes '"'. End input with ';'.
"sin(x) = x - x^3/6 + ...";

-------------------------------

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.