EPUB, EPUB3 templates: Handle structured metadata on titlepage.
Previously we just expected 'title', 'subtitle', 'author', 'date'. Now we still support those, but also support the format recommended for epub metadata in the pandoc README: --- title: - type: main text: My Book - type: subtitle text: An investigation of metadata creator: - role: author text: John Smith - role: editor text: Sarah Jones identifier: - scheme: DOI text: doi:10.234234.234/33 publisher: My Press rights: (c) 2007 John Smith, CC BY-NC ...
This commit is contained in:
parent
7be841cee6
commit
2d5491bc0b
2 changed files with 38 additions and 8 deletions
17
default.epub
17
default.epub
|
@ -17,15 +17,30 @@ $endfor$
|
|||
</head>
|
||||
<body>
|
||||
$if(titlepage)$
|
||||
$for(title)$
|
||||
$if(title.text)$
|
||||
<h1 class="$title.type$">$title.text$</h1>
|
||||
$else$
|
||||
<h1 class="title">$title$</h1>
|
||||
$endif$
|
||||
$endfor$
|
||||
$if(subtitle)$
|
||||
<h1 class="subtitle">$subtitle$</h1>
|
||||
$endif$
|
||||
$for(author)$
|
||||
<h2 class="author">$author$</h2>
|
||||
$endfor$
|
||||
$for(creator)$
|
||||
<h2 class="$creator.type$">$creator.text$</h2>
|
||||
$endfor$
|
||||
$if(publisher)$
|
||||
<p class="publisher">$publisher$</p>
|
||||
$endif$
|
||||
$if(date)$
|
||||
<h3 class="date">$date$</h3>
|
||||
<p class="date">$date$</p>
|
||||
$endif$
|
||||
$if(rights)$
|
||||
<p class="rights">$rights$</p>
|
||||
$endif$
|
||||
$else$
|
||||
$body$
|
||||
|
|
|
@ -22,15 +22,30 @@ $endfor$
|
|||
<body>
|
||||
$if(titlepage)$
|
||||
<section epub:type="titlepage">
|
||||
$for(title)$
|
||||
$if(title.type)$
|
||||
<h1 class="$title.type$">$title.text$</h1>
|
||||
$else$
|
||||
<h1 class="title">$title$</h1>
|
||||
$endif$
|
||||
$endfor$
|
||||
$if(subtitle)$
|
||||
<h1 class="subtitle">$subtitle$</h1>
|
||||
$endif$
|
||||
$for(author)$
|
||||
<h2 class="author">$author$</h2>
|
||||
$endfor$
|
||||
$for(creator)$
|
||||
<h2 class="$creator.type$">$creator.text$</h2>
|
||||
$endfor$
|
||||
$if(publisher)$
|
||||
<p class="publisher">$publisher$</p>
|
||||
$endif$
|
||||
$if(date)$
|
||||
<h3 class="date">$date$</h3>
|
||||
<p class="date">$date$</p>
|
||||
$endif$
|
||||
$if(rights)$
|
||||
<p class="rights">$rights$</p>
|
||||
$endif$
|
||||
</section>
|
||||
$else$
|
||||
|
|
Loading…
Add table
Reference in a new issue