Skip to main content

Questions tagged [count]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
74 views

Counting number of references in a sentence

Is there a way to define a command to count the number of indicated references cited via multiple \ref{} commands? For example: The following **3** references are listed in my university's good list: \...
bissi's user avatar
  • 159
2 votes
1 answer
33 views

Counting characters in selected sections in document in Overleaf

I'm having some issues when using the answer provided here, as it seems the current version of Overleaf sets \jobname to output Im still very much a novice in Latex, but using this example pulled from ...
Natasja Rothe Lund's user avatar
2 votes
1 answer
119 views

Create new count with \def

I have the following macro/command: \def\definenewcounter#1{\newcount \csname#1\endcsname} It is supposed to create a new count with it's name being whatever argument 1 is, but it is throwing errors. ...
fsr_j's user avatar
  • 75
2 votes
2 answers
86 views

Adding to a count with a command

I have the following command: \newcommand{\addtonewcount}[2]{\advance\#1 #2\relax} #1 is the name of the count and #2 is the degree to which one wants to add to the count. The command is returning an ...
fsr_j's user avatar
  • 75
4 votes
2 answers
204 views

How to print the number of elements in the first and second rows of an array respectively?

I've assigned an array and I want to design a command (Assume it's named \arraynum) with 2 values to print the number of elements in the first and second rows of an array respectively, for example \...
Skyrmion's user avatar
  • 1,014
0 votes
1 answer
47 views

Is it possible to apply \regex_count to the contents of a tl variable?

I tried \tl_set:Nn \l_tmpa_tl {Hello World} \int_new:N \l_foo_int \regex_count:nnN { Hello } {\tl_use:Nn \l_tmpa_tl } \l_foo_int which doesn't work obviously. Could it maybe be achieved with \...
JupiterJones's user avatar
4 votes
3 answers
87 views

How to get (print) the number of elements in the row with the largest number of elements in the array?

For example, in the following MWE, there're 12 elements in the first line of the array while the second line of the array has 10 elements, so I'd like a command that can automatically printed the ...
Skyrmion's user avatar
  • 1,014
0 votes
0 answers
47 views

Is character count with spaces possible in LaTex?

Hi I've really tried to google around on this one, but nothing has worked for me. Anyone who knows, if it is possible to count characteristics with space? Thank you in advance. Best, Maria
Mari Phi's user avatar
1 vote
0 answers
234 views

Is there a basic float number type in LaTeX?

I've tried some examples with counters and numbers in LaTeX. I create a counter with \newcounter. I understand that it declares an integer. So if we make like this \newcounter{num} \setcounter{num}{10}...
Vladimir's user avatar
  • 673
0 votes
1 answer
37 views

About counting in \newtheorems

For all my \newtheorems i want the below counting: when i have for example only a section, i want the counting starts and following the number of section. Next, if i have subsection i want the ...
zaxsqwedc's user avatar
1 vote
1 answer
21 views

Redefinition of chapter count leads to double dots in tables, figures, header, and footer

