Package: rinohtype-reloaded
NoteRe-branded asrinohtype-reloaded. As soon as upstream accepts
pending pull requests, this repository might be archived. Re-branded PyPI
versions will however stay forever.Rinohtype is a document processor in the style ofLaTeX. It renders structured
documents to PDF based on a document template and a style sheet. An important
goal of rinohtype is to be more user-friendly than LaTeX. This includes
providing clear error messages and making it very easy to adjust the document
style. See thedocumentationto learn how to customize the style of your
document.Rinohtype is currently in a beta phase and thus not recommended for production
use, but you can use it to explore rinohtype’s features and bugs. I’d highly
appreciate it if you couldcreate a ticketfor any bugs you may encounter.
However, rinohtype is already very capable. Here is a list of its main
features:a powerful page layout system supporting columns, running headers/footers,
floatable elements and footnotessupport for figures, and (large) tablesautomatically generated table of contents and indexautomatic numbering and cross-referencing of section headings, figures and
tablesuse one of the included document templates or create your ownan intuitive style sheet system inspired by CSSmodular design allowing for multiple frontends (such as reStructuredText,
Markdown, DocBook, …)handles OpenType, TrueType and Type1 fonts with support for advanced
typographic features such as kerning, ligatures and small capitalsembeds PDF, PNG and JPEG images, preserving transparency and color profileseasy to deploy; pure-Python with few dependenciesbuilt on Unicode; ready for non-latin languagesRinohtype’s primary input format isreStructuredText. Therinohcommand
line tool renders reStructuredText documents and the includedSphinxbuilder
obsoletes the need for a large LaTeX installation to produce PDF output. Have
a look at therinohtype documentationfor an example of the output.Please, be warned that some older versions of PDF readers have trouble
displaying the PDFs generated by rinohtype (issue 2):pre-37.0 Firefox’s built-in PDF viewer (pdf.js)pre-0.41poppler-based applications such as EvinceRequirementsrinohtype supports Python 3.4 and up. For parsing reStructuredText and
CommonMark documents, rinohtype depends ondocutilsandrecommonmarkrespectively.piptakes care of these requirements when you install rinohtype.
If you want to include images other than PDF, PNG or JPEG, you also need to
installPillow.Getting StartedInstallation is trivial:pip install rinohtypereStructuredText RendererThe easiest way to get started with rinohtype is to render a reStructuredText
document (such asCHANGES.rstfrom this repository) using therinohcommand line tool:rinoh CHANGES.rstWhenrinohfinishes, you will findCHANGES.pdfalongside the input
file.By defaultrinohrenders the input document using the article template. Runrinoh--helpto see how you can tellrinohwhich document template and
style sheet to use.Sphinx BuilderRinohtype can be used as a drop-in replacement for the LaTeX builder (thelatex_documentsconfiguration variable has to be set). You only need to add'rinoh.frontend.sphinx'to theextensionslist inconf.py. With
this in place, you can select therinohbuilder when building the
documentation:sphinx-build -b rinoh . _build/rinohContributingSeeCONTRIBUTING.rst.LicenseAll of rinohtype’s source code is licensed under theAffero GPL 3.0, unless
indicated otherwise in the source file (such ashyphenator.py).The Affero GPL requires for software that builds on rinohtype to also be
released as open source under the same license. For building closed-source
applications, you can obtain acommercial license. The author of rinohtype
is also available for consultancy projects involving rinohtype.Release HistoryRelease 0.3.3 (2019-09-10)Fixed:Just a strange bug fixed to make it working while building Python docs.Re-branded asrinohtype-reloaded.Release 0.3.2.devNew Features:automatically generated lists of figures and tablesparagraphs now provide default tab stops (proportional to font size) for
indentationit is now possible to specify selector priority (+-) in style sheetsSphinx frontend: the rinoh builder can be discovered by entry point
(no more need to add ‘rinoh.frontend.sphinx’ to the list of extensions)rinoh: set a return code of 1 when one or more referenced images could not be
found (issue #104)rinoh: introduce the –install-resources option to control the automatic
installation of resources from PyPIGerman locale (contributed by Michael Kaiser)Polish locale (contributed by Mariusz Jamro)Changed:Python 3.3 is no longer supported since it has reached end-of-liferemove the dependency on purepng by embedding its png.pylimit the width of images to the available width by defaultXML frontend: special case mixed content nodesFixed:Border width is also taken into account for flowables that are continued on a
new page (#127)Sphinx: handle case when source_suffix is a list (PR #110 by Nick Barrett)incompatibility with Sphinx 1.6.1+ (latex_paper_size)docutils: crash when a footnote is defined in an admonition (issue #95)docutils: crash on encountering a raw text role (issue #99)docutils: ‘decoration’ node (header/footer) is not yet supported (issue #112)crash when a table cell contains (only) an imagecolours of PNG images with gamma (gAMA chunk) set are incorrect (#102)Sphinx: image paths with wildcard extension are not supported (#119)Release 0.3.1 (2016-12-19)New Features:rinoh is now also available as a stand-alone application for both Windows
(installer) and macOS (app); they include an embedded CPython installationindex terms can be StyledText now (in addition to str)the ‘document author’ metadata entry can now be displayed using a FieldSphinx frontend: support the ‘desc_signature_line’ node (new in Sphinx 1.5)rinoh –docs: open the online documentation in the default browserChanged:more closely mimic the Sphinx LaTeX builder’s title page (issue #60)there is no default for PageTemplate.chapter_title_flowables anymore since
they are specific to the document templateFixed:handle StyledText metadata (such as document title)Sphinx frontend: support the ‘autosummary_toc’ nodeDummyFlowable now sticks to the flowable following it (keep_with_next), so
that (1) it does not break this behavior of Heading preceding it, and
(2) IndexTargets do not get separated from the following flowablebug in LabeledFlowable that broke keep_with_next behaviorthe descender size of the last flowable in a GroupedFlowables with
keep_with_next=True was getting lostGroupedFlowables should not mark the page non-empty; this caused empty pages
before the first chapter if it is preceded by grouped DummyFlowablesRelease 0.3.0 (2016-11-23)New Features:support localization of standard document strings (en, fr, it, nl) (#53)localized strings can be overridden in the document template configurationmake use of a fallback typeface when a glyph is not available (#55)
(the ‘fallback’ style in the Sphinx stylesheet sets the fallback typeface)template configuration (INI) files: specify which document parts to include,
configure document part and page templates, customize localized strings, …support specifying more complex selectors directly in a style sheet file(figure and table) captions support hierarchical numbering (see CaptionStyle)make the frontends independent of the current working directoryreStructuredText: support the table :widths: option (upcoming docutils 0.13)Sphinx frontend: provide styles for Sphinx’s inline markup rolesrinoh (command line renderer):support template configuration filessupport file formats for which a frontend is installed (see –list-formats)accept options to configure the frontend (see –list-options)option to list the installed fonts (on the command line or in a PDF file)show the current page number as part of the rendering progress indicatorBook template: support for setting a cover pagefrontends: raise a more descriptive exception when a document tree node is
not mappedvalidate the default value passed to an Attributepreliminary support for writing a style sheet to an INI file, listing default
values for non-specified attributes (#23)Changed:rinoh: the output PDF is now placed in the current directory, not in the same
directory as the input fileSphinx builder configuration: replace therinoh_document_templateandrinoh_template_configurationoptions withrinoh_templateif no base is given for a style, style attribute lookup proceeds to look in
the style of the same name in the base style sheet (#66)DEFAULT_STYLE can be used as a base style to prevent style attribute lookup
in the style of the same name in the base style sheetrename FieldList to DefinitionList and use it to replace uses (docutils and
Sphinx frontends) of the old DefinitionList (#54)the new DefinitionList (FieldList) can be styled like the old DefinitionList
by setting max_label_width to None, 0 or a 0-valued Dimensionfigures are now non-floating by default (float placement needs more work)hide the index chapter when there are no index entries (#51)style sheets: use the default matcher if none is specifiedSphinx style sheet: copy the admonition style from the Sphinx LaTeX builderSphinx style sheet: keep the admonition title together with the bodySphinx style sheet: color linked references as in the LaTeX output (#62)Sphinx style sheet: disable hyphenation/ligatures for literal strong textno more DocumentSection; a document now consists of parts (containing pages)template configuration:refer to document part templates by name so that they can be replacedthe list of document parts can be changed in the template configurationdocument parts take the ‘end_at_page’ option (left, right, or any)find (left/right) page templates via the document part name they belong tofall back to <doc_part>_page when the right or left template is not foundeach template configuration requires a nameDocumentTree: make thesource_fileargument optionaldon’t abort when the document section hierarchy is missing levels (#67)use the PDF backend by default (no need to specify it)store the unit with Dimension instances (better printing)rename thefloatmodule toimageFixed:improve compatibility with Windows: Windows path names and file encodingcrash if a StyledText is passed to HeadingStyle.number_separatorGroupedLabeledFlowables label width could be unnecessarily widefix and improve automatic table column sizingFigures can now be referenced using the ‘reference’ format (“Figure 1.2”)HorizontallyAlignedFlowable: make more robustmake document elements referenceable by secondary IDsreStructuredText: only the first classifier for a definition term was shownSphinx frontend: support the ‘centered’ directiveSphinx frontend: basic support for the ‘hlist’ directiveSphinx frontend: handle :abbr: without explanationSphinx frontend: support nested inline nodes (guilabel & samp roles)PDF backend: fix writing of Type 1 fonts from a parsed PDF filePDF reader: handle multi-page PDFs (#71)PDF reader: fix parsing of XRef streamsPDF reader: fix writing of parsed filesRelease 0.2.1 (2016-08-18)New Features:optionally limit the width of large images and make use of this to simulate
the Sphinx LaTeX builder behavior (#46)reStructuredText/Sphinx: support for images with hyperlinks (#49)record the styled page numbers in the PDF as page labels (#41)unsupported Python versions: prevent installation where possible (sdist)
or exit on import (wheel)support Python 3.6Bugfixes:make StyleSheet objects picklable so the Sphinx builder’s rinoh_stylesheet
option can actually be usedFix #47: ClassNotFound exception in Literal_Block.lexer_getter()Fix #45: Images that don’t fit are still placed on the pagedon’t warn about duplicate style matches that resolve to the same styleRelease 0.2.0 (2016-08-10)Styling:generate a style log (show matching styles) to help style sheet developmentkeep_with_next style attribute: prevent splitting two flowables across pagesstylesheets can be loaded from files in INI formatcheck the type of attributes passed to stylessource code highlighting using Pygmentstable of contents entries can be styled more freelyallow hiding the section numbers of table of contents entriesallow for custom chapter titlesselectors can now also select based on document part/sectionvarious small tweaks to selectors and matchersvarious fixes relating to style sheetsTemplates:configurable standard document templates: article and booka proper infrastructure for creating custom document templatessupport for left/right page templatesmake the Article template more configurablepages now have background, content and header/footer layerssupport for generating an indexmake certain strings configurable (for localization, for example)Frontends:Sphinx: interpret the LaTeX configuration variables if the corresponding
rinohtype variable is not setSphinx: roughly match the LaTeX output (document template and style sheet)added a CommonMark frontend based on recommonmarkadded basic ePUB and DocBook frontendsXML frontends: fix whitespace handlingfrontends now return generators yielding flowables (more flexible)Command-line Renderer (rinoh):allow specifying a template and style sheetautomatically install typefaces used in the style sheet from PyPIFonts:typefaces are discovered/loaded by entry pointmore complete support for OpenType fontsfix support for the 14 base Type 1 fontsImages:more versatile image sizing: absolute width/height & scalingallow specifying the baseline for inline imagesseveral fixes in the JPEG readerMiscellaneous:reorganize the Container class hierarchyfixes in footnote handlingdrop Python 3.2 support (3.3, 3.4 and 3.5 are supported)Release 0.1.3 (2015-08-04)recover from the slow rendering speed caused by a bugfix in 0.1.2
(thanks to optimized element matching in the style sheets)other improvements and bugfixes related to style sheetsRelease 0.1.2 (2015-07-31)much improved Sphinx support (we can now render the Sphinx documentation)more complete support for reStructuredText (docutils) elementsvarious fixes related to footnote placementpage break option when starting a new sectionfixes in handling of document sections and partsimprovements to section/figure/table referencesnative support for PNG and JPEG images
(drops PIL/Pillow requirement, but adds PurePNG 0.1.1 requirement)new ‘sphinx’ stylesheet used by the Sphinx builder (~ Sphinx LaTeX style)restores Python 3.2 compatibilityRelease 0.1.1 (2015-04-12)First preview release