Skip to content

Commit

Permalink
Update readme with better terminal output
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheiss committed Jun 3, 2024
1 parent 9567e45 commit acc3260
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 33 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: quarto-wordcount
Title: Counts Words in Quarto Documents
Version: 1.2.0
Version: 1.3.0
License: MIT + file LICENSE
Encoding: UTF-8
Imports:
Expand Down
42 changes: 26 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,33 @@ format:
### Terminal output

The word count will appear in the terminal output when rendering the
document. It shows multiple values: (1) the total count, (2) the count
for the document sans references, and (3) the count for the reference
list alone.
document. It shows multiple values:

- **Overall totals**: (1) the total count of everything, including the
body, notes, references, and appendix sections, and (2) the count for
just the body and notes.

The journals I typically work with count the body + notes + references
towards the total word count. When shrinking manuscripts to fit word
limits, I find it helpful to split the references count off from the
body + notes so I can more easily see where edits might be most
efficient (e.g. re-word sentences vs. remove references)

- **Individual section totals**: counts for the (1) text body, (2)
notes, (3) references, and (4) appendix

``` text
133 total words
-----------------------------
76 words in text body
57 words in reference section
Overall totals:
--------------------------------
• 451 total words
• 378 words in body and notes
Section totals:
--------------------------------
• 315 words in text body
• 63 words in notes
• 53 words in reference section
• 20 words in appendix section
```

### Shortcodes
Expand Down Expand Up @@ -154,7 +172,7 @@ You can use shortcodes in your YAML metadata too:

``` yaml
title: Something
subtitle: "{{< words-total >}} words"
subtitle: "{{< words-sum body-note-ref >}} words"
```

### Appendices
Expand Down Expand Up @@ -192,14 +210,6 @@ More words here
:::
```

That will create this word count:

5 in the main text + references, with 4 in the appendix
-------------------------------------------------------
5 words in text body
0 words in reference section
4 words in appendix section

## Example

You can see a minimal sample document at [`template.qmd`](template.qmd).
Expand Down
33 changes: 18 additions & 15 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,26 @@ format:

### Terminal output

The word count will appear in the terminal output when rendering the document. It shows multiple values: (1) the total count, (2) the count for the document sans references, and (3) the count for the reference list alone.
The word count will appear in the terminal output when rendering the document. It shows multiple values:

- **Overall totals**: (1) the total count of everything, including the body, notes, references, and appendix sections, and (2) the count for just the body and notes.

The journals I typically work with count the body + notes + references towards the total word count. When shrinking manuscripts to fit word limits, I find it helpful to split the references count off from the body + notes so I can more easily see where edits might be most efficient (e.g. re-word sentences vs. remove references)

- **Individual section totals**: counts for the (1) text body, (2) notes, (3) references, and (4) appendix

```text
133 total words
-----------------------------
76 words in text body
57 words in reference section
Overall totals:
--------------------------------
• 451 total words
• 378 words in body and notes
Section totals:
--------------------------------
• 315 words in text body
• 63 words in notes
• 53 words in reference section
• 20 words in appendix section
```

### Shortcodes
Expand Down Expand Up @@ -127,16 +140,6 @@ More words here
:::
````

That will create this word count:

```
5 in the main text + references, with 4 in the appendix
-------------------------------------------------------
5 words in text body
0 words in reference section
4 words in appendix section
```


## Example

Expand Down
2 changes: 1 addition & 1 deletion _extensions/wordcount/_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors:
orcid: 0000-0003-1866-860X
- name: Justin Landis
orcid: 0000-0001-5501-4934
version: 1.2.0
version: 1.3.0
quarto-required: ">=1.3.0"
contributes:
shortcodes:
Expand Down

0 comments on commit acc3260

Please sign in to comment.