Re: [sphinx-dev] Sphinx doesn't highlight my code block :-(
On Mon, Sep 17, 2012 at 5:18 AM, vitalije vitali...@gmail.com wrote: Hello, I can't figure out why sphinx refuses to highlight my code snippets. I tried to update my installation of docutils, sphinx and pygments, but the problem is still present. When I try to pygmentize code snippet it works as expected. But when I run sphinx build it makes just 'pre' block and inside it just a plain text. It doesn't have any span tag at all. I have tried to put 'highlight' directive before this block. I tried to put '::' on the end of previous text line and to indent code block. I tried to put .. code-block:: actionscript. All that with no success. TIA Vitalije It will be easier to help you if you can show us the block you are trying to highlight. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Contributions in TODO, autodoc and general
On Wed, Jul 25, 2012 at 12:58 AM, Kevin Hunter hunt...@gmail.com wrote: Without directions suggesting otherwise, here's my best guess at how best to contribute: submit a pull request[2] on bitbucket.org. The main repository behind Sphinx:: https://bitbucket.org/**birkenfeld/sphinxhttps://bitbucket.org/birkenfeld/sphinx Cheers, Kevin That would be my suggestion as well. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: howto create autodoc support for a custom domain?
On Thu, Jun 21, 2012 at 1:06 PM, Pete prjem...@gmail.com wrote: Wow! No takers to this question? A bit ironic since Sphinx is a tool intended to help make documentation simpler. Still, it seems that to implement an autodoc capabilityfor SPEC macro source code files, I can add a similar directive (spec:macrofile) to the custom domain, construct a parser for the SPEC macro language, and then build the ReST page(s) in the directive's handler, a sphinx.directives.ObjectDescription object, from analysis of the parser's findings. The code in the autodoc support is the best example of the algorithm simply because it is the only example to date. Any advice? On Friday, June 15, 2012 6:02:56 PM UTC-5, Pete wrote: I'm writing a custom domain (specdomain) to support the SPEC macro language used to operate X-ray diffractometers. Already, there are working directives and roles for the language primitives. How do I create the support code for autodoc to extract docstrings and #: documentation tags from the SPEC source source (text) files? Is there an example to follow? I've often wondered about this, and while I don't really know the best way to proceed, if you look at the autodoc source: https://bitbucket.org/birkenfeld/sphinx/src/6e960412308f/sphinx/ext/autodoc.py It looks like the way to do this would be to create objects that subclass Documenter (or at least adhere to the same interface), and then register them using the add_autodocumenter() function. You might also need to specify the path to your SPEC code somewhere, probably the conf.py file, so that your autodocumenter can find the files it's documenting. Of course I could be totally wrong...so if anyone out there knows better, please correct me. Good luck with this, and please report back and let us know how it goes! Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] indentation issues with flushed left text
On Tue, Apr 24, 2012 at 6:46 AM, maning sambale emmanuel.samb...@gmail.comwrote: Hi, I'm getting inconsistent indentation issues in my rest document. A sample of this issue is shown here: http://119.92.145.181/fossgeo_build/qgis_digitizing_sc.html#creating-a-new-vector-layer Click the Show source to view the raw rest. Item 1 and 4 are flushed to the left while 2 and 3 is indented. What I want is every item is flushed to the left. Advance thanks! Try indenting the second and following lines of items 1, 4, and 5. If that doesn't get you what you want, try breaking the lines of items 2 and 3 (so they have more than one line each) Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: mixing fonts or reST/Sphinx vs. AsciiDoc
On Wed, Mar 28, 2012 at 6:46 AM, Guenter Milde mi...@users.sf.net wrote: On 2012-03-26, Gour wrote: PDF output requires configuring LaTeX via packages and preamble code. The details depend ou your choice between traditional 8-bit TeX and XeTeX or LuaTeX as back-end. This is not necessarily true, though it is the most common way of building PDFs using Sphinx. (Sphinx Rst input - LaTeX - PDF) But there's also the rst2pdf package (http://code.google.com/p/rst2pdf/), which includes a Sphinx builder that uses ReportLab (http://www.reportlab.com/software/opensource/) to generate PDFs directly from the Rst source, bypassing the LaTeX step. YMMV. Either way, I'd choose Sphinx over AsciiDoc, though that may be personal preference. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Blogging with Sphinx
Installed this today, and it looks very nice. I've tried to get something working with blogofile several times, and I just can't quite make it work. So far tinkerer looks like just what I wanted. I would like the ability to store draft posts in my tinkerer project, though. Added a feature request to the tracker. Thanks for this! Kevin Horn On Thu, Dec 15, 2011 at 11:34 AM, Vlad Riscutia riscutiav...@gmail.comwrote: tinker --build removes the blog subdirectory under the current directory (which should be build output) then invokes Sphinx. Indeed it looks like if your blog root is blog and you call Tinkerer from one level up you get this behavior. Thanks for letting me know about this serious issue, I will definitelty add some checks to avoid this. Again, Tinkerer is in beta so the feedback received will help me a lot in improving it! Thank you, Vlad On Dec 14, 2011, at 11:39 PM, Firat Ozgul ozgulfi...@gmail.com wrote: Hello, I tried this program, but it has a very serious problem. If the command tinker --build cannot find a conf.py in which you issued this command, it will delete the project folder with all of its contents! Firat 2011/12/15 Vlad Riscutia riscutiav...@gmail.com Thanks! The source code is here: https://bitbucket.org/vladris/tinkerer/. Thank you, Vlad On Dec 14, 2011, at 6:20 PM, Saju M sajup...@gmail.com wrote: Hi, Where is the source code located?? On Thu, Dec 15, 2011 at 7:47 AM, Saju M sajup...@gmail.com wrote: Hi, Good work On Thu, Dec 15, 2011 at 4:43 AM, vladris riscutiav...@gmail.com wrote: Hi, If anyone in the Sphinx community is interested, I just released the first version of Tinkerer which enables blogging with Sphinx. You can find more information on the Tinkerer website: http://tinkerer.me/. The project is still in beta so I appreciate your feedback. Thank you, Vlad -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- Saju Madhavan s...@fluentsoft.com +91 09535134654 -- Saju Madhavan s...@fluentsoft.com +91 09535134654 -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] how to specify the default for a function parameter
On Wed, Aug 3, 2011 at 4:02 AM, Chris Withers ch...@simplistix.co.ukwrote: Hi All, In: http://sphinx.pocoo.org/**domains.html?highlight=param#**info-field-listshttp://sphinx.pocoo.org/domains.html?highlight=param#info-field-lists ...I see :type limit: to specify the type of the `limit` parameter but no way to specify the default of the `limit` parameter. On a hunch, I tried :default limit:, which didn't generate any warnings on make, but renders weirdly. Can someone explain? cheers, Chris I'm not sure there is a way to display it exactly like you want (as a separate field in the info-field-list). Such a thing might be nice, though. I usually just describe the default in the description of the parameter. So , going along with the example in the docs, I might do something like this: :param limit: maximum number of stack frames to show; defaults to None I realize this isn't exactly what you are asking, but between putting the default in the description, and potentially having it shown in the function signature, this seems like it would be good enough for many use cases. YMMV Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: conditional exclusion of rst files
The only directive might be useful too, depending on your use case. Kevin Horn On Mon, Aug 1, 2011 at 4:03 AM, Alastair Dent alastair.d...@imgtec.comwrote: Hi, I found I could do this using ifconfig extension and the exclusion list in config.py. The ifconfig extension allows you to conditionally include text. The exclusion takes a list of rst files and excludes them from the build. The syntax of exclude_patterns is: exclude_patterns = ['anrstfile.rst', 'directorypath/'] There is one niggle with this exclude; if there is a relative link to any excluded file, then exclude_patterns is ignored and the file is included. -Original Message- From: sphinx-dev@googlegroups.com [mailto:sphinx-dev@googlegroups.com] On Behalf Of Koen Sent: 30 July 2011 13:30 To: sphinx-dev Subject: [sphinx-dev] Re: conditional exclusion of rst files I was having the same type of question: I have a documentation project for division x and I would like to have the same documentation for division Y but only some files are different. So question is, what is the best approach to setup a correct structure for this? (both should have a different build html) What I would think as a structure: top_dir | | MakeFile | build |-divisionx |-doctrees |-html_div_x |-divisiony |-doctrees |-html_div_x | sources |-- conf.py |-- index_division_x.rst |-- index_division_y.rst |-- general sources |-- all general rst files |-- divisionXspecific |--- Specific rst files for x |-- divisionYspecific |--- specific rst files for y So goal would be to reuse the general files and add the specific files for every division. At the moment I dont directly see how I could do this. An exclude based on a build parameter would be nice. Problem now is that the conf.py is linked to one index masterfile. Only possibility I see now is to create two different sphinx projects for each division and symlink the general rst files but this does not feels as the proper way to do it? If somebody has some pointers on this would be nice to hear your opinion on this. On Jul 20, 12:39 pm, Alastair Dent alastair.d...@imgtec.com wrote: I need to be able to exclude specific rst files, depending on a built parameter. Is there an extension that will enable this? -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] New Theme Feedback Request
On Thu, Jun 30, 2011 at 6:38 AM, Mark (Nosrednakram) nosrednak...@gmail.com wrote: Hello, I've been working on a new Sphinx theme http://jqsphinxtheme.baseclass.info/index.html and am soliciting feedback. Specifically I am looking for feedback on overall layout and usability, additional styles to progressively enhance if any. see features page http://jqsphinxtheme.baseclass.info/features.html for current feature set and examples. The entire site is themed and you can use the theme changer to try different themes. Thanks, Mark This is a pretty cool idea, but it seems to have a way to go yet. Here's a few items that jumped out at me: - paragraphs in the main content section desperatly need some padding on the left and right - the search box needs to be shifted to the right...it's all bunched up on the left ATM. - there is an area surrounding each of the TOC links in the left column where if you hover over it, the link will be highlighted, but it's not clickable yet. In other words, the hover area does not match up with the clickable link area - code samples are nigh unreadable (see the progressive enhancement example of the features page). This might depend on the JQ theme being used, but it was pretty bad on all the ones I looked at (white and blue text on a grey background...yuck!) - what's with teh button-like things at the top right? - I think the navigation buttons could be improved...but I can't pin down exactly what I don't like about them...they just don't seem to fit quite right with the rest of the design I hope you continue working on this. It looks really neat, and the Sphinx world can always use more themes! Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] How would you include huge tables?
On Wed, May 25, 2011 at 12:44 PM, Jan Ulrich Hasecke juhase...@googlemail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I want to include huge tables in my sphinx project. The data is in a spreadsheet. I can save the spreadsheets as html via LibreOffice or as CSV, but how can I convert these html-tables to rst-tables? I don't need the tables in the text, but as an appendix so maybe there is a better solution? - -- Jan Ulrich Hasecke DZUG e.V. (Deutschsprachige Zope User Group) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3dP+4ACgkQPUzUEFbILMSugQCgnF2s2Y6FGSPIWIjg1tGLf1dg S6sAn05MxQyVotJU+4DdmmU4sX+Mc+gh =8gMq -END PGP SIGNATURE- I use some code to parse the data and create rst tables. See: http://media.commandline.org.uk/code/table.txt and https://bitbucket.org/khorn/lore2sphinx/src/7b0939832687/lore2sphinx/table.py Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Convert latex to rst/sphinx
On Fri, Apr 8, 2011 at 7:58 AM, Joris Van den Bossche jorisvandenboss...@gmail.com wrote: Hi, I know you can easily convert your rst files to latex, but I wonder if there is also a way to do the other way around? The reason: recently I started writing documentation with rst and sphinx (because sphinx is great!), but before that I already begun to write it in latex. So now I want to convert that part to rst to add it to the documentation. I know there is something like pandoc, but at first sight it seems not to convert my math and tables and references very well (I suppose it's because it converts it to general rst, and sphinx uses rst with some extensions?) kind regards, Joris Somewhere in the Python source tree is a script that was used to convert the Python documentation from Latex to Sphinx/rst. Maybe that would help? Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] :wikipedia: extenstion?
Not that I know of, though it should be fairly trivial to do. A better solution is probably to use the extlinks extension, though, unless your proposed wikipedia extension would do something that extlinks wouldn't. Kevin Horn On Fri, Mar 18, 2011 at 7:52 PM, cool-RR ram.rac...@gmail.com wrote: Hey, Did anyone ever write a :wikipedia: extension for linking to articles on Wikipedia? I would love to use that in my project. Ram. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] :wikipedia: extenstion?
I seriously doubt it, so that could be one reason to create a separate extension. I'm not sure whether it's worth the effort to try and duplicate Wikipedia's transformations though. Are they documented anywhere? At any rate, creating an extension to add a role like this is pretty easy. Check out the sphinx-contrib repo for examples: https://bitbucket.org/birkenfeld/sphinx-contrib Kevin Horn On Fri, Mar 18, 2011 at 8:03 PM, cool-RR cool...@cool-rr.com wrote: Can the extlinks extension replace with _, and possibly other transformations that Wikipedia requires? On Fri, Mar 18, 2011 at 7:57 PM, Kevin Horn kevin.h...@gmail.com wrote: Not that I know of, though it should be fairly trivial to do. A better solution is probably to use the extlinks extension, though, unless your proposed wikipedia extension would do something that extlinks wouldn't. Kevin Horn On Fri, Mar 18, 2011 at 7:52 PM, cool-RR ram.rac...@gmail.com wrote: Hey, Did anyone ever write a :wikipedia: extension for linking to articles on Wikipedia? I would love to use that in my project. Ram. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- Sincerely, Ram Rachum -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] How does sphinx auto-generate nightly docs?
On Mon, Jan 24, 2011 at 1:08 PM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 24.01.2011 20:13, schrieb Erik Tollerud: I've noticed the sphinx latest documentation page seems to stay in sync with the development version on bitbucket. Is this done by an automatic tool to keep the documentation page up-to-date with the latest mercurial commits, or is the page manually uploaded at regular intervals? And if the sphinx page isn't automatic, is there a tool out there to do this automatically? It's generated manually whenever I feel like it (usually after a substantial update). It's basically just a script that does hg update; cd docs; ../sphinx-build.py . /web/server/root. cheers, Georg You could also conceivably whip up something using bitbucket's service integration to do that for you: https://bitbucket.org/help/service-integration I usually use a fabric task myself (run manually). Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Project-wide includes
On Thu, Jan 13, 2011 at 11:38 AM, Charlie Martin chasrmar...@gmail.comwrote: This may be a FAQ but searching didn't reveal anything. Is there a place to put project-wide includes, eg, if I want to have isonum.txt automatically included in all the files for project Foo? You can include some RestructuredText at teh beginning or end of every file using the rst_prolog and rst_epilog config values in your build config file, as described here: http://sphinx.pocoo.org/config.html#confval-rst_epilog Is that what you were looking for? Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: Why won't this code highlight?
On Wed, Jan 12, 2011 at 2:30 AM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 12.01.2011 07:43, schrieb Kevin H: On Jan 12, 12:37 am, Kevin Horn kevin.h...@gmail.com wrote: here is a page of output from a sphinx project: http://twistedsphinx.funsize.net/projects/web/howto/resource-template... here is the source of that page: http://twistedsphinx.funsize.net/_sources/projects/web/howto/resource... Near the end is a file included using the literalinclude directive. As you can see it is not being highlighted, though I think it should be. It's just getting stuck in a pre tag. Every other literalinclude-ed file in this project works just fine. Things I have tried: * renaming the file from 'webquote.rtl' to webquote.py -- no change * using the ':language: python' option on the literalinclude directive -- no change * messing around with line endings -- no luck * messing around with html entity escaping -- no luck I can highlight this code with no problem using pygments' 'pygmentize' command line tool, so I don't think it's a problem with pygments. ??? Kevin Horn NEVERMIND! Apparently the process of writing my previous mail jogged my brain, because as soon as I'd sent it I found the problem. The code snippet is from the PTL template language (which comes with the Quixote web framework), which is almost (but not quite) valid Python. The problem is that PTL uses the keyword template rather than def when defining functions. I tried replacing the template keyword with def, and bang zoom, we have syntax highlighting. So now my question is: Why will Pygments highlight this from the command line app, but not in Sphinx? Python code is syntax-checked before highlighting, since it's the default highlight language, and this way you can put other code blocks in between without having to mark them as not-Python. For your case, try py3 as a highlighting language; it is not syntax-checked. cheers, Georg Thanks Georg, that did the trick! Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
[sphinx-dev] Why won't this code highlight?
here is a page of output from a sphinx project: http://twistedsphinx.funsize.net/projects/web/howto/resource-templates.html here is the source of that page: http://twistedsphinx.funsize.net/_sources/projects/web/howto/resource-templates.txt Near the end is a file included using the literalinclude directive. As you can see it is not being highlighted, though I think it should be. It's just getting stuck in a pre tag. Every other literalinclude-ed file in this project works just fine. Things I have tried: * renaming the file from 'webquote.rtl' to webquote.py -- no change * using the ':language: python' option on the literalinclude directive -- no change * messing around with line endings -- no luck * messing around with html entity escaping -- no luck I can highlight this code with no problem using pygments' 'pygmentize' command line tool, so I don't think it's a problem with pygments. ??? Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] An index of methods, and a page per method instead of having all of them in a web page
On Wed, Dec 8, 2010 at 5:42 AM, Nathann Cohen nathann.co...@gmail.comwrote: Hello everybody !!! As the subject says, I am interested in knowing whether there is a way to ask Sphinx to produce a page per method of a Python class, and replace a LOONG description of all the methods by links toward the individual pages. Here is my problem : http://www.sagemath.org/doc/reference/sage/graphs/graph.html All the methods present there are dealing with the Graph objects of Sage (http://www.sagemath.org/), but they are doing many different things with them. The trouble now is that it is quite impossible at the moment to find *one* of them through Google, as this page contains the description of ALL our graph functions. If you were to type several keywords in Google, this page would always appear because it contains all the corresponding terms, but they would probably be scattered inside, and finding the method you are interested in is becoming harder. If it was possible, instead, to have just one page per method, Google would redirect you immediately toward the good method if the keywords are good enough, which would be just GREAT. :-) Thank you very much for your help, and Sphinx in general. Fantastic tool ! Nathann Have you tried using the autosummary extension ( http://sphinx.pocoo.org/ext/autosummary.html#directive-autosummary) with the toctree directive? You can use the sphinx-autogen script or the autosummary_generate config option to generate the stub pages for you as well. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Caption option for literalinclude
On Fri, Oct 15, 2010 at 5:05 AM, Vinay Sajip vinay_sa...@yahoo.co.ukwrote: Is there a way to specify captions for literalincludes, which would lead to targetable markup in the output? At the moment I'm using :prepend: / :append:, but this leads to the added lines looking like they came from the included file. That's useful, but not for my use case: I'd like the caption (which might be prepended or appended) to have the potential to be styled differently, e.g. div class=highlight-language div class=highlight div class=captionMy caption for included stuff/div preIncluded stuff/pre /div /div Regards, Vinay Sajip I haven't found a way to do this yet, but it's certainly a feature I'd like to see. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] [SOLVED] Re: ReST Formatting Problem.
you might also be able to use escaped spaces, ie '\ ' (backslash followed by a space), though I haven't tried it It's possible that docutils uses char 160 under the covers when it sees this in the markup, I'm not sure Kevin Horn On Wed, Aug 18, 2010 at 4:06 AM, sffjunkie sffjun...@gmail.com wrote: If anyone wants to know the answer is to use non-breakable spaces character code 160 On Aug 17, 10:52 am, sffjunkie sffjun...@gmail.com wrote: I'm not sure where else to ask but does anyone know how to include a literal which ends in a space character? More specifically I want to add 2 literals '* ' (asterisk + space) and ' ' (two spaces) Are there any forums/groups specifically set up for ReST questions? Many Thanks Simon -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.comsphinx-dev%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Figure captions
The ability to have Sphinx auto-generate an index/list of figures or an index/list of tables would be really nice. I haven't found a way to do it so far (though admittedly it's not high on my priority list). Kevin Horn On Wed, Aug 18, 2010 at 4:31 PM, David dwarnol...@suddenlink.net wrote: All, Is there a way to label Figures with automatic numbering, as in Figure 1, Figure 2, Figure 3, etc.? So that if later I decide to insert another figure between Figure 2 and Figure 3, they will be automatically renumbered? David -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.comsphinx-dev%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Indexing
On Wed, Aug 18, 2010 at 3:42 PM, David dwarnol...@suddenlink.net wrote: Hi, Not sure about indexing. In Latex, I'm used to inserting and index reference in the body of a paragraph next to the word I am indexing (maybe I should not have been doing it that way over the years), but with Sphinx it seems that philosophy is to insert the index in front of the paragraph containing the word you want to appear in the index. For example, .. index:: good men Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Now is the time for all good men to come to the aid of their countrymen. Do I have this idea right? David For the moment I think this is the right way to do it, but I recall seeing a ticket for adding an index role (as opposed to a directive), which I presume (guessing) would allow you to do something like: This :index:`term` is in the index. I don't think this has been implemented yet, though. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] :download: versus :doc:
On Wed, Aug 18, 2010 at 5:09 PM, David dwarnol...@suddenlink.net wrote: All, I'm not sure of the purpose of :doc:. I got this to work: You can download :download:`junk.m`. But this: You can view :doc:`junk.m`. Gave this warning when compile with make html. /Users/darnold/Documents/temp/Sphinx/intro.rst:95: WARNING: unknown document: junk.m Bug? Or am I missing something. Not sure if I understand the difference between :doc: and :download:. David :doc: is intended for creating a link to a Sphinx document :download: is for creating links to non-ReST files, e.g. python source files, etc. using :download: will also cause sphinx to put the referenced file in the built sphinx project (at least when building html) so that viewers of the html can download the file see also: http://sphinx.pocoo.org/markup/inline.html#cross-referencing-documents Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] ReST Formatting Problem.
On Tue, Aug 17, 2010 at 4:52 AM, sffjunkie sffjun...@gmail.com wrote: I'm not sure where else to ask but does anyone know how to include a literal which ends in a space character? More specifically I want to add 2 literals '* ' (asterisk + space) and ' ' (two spaces) Are there any forums/groups specifically set up for ReST questions? Many Thanks Simon try one of the docutils mailing lists: http://docutils.sourceforge.net/docs/user/mailing-lists.html Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Tagging
On Fri, Aug 13, 2010 at 7:22 AM, Jan Ulrich Hasecke juhase...@googlemail.com wrote: Hi, is it possible to tag documents in Sphinx and list them on a special navigation page? It would be nice to tag documents like this: .. tags:: foo, bar, baz And to list all tags in the sphinxsidebar as clickable links which point to a page where all documents with the specified tag are listed alphabetically. juh AFAIK, it's not currently possible to do anything like this, though I've also wanted something like this. It's probably possible to do something like this in an extension, by creating a custom directive, and then writing hooks into the sphinx build system to compile the tags from various documents into a coherent whole. I've pondered doing this, but haven't managed to come up with the time yet. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Programmatic use of sphinx
On Thu, Aug 12, 2010 at 8:03 AM, Mango barbeau.dan...@gmail.com wrote: Hello Sphinx devs! First of all thanks for the great tool! I'm from the OpenAlea (python) project (http://openalea.gforge.inria.fr/wiki/doku.php?id=openalea) and we have started to move our documentation to sphinx. However, we want to push a little further than simply generating html files, we want to use sphinx to dynamically generate beautiful HTML from docstrings and display it in our application. OpenAlea gathers many components and this could be handy as third party components almost always ship with docstrings but not with html files. We started digging into the code and had some success with different methods, but nothing fully functionnal. First we simply used docutils but it couldn't parse sophisticated directives, then we built a solution around Sphinx (a small wrapper around class Sphinx and class StandaloneHTMLBuilder). It worked better but still, docutils complained about unknown roles (func) that are defined in Domains and I finally gave up because I failed to properly wrap my head around Sphinx' code. I'd really appreciate if someone could explain me how Domain-roles are declared to docutils? I have seen some monkey patching in some places but couldn't get the right result. In the end what I would like to write is an API like this: builder.build_rst( rst_string, builder, writer, working_directory) .. so I could simply do: sphinxApp = sphinx.application.Sphinx(...) sphinxApp.builder.build_rst( .. todo :\n\ntest, sphinx.builders.html.StandaloneHTMLBuilder, sphinx.writers.html.HTMLWriter, ) Have you looked at the JSONHTMLBuilder? Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] linking to specific sections of an RFC
On Thu, Aug 5, 2010 at 8:42 AM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 23.07.2010 17:50, schrieb Jean Daniel: Hello, I am using the :rfc:`3501` role to express this url : http://tools.ietf.org/html/rfc3501 This works fine and I am looking for a way to link to a specific section of the rfc; I would like to link to http://tools.ietf.org/html/rfc3501#section-2.3.1.1 I have tried :rfc:`3501#section-2.3.1.1` but I get the following error: (ERROR/3) invalid RFC number 3501#section-2.3.1.1 question 1: Is there a better way than using the :ref: role? I've now implemented the above syntax, it is a good idea to allow that. question 2: Is it possible to use literalinclude with an _url_ to a text file? Not right now. I'd also be reluctant to add this, since it adds another case where internet access is needed to build docs. Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkxav9oACgkQN9GcIYhpnLCrDACgq/3fqzQnM4du70Lgpi1WNfdS /EkAnRy50G2wCTMQFmyn0Hd205DnUEag =ulOd -END PGP SIGNATURE- Perhaps a separate directive is in order for urls? Something like urlinclude? Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] linking to specific sections of an RFC
On Thu, Aug 5, 2010 at 3:45 PM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 05.08.2010 22:12, schrieb Kevin Horn: On Thu, Aug 5, 2010 at 8:42 AM, Georg Brandl ge...@python.org mailto:ge...@python.org wrote: Am 23.07.2010 17:50, schrieb Jean Daniel: Hello, I am using the :rfc:`3501` role to express this url : http://tools.ietf.org/html/rfc3501 This works fine and I am looking for a way to link to a specific section of the rfc; I would like to link to http://tools.ietf.org/html/rfc3501#section-2.3.1.1 I have tried :rfc:`3501#section-2.3.1.1` but I get the following error: (ERROR/3) invalid RFC number 3501#section-2.3.1.1 question 1: Is there a better way than using the :ref: role? I've now implemented the above syntax, it is a good idea to allow that. question 2: Is it possible to use literalinclude with an _url_ to a text file? Not right now. I'd also be reluctant to add this, since it adds another case where internet access is needed to build docs. Georg Perhaps a separate directive is in order for urls? Something like urlinclude? Well, there is already the extlinks extension which should take care of that for other URLs. Georg What I meant was a directive to include data from a url in the document. The extlinks extension just provides a nicer interface for links. Making it a separate directive would allow users to have the include text from a url functionality, without enforcing it on everyone (as changing the behavior of literalinclude would do). Probably best as an extension, I suppose. Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] How to use intersphinx to link to sphinx or python documentation
On Wed, Jul 28, 2010 at 5:47 AM, Christoph Neuroth christoph.neur...@googlemail.com wrote: Hi, Howdy! I just started using sphinx 1.0 for our documentation and I'm having trouble using the intersphinx extension. I added python and sphinx itself in conf.py: intersphinx_mapping = { 'python': ('http://docs.python.org/', None), 'sphinx': ('http://sphinx.pocoo.org', None) } And now I try to link to these documentations. But even this example from the sphinx documentation does not work: :ref:`comparison manual python:comparisons` (It will just output python:comparisons in italics without a link). Did you also add intersphinx to the extensions value in your conf.py? Also, I don't get how I would know about these labels anyway (for documentation I didn't write): When I have to look at the python or sphinx documentation source to find the labels first, it's way faster to just link the URL like `this http://sphinx.pocoo.org/markup/ inline.html#ref-rolehttp://sphinx.pocoo.org/markup/%0Ainline.html#ref-role`_, isnt it? It might indeed be faster to link to the exact URL as you suggest, but the advantage intersphinx provides that it gives you a way to link to a specific label in the other documentation - even if it moves. So if someone rearranges their docs, you just have to run a full rebuild of your docs (to get the latest objects.inv files downloaded), and it should fix any broken links you might have. (Of course you need intersphinx to actually _work_ first ;) ) Thanks for your help, Chris Good luck! Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Displaying Docinfo (File-wide metadata)
Thanks, Georg! Perhaps this should be added to the documentation here: http://sphinx.pocoo.org/markup/misc.html#file-wide-metadata ? Kevin Horn On Sat, Jun 12, 2010 at 11:19 AM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 08.06.2010 23:16, schrieb Kevin H: this page: http://sphinx.pocoo.org/markup/misc.html#file-wide-metadata describes a way to add File-wide metadata to a Sphinx/RST source file, but notes that it is not displayed in the output. I would like to display some of these fields in the output of my Sphinx project. How would I go about this? Is there a way to access these values from the template? Has anyone done this before? Yes, the metadata is available as a dictionary called meta in the HTML templates. cheers, Georg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.15 (GNU/Linux) iEYEARECAAYFAkwTs40ACgkQN9GcIYhpnLA8UwCgqyB1kfKjFaVXF1qWNecHodFC RkYAoJKCC56rKj3ir4S9pBcYNFl6IivS =s658 -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.comsphinx-dev%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Creating roles in Sphinx extensions
On Mon, Apr 5, 2010 at 3:22 AM, Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 05.03.2010 00:59, schrieb Kevin Horn: I'm creating a Sphinx extension which just adds a custom docutils role. A couple of questions: 1) What's the opinion of the list on whether to use a standard role function or the CustomRole class in docutils.parsers.rst.roles.py http://docutils.parsers.rst.roles.py? Which is better and why? CustomRole is meant mostly for the implementation of the role directive, which you can use to add custom roles in reST documents themselves. If you need the capabilities of CustomRole (adding options and content automatically), you can use it, otherwise I would use a normal role function. 2) What's the best way to access a Sphinx config variable in my role function/class? Pass the Sphinx app object into the function/class in my extensions setup function? Or is there a better way? You can get at the app via document.settings.env.app. cheers, Georg Yes, but how do I get a reference to document inside my role function? Is it a global variable? Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] How to link to internal documents, not to marks within a document
On Sun, Mar 14, 2010 at 3:20 PM, andreash hilb...@gmail.com wrote: Hi there, I'm trying to build my website using Sphinx. So far, I linked from one page to another using :ref:. However, if the page I link to is larger than the screen, it is not shown from the top, but rather from the first headline (I placed the :ref: right in before the page's title). Is there any way to link to an internal document using a reference instead of a path, but the link pointing to the html document and not to the first anchor? Thanks, Andreas. use :doc:`reference to file` see: http://sphinx.pocoo.org/markup/inline.html#cross-referencing-documents Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] how to use sphinx extensions
On Sun, Mar 14, 2010 at 11:16 AM, ak asad.kha...@gmail.com wrote: Hi All, I am a newbie and trying to create documentations from sphinx. I have successfuly created documentations from .rst file but I would like to use extensions to create documentation for python source files. I see that I can use autodoc extension but I cant figure out how. Is there any examples to help me ? First thing: look in you conf.py file and make sure that 'sphinx.ext.autodoc' appears in the extensions list then follow the docs here: http://sphinx.pocoo.org/ext/autodoc.html Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: prevent TOCTREE from being displayed
On Mon, Mar 15, 2010 at 3:25 PM, andreash hilb...@gmail.com wrote: Hmmm ... Works fine for a toctree which is not in my master document. However, when I apply the same to my master document, I get an error (see below). The toctree inside my main index.txt looks like this: .. toctree:: :maxdepth: 2 :titlesonly: :hidden: profil projekte partner kontakt impressum And the error I get is this: # Sphinx version: 1.0 # Docutils version: 0.5 release # Jinja2 version: 2.1.1 Traceback (most recent call last): File /home/andreas/lib/python2.6/sphinx/sphinx/cmdline.py, line 170, in main app.build(all_files, filenames) File /home/andreas/lib/python2.6/sphinx/sphinx/application.py, line 144, in build self.builder.build_update() File /home/andreas/lib/python2.6/sphinx/sphinx/builders/ __init__.py, line 265, in build_update 'out of date' % len(to_build)) File /home/andreas/lib/python2.6/sphinx/sphinx/builders/ __init__.py, line 320, in build self.write(docnames, list(updated_docnames), method) File /home/andreas/lib/python2.6/sphinx/sphinx/builders/ __init__.py, line 359, in write self.write_doc(docname, doctree) File /home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py, line 380, in write_doc self.handle_page(docname, ctx, event_arg=doctree) File /home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py, line 743, in handle_page output = self.templates.render(templatename, ctx) File /home/andreas/lib/python2.6/sphinx/sphinx/jinja2glue.py, line 107, in render return self.environment.get_template(template).render(context) File /home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/ page.html, line 10, in top-level template code {% extends layout.html %} File /home/andreas/edv-dl/orga/webseite/source/../themes/ahit/ layout.html, line 11, in top-level template code {% extends basic/layout.html %} File /home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/ layout.html, line 149, in top-level template code {%- block content %} File /home/andreas/edv-dl/orga/webseite/source/../themes/ahit/ layout.html, line 52, in block content {%- block sidebartoc %} File /home/andreas/edv-dl/orga/webseite/source/../themes/ahit/ layout.html, line 54, in block sidebartoc {{ toctree(collapse=True) }} File /home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6- linux-x86_64.egg/jinja2/sandbox.py, line 238, in call return __context.call(__obj, *args, **kwargs) File /home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6- linux-x86_64.egg/jinja2/runtime.py, line 132, in call return __obj(*args, **kwargs) File /home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py, line 735, in lambda ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw) File /home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py, line 680, in _get_local_toctree docname, self, collapse))['fragment'] File /home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py, line 200, in render_partial doc.append(node) File /usr/lib/python2.6/dist-packages/docutils/nodes.py, line 554, in append self.setup_child(item) File /usr/lib/python2.6/dist-packages/docutils/nodes.py, line 95, in setup_child child.parent = self AttributeError: 'NoneType' object has no attribute 'parent' Any idea what might be happening? Thanks for your insight, Andreas. Try taking out the :maxdepth: option Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
[sphinx-dev] Creating roles in Sphinx extensions
I'm creating a Sphinx extension which just adds a custom docutils role. A couple of questions: 1) What's the opinion of the list on whether to use a standard role function or the CustomRole class in docutils.parsers.rst.roles.py? Which is better and why? 2) What's the best way to access a Sphinx config variable in my role function/class? Pass the Sphinx app object into the function/class in my extensions setup function? Or is there a better way? Thanks, Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Suggestion: absolute paths vs relative paths
+1 2010/3/2 Fernando Gómez fjgo...@gmail.com Hi, Sphinx's docs mention explicitly the difference between relative and absolute paths for the image directive [1]: When used within Sphinx, the file name given (here gnu.png) must either be relative to the source file, or absolute which means that they are relative to the top source directory. Though the same rule applies for the toctree directive, only relative paths are mentioned in [2]: ... the documents given in the directive body (whose path is relative to the document the directive occurs in). I suggest that a similar explanation be included in both places, as well as in any other directive where the same concept is applicable. Regards, Fernando [1] http://sphinx.pocoo.org/rest.html#images [2] http://sphinx.pocoo.org/concepts.html#the-toc-tree -- Fernando Gómez Biblioteca Antonio Monteiro INMABB (Conicet / Universidad Nacional del Sur) Av. Alem 1253 B8000CPB Bahía Blanca, Argentina Tel. +54 (291) 459 5116 http://inmabb.criba.edu.ar/ -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.comsphinx-dev%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: autodoc for Java source?
The new domains feature in the upcoming 1.0 should be a good way forward, assuming you can wait that long... see: http://pythonic.pocoo.org/2009/9/12/new-in-sphinx-1-0-domains and: http://pythonic.pocoo.org/2010/1/7/new-year-s-python-meme-and-status Good luck! Kevin Horn On Tue, Feb 23, 2010 at 9:39 PM, Chris Collins xop...@gmail.com wrote: No one uses Sphinx for Java projects? I guess I'm blazing a trail. On Mon, Feb 22, 2010 at 3:14 PM, Chris Collins xop...@gmail.com wrote: Does autodoc only work for Python source code? According to the docs (http://sphinx.pocoo.org/ext/autodoc.html), *For Sphinx (actually, the Python interpreter that executes Sphinx) to find your module, it must be importable. That means that the module or the package must be in one of the directories on sys.path – adapt your sys.path in the configuration file accordingly. * It would be great if someone found a shortcut for autodoc'ing Java source code. *Otherwise, I guess I have to manually copy and paste from my Javadoc files into some rst files - is that correct?* -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.comsphinx-dev%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en. -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] FYI: different layout example
On Sat, Feb 6, 2010 at 7:55 PM, Schollii oliver.schoenb...@gmail.comwrote: For those interested in a somewhat different layout than one of the two default ones, I have played around with the layout.html and CSS and the result can be seen at http://pubsub.sourceforge.net. I could make the two files and settings available if there is interest. Cheers, Oliver This is very nice! Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Re: single column table vs. section header?
On Wed, Feb 3, 2010 at 2:26 AM, Guenter Milde mi...@users.berlios.dewrote: On 2010-02-02, Mark Harrison wrote: This came up in the course of generating some REST formatted tables: select foo,bar from baz; select foo from baz; === === === foo bar foo === === === 1 2 1 3 4 3 === === === Of course, the single-column select results looks the same as a section header. Is there any escape sequence or other magic I can add to simple table to make sure this doesn't happen? It would be nice if it applied to multi-column tables as well, so I wouldn't have to check in my code if this were a single-column special-case. Use the grid table markup:: ++ | Header row, column 1 | | (header rows optional) | ++ | body row 1, column 1 | ++ | body row 2 | ++ | body row 3 | ++ | body row 4 | ++ See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#tables Maybe we need a more prominent note that the standard RST markup language is documented at the Docutils site. Günter And since you're generating tables, you might take a look at: http://commandline.org.uk/python/restructuredtext-tables-and-doctests/ and a modified version which handles multiline cells here: http://bitbucket.org/khorn/lore2sphinx/src/tip/table.py Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] automodule problem
On Fri, Jan 15, 2010 at 10:35 AM, Chris Withers ch...@simplistix.co.ukwrote: Hi All, Please see this code here: http://packages.python.org/broadwick/_sources/api.txt Which generates a blank page :-( The module I'm trying to autodoc can be found here: http://code.google.com/p/broadwick/source/browse/#svn/tags/1.0.0/broadwick Any idea why nothing is being shown? cheers, Chris Not really, but here's a couple of thoughts: 1. Are you sure the broadwick module is on sys.path when Sphinx is being run? 2. Are you getting any errors from the Sphinx build? 3. Could there be an error in your docstrings that is causing the problem? 4. Have you tried just a vanilla .. automodule:: broadwick without the options? Kevin Horn -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] sphinx-build-script.py hangs
On Fri, Jan 8, 2010 at 3:11 AM, Georg Brandl g.bra...@gmx.net wrote: Am 08.01.2010 09:38, schrieb Okko Willeboordse: Hello, Sometimes our build process 'hangs'. This build process runs the following to generate the documentation; sphinx-build -Eaqb htmlhelp gaius\doc\src gaius\doc\htmlhelp In turn this process runs; C:\Python26\python.exe C:\Python26\Scripts\sphinx-build-script.py -Eaqb htmlhelp gaius\doc\src gaius\doc\htmlhelp Which hangs. Stack of the 1 thread in this hanging process; USER32.dll!UnhookWinEvent+0x61 ntdll.dll!KiFastSystemCallRet mswsock.dll!ServiceMain+0x1e46 WS2_32.dll!recv+0x6f _socket.pyd!init_socket+0x2394 _socket.pyd!init_sockobject+0x366 python26.dll!PyEval_EvalCodeEx+0x738 This process has a TCP socket connection with dinsdale.python.org This probably is the key -- at the moment there is only one thing that could open a network connection during a Sphinx build, and that is the intersphinx extension. I assume it is configured to link to Python standard library objects, for which it needs to fetch the standard library inventory file from docs.python.org (which is hosted on dinsdale.python.org). You can either download that file (http://docs.python.org/objects.inv) and put it somewhere locally, adapting the reference to it in the ``intersphinx_mapping`` config value, or find out why the connection isn't working. cheers, Georg Or, if you don't actually need the intersphinx extension, but have turned it on for some reason, just disable it, of course. Kevin Horn -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Copying Static Files Exception - Access Denied
On Mon, Jan 4, 2010 at 5:00 PM, nickmalcolm nickmalc...@gmail.com wrote: Hi, I am getting an error when running the sphinx builder. I believe it is trying to copy/move an svn folder, which is raising the Access Denied exception. Can I tell Sphinx to skip certain folders, in particular the svn ones? Or tell it to continue after an error? At the moment it gets the error and stops copying files, which is annoying. Check out the documentation here: http://sphinx.pocoo.org/config.html especially the exclude_dirnames option. Hope this helps... Kevin Horn -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Evaluation of documentation tools
On Wed, Dec 23, 2009 at 7:53 AM, Adrian von Bidder avbid...@fortytwo.chwrote: Heyho! I need to do a short evaluation of various documentation tools, preferably OSS ones. I've met sphinx in the TurboGears project, and I think it *might* more or less fit, although it's a bit too techy for our needs. Your comments appreciated. [ even more so if they reach me as cc:'s, though I'll try to remember looking in the list archive. ] I've used Sphinx for all sorts of projects, and It's always worked great for me. ((( perhaps a more or less up to date comparison of such tools exists already? Pointers welcome. ))) We need to produce end user documentation of our software in paper and some kind of HTML snippets for online help. The full online version that Sphinx will produce for free is also appreciated. The part where we're struggling (and why we don't want to continue with plain oo.orgdocuments): * brands (we have OEMs, so we need to produce different versions with the different names of the product and with different screenshots. From what I see I should be able to do this with reST Substitutions, right? Screenshots would probably be just as different directories and a clever build script.) reST substitution should do the trick for text. And I think you're on the right track as far as the screenshots go, too. I use Fabric to do something similar. * translations (ideally we would be able to track which parts of a document -- as include files? -- are out of date in which translation.) Haven't done any translation work with Sphinx. * changes (we work with svn, so we can track changes as is; perhaps somebody even has written some kind of change bars extension? This is not mandatory.) One of the reasons I like sphinx is that the source files are plain text, and are easy to manage is almost any version control system. I'm not entirely sure what you're looking for here. The paper version will have some significance, so basic control of page layout is good, but it sholdn't be overrated; the PDF of sphinx' own manual looks just fine. Don't forget to check out the rst2pdf project, which has a (expermiental) builder to create PDF docs using the ReportLab toolkit. And it will need to be multi-platform. We're a mostly Linux company, but our partners will need to (efficiently) edit text on Windows. What editors do you suggest? And how complicated is it to install the necessary parts for building sphinx documents on Windows? (I think we can live with 'only html' and omit the TeX/PDF toolchain.) I use Sphinx almost exclusively from Windows, and have had no problems. Installing the basics of Sphinx is as easy as: Install Python Install setuptools/distribute Run easy_install sphinx from a command line That will get you all the basic tools that come with the regular Sphinx distribution. You'll be able to generate html and LaTex source files. Turning LaTex files into PDFs on Windows is a trickier proposition. I've managed it, but I don't recommend it. Try the rst2pdf stuff I mentioned above. As far as Editors go, I'm a big fan of SciTE, but Editra also looks pretty nice. Honestly, there's a bajillion and a half decent editors for Windows, free and non-free. I think this comes down to user preference. A propos Tools: * we'll also need to export the current documentation into the new format. Are there tools to produce reST from opendocument text documents? How This might be kind of tricky...I'm currently converting a fairly large corpus of docs from xhtml into reST, and generating reST programmatically isn't the easiest thing in the world. Not impossible, just not easy. Here's an article that addresses this a bit: http://jimmyg.org/blog/2009/my-experience-of-using-restructuredtext-to-write-the-definitive-guide-to-pylons.html And a mailing list thread: http://groups.google.com/group/sphinx-dev/browse_thread/thread/77b0db51eb994775 And the sxw2rst tool here (no idea how well this works): http://docutils.sourceforge.net/docs/user/links.html#import You could also try using an internediate format, like html or docbook, and then converting to rst from there. You then will probably need to hand-edit your reST files to both correct errors, and add some of the Sphinx-specific directives, roles, etc. Or you could build your own converter, if you're a programmer. I recommend converting to some kind of XML format first if you want to go this route. But once it's done, it's very nice! Good luck! Kevin Horn I think the best you are likely to do is a partial conversion -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
Re: [sphinx-dev] Floating sidebar, self toctree
On Thu, Dec 3, 2009 at 12:46 AM, Adam Matan adama...@gmail.com wrote: Hi, Two question which Google search didn't solve: 1. How can I make the sidebar float, i.e. be accessible when scrolling down? Is there a way to control the hierarchy depth displayed in it? You can do this using standard HTML/CSS techniques, so you probably want to create a custom CSS file and maybe a custom Jinja template. (see the Sphinx themeing documentation) 2. I want to display the TOC of the page at its top using the self directive (search sitemap here - http://sphinx.pocoo.org/concepts.html). However, the self directive only displays the page title, not its contents. I have tries to play (or even omit) the maxdepth directive, without results. from the page you referenced: The special entry name self stands for the document containing the toctree directive. So it sounds like the self directive is behaving correctly. I don't really understand what you want to do here. Thanks in advance, Adam Kevin Horn -- You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
[sphinx-dev] Re: Annotated source code
On Mon, Nov 16, 2009 at 12:49 PM, Edward Z. Yang edwardzy...@thewritingpot.com wrote: Does Sphinx have any facilities for generating annotated source code along with documentation? I've always found it really helpful if I could click a little [src] link next to some API documentation and see exactly what the function is, as well as be able to click around the codebase. Edward I'm not aware of anything built into Sphinx to do this, but it should be relatively easy to add. There is an extension to automatically generate links to Epydoc documentation, which you could take a look at for an example of how to do something like this: http://git.savannah.gnu.org/cgit/kenozooid.git/tree/doc/extapi.py Kevin Horn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~--~~~~--~~--~--~---
[sphinx-dev] Re: Section titles not available as links targets?
On Tue, Nov 10, 2009 at 11:44 AM, Chris Withers ch...@simplistix.co.ukwrote: Hi All, Near the end of: http://docutils.sourceforge.net/docs/user/rst/quickstart.html#sections ...it says that section headers are available as list targets. However, that only appears to work if the section header is in the current document. Why is that? How do I link to a section header in another document? cheers, Chris One of docutils limitations (and, I presume, one of the main reasons for creating Sphinx) is that there is no way to interconnect multiple documents in RestructuredText. So in order to do this, you have to use Sphinx-specific markup (which are just extensions to ReST...roles, directives, etc.). Here's the link I think you're looking for: http://sphinx.pocoo.org/markup/inline.html#ref-role Kevin Horn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sphinx-dev group. To post to this group, send email to sphinx-dev@googlegroups.com To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~--~~~~--~~--~--~---