title | subtitle | author | date | lang | publisher | license | cover-image | stylesheet |
---|---|---|---|---|---|---|---|---|
From `pandoc` to <span class="tex-logo">ConTeXt</span> |
A Method to Generate High–Quality PDF Documents |
Pablo Rodríguez |
2015 |
en-US |
© 2015 Pablo Rodríguez. Some rights reserved (CC BY–SA 4.0). |
from-pandoc-to-context.svg |
from-pandoc-to-context.css |
rights: |
© Year The Author. All rights reserved.
This book doesn’t constitute legal advice.
...
The sample above assumes that your copyright page contains more than a paragraph. Because of that you need to add the horizontal bar character—`|`—after the metadata field name. All paragraphs that belong to the rights field should be indented with four spaces.
CSS code for that page may be:
.rights { line-height: 120%; text-align: justify; font-size: 95%; text-indent: 0%; page-break-before: always; padding-top: 2%; } }
.rights p { text-indent: 0%; padding-top: 0%; }
`page-break-before: always` is a mandatory attribute, if you require a separate copyright page. Vertical margin after a page break doesn’t work—or at least, it doesn’t work with _Adobe Reader Mobile_. This is the reason why `padding-top` should be specified.
# [Colophon] {.hidden}
This book was generated with `pandoc` (<http://pandoc.org/>) and typeset with <span class="tex-logo">ConTeXt</span> (<http://contextgarden.net/>).
_<span class="tex-logo">TeX</span> Gyre Pagella_, _GFS Didot_ and _Cousine_ were the selected typefaces for the PDF document. [_Tempestiva_](http://www.typographica.tk/#tempestiva) was the deployed font family in the ePub document.
[^minimal-hyphenations]: A minimal sample shows the issue:
```
\setuplanguage
[en]
[patterns={en, agr}]
\setuplanguage
[de]
[patterns={de, agr}]
\setuplanguage
[es]
[patterns={es, agr}]
\mainlanguage
[de]
\setupwhitespace
[big]
\definefontfamily
[mainface]
[rm]
[FreeSerif]
\setupbodyfont
[mainface]
\starttext
\hsize\zeropoint
legible χαλεπα {\agr χαλεπα}
\en legible χαλεπα {\agr χαλεπα}
\es legible χαλεπα {\agr χαλεπα}
\stoptext
```
Hyphenation points for <span lang="grc">χαλεπα</span> are _χα-λε-πα_—as shown in the example.
* German doesn’t hyphenate the unmarked Greek word. German requires a minimum of three letters before and after the hyphenation.
* English doesn’t hyphenate the first syllabe in the untagged Greek word. English requires at three letters after the hyphenation.
* Spanish fully hyphenates the unmarked Greek word. It only requires a minimum of two letters before and after the hyphenation.
I know that χαλεπα should read χαλεπά instead. But otherwise, it won’t be displayed with _<span class="tex-logo">TeX</span> Gyre Pagella_.
[^epub-templates]: Template for ePub version 2: <https://github.com/jgm/pandoc-templates/blob/master/default.epub>.
Template for ePub version 3: <https://github.com/jgm/pandoc-templates/blob/master/default.epub3>.
[^geany-single-command]: There are a couple of things that you have to adjust in your computer:
* XML template name and path. It is wise to keep only a copy of your template on your computer. You can create as many soft links as you need. If you need to replace something in the template, you will have to do it only once.
* _<span class="tex-logo">ConTeXt</span> Suite_ path. You can totally remove this command, if you have the paths of the <span class="tex-logo">ConTeXt</span> version you want to use already specified in your system.
[^enclosing-brackets]: A more complex syntax than braces is the following:
```
\begingroup\de\em Wort\endgroup\ is a German word.
```
It is clearer, since it is harder to be ignored in text. But you also have more characters to type.
[^emphasis-italics]: The command to mark emphasis with italics reads:
```
\setupbodyfontenvironment
[default]
[em=italic]
```