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

texwatch

v1.0.1

Published

Global utility for watching and building LaTeX projects

Downloads

2

Readme

texwatch

Texwatch is a command line utility for live building and spell-checking LaTeX projects. It allows you to have all the benefits of a code editor when writing your TeX but still have the power of seeing your PDF being compiled automatically when you save.

Texwatch requires the following to be installed:

  • NodeJS - Advise using NVM to manage your NodeJS installations
  • pdflatex - Comes as part of MacTeX or any other standard LaTeX package if you aren't on OSX
  • hunspell - Can be installed using Homebrew
  • dictionaries - See the dictionaries section in the installation section

At this point in time it has only been tested on OSX.

Installation

After you have NodeJS installed, just run the following from anywhere on your computer:

npm install -g texwatch

Dictionaries

Hunspell does not come with its own dictionaries. Most of the time you need to install them yourself. Do the following to find out if you need to install any:

  1. Type hunspell -D
  2. In the output there should be a section called AVAILABLE DICTIONARIES
  3. If it is empty, or if it says there are no available dictionaries, then you need to install dictionaries.

Here are some instructions on how to install a set of english dictionaries for OSX:

  1. Download the OpenOffice English Dictionaries Extension.
  2. Change the extension of the file to .zip
  3. Extract the .zip file
  4. Type hunspell -D and find the output section called SEARCH PATH:
  5. Place all the .dic and .aff files from the zip file into any of the folders in the search path
  6. Run hunspell -d again - it should now say there are dictionaries present and loaded.

Usage

Simply run texwatch in your LaTeX project folder.

Texwatch assumes that your document is called document.pdf. If it isn't you can specify it as an argument: texwatch mydoc.pdf.

This command will start a watch service that recursively monitors all .tex files in the directory. When a file is changed, the main document.tex file will be rebuilt using pdflatex and (optionally) spellchecking will be performed using hunspell.

.texwatchrc

The .texwatchrc can be used to override default texwatch settings. This file should be placed in your project root and can contain any of the options below, structured in JSON. Example:

{
  "spellCheck": false,
  "log": false,
  "personalDictionary": [
    "Woodings",
    "JavaScript"
  ],
  "file": "mydoc.tex"
}

options

log: false

Enable or disable log output to the console.

watchGlob: **/*.tex

Globbing pattern given to the watch service.

dir: ./

Directory to run texwatch from.

file: document.tex

Filename of the main .tex file.

personalDictionary: []

Array of personal dictionary entries. This can be used to prevent unknown words from showing up in the spellcheck report. For basic usage, just populate this array with words. This array is actually used as a MySpell dictionary, which is passed to hunspell as a personal dictionary file. MySpell dictionaries make use of affix files which allow you to specify how words can be manipulated (e.g. can be pluralised). For more information on affix files, see: the hunspell manpage.

tmpDictFile: .texwatchtmpdict

Temp file used to write the personal dictionary.

dictionary: en_GB

Dictionary to use with hunspell

spellCheck: true

Enable or disable spell checking