请考虑以下 LaTex 代码:
\documentclass[a4paper,11pt]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{array}
\usepackage{float}
\restylefloat{table}
% define the title
\title{A Math Problems}
\author{Robert~J.~Sherry}
\begin{document}
\maketitle
\noindent
Problem:
\newline
Fit a least-square line to the data given below with $x$ as the independent variable and $y$ as the dependent variable.
\newline
\begin{table}[H]
\begin{tabular}{|l|llllll|} \hline
x & 3 & 5 & 6 & 8 & 9 & 11 \\ \hline
y & 2 & 3 & 4 & 6 & 5 & 8 \\ \hline
\end{tabular}
\end{table}
Answer:
\newline
Problem:
当呈现上述 LaTex 代码(我确实截断了它)时,行:Answer: 被缩进。我尝试将其放在 Answer: 之前,但这会产生错误。我不想缩进该行。我该怎么办?
答案1
[H]
假设它位于段落之间。你实际上不应该在文档中需要\newline
它,我想补充一下\noindent
\usepackage{parskip}
所以段落缩进为零,只使用空行代替\newline
。