The dimension-expressions tag has no wiki summary.
3
votes
1answer
55 views
Adding constant to function (vspace) argument?
How can I get Latex to add a constant to a value as part of a \vspace argument?
Here's my minimal example:
\documentclass{article}
\usepackage{calc}
\begin{document}
ab
%\vspace{20mm+10mm} ...
3
votes
2answers
107 views
Undesired equal sign in beamer using \dimexpr
I'm using the following script in beamer to locate our logo at the right-most corner of all pages in the presentation,
\begin{textblock}{5}(10.0, \dimexpr 0.5\headheight - 7.5pt )
...
17
votes
1answer
2k views
What are the possible dimensions / sizes / units LaTeX understands?
I know there are different ways of expressing sizes or dimensions in LaTeX such as points (pt), inches (in) and ex.
As some commands, such as \hspace understand all of them, I would like to have a ...
15
votes
6answers
5k views
How can I sum two values and store the result in other variable?
In LaTeX2e,how can I sum two values and assign them to other variable?
I want to compute something like:
var=\textwidth - 1cm
And if both were constants:
var=1+1
2
votes
2answers
283 views
\dimexpr replacement/“expansion” without eTeX
I want to use \'{\i} in a bookmark. While it works without problems when eTeX is there, I cannot use e.g. \dimexpr without eTeX. (And the current version of my TeX distribution does not contain eTeX ...
1
vote
2answers
399 views
What is the correct syntax to do arithmetic for length and dimensionless macros?
I want to set papersize based on PSTricks settings. The PSTricks settings may be a value without dimension and/or a value with dimension.
Honestly I have not read the TeXBook because of my laziness. ...
14
votes
3answers
667 views
Why does \dimexpr swallow \relax?
Following the comments at Doing maths with distance values in LaTeX source code:
+1 for teaching me that \dimexpr can optionally swallow a \relax. Yesterday I tried to use \relax as a delimiter ...
5
votes
3answers
129 views
LaTeX3: \dim_eval:n and e-TeX dimension expression
Why does the following code not yield the expected result 264pt? Are non-integers not allowed as factors in e-TeX dimension expressions?
\documentclass{article}
\usepackage{expl3}
\begin{document}
...
2
votes
2answers
127 views
LaTeX3: \dim_set:Nn with l3calc or calc type dimension expression
I am getting an error when I try to set a dimension register with a l3calc/calc type dimension expression using LaTeX3 \dim_set:Nn command. Even wrapping the whole expression into \dim_eval:n{} ...