This release adds support for syntax higlighting in code blocks,
customized top and footer blocks for HTML rendering, and the special
import_config
option that allows to import options from another book
file. It also provides (hopefully) better error messages.
- New options:
import_config
is not really an option, but allows to import
another configuration file, useful if you share a same set of
options between multiple books.use_initials
(set to false by default) makes Crowbook use
initials ("lettrines") at start of each chapter. Support is still
experimental.html.highlight_code
(set to true by default) allows syntax
highlighting for code blocks, using highlight.js.html.higlight.css
andhtml.highlight.js
can be used to provide
other themes (default is default.css) and an highlight.js build
that support other languages.html.footer
allows to specify custom footer. If not set,
html.crowbook_link
allows to disable "Generated by Crowbook"
message.html.top
allows to specify a custom header that will be
displayed at the top of HTML file(s).
- Deprecated options:
side_notes
has been renamedhtml.side_notes
.
- Crowbook program:
- All output formats are now rendered concurrently.
- Better error messages. Crowbook now tries to give more information
when displaying an error, with the file name where a problem was
found, and, in some cases, the line. It also tries to detect errors
(such as files not found) sooner. - Some "warning" messages have also been "moved" to error messages, to
make sure they are displayed even when crowbook isn't runned with
--verbose
.
- Rendering:
- Hidden chapter now produce empty
\chapter*{}
and<h1>
in LaTeX
and HTML. This allow to delimit a chapter break even if nothing is
displayed.
- Hidden chapter now produce empty
- Bugfixes:
- Navigation menu of standalone HTML didn't include a call to
javascript whenhtml.display_chapter
was set to true, meaning it
didn't display the chapter correctly. - Implementations of
Image
andStandaloneImage
were reversed in
LaTeX. StandaloneImage
urls were not adjusted (meanning that running
crowbook
from another directory failed).- Image paths are now found correctly in HtmlDir rendering
even ifcrowbook
is called from another directory (same fix
as 0.6's for Epub and LaTeX, which was forgotten for HtmlDir).
- Navigation menu of standalone HTML didn't include a call to
- Internal/API:
- In order to have better error messages, there was a need to
refactor theError
type, and make more methods return
Result<X>
instead ofX
. The API is, therefore, quite modified. - Added a
Renderer
trait used by the various renderers. - Removed some methods from public API.
- In order to have better error messages, there was a need to