Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.51 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.51 KB

Word Count Extension For Quarto

This extension inserts word counts into Quarto documents in the place of {{wordcount}}. Word counts can be inserted in the body or metadata (YAML header) of a document. To include the number of words in the references, use {{wordcountref}}.

You may also be interested in:

Installing

quarto add christopherkenny/wordcount

This will install the extension under the _extensions subdirectory. If you're using version control, you will want to check in this directory.

Using

After installing, simply add {{wordcount}} or {{wordcountref}} in your document (without the `tics`). Make sure there are spaces around it. For example you could write:

There are {{wordcount}} words in this document.

and it will replace {{wordcount}} with its estimate.

Example

Here is the source code for a minimal example: example.qmd.

example.qmd

Licensing

The original wordcount filter is licensed under a MIT license to 2017-2021 pandoc Lua filters contributors. This Quarto extension is also licensed under the MIT license.