How to properly typeset a rolling r

How about some more motion?

\documentclass[varwidth,multi=page]{standalone}
\usepackage{graphicx} 
\usepackage{pgffor}

\makeatletter
\newcommand\rotateletter[2]{%
  \settoheight\@tempdima{#2}%
  \makebox[\@tempdima]{\hss\rotatebox[origin=c]{#1}{#2}\hss}}
\makeatother

\begin{document}

\foreach \i in {10,20,...,360} {
  \begin{page}
    il p\rotateletter{-\i}{r}imo d'ap\rotateletter{-\i}{r}ile

    \rotateletter{-\i}{R}isotto

    Mu\rotateletter{\i}{r}meltie\rotateletter{\i}{r}

    \rotateletter{\i}{R}echenkopf
  \end{page}
}

\end{document}

enter image description here


Marmot's rolling "r"s enhanced with rotating (similar to Menke's answer). I tried to reduce the "bumpiness" of the rolling with several methods:

  • More precise calculation of the sine and cosine with the fp package for the transformation matrix.
  • Fix point at TeX level.
  • Smaller difference angle.
  • Larger resolution.

Colors are added using the Hsb color model.

Rolling/rotating letters "r"

[...(see question)...]
\usepackage{fp}    
\newcommand*{\Rot}[2]{%
  \sbox0{#2}%
  \setbox2=\hbox to 0pt{%
    \hss\lower.5\dimexpr\ht0-\dp0\relax\copy0\hss
  }%
  \dp2=0pt\relax
  \ht2=0pt\relax
  \hbox to \wd0{%
    \def\H{#1}%
    \ifdim\H pt<0pt
      \FPadd\H{360}{\H}%
    \fi
    \color[Hsb]{\H,1,1}%
    \hss
    \vrule width 0pt height\ht0 depth\dp0\relax
    \raise.5\dimexpr\ht0-\dp0\relax\hbox{\rotatebox{#1}{\copy2}}%
    \hss
  }%
}
\newcommand*{\NodeRot}[2]{%
  \node(r){\phantom{#2}}
  (r.center) node{%
    \pdfsave
    \FPmul\a{#1}\FPpi
    \FPdiv\a\a{180}%
    \FPcos\c\a
    \FPsin\s\a
    \FPneg\S\s
    \pdfsetmatrix{\c\space\s\space\S\space\c\space}%
    \hbox to 0pt{%
      \hss
      \sbox0{#2}%
      \smash{\lower.5\dimexpr\ht0-\dp0\relax\hbox{#2}}%
      \hss
    }%
    \pdfrestore
  };
}
\newcommand{\forwardrollingr}[1][0]{\begin{tikzpicture}[baseline=(r.base)]
\NodeRot{-#1}{r}%
\FadingQuarterArrowTwo[scale=0.15]{0}
\FadingQuarterArrowTwo[scale=0.15]{90}
\FadingQuarterArrowTwo[scale=0.15]{180}
\FadingQuarterArrowTwo[scale=0.15]{270}
\end{tikzpicture}\hspace*{-1mm}
}

\newcommand{\forwardrollingR}[1][0]{\begin{tikzpicture}[baseline=(r.base)]
\NodeRot{-#1}{R};
\FadingQuarterArrowTwo[scale=0.2]{0}
\FadingQuarterArrowTwo[scale=0.2]{90}
\FadingQuarterArrowTwo[scale=0.2]{180}
\FadingQuarterArrowTwo[scale=0.2]{270}
\end{tikzpicture}\hspace*{-1mm}
}

\newcommand{\backwardrollingr}[1][0]{\begin{tikzpicture}[baseline=(r.base)]
\NodeRot{#1}{r};
\FadingQuarterArrowOne[scale=0.15]{0}
\FadingQuarterArrowOne[scale=0.15]{90}
\FadingQuarterArrowOne[scale=0.15]{180}
\FadingQuarterArrowOne[scale=0.15]{270}
\end{tikzpicture}\hspace*{-1mm}
}

\newcommand{\backwardrollingR}[1][0]{\begin{tikzpicture}[baseline=(r.base)]
\NodeRot{#1}{R};
\FadingQuarterArrowOne[scale=0.2]{0}
\FadingQuarterArrowOne[scale=0.2]{90}
\FadingQuarterArrowOne[scale=0.2]{180}
\FadingQuarterArrowOne[scale=0.2]{270}
\end{tikzpicture}\hspace*{-1mm}
}

\begin{document}

\newcommand*{\TEXT}[1][0]{%
  \begin{tabular}{@{}l@{}}
    il p\forwardrollingr[#1]imo d'ap\forwardrollingr[#1] ile
    \\
    \forwardrollingR[#1]isotto
    \\
    Mu\backwardrollingr[#1]meltie\backwardrollingr[#1]
    \\
    \backwardrollingR[#1]echenkopf
  \end{tabular}\newpage
}
\foreach \angle in {0, 3, ..., 359} {
  \TEXT[\angle]
}
\end{document}

Not a very fancy solution, but it is simple.

\documentclass{article}
\usepackage{chemmacros}
\newcommand{\frR}{\Rconf[R]} %forward rolling R
\newcommand{\frr}{\Rconf[r]} %forward rolling r
\newcommand{\brR}{\Sconf[R]} %backward rolling R
\newcommand{\brr}{\Sconf[r]} %backward rolling r
\tikzset{every picture/.append style={scale=0.75}}
\begin{document}

il p\frr imo d'ap\frr ile

\frR isotto

Mu\brr meltie\brr

\brR echenkopf
\end{document}

enter image description here

Tags:

Typography

Fun