MWE:
\documentclass{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\tikzset{mydecor/.style 2 args={decoration={text along path,
text align={left indent=2em},
text={|\Large|#2},
},
yshift=#1,
decorate}}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\fill[brown!65!black] (-6,0) rectangle (6,9) (180:0.45cm) arc (180:360:0.45cm);
\draw[line width=0.3cm,blue,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={-7ex}{Bold text?}] (-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}] (0,9);
% Right page
\path[mydecor={-7ex}{Bold text?}] (0,9) to[controls={+(30:2.25cm) and +(155:2.25cm)}] (5.4,9.6);
\end{tikzpicture}
\end{document}
출력은 다음과 같습니다
표시된 텍스트를 어떻게 굵게 표시할 수 있나요? 명령을 적절한 위치에 배치하지 않는 한 일반적인 방법은 작동하지 않는 것 같습니다. 나는 다음과 같이 코드를 컴파일한다.XeLaTeX.
감사합니다.
답변1
안쪽 \bfseries
에 놓으면 텍스트가 굵게 표시됩니다 ... . 따라서 .\Large
|
|
text={|\Large\bfseries|#2}
\documentclass{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\tikzset{mydecor/.style 2 args={decoration={text along path,
text align={left indent=2em},
text={|\Large\bfseries|#2},
},
yshift=#1,
decorate}}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\fill[brown!65!black] (-6,0) rectangle (6,9) (180:0.45cm) arc (180:360:0.45cm);
\draw[line width=0.3cm,blue,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={-7ex}{Bold text?}] (-5.4,9.6) to[controls={+(25:2.25cm) and +(150:2.25cm)}] (0,9);
% Right page
\path[mydecor={-7ex}{Bold text?}] (0,9) to[controls={+(30:2.25cm) and +(155:2.25cm)}] (5.4,9.6);
\end{tikzpicture}
\end{document}