Created
February 4, 2021 09:34
-
-
Save k16shikano/caecb90c912342063002e580afa4788b to your computer and use it in GitHub Desktop.
扇形に文字を配置するやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[uplatex,dvipdfmx]{jlreq} | |
\usepackage{tikz} | |
\usetikzlibrary {decorations.text} | |
\def\mycommand#1{\rotatebox{-90}{#1}\relax} | |
\newlength{\ripplelength} | |
\newlength{\ripplewidth} | |
\newcommand{\ripple}[2]{ | |
\settowidth{\ripplelength}{#1} | |
\setlength\ripplewidth{\dimexpr\ripplelength/3} | |
\begin{tikzpicture}[remember picture, overlay] | |
\draw (#2) [decorate,decoration={text effects along path, | |
text={#1},text align=center, | |
every letter/.style={character command=\mycommand}}] | |
arc [start angle=120, end angle=240, x radius=\ripplewidth, y radius=\ripplelength]; | |
\end{tikzpicture} | |
} | |
\begin{document} | |
\ripple{吾輩は猫である。}{3,0} | |
\ripple{名前はまだ無い。}{2,0} | |
\ripple{どこで生れたかとんと見当がつかぬ。}{1.5,2.5} | |
\end{document} |
Author
k16shikano
commented
Feb 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment