-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To Include Copyright Notice? #301
Comments
Can you provide some more information, or an example reStructuredText file? Which docutils configuration file are you referring to? Or are you talking about |
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:
Using Sphinx's html builder, this copyright notice is included at the end of each section of the document. I invoke Rinoh with
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
|
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.
This will indeed have the same effect as setting copyright in conf.py.
FYI: Passing
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 [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. |
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?
The text was updated successfully, but these errors were encountered: