4

I was trying to do this exercises and I can't achieve exactly how they have to look: Image 1

Image 2

I'm not an English native speaker and in Spanish there isn't that much documentation. I was trying to find an answer searching for 'overlapping text' or 'text above text' with no good results.

I was trying it with \llap but it pivots in the wrong point:

{Blume}\llap{\rotatebox[origin=lt]{20}{Blume}}\llap{\rotatebox[origin=lt]{40}{Blume}}\llap{\rotatebox[origin=lt]{60}{Blume}}

And it look like this:

Can anyone give me a hand?

3

With tikz

\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{tikz}
\makeatletter
\newcommand\rottext[4][center]{
    \tikz[baseline=(X.base),every node/.style={inner sep=0pt}]{
        \node (X) {#2};
        \foreach \i in {1,...,#3}
        \node[rotate around={#4*\i:(X.#1)}] {#2};
    }
}
\begin{document}
Lorem ipsum
\tikz[baseline=(X.base),every node/.style={inner sep=0pt}]{
    \node (X) {Blume};
    \foreach \i in {1,...,4}
        \node[rotate around={20*\i:(X.south west)}] {Blume};
    \node[red,draw,fill,circle,inner sep=1pt] at (X.south west) {};% mark rotation point
}
dolor sit amet

Lorem ipsum
\tikz[baseline=(X.base),every node/.style={inner sep=0pt}]{
    \node (X) {Blume};
    \foreach \i in {1,...,4}
        \node[rotate around={20*\i:(X.north west)}] {Blume};
    \node[red,draw,fill,circle,inner sep=1pt] at (X.north west) {};% mark rotation point
}
dolor sit amet

As a macro:
\rottext{Blume}{10}{12}
\rottext[north east]{Blume}{2}{30}

\end{document}

enter image description here

|improve this answer|||||
3

The anchor points are selected with the first and 3rd arguments to \stackinset. The 1st argument is the horizontal anchor, left, center, or right, while the 3rd argument is the vertical anchor, top, center, or bottom. The 2nd and 4th arguments provide offsets for the anchors if you don't want them precisely at the left, center, or right, etc.

The anchor point of the \rotatebox plays a role too, and the one complicating factor is if the vertical position of the anchor point changes in the middle of the nested insets. Fortunately, for the two examples you requested, that did not play a role.

\documentclass{article}
\usepackage{stackengine,graphicx}

\begin{document}
\sffamily
\stackinset{l}{}{b}{}{\rotatebox[origin=left]{15}{Blume}}{%
\stackinset{l}{}{b}{}{\rotatebox[origin=left]{30}{Blume}}{%
\stackinset{l}{}{b}{}{\rotatebox[origin=left]{45}{Blume}}{%
\stackinset{l}{}{b}{}{\rotatebox[origin=left]{60}{Blume}}{%
Blume%
}}}}

\stackinset{c}{}{c}{}{\rotatebox{20}{Blume}}{%
\stackinset{c}{}{c}{}{\rotatebox{40}{Blume}}{%
\stackinset{c}{}{c}{}{\rotatebox{60}{Blume}}{%
\stackinset{c}{}{c}{}{\rotatebox{80}{Blume}}{%
Blume%
}}}}

\end{document}

enter image description here

|improve this answer|||||

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.