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

learn more… | top users | synonyms

8
votes
1answer
307 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, ...
8
votes
2answers
458 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
231 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} ...
7
votes
1answer
9k 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 ...
12
votes
1answer
661 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
334 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 ...
21
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.
2
votes
1answer
52 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
994 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?
15
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 ...
11
votes
1answer
3k views

Trim image by number of pixels

Is it possible to trim an image by a certain number of pixels rather than a length? I have a set of images that I'm including, and in one figure, a trim of 135 on the bottom works nicely, but a ...
13
votes
1answer
13k views

Image from \includegraphics showing in wrong image size

When I use the following to embed an image: \begin{figure}[htb] \centering \includegraphics{my_image} \caption{blaaa} \label{fig:blaaa} \end{figure} whereas my_image is a JPG file, the ...
3
votes
1answer
183 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
338 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 ...
2
votes
1answer
434 views

Avoid figures encroaching on page numbers with LyX

I'm using LyX and have figures in floats and wraps but some of them are too high on the page when converted to PDF and overlap with page numbers. Is there a way to avoid this and respect the text ...
48
votes
4answers
6k 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 ...
5
votes
1answer
2k views

Big table with rotated column labels using booktabs

I'm trying to get a big table to fit into my document using the booktabs package, but it is too wide. An example of a couple of rows of the table is given below. I'm using the ...
15
votes
2answers
6k 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 ...
45
votes
2answers
42k views

How to change the size of nodes?

How is it possible to change the size of a node, for example: \begin{tikzpicture} \draw node[fill,circle]{} (0,0);% \end{tikzpicture} How to make the circle smaller or larger?
3
votes
1answer
361 views

Maximizing page usage for a table

I'm printing a table enclosing 4 other data tables, one per page, and would like to maximize the space available by reducing the margins as much as possible. I still need the page number, but wonder ...
4
votes
1answer
480 views

How to make CircuitTikZ symbols smaller

Is there a way to make symbols of the CircuitTikz package smaller (like ports). Using small/tiny as argument doesn't help.
11
votes
1answer
666 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
264 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
292 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 ...
7
votes
3answers
1k 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 ...