cargo crowbook 0.8.0

latest releases: 0.16.1, 0.16.0, 0.15.2...
7 years ago

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_configis 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 and html.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 renamed html.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.
  • Bugfixes:
    • Navigation menu of standalone HTML didn't include a call to
      javascript when html.display_chapter was set to true, meaning it
      didn't display the chapter correctly.
    • Implementations of Image and StandaloneImage 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 if crowbook is called from another directory (same fix
      as 0.6's for Epub and LaTeX, which was forgotten for HtmlDir).
  • Internal/API:
    • In order to have better error messages, there was a need to
      refactor the Error type, and make more methods return
      Result<X> instead of X. The API is, therefore, quite modified.
    • Added a Renderer trait used by the various renderers.
    • Removed some methods from public API.

Don't miss a new crowbook release

NewReleases is sending notifications on new releases.