Discussion:
[Docutils-users] Rinohtype 0.2.0 released
Brecht Machiels
2016-08-10 17:08:39 UTC
Permalink
Hi all,

Rinohtype transforms structured text documents to PDF, styled based on a
document template and style sheet.

I have just released version 0.2.0. Along with many other changes [1], the
included command line tool rinoh that renders reStructuredText documents
has seen some improvements. It now allows specifying a document template
and style sheet to use. It is relatively easy to write your own style
sheet; see the documentation [2] for details.

Quickstart:

pip install rinohtype
rinoh my_document.rst

Please report any problems you may encounter at the project's GitHub page
[3].

Besides the rinoh command-line tool rinohtype also includes a Sphinx
builder which is a drop-in replacement for the LaTeX builder.

Best regards,
Brecht

[1]
http://www.mos6581.org/rinohtype/changelog.html#release-0-2-0-2016-08-09
[2] http://www.mos6581.org/rinohtype/
[3] https://github.com/brechtm/rinohtype/issues


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Paolo Cavallini
2016-08-11 07:07:12 UTC
Permalink
Post by Brecht Machiels
Hi all,
Rinohtype transforms structured text documents to PDF, styled based on a
document template and style sheet.
Thanks Brecht,
looking forward to see it integrated in sphinx. I tried to install it,
but I get a long series of errors [0]
All the best.
===
[0]
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/stylesheets/matcher.py",
line 25
/ ... / StyledText.like('number'),
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/font/opentype/parse.py",
line 70
def context_array(reader, count_key, *indirect_args, multiplier=1):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/font/__init__.py",
line 95
def __new__(cls, name, *fonts, weight_order=FontWeight.values):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/frontend/epub/__init__.py",
line 33
class EPubNode(ElementTreeNode, metaclass=ElementTreeNodeMeta):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/frontend/docbook/__init__.py",
line 20
class DocBookNode(ElementTreeNode, metaclass=ElementTreeNodeMeta):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/frontend/rst/__init__.py",
line 25
class DocutilsNode(TreeNode, metaclass=TreeNodeMeta):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/template.py",
line 93
metaclass=TemplateConfigurationMeta):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/paragraph.py",
line 403
nonlocal state, saved_state, max_line_width, descender
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/backend/pdf/__init__.py",
line 153
def print(self, string):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/backend/pdf/cos.py",
line 337
def __init__(self, *args, indirect=False, **items):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/flowable.py",
line 662
def __init__(self, *args, align=None, width=None, **kwargs):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/attribute.py",
line 62
class OptionSet(AttributeType, metaclass=OptionSetMeta):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/strings.py",
line 43
class Strings(dict, metaclass=WithNamedDescriptors):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/document.py",
line 178
class DocumentPart(object, metaclass=DocumentLocationType):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/dimension.py",
line 53
class DimensionBase(AcceptNoneAttributeType,
metaclass=DimensionType):
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/text.py",
line 497
print(self.ps, file=box_canvas.psg_canvas)
^
SyntaxError: invalid syntax

File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/style.py",
line 404
class Styled(DocumentElement, metaclass=StyledMeta):
^
SyntaxError: invalid syntax

Installing rinoh script to /usr/local/src/py_virtual_experimental/bin
Could not find .egg-info directory in install record for rinohtype
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Brecht Machiels
2016-08-11 07:49:38 UTC
Permalink
Hi Paolo,

Thanks for giving rinohtype a spin.

Rinohtype only supports Python 3.3+. I see you are running it on Python
2.7. I'll see if I can have pip (and easy_install) abort with a clear
error message when someone tries to install it on an unsupported Python
version.

Best regards,
Brecht

