This is to ensure a bit more consistency in the ways options are named
and grouped.
Also added a (not very satisfying) way to warn that an option that is
being used is deprecated and should be replaced with the new one.
EPUB renderer needs to specify a mime type for each file in the
manifest. For images, it previously used a simple function which only
worked currently on png, jpg and gif extensions. Using this library
should be more reliable.
It is also a first step in adressing #6.
- Book::new takes an additional `options` parameter.
- Book::new_from_file_with_options becomes `new_from_file`, which got
deleted.
This way, each constructor takes an `options` parameter (which can
be set to `&[]` for default options), allowing derived constructors to
not replicate the setting options code.
This is currently only used to display "–" for list items if lang is
set to "fr", and to default bullets otherwise, but it is now possible
to add more variations.
This option activates or disables the parsing of YAML block. If
disabled, YAML blocks will be ignored and won't be used to try to set
Crowbook's options.
enable_yaml_mode is false by defaut, but set to true when crowbook is
called with `--single`.
When run with --set, Crowbook now sets book options before chapters
are set. This allows to set book_path (or its variants) with --set
(previously it had no effect because it was only in place after the
chapters were parsed.)
Should fix #5.
This option makes LaTeX uses the article class instead of book, and
uses the default \maketitle command for it. This option is set to
false by default, but automatically enabled when runned with
--single.
(This commit also fixes a bug for path resolution when crowbook
is runned in single. Thiss should have been a separate commit, ooops.)
Resolves: #3
By default, links are computed relatively to the Markdown file that
uses them. Setting `base_path` allows to override this behaviour: in
this case, links will be relative to this path.
`base_path` sets the paths both for images and links, but it is
possible to set them independently, respectively with base_path.images
and base_path.links. Note that if base_path is set, these two options
won't be looked at.
Should fix issue #5.
This should allow a single markdown file to link to e.g. a cover file
and still be rendered correctly even if crowbook is called from
another directory.
This option allows Crowbook to parse a single MarkDown file,
defaulting to hide the chapters' headings. This should allow to get
ride of `.book` file for short stories.
Resolves: #2, #3
Previously, it was a debug message, but since it is probable the user
would actually want this to be seen as YAML it's better if the message
is more visible.