为了增强首页的外观,我想添加波浪形。我尝试使用 Tikz,但无法成功。
我用来制作首页的代码如下:
\documentclass[letterpaper]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{epigraph}
\usepackage{lipsum}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}
\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}
\makeatletter
\def\printauthor{%
{\large \@author}}
\makeatother
\author{%
Author 1 name \\
Department name \\
\texttt{[email protected]}\vspace{20pt} \\
Author 2 name \\
Department name \\
\texttt{[email protected]}
}
\begin{document}
\begin{titlepage}
\noindent
\titlefont \center PROFIBUS \\of\\ PROFINET?\par
\Large{Argumenten voor de implementatie van communicatie protocollen}%
\null\vfill
\vspace*{1cm}
\noindent
\hfill
\begin{minipage}{0.35\linewidth}
\begin{flushright}
\printauthor
\end{flushright}
\end{minipage}
%
\begin{minipage}{0.02\linewidth}
\rule{1pt}{125pt}
\end{minipage}
\end{titlepage}
\end{document}
谁能帮助我实现我脑海中的图像?
提前致谢
答案1
另一个解决方案是使用tikzmark
和hobby
库。不要看结果,而要看想法 ;-)
\documentclass[letterpaper]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark,hobby}
\usepackage{epigraph}
\usepackage{lipsum}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}
\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}
\makeatletter
\def\printauthor{%
{\large \@author}}
\makeatother
\author{%
Author 1 name \\
Department name \\
\texttt{[email protected]}\vspace{20pt} \\
Author 2 name \\
Department name \\
\texttt{[email protected]}
}
\begin{document}
\begin{titlepage}
\noindent
\titlefont \center \tikzmark{a}PROFIBUS \\of\\ PROFINET?\tikzmark{b}\par
\Large{Argumenten voor de implementatie van communicatie protocollen}%
\null\vfill
\vspace*{1cm}
\noindent
\hfill
\begin{minipage}{0.35\linewidth}
\begin{flushright}
\printauthor
\end{flushright}
\end{minipage}
%
\begin{minipage}{0.02\linewidth}
\rule{1pt}{125pt}
\end{minipage}
\begin{tikzpicture}[remember picture, overlay]
\begin{scope}[shift=(pic cs:a)]
\draw[line width=3mm, blue!70!black] (0,0) to[curve through={(-.5,.25) (-1,.55) (-.75,.75) (-.5,1.5)}] (-2,2);
\end{scope}
\begin{scope}[shift=(pic cs:b)]
\draw[line width=3mm, green!70!black] (0,0) to[curve through={(1,.5) (1.5,1.5) (2.5,2.5) (2,3)}] (3.5,3.8);
\end{scope}
\end{tikzpicture}
\end{titlepage}
\end{document}
答案2
您可以使用\tikzmark
在标题中适当的单词旁边放置标记,使用(current page)
节点来引用页面的适当角落,并使用相对control
点来扭曲连接这些点的线。对于绿色路径,需要一个中间坐标,以在路径中创建“双波”。
总之:
\documentclass[letterpaper]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{epigraph}
\usepackage{lipsum}
\usetikzlibrary{calc}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}
\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}
\makeatletter
\def\printauthor{%
{\large \@author}}
\makeatother
\author{%
Author 1 name \\
Department name \\
\texttt{[email protected]}\vspace{20pt} \\
Author 2 name \\
Department name \\
\texttt{[email protected]}
}
\begin{document}
\begin{titlepage}
\noindent
\titlefont \center \tikzmark{B}PROFIBUS \\of\\ PROFINET?\tikzmark{N}\par
\Large{Argumenten voor de implementatie van communicatie protocollen}%
\null\vfill
\vspace*{1cm}
\noindent
\hfill
\begin{minipage}{0.35\linewidth}
\begin{flushright}
\printauthor
\end{flushright}
\end{minipage}
%
\begin{minipage}{0.02\linewidth}
\rule{1pt}{125pt}
\end{minipage}
\begin{tikzpicture}[overlay, remember picture]
\draw[violet!70, line width=2ex] (current page.north west) .. controls +(10,-3) and +(-10,1) .. ($(B)+(0,0.5)$);
\coordinate (aux) at ($(N)!.5!(current page.north east)$);
\draw[green!70!white!80!black, line width=2ex] ($(N)+(0.2,0.5)$) .. controls +(7,2) and +(-5,-1) .. (aux)
.. controls +(5,1) and +(-8, -3) .. (current page.north east);
\end{tikzpicture}
\end{titlepage}
\end{document}
结果:
答案3
你可以玩controls
:
\documentclass[letterpaper]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{epigraph}
\usepackage{lipsum}
\renewcommand\epigraphflush{flushright}
\renewcommand\epigraphsize{\normalsize}
\setlength\epigraphwidth{0.7\textwidth}
\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}
\makeatletter
\def\printauthor{%
{\large \@author}}
\makeatother
\author{%
Author 1 name \\
Department name \\
\texttt{[email protected]}\vspace{20pt} \\
Author 2 name \\
Department name \\
\texttt{[email protected]}
}
\begin{document}
\begin{titlepage}
\begin{tikzpicture}[overlay,remember picture]
\draw[line width=5pt,color=green!75!black] (-1,1) .. controls (0,2) and
(0.5,-2) .. (1,-2) .. controls (1.6,-2) and (1.5,-1)
.. (2,-1);
end{tikzpicture}
\end{tikzpicture}
\noindent
\titlefont \center PROFIBUS \\of\\ PROFINET?\par
\Large{Argumenten voor de implementatie van communicatie protocollen}%
\null\vfill
\vspace*{1cm}
\noindent
\hfill
\begin{minipage}{0.35\linewidth}
\begin{flushright}
\printauthor
\end{flushright}
\end{minipage}
%
\begin{minipage}{0.02\linewidth}
\rule{1pt}{125pt}
\end{minipage}
\end{titlepage}
\end{document}