答案1
更新评论之后。
该\nicelines{<vertical space>}
命令将创建两条实线和两条虚线的图案,vertical space
图案之间有间隙。
颜色、全线粗细、点间距和点粗细均可调整。
要更改行距,setspace
可以使用包提供的环境空间来更改\baselinestretch
。示例使用值 1.5。
\documentclass[20pt]{exam}
\usepackage[a4paper, total={6in, 11in}]{geometry}
\usepackage{setspace}
%******************************************************** added <<<<<<<<<<<
\usepackage{xcolor}
\usepackage{tikz}
\definecolor{FullLinesColor}{RGB}{219,48,120} % color of the full lines <<<<<<<<<<<
\definecolor{DottedLinesColor}{RGB}{50,120,220} % color of the dots <<<<<<<<<<<<
\newcommand{\Dotsep}{8pt}% dot separation <<<<<<
\newcommand{\Dotthickness}{0.5pt}% dot thickness <<<<<<
\newcommand{\LineThickness}{0.8pt}% full line thickness <<<<<<<<<<<<<<<
\newcommand{\LinesSepStretch}{1.5}% change the baseline stretch <<<<<
\newcommand{\nicelines}[1][12pt]{% \nicelines{<vertical block separation>}
\begin{spacing}{\LinesSepStretch}
{\noindent\color{FullLinesColor}\rule{\linewidth}{\LineThickness}}
{\color{DottedLinesColor}\linedotted{\linewidth}{\Dotthickness}}
{\color{DottedLinesColor}\linedotted{\linewidth}{\Dotthickness}}
{\vspace*{#1}\color{FullLinesColor}\rule{\linewidth}{\LineThickness}}
\end{spacing}
}
\newcommand{\linedotted}[2]{\hbox to #1{\leaders\hbox to \Dotsep{\hss\bigpoint{#2}\hss}\hfill}}
\newcommand{\bigpoint}[1]{\tikz\draw[DottedLinesColor,fill=DottedLinesColor] (0,0) circle (#1);}
%********************************************************
\begin{document}
\nicelines[24pt]
\nicelines[24pt]
\nicelines[24pt]
\end{document}