Skip to main content

Questions tagged [texcount]

TeXcount is a Perl script that counts words in the text of LaTeX files.

Filter by
Sorted by
Tagged with
0 votes
1 answer
23 views

How to ignore ExPex code in texcount

I'm wondering if it is possible to exclude ExPex code from being counted by texcount? At the moment I'm writing a thesis with lots of linguistic examples, but I need to exclude these from the total ...
geordiekidd's user avatar
1 vote
1 answer
41 views

How to Automatically Analyze Word Frequency Across Multiple Included LaTeX Documents from a Main File

I am looking for an efficient way to analyze the frequency of certain words across a collection of LaTeX documents. I have a main.tex file that includes several other .tex files (using \include and \...
Foad's user avatar
  • 1,005
2 votes
1 answer
144 views

How to exclude an environment from texcount wordcount

I'm writing up an academic document for which I have a max wordcount, using Overleaf's texcount with default settings to count words. By default this excludes equations (which is desirable) but this ...
George's user avatar
  • 215
0 votes
1 answer
161 views

Using a batch script in latex \immediate\write18 env [closed]

I am trying to write a script that using texcount will output only the number of characters including spaces. I made a batch script which works, no problems there. The problem is trying to run it in ...
mriisa's user avatar
  • 540
0 votes
1 answer
611 views

How to include character count with spaces and specify which sections are to be included

I want to add character count including spaces in my report. So far I've found a command, which provides me this: \documentclass{report} \begin{document} }{% \newcommand{\charactercount}[1]{ \...
Calisi's user avatar
  • 1
0 votes
1 answer
510 views

Counting words with TeXcount in documents using \markdownInput or \verbatiminput

I'm using \markdownInput (via the markdown package) to include Markdown files in a paper on Overleaf. Overleaf uses the TeXcount utility to count the words. But TeXcount doesn't recognize \...
woerndl's user avatar
  • 123
9 votes
1 answer
17k views

Overleaf wordcount

Performing a wordcount on a latex document on overleaf produces a table of the form: Total Words:10000 Headers:5 Math Inline:100 Math Display:10 What I'd like to know is if these categories are ...
user's user avatar
  • 193
0 votes
0 answers
196 views

Counting chars + spaces in mainmatter and appendix files

I am trying to make an automatic char count with spaces on my report, so that i get a char count on my main mainmatter displayed and one on my appendix. I have looked at Paul Gessler answer (Command ...
Mathias Houmøller's user avatar
0 votes
0 answers
124 views

Dynamically returning word counts in table of contents

I'd like to be able to dynamically report in a table of contents the word count by section in my document. This way, when writing a manuscript with chapters, I can see the length of each section (...
exl's user avatar
  • 113
1 vote
0 answers
494 views

Texcount error File main.bbl not found in path (in overleaf)

I am trying to add an automatic word count in my overleaf file using Texcount. I have followed the instructions on https://www.overleaf.com/learn/how-to/Is_there_a_way_to_run_a_word_count_that_doesn%...
Victor Hartman's user avatar
0 votes
1 answer
631 views

Texcount errors with bibliography

I am trying to run texcount on a large tex file. It works fine when the bibliography is excluded from the count, but with -incbib it gives the following error message: ERROR: Encountered } without ...
oweydd's user avatar
  • 143
1 vote
1 answer
105 views

Including macros in texcount by regular expression

I would like to include all macros (or \newcommand's) that start with \figure and count them as floats in texcount. For context, have a look in here. It works if I tell texcount to increment the float ...
Samuel Saari's user avatar
1 vote
1 answer
557 views

Getting git-latexdiff and texcount to work together nicely

What is the best way to get git-latexdiff to work nicely with texcount to view changed and deleted word counts between two commits?
Paul's user avatar
  • 544
1 vote
1 answer
149 views

texcount and latexdiff

I am wondering if there is a way to combine latexdiff and texcount, to count the number of words that have changed between two docs? This is not the same as the number of words before and after, but ...
Paul's user avatar
  • 544
2 votes
1 answer
874 views

texcount with bibliography

I am having trouble with getting texcount count the words in the bibliography. I have tried two methods: The one described on Overleaf: I added %TC:incbib into the preamble and created a file without ...
Erdne Htábrob's user avatar
2 votes
3 answers
2k views

Counting words and characters, with or without whitespace with texcount

The goal is a flexible scheme for automatic character counting using texcount. Specifically, the user should be able to select each permutation of the the following options (characters | words) and (...
John Chris's user avatar
0 votes
1 answer
156 views

Make texcount include \glsdesc

I need words from the glossary to be counted in the texcount when they're used in the body of the document. I have to include a word count in my thesis. I've edited the \quickwordcount{} function to ...
Persephone's user avatar
0 votes
1 answer
2k views

Overleaf Word Count grossly undercounting with Subfiles and Input

My Overleaf Latex project is grossly undercounting the words and equations in my document. The actual number of words is nearly 12,000 and 60 equations. Overleaf Word Count outputs only 130 words and ...
John HaTrick's user avatar
1 vote
0 answers
53 views

Character/word counting implementation must handle externalized content called via \input{}

This helpful implementation (for which we're grateful) may lack the ability to count characters or words contained within externalized content. As an example, please see this mwe. The code is ...
John Chris's user avatar
0 votes
0 answers
660 views

I can't get texcount to count words from my input files

I am trying to use texcount to count the number of words in my document which is set-up in a way similar to this: \chapter{Introduction} \input{Latex_writing/Chapters/Introduction.tex} \chapter{...
IzzyC's user avatar
  • 1
0 votes
1 answer
349 views

How to use the package latex-wordcount on Atom?

I have a Windows machine with StrawberryPerl installed. I downloaded the texcount Perl script and have placed it in the PATH variable. I have also installed the latex-wordcount package for Atom. ...
help me with math's user avatar
2 votes
1 answer
339 views

How can I display number of words within my document?

For a magazine I have to write a small article of max. 700 words. I'd like to have a wordcount at the end. I found the following code here on StackExchange. But when I tried it myself it didn't work. ...
KenAdams's user avatar
  • 139
4 votes
1 answer
306 views

texcount mwe no longer functional after tex system update

The following mwe has been discussed in this post, and this one. The mwe no longer works after a system update. Any guidance on troubleshooting is greatly appreciated. W10, MikTeX 2.9, TeXWorks, ...
John Chris's user avatar
0 votes
0 answers
634 views

Counting words do not appear with texcount (using TeXstudio)

I am trying to get the words cumber per section using the following lines: \newcommand\wordcount{ \immediate\write18{texcount -sub=section \jobname.tex | grep "Section" | sed -e 's/+.*//...
Rui's user avatar
  • 101
1 vote
1 answer
103 views

How to warn user if not enough content added to section using texcount?

We would like to adapt this solution and this one to include the following features: Amber colored text if under 75% (even better if parameterized) of character limit. Handle empty sections (seems to ...
John Chris's user avatar
1 vote
0 answers
48 views

Valuable texcount implementation seems to conflict with titlesec package [duplicate]

The inset texcount implementation seems to conflict with titlesec package. The desired outcome is to relieve the conflict with titlesec as well as ensuring robustness against other potential conflicts....
John Chris's user avatar
1 vote
1 answer
1k views

How to include in-text references & footnotes in the Overleaf wordcount?

As stated in the title. I've googled far and wide and can only seem to find ways of including the reference list (which I don't want), but nothing on including the footnotes. Essentially I want both ...
Tiago Filipe's user avatar
3 votes
1 answer
141 views

How can I print a warning, only if my document exceeds a certain length?

I'd like a warning to show up in my document as soon as it exceeds a defined length. I found how to print the the total word count of my document (assuming the main file to be main.tex): \newcommand{\...
Christian Steinmeyer's user avatar
0 votes
0 answers
155 views

Overleaf Latex detailed texcount always times out

I am a PhD student with a paid version of Overleaf. I've been trying to do a detail tex count of my thesis following Overleaf's advice on Overleaf TexCount Guidance. It is impossible to get a ...
Simon John's user avatar
1 vote
2 answers
1k views

texcount more specific rules

I like using texcount for counting words in my LaTeX documents, and I was wondering whether it could give me something a bit more precise than the default information. In this assignment I'm writing, ...
mantheflan's user avatar
1 vote
1 answer
409 views

Stop Overleaf counting words inside longtable

I'm working on an assignment and need to use longtable for some data, but it counts towards the overleaf word count. How can I do this with texcount?
FinnishBear's user avatar
8 votes
1 answer
1k views

Simplified texcount results display

Writing a proposal with strict character limits. Using the following in the preamble % Compile with --enable-write18 or --shell-escape options \immediate\write18{texcount -char -inc -tex -sum <...
John Chris's user avatar
-1 votes
1 answer
23k views

Word count (title, author name, abstract, body, figures, tables, captions, footnotes, acknowledgments, references, author bios, etc.) in LaTeX

I am using overleaf but word count option in it does not include references, footnotes, and some other counts. How can I count words inclusive of title, authors’ names/info, abstract, body (...
user3582228's user avatar
2 votes
1 answer
577 views

Can one display the word count of a specific paragraph using texcount?

I am currently writing a research essay and was wondering if it is possible to create a function that links a small part of the output of the texcount function to another location in the file, in my ...
Nico's user avatar
  • 121
5 votes
1 answer
131 views

Can I tell TeXcount to not count underscores as word separators?

I am trying to count words in a document that contains various C types such as \texttt{uintptr\_t}, \texttt{size\_t}, etc. However, when I use texcount it breaks at the underscore and these as two ...
ar31's user avatar
  • 153
2 votes
1 answer
103 views

Count words in Persian document correctly

when I use the command texcount filename.tex in CMD, half-spaced words count two words instead of one word. How can I solve this problem? \Thanks % Compile with XeLaTeX \documentclass{article} \...
Bahman Mirzakhani's user avatar
1 vote
0 answers
517 views

Texcount command not found system in MacTeX [closed]

I have a problem trying to invoke texcount from LaTeX file. I am using MacOS with MacTeX 2018 installed. texcount comes directly with the MacTeX and it is on the PATH. When I run texcount on command ...
MahiPai's user avatar
  • 91
8 votes
2 answers
4k views

Dynamically count words in chapter and insert word count at start of chapter

TL;DR Einar's first alternative solution of making a new input command that automatically generates counts at the end of each input section is what I used to generate counts at the end of each chapter:...
ratuk_'s user avatar
  • 127
2 votes
1 answer
28k views

Total word count using texcount

This question is an extension of my previous question, although the answer to that question worked well in TeX-Studio, it does not work in Overleaf v2, which was primarily the Shareletax interface). ...
crwang's user avatar
  • 185
0 votes
2 answers
303 views

Get texcount to ignore numbers

Trying to get texcount to not count numbers as words, but setting alphabets=Latin doesn't seem to be solving the problem. Any suggestions? MWE: \begin{document} testing 1 2 3 this should be five \...
nick_eu's user avatar
  • 111
4 votes
1 answer
2k views

TeXcount in-line references

I am using TeXcount to count the words in my pdfLatex/XeTex documents. This is working decent overall, but I need TeXcount to ignore my in-text references. By default, TeXcount counts all the in-line ...
Nino's user avatar
  • 111
0 votes
1 answer
2k views

Dynamic word count for abstract environment in LaTeX using Knitr/Sweave/Rstudio

I am attempting to use TeXcount to count the number of words in my abstract environment and print it out, so that when I update the abstract it prints the new word count. I did my best to search the ...
Meirzev's user avatar
  • 11
0 votes
2 answers
3k views

TeXcount cannot fine \input files with a command in the path?

UPDATE: The problem I am having is due to having Python code inside a PythonTeX pycode environment. Seems this causes a parsing error with the TeXcount Perl script. I want to use TeXcount to count ...
whatisit's user avatar
  • 1,870
0 votes
0 answers
268 views

How do get wordcount on our working file pdf? [duplicate]

Is it ok that LaTeX doesn't have a wordcounter? texcount is a very valuable external esource to determine how many words you have in your document, but it relies on console and executing a separate ...
nilon's user avatar
  • 554
0 votes
1 answer
473 views

How do I setup a template and a command line for TeXcount

I need so setup TeXcount to count the characters of a LaTeX document including those in food and end notes but without those in references, tables, figures, captions, and the titlepage. Better would ...
Christian Martin Jäger's user avatar
5 votes
1 answer
2k views

how to count the number of words in a sentence, the number of sentences in a paragraph, and the number of paragraph?

I am writing an article on latex. I need to count the number of words in a sentence, the number of sentences in a paragraph, and the number of words in the paragraph? e.g. This is the first sentence....
jorge's user avatar
  • 155
4 votes
2 answers
174 views

wordcount by section when sections were formally known as chapter

I have a wordcount macro I use to keep track of word numbers for each chapter of a book. Each chapter is written in a separate file which I input from my master file. When I work on a single chapter, ...
PatrickT's user avatar
  • 3,031
6 votes
1 answer
459 views

Can texcount be used to count sentences and syllables?

I would be interested in calculating Flesch–Kincaid readability tests in latex documents and, besides the number of words, those tests require the number of sentences and syllables in the text. ...
Edward Santos's user avatar
5 votes
1 answer
817 views

Can I configure texcount to not ignore certain optional arguments?

Is it possible to configure texcount not to ignore text in optional arguments for certain macros? Consider the following example: \documentclass{article} \begin{document} \autocite[e.g.][4]{key-1,...
cfr's user avatar
  • 212k
2 votes
1 answer
230 views

Can I configure texcount to double-count text in certain mandatory arguments?

Is it possible to configure texcount to double-count the contents of non-optional arguments for certain macros? Consider the following example: \documentclass{article} \begin{document} \autocite[e.g....
cfr's user avatar
  • 212k