crowbook

Converts books written in Markdown to HTML, LaTeX/PDF and EPUB

LGPL-2.1 License

Stars
729
Committers
20

Bot releases are visible (Hide)

crowbook - 0.16.1 Latest Release

Published by lise-henry about 1 year ago

  • Allow HTML in titles's toc where it's legal to do so in EPUB.
  • Remove some invalid characters in EPUB's XML 1.0
crowbook - 0.16.0

Published by lise-henry about 1 year ago

  • epub.titlepage.xhtml can now be overriden (geobert)
  • Fix an issue where horizontal rules could be interpreted as additional front matter
  • Generated PDF now include some metadata
  • Fix internal links under Windows
crowbook - 0.15.2

Published by lise-henry over 4 years ago

  • Fixed endless progress bar on renderer failure
crowbook - 0.15.1

Published by lise-henry over 4 years ago

  • html.css.colours has been renamed html.css.colors
  • Fixed issue with table of contents page numbers in PDF output
  • Fixed issue with invalid XHTML in EPUB when using description terms
  • Fixed left/right margins in LaTeX (which were reversed)
  • LaTeX outputs of french documents now use enspaces and narrow non-breaking spaces
  • New option:
    • tex:escape_nb_spaces defaults to true and will uses TeX codes to display non-breaking spaces.
crowbook - v0.15.0

Published by lise-henry over 5 years ago

  • Moved from pulldown-cmark to comrak for parsing Markdown. This may have some
    performances drawbacks but allows for a few more features:
    • Description lists
    • Strikethrough
    • Task items
  • New option:
    • crowbook.files_mean_chapters allow to enforce that each files
      means a chapter break or to make sure that it doesn't (by default,
      only true for numbered chapters).
  • Fallback on Rust zip library when there is no zip command.
  • By default, don't add an empty chapter title for non numbered
    "chapters" that don't contain a title.
  • Now uses reqwest instead of hyper to connect to languagetool/grammalecte.
  • hyphenation dependency is now optional.
  • Dependencies update.
  • Fix type deduction issues for new rustc compliler
crowbook - 0.14.1

Published by lise-henry over 6 years ago

  • --stats can now display more statistics when used with the
    --verbose option (if support for advanced statistics is compiled)
  • LaTeX outputs now make uses of user-defined rendering.chapter and
    rendering.part
  • Dependencies update
crowbook - 0.14.0

Published by lise-henry almost 7 years ago

  • New option:
    • autograph is an autograph added after title.
  • User interface:
    • new argument --autograph prompts for an autograph.
    • --list-options and --stats now use colours if available.
    • options description with --list-options are now wrapped.
  • Bugfixes:
    • Preserve errors/warnings order with fancy UI.
    • Clean secondary bar when there is an error instead of hanging the UI.
    • LaTeX: fancy headers only applies to fancy pages (not chapter pages).
crowbook - 0.14.0 beta

Published by lise-henry about 7 years ago

  • Bugfixes:
    • EPUB: escape quotes in content.opf.
    • LaTeX/PDF: allow hyphenations in typewriter font.
  • User interface:
    • User interface is quite fancier, with progress bars and all
    • Debug/warning/info levels should be displayed in a more coherent manner
    • New --no-fancy option if you don't like the fancy UI (or if it doesn't work
      in your terminal)
    • New --force-emoji option to force emoji usage.
  • Library interface:
    • Removed Book::set_verbosity method (uses a logger library instead).
  • Now requires rustc >= 1.20.0
crowbook - 0.13.0

Published by lise-henry over 7 years ago

  • Breaking changes:
    • The template.tex template was quite modified. Crowbook now
      uses custom command for most markdown elements, defined in the
      template. This allow an user to redefine the way the book is
      rendered without having to modify Crowbook itself. Unfortunately,
      as tex templates for previous Crowbook versions won't work anymore.
    • the resources.files option is now a YAML list of strings, instead of a
      comma-seprated string.
  • Add support for grammalecte grammar checker.
  • crowbook command takes a new argument, -S or --stats which
    displays stats on the book (currently, words and characters count).
  • Interactive fiction:
    • Added conditional blocks.
  • Options:
    • output.xxx options can now take the "auto" value, which will infer the
      output file name based on the book file name.
    • output is a new option that can specify a series of format to
      render, with default output file name.
    • proofread.grammalecte and proofread.grammalecte.port allow
      respectively to enable grammar checking with Grammalecte and
      (optionnally) to specify the port to connect.
    • tex.margin.left, tex.margin.right, tex.margin.bottom and
      tex.margin.top are new options that allow to specify margins
      for LaTeX/PDF outputs.
    • tex.paper_size was renamed tex.paper_size.
  • HTML:
    • Add JSON-LD structured data to the book's HTML files.
  • Bugfixes:
    • LaTeX: fix rendering of part/chapter (part previously displayed as
      chapter and its first chapter as part)
    • EPUB:
      • Fix .rule so it is centered despite KOBO CSS injection.
    • Fix resources/images inclusion when they are symlinks to the
      actual file.
crowbook - 0.12.0

Published by lise-henry over 7 years ago

This release includes a few new features, such as the possiblity to
include Markdown files as section/subsections and not only as chapter,
experimental support for superscript and subscript, and yet more
experimental support for writing interactive fiction.

  • Book configuration file:
    • It is now possible to include subchapters using the -- command
      (with one dash per sublevel: --- foo.md will include foo.md as
      a subsection).
  • Markdown:
    • Added support for superscript and subscript features, using
      respectively foo^up^ or bar~down~ syntax.
  • New options:
    • rendering.chapter: change what is displayed in place of
      "chapter".
    • rendering.part: change what is displayed in place of "part".
    • html.chapter.template and html.part.template allow to tune a
      little how the chapters and parts are displayed in HTML.
    • tex.hyperref, if set to false, will disable hyperrefs for
      local links. Can be useful for some files.
    • crowbook.html_as_text, if set to false, will not treat HTML as
      text but ignore it.
    • subtitle, as its name suggest, set the subtitle of a book.
    • crowbook.markdown.superscript can enable or disable superscript/subscript "extension".
  • Rendering:
    • Change the way chapters are displayed by default.
    • PDF output now has a better-looking (hopefully) title page.
    • Internal links are a bit more flexible, e.g. if you link to
      Readme.html it will now try to link to the chapter corresponding
      to Readme.md.
  • Bugfixes:
    • LaTeX:
      • Fix bug in syntax highlighting.
      • Fix label placements (and thus navigation inside PDF document).
    • EPUB:
      • Add unnamed but numbered chapters to the TOC.
      • Fix HTML escaping issue for chapter titles.
      • Fix the way parts were handled in the TOC.
    • Book configuration file:
      • Fix issue when setting custom number for parts.
  • Crowbook now requires rustc >= 1.17.0
crowbook - 0.11.4

Published by lise-henry over 7 years ago

  • An image can now be considered standalone even if it is inside a
    link.
  • Bugfixes:
    • HTML/EPUB: use raw (not HTML rendered) metadata in the places
      where HTML code is not appropriate. Templates can use this
      metadata with the foo_raw value.
    • HTML/EPUB: fix double-escaping/rendering issues in titles.
    • EPUB:
      • Escape title and author before feeding them to epub-builder.
      • Fix content.opf issue by not rendering first
        chapter's title (marked as beginning of document) in <guide>.
  • Rendering:
    • HTML/EPUB: standalone images are now displayed centered.
crowbook - 0.11.3

Published by lise-henry over 7 years ago

  • When crowbook parses the book's contents, it now detects which
    features are used. This is useful in various ways:
    • The ODT renderer only displays a global warning showing the lists of
      used features that are not implemented, instead of a warning each
      time such a feature is encountered.
    • The LaTeX and HTML/EPUB renderers only initialize syntect (which
      can take some time) if code blocks are used in the document.
    • The LaTeX renderer only requires LaTeX packages that are actually
      used in the document.
  • Command-line interface:
    • Warnings are now displayed by default.
    • The (undocumented) --debug argument has been removed.
    • The status of some messages have been modified ("warning" to
      "debug" or "error" to "warning").
  • Deprecated option:
    • crowbook.verbose has been deprecated, at it should be set by the CLI.
crowbook - 0.11.2

Published by lise-henry over 7 years ago

  • General:
    • When there is an error setting an option from the book configuration
      file (e.g. because it is an invalid key), print an error but do not
      abort, only ignore this specific option.
  • New options:
    • tex.stdpage: if set to true, will use the stdpage package to
      render the book according to standards for submitting manuscripts.
    • rendering.highlight.theme allows to specifies a theme for syntax
      highlighting (only used if rendering.highlight is set to
      "syntect").
    • html.highlight.theme, epub.highlight.theme and
      tex.highlight.theme allow to specify a theme for
      HTML/EPUB/LaTeX renderers (only used with syntect).
  • Deprecated option:
    • proofread.nb_spaces.
  • Rendering:
    • [syntect](https://crates.io/crates/syntect) is now the default
      for rendering.highlight. Concretely, this means that by default
      syntax highlighting is now done when crowbook is run instead of
      using [highlight.js](https://highlightjs.org/).
    • EPUB:
      • Now sets the "cover-image" property and meta so readers should
        display cover correctly.
      • Narrow non-breaking spaces should display more correctly on KOBO
        ereaders (hoping this won't break the way they are displayed
        everywhere else).
  • Proofreading:
    • Repetition detection is now a bit less of an hack, and should
      cause less problems when used in conjunction with grammar
      checking. It now also works on PDF output (so the way it is
      highlighted could be improved).
  • Bugfixes:
    • Fix mimetype of EPUB files (make sure it is always "stored" and
      not "deflated" by the zip command).
    • Avoid initializing syntect (at the cost of performances) if it
      is not used.
    • Avoid creating an empty file if some book renderer fails
      (e.g. EPUB or ODT because zip command is not present).
crowbook - 0.11.1

Published by lise-henry almost 8 years ago

  • Rendering:
    • Avoid page break before or after a separating rule.
    • Add support for syntect for
      syntax highlighting. This is activated by setting
      rendering.highlight to syntect (see below).
    • EPUB:
      • Set back HTML escape of narrow non-breaking spaces to true
        by default (it caused problems on some readers, but cause
        much more serious one if false).
      • Add more information to guide/nav landmarks.
    • LaTeX/PDF:
      • Improve the way code blocks are displayed, using the
        mdframed package.
      • Try to reduce the issues of too long lines when using code
        and code blocks, by inserting \allowbreak{} directive
        after some characters (., /, _, ...).
      • Block quotes are now displayed in italics.
      • Tables now use tabularx, which allows to break too long
        lines (it still doesn't break pages, though).
  • New options:
    • rendering.highlight can be set to none, highlight.js (by
      default, enables syntax highlighting via Javascript, but only on
      HTML document) or syntect (doesn't necessitate javascript, and
      can work in EPUB or LaTeX, but more experimental at this point).
  • Deprecated options:
    • html.highlight_code (use rendering.highlight instead).
  • Bugfixes:
    • HTML (standalone): fix the template that contained invalid HTML code.
crowbook - 0.11.0

Published by lise-henry almost 8 years ago

Substantial changes in this release, the more important one being
support for parts!

  • Breaking changes: the API has undergone some breaking changes,
    hoping they will be the last ones for a while. API should now be
    more simple and consistent (?). This version contains also
    substantial options renaming (see below).
  • Crowbook now supports parts (above the "chapter" level), using the
    '@' character in the book configuration file.
  • Command-line interface:
    • Behaviour of --to should now be consistent for all output
      formats.
    • If --output is set to -, prints to stdout.
    • Conversely, if <BOOK> is set to -, reads from stdin.
    • Path specified by --output is now interpreted relatively to
      current directory (and not depending on where <BOOK> is or its
      options).
  • Rendering:
    • Chapters with no titles now have an empty title added (so it can
      at least display e.g. "Chapter X").
    • EPUB:
      • The toc.ncx file now displays links to "title" and (if set)
        "cover" (can be deactivated, see below).
      • The toc.ncx file now displays toc levels below chapter.
      • The table of contents is now displayed inline if
        rendering.inline_toc is set to true.
  • New options:
    • epub.toc.extras, set to true by default, will add links to the
      title and the cover (if it is set) in the table of contents.
    • epub.escape_nb_spaces, similar to html.escape_nb_spaces and
      set to false by default since at least Kobo reader don't seem to
      be able to understand the CSS to escape those nb spaces...
    • rendering.chapter.roman_numerals, if set to true, will display chapter
      numbers using roman numerals.
    • rendering.part.roman_numerals, if set to true (it is by
      default) will display part numbers using roman numerals.
    • rendering.part.template specifies the numbering scheme of parts.
    • rendering.part.reset_counter, if set to true (it is by
      default), resets chapter number to zero after a part.
  • Renamed options:
    • import_config renamed to import.
    • rendering.chapter_template renamed to rendering.chapter.template.
    • html_single.html renamed to html.standalone.template.
    • html_single.js renamed to html.standalone.js.
    • html_single.one_chapter renamed to html.standalone.one_chapter.
    • output.html_dir renamed to output.html.dir.
    • output.proofread.html_dir renamed to output.proofread.html.dir.
    • html_dir.index.html and html.dir.chapter.html have been merged
      and both renamed to html.dir.template.
    • tex.font_size renamed to tex.font.size.
  • Bugfixes:
    • EPUB:
      • Fix duplicate HTML escaping (resulting in e.g. "&" instead
        of "&").
    • HTML directory:
      • Fix panic when trying to generate html directory in "../xxx"
        (#23).
      • Fix "previous chapter" links that were not displayed when
        "html.header" was set.
    • HTML:
      • Fix the way initial letter is displayed if rendering.initials
        is true.
  • Internationalization:
    • Strings in generated Crowbook documents (such as "Table of
      contents", "Title", "Cover" and such) are now translated in spanish.
crowbook - 0.10.4

Published by lise-henry almost 8 years ago

  • New options:
    • tex.font_size specifies an optional font size (in pt) passed to
      the LaTeX class (must be 10, 11 or 12).
    • tex.title can be set to false to avoid rendering the title
      with \maketitle.
    • tex.paper_size specifies the paper size for PDF output.
    • tex.template.add, html.css.add and epub.css.addallow to
      specify inline LaTex or CSS code in the book configuration file
      that will be added respectively to tex.template.add,
      html.css.add and epub.css.add.
    • html.icon allows to specify the path of an icon for HTML documents.
  • Command-line interface:
    • Paths that are displayed should now be normalized,
      e.g. "foo/bar.pdf" instead of "baz/../foo/bar.pdf".
  • Rendering:
    • HTML:
      • The default CSS style has been slightly modified.
crowbook - 0.10.3

Published by lise-henry almost 8 years ago

  • Building:
    • Crowbook now requires rustc >= 1.13.0 to build.
    • Pre-built binaries now all include the proofreading feature.
    • Linux binaries are now linked against musl library so they
      should really work on any Linux platform.
  • Bugfixes:
    • Fixed escaping of author and title fields.
    • Fixed text cleaning in ODT rendering that causes corrupt files to
      be generated.
  • CommandLine Interface:
    • Crowbook displays clearer error messages when unable to launch
      latex or zip commands.
    • Crowbook uses term library in order to display colours correctly
      on e.g. Windows.
    • The new argument --lang (or -L) allows to set the runtime
      language used by Crowbook, overriding LANG environment variable.
    • --list-options no longer uses colours as it caused problems
      depending on the terminal or when piping to less.
crowbook - 0.10.2

Published by lise-henry almost 8 years ago

Only minor changes in this version:

  • Options:
    • author and title's default values are both set to the empty
      string, instead of Anonymous and Untitled.
    • input.autoclean has been renamed input.clean.
    • input.smart_quotes has been renamed input.clean.smart_quotes.
    • new option: input.clean.ligature.dashes will (if set to true)
      replace -- to en dash () and --- to em dash ().
    • new option: input.clean.ligature.guillemets will (if set to true)
      replace << and >> to french guillemets (« and »).
  • Rendering:
    • HTML: if html_single.one_chapter and rendering.inline_toc are
      both set to true, only render the TOC if currently displayed
      chapter is the first.
crowbook - 0.10.1

Published by lise-henry about 8 years ago

Fixed a bug in fr.po translation that prevented building from fresh install.

Since there are no other changes besides that, for the binaries, see the 0.10.0 release, which should not have been affected by this issue.

crowbook - 0.10.0

Published by lise-henry about 8 years ago

This release contains some breaking changes (mostly for the API, which has been split in separate libraries). It alse features some internationalization support, and the program should now be tranlated if your LANG environment
variable is set to french.

  • Breaking changes:
    • Templates:
      • Conditional inclusion depending on lang must now be done using lang_LANG (e.g.
        lang_fr, lang_en, and so on). This might impact custom epub.css and html.css
        templates.
    • API:
      • The escape module has been moved to a separate crate,
        crowbook_text_processing. The cleaner module is no longer
        public, but the features it provided are also available in
        crowbook_text_processing.
  • New options:
    • html.css.colours allows to provide a CSS file that only redefine
      the colour scheme. Such a file can be built from crowbook --print-template html.css.colours.
    • input.smart_quotes: if set to true, tries to replace ' and " by curly quotes.
  • Command line interface:
    • Crowbook is now (imperfectly) localized in french, and can be
      translated to other languages.
    • Added the --quiet (or -q) argument, that makes crowbook run without
      displaying any messages (except some error messages at this point).
  • Rendering:
    • HTML:
      • The table of contents menu is no longer displayed in the HTML single renderer if
        it doesn't contain at least two elements.
      • The default colour theme has been modified a little.
  • Bugfixes:
    • Fix the escaping of non-breaking spaces in EPUB, as &nbsp; and
      its friends aren't valid entities in XHTML, apparently.