Counters in rst to build in HTML

136 views
Skip to first unread message

Francisco Velázquez

unread,
Jun 24, 2015, 5:36:56 AM6/24/15
to sphin...@googlegroups.com
Hello,

There is no standard counter in reStructuredText. rst2pdf has implemented a :counter: directive to have unlimited number of counters, which works when producing PDF files [1].

sphinx-numfig [2] is a sphinx extension that implements one counter with the :num: directive and it is designed to be used as a figure reference. I have figures and tables in a document, therefore I need two counters.

Does anybody know how can I declare two counters in rst and produce HTML out of it?

Thank you,

Francisco

[1] See the "The counter role" section in https://rst2pdf.googlecode.com/svn/trunk/doc/manual.txt

Takayuki Shimizukawa

unread,
Jun 24, 2015, 5:49:08 AM6/24/15
to sphin...@googlegroups.com
Hi, 

# Please note that this mailing list is for the development of Sphinx; 
# use the sphinx-users mailing list for issues regarding its usage.

I guess you want to use numfig feature since sphinx-1.3.
The feature has 3 counter as: figure, table and code-block.

Please check it.

Regards,
--
Takayuki Shimizukawa

--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Francisco Velázquez

unread,
Jun 24, 2015, 6:01:51 AM6/24/15
to sphin...@googlegroups.com
Thank you, Takayuki.

:numref: seems to be what I need.

#My apologies for posting this topic in the wrong mailing list, but there are no references to the sphinx-users mailing list in http://sphinx-doc.org.
#I suggest the admin of sphinx-doc.org to update it.

Best regards,

Francisco

You received this message because you are subscribed to a topic in the Google Groups "sphinx-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sphinx-dev/rJrRcSgcqR8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sphinx-dev+...@googlegroups.com.

Robert Lehmann

unread,
Jun 24, 2015, 6:04:43 AM6/24/15
to sphin...@googlegroups.com
What exactly did you find insufficient about the sidenote "Questions? Suggestions?" with a sign-up form and a link to the Google group?  (Genuine question.  Did you search for sphinx-* and not find anything helpful?)

Francisco Velázquez

unread,
Jun 24, 2015, 7:05:29 AM6/24/15
to sphin...@googlegroups.com
I was looking for the keyword “mailing list”. I found it only in http://sphinx-doc.org/develop.html. I haven’t used Google Groups before, therefore I didn’t relate Google Group with mailing list and I didn’t try the link in “Questions? Suggestions?". If it has been only me who ended up in the wrong mailing list, I guess it is clear enough, and I just missed it.

I did not search for sphinx-* in the website, but I did it now and it does not return any result for sphinx-users. There are no results for mailing list either. If you search for “sphinx mailing list" in Google, there are not results for sphinx-users in the first page, but only for sphinx-dev.

Best regards,

Francisco

Robert Lehmann

unread,
Jun 24, 2015, 7:35:47 AM6/24/15
to sphin...@googlegroups.com
No, you're not the first one this happened to.  I have submitted PR 1941 to fix the Web site.

Could someone with admin privileges maybe add a description to our sphinx-dev Google Groups?  It indeed turns up when searching for "sphinx mailing list," so we should at least have a disclaimer.  Something like "Discussions on Sphinx core development.  See sphinx-users (https://groups.google.com/forum/#!forum/sphinx-dev) for problems and questions using Sphinx."

Takayuki Shimizukawa

unread,
Jun 24, 2015, 8:24:39 AM6/24/15
to sphin...@googlegroups.com
Hi,

I've merged the PR and I've updated the page of http://sphinx-doc.org
I'll also update the description of sphinx-dev group ASAP.
Thank you to clarify the problem!

--
Takayuki SHIMIZUKAWA

2015年6月24日(水) 20:35 Robert Lehmann <rob...@robertlehmann.de>:

Takayuki Shimizukawa

unread,
Jun 24, 2015, 8:32:38 PM6/24/15
to sphin...@googlegroups.com
> I'll also update the description of sphinx-dev group ASAP.

Done!


2015年6月24日(水) 21:24 Takayuki Shimizukawa <shimi...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages