在上面的链接中我找到了最有用的答案。我问了一个新问题,我遇到了一个问题,即第二部分中的图被拖下来了,我不明白这是怎么回事?
代碼:
\documentclass[12pt, a4paper]{article}
\usepackage[
top=0.6in,bottom=0.5in,left=0.7in,right=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[misc]{ifsym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{forest}
\usepackage{subcaption}
\usepackage[parfill]{parskip}
%line spacing
\renewcommand{\baselinestretch}{0.9}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{intersections}
\headsep=10pt
\usepackage{wrapfig}
\begin{document}
\begin{wrapfigure}{r}{6cm}
\centering
\begin{tikzpicture}
%\draw[step=1cm,red,very thin] (-4,-4) grid (11,7);
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(2.6,2.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}
\end{wrapfigure}
For (i)
\begin{align*}
\dfrac{PE}{EQ}&=\dfrac{3.9}{3}=1.3\\
\dfrac{PF}{FR}&=\dfrac{3.6}{2.4}=1.5\\
\dfrac{PE}{EQ}&\neq \dfrac{PF}{FR}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\begin{wrapfigure}{r}{6cm}
\centering
\begin{tikzpicture}
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(3.2,1.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}
\end{wrapfigure}
For (ii)
\begin{align*}
\dfrac{PE}{QE}&=\dfrac{4}{4.5}=\dfrac{8}{9}\\
\dfrac{PF}{RF}&=\dfrac{8}{9}\\
\dfrac{PE}{QE}&=\dfrac{PF}{RF}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\end{document}
答案1
如果您添加一些 Lipsum 文本,您将看到wrapfigure
在第一个数字下方产生很大的空间(叹气)。但是,您可以通过添加一个选项来消除这个空间,[5]
这意味着该图形的高度将只有 5 行文本的高度(请注意,这些行可能非常宽,就像分数一样)
\documentclass[12pt, a4paper]{article}
\usepackage[
top=0.6in,bottom=0.5in,left=0.7in,right=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[misc]{ifsym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{forest}
\usepackage{subcaption}
\usepackage[parfill]{parskip}
%line spacing
\renewcommand{\baselinestretch}{0.9}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{intersections}
\headsep=10pt
\usepackage{wrapfig}
\usepackage{lipsum}
\begin{document}
\begin{wrapfigure}[5]{r}{6cm} % <=================================
\centering
\begin{tikzpicture}
%\draw[step=1cm,red,very thin] (-4,-4) grid (11,7);
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(2.6,2.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}
\end{wrapfigure}
For (i)
\begin{align*}
\dfrac{PE}{EQ}&=\dfrac{3.9}{3}=1.3\\
\dfrac{PF}{FR}&=\dfrac{3.6}{2.4}=1.5\\
\dfrac{PE}{EQ}&\neq \dfrac{PF}{FR}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\begin{wrapfigure}{r}{6cm}
\centering
\begin{tikzpicture}
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(3.2,1.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}
\end{wrapfigure}
For (ii)
\begin{align*}
\dfrac{PE}{QE}&=\dfrac{4}{4.5}=\dfrac{8}{9}\\
\dfrac{PF}{RF}&=\dfrac{8}{9}\\
\dfrac{PE}{QE}&=\dfrac{PF}{RF}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\end{document}
答案2
使用小页面:
\documentclass[12pt, a4paper]{article}
\usepackage[
top=0.6in,bottom=0.5in,left=0.7in,right=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[misc]{ifsym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{forest}
\usepackage{subcaption}
\usepackage[parfill]{parskip}
%line spacing
\renewcommand{\baselinestretch}{0.9}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{intersections}
\headsep=10pt
\usepackage{wrapfig}
\begin{document}
\begin{minipage}{\textwidth-6cm}
For (i)
\begin{align*}
\dfrac{PE}{EQ}&=\dfrac{3.9}{3}=1.3\\
\dfrac{PF}{FR}&=\dfrac{3.6}{2.4}=1.5\\
\dfrac{PE}{EQ}&\neq \dfrac{PF}{FR}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\end{minipage}%
\begin{minipage}{6cm}
\centering
\begin{tikzpicture}
%\draw[step=1cm,red,very thin] (-4,-4) grid (11,7);
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(2.6,2.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}
\end{minipage}
\bigskip
\begin{minipage}{\textwidth-6cm}
For (ii)
\begin{align*}
\dfrac{PE}{QE}&=\dfrac{4}{4.5}=\dfrac{8}{9}\\
\dfrac{PF}{RF}&=\dfrac{8}{9}\\
\dfrac{PE}{QE}&=\dfrac{PF}{RF}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\end{minipage}%
\begin{minipage}{6cm}
\centering
\begin{tikzpicture}
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(3.2,1.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}
\end{minipage}
\end{document}
您还可以使用paracol
如下所示的包:
\documentclass[12pt, a4paper]{article}
\usepackage[
top=0.6in,bottom=0.5in,left=0.7in,right=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[misc]{ifsym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{forest}
\usepackage{subcaption}
\usepackage[parfill]{parskip}
%line spacing
\renewcommand{\baselinestretch}{0.9}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{intersections}
\headsep=10pt
\usepackage{paracol}
\begin{document}
\begin{paracol}{2}
For (i)
\begin{align*}
\dfrac{PE}{EQ}&=\dfrac{3.9}{3}=1.3\\
\dfrac{PF}{FR}&=\dfrac{3.6}{2.4}=1.5\\
\dfrac{PE}{EQ}&\neq \dfrac{PF}{FR}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\switchcolumn
{\centering
\begin{tikzpicture}
%\draw[step=1cm,red,very thin] (-4,-4) grid (11,7);
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(2.6,2.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}}
\switchcolumn
For (ii)
\begin{align*}
\dfrac{PE}{QE}&=\dfrac{4}{4.5}=\dfrac{8}{9}\\
\dfrac{PF}{RF}&=\dfrac{8}{9}\\
\dfrac{PE}{QE}&=\dfrac{PF}{RF}
\end{align*}
Therefore, $EF$ is not parallel to $QR$.
\switchcolumn
{ \centering
\begin{tikzpicture}
\tkzDefPoint(2,3.5){P}
\tkzDefPoint(0,0){Q}
\tkzDefPoint(4,0){R}
\tkzDefPoint(0.8,1.4){E}
\tkzDefPoint(3.2,1.4){F}
\tkzDrawSegments(P,Q Q,R P,R E,F)
\tkzLabelPoints[above,yshift=0pt](P)
\tkzLabelPoints[left,yshift=4pt](Q)
\tkzLabelPoints[right,yshift=4pt](R)
\tkzLabelPoints[left,xshift=0pt](E)
\tkzLabelPoints[right,xshift=00pt](F)
\end{tikzpicture}}
\end{paracol}
\end{document}