On Thu, 11 Aug 2016 09:07:12 +0200, Paolo Cavallini
Post by Paolo Cavallini
Post by Brecht Machiels
Hi all,
Rinohtype transforms structured text documents to PDF, styled based on a
document template and style sheet.
Thanks Brecht,
looking forward to see it integrated in sphinx. I tried to install it,
but I get a long series of errors [0]
All the best.
===
[0]
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/stylesheets/matcher.py",
line 25
/ ... / StyledText.like('number'),
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/font/opentype/parse.py",
line 70
def context_array(reader, count_key, *indirect_args,
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/font/__init__.py",
line 95
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/frontend/epub/__init__.py",
line 33
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/frontend/docbook/__init__.py",
line 20
class DocBookNode(ElementTreeNode,
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/frontend/rst/__init__.py",
line 25
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/template.py",
line 93
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/paragraph.py",
line 403
nonlocal state, saved_state, max_line_width, descender
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/backend/pdf/__init__.py",
line 153
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/backend/pdf/cos.py",
line 337
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/flowable.py",
line 662
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/attribute.py",
line 62
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/strings.py",
line 43
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/document.py",
line 178
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/dimension.py",
line 53
class DimensionBase(AcceptNoneAttributeType,
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/text.py",
line 497
print(self.ps, file=box_canvas.psg_canvas)
^
SyntaxError: invalid syntax
File
"/usr/local/src/py_virtual_experimental/lib/python2.7/site-packages/rinoh/style.py",
line 404
^
SyntaxError: invalid syntax
Installing rinoh script to /usr/local/src/py_virtual_experimental/bin
Could not find .egg-info directory in install record for rinohtype
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Paolo Cavallini
2016-08-11 08:08:23 UTC
Permalink
Post by Brecht Machiels
Hi Paolo,
Thanks for giving rinohtype a spin.
Rinohtype only supports Python 3.3+. I see you are running it on Python
2.7. I'll see if I can have pip (and easy_install) abort with a clear
error message when someone tries to install it on an unsupported Python
version.
Oh, I see. I'll set up a virtualenv with Py3 then.
Thanks.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Paolo Cavallini
2016-08-11 15:47:57 UTC
Permalink
Post by Paolo Cavallini
Oh, I see. I'll set up a virtualenv with Py3 then.
Done, it works reasonably well, but figures are not resized correctly,
and sometimes flow over the borders of the page.
Thanks.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
Brecht Machiels
2016-08-11 16:20:51 UTC
Permalink
Hi,

On Thu, 11 Aug 2016 17:47:57 +0200, Paolo Cavallini
Post by Paolo Cavallini
Post by Paolo Cavallini
Oh, I see. I'll set up a virtualenv with Py3 then.
Done, it works reasonably well, but figures are not resized correctly,
and sometimes flow over the borders of the page.
Thanks.
Are you talking about rinoh or the Sphinx builder?
Did you set a size or scale option for the figures?

Please create a bug report [1] and provide a small example that
illustrates the problem.

Best regards,
Brecht

[1] https://github.com/brechtm/rinohtype/issues


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Paolo Cavallini
2016-08-12 07:03:16 UTC
Permalink
Hi Brecht,
Post by Brecht Machiels
Are you talking about rinoh or the Sphinx builder?
the rinoh Sphinx builder
Post by Brecht Machiels
Did you set a size or scale option for the figures?
I didn't. Just used the same settings as for the Latexpdf builder, with
plain .. image:: directive
Shouldn't rinoh have the same output as the latex one?
What would be the suggested settings?
Post by Brecht Machiels
Please create a bug report [1] and provide a small example that
illustrates the problem.
[1] https://github.com/brechtm/rinohtype/issues
Will do, when I understand the above points.
Thanks.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Brecht Machiels
2016-08-12 14:24:01 UTC
Permalink
Hi Paolo,

On Fri, 12 Aug 2016 09:03:16 +0200, Paolo Cavallini
Post by Paolo Cavallini
Post by Brecht Machiels
Did you set a size or scale option for the figures?
I didn't. Just used the same settings as for the Latexpdf builder, with
plain .. image:: directive
Shouldn't rinoh have the same output as the latex one?
What would be the suggested settings?
Rinohtype respects an image's embedded DPI setting. If no DPI value is
present in the image, a default of 72 DPI is used.

I have tried rendering the Lizmap documentation [1]. I don't suppose it is
this project you tried to render using rinohtype, since it triggers a bug
(#47) aborting the rendering process?

In addition to this bug it revealed another bug (#45) and indeed
illustrates the difference with LaTeX output (#46). I plan to deal with
these issues in a bugfix release 0.2.1 [2]. Please subscribe to these
issues if you wish to receive updates about them. You're also welcome to
share your ideas about #46 by adding comments, of course.

Best regards,
Brecht

[1] https://github.com/3liz/lizmap-documentation
[2] https://github.com/brechtm/rinohtype/milestone/3


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Paolo Cavallini
2016-08-12 14:48:12 UTC
Permalink
Hi Brecht,
Post by Brecht Machiels
Rinohtype respects an image's embedded DPI setting. If no DPI value is
present in the image, a default of 72 DPI is used.
Thanks for the clarification.
Post by Brecht Machiels
I have tried rendering the Lizmap documentation [1]. I don't suppose it is
this project you tried to render using rinohtype, since it triggers a bug
(#47) aborting the rendering process?
Not, I have a variety of docs that I compile often using Sphinx.
Post by Brecht Machiels
In addition to this bug it revealed another bug (#45) and indeed
illustrates the difference with LaTeX output (#46). I plan to deal with
these issues in a bugfix release 0.2.1 [2]. Please subscribe to these
issues if you wish to receive updates about them. You're also welcome to
share your ideas about #46 by adding comments, of course.
[1] https://github.com/3liz/lizmap-documentation
[2] https://github.com/brechtm/rinohtype/milestone/3
Done, thanks.

All the best.
--
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Brecht Machiels
2016-08-19 08:04:28 UTC
Permalink
On Fri, 12 Aug 2016 16:24:01 +0200, Brecht Machiels
Post by Brecht Machiels
I have tried rendering the Lizmap documentation [1]. I don't suppose it is
this project you tried to render using rinohtype, since it triggers a bug
(#47) aborting the rendering process?
In addition to this bug it revealed another bug (#45) and indeed
illustrates the difference with LaTeX output (#46). I plan to deal with
these issues in a bugfix release 0.2.1 [2]. Please subscribe to these
issues if you wish to receive updates about them. You're also welcome to
share your ideas about #46 by adding comments, of course.
Release 0.2.1 [1] fixes these issues. Just like the LaTeX builder, the
rinohtype Sphinx builder now scales down images that are wider than the
text width. However, it does not copy the strange handling of the image
directive's :scale: option [2]. To obtain the same effect, you should pass
a percentage to the :width: option.

Best regards,
Brecht

[1] https://pypi.python.org/pypi/RinohType/0.2.1
[2] https://github.com/sphinx-doc/sphinx/issues/2865

Loading...