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

generator-latex-mail

v0.0.1

Published

A yeoman template for scaffolding LaTeX administrative mails (in french format)

Downloads

3

Readme

generator-latex-mail

Yeoman LaTex Apache-2.0

A Yeoman template for scaffolding LaTeX administrative mails (in french format)

Features

  • Scaffolds a workspace where all latex resources lay in
  • Manages institute files which hold the identity of the senders
  • Generates nice default LaTex letters using the letter.cls LaTeX class, with following features:
    • support generation for Registered Letters (Lettres recommandées)
    • automatically set the letter date to the current date
    • support the link to an institute (previously created)

icon-screenshot letter-example.pdf

Why ?

what ! latex for writing letters ?

Yes ! This is what I personally use; mainly because:

  • LaTex is free, portable, flexible, sexy and produces very high quality documents.
  • I'm a coder and I just can't imagine using a WYSIWYG editor for writing something.

Installation

Prerequisites

So you want to play with it. I assume the following is already installed:

To install XeLaTeX, I would suggest you to use TexLive core or full package. But you are free to use any other distribution. You can have a look to my environment under Arch.

Project

Install generator-latex-mail using npm:

npm install -g generator-latex-mail

Alternately you can install the module directly from sources. You will need git for that.

git clone https://github.com/ccamel/generator-latex-mail.git
cd generator-latex-mail
npm link

Getting started

Create the workspace

Before anything else, you need to create a workspace. For that, you just have to invoke the latex-mail generator with yeoman and let you guide.

yo latex-mail

You will be asked to answer a few questions.

? What is the name of the workspace you want to create ? mails

As a result, you will get the following directory structure.

[workspace]                     # folder created by template
   ├── assets                   # contains all resources used by LaTex
   │   ├── fonts                # contains alternative fonts
   │   └── institutes           # contains the institutes
   │       └── default.ins
   ├── letters                  # contains all the letters
   │   └── letter.tex
   ├── outputs                  # contains all the pdf generated from the letters
   │   └── letter.pdf
   ├── temp                     # folder containing temporary files
   ├── gulp.js                  # the gulp file used to process tex files
   └─  package.json             # npm dependencies used by gulp

Create an institute

An institute is a LaTex file containing the information about the sender of a letter, like the name, the address, the phone number.

The creation of an institute is performed with the institute sub-generator.

yo latex-mail:institute

You will be asked to answer a few questions.

? What is the name of the institute (a file that describes the sender) default
? Full name John Doe
? Address 1 10 rue de la Pomme
? Address 2 
? City Paris
? Zipcode 75010
? Phone 06 01 02 03 04
? Email [email protected]
   create assets/institutes/default.ins

As a result, you will get the new institute file in the assets/institutes folder. You can of course freely modify it to adapt it to your needs.

Create a new letter

Creating a new letter is fairly simple, thanks to the letter sub-generator.

yo latex-mail:letter

You will be asked to answer a few questions.

? Name of the letter (without extension) letter
? What institute do you want yo use ? default
? Subject of the letter Réclamation
? Does the letter a Registered Letter or not (If 'yes', a special mention is added to the subject of the letter). Yes

As a result, you will get the new letter file in the letters folder. Modify it with the editor of your choice.

Make PDF

I use XeLaTex which is a TeX typesetting engine with support of Unicode and modern font technologies.

The process is driven by Gulp which is a streaming build system. The pipeline generation is as such:

  letters/*.tex -> [XelaTex] -> outputs/*.pdf

The process is idempotent: only letters that have been modified since last generation are built again.

To launch the process, just invoke the Gulp default task:

gulp

Samples

Sample PDF

Technologies

Yeoman-logo Gulp-logo LaTex-logo

Useful links

License

Apache-2.0 © Christophe Camel