Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to define text boxes with modifiable with and height which use a background image which should scale when you modify the width or height of the box. More complicated, it should be allowed in some way, that the background image has some elements which should scale and other which are not allowed to scale. For example consider something like this:

In that cases the pins for example should not scale, but the slip of paper should do.

share|improve this question
1  
I would use TikZ for this. Define an own environment which places its content in a \node and draw the elements relative to its coordinates. See How to make a textbox with this TikZ code ? for a code example. –  Martin Scharrer Jul 13 '11 at 8:52
1  
This question has the same idea as in Superimposing graphics –  xport Jul 13 '11 at 17:29

1 Answer 1

Run it with xelatex. With the optional argument [showgrid] you can see a grid for better placing the objects.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Viner Hand ITC}
\usepackage{graphicx,pstricks}
\newsavebox\IBox
\pagestyle{empty}
\begin{document}

\savebox\IBox{\includegraphics{/tmp/demo.jpg}}
\begin{pspicture}%[showgrid]% only for showing the grid
   (\wd\IBox,\ht\IBox)
\rput[lb](0,0){\usebox\IBox}
\rput[l]{-5}(1.8,2.5){\small Birthday!}
\rput[l]{60}(1,2.5){\small\TeX!}
\end{pspicture}

\end{document}

enter image description here

share|improve this answer
    
Thanks. Why do I need xelatex? Is is possible to do this in latex (pdflatex), too? –  student Oct 19 '11 at 13:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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