From fd4295d3a3f14e6a01b3f4869c127cc63de3b2ad Mon Sep 17 00:00:00 2001 From: a1s Date: Wed, 19 Oct 2016 14:57:20 +0300 Subject: [PATCH 1/6] Support the 'repeat_table_rows' option in the Sphinx extension --- rst2pdf/pdfbuilder.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rst2pdf/pdfbuilder.py b/rst2pdf/pdfbuilder.py index eb78682fc..b6ff1721f 100644 --- a/rst2pdf/pdfbuilder.py +++ b/rst2pdf/pdfbuilder.py @@ -101,6 +101,7 @@ class dummy: compressed=opts.get('pdf_compressed',self.config.pdf_compressed), inline_footnotes=opts.get('pdf_inline_footnotes',self.config.pdf_inline_footnotes), splittables=opts.get('pdf_splittables',self.config.pdf_splittables), + repeat_table_rows=opts.get('pdf_repeat_table_rows',self.config.pdf_repeat_table_rows), default_dpi=opts.get('pdf_default_dpi',self.config.pdf_default_dpi), page_template=self.page_template, invariant=opts.get('pdf_invariant',self.config.pdf_invariant), @@ -485,6 +486,7 @@ def __init__(self, section_header_depth = 2, baseurl = urlunparse(['file',os.getcwd()+os.sep,'','','','']), style_path = None, + repeat_table_rows = False, config = {}): writers.Writer.__init__(self) self.builder = builder @@ -511,6 +513,7 @@ def __init__(self, self.use_numbered_links=use_numbered_links self.fit_background_mode=fit_background_mode self.section_header_depth=section_header_depth + self.repeat_table_rows = repeat_table_rows self.baseurl = baseurl if hasattr(sys, 'frozen'): self.PATH = abspath(dirname(sys.executable)) @@ -617,6 +620,7 @@ def add_template_path(path): highlightlang=self.highlightlang, splittables=self.splittables, style_path=self.style_path, + repeat_table_rows=self.repeat_table_rows, basedir=self.srcdir, def_dpi=self.default_dpi, real_footnotes=self.real_footnotes, @@ -899,6 +903,7 @@ def setup(app): app.add_config_value('pdf_cover_template', 'sphinxcover.tmpl', None) app.add_config_value('pdf_appendices', [], None) app.add_config_value('pdf_splittables', True, None) + app.add_config_value('pdf_repeat_table_rows', False, None) app.add_config_value('pdf_breakside', 'odd', None) app.add_config_value('pdf_default_dpi', 300, None) app.add_config_value('pdf_extensions',['vectorpdf'], None) From e1d2ca540de35b83e09fd6886429ce4ad754d42b Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Tue, 26 Jun 2018 21:44:54 +0100 Subject: [PATCH 2/6] Add test for --repeat-table-rows CLI option --- .../tests/input/test_repeat-table-rows.cli | 1 + .../tests/input/test_repeat-table-rows.txt | 66 ++++++++++++++++++ rst2pdf/tests/md5/test_repeat-table-rows.json | 9 +++ .../reference/test_repeat-table-rows.pdf | Bin 0 -> 15021 bytes 4 files changed, 76 insertions(+) create mode 100644 rst2pdf/tests/input/test_repeat-table-rows.cli create mode 100644 rst2pdf/tests/input/test_repeat-table-rows.txt create mode 100644 rst2pdf/tests/md5/test_repeat-table-rows.json create mode 100644 rst2pdf/tests/reference/test_repeat-table-rows.pdf diff --git a/rst2pdf/tests/input/test_repeat-table-rows.cli b/rst2pdf/tests/input/test_repeat-table-rows.cli new file mode 100644 index 000000000..02e48399c --- /dev/null +++ b/rst2pdf/tests/input/test_repeat-table-rows.cli @@ -0,0 +1 @@ +--repeat-table-rows diff --git a/rst2pdf/tests/input/test_repeat-table-rows.txt b/rst2pdf/tests/input/test_repeat-table-rows.txt new file mode 100644 index 000000000..64212d52c --- /dev/null +++ b/rst2pdf/tests/input/test_repeat-table-rows.txt @@ -0,0 +1,66 @@ +Testing --repeat-table-rows +=========================== + +This table spans two pages. As the ``--repeat-table-rows`` option is enabled, we expect that the header is repeated on page 2. + + +.. widths:: 20 80 + ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Column 1 | Column 2 | ++=============================+============================================================================================================================+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ + diff --git a/rst2pdf/tests/md5/test_repeat-table-rows.json b/rst2pdf/tests/md5/test_repeat-table-rows.json new file mode 100644 index 000000000..01c37ca4b --- /dev/null +++ b/rst2pdf/tests/md5/test_repeat-table-rows.json @@ -0,0 +1,9 @@ +bad_md5 = [ + 'sentinel' +] + +good_md5 = [ + '452f5c9719b0e08c91d4d4bebbedcac6', + 'sentinel' +] + diff --git a/rst2pdf/tests/reference/test_repeat-table-rows.pdf b/r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eat_table_rows Sphinx option --- .../input/sphinx-repeat-table-rows/Makefile | 94 +++++++ .../input/sphinx-repeat-table-rows/conf.py | 232 ++++++++++++++++++ .../input/sphinx-repeat-table-rows/index.rst | 66 +++++ .../input/sphinx-repeat-table-rows/make.bat | 112 +++++++++ .../tests/md5/sphinx-repeat-table-rows.json | 9 + .../reference/sphinx-repeat-table-rows.pdf | Bin 0 -> 35290 bytes 6 files changed, 513 insertions(+) create mode 100644 rst2pdf/tests/input/sphinx-repeat-table-rows/Makefile create mode 100644 rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py create mode 100644 rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst create mode 100644 rst2pdf/tests/input/sphinx-repeat-table-rows/make.bat create mode 100644 rst2pdf/tests/md5/sphinx-repeat-table-rows.json create mode 100644 rst2pdf/tests/reference/sphinx-repeat-table-rows.pdf diff --git a/rst2pdf/tests/input/sphinx-repeat-table-rows/Makefile b/rst2pdf/tests/input/sphinx-repeat-table-rows/Makefile new file mode 100644 index 000000000..280177b45 --- /dev/null +++ b/rst2pdf/tests/input/sphinx-repeat-table-rows/Makefile @@ -0,0 +1,94 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf _build/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html + @echo + @echo "Build finished. The HTML pages are in _build/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml + @echo + @echo "Build finished. The HTML pages are in _build/dirhtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in _build/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in _build/qthelp, like this:" + @echo "# qcollectiongenerator _build/qthelp/issue158.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile _build/qthelp/issue158.qhc" + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex + @echo + @echo "Build finished; the LaTeX files are in _build/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes + @echo + @echo "The overview file is in _build/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in _build/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in _build/doctest/output.txt." + + +pdf: + $(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) _build/pdf + @echo + @echo "Build finished. The PDF files are in _build/pdf." diff --git a/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py b/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py new file mode 100644 index 000000000..822b4d663 --- /dev/null +++ b/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py @@ -0,0 +1,232 @@ +# -*- coding: utf-8 -*- +# +# issue158 documentation build configuration file, created by +# sphinx-quickstart on Tue Aug 18 22:54:33 2009. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.append(os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['rst2pdf.pdfbuilder'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'issue158' +copyright = u'2009, RA' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = 'test' +# The full version, including alpha/beta/rc tags. +release = 'test' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_use_modindex = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'issue158doc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'issue158.tex', u'issue158 Documentation', + u'RA', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_use_modindex = True + +# -- Options for PDF output -------------------------------------------------- + +# Grouping the document tree into PDF files. List of tuples +# (source start file, target name, title, author). +pdf_documents = [ + ('index', u'MyProject', u'My Project', u'Author Name'), +] + +# A comma-separated list of custom stylesheets. Example: +pdf_stylesheets = ['sphinx'] + +# Create a compressed PDF +# Use True/False or 1/0 +# Example: compressed=True +#pdf_compressed=False + +# A colon-separated list of folders to search for fonts. Example: +# pdf_font_path=['/usr/share/fonts', '/usr/share/texmf-dist/fonts/'] + +# Language to be used for hyphenation support +pdf_language="en_US" + +# If false, no index is generated. +pdf_use_index = False + +# If false, no modindex is generated. +pdf_use_modindex = False + +# If false, no coverpage is generated. +pdf_use_coverpage = False + +pdf_verbosity=0 +pdf_invariant = True + + +# If True, then the table header is repeated on tables that cross a page boundary +pdf_repeat_table_rows = True diff --git a/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst b/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst new file mode 100644 index 000000000..64212d52c --- /dev/null +++ b/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst @@ -0,0 +1,66 @@ +Testing --repeat-table-rows +=========================== + +This table spans two pages. As the ``--repeat-table-rows`` option is enabled, we expect that the header is repeated on page 2. + + +.. widths:: 20 80 + ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Column 1 | Column 2 | ++=============================+============================================================================================================================+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Lorem ipsum dolor sit amet. | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla at nunc scelerisque, tempor mauris sit amet, feugiat felis. | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------+ + diff --git a/rst2pdf/tests/input/sphinx-repeat-table-rows/make.bat b/rst2pdf/tests/input/sphinx-repeat-table-rows/make.bat new file mode 100644 index 000000000..bbde51ffc --- /dev/null +++ b/rst2pdf/tests/input/sphinx-repeat-table-rows/make.bat @@ -0,0 +1,112 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +set SPHINXBUILD=sphinx-build +set ALLSPHINXOPTS=-d _build/doctrees %SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (_build\*) do rmdir /q /s %%i + del /q /s _build\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% _build/html + echo. + echo.Build finished. The HTML pages are in _build/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% _build/dirhtml + echo. + echo.Build finished. The HTML pages are in _build/dirhtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% _build/pickle + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% _build/json + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% _build/htmlhelp + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in _build/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% _build/qthelp + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in _build/qthelp, like this: + echo.^> qcollectiongenerator _build\qthelp\issue158.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile _build\qthelp\issue158.ghc + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% _build/latex + echo. + echo.Build finished; the LaTeX files are in _build/latex. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% _build/changes + echo. + echo.The overview file is in _build/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% _build/linkcheck + echo. + echo.Link check complete; look for any errors in the above output ^ +or in _build/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% _build/doctest + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in _build/doctest/output.txt. + goto end +) + +:end diff --git a/rst2pdf/tests/md5/sphinx-repeat-table-rows.json b/rst2pdf/tests/md5/sphinx-repeat-table-rows.json new file mode 100644 index 000000000..4a07ede50 --- /dev/null +++ b/rst2pdf/tests/md5/sphinx-repeat-table-rows.json @@ -0,0 +1,9 @@ +bad_md5 = [ + 'sentinel' +] + +good_md5 = [ + '4a1d9f1f8d9bb1ed4518e43722bfef6f', + 'sentinel' +] + diff --git a/rst2pdf/tests/reference/sphinx-repeat-table-rows.pdf b/rst2pdf/tests/reference/sphinx-repeat-table-rows.pdf new file mode 100644 index 0000000000000000000000000000000000000000..27b43d3405114f99d6670a184e353f29bc16b2f9 GIT binary patch literal 35290 zcmeHQTXWmG5q{UNz>BB$X(aJ3>P#jxu^peL^~p(Wb$UtiKueU(R3ddqs!sYB+PA*< zxAt3-AVG<;6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ze!1u!b-_*$SEUPf(i@(3!A`nhCyz#M*)!0Ec)hv{cCr!dW@m^PTJX#54i90#Xj%Lg z1Kwn75Z}DD6{5Fv!A=^2 z`*guh9u3e!uW!otj62*1x?m?_Ae=7PiHODyClT&SviVuKmNdJK)I30%okTY2@iY&E z(GoQ#A#u$VOk_Hqr$<`Lcj5IQ!{>ogi2Z59_xbXGNt$P)QL-_)hzCLdQsA ztrVJaZrQa$Qx0pT(3Eq_t`(YcSgVAlq=+MJ(3HelDKzEWvTKE=9M(#qDaV7b6`FEb ztAwVch$C&#l*C#oH05{^wn9@5Yo*YX<44#EO*yQULQ_t}kydERVXYFHk|K_@K~oZI zrO=dPkhDTm4r`^*lw**zLQ@WFmC!7&RgpUc1%IyxBL14r-;!7>g{B;Xq>XHL7rA5x zbCz_6OeNWrbDgS`6^ZPq5lw+y30aFfVl_XP+rP>BdIh<9(QjVqC v21_}dmBO;Kk-wIW+yy%+J+NyrO}bzw4M$7Ofi1gWCta|UF4)O;5bWgt<6bYE literal 0 HcmV?d00001 From d6e267eb9d7d1bc509f7e2ddc0591f557b8c7734 Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Sun, 8 Jul 2018 21:20:41 +0100 Subject: [PATCH 4/6] Document Sphinx option pdf_repeat_table_rows --- doc/manual.rst | 3 +++ rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/manual.rst b/doc/manual.rst index f7806a8cd..94050717c 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -1783,6 +1783,9 @@ To use it in your existing sphinx project you need to do the following: # Background images fitting mode pdf_fit_background_mode = 'scale' + # Repeat table header on tables that cross a page boundary? + pdf_repeat_table_rows = True + 3. (Maybe) add this in your Makefile (on unix-like systems): .. code-block:: makefile diff --git a/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py b/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py index 822b4d663..033a4fe65 100644 --- a/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py +++ b/rst2pdf/tests/input/sphinx-repeat-table-rows/conf.py @@ -227,6 +227,5 @@ pdf_verbosity=0 pdf_invariant = True - -# If True, then the table header is repeated on tables that cross a page boundary +# Repeat table header on tables that cross a page boundary? pdf_repeat_table_rows = True From 42e92b0507fcffd5758f13c3c70a25491d0f6424 Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Sun, 8 Jul 2018 21:29:41 +0100 Subject: [PATCH 5/6] Update information text in sphinx-repeat-table-rows.pdf The text now correctly notes that it is the pdf_repeat_table_rows config setting that is used for the Sphinx test. --- .../input/sphinx-repeat-table-rows/index.rst | 6 +++--- .../reference/sphinx-repeat-table-rows.pdf | Bin 35290 -> 35524 bytes 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst b/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst index 64212d52c..c1cefed35 100644 --- a/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst +++ b/rst2pdf/tests/input/sphinx-repeat-table-rows/index.rst @@ -1,7 +1,7 @@ -Testing --repeat-table-rows -=========================== +Testing pdf_repeat_table_rows +============================= -This table spans two pages. As the ``--repeat-table-rows`` option is enabled, we expect that the header is repeated on page 2. +This table spans two pages. As the ``pdf_repeat_table_rows`` setting in ``conf.py`` is set to ``True``, we expect that the header is repeated on page 2. .. widths:: 20 80 diff --git a/rst2pdf/tests/reference/sphinx-repeat-table-rows.pdf b/rst2pdf/tests/reference/sphinx-repeat-table-rows.pdf index 27b43d3405114f99d6670a184e353f29bc16b2f9..2cce3f1ecaed2d1e91eecc85b329dd7e2603b20e 100644 GIT binary patch delta 914 zcmcaLnd!(>rVU3KSuM=ymFd=GrVU3KSLqkk4 vb4v^{3qxZ}F)Zd;07K$l=WP}%@me>W}wWd7*x From 4a47c7c94a36c8a656c200cf517a2824144bf384 Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Mon, 9 Jul 2018 10:44:56 +0100 Subject: [PATCH 6/6] Update MD5 hash for sphinx-repeat-table-rows after updating RST file --- rst2pdf/tests/md5/sphinx-repeat-table-rows.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rst2pdf/tests/md5/sphinx-repeat-table-rows.json b/rst2pdf/tests/md5/sphinx-repeat-table-rows.json index 4a07ede50..872f0aef2 100644 --- a/rst2pdf/tests/md5/sphinx-repeat-table-rows.json +++ b/rst2pdf/tests/md5/sphinx-repeat-table-rows.json @@ -3,7 +3,7 @@ bad_md5 = [ ] good_md5 = [ - '4a1d9f1f8d9bb1ed4518e43722bfef6f', + 'da30b2f9715bfb6473ead66776e86be6', 'sentinel' ]