It's better when it's simple

User Tools

Site Tools


latexport Plugin

Structuring dokuwiki to look good both online and printed

Making a satisfactorily structured dokuwiki site to export nicely as a printed document is not hard, provided you follow certain directions:

  • Structure your content with both online and print in mind (read below more about this)
  • Render often the PDF, to keep checking.
  • Start each page with a top heading, which will become the chapter title.
  • Size your images keeping the 240 ppi resolution in mind:
    • 240ppi means that you need 94 pixels to reach a dimension of 1 cms.
    • A4 page is 21cm wide and 29cm tall.

The most important precaution is to render often, and realize errors before you've gone deep into the mud.

The traditional book structure

The traditional page order for books, as suggested by common practice 1), is the following:

  • Front matter
    • Half-title: Usually contains a a picture, the title in fancy letters, and anything you would expect to have in the cover page. This is page 1, and it is a right side page.
    • Empty: This is page 2, and it is a left page. It's the back of the cover page, and usually left blank.
    • Title page: A boring looking but elegant composition with the title (again), the sub-title, the authors, and little else. This is page 3, a right page, and the actual first page of your book.
    • Information (copyright notice, ISBN, etc.). This is page 4, a left side.
    • Dedication if any, else empty. This is page 5, a right side. The idea is that table of contents starts in an even page, as it is not a title.
    • Table of contents
    • List of figures (can be in the backmatter, too)
    • Preface chapter. There can be more than one. You can present the author(s), your intentions, or whatever information relevant to introduce your book.
  • Main matter
    • Main topic, divided in chapters. Optionally, chapters are organized in parts.
  • Appendix
    • Some subordinate chapters
  • Back matter
    • Bibliography
    • Glossary / Index

The latex document sectioning

Latex documents are structured according to the following hierarchy 2):

  • document: This is the highest element. All other are contained in it.
  • matter: There are front matter, main matter and back matter.
  • part: Parts are groups of chapters.
  • chapter: Chapter start in their own page.
  • section: A chapter can have multiple sections.
  • subsection: A section can be divided into sub-sections.
  • subsubsection: Each sub-division is smaller and smaller.
  • paragraph: Small.
  • subparagraph: Smallest.

Exporting dokuwiki into a book

The most straight forward way to structure a website is to have quite a few articles, organized into areas of knowledge. When articles are too long, you may want to split them into sections:

  • Top page:
    • Mathematics
      • The natural numbers
      • The real numbers
      • Arithmetic
        • Summation
        • Substraction
    • Physics
      • Thermodynamics
        • The first law
        • The second law
    • Biology
      • The invertebrate
      • The vertebrate

To export such a structure into a latex book using the plugin create a separate top page with a content similar to:

===== H2 or H3 A Preface Chapter =====
Write here introductory information about your book.
===== H2 or H3 Another preface chapter =====
In case you feel your book needs more introduction.
====== H1 Title of your book ======
===== H2 Mathematics =====
  * [[mathematics:natural-numbers|The Natural numbers]]
  * [[mathematics:real-numbers|The Real numbers]]
==== H3 The Arithmetic ====
  * [[mathematics:arithmetic:summation|Summation]]
  * [[mathematics:arithmetic:substraction|Substraction]]
===== H2 Physics =====
  * [[physics:thermodynamics|Thermodynamics]]
===== H2 Biology =====
  * [[biology:invertebrate|The Invertebrate]]
  * [[biology:vertebrate|The Vertebrate]]

The first H1 marks the starting of the main matter. The preceding H2 are preface chapters. Following H2 are mapped as parts. Standalone links are always one level below the preceding heading. Standalone links below a part are chapters.

To split a chapter into multiple dokuwiki pages, you have two options

  • First option is to directly place a H3 heading to mark a chapter level, so stand-alone links underneath will be sections. I've illustrated this with the Arithmetic chapter.
  • Second option is to keep a single stand-alone link for the whole chapter, but then the chapter page looks like this.
====== H1 Chapter title ======
  * [[physics:thermodynamics:first-law|The first law of thermodynamics]]
  * [[physics:thermodynamics:second-law|The second law of thermodynamics]]

I advise to separate the online top page from the book top page:

  • Because appropriate content of the online top page obeys to other considerations like navigational aids, advertisements, search engine optimization, highlighted content, etc. and you don't want this in your book.
  • Because you probably don't want to make the root page of your book publicly accessible.
  • Finally, in such an extensive body of knowledge as the example above, you may end splitting and

splitting into smaller bits, and yet find your articles too long. If that's the case, and you don't want to revise your ambitions, you may have multiple books and still one single home page.

plugin/latexport/structuring-latex-documents.txt · Last modified: 2021-10-15 17:09 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki