Re: [sphinx-dev] Re: |release| substitution inside a download link

2010-11-10 Thread TP
On Wed, Nov 10, 2010 at 4:08 AM, qx guy  wrote:
> I have the exact same issue using |version|. I want to include it in
> links (which e.g. point from the documentation to online demos which
> follow the same version scheme).
>
> I think there is a general issue with inline markup, where the
> contents of the markup is not interpreted, and as a consequence macros
> are not expanded. This affects probably more than just links. I
> wouldn't mind going to some effort to overcome this, e.g. by using
> reST directives, I just can't think of how :-/.
>
> If anybody has an idea how to "splice" macros into other reST markup,
> I would highly appreciate hearing about this.
>
> Thomas
>
> --
> 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.
>
>

Not sure if this is what you mean but since conf.py is just a Python
file, you can do string substitutions in it.

For example, for I happen to do:

  rst_prolog="""

  .. |versionG|  replace:: :guilabel:`%s`

  """ % (version,)

because I sometimes need to include the version number in :guilabel:
styled text and :guilabel:`blah-|version|` won't work.

So now I can do:

  Right-click :guilabel:`blah-`\ |versionG| to do foo.

As far as links go, you might try this technique in combination with
the sphinx.ext.extlinks – Markup to shorten external links extension.
See http://sphinx.pocoo.org/ext/extlinks.html for details. (Pretty
sure this works for any links not just "external" ones).

-- 
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] captions

2010-11-10 Thread Michael P. Soulier
On 10/11/10 Michael P. Soulier said:

> My figure captions seem to be confusing latex.

The issue seems to be that it's in a longtable context.

\begin{longtable}{|l|l|l|}
\capstart\caption{Protocols and Ports used by MBG} \\
\hline
\endfirsthead

\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline
\endhead

-- 
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] captions

2010-11-10 Thread Michael P. Soulier
My figure captions seem to be confusing latex.

LaTeX Warning: Hyper reference `enterprise:performance-limitations' on page 27 
undefined on input line 1594.

[27]
! Undefined control sequence.
 c...@\@captype 
   
l.1700 \capstart
\caption{Protocols and Ports used by MBG} \\

I'm confused as to why sphinx is producing latex that is confusing latex.

Help appreciated. 

Mike
-- 
Michael P. Soulier 
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein

-- 
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] Any plans for sphinx.ext.mathjax?

2010-11-10 Thread Kevin Dunn
On Wed, Nov 10, 2010 at 10:35, jelkner  wrote:
> I'm a high school teacher with a strong interest in creating a web
> version of the textbooks at http://www.fhsst.org.  I'm also coauthor
> of http://openbookproject.net/thinkcs/python/english2e/, which uses
> sphinx.
>
> I've been reading the discussion on this list regarding mathjax and
> sphinx, but the discussion seems to have died down since August, and I
> notice there is no sign of sphinx.ext.mathjax on:
>
> http://sphinx.pocoo.org/ext/math.html#directive-math
>
> Is it possible that MathJax support will be included in sphinx in the
> not too distant future?  Producing the on-line version of the math
> text will be a large project, and I can't do it without math support.

Hi Jeff,

Here's a way to include MathJax with Sphinx:

http://bitbucket.org/kevindunn/sphinx-extension-mathjax

The code is BSD-licensed (same as Sphinx), and I, for one, would be
happy if the Sphinx maintainers could include it with the base Sphinx
(it would save me from having to add this extension manually to nearly
every document I work on).

Best of luck with your book project,
Kevin

> Thanks!
>
> jeff elkner
> open book project
> http://openbookproject.net
>
> --
> 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.
>
>

-- 
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] Any plans for sphinx.ext.mathjax?

2010-11-10 Thread jelkner
I'm a high school teacher with a strong interest in creating a web
version of the textbooks at http://www.fhsst.org.  I'm also coauthor
of http://openbookproject.net/thinkcs/python/english2e/, which uses
sphinx.

I've been reading the discussion on this list regarding mathjax and
sphinx, but the discussion seems to have died down since August, and I
notice there is no sign of sphinx.ext.mathjax on:

http://sphinx.pocoo.org/ext/math.html#directive-math

Is it possible that MathJax support will be included in sphinx in the
not too distant future?  Producing the on-line version of the math
text will be a large project, and I can't do it without math support.

Thanks!

jeff elkner
open book project
http://openbookproject.net

-- 
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: [rst2pdf] Done fixes for sphinx 1.0.x

2010-11-10 Thread Michael P. Soulier
On Sun, Oct 3, 2010 at 10:28 PM, Michael P. Soulier
 wrote:
> On 03/10/10 Roberto Alsina said:
>
>> Thanks to the generosity of a rst2pdf/sphinx user, I have been sponsored to
>> fix several problems related to rst2pdf and sphinx 1.0.x
>
> My doc still doesn't build.

So I ran a pip install --upgrade rst2pdf to pick up all the latest
dependencies and this situation hasn't changed.

[WARNING] image.py:475 image
/usr/home/msoulier/work/mitel-msl-tug/doc/engguide/corporate_teleworker.png
is too wide for the frame, rescaling
[ERROR] pdfbuilder.py:129 unsupported operand type(s) for +:
'NoneType' and 'int'
Traceback (most recent call last):
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/rst2pdf/pdfbuilder.py",
line 126, in write
docwriter.write(doctree, destination)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/docutils/writers/__init__.py",
line 76, in write
self.translate()
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/rst2pdf/pdfbuilder.py",
line 624, in translate
compressed=self.compressed)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/rst2pdf/createpdf.py",
line 666, in createPdf
pdfdoc.multiBuild(elements)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py",
line 960, in multiBuild
self.build(tempStory, **buildKwds)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/doctemplate.py",
line 880, in build
self.handle_flowable(flowables)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/rst2pdf/createpdf.py",
line 774, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/rst2pdf/flowables.py",
line 555, in add
return Frame.add(self, flowable, canv, trySplit)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/frames.py",
line 159, in _add
w, h = flowable.wrap(aW, h)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/rst2pdf/flowables.py",
line 233, in wrap
return self.t.wrap(w, h)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/tables.py",
line 1113, in wrap
self._calc(availWidth, availHeight)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/tables.py",
line 587, in _calc
self._calc_height(availHeight,availWidth,W=W)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/tables.py",
line 553, in _calc_height
spanFixDim(H0,H,spanCons,lim=hmax)
  File 
"/usr/home/msoulier/envs/sphinx/lib/python2.7/site-packages/reportlab/platypus/tables.py",
line 205, in spanFixDim
t = sum([V[x]+M.get(x,0) for x in xrange(x0,x1)])
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
FAILED
build succeeded.

Build finished. The PDF file is in _build/pdf.

Is this a PIL issue?

Thanks,
Mike

-- 
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: |release| substitution inside a download link

2010-11-10 Thread qx guy
I have the exact same issue using |version|. I want to include it in
links (which e.g. point from the documentation to online demos which
follow the same version scheme).

I think there is a general issue with inline markup, where the
contents of the markup is not interpreted, and as a consequence macros
are not expanded. This affects probably more than just links. I
wouldn't mind going to some effort to overcome this, e.g. by using
reST directives, I just can't think of how :-/.

If anybody has an idea how to "splice" macros into other reST markup,
I would highly appreciate hearing about this.

Thomas

-- 
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.