有没有办法控制小页面元素之间的垂直间距?

有没有办法控制小页面元素之间的垂直间距?

我有一份关于线性代数的大型文档(共 7 章)。在文档中我进行行/列运算的部分,我将矩阵放在小页面内的图形中。我在一组“矩阵行运算”和下一组“矩阵行运算”之间获得了大量垂直空间。我想知道是否可以控制垂直空间。我将我的 MWE 作为两个单独的文档(序言和章节)发布在下方。我很抱歉在序言中包含了可能不相关的包。

\documentclass[11pt,twoside,fleqn]{report}
\usepackage{enumerate,mdwlist}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=12mm]{geometry}
\usepackage{array}
\usepackage{caption}

\usepackage{float}
\setlength{\headheight}{10.0pt}
\setlength{\footskip}{50.99991pt}

\usepackage{mathtools}  % for 'bmatrix*' environment
\usepackage{paralist}   % for 'inparaenum' environment\newcommand{\dist}{\displaystyle}
\usepackage{enumitem}
\usepackage{latexsym}
\usepackage[normalem]{ulem}
\usepackage{pgfplots}
\usepackage{psfrag}
\usepackage{amsmath,amssymb,amsthm,exercise} %[fleqn]
\usepackage{etoolbox}
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
 \array{#1}}
 \makeatother
\makeatletter
\newcommand{\spx}[1]{%
\if\relax\detokenize{#1}\relax

 \expandafter\@gobble
\else
\expandafter\@firstofone
\fi
  {^{#1}}%{^{#1}}%
}
\makeatother
\newcommand\tpd[3][]{\tfrac{\partial\spx{#1}#2}{\partial#3\spx{#1}}}
\newcommand\dpd[3][]{\dfrac{\partial\spx{#1}#2}{\partial#3\spx{#1}}}

\newcommand{\md}[6]{\frac{\partial\spx{#2}#1}{\partial#3\spx{#4}\partial#5\spx{#6}}}
\newcommand{\tmd}[6]{\tfrac{\partial\spx{#2}#1}{\partial#3\spx{#4}\partial#5\spx{#6}}}
\newcommand{\dmd}[6]{\dfrac{\partial\spx{#2}#1}{\partial#3\spx{#4}\partial#5\spx{#6}}}
\newcommand{\od}[3][]{\frac{\dif\spx{#1}#2}{\dif#3\spx{#1}}}

\newcommand{\tod}[3][]{\tfrac{\dif\spx{#1}#2}{\dif#3\spx{#1}}}
\newcommand{\dod}[3][]{\dfrac{\dif\spx{#1}#2}{\dif#3\spx{#1}}}

\numberwithin{Answer}{chapter}
\numberwithin{Exercise}{chapter}
\usepackage{mathrsfs}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]

\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\theoremstyle{theorem}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}{Lemma}[theorem]
\newtheorem{example}{Example}[section]
\makeatletter
\renewenvironment{proof}[1][\proofname] {\par\pushQED{\qed}\normalfont
\topsep6
\p@\@plus6\p@\relax\trivlist\item[\hskip\labelsep\bfseries#1\@addpunct{.}]
\ignorespaces}{\popQED\endtrivlist\@endpefalse}
\makeatother
\usepackage{xifthen, xparse}
\thispagestyle{empty}
\newcommand\rowop[1]{\scriptstyle\smash{\xrightarrow[\vphantom{#1}]
{\mkern-4mu#1\mkern-4mu}}}
\DeclareDocumentCommand\converttorows
{>{\SplitList{,}}m}%
{\ProcessList{#1}{\converttorow}}

\NewDocumentCommand{\converttorow}{m}
{\ifthenelse{\isempty{#1}}{}{\rowop{#1}}\\}

\DeclareDocumentCommand\rowops{m}
{\;
\begin{matrix}
\converttorows {#1}
\end{matrix}
\; }
\usepackage{thmtools}
\declaretheoremstyle[headfont=\scshape,postheadspace=\newline]{mystyle}
\declaretheoremstyle[headfont=\scshape,postheadspace=\newline]{mystyle}

\usepackage[ampersand]{easylist}
\usepackage{calc}
\usepackage[document]{ragged2e}
\usepackage{systeme}
\usepackage{sansmathaccent}
\pdfmapfile{+sansmathaccent.map}
\pdfmapfile{+sansmathaccent.map}

\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault} 
\renewcommand{\qedsymbol}{$\blacksquare$}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage[utf8]{inputenc}

\usepackage[utf8]{inputenc}
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{1.5}
\renewcommand{\labelitemi}{\scriptsize\color{blue}{$\circ$}} 
\renewcommand{\labelitemi}{\scriptsize\color{blue}{$\circ$}} 

\usepackage{graphicx}%,showframe}

\usepackage{wrapfig}
\usepackage[dutch,english]{babel}
\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother
\long\def\@makecaption#1#2{%
 \vskip\abovecaptionskip
\sbox\@tempboxa{#1: #2}%
\ifdim\wd\@tempboxa >\hsize
\ifdim\wd\@tempboxa >\hsize

 #1: #2\par
\else
\global\@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
 %%% end of multiline caption definitions
\newcommand*{\authorimg}[1]{%
\raisebox{-.3\baselineskip}{%
\includegraphics[
scale=0.80,
keepaspectratio,
 ]{#1}%
}%
}
\usepackage{titlesec}
\titlespacing{\chapter}{0pt}{\parskip}{-\parskip}
\titlespacing{\chapter}{0pt}{\parskip}{-\parskip}
\titlespacing{\chapter}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsection}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsubsection}{0pt}{\parskip}{-\parskip}
\titleformat{\chapter}[display]
{\normalfont\sffamily\Huge\bfseries\color{blue}}

{\chaptertitlename\ \thechapter}{12pt}{\Huge}{\chaptertitlename\ 
\thechapter}{12pt}{\Huge}
\titleformat{\section}
{\normalfont\sffamily\Large\bfseries\color{brown}}
{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\sffamily\large\bfseries\color{cyan}}
{\normalfont\sffamily\large\bfseries\color{cyan}}

{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\sffamily\large\bfseries\color{purple}}
{\thesubsubsection}{1em}{}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{shapes.geometric, decorations.pathreplacing, matrix, angles, quotes, arrows, arrows.meta, datavisualization}
\usepackage{pgfplots}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, text width=2.5cm, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=2.5cm, minimum height=1cm, text centered, text width=2.5cm, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\pgfplotsset{width=5cm,compat=1.12}
\usepackage{framed}
\usepackage{mdframed}
\usepackage[most]{tcolorbox}

#####################

\begin{document}
\titleformat{\chapter}[block] 
{\normalfont\Large\bfseries\color{blue}}{\chaptertitlename\ \thechapter:}
{1em}{}
\pagenumbering{arabic}
\chapter{rowsops}\label{ch1}
\input{Chapters/rowsops}
\end{document}

%

我们如何找到 P?\ 答案:\ 通过基本行运算将 $(A_{3x4}|I_3)$ 简化为行标准形式

\begin{figure}[H]
\centering
\begin{minipage}{0.3\linewidth}
\begin{equation*}
  \begin{pmatrix}[cccc|ccc]
  2 & -1 & 0 & 1 & 1 & 0 & 0\\
1 & 2 & 1 & -1 & 0 & 1 & 0\\
2 & 9 & 4 & -5 & 0 & 0 & 1
\end{pmatrix}
\end{equation*}
\end{minipage}
\begin{minipage}{0.3\linewidth}
$\rowops {,R_1\rightarrow R_1-2r_2,R_3\rightarrow R_3-2R_2}$
\end{minipage}%
\begin{minipage}{0.3\linewidth}
\begin{equation*}
\begin{pmatrix}[cccc|ccc]
0 & -5 & -2 & 3 & 1 & -2 & 0\\
1 & 2 & 1 & -1 & 0 & 1 & 0\\
0 & 5 & 2 & -3 & 0 & -2 & 1\\
\end{pmatrix}
\end{equation*}
\end{minipage}
\end{figure}
\begin{figure}[H]
\centering
\begin{minipage}{0.33\linewidth}

\begin{equation*}
\begin{pmatrix}[cccc|ccc]
0 & -5 & -2 & 3 & 1 & -2 & 0\\
1 & 2 & 1 & -1 & 0 & 1 & 0\\
0 & 5 & 2 & -3 & 0 & -2 & 1\\
\end{pmatrix}
\end{equation*}
\end{minipage}
\begin{minipage}{0.33\linewidth}
$\rowops {,R_3\rightarrow R_3-R_1,R_1\rightarrow\frac{1}{5}R_1}$
\end{minipage}%
\begin{minipage}{0.33\linewidth}
\begin{equation*}
\begin{pmatrix}[cccc|ccc]
0 & 1 &\frac{2}{5} & -\frac{3}{5} & -\frac{1}{5} &\frac{2}{5} & 0\\
1 & 2 & 1 & -1 & 0 & 1 & 0\\1 & 2 & 1 & -1 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 1 & -4 & 1
\end{pmatrix}
\end{equation*}
\end{minipage}
\end{figure}
\begin{figure}[H]
\centering
\begin{minipage}{0.36\textwidth}
\begin{equation*}
\begin{pmatrix}[cccc|ccc]
0 & 1 &\frac{2}{5} & -\frac{3}{5} & -\frac{1}{5} &\frac{2}{5} & 0\\
1 & 2 & 1 & -1 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 1 & -4 & 1
\end{pmatrix}
\end{equation*}
\end{equation*}
\end{minipage}%
\begin{minipage}{0.36\textwidth}
\hspace{2ex}$\rowops {,R_2\leftrightarrow R_1,R_1\rightarrow R_1-2R_2}$
\end{minipage}%
\begin{minipage}{0.36\textwidth}
\begin{equation*}
\begin{pmatrix}[cccc|ccc]
1 & 0 &\frac{1}{5} & -\frac{1}{5} & -\frac{2}{5} &\frac{1}{5} & 0\\
0 & 1 &\frac{2}{5} & -\frac{3}{5} & -\frac{1}{5} &\frac{2}{5} & 0\\
0 & 0 & 0 & 0 & 1 & -4 & 1
\end{pmatrix}
\end{equation*}
\end{minipage}
\end{figure}
\medskip

因此

$P=\begin{pmatrix*}[r]
-\frac{2}{5} &\frac{1}{5} & 0\\
-\frac{1}{5} &\frac{2}{5} & 0\\
1 & -4 & 1
\end{pmatrix*}$\\

$PA=\begin{pmatrix*}[r]
1 & 0 &\frac{2}{5} &\frac{1}{5}\\
0 & 1 &\frac{2}{5} & -\frac{3}{5}\\
0 & 0 & 0 & 0
\end{pmatrix*}$\\

相关内容