Skip to content

Where does a .rtt file need to go? #366

Closed

Description

@techauthoruk

I'm very new to rinohtype, and struggling to get the configuration for my use case just right.

I generate my pdf files using Sphinx (make rinoh) which works absolutely as it should and the pdf is created fine using the book template. however, instead of 'Chapter' appearing I want to use 'Section' instead. I believe I need to create a .rtt file to override the chapter titles as detailed here: http://www.mos6581.org/rinohtype/master/basicstyling.html#configuring-a-template

Fine with that, but I need to save it as (say) book.rtt and then detail this in my Sphinx conf.py file as per the example:

rinoh_documents = [
    dict(doc='index', target='manual', toctree_only=False,
         template='manual.rtt', logo='logo.pdf'),
    dict(doc='ref', target='reference', title='Reference Manual',
         template='reference.rtt', stamp='DRAFT'),
]

This is where I'm getting really confused. I have created a .rtt file, but have two issues:

  1. where does it need to sit?
  2. do I need to have both dict lines (as in the example)

I have put the .rtt file in the same directory as the template files, but when I build, I get an error like:

rinoh.resource.ResourceNotFound: (<class 'rinoh.template.DocumentTemplate'>, 'book.rtt', 'book.rtt')

So obviously my .rtt file is in the wrong place. Apologies for being so dim about this, but can anyone point me in the right direction?

Activity

  1. techauthoruk commented on Oct 6, 2022

    @techauthoruk
    Author

    OK, I said I was dim! Finally figured out that the .rtt file needs to go in the Sphinx source directory.

    All sorted now, so closing this off.

  2. brechtm commented on Oct 6, 2022

    @brechtm
    Owner

    Good to see you've figured it out!

    The .rtt (and .rts) file can go anywhere. The path pointing to it in conf.py just needs to be relative to the directory where conf.py sits. Or I suppose it can be an absolute path, but you'd never want that in practice.

  3. brechtm commented on Oct 6, 2022

    @brechtm
    Owner

    I just want to add that this one of many things that needs to be documented properly!

  4. Repository owner locked and limited conversation to collaborators on Oct 6, 2022
  5. converted this issue into a discussion #367 on Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions