LaTeX绘制英文四线三格
效果图
源代码
\documentclass[twoside]{ctexart}
\usepackage{tikz}
\usepackage[paper=a4paper, nofoot, nomarginpar, headsep=0.3cm, top=2cm, scale=0.90]{geometry}
\usepackage{pgffor}
\usepackage{indentfirst}
\setlength{\parindent}{0em}
\usepackage{ifthen}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[RO]{Date:\quad{}\qquad{}/\quad{}\qquad{}/\qquad{}\qquad{}}
\usepackage{fontspec}
\setmainfont{Source Code Pro}
\begin{document}
\begin{tikzpicture}
\newcounter{counter_a}
\foreach \x in {0,3,6,...,264}{
\stepcounter{counter_a}
\ifthenelse{\value{counter_a} = 5}
{\setcounter{counter_a}{0}}
{\ifthenelse{\value{counter_a} = 2}{\draw [dashed, red] (0mm,\x mm) -- (\textwidth,\x mm);}{\draw [dashed] (0mm,\x mm) -- (\textwidth,\x mm);}}
}
\end{tikzpicture}
\begin{tikzpicture}
\setcounter{counter_a}{0}
\foreach \x in {0,3,6,...,264}{
\stepcounter{counter_a}
\ifthenelse{\value{counter_a} = 5}
{\setcounter{counter_a}{0}}
{\ifthenelse{\value{counter_a} = 2}{\draw [dashed, red] (0mm,\x mm) -- (\textwidth,\x mm);}{\draw [dashed] (0mm,\x mm) -- (\textwidth,\x mm);}}
}
\end{tikzpicture}
\end{document}