In the following example the appearance of the chapter count has been redefined. \documentclass{report} \usepackage{titlesec} \usepackage{tabularx} \usepackage{multirow} \titleformat{\chapter}[hang]{...
Yahalnaut's user avatar
  • 123
0 votes
0 answers
209 views

word count function

how to use "Words: \quickwordcount" or word counting function with below structure at the main.tex? It could be another tex like wordcount.tex . Thanks in advance. \pagestyle{empty} \begin{...
Shown's user avatar
  • 55
0 votes
0 answers
17 views

How to output the total numbers of all files found in same-named child folders under different-named parent folders?

I have a project structure that looks like this: 1.foldername1 ⌞p ⌞file1 ⌞file2 2.foldername2 ⌞p ⌞file1 ⌞file2 3.foldername3 ⌞p ⌞file1 ⌞file2 How can I output a number total that counts ...
mechanicarts's user avatar
0 votes
2 answers
154 views

Count the number of \item in multiple enumerate environments

I'm trying to automatically generate the total number of items in multiple enumerate environments, but somehow this approach does not work for me: \documentclass{article} \begin{document} There are \...
Miao  Cai's user avatar
  • 103
0 votes
2 answers
143 views

How to create a cyclic counter

I am preparing the academic calendar for my institution. It typically looks like the following: I will create a tabular to fit the data. I have managed to generate the dates by a counter. What I need ...
Subhajit Paul's user avatar
3 votes
1 answer
137 views

How to count nodes in forest?

I'm complete beginner in LaTeX, this is my first document. I need to count every node in Forest, and nodes that are different color and I can't figure out how aggregate function .count works. This is ...
Za Oblak's user avatar
1 vote
0 answers
105 views

Xelatex (Windows) / includegraphics - displayed just first 5000 images

I need to generate PDF document using xelatex.exe. .tex document is generated from the database and it contains thousands of pages and thousands of images displayed by \includegraphics. Problem is ...
user avatar
0 votes
2 answers
63 views

How to make Box with outer row count?

can someone tell me how to make the following picture in Latex? Especially the box and the outer row count? Thanks!
T.Stammer's user avatar
3 votes
1 answer
195 views

Get number of pages between two \pagerefs?

I'm working on a thesis in Overleaf, and am experimenting with automatically updating the pagecounts on the title page. I want to update two numbers, the number of pages in the thesis, as well as the ...
Anton Eriksen's user avatar
0 votes
2 answers
180 views

Removing extra chapter numbering in the Table of Contents

I'm using different chapter names in the chapter itself and the table of contents: \chapter[Chapter 1 – Introduction]{Introduction}. I'm also using chapter numbers (\thechapter) in chapter headers as ...
egarbugli's user avatar
3 votes
1 answer
89 views

Counting shipouts

Is there a way to get the number of pages shipped out so far? To be clear, I want to count "physical" output; I'm not interested in logical page numbers we typically find in the footer or ...
Sašo Živanović's user avatar
4 votes
1 answer
640 views

xsim: What is the correct way to count exercises per section?

What is the correct way to count exercises per section like I got it with % Count exercises per section ===== \let\oldsection\section \renewcommand{\section}{% \setcounter{exercise}{0}% \oldsection} ...
cis's user avatar
  • 9,923
4 votes
2 answers
272 views

Count the number of lines of a long title with a specific line width

I am working on an effect of automatically fit an arbitrary long title to multi-lines with a specific line width. The title has no explicit new line(s), and is only a regular string. Currently, I have ...
oaheix's user avatar
  • 101
0 votes
0 answers
182 views

How to count the number of pages between two labels? [duplicate]

How to count the number of pages between two labels? I tried to fined a way using this answer but not helpful. \documentclass[12pt]{book} \usepackage{lipsum} \begin{document} \lipsum[1-20]\label{...
user avatar
3 votes
2 answers
82 views

How to generate error on assignment to \count register if value being assigned contains decimal point?

Please, if possible, plain TeX + eTeX commands only (I compile in XeLaTeX but use TeX commands). I need parameter value to be an integer value, not a decimal. In this example, parameter is being ...
bp2017's user avatar
  • 3,816
0 votes
1 answer
328 views

Word count for files included with input

I'm trying to do a wordcount of my thesis project in LaTeX. I'm using VIM with VIMLaTeX on an ubuntu machine. I have the following code in my main.tex file \newcounter{Hoofdstuk} \newcommand{\file}{...
Blub21's user avatar
  • 3
3 votes
2 answers
100 views

How many times has a label been referenced and which one is the most referenced?

Given a LaTeX document, I'd like to use an automatic method to know which one of all the labels is the most referenced one, which one is the second most referenced one and so on. I'll give you an ...
Lele99_DD's user avatar
  • 610
3 votes
0 answers
4k views

How to get word count in overleaf?

how can I get a word count on overleaf, of like a particular section? Can I highlight a section for example or a paragraph and get the word count?
Dimitra's user avatar
  • 81
10 votes
2 answers
29k views

Command for character count including spaces (in overleaf)

I'm becoming increasingly happy with overleaf, now prefering it to vscode or vim. A lot of the stuff I have to write for university needs a character count including spaces. Up until now I've been ...
freddy's user avatar
  • 103
2 votes
3 answers
696 views

How to count rows of a csv?

I am using \csvreader to read a csv and I am trying to do some basic manipulation like counting the number of values and print that value in the document. For instance, how do I calculate the number ...
Dambo's user avatar
  • 369
3 votes
2 answers
387 views

LaTeX: Reverse row count or enumerate over tabular rows

I'm drafting my CV and I would like to number the projects, conferences, etc. that I have done but in reverse order (ie: the newest has the highest number and is on top of the list). I found a code ...
Matthew Olson's user avatar
1 vote
1 answer
177 views

Separate page numbering for multi page environments with total pages counts for each

A document which I try to typeset with LaTeX may contain multi page environments. Such environment has his own page numeration which starting from 1. But it has to be total environment pages number at ...
Konstantin's user avatar
0 votes
1 answer
199 views

Beamer: Display all images only once in article mode

I'm creating a beamer presentation in which I include several images, of which some of them are included in multiple frames. I'm also creating an article version of this presentation with \...
StrawberryFieldsForever's user avatar
2 votes
0 answers
368 views

Do not enumerate and count a page

I want to put a clean page before a new chapter. I can do this with: \newpage $\ $ \thispagestyle{empty} The problem is the page is counting and I don't want this. I want to finish the chapter ...
Luis Antonio García González's user avatar
0 votes
1 answer
253 views

Change number to word

Referring to the question below Set counter in exam class to a count based on the first set of questions I would like to change the answer for this. There are \total{s}\ short questions. From There ...
Statguy's user avatar
  • 67
0 votes
0 answers
1k views

Print character count

Background inspiration and code: \documentclass{article} \usepackage{bashful} \pagestyle{empty} \bash texcount -sum -1 tmp.tex \END \begin{document} %here is a front page and a table of contents %...
Ralph Gottlieb's user avatar
5 votes
1 answer
3k 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
1 vote
0 answers
323 views

Count Characters without Spaces [duplicate]

I'm writing my BSc thesis right now in LaTeX using texmaker. The maximum amount of characters (without spaces) for the thesis is 70'000. Is there a decent way to count this? Copy-pasting it into Word ...
neacal's user avatar
  • 25
1 vote
1 answer
222 views

Have pages of a separate document not count into \getpagerefnumber{LastPage}

I want to put a release document before my actual document. Currently I am doing this by using \input{"../Common Subdocuments/Documents/ReleaseDocument"} The problem that arises is the new page ...
Michael S.'s user avatar
4 votes
2 answers
542 views

How to access the arithmetic value of count in \foreach, and use them in rotate box{}?

I have a question about access the mathematical value of count in \foreach, I will used that value to do some calculation in the following code. But it didn't work. \documentclass[margin=10pt]{...
Jiadong's user avatar
  • 175
5 votes
1 answer
1k views

Included PDF pages mess up page numbering in PDF-reader

I have a report with a frontpage, abstract, preface and acknowledgement. These pages are not numbered. Then the remaining pages contain several chapters and all these pages are numbered. Today I added ...
Tex Tiel's user avatar
1 vote
1 answer
61 views

How to redefine a command to keep track of page assignments w/o exceeding TeX capacity

Seemed straight-forward enough (and I've changed it per Christian's suggestion of using \edef instead and added some status code): \documentclass{memoir} \newcommand{\tabloidpagecount}{} \newcommand{...
WillAdams's user avatar
  • 6,881
10 votes
1 answer
8k views

Counting characters in a section of a document

Is there a way to count characters in a document portion? I need to write a summary that is 3000 characters long at most, and every time I compile the document I copy/paste the resulting text to Word ...
aaragon's user avatar
  • 3,093