How To Include Copyright Notice?
Docutils outputs copyright information from the configuration file, because it appears in the HTML output. That same information does not appear in Rinoh pdf output, at least with standard templates.
How can we get copyright notices into the Rinoh output?
Can you provide some more information, or an example reStructuredText file? Which docutils configuration file are you referring to? Or are you talking about conf.py in Sphinx projects?
I'm sorry - I meant Sphinx, a Sphinx config file. My test document includes three little RsT files containing some text, code, and math. I'm using it to compare the HTML output with Rinoh, rst2pdf, and latex.
I can build the output with Sphinx from the command line without creating a Sphinx config file by using -D setting parameters. I like to avoid using a config file when possible for simplicity, especially when I am doing experiments.
My command line includes a -D parameter for a copyright:
-D "copyright=John X. Doe 2021"
Using Sphinx's html builder, this copyright notice is included at the end of each section of the document. I invoke Rinoh with
-D extensions=rinoh.frontend.sphinx
It builds a good-looking document but no copyright notice appears (I know Rinoh doesn't render math as yet, and I don't expect that). I'd like to include one without using a Sphinx config file. Presumably Sphinx supplies a copyright notice since it appears in the html output.
Pip shows that my Rinoh version is
rinohtype 0.5.3
Sorry for the (very) long delay. A lack of time has prevented me from looking into rinohtype issues the past few months. In case you're no longer experimenting with this, I hope my answers below might still be helpful to others.
My command line includes a -D parameter for a copyright:
-D "copyright=John X. Doe 2021"
This will indeed have the same effect as setting copyright in conf.py.
I invoke Rinoh with
-D extensions=rinoh.frontend.sphinx
FYI: Passing -b rinoh should be enough as Sphinx is able to automatically find the corresponding rinohtype module.
It builds a good-looking document but no copyright notice appears (I know Rinoh doesn't render math as yet, and I don't expect that). I'd like to include one without using a Sphinx config file. Presumably Sphinx supplies a copyright notice since it appears in the html output.
The rinoh builder indeed doesn't do anything by default with the copyright string set for a Sphinx project. It is possible to include the copyright string into the output, however. Where you like this to appear? You could include it on the title page or in the page footer, for example.
Like many things, this isn't properly documented at this point, unfortunately.
Title page
You could for example show it where the author is normally shown by changing the rinoh_documents entries.
rinoh_documents = [
dict(doc='index', target='manual', toctree_only=False,
template='manual.rtt', logo='logo.pdf', author=copyright),
]
I don't think you can set rinoh_documents from the command line, though.
You could also design your own custom document template with a fully customized title page.
Footer
Without going into details, add the following to conf.py to achieve this:
rst_prolog = f".. |copyright| replace:: {copyright}"
or on the command line:
-D "rst_prolog=.. |copyright| replace:: John X. Doe 2021"
Now, in a template configuration, you can insert {UserStrings.copyright} in the footer_text of a page template:
[contents_page]
footer_text = IMAGE('img/company_logo.pdf', width=6mm, baseline=1.5mm)
' {UserStrings.copyright}\t{PAGE_NUMBER} of {NUMBER_OF_PAGES}'
Thank you for this effort! I will need to chew on it and try out some of these things.
Don't hesitate to ask if you get stuck, as much of this isn't properly documented yet.