MWE(使用 XeLaTeX 编译):
\documentclass{tufte-book}
\usepackage{xcolor}
\definecolor{PrussianBlue}{cmyk}{1,.41,0,.67}
\usepackage{geometry}
\usepackage{scalerel,scalefnt}
\usepackage[LGR,T1]{fontenc}
\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}
\usepackage[greek,english]{babel}
\usepackage{substitutefont}
\substitutefont{LGR}{\rmdefault}{artemisia}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\tikzset{mydecor/.style 2 args={decoration={text along path,
text align={left indent=2em},
text={|\bfseries\huge|#2},
},
yshift=#1,
decorate}}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\fill[PrussianBlue] (-6,0) rectangle (6,9) (180:0.45cm) arc (180:360:0.45cm);
\draw[line width=0.3cm,PrussianBlue!45,fill=white,miter limit=1]
(0,0.45) to[controls={+(150:2.25cm) and +(25:2.25cm)}] (-5.4,0.6) --
(-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}]
(0,9) to[controls={+(30:2.25cm) and +(155:2.25cm)}] (5.4,9.6) --
(5.4,0.6) to[controls={+(155:2.25cm) and +(30:2.25cm)}]
(0,0.45) -- (0,9);
% Left page
\path[mydecor={-8ex}{How to type}] (-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}] (0,9);
\path[mydecor={-9.5ex-2\baselineskip}{Capital BETA,}] (-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}] (0,9);
\path[mydecor={-11ex-4\baselineskip}{To take up the}] (-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}] (0,9);
\path[mydecor={-12.5ex-6\baselineskip}{Entire page?}] (-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}] (0,9);
\end{tikzpicture}
\end{document}
带输出
例如,我想要输入一个大写(粗体)的 Beta 字样,然后对其进行缩放(比如说,使用\scalefnt
)以适合这本打开的 TikZ 书的整个左页。
我尝试像往常一样在文本周围使用\textgreek
和\scalefont
命令——但不起作用。我也无法成功修改text={|\bfseries\huge|#2},
任何一个来完成任务。
问题:我怎样才能合并命令,\textgreek{B}
以便\scalefont
大写和粗体(拱形)的 Beta 占据显示的打开的书的左侧页面的大部分空间?
谢谢。
答案1
您可以使用如下方法:https://tex.stackexchange.com/a/332173/8650
或者像这样
\documentclass[tikz, border=1cm]{standalone}
\usepackage{textgreek}
\begin{document}
\begin{tikzpicture}[x=1pt, y=1pt]
\foreach \x in {-8.8,-8.7,...,8.8}{
\begin{scope}
\clip (\x,-15) rectangle (\x+0.1,15);
\node at (0,{4*cos(10*\x)}) {\underline{\Huge\bf\textBeta}};
\end{scope}
}
\end{tikzpicture}
\end{document}
我给 Beta 加了下划线,这样就可以看到曲线。