섹션에서 TikZ를 사용하여 이 장식을 어떻게 만들 수 있나요?

섹션에서 TikZ를 사용하여 이 장식을 어떻게 만들 수 있나요?

여기에 이미지 설명을 입력하세요

이미지처럼 기사의 섹션이나 하위 섹션에 장식을 만드는 것이 가능합니까?

답변1

헤더(섹션, 하위 섹션 등) 앞에 tikz 줄을 넣은 다음 음수 값과 함께 \vspace{}를 사용하여 헤더 위로 이동할 수 있습니다.

\documentclass{article}

\usepackage{tikz} 

\begin{document}


\begin{tikzpicture}[line width=3pt]
    \draw[rounded corners=8pt, pink] (0,0) -- (0.5,0.5) -- (0.7,0.0) -- (1.1,0.6) -- (1.5,-0.1) -- (1.8,0.4) -- (2.4,-0.1) -- (3.0,0.3) -- (3.5,0.0);
\end{tikzpicture}

\vspace{-1.3cm} % to move the line over the section header

\section{First section}

Your text goes here.

\begin{tikzpicture}[line width=3pt]
    \draw[rounded corners=8pt, pink] (0,0) -- (0.5,0.5) -- (0.7,0.0) -- (1.1,0.6) -- (1.5,-0.1) -- (1.8,0.4) -- (2.4,-0.1) -- (3.0,0.3) -- (3.5,0.0);
\end{tikzpicture}

\vspace{-1.2cm} % to move the line over the section header

\subsection{A subsection}

More text.

\end{document}

선을 편집하고 싶을 수도 있고 글꼴에 따라 선이 원하는 위치에 나타나도록 vspace를 조정해야 할 수도 있지만 이는 매우 기본적인 기사 형식에서 나에게 효과적이었습니다. 헤더 라인

관련 정보