[sphinx-dev] MathJax (was: Labeling equation terms)

2011-04-20 Thread Guenter Milde
On 2011-04-19, Gokhan Sever wrote:

 Using the latest sphinx checkout and following the latest-build
 documentation on http://sphinx.pocoo.org/latest/ext/math.html

 I have to configure my mathjax path as:
 mathjax_path = '../mathjax/MathJax.js?config=default.js'

 to get it properly working otherwise I get a warning from the mathjax
 for extra configuration.

 This probably needs to be updated in the devel documentation.

The Docutils now support als math with MathJax (however, making the
configuration available from Sphinx is an open task (volunteers?)).

The default mathjax_path is

mathjax_url = ('http://cdn.mathjax.org/mathjax/latest/MathJax.js?'
   'config=TeX-AMS-MML_HTMLorMML')

It uses the public MathJax server network and works out of the box. No
local installation is needed and MathJax also works with local files (as
long as the machine is connected to the internet).

Günter


-- 
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: MathJax (was: Labeling equation terms)

2011-04-20 Thread Gokhan Sever
Hello,

On Apr 20, 12:24 am, Guenter Milde mi...@users.berlios.de wrote:
 On 2011-04-19, Gokhan Sever wrote:

  Using the latest sphinx checkout and following the latest-build
  documentation onhttp://sphinx.pocoo.org/latest/ext/math.html
  I have to configure my mathjax path as:
  mathjax_path = '../mathjax/MathJax.js?config=default.js'
  to get it properly working otherwise I get a warning from the mathjax
  for extra configuration.
  This probably needs to be updated in the devel documentation.

 The Docutils now support als math with MathJax (however, making the
 configuration available from Sphinx is an open task (volunteers?)).

Could you explain what does this mean? and what advantage it will
bring?


 The default mathjax_path is

     mathjax_url = ('http://cdn.mathjax.org/mathjax/latest/MathJax.js?'
                    'config=TeX-AMS-MML_HTMLorMML')

I had to write as below for Sphinx to compile my documentation:

mathjax_path = ('http://cdn.mathjax.org/mathjax/latest/MathJax.js?
config=TeX-AMS-MML_HTMLorMML')


 It uses the public MathJax server network and works out of the box. No
 local installation is needed and MathJax also works with local files (as
 long as the machine is connected to the internet).

 Günter

-- 
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] Sphinx search result showing === and ---

2011-04-20 Thread Jeff McKenna
I was about to ask the same question as Chris: how to not show the raw 
restructured text in Sphinx's search results.  If an html snippet can't 
be shown instead, can I customize the search results to only show the 
page heading name?  (I found one site that does not show the 
restructured text, but shows the page's heading name instead: 
http://docs.geoserver.org/stable/en/user/search.html?check_keywords=yesarea=defaultq=installx=0y=0)


Any thoughts on this issue (showing html instead of rst in search 
results, or, not showing the rst snippet at all, just the heading)?


-jeff



On 11-04-15 9:21 PM, Chris wrote:

I noticed that on the search result page, the snippets include the
markup used to identify various headings in the .rst files. shouldn't
these be hidden to the end user?

For example:
http://sphinx.pocoo.org/search.html?q=doctest+snippet

shows:

sphinx.ext.doctest – Test snippets in the documentation
.. highlight:: rest :mod:`sphinx.ext.doctest` -- Test snippets in the
documentation
=== ..
module:: sphinx.ext.doctest :synopsis: Test snippets in the
documentation. .. index...

and

Changes in Sphinx
:tocdepth: 2 .. _changes: Changes in Sphinx * ..
include:: ../CHANGES...



--
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] Sphinx search result showing === and ---

2011-04-20 Thread Jeff McKenna

I've done some research into this, so I'll reply to my own email:

To modify the search output, you can modify the _static/searchtools.js 
file in your output directory.  If you look at around line#483 of that 
file in a text editor, you can see that it looks in the _source 
directory and crawls the .txt files for the search term.  You can 
change that javascript so it crawls the .html files instead, but the 
same problem will occur: raw html tags will be included in the result 
summary.


You can remove the summary and just show the page name by commenting 
line#486:


  //listItem.append($.makeSearchSummary(data, searchterms, hlterms));

I hope this info helps someone else down the line.

Thanks!

-jeff



On 11-04-20 1:40 PM, Jeff McKenna wrote:

I was about to ask the same question as Chris: how to not show the raw
restructured text in Sphinx's search results. If an html snippet can't
be shown instead, can I customize the search results to only show the
page heading name? (I found one site that does not show the restructured
text, but shows the page's heading name instead:
http://docs.geoserver.org/stable/en/user/search.html?check_keywords=yesarea=defaultq=installx=0y=0)


Any thoughts on this issue (showing html instead of rst in search
results, or, not showing the rst snippet at all, just the heading)?

-jeff



On 11-04-15 9:21 PM, Chris wrote:

I noticed that on the search result page, the snippets include the
markup used to identify various headings in the .rst files. shouldn't
these be hidden to the end user?

For example:
http://sphinx.pocoo.org/search.html?q=doctest+snippet

shows:

sphinx.ext.doctest – Test snippets in the documentation
.. highlight:: rest :mod:`sphinx.ext.doctest` -- Test snippets in the
documentation
=== ..
module:: sphinx.ext.doctest :synopsis: Test snippets in the
documentation. .. index...

and

Changes in Sphinx
:tocdepth: 2 .. _changes: Changes in Sphinx * ..
include:: ../CHANGES...





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