我的代码是:
\begin{wraptable}{l}{0.15\textwidth}
\vspace{-20pt}
\begin{tabular}{ccc|c}
$a$&$b$&$c$&$\operatorname{f}$ \\ \hline
0 &0 &0 &0 \\
0 &0 &1 &1 \\
0 &1 &0 &1 \\
0 &1 &1 &0 \\
1 &0 &0 &1 \\
1 &0 &1 &0 \\
1 &1 &0 &1 \\
1 &1 &1 &0
\end{tabular}
\end{wraptable}
\noindent Consider an example:
\subsection{Example 1}
$\operatorname{f}(a,b,c)=\bar{a}\bar{b}c+\bar{a}b\bar{c}+a\bar{b}\bar{c}+ab\bar{c}$ \vspace{5pt}
Sum of all the Minterms for which the function assumes a value of 1 is called the Canonical Sum of Products.
$\operatorname{f}(a,b,c)=\Sigma(1,2,4,6)$
\vspace{10pt}\hrule
%------------------------------------------------------------------------------------------------
\noindent
\section{Canonical Product of Sums}
请注意第 1.6 节之前的不需要的缩进空格。
我尝试使用 \vspace 来查看缩进是否消失——没有。接下来我尝试使用 \noindent,但毫无效果。
我该如何让文本恢复正常?请帮忙。
答案1
由于在这种情况下文本实际上并没有环绕表格,因此您可以改用minipage
。
\documentclass{report}
\usepackage{amsmath}
\newsavebox\tempbox
\begin{document}
\savebox{\tempbox}{\begin{tabular}[t]{ccc|c}
$a$&$b$&$c$&$\operatorname{f}$ \\ \hline
0 &0 &0 &0 \\
0 &0 &1 &1 \\
0 &1 &0 &1 \\
0 &1 &1 &0 \\
1 &0 &0 &1 \\
1 &0 &1 &0 \\
1 &1 &0 &1 \\
1 &1 &1 &0
\end{tabular}}
\noindent\usebox{\tempbox}\hspace{\columnsep}%
\begin{minipage}[t]{\dimexpr \textwidth-\wd\tempbox-\columnsep}
\noindent Consider an example:
\subsection{Example 1}
\begin{equation*}
\operatorname{f}(a,b,c)=\bar{a}\bar{b}c+\bar{a}b\bar{c}+a\bar{b}\bar{c}+ab\bar{c}
\end{equation*}
Sum of all the Minterms for which the function assumes a value of 1 is called the Canonical Sum of Products.
\begin{equation*}
\operatorname{f}(a,b,c)=\Sigma(1,2,4,6)
\end{equation*}
\hrule height0pt% force vspace after equation
\end{minipage}\par\hrule
%------------------------------------------------------------------------------------------------
\noindent
\section{Canonical Product of Sums}
\end{document}