51

To my greatest surprise, LaTeX does not provide any means to properly typeset rolling r's. (OK, neither Word nor pages do any better, but this is hardly a valid criterion.) I am talking here about the forward rolling r as it is spoken in some parts of Italy and the backward rolling r which one can find in parts of Bavaria. It is possible to produce something semi-reasonable with TikZ,

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fadings}

\newcommand{\FadingQuarterArrowOne}[2][]{% from https://tex.stackexchange.com/a/409185/121799
  \begin{scope}[transform canvas={rotate=#2},#1]
    \shade [gray,path fading=south]
      (-40:1) -- (-40:1.2) arc (-40:40:1.2 and 1.2) --
      (40:1.2) -- (40:1.3) --
      (45:1.1) -- (40:0.9) -- (40:1) arc (40:-40:1 and 1);
  \end{scope}%
}

\newcommand{\FadingQuarterArrowTwo}[2][]{%
  \begin{scope}[transform canvas={rotate=#2},#1]
    \shade [gray, shading angle=180, path fading=north]
      (40:1) -- (40:1.2) arc (40:-40:1.2 and 1.2) --
      (-40:1.2) -- (-40:1.3) --
      (-45:1.1) -- (-40:0.9) -- (-40:1) arc (-40:40:1 and 1);
  \end{scope}%
}

\newcommand{\forwardrollingr}{\begin{tikzpicture}[baseline=(r.base)]
\node(r){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}{\begin{tikzpicture}[baseline=(r.base)]
\node(r){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}{\begin{tikzpicture}[baseline=(r.base)]
\node(r){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}{\begin{tikzpicture}[baseline=(r.base)]
\node(r){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}

il p\forwardrollingr imo d'ap\forwardrollingr ile

\forwardrollingR isotto

Mu\backwardrollingr meltie\backwardrollingr

\backwardrollingR echenkopf
\end{document}

but this appears to be a lot of effort to produce such common characters.

QUESTION: Is there a simpler way to make this work?

ADDENDUM: @cfr kindly informed me that Welsh also roll the r. (But how should a poor marmot know that, there are no marmots in Wales.) So I can only guess how people there roll their r.

\documentclass{article}
\usepackage{animate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[active,tightpage]{preview}
\makeatletter
\def\@anim@@newframe{\@ifstar\@anim@newframe\@anim@newframe}
\def\@anim@newframe{\end{preview}\begin{preview}}
\renewenvironment{animateinline}[2][]{%
  \let\newframe\@anim@@newframe%
  \let\multiframe\@anim@multiframe%
  \begin{preview}}{%
  \end{preview}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\usepackage{tikz}
\usetikzlibrary{shadings}
\begin{document}
\begin{animateinline}[autoplay,loop]{2}
\multiframe{36}{i=0+1}{\pgfmathsetmacro{\X}{sin(\i*10)}
\pgfmathsetmacro{\Y}{cos(\i*10)}
cute fu\begin{tikzpicture}[baseline=(b.base),inner sep=0pt]
\node(b){\phantom{rr}};
\node[yscale=\Y,xslant=\X](r){rr};
\end{tikzpicture}y \begin{tikzpicture}[baseline=(b.base),inner sep=0pt]
\node(b){\phantom{r}};
\node[yscale=\Y,xslant=-\X](r){r};
\end{tikzpicture}odent~~~~~~
}
\end{animateinline}
\end{document}

enter image description here

  • 1
    Use the R in Gill’s floriated capitals ;-) – Thérèse Apr 1 '18 at 2:25
  • 1
    Oh dear. Well, it’s a free and legal version of this. – Thérèse Apr 1 '18 at 2:59
  • 1
    Try this version, converted from TTF to OTF by me using FontForge. The R has enough rolling waves to make me sea-sick, but it’s always nice to find a Gill creation in one’s Easter basket! – Thérèse Apr 1 '18 at 3:39
  • 1
    You left out Welsh (and some forms of Welsh English). Or is that a deliberate part of the joke? And that is without mentioning 'rh', of course. – cfr Apr 1 '18 at 3:40
  • 2
    The canonical way to typeset this is shown here: tex.stackexchange.com/q/76316/42 ;-) – Konrad Rudolph Apr 1 '18 at 11:40
61

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

  • 2
    How angry would you be if I accepted the other answer? – user121799 Apr 3 '18 at 20:52
  • 5
    @marmot About this angry ;) – Henri Menke Apr 3 '18 at 21:26
  • 4
    You scare me! ;-) – user121799 Apr 3 '18 at 21:57
53

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}
  • These are gorgeous and I am glad this derailed the way it did. – JoonasD6 Apr 1 '18 at 20:40
  • Is it possible to have the shaded arrows not pixelated? – user121799 Apr 2 '18 at 14:53
  • @marmot AFAIK the site only supports GIF as animated image format. The number of colors in GIF is limited to 256. – Heiko Oberdiek Apr 2 '18 at 16:53
  • 1
    @marmot Choose whatever you like, it's a fun tag anyway. – Heiko Oberdiek Apr 3 '18 at 21:12
  • 1
    Henri Menke had a more convincing argument ;-) Thanks for joining this fun question! – user121799 Apr 3 '18 at 21:57
9

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

Your Answer

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