LaTeX绘制英文四线三格

Table of Contents

效果图

book.jpg

源代码

\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}

Date: 2019-06-28 Fri 17:57

Author: xueshumeng

Email: xue.shumeng@yahoo.com

Created: 2025-07-05 Sat 15:09