How to build documentation for separate files?

14 views
Skip to first unread message

Oleksandr Kazymyrov

unread,
Aug 14, 2013, 11:10:29 AM8/14/13
to sage-s...@googlegroups.com
I have a class and want to generate html page with the description of functions (like that). How to do this?

P.S. I know that examples inside the description (for separate files) can be tested by "sage -t <filename>". Is it possible to produce the output in html or pdf in the same way?

Volker Braun

unread,
Aug 14, 2013, 11:31:28 AM8/14/13
to sage-s...@googlegroups.com
Afaik there is no simple one-command solution. But its relatively easy to take the Sage docbuilder minus the parallelism stuff and just process your own rst. I did this here:

Simon King

unread,
Aug 14, 2013, 11:45:19 AM8/14/13
to sage-s...@googlegroups.com
Hi Volker,

On 2013-08-14, Volker Braun <vbrau...@gmail.com> wrote:
> ------=_Part_213_17258047.1376494288142
> Content-Type: text/plain; charset=ISO-8859-1
>
> Afaik there is no simple one-command solution. But its relatively easy to
> take the Sage docbuilder minus the parallelism stuff and just process your
> own rst. I did this here:
>
> https://github.com/sagemath/git-developer-guide

Do I understand correctly that you are talking about the "build" script
posted there?

You state "Use the build script to build the html documentation." If I
understand correctly, the command
sphinx.cmdline.main(['build.py', 'developer', 'html'])
would take the .rst files from the directory developer/, build the docs,
and put the output into the directory html/.

But what about "build.py"? I can not find this file (the "build" script
has no ".py")

And do I understand correctly that in order to build the doc, you still
need the files common/conf.py and developer/conf.py?

Best regards,
Simon

Oleksandr Kazymyrov

unread,
Aug 14, 2013, 11:50:54 AM8/14/13
to sage-s...@googlegroups.com
Thanks, it should work. 

However, it would be great to add such functionality to sage.

Volker Braun

unread,
Aug 14, 2013, 12:13:12 PM8/14/13
to sage-s...@googlegroups.com
On Wednesday, August 14, 2013 4:45:19 PM UTC+1, Simon King wrote:
Do I understand correctly that you are talking about the "build" script
posted there?

Yes 

 
But what about "build.py"? I can not find this file (the "build" script
has no ".py")

I guess that is treated as argv[0] and sphinx actually doesn't use it.

John H Palmieri

unread,
Aug 14, 2013, 1:58:18 PM8/14/13
to sage-s...@googlegroups.com


On Wednesday, August 14, 2013 8:50:54 AM UTC-7, Oleksandr Kazymyrov wrote:
Thanks, it should work. 

However, it would be great to add such functionality to sage.

See <http://trac.sagemath.org/ticket/13679>. I put a patch there months ago, and it works partially but not completely. If anyone wants to work on it, please post progress there.

 
Reply all
Reply to author
Forward
0 new messages