Skip to content

Commit 5e66845

Browse files
committed
Add a very basic regression test for Sphinx domain cross-references
1 parent 3e1944a commit 5e66845

File tree

7 files changed

+1226
-0
lines changed

7 files changed

+1226
-0
lines changed

tests_regression/sphinx/pyref.pdf

25.3 KB
Binary file not shown.

tests_regression/sphinx/pyref.stylelog

+1,086
Large diffs are not rendered by default.
+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/stable/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
# import os
16+
# import sys
17+
# sys.path.insert(0, os.path.abspath('.'))
18+
19+
20+
# -- Project information -----------------------------------------------------
21+
22+
project = 'References'
23+
copyright = '1982, Author'
24+
author = 'Author'
25+
26+
# The short X.Y version
27+
version = ''
28+
# The full version, including alpha/beta/rc tags
29+
release = ''
30+
31+
32+
# -- General configuration ---------------------------------------------------
33+
34+
# If your documentation needs a minimal Sphinx version, state it here.
35+
#
36+
# needs_sphinx = '1.0'
37+
38+
# Add any Sphinx extension module names here, as strings. They can be
39+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40+
# ones.
41+
extensions = [
42+
'sphinx.ext.autodoc',
43+
'sphinx.ext.napoleon',
44+
]
45+
46+
# Add any paths that contain templates here, relative to this directory.
47+
templates_path = ['_templates']
48+
49+
# The suffix(es) of source filenames.
50+
# You can specify multiple suffix as a list of string:
51+
#
52+
# source_suffix = ['.rst', '.md']
53+
source_suffix = '.rst'
54+
55+
# The master toctree document.
56+
master_doc = 'index'
57+
58+
# The language for content autogenerated by Sphinx. Refer to documentation
59+
# for a list of supported languages.
60+
#
61+
# This is also used if you do content translation via gettext catalogs.
62+
# Usually you set "language" from the command line for these cases.
63+
#language = None
64+
65+
# List of patterns, relative to source directory, that match files and
66+
# directories to ignore when looking for source files.
67+
# This pattern also affects html_static_path and html_extra_path .
68+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
69+
70+
# The name of the Pygments (syntax highlighting) style to use.
71+
pygments_style = 'sphinx'
72+
73+
numfig = True
74+
75+
# -- Options for rinohtype PDF output ----------------------------------------
76+
77+
rinoh_documents = [{
78+
'doc': master_doc, # top-level file (index.rst)
79+
'target': 'pyref', # output (target.pdf)
80+
'title': project, # document title
81+
'author': author, # document author
82+
'template': 'template.rtt' # document template
83+
}]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _dimension:
2+
3+
Dimension
4+
=========
5+
6+
.. py:currentmodule:: rinoh.dimension
7+
8+
9+
References
10+
----------
11+
12+
13+
- :py:attr:`rinoh.dimension.PERCENT`, :py:attr:`PERCENT`
14+
- :py:meth:`rinoh.dimension.Dimension.grow`, :py:meth:`Dimension.grow`
15+
16+
17+
Automodule
18+
----------
19+
20+
.. automodule:: rinoh.dimension
21+
:members:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
References
2+
==========
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
:caption: Contents:
7+
:numbered:
8+
9+
dimension
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[STYLESHEET]
2+
name = Sphinx ref
3+
base = sphinx_base14
4+
5+
6+
[title page date : Paragraph('title page date')]
7+
hide = true
8+
9+
[chapter]
10+
page_break = any
11+
12+
[content chapter]
13+
page_break = any
14+
15+
[table of contents section]
16+
page_break = left
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[TEMPLATE_CONFIGURATION]
2+
name=ref
3+
template=book
4+
stylesheet=stylesheet.rts
5+
6+
[contents]
7+
page_number_prefix = '{SECTION_NUMBER(1)}-'
8+
9+
[back_matter]
10+
page_number_prefix = 'I-'
11+
page_number_format = number

0 commit comments

Comments
 (0)