Re: [sphinx-dev] Linking to external sphinx projects to create multilanguage docs
hm, not enough time to ensure an exactly matching answer -- but as answers are a bit rare here, i'll give it a quick shot: take a look at intersphinx, at the pagename global variable: http://sphinx.pocoo.org/templating.html#pagename or/and at construcs like this for getting "out" of root sphinx dir: {{ pathto(master_doc, 1) }}/../.. also search the googlegroups archives a little, there are a few maybe remotely, but still, related threads. pls tell me what you ended up using: might become interesting for me in the future as well. -paul On 05/26/2011 10:03 PM, guillermooo wrote: Hi, I have two separate Sphinx projects: acme/en acme/es They are symmetric, so any .rst file in acme/en is also present in acme/es. Now I would like to link from any .html file in the build docs from acme/en to the built file with the same name from acme/es, and viceversa. What I want is a hyperlink in the built docs, so I suppose this is a job for templates. For instance, in en/build/html/basic_concepts.html I want a link to es/build/htmlbasic_concepts.html, and viceversa. So I think I need the following: 1) How do I obtain the name of the current (built) document in the template? 2) How do I specify a path relative to a common location for a whole project, like acme/en, the root of one of my projects? I thought "pathto()" would do what I want, but I can't figure out how to make it use the name of the current document. Thanks! Guillermo -- 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] Linking to external sphinx projects to create multilanguage docs
Hi, I have two separate Sphinx projects: acme/en acme/es They are symmetric, so any .rst file in acme/en is also present in acme/es. Now I would like to link from any .html file in the build docs from acme/en to the built file with the same name from acme/es, and viceversa. What I want is a hyperlink in the built docs, so I suppose this is a job for templates. For instance, in en/build/html/basic_concepts.html I want a link to es/build/htmlbasic_concepts.html, and viceversa. So I think I need the following: 1) How do I obtain the name of the current (built) document in the template? 2) How do I specify a path relative to a common location for a whole project, like acme/en, the root of one of my projects? I thought "pathto()" would do what I want, but I can't figure out how to make it use the name of the current document. Thanks! Guillermo -- 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] documenting nested classes
How would I get, either via autodoc or even *not* autodoc, the __eq__() method below to appear in documentation? class SomeFoo(object): class SomeBar(object): def __eq__(self, other): """Compare a frobnozzle to other.""" SomeBar will be autodocumented from a directive such as below: .. autoclass:: mypackage:SomeFoo :members: :show-inheritance: However, there's no way to add any kind of :members: directive for SomeBar, nor is there even a way to include __eq__ explciitly: .. autoclass:: mypackage:SomeFoo :members: :show-inheritance: .. autoclass:: mypackage.SomeFoo.SomeBar .. method:: __eq__ because autoclass can't handle it: autodoc can't import/find class 'mypackage.SomeFoo.SomeBar', it reported error: "No module named SomeFoo", please check your spelling and sys.path I can see .. autoclass:: not understanding traversal into classes (would be nice if that could be supported someday), but it *does* do it selectively - it generates the nested class as a member.But leaves no way at all to control documentation of the nested class. Ideally the whole system here would support arbitrary nesting. But for the moment, I'm really hoping to not put the entire mass of docstrings for my "SomeBar" directly in the .rst file just so this one method can be rendered. -- 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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 26.05.11 00:20, TP wrote: > On Wed, May 25, 2011 at 11:59 AM, Kevin Horn > wrote: >> >> See: http://media.commandline.org.uk/code/table.txt and >> https://bitbucket.org/khorn/lore2sphinx/src/7b0939832687/lore2sphinx/table.py >> >> >> Kevin Horn > > I've never used it but docutils (upon which Sphinx is based) already > has support for "CSV Tables". See > http://docutils.sourceforge.net/docs/ref/rst/directives.html#id1 for > details. Thanks, I will look into both solutions. - -- 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/ iEYEARECAAYFAk3eVioACgkQPUzUEFbILMRXKwCdENhU1fdUEB6oDMFajBI0KKFs dWMAnijcEmIeDYQRdaqZIvbq1j02KhJS =ajfw -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-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.