抱歉,我一次问了两个问题,但是我在使用以下代码时遇到了麻烦,它在各个部分之间产生了不需要的空白页,我不知道为什么。
而且我也尝试过使用 \page*{} 来重置图表计数器,但无济于事,我是不是做了什么愚蠢的事情?
\documentclass{book}
\usepackage{blindtext}
\usepackage{tikz}
\usepackage{tkz-euclide}
\newcommand{\AG}{1.5}
% Standard packages
\usepackage{
float,
graphicx
}
% Set page margins
\usepackage[top=1.0in, bottom=1.0in, left=1.0in, right=1.0in]{geometry}
\setlength{\marginparwidth}{0pt}
% Set nice page headers
\usepackage{fancyhdr}
\pagestyle{fancy}
% Paragraph style
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
% Proposition environment
\newenvironment{explanation}
{\begin{center}\em}
{\end{center}}
\newcounter{CountStep}
\newcounter{CountDiag}
\newenvironment{diagram}
{\stepcounter{CountStep}\stepcounter{CountDiag}\vspace*{10pt} Step~\theCountStep\par
\begin{center}
\begin{tikzpicture}}
{\end{tikzpicture}\vspace*{-5pt}\par Diagram~\theCountDiag
\end{center}}
\setcounter{chapter}{1}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{}{0pt}{\Huge}
\titlespacing*{\chapter}
{0pt}{0pt}{30pt}
\titleformat{\section}[display]
{\normalfont\huge\bfseries}{}{-20pt}{\Large}
\titlespacing*{\section}
{0pt}{0pt}{10pt}
\begin{document}
\part*{}
\section{Opposite angles}
\begin{explanation}
When two straight lines intersect (or cross), two pairs of opposite angles are formed. Opposite angles are equal.
\end{explanation}
\begin{center}
\begin{tabular}{cc}
\begin{tikzpicture}
\tkzDefPoint(-2,1){A}
\tkzDefPoint(3,-2){B}
\tkzDefPoint(2.5,1.5){C}
\tkzDefPoint(-2,-2.2){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment(C,D)
\tkzInterLL(A,B)(C,D) \tkzGetPoint{E}
\tkzLabelPoints[above](A,B)
\tkzLabelPoints[below](C,D)
\end{tikzpicture}
&
\begin{tikzpicture}
\tkzDefPoint(-2,1){A}
\tkzDefPoint(3,-2){B}
\tkzDefPoint(2.5,1.5){C}
\tkzDefPoint(-2,-2.2){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment(C,D)
\tkzInterLL(A,B)(C,D) \tkzGetPoint{E}
\tkzLabelPoints[above](A,B)
\tkzLabelPoints[below](C,D)
\end{tikzpicture}
\end{tabular}
\end{center}
\clearpage
\part*{}
\section{Alternate Angles}
\begin{explanation}
When a straight line crosses two parallel lines (shown by the arrow heads on the lines), it forms two pairs of alternate angles (in a sort of a $Z$ shape). Alternate angles are equal.
\end{explanation}
\begin{diagram}
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
\tkzDefPoint(0,3){C}
\tkzDefPoint(4,3){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment(C,D)
\end{diagram}
\clearpage
\part*{}
\section{Corresponding angles}
\begin{explanation}
Corresponding angles formed by parallel lines are equal. Corresponding angles form a sort of $F$-shape.
\end{explanation}
\begin{diagram}
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
\tkzDefPoint(0,3){C}
\tkzDefPoint(4,3){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment(C,D)
\end{diagram}
\clearpage
\part*{}
\section{Co-interior angles}
\begin{explanation}
When a straight line crosses two parallel lines to make a kind of $C$-shape, the co-interior angles (allied angles) total $180/^{circ}$.
\end{explanation}
\begin{diagram}
\tkzDefPoint(0,0){A}
\tkzDefPoint(4,0){B}
\tkzDefPoint(0,3){C}
\tkzDefPoint(4,3){D}
\tkzDrawSegment(A,B)
\tkzDrawSegment(C,D)
\end{diagram}
\clearpage
\end{document}
欢迎任何帮助或指点,谢谢。