Merge pull request #2963 from tk0miya/326_numref_section

make section numref-able and allow to refer the captions in linktext
This commit is contained in:
Takeshi KOMIYA
2016-09-21 10:45:57 +09:00
committed by GitHub
12 changed files with 182 additions and 43 deletions
+8
View File
@@ -1,7 +1,11 @@
.. _bar:
===
Bar
===
.. _bar_a:
Bar A
=====
@@ -37,9 +41,13 @@ Bar A
print('hello world')
.. _bar_b:
Bar B
=====
.. _bar_b1:
Bar B1
------
+2
View File
@@ -1,3 +1,5 @@
.. _baz_a:
Baz A
-----
+10
View File
@@ -1,3 +1,5 @@
.. _foo:
===
Foo
===
@@ -16,6 +18,8 @@ Foo
print('hello world')
.. _foo_a:
Foo A
=====
@@ -47,12 +51,18 @@ Foo A
print('hello world')
.. _foo_a1:
Foo A1
------
.. _foo_b:
Foo B
=====
.. _foo_b1:
Foo B1
------
+7
View File
@@ -1,3 +1,5 @@
.. _index:
test-tocdepth
=============
@@ -48,5 +50,10 @@ test-tocdepth
* Table.2.2 is :numref:`Table:%s <table22>`
* List.1 is :numref:`CODE_1`
* List.2.2 is :numref:`Code-%s <CODE22>`
* Section.1 is :numref:`foo`
* Section.2.1 is :numref:`bar_a`
* Unnumbered section is :numref:`index`
* Invalid numfig_format 01: :numref:`invalid <fig1>`
* Invalid numfig_format 02: :numref:`Fig %s %s <fig1>`
* Fig.1 is :numref:`Fig.{number} {name} <fig1>`
* Section.1 is :numref:`Sect.{number} {name} <foo>`