2
votes
1answer
53 views

How to get float numbers as parameter of \newcommand

I have defined a \newcommand function like into this code: \documentclass{scrartcl} \usepackage{pbox,calc} \newcounter{pointsExo} \setcounter{pointsExo}{4} \newcounter{pointsSousTotal} ...
6
votes
4answers
208 views

Is there a better way to check divisibility in LaTeX?

I want to draw a trimmed ruler, for example, from 2.3cm to 3.9cm where the distance between two consecutive marks is 1mm. I have difficulty to efficiently check whether or not the counter is a ...
4
votes
1answer
305 views

sum two numbers in \ifnum

I would like to implement a command in LaTeX which would sum two numbers before comparing them to a third number as follows: \ifnum #1+45>0 above \else left \fi where #1 is an angle in ...
11
votes
3answers
384 views

How to ensure document total page numbers is a multiple of four?

I'm producing a document (book class) that will ultimately be produced using offset lithography. It's therefore useful to ensure the total number of pages is a multiple of four by adding as many blank ...
17
votes
6answers
1k views

Checking if a number is a multiple of 4

Using etoolbox, ifthen, or another form of conditional checking, how can I check if a value is a multiple of 4? E.g. if the number is 4, 8, 12, 16, etc., then it returns "true".