{calculations} is about calculations in (La)TeX documents. A popular package is calc although may other also exist (fp, pgf, and LaTeX3 packages).

learn more… | top users | synonyms

27
votes
6answers
3k views

How to use \pageref{foo} as a number?

What I want to do is to show a "progress bar" in the header to show how far you are in the document, by making a rule with width pagenumber divided by total pages times the paper width. This is what ...
33
votes
5answers
9k views

How can I automatically calculate sums in a LaTeX table?

Sometimes I would like LaTeX to automatically calculate sums (or other simple arithmetic) for me, eg. in a table. I would like to ensure that when I update the table, I don't accidentally forget to ...
10
votes
2answers
5k views

Performing basic arithmetic in custom commands

One thing annoying in sparklines is its verbosity and dependence on external arithmetics. For example, to depict a three bar graph of 16%, 53%, 31%, one has to write: \begin{sparkline}{4} ...
9
votes
1answer
405 views

Resources For Calculating Average Sentence Length

I'm writing my masters thesis and my supervisor has picked up my sentence structure, in that they are too long. She commented that Microsoft Word has a feature to investigate 'large' sentences. How ...
11
votes
4answers
3k views

Why is this let expression not working in TikZ (calculating a midpoint)?

I have a rectangle in TikZ and the top left and bottom right corners are called (topleft) and (bottomright) respectively. I wanted to have a label midway down the left hand side of the rectangle, so I ...