{dimensions} is used for questions addressing issues related with measurements in TeX. This tag can be used with specific tags like {height}, {size}, {units},...

learn more… | top users | synonyms

45
votes
2answers
17k views

No room for a new \dimen

I have this error message: ! No room for a new \dimen . \ch@ck ...\else \errmessage {No room for a new #3} \fi which I can not find a cure for.
39
votes
3answers
4k views

Dimensioning of a technical drawing in TikZ

Is there is an easy way to mark dimensions in a technical drawing with TikZ? Is there a library or something? Edit I am using XeLaTeX. Update I chose Martin's answer because it serves me well ...
30
votes
5answers
2k views

Confused with TeX terminology: height, depth, width

The LaTeX reference card states for example \strut box w/ ht and depth of “(”, zero width I came to see text as a two dimensional feature, but I must be missing out on something... (following ...
28
votes
1answer
5k 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 ...
27
votes
1answer
691 views

What does different \fontdimen<num> mean

I know that \fontdimen<num> returns some dimensions associated with the current font. What are they?
26
votes
3answers
858 views

@tempdima, reserved@a, @tempcnta, what else?

I'm aware that some "temporary" LaTeX dimensions etc. exist. I would, however, like to know all of them. I know \reserved@a (macro), \@tempdima (dimension) and \@tempcnta (counter).
20
votes
3answers
1k views

Draw dimension of a line as a decoration in TikZ

Is it possible to define in TikZ a new decoration or something like that, such that it is possible to write something like: \draw[dim={text,above}] (A) -- (B); \draw[dim={text,below}] (C) -- (D); ...
20
votes
2answers
3k views

What are the differences between \newdimen, \newskip and \newlength?

What are the differences between \newdimen, \newskip, and\newlength? When should I use each of them? Please give me a non-trivial example for each case.
20
votes
1answer
1k views

References for \dimexpr \numexpr

I'm not really sure whether this is the right place to ask this question, but here I go.... Over the holiday I've been taking time to read through a lot of the Q&A here. I've been running across ...
17
votes
2answers
328 views

Defining a dimension with or without @

If I am writing a TeX package (as one can find such on CTAN), there are following approaches to define a new dimension length that should be changeable by a user of that package. Approach A: Define ...
15
votes
2answers
1k views

Golden ratio typography in TeX

Chris Pearson makes a number of claims in his article Secret Symphony: The Ultimate Guide to Readable Web Typography, which I find fascinating, and I would like to know: are the formulas he proposes ...
13
votes
4answers
695 views

Dividing dimensions to get a count

Is there a way to divide two dimens and get a count? For example, if I have a box that doesn't fit on a single page, and I want to know the number of pages I'd need for the box (i.e., \heightofbox / ...
13
votes
3answers
708 views

In a tikzpicture, how can I “shift” by a multiple of the current x-vector (say)?

Suppose that I have a tikzpicture begun like this: \begin{tikzpicture}[x = 20mm, y = 10mm] Now let us suppose that I want to put a subpart of the picture inside a "scope" environment and I want all ...
13
votes
1answer
2k views

Determine height and depth of letters relative to the font size

I would like to scale graphical elements (like images, tikz and tikz-timing diagrams) relative to the font size, so that they have the same height as an normal uppercase letter (i.e. X or M; I noticed ...
12
votes
2answers
4k views

Dimension too large while plotting with pgfplots

I have the following pgfplots code: \begin{tikzpicture} \begin{axis}[domain=-8:2] \foreach \i in {-10,-9.8,...,10} {\addplot+[smooth] {-x/\i+\i};}% \end{axis} \end{tikzpicture} I need several ...
11
votes
3answers
28k views

set a maximum width and height for an image

I would like to define a maximum height and a maximum width for an image at same time. I suppose there must be a package to do this, but actually I'm unable to find it...
11
votes
2answers
261 views

Other than syntax what is the difference between \dimen0= and \setlength{}{}?

I have been browsing around for a while trying to find an answer to the above question, and I have found some similar questions along with there answers, so I already have a vague idea how to answer ...
11
votes
2answers
257 views

What is “dimen” in the documentation for the ifthen package?

In the documentation for the ifthen package, there is a test called \lengthtest which compares two <dimen> parameters with the operators <, > or =. (For other test commands, <dimen> ...
11
votes
1answer
569 views

What is the right way to set a dimension parameter?

In the TeXbook Knuth set parameters for dimensions mostly as follows: \parskip=3pt Other package authors define such parameters without using the equal sign \parskip30pt Many later authors use ...
9
votes
1answer
551 views

How does PDF or PDF Viewer define a rounding rule for stroke thickness?

I defined a sequence of line segments of different thickness each as follows. \documentclass{article} \usepackage{multido} \parindent=0sp \begin{document} ...
9
votes
4answers
270 views

Depth and height confusion

I create two equations: $x \notin \mathbb{N}$; and $x \in \mathbb{N}$. As it turns out, both have the same depth value: Depth = 0.39098pt Height = 7.5pt Depth = 0.39098pt Height = 6.88889pt ...
9
votes
2answers
854 views

What is the plain TeX equivalent of \settowidth?

The \settowidth command, which sets a width equal to the width of some text, is described at Get width of a given text as length and How to set the width of the label of a description to the width of ...
9
votes
1answer
257 views

How to typeset dimensions of a box?

I want to typeset something like this: 3.0 × 3.0 × 0.9 mm How can I do that in LaTeX (using siunitx package)? So far, I have this: \num{3.0} × \num{3.0} × \SI{0.9}{\milli\metre} But probably ...
9
votes
1answer
115 views

What is the cleanest way to adjust the dimensions (height, depth, width to the left and right) of a symbol?

Every once in a while the nominal (i.e. declared) dimensions of a symbol are not identical to the actual ones. This can be intentional or not, but sometimes it is inconvenient. The dimensions of ...
9
votes
2answers
110 views

Do assignments need to be appended by % to remove the trailing white spaces?

The following shows code snippet taken from multido.tex. I noticed assignments are not ended with %. See \dimen@=#1\advance\dimen@#2 in \def\multido@step@d#1#2{% \dimen@=#1\advance\dimen@#2 ...
8
votes
2answers
419 views

TikZ/PGF: Create a saved length as part of a shape definition

When I create a new shape using pgfdeclareshape, I want to be able to store a length for later reference. I might want to do simple arithmetic on this length later on. Here's a basic attempt: ...
8
votes
1answer
169 views

This elliptical-orbit diagram compiled fine with TikZ 2.10 but fails with TikZ 3.0. Why?

I borrowed some code on Kepler's 2nd Law from the linked post here on TeX answered by Tosco. I haven't compiled the document it is in awhile but needed today. When I did, I was told dimension too ...
7
votes
1answer
857 views

How can I determine the height of a minipage?

If I have a minipage \begin{minipage}{5cm} content \end{minipage} How can I determine its height and save this value as a length?
7
votes
1answer
268 views

Why is there no \mudimendef primitive?

The TeXbook defines in chapter 24 (page 270 in my edition) the notion of <dimen>, <skip>, <mudimen> and <muskip>, the first two being used in horizontal and vertical mode, ...
6
votes
1answer
8k views

\colorbox{color}{text} without increasing the height and width of the cell in a table

When using \colorbox{color}{text} to put background color for the text in a table, the text with background color seems to take more space and makes the respective cell higher and wider. Is there a ...
6
votes
3answers
817 views

Why are box dimension assignments both local and global?

Consider the following code. \setbox0 \hbox{XXX} \fbox{\copy0} { \setbox0\hbox{ZZZ} {\wd0 0pt} \fbox{\copy0} } \fbox{\box0} This produces three ruled boxes. The two XXXs ...
6
votes
2answers
522 views

Measure 'real' height of lines/rows (as multiples of \baselineskip)

I am trying to measure the height of a few lines while the lines are set. I thought the 'real' height of a line is the baselineskip, e.g. 14.5pt for a 12p document. However, when I set the text in ...
6
votes
1answer
54 views

Why is a varwidth incorrectly vertically centered by \raisebox{-0.5\height}?

I was creating a pseudocode/JavaScript comparison table, and wanted to typeset algorithms written with the algorithm2e package vertically centered in table cells. Out-of-the box, algorithm2e can't do ...
6
votes
1answer
64 views

Overcome 'Dimension too large' when using the forest package with a lot of nodes

I am drawing a genealogical tree with the forest package in which I have approximately 50 nodes. I have reached a point where I get the message "Dimension too large" when I try to add another node. I ...
6
votes
0answers
139 views

How to visualize dimensions of frame components in beamer?

Is there a package to visualize dimension of all frame components (head/footline, sidebars, navigation bar etc) in beamer? I tried to search for something similar to layout package, but did not ...
5
votes
2answers
399 views

Error: “Dimension too large…” when plotting EXPONENTIALS with TikZ

Despite having read answers to 4-5 relate questions, I still can't get why my code does not compile. Here it is: \documentclass[11pt,twoside]{book} \usepackage[paperheight=24cm, paperwidth=35cm, ...
5
votes
2answers
473 views

Table with several dimensions

I have several dimensions to put in a table in LaTeX, these are actually results of an experiment. I am not sure what is the best way to do it in LaTeX. Here is a snapshot of one of the possibilities: ...
5
votes
2answers
204 views

Why does pgf not understand relative dimensions (ex, em, sp)?

The below MWE draws a number of rectangles using low-level pgf commands, each specified with a different unit that Latex understands. However, pgf doesn't seem to be able to determine the relative ...
5
votes
3answers
131 views

How to measure the minimum width or height of several boxes?

I know we can get the maximum width or height of several boxes via: \setbox0=\vbox{\hbox{a}\hbox{b}\hbox{c}} The maximum width is \the\wd0 \setbox0=\hbox{\hbox{a}\hbox{b}\hbox{c}} The maximum height ...
5
votes
1answer
305 views

Is it possible to remove length, counter, dim, etc that have been declared?

Let's see the following screenshot taken from an answer of Efficient ways to anonymize a document and the given comment. Is it possible to remove length, counter, dim, etc, that have been declared ...
5
votes
2answers
56 views

How to use the width of some text in \dim_compare:nTF directly?

Is it possible to use the width of some text directly inside of a <dimension expression>. I found this way using a temporary box but it seems not very elegant … \documentclass{article} ...
5
votes
1answer
76 views

Access paper dimensions

How can I access the paper dimension that are in use when compiling a document? In other words, I am looking for a command that returns the width and height of the paper used (so that the returned ...
5
votes
1answer
156 views

Retrieve em-width from another font

I’m trying to align verbatim segments with their outputs. Consider this MWE: \documentclass{article} \usepackage{lmodern} \usepackage{fancyvrb} ...
5
votes
1answer
268 views

Measuring TikZ leaves and using measurements to set sibling distance?

TL;DR Summary: Is there some way to measure the width of a leaf node and pass this measurement back up the tree to be used in setting sibling distance? (One might want to do a similar thing for ...
5
votes
1answer
310 views

TikZ: How to compare approximate equality of dimensions?

When scaling tikzpicture using option scale, some points that had equal coordinates appear to be shifted a little bit. So the precise comparision \ifdim \y1 = \y2 will not do anymore. I'm aware of ...
5
votes
0answers
491 views

bigfoot - Dimension too large (I can't work with sizes bigger than about 19 feet.)

My MWE is below. I can produce the following output in nonstopmode... ... but I see these errors in the log: ! Dimension too large. \FN@normaloutput ...\tw@ \fi \fi \ifdim \FN@vsize ...
4
votes
2answers
801 views

How to rotate a picture in 3 dimensions?

I have a picture like this: I want to use this picture rotated like this (inline with the text as well as separately): Is there a way to achieve this?
4
votes
2answers
113 views

How can I easily display the dimensions of the text body?

I want to design an image filling the whole page using Illustrator, with the right dpi and dimensions. To accomplish this, I need to know the precise dimensions of the text body (Numbers 7 and 8 in ...
4
votes
2answers
796 views

Is there a command to convert cm to bp?

I want to convert a length in cm (centimeter) to bp (big point). Is there a command to convert cm to bp?
4
votes
2answers
572 views

Get a includegraphic to stick in the same place for several beamer slides

I am working with a presentation where I want a sequence of slides with a figure that changes slightly for each slide. I want the figure to to stay in the same place for many slides and I want to ...