Skip to content

Instantly share code, notes, and snippets.

@y-yu
Created June 23, 2012 10:51
Show Gist options
  • Save y-yu/2977867 to your computer and use it in GitHub Desktop.
Save y-yu/2977867 to your computer and use it in GitHub Desktop.
引数の文字列を文字ごとに分割して、乱数で生成した角度の分傾けて表示する
\usepackage[dvipdfmx]{graphicx}
\usepackage[first=0, last=360]{lcg}
\makeatletter
\def\rotate#1{%
\def\str{#1@}%
\expandafter\@rotate\str}
\def\makerandrotatebox#1{%
\rand%
\rotatebox[origin=c]{\therand}{#1}}
\def\@rotate#1{%
\ifx @#1%
\else{\makerandrotatebox#1}%
\expandafter\@rotate%
\fi}
\makeatother
\begin{document}
\rotate{hogehoge}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment