Here it is in action in the Atom editor:
And here are a few output examples:
|Book - source / PDF||Letter - Source / PDF||Resume - Source / PDF||Visit card - Source / PDF|
|Slides - Source / PDF||Report - Source / PDF||Paper - Source / PDF||Poster - Source / PDF|
At the moment, the best solution is to install ReLaXed in an empty directory as follows:
git clone https://github.com/RelaxedJS/ReLaXed.git . npm install sudo npm link --unsafe-perm=true
This provides your system with the
Hopefully, in the future, installation will be as simple as
npm i -g relaxedjs, but there are known issues with Puppeteer. In case it doesn't work for you, have a look at the troubleshooting page. Any help towards a simpler installation procedure is welcome.
To start a project, create a new, empty
my_document.pug file, and start a ReLaXed process from a terminal:
ReLaXed will watch
my_document.pug and its directory. Every time a file changes,
my_document.pug will be compiled as
Now write and save the following in
h1 My document's title p A paragraph in my document
A new file,
my_document.pdf, will be created. Every time you modify and save the sources, the file is automatically updated (make sure you use a PDF viewer with auto-refresh to see your changes happen in real-time). That's all there is to know to start creating your first document!
To go further:
Many of us prefer markup languages (Markdown, LaTeX, etc.) to GUI document-editors like MS Office or Google Docs. This is because markup languages make it easier to quickly write documents in a consistent style.
However, Markdown is limited to the title/sections/paragraphs structure, and LaTeX has obscure syntax and errors that also make it difficult to stray from the beaten track.
On the other hand, web technologies have never looked so good.
ReLaXed is an attempt at finding the most comfortable way to leverage this for desktop PDF creation.