Skip to content

ReLaXed vs other solutions

Zulko edited this page Apr 30, 2018 · 4 revisions

Below are some more thorough reviews of what you may win, or lose, using ReLaXed instead of another solution. This section is open to contributions.

Markdown

What is better in Markdown frameworks:

  • Widely used and supported (Github, NPM, etc.)
  • Very simple and friendly, almost plain text
  • Has cool editors and extensions ( example )

What is better in ReLaXed (which uses the Pug language with plugins):

  • You can write any kind of layout with boxes, sidebars, etc.
  • HTML elements are more fun to write with Pug
  • Makes it easier to use (S)CSS and Javascript (some Markdown editors allow that too)
  • You can define macros, use conditionals and loops, use computed expressions using Javascript
  • You can write parts in markdown if you want to :)

LaTeX

What is better in LaTeX:

  • Wide-spread in academic and publishing communities
  • Optimized typography and layout:
    • Optimized space between letters (makes narrow text look better)
    • Optimized position of floating figures (less good in Chrome)
  • Bibliography and citations management

What is better in ReLaXed:

  • Much friendlier mark-up language (Pug) and errors.
  • It is much easier to define new layouts Pug and SCSS
  • Get styles and assets directly from the web
  • Possibly faster (needs data)

Pure-Chrome PDF generation

ReLaXed is built on top of Headless Chrome, which already allows for the generation of PDFs from HTML in a single terminal command:

 google-chrome --headless --print-to-pdf=out.pdf file.html

Here are some advantages of ReLaXed over this approach:

  • Out of the box support for Pug/SCSS, which are more fun to edit in than HTML/CSS.
  • Out of the box support for Markdown, LaTeX equations, and some plot generation.
  • Automatic re-generation of the PDF file when the sources are modified.
  • Running a terminal command implies that at every generation, Chrome gets rebooted and internet files are fetched again. Relaxed solves this by running a persistent instance of Headless Chrome in the background.
  • Nicer error messages.
  • ReLaXed eases the subtleties of page sizing, page header, footer, etc. by allowing you to define these from inside your Pug/SCSS documents.
  • ReLaXed is distributed via NPM and installs its own Chrome (actually Chromium) version, making the results reproducible accross systems.

Web slideshow systems

Web slideshow systems such as Reveal.js , Remark.js , or (shameless plug) Eagle.js , allow you to produce web-hosted slideshows. These may be the future of presentations, but PDF slideshows still win in some aspects.

Advantages of web slideshows:

  • Can be web hosted / integrates better in websites
  • Can be made responsive to adapt to different screen size
  • Interactive and feature-rich (speaker notes, etc.)
  • Generally come with nice default styles

Advantages of PDF slideshows:

  • Look exactly the same on any system
  • Embed all fonts and images necessary, no need for an internet connection
  • Easily shareable and via email.
  • Some conferences and other talking events only accept PDF for presentations