mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 17:02:12 -05:00
Fix up default labels for figures and listings.
This commit is contained in:
1 parent
6c0b4f1933
commit
105122be43
2 files changed
+31
-31
No files matched your search
+1
-1
@@ -74,7 +74,7 @@ class Config(object):
|
||||
numfig_secnum_depth = (1, 'env'),
|
||||
numfig_prefix = ({'figure': l_('Fig. '),
|
||||
'table': l_('Table '),
|
||||
'code-block': l_('List ')},
|
||||
'code-block': l_('Listing ')},
|
||||
'env'),
|
||||
|
||||
# HTML options
|
||||
|
||||
+30
-30
@@ -531,9 +531,9 @@ def test_numfig_without_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 10 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 9 $', True),
|
||||
"span[@class='caption-number']", '^Listing 9 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 10 $', True),
|
||||
"span[@class='caption-number']", '^Listing 10 $', True),
|
||||
],
|
||||
'foo.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -553,13 +553,13 @@ def test_numfig_without_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 4 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 3 $', True),
|
||||
"span[@class='caption-number']", '^Listing 3 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 4 $', True),
|
||||
"span[@class='caption-number']", '^Listing 4 $', True),
|
||||
],
|
||||
'bar.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -575,11 +575,11 @@ def test_numfig_without_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 8 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 5 $', True),
|
||||
"span[@class='caption-number']", '^Listing 5 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 7 $', True),
|
||||
"span[@class='caption-number']", '^Listing 7 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 8 $', True),
|
||||
"span[@class='caption-number']", '^Listing 8 $', True),
|
||||
],
|
||||
'baz.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -587,7 +587,7 @@ def test_numfig_without_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 6 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 6 $', True),
|
||||
"span[@class='caption-number']", '^Listing 6 $', True),
|
||||
],
|
||||
}
|
||||
|
||||
@@ -620,9 +620,9 @@ def test_numfig_with_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2 $', True),
|
||||
],
|
||||
'foo.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -642,13 +642,13 @@ def test_numfig_with_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 1.4 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.3 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.3 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.4 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.4 $', True),
|
||||
],
|
||||
'bar.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -664,11 +664,11 @@ def test_numfig_with_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 2.4 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.3 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.3 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.4 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.4 $', True),
|
||||
],
|
||||
'baz.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -676,7 +676,7 @@ def test_numfig_with_numbered_toctree(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 2.2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.2 $', True),
|
||||
],
|
||||
}
|
||||
|
||||
@@ -801,9 +801,9 @@ def test_numfig_with_secnum_depth(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2 $', True),
|
||||
],
|
||||
'foo.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -823,13 +823,13 @@ def test_numfig_with_secnum_depth(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 1.2.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.1.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.1.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.1.2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.1.2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 1.2.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 1.2.1 $', True),
|
||||
],
|
||||
'bar.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -845,11 +845,11 @@ def test_numfig_with_secnum_depth(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 2.2.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.1.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.1.1 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.1.3 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.1.3 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.2.1 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.2.1 $', True),
|
||||
],
|
||||
'baz.html': [
|
||||
(".//div[@class='figure']/p[@class='caption']/"
|
||||
@@ -857,7 +857,7 @@ def test_numfig_with_secnum_depth(app, status, warning):
|
||||
(".//table/caption/span[@class='caption-number']",
|
||||
'^Table 2.1.2 $', True),
|
||||
(".//div[@class='code-block-caption']/"
|
||||
"span[@class='caption-number']", '^List 2.1.2 $', True),
|
||||
"span[@class='caption-number']", '^Listing 2.1.2 $', True),
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user