如何正确排版滚动条

如何正确排版滚动条

令我最惊讶的是,LaTeX 没有提供任何方法来正确排版滚动的 r。(好吧,Word 和 Pages 都没有做得更好,但这几乎不是一个有效的标准。)我在这里谈论的是意大利部分地区使用的正滚动 r 和巴伐利亚部分地区使用的倒滚动 r。使用 Ti 可以产生一些半合理的效果Z,

在此处输入图片描述

\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}

但为了制作这些常见的字符,似乎需要付出很多努力。

问题:有没有更简单的方法来实现这个功能?

附录:@cfr 好心地告诉我威尔士人也会卷舌音 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}

在此处输入图片描述

答案1

再动一下怎么样?

\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}

在此处输入图片描述

答案2

Marmot 的滚动“r”通过旋转增强(类似于 Menke 的回答)我尝试了几种方法来减少滚动的“颠簸感”:

  • fp使用变换矩阵包更精确地计算正弦和余弦。
  • 在 TeX 级别修复点。
  • 差异角较小。
  • 更大的分辨率。

使用颜色模型添加颜色Hsb

滚动/旋转字母“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}

答案3

这不是一个非常好的解决方案,但它很简单。

\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}

在此处输入图片描述

相关内容