Skip to content

Releases: brechtm/rinohtype

Release 0.5.5 (2024-07-13)

13 Jul 15:12
Compare
Choose a tag to compare

Install from PyPI - documentation

Documentation changes:

  • A showcase section was added to the manual to show examples of documents that can be produced by rinohtype.

New Features:

  • Add support for Hungarian language (PR #425 by Pablo Alexis Domínguez Grau)
  • Print alt text instead of error message when failing to render rst :image: directive (PR #410 by Timm638)
  • Support for Spanish section and admonition titles (PR #400 by María Andrea Vignau)
  • Enumerated list item labels now also respect the number_separator style property, enabling hierarchical list item labels (discussion #350).
  • Admonitions now have a 'custom_title_text' property that can be used to style generic admonitions. For example, this style definition applies to .. admonition:: Fun Fact:
    [fun fact admonition : Admonition(custom_title_text='Fun Fact')]
    base = admonition
    border_top = none
    border_bottom = none
    

Changed:

  • handling of localized strings and user-defined strings has been reworked
    • built-in (localized) strings are now indicated by a @ prefix, while user-defined strings have the $ prefix
    • built-in strings can be overridden, and user-defined strings can be set in a template configuration file in the [STRINGS] section (with prefix!)
  • "words" containing spaces (such as paths and URLs) can now be split before each forward slash for line wrapping (#188, #416)
  • Support for Python 3.7 was dropped (end-of-life in June 2023)
  • MyST replaces [recommonmark] (https://github.com/readthedocs/recommonmark) for Markdown support (issues #265 and #370)
  • The Article template has been overhauled. The title page and front matter parts have been removed and their contents are moved to the first content page. This makes the Article template more useful, since it was too similar to the Book template before.
  • Template options whose purpose can also be fulfilled by setting the hide
    style property to true have been removed. The corresponding style definitions are:
    • TitlePageTemplate.show_date: title page date
    • TitlePageTemplate.show_author: title page author
    • Article.table_of_contents: table of contents section

Fixed:

  • Embedding of PDF images produces by Graphviz 10+
  • Google Fonts downloading (google/fonts#7481)
  • Caption labels ("Figure", "Table", "Listing") were not localized
  • Rendering of tables with no body (#420, PR #422 by th0mr)
  • Hyphenation of the first word on a line (#188, #416)
  • AttributeError: 'ZeroWidthSpace' object has no attribute 'hyphenate' (#415, PR #417 by Jack Whitham)
  • Fix a Python 3.12 DeprecationWarning regarding utcfromtimestamp()
  • Sphinx frontend: support the desc_sig_space document node (#414)
  • Hyphenated word split across pages merges with the next word (#388)
  • Compatibility with importlib-metadata 6.0.0 (#389)
  • Document part templates were not retrieved recursively (#379 comment)
  • Listing the installed fonts in a PDF: rinoh --list-fonts <filename>
  • Crash on rendering a heading with an index entry annotation (#369)
  • Crash on encountering a fully-spanned table row (#369)
  • Crash on rendering a figure caption with the default style (#368)
  • Google Fonts fixes
    • Some fonts on Google Fonts have the 'otf' extension (instead of 'ttf'); also collect these.
    • Look recursively for font files in a Google Fonts directory (e.g. Asap fonts are now stored in a deeper directory).

Release 0.5.4 (2022-06-17)

18 Jun 12:55
Compare
Choose a tag to compare

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.

Release 0.5.3 (2021-06-16)

16 Jun 13:04
Compare
Choose a tag to compare

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.

Release 0.5.2 (2021-02-24)

04 Mar 12:40
Compare
Choose a tag to compare

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.

Release 0.5.1 (2021-02-19)

20 Feb 00:23
Compare
Choose a tag to compare

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
.

Release 0.5.0 (2021-02-03)

03 Feb 16:35
Compare
Choose a tag to compare

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

25 Jan 11:00
Compare
Choose a tag to compare
v0.5.0-dev.0 Pre-release
Pre-release
Build wheel workflow: use Poetry to build the wheel

Additionally, check whether the tag matches the package version.

v0.4.3.dev4

18 Jan 16:34
Compare
Choose a tag to compare
v0.4.3.dev4 Pre-release
Pre-release

v0.4.3.dev3

04 Nov 15:44
Compare
Choose a tag to compare
v0.4.3.dev3 Pre-release
Pre-release
Rename SupportingMatter to OutOfLineFlowables

v0.4.3.dev2

26 Oct 16:55
Compare
Choose a tag to compare
v0.4.3.dev2 Pre-release
Pre-release
Sphinx style sheet: Improve definition list styling

Setting label_max_width < label_min_width causes definitions with a
term exceeding label_min_width to be rendered on a separate line.

Definitions used to be rendered like this, but recent changes must
have changed this. This change was not detected because we no longer
have tests in place to detect this regression (see #169).