2

I recently began using Pandoc to generate PDF files, using the LaTeX engine, from MarkDown source.

Presently, using the book class, I find a distracting attribute of the output is that the major headers are in a more prominent typesetting than even the book title, the former being large and bold, the latter being less large and normal weight.

Following the simple principle that whatever is more important is bigger and heavier, I am surprised to find this result from the tools.

Is this effect normal, or, to anyone, desirable? How might I override or correct it?

For illustration, I processed the text from a classic novel, and included a representation of the result.

Note: I had tried using the KOMA-Script book class, which corrected this effect, though at the expense of making the margins much smaller, whereas the standard class limits the amount of text on each page to a much more manageable quantity. I would wish somehow to marry the best features of each layout.

Title page First page of text

1

You can add things to the preamble using the header-includes field of the pandoc markdown preamble. Then you could include the titling package to style the title page to your liking.

Full text of “A Tale of Two Cities” by Charles Dickens is available from Project Gutenberg.

---
title:  A Tale of Two Cities
author: Charles Dickens
documentclass: book
header-includes:
  \usepackage{titling}
  \pretitle{\begin{center}\Huge\bfseries}
  \posttitle{\end{center}\vspace{0.5em}}
--- 

# The Period

It was the best of times,
it was the worst of times,
it was the age of wisdom,
it was the age of foolishness,
it was the epoch of belief,
it was the epoch of incredulity,
it was the season of Light,
it was the season of Darkness,
it was the spring of hope,
it was the winter of despair,
we had everything before us,
we had nothing before us,
we were all going direct to Heaven,
we were all going direct the other way--
in short, the period was so far like the present period, that some of
its noisiest authorities insisted on its being received, for good or for
evil, in the superlative degree of comparison only.

There were a king with a large jaw and a queen with a plain face, on the
throne of England; there were a king with a large jaw and a queen with
a fair face, on the throne of France. In both countries it was clearer
than crystal to the lords of the State preserves of loaves and fishes,
that things in general were settled for ever.

It was the year of Our Lord one thousand seven hundred and seventy-five.
Spiritual revelations were conceded to England at that favoured period,
as at this. Mrs. Southcott had recently attained her five-and-twentieth
blessed birthday, of whom a prophetic private in the Life Guards had
heralded the sublime appearance by announcing that arrangements were
made for the swallowing up of London and Westminster. Even the Cock-lane
ghost had been laid only a round dozen of years, after rapping out its
messages, as the spirits of this very year last past (supernaturally
deficient in originality) rapped out theirs. Mere messages in the
earthly order of events had lately come to the English Crown and People,
from a congress of British subjects in America: which, strange
to relate, have proved more important to the human race than any
communications yet received through any of the chickens of the Cock-lane
brood.

enter image description here

  • Yes, I am happy to confirm that this works. My original post asks a few related questions. In addition to asking how to change this behavior, I also asked why it is occurring. Is this appearance the default for the book class? Am I naive to some typographical principle behind the decision for a book title smaller than a chapter title? (Also, how is the "Chapter 1" label being generated in your rendering? My results lack it, though I used very similar YAML/MarkDown source files to yours.) – epl Feb 2 at 20:33
  • @epl Yes, this is intended, because the “title page” generated by the book class is actually the half-title (German: Schmutztitel). It is intended that you design the book cover separately. The “Chapter 1” in my example is generated by the book class, however I am using the default pandoc template, so if you are using something else your result might differ. – Henri Menke Feb 2 at 21:16
  • I thought that the book class facilitates professional-looking typesetting without requiring knowledge of or investment in custom art or design. Do I misunderstand the purpose? Is this a difference from the KOMA-Script classes? I feel nervous about taking a template carefully designed by experts, and tweaking it with specific measurements, without properly understanding the underlying considerations. Are solutions available more appropriate to my needs? Is a tutorial available to better understand the basic typesetting concerns needed to use LaTeX or similar tools more effectively? – epl Feb 3 at 19:14
  • @epl If you want to design a book, you should learn about book design, just as you would learn about car repairs before attempting to repair a car. You might want to check out The Elements of Typographic Style. It's a good book, I recommend it. Otherwise there is also the memoir document class which has an extensive manual, containing an introduction to book design including examples of how to apply the design with memoir itself: ctan.org/pkg/memoir – Henri Menke Feb 3 at 20:33
  • Slight misunderstanding. I am looking to write a book, not to design one. So far no design exists, which is why I am lacking a cover as you have described, and ask that LaTeX generate a full title page for me. I need something that requires me to supply only a title, my name, and the text. Best would be a template that meets these needs out of the box, without needing to be tweaked. My ambitions may be more closely analogous to changing fluids in a car, not performing full-scale repairs. A tutorial might be instructive if it can be read in a few sittings at most, compared to a full-size book. – epl Feb 3 at 21:38
0

If you simply want to use scrbook with margins calculated for your page size, you can do something like this:

---
title:  A Tale of Two Cities
author: Charles Dickens
documentclass: scrbook
indent: true
subparagraph: true
classoption:
- fontsize=12pt
- DIV=calc
- headings=normal
--- 

# The Period

It was the best of times,
it was the worst of times,
it was the age of wisdom,
it was the age of foolishness,
it was the epoch of belief,
it was the epoch of incredulity,
it was the season of Light,
it was the season of Darkness,
it was the spring of hope,
it was the winter of despair,
we had everything before us,
we had nothing before us,
we were all going direct to Heaven,
we were all going direct the other way--
in short, the period was so far like the present period, that some of
its noisiest authorities insisted on its being received, for good or for
evil, in the superlative degree of comparison only.

There were a king with a large jaw and a queen with a plain face, on the
throne of England; there were a king with a large jaw and a queen with
a fair face, on the throne of France. In both countries it was clearer
than crystal to the lords of the State preserves of loaves and fishes,
that things in general were settled for ever.

It was the year of Our Lord one thousand seven hundred and seventy-five.
Spiritual revelations were conceded to England at that favoured period,
as at this. Mrs. Southcott had recently attained her five-and-twentieth
blessed birthday, of whom a prophetic private in the Life Guards had
heralded the sublime appearance by announcing that arrangements were
made for the swallowing up of London and Westminster. Even the Cock-lane
ghost had been laid only a round dozen of years, after rapping out its
messages, as the spirits of this very year last past (supernaturally
deficient in originality) rapped out theirs. Mere messages in the
earthly order of events had lately come to the English Crown and People,
from a congress of British subjects in America: which, strange
to relate, have proved more important to the human race than any
communications yet received through any of the chickens of the Cock-lane
brood.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.