Rinohtype Versions Save

The Python document processor

v0.5.4

1 year ago

Install from PyPI - documentation

A discussion board has been set up where you can connect with other rinohtype users and the developers!

New Features:

  • Support for sideways figures and tables; these are placed on a separate page, rotated 90 degrees. This is useful for figures/tables that do not fit within the page width. See the float style attribute.
  • The GroupedFlowables same_page style property forces all of a GroupedFlowables' content to be placed on the same page (if possible).
  • Support for OpenType fonts with non-BMP Unicode characters (PR #308 by James Robinson)
  • Heading labels (numbers) can be styled separately by means of the 'heading level X label' selectors for each heading level X.
  • Sphinx Graphviz extension (sphinx.ext.graphviz) support (PR #300 by Daniel Rapp)
  • The StyledText no_break_after style property accepts a list of words after which no line break is allowed. The default is to use a list of words specific to the language configured for the template (articles, prepositions, conjunctions - only provided for English and Czech for now).
  • Footnotes and citations can now optionally be rendered where they are located in the source document instead of as footnotes. This is controlled by the location style property for notes. (issue #269, PR #271 by Alex Fargus)
  • The before and after style properties are now supported on paragraphs too
  • The separator string between an inline admonition title and the admonition text is now specified in the style sheet (after property of the admonition inline title style), so it can be overridden (default: space character).
  • Warn about targets in rinoh_targets that are not defined in rinoh_documents.
  • UpDownExpandingContainer: a container that symmetrically expands both upwards and downwards.
  • Admonition: selectors for the first paragraph where the admonition title was prepended to (e.g. note title paragraph).
  • Support interlaced PNG images (#274). Note that this can slow down rendering significantly for many/large interlaced images.
  • rinoh now accepts the --versions argument, useful for bug reports

Changed:

  • Support for Python 3.6 was dropped (end-of-life in December 2021)
  • Provide a more informative exception message when Pillow cannot be imported.

Fixed:

  • Fix cross-referencing of citations defined in the master Sphinx document
  • ContainerOverflow when rendering (some) labeled flowables near the bottom of the page (issue #315)
  • rinoh crashes with an unhandled exception when the template is not found (issue #291)
  • rinoh --format option is broken (issue #284)
  • Unhandled exception on loading some JPEG images (issue #319)
  • Page breaks for sections following an empty section were not respected.
  • Compatibility with Sphinx 4.4 on Python <3.10 (AttributeError: 'DynamicRinohDistribution' object has no attribute '_normalized_name')
  • In some cases, footnotes referenced in a table were placed on the page preceding the footnote reference.
  • Handle output (PDF, style log and cache) filenames containing a dot in the stem (the final dot and characters following it were interpreted as an extension and dropped)
  • Compatibility with Sphinx 4.3 (crash on rendering object descriptions)
  • Regression in handling of unsupported docutils nodes
  • Crash due to floating point rounding error (PR #302 by Sam Hartman)
  • Setting 'number_format' to none caused a crash; now it causes the caption label to be omitted.
  • Handle citations and corresponding citation references that are not defined in the same source file.
  • Fix error message for --stylesheet argument with relative path (issue #253, PR #266 by Alex Fargus)
  • Descenders affect spacing between top border and content (issue #144)
  • The table of contents (outlines) displayed in PDF readers show garbled text when section titles contain non-ASCII characters.
  • Page templates with a page-filling background cause an infinite rendering loop when placing a footnote.
  • Crash on loading PNGs containing an iTXt chunk (PR #275 by Alex Fargus)
  • Line-wrapped section headings without hyphenation are missing from the page header.
  • Sphinx frontend: inline text marked with the :menuselection: role is not styled (now mapped to the menu cascade style).
  • Typos in code and documentation (PR #277 by Tim Gates, PR #281 by Filipe Tavares)
  • Handle deprecation of importlib SelectableGroups dict interface (Python 3.10 and importlib_metadata 3.6)
  • Handle deprecation of distutils in Python 3.10 (use the packaging package)

Part of the work included in this release was kindly sponsored by Lekis and Railnova.

v0.5.3

2 years ago

Install from PyPI - documentation

New Features:

  • Document part templates now accept a page_number_prefix (StyledText). For example, set page_number_prefix = '{SECTION_NUMBER(1)}-' to prefix the page number with the chapter number. You'll want to use this with the new page break options (see next item).
  • The page_break style attribute now also accepts left restart, right restart and any restart values to restart page numbering
  • The new continue page number format makes it more explicit when to not restart page numbering.
  • Setting the base for a style to NEXT_STYLE proceeds to look up style attributes in the next matching style if they are undefined.
  • The default matcher now defines the table head cell background style.
  • Support True/OpenType fonts with 'Symbol' encoding (e.g. Web/Wingdings)
  • If the RINOH_NO_CACHE environment variable is set, the references cache (.rtc file) won't be loaded nor saved. This is mostly useful for testing.

Changed:

  • Smarter automatic sizing of table columns; don't needlessly pad columns whose contents don't require wrapping.

Fixed:

  • Citation definitions are not output when using sphinx (#262, PR #268 by Alex Fargus)
  • Setting the base for a style to PARENT_STYLE results in a crash.
  • docutils image directive: crash when encountering a width/height containing a decimal point (#251 by Karel Frajtak)
  • docutils inline images don't support width, height and scale options
  • crash on using characters for page numbering (PDF backend)
  • rinoh --install_resources: wrong section numbers when resources need to be installed
  • The style of a heading is influenced by the style defined for the page header
  • A heading is still displayed in the page header even if it doesn't fit on the page and thus moved to the next

Part of the work included in this release was kindly sponsored by Joby Aviation.

v0.5.2

3 years ago

Install from PyPI - documentation

New Features:

  • If the RINOH_SINGLE_PASS environment variable is set, rendering will be stopped after a single pass. This speeds up iteration when tweaking style sheets or templates.
  • Sphinx builder: the rinoh_targets configuration variable allows limiting the documents to a subset of those listed in rinoh_documents.
  • The 'number_format' style property can now also accept styled text strings which replace the auto-numbered label.
  • Document elements (Styled objects) can more easily be matched based on their ID (or 'name' in docutils terms) by means of the has_id selector property.

Changed:

  • docutils/Sphinx frontend: will default to referencing targets by number if possible, even if a custom label is explicitly set. This behaviour can be overridden in the style sheet by setting the type style property to 'custom'.

Fixed:

  • Sphinx style sheet: the object description is always rendered to the right of the signature, no matter how wide the signature is.
  • Incorrect/useless warnings that popped up with release 0.5.1.

Part of the work included in this release was kindly sponsored by Joby Aviation.

v0.5.1

3 years ago

Install from PyPI - documentation

New Features:

  • Paragraphs can now be numbered. rinohtype also allows for referencing them by number, but docutils/Sphinx doesn't readily offer the means express that. A workaround for this will be included in a future release.

Fixed:

  • Fix issues with metadata (title, author) stored in the PDF Info dictionary
  • Fix handling of no-break spaces (they were rendered using the fallback font)
  • When a caption occurs in an unnumbered chapter, an exception aborts rendering (even when number_separator style attribute is set to None)
  • Handling of base template specified as string in a template configuration
  • Table column widths entries now also accept fractions

Part of the work included in this release was kindly sponsored by Joby Aviation.

v0.5.0

3 years ago

Install from PyPI - documentation

New Features:

  • Google Fonts: if a specified typeface is not installed, rinohtype attempts to download the corresponding fonts from Google Fonts. Simply supply the font name as listed on https://fonts.google.com as a value for the typeface style property.
  • Table: in addition to fixed and relative-width columns, you can indicate columns to be automatically sized by specifying a value of 'auto' in the 'column_widths' style parameter in yout style sheet.
  • docutils frontend: support the :align: option to table directives, which will override the alignment set for the table in the style sheet.
  • The starting number of enumerated lists in reStructuredText is respected.
  • Table column widths can be specified in the style sheet, which take effect when these haven't been specified in the source document.
  • Document elements now store where they have been defined (document tree, style sheet file or template configuration file); when you specify relative paths (e.g. for images), they are interpreted relative to the location of their source. This should make things more intuitive.
  • The page_break style attribute is no longer reserved for sections; a page break can be forced before any flowable.
  • Enumerated list items with a hidden label ('hide' style attribute) are no longer counted in the numbering.
  • Templates and typefaces can be registered by name at runtime. This makes them referencable from template configuration and style sheet files. For example, custom templates/typefaces can be imported in a Sphinx project's conf.py (to be documented).
  • It's now possible to add arbitrary reStructuredText content to the front/back matter or elsewhere by adding a .. container:: with the 'out-of-line' class and a :name: to reference it by in the document template configuration, e.g. in the list of front matter flowables (to be documented).
  • Selectors in style sheet files (.rts) now support boolean and 'None' values. For example, you can select StaticGroupedFlowables based on whether they have any children or not: e.g TableCell(empty=true) selects empty table cells.
  • The document's title and author are now stored in the PDF metadata.
  • "0" is now accepted as a valid value for Dimension-type attributes in style sheets and template configurations.

Changed:

  • Rendering speed was more than doubled (caching)! (PR #197 by Alex Fargus)
  • Sphinx frontend: rinoh_documents now takes a list of dictionaries, one for each PDF document to be built. This allows selecting e.g. the template and logo on a per-document level. Support for rinoh_template, rinoh_stylesheet, rinoh_paper_size, rinoh_domain_indices and rinoh_logo was removed. Fallback to latex_documents is retained. (PR #182, #192, #195, #208 and #216 by Alex Fargus)
  • The default stylesheet ('Sphinx') now prevents captions from being separated from their image/table/code block (across pages).
  • Font weights and widths are now internally represented by integer classes. In addition to integer values, string values are still accepted (mapped to classes).
  • OpenTypeFont now determines the font weight, slant and width from the file. For backward compatibility, it still accepts these as arguments on instantiation but warns when they don't match the values stored in the font.

Fixed:

  • Table column width determination was overhauled. Now fixed-width tables are supported and automatic-width columns should be handled better.
  • The 'nested bulleted/enumerated list' selectors were broken; their corresponding styles were never applied
  • Items inside a table cannot be referenced (issue #174)
  • Sphinx frontend: fix handling of relative image paths in .rst files inside a directory in the Sphinx project root
  • rinoh: fix --install-resources (broken since PyPI disabled XMLRPC searches)
  • GroupedLabeledFlowables: respect label_min_width and fix a crash with respect to space_below handling
  • Duplicate rendering of content in columns; if content was too small to fill the first column, it was rendered again in subsequent columns.
  • Crash on encountering a style for which no selector is defined.

Part of the work included in this release was kindly sponsored by Joby Aviation.

v0.5.0-dev.0

3 years ago

v0.4.3.dev4

3 years ago

v0.4.3.dev3

3 years ago

v0.4.3.dev2

3 years ago

v0.4.3.dev1

3 years ago