Sub-sections and sub-chapters?
  • Is there any plans to enable users to have subsections and subchapters?  I find the current two levels a bit limiting.

    Would like to create:
    Section 1
    -Chapter 1
    --Subchapter 1 of Chapter 1
    --Subchapter 2 of Chapter 1
    -Chapter 2
    -Chapter 3
    --Subchapter 1 of Chapter 3
    --Subchapter 2 of Chapter 3
    Section 2
    -Chapter
    -SubSection
    --Chapter
    --Chapter
    ---Subchapter
    -SubSection

    ...and so on
    Post edited by Graabein at 2016-04-30 21:15:05
  • 3 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Graabein,

    This is already possible using Booktype themes and the normal HTML hierarchy of headings from H1 through to H6. For example, you may wish to have a page break before every H2 heading, representing a subchapter, which is possible using theme CSS.

    By default, every chapter is expected to start with a H1 element. You may also wish to show H2 elements in the Table of Contents or PDF bookmarks, which you can do by modifying the mPDF output scripts.

    Cheers!

    Daniel

  • Thanks again, Daniel

    Hmm, this sounds very complicated.  Will these topics be covered in the Booktype manual? And in a way that may be understandable for "ordinary" people who does not know much about how to modify scripts?

    I was hoping it could be possible to just "mouse drag" a chapter in the user interface to make it a subchapter of another chapter.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Graabein,

    It's not likely that standard Booktype will implement sub-chapters in the editor's Table of Contents because this would change a lot of behaviours in the editor.

    If you use the hierarchy of headings from H1 down, you can get the appearance of sub-chapters in the PDF or EPUB output. To modify this appearance, please see lines 64 and 67 of https://github.com/sourcefabric/Booktype/blob/2.0/scripts/booktype2mpdf.php

    Cheers!

    Daniel