9

I have a silly question - i am using double column style

\documentclass[english,a4paper,12pt, openany]{book}

When I add a figure I usually put in \columnwidth and just let LaTeX to stretch it to the full width. Now, for practical reasons I'd like to prepare some figures with fixed width in 1:1 ratio, but for that I'd like to know what the \columnwidth is in cm. Is there a way to find that number?

thanks, U

1
  • \printlen[5][cm{\columnwidth} for example, using package xprintlen
    – user31729
    Nov 16, 2015 at 15:47

1 Answer 1

8

The xprintlen package provides the means to show the length of a dimension register in more 'human' units, such as cm or mm, which is the default:

\printlen[2][mm]{length register}

Will use 2 significant figures (which is the default), mm as unit of the relevant length register.

\documentclass{article}
\usepackage{pgffor}
\usepackage{xprintlen}

\begin{document}
\foreach \x in {1,...,5} {%
\printlen[\x][cm]{\columnwidth}

}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.