1

This works:

\documentclass{article}

\usepackage{eso-pic}

\begin{document}

\AddToShipoutPictureBG*
{
    \setlength{\unitlength}{1 mm}
    \put(52, 240){Text}
}

Some more text

\end{document}

EDIT: I realize I was a bit too quick when first posting, assuming that

\put(52 mm, 240 mm){...}

would be equivalent to

\setlength{\unitlength}{1 mm}
\put(52, 240){...}

So the question then becomes, if I have a predefined length \mylength how can I get something like the following to work?

\setlength{\unitlength}{1 mm}
\put(52, \mylength){...}
user44413
  • 601

1 Answers1

2

The commands in the standard picture environment only allow numbers in their arguments, representing multiples of \unitlength.

One can use explicit dimensions in coordinates or displacement arguments by loading Heiko Oberdiek's package picture.

Thus \usepackage{picture} in the preamble will allow doing

\put(52, \mylength){...}

or

\put(52mm, \mylength){...}

Numbers not followed by a unit of measure will still be considered as denoting multiples of \unitlength.

Note that if you load pict2e (recommended), the loading of picture should follow it:

\usepackage{pict2e,picture}

Note however that the explicit lengths can only go in the standard commands of picture mode, not in the additional ones defined by pict2e.

egreg
  • 1,121,712