The dimensions tag has no wiki summary.
14
votes
2answers
420 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 ...
4
votes
0answers
51 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 ...
9
votes
2answers
71 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
...
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} ...
5
votes
2answers
88 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
1answer
53 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 ...
4
votes
1answer
74 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?
3
votes
2answers
57 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 ...
5
votes
2answers
101 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:
...
17
votes
2answers
211 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 ...
20
votes
1answer
193 views
What does different \fontdimen<num> mean
I know that \fontdimen<num> returns some dimensions associated with the current font. What are they?
13
votes
1answer
159 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 ...
20
votes
3answers
314 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).
1
vote
0answers
58 views
Output a document containing a single vertical-infinite page [duplicate]
Possible Duplicate:
Automate Fixed Width Page, length > some minimum length, but only as long as needed
Is there a way to output a document containing a SINGLE page (that contains the ...
9
votes
4answers
189 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 / ...
11
votes
3answers
186 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 ...
4
votes
2answers
166 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 ...
6
votes
2answers
155 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 ...
5
votes
1answer
181 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
106 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}
...
9
votes
2answers
158 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 ...
3
votes
1answer
572 views
including tif/eps/pdf fails due to bounding box/dimensions
when inserting an image into my *.tex-file, I get the error
Dimension too large
the command was (reduced to the important lines)
\begin{figure}[tbp]
\includegraphics{graphics/3-1-23}
\end{figure}
...
9
votes
2answers
480 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 ...
2
votes
1answer
147 views
How to set the width of the label of a description to the width of a string of text in ConTeXt?
I am using \startdesc{} to create a label and description environment, e.g.:
\startdesc{(label)}
This is some text in a sentence.
\stopdesc
\startdesc{(another label)}
This is some more text ...
4
votes
2answers
454 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?
7
votes
3answers
4k 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...
5
votes
1answer
160 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 ...
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 ...
26
votes
5answers
1k 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 ...
18
votes
2answers
4k 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.
17
votes
3answers
590 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);
...
1
vote
2answers
385 views
How create a paper of x,y dimensions size?
How can I create a paper of A1 size on latex? Or a x,y (in centimeters) dimensions paper?
In \documentclass looks like there isn't this option. I need use the \documentclass{standalone} package too ...
9
votes
1answer
172 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 ...
7
votes
1answer
208 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, ...
7
votes
2answers
329 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:
...
0
votes
1answer
170 views
How should I express my length calculation to minimize rounding errors?
I have an input file as follows.
% Test.tex
\documentclass{article}
\usepackage{pstricks}
\psset
{
linewidth=0.01
}
\newcommand\All{0.1}
\newcommand\Left{-\All}
\newcommand\Right{\All}
...
5
votes
1answer
4k 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 ...
8
votes
1answer
365 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}
...
2
votes
2answers
223 views
What unit should we use when working with (La)TeX and PSTricks to minimize conversion error?
I want to minimize conversion error when working with PSTricks and (La)TeX. The conversion error really affects the accuracy of bounding box, the thickness of LaTeX's \fbox and the thickness of ...
16
votes
2answers
2k 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.
2
votes
1answer
36 views
How to suppress units such that they can be passed to viewport key?
How to suppress units in length macros such that they can be passed to viewport. See the following Minimal Not Working Example,
\documentclass{article}
\usepackage{graphicx}
\newsavebox\IBox
...
4
votes
2answers
497 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?
8
votes
1answer
1k 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 ...
3
votes
1answer
142 views
Force stringification of a length
I'm trying to include a background image of the correct size based on the two variables \IApaperheight and \IApaperwidth.
To do this, I'm converting the lengths to a rounded text value and ...
5
votes
1answer
212 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 ...
28
votes
2answers
2k 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 for ...
8
votes
2answers
2k 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 ...
10
votes
1answer
447 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 ...
11
votes
2answers
239 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> ...
3
votes
2answers
256 views
A problem with the dimension of the pages of a book
I am typesetting a book in mathematics and I have a problem with the dimension of its pages. My publisher wants me to prepare the book in A4 format and also the size of the texts in each pages be ...

