mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
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:
@@ -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
|
||||
------
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
.. _baz_a:
|
||||
|
||||
Baz A
|
||||
-----
|
||||
|
||||
|
||||
@@ -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
|
||||
------
|
||||
|
||||
|
||||
@@ -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>`
|
||||
|
||||
Reference in New Issue
Block a user