counter Wordcount Bookmarked Sections

Tags: Macro Writer

last edited: 2023-01-24

This is a Libreoffice Writer extension that counts words in each section of a document and displays each wordcount in the status bar or inserted into the document as a field. Use it to know when you're nearly done writing.

Essay cover page with auto update word counts
Status bar showing word counts

Description

Usage

  1. Mark sections by simply adding a bookmark at the start of each section using the Libreoffice Writer menu option Insert -> Bookmark (These can be viewed later in the navigator sidebar by pressing F5).
  2. Then simply type Ctrl-Alt-W (or Cmd-Alt-W on Mac) and it will display the wordcount for each section in the status bar for 4 seconds.

Advanced Usage

  1. Ctrl-Alt-W will also create wordcount fields that you can insert into the document with Ctrl-F2 -> Variables -> User Field. If there are bookmarks, the wordcount fields will also be updated every time the document is saved.
  2. You can even enter formulas based on the wordcounts. If, for example, you have a bookmark called Essay, then to show footnotes as a percentage of Essay length, press `Ctrl-F2 -> Variables -> Insert Formula` and type into the Formula box `Wordcount_Footnotes/Wordcount_Essay` then format it like a percentage in the Format box by clicking Additional Formats and finally click Insert to insert it into your document.

Wordcount accuracy

The word counter uses the same word separator as Libreoffice, so it's accurate compared to both Libreoffice and MS Word, with the following exception:

  • If your document has bullets/numbering, the extension's wordcount will be low by one count per bullet compared to Libreoffice's total wordcount: see second screenshot. (If you know how I can fix this, let me know by posting an issue. I'm using counting words in textCursor.getString() which does not contain bullets.)

For further notes on counting accuracy, installation, and source code, see the extension home page.

Homepage: https://github.com/berwynhoyt/wordcount-sections

Repository: https://github.com/berwynhoyt/wordcount-sections

Release List

Release: 1.0 – First pubic release

Compatibility: 7.0
Operating Systems: Linux, Windows, macOS
License: MIT
ReleaseNotes:
  • v1.0 First public release

Other Extensions

Wordcount Bookmarked Sections

This is a Libreoffice Writer extension that counts words in each section of a document and displays each wordcount in the status bar or inserted into the document as a field. Use it to know when you're nearly done writing.

01-2023

Feedback

Post your review

You cannot post reviews until you have logged in. Login Here.

Reviews

  • Heiko Tietze Jan 16, 2023, 7:08 AM (16 days ago)

    None of the links is working (at the initial submission). Is it a private repository?

    • Berwyn Hoyt Jan 16, 2023, 11:15 PM (15 days ago)

      My apologies. I have made the repository public now.

RSS feed for reviews on this page | RSS feed for all reviews