diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
commit | cef58753eba8ad7e2071195dbd92454febe82d32 (patch) | |
tree | df909696e42fb25ce108e30258c7f935ded86079 /support/tex4ebook/README | |
parent | 84465d50d746dfed1bfbe7bb5065279665fa87de (diff) |
CTAN sync 202107270301
Diffstat (limited to 'support/tex4ebook/README')
-rw-r--r-- | support/tex4ebook/README | 61 |
1 files changed, 56 insertions, 5 deletions
diff --git a/support/tex4ebook/README b/support/tex4ebook/README index 3634974ab8..f87bd02f42 100644 --- a/support/tex4ebook/README +++ b/support/tex4ebook/README @@ -46,7 +46,17 @@ But it is optional. You shouldn't need to modify your \TeX\ files ## Available commands -- `\coverimage{coverimage.name}` - include cover image to the document. +- `\coverimage[<graphicx options>]{coverimage.name}` - include cover image to + the document. You can pass the same options as to `\includegraphics` command + in the optional argument. + +For example: + + \thispagestyle{empty} + \begin{document} + \coverimage[scale=0.8]{coverimage.name} % include scaled cover image + ... + \pagestyle{headings} # Command line options @@ -212,6 +222,42 @@ Add item to `<manifest>` section in the `OPF` file. Add `XML` name space to the generated `XHTML` files. Useful in `EPUB 3`. +### Example config file + + \Preamble{xhtml} + \begin{document} + \Configure{DocumentLanguage}{de} + % Use following lines if your document has ISBN: + % \Configure{OpfScheme}{ISBN} + % \Configure{UniqueIdentifier}{3-0000-1111-X} + % Another possibility is URI that points for example to the ebook homepage: + \Configure{OpfScheme}{URI} + \Configure{UniqueIdentifier} + {https://de.wikipedia.org/wiki/Der_achte_Schöpfungstag} + \Configure{CoverMimeType}{image/jpeg} + % If you don't use \coverimage in the document text, + % add cover image using this command: + \CoverMetadata{coverimage.jpg} + % You can also add more authors to your ebook metadata: + \Configure{OpfMetadata} + {\HCode{<dc:publisher>Deutscher Bücherbund</dc:publisher>}} + \Configure{OpfMetadata} + {\HCode{<dc:contributor>Image Artist</dc:contributor>}} + \Configure{OpfMetadata} + {\HCode{<dc:contributor>Trans Lator</dc:contributor>}} + \Configure{OpfMetadata} + {\HCode{<dc:date opf:event='original-publication'>1888</dc:date>}} + \EndPreamble + +Remarks: + +- Leading percent signs in the `.cfg` file introduce comments +- If the unique identifier is a URI which contains diacritical characters, the + equivalent HTML code needs to be inserted. `UTF8` is not recognized at that place. +- `UTF8` characters may be used in the `OpfMetadata` sections. + + + ## Commands available in the config file @@ -229,6 +275,7 @@ Add `XML` name space to the generated `XHTML` files. Useful in `EPUB 3`. *Where do you start an ePUB and what is the `<guide>` section of the `.OPF` file?*^[http://epubsecrets.com/where-do-you-start-an-epub-and-what-is-the-guide-section-of-the-opf-file.php] for some details. Note that `<guide>` is deprecated in `EPUB 3`. + ## Build files `tex4ebook` uses `make4ht`^[https://github.com/michal-h21/make4ht] as a build @@ -254,10 +301,14 @@ See the `make4ht` documentation for an example and more information. The basic support for the Fixed layout EPUB 3 can be enabled using the following configurations: - \Configure{OpfMetadata}{\HCode{<meta property="rendition:layout">pre-paginated</meta>}} - \Configure{OpfMetadata}{\HCode{<meta property="rendition:orientation">landscape</meta>}} - \Configure{OpfMetadata}{\HCode{<meta property="rendition:spread">none</meta>}} - \Configure{@HEAD}{\HCode{<meta name="viewport" content="width=1920, height=1080"/>\Hnewline}} + \Configure{OpfMetadata} + {\HCode{<meta property="rendition:layout">pre-paginated</meta>}} + \Configure{OpfMetadata} + {\HCode{<meta property="rendition:orientation">landscape</meta>}} + \Configure{OpfMetadata} + {\HCode{<meta property="rendition:spread">none</meta>}} + \Configure{@HEAD} + {\HCode{<meta name="viewport" content="width=1920, height=1080"/>\Hnewline}} Modify the dimensions in the `<meta name="viewport>` element according to your needs. |