npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

writex

v1.0.4

Published

Create beautiful LaTeX documents with Markdown

Downloads

7

Readme

WriTeX

Create beautiful LaTeX documents with Markdown

WriTeX gives you a workflow for creating print documents (PDF) super-easily; the power of LaTeX with the simplicity of Markdown.

Setup

Install the WriTeX CLI globally using npm:

npm install -g writex

WriTeX makes use of Pandoc and LaTeX. Download and install Pandoc from here.. LaTeX comes in different distributions; I recommend TeX Live for Linux, MacTeX for Mac OS X, and MiKTeX for Windows.

Scaffolding a new project

Besides the WriTeX CLI, you will also need a WriTeX template for your document. Templates are installed via npm and you can find a list of available templates here.

At the time being, project scaffolding is not yet implemented. However, you can manually install the template and copy the config file into the project directory as follows (using the writex-article template as an example):

  1. Install the template npm install --save-dev writex-template
  2. Copy config file cp node_modules/writex-template/writex.yaml ./

Writing and Configuring

If your project is set up, you can start writing. All your content belongs in Markdown files with the .md suffix. The filenames should be prefixed by a number, so that they are ordered properly (otherwise, WriTeX will not compile them into the \begin{document} ... \end{document} area of your LaTeX document):

my-project/
- 0-introduction.md
- 1-research.md
- 2-design.md
- 3-implementation.md
- 4-evaluation.md
- 5-conclusion.md
- references.bib
- writex.yaml

Configuration

You can configure some basic parameters of your project in the writex.yaml file. Some parameters are necessary for every WriTeX project, some are specific to a certain template. The values under document are used by the template to fill certain fields. They depend very much on the used template; an article needs different metadata than, for example, a letter.

An exemplary WriTeX config file:

template: article
abstract: false
bibtex: false
engine: xelatex
document:
  author: Arthur Authory
  date: \today
  title: A splendid article
  subtitle: How to write a headline that means absolutely nothing

In this example, both document and abstract are specific to the template (writex-article). All other parameters are universal WriTeX parameters.

Bibliographies

For the time being, WriTeX supports BibLaTeX bibliographies via biber. You can enable them in the config file, setting bibtex to true. The BibLaTeX file must be named references.bib. WriTeX will automatically take care of the proper compilation: latex->biber->latex->latex.

This is intented to become more flexible in the future, with support for bibtex and configurable filenames as well.

Special content

There are some occasions where your template provides space for special content that does not belong into the regular flow of your document. One such example is an abstract, as implemented by the writex-article template.

Special content must not be prefixed by a number, so that it is not included in the \begin{document} ... \end{document} area of your LaTeX document.

Example: To enable the use of an abstract in the writex-article template, you have to create a file abstract.md, fill it with your abstract, and set the abstract field in the writex.yaml config file to true.

For information on the special content that is supported by your template, refer to your template's README.

Compiling

So you are all set, a first draft is written and you want to see how your PDF looks?

Simply run WriTeX in your project folder:

writex

It will run through all the steps necessary and spit out your PDF in the end.

Watch and compile

WriTeX can watch for changes to your Markdown files and compile the new version of your PDF document automatically, which is quite convenient:

writex watch

Future plans

I've got quite a bit planned for WriTeX, mostly for my own convenience:

  • writex-acm, a template for creating ACM research papers
  • writex-book, a template based on KOMA-Script's scrbook document type
  • writex-tvooo-book, a variation of writex-book with custom fonts and a custom title page, glossaries etc.
  • writex-tvooo-article, a variation of writex-article with custom fonts
  • Scaffolding of your own WriTeX templates
  • Scaffolding of a project using an existing template
  • A little website with a nice, illustratory explanation
  • Maybe offer the whole process online; on-the-fly PDF generation from pasted Markdown, with your chosen template