使用带有 Latex 扩展的 Visual Studio 代码时出现错误“underfull \hbox(\badness 10000)”

使用带有 Latex 扩展的 Visual Studio 代码时出现错误“underfull \hbox(\badness 10000)”
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[]{amsthm} %lets us use \begin{proof}
\usepackage[]{amssymb} %gives us the character \varnothing
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\begin{document}
\maketitle
\subsection*{2. P18. Exercise 3:}
Assume we have a fair eight-sided die with the numbers 1, 2, 3, 3, 4, 5, 5, 5 on its sides.
What is the probability that each of the numbers 1 through 5 will be rolled? 
If we roll two of these dice, what is the range of possible totals of the values showing 
on the two dice? What is the chance that each of the numbers in this range will be rolled?\\

答案1

请测试此代码:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[]{amsthm} %lets us use \begin{proof}
\usepackage[]{amssymb} %gives us the character \varnothing
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\title{Test}
\author{None}
\begin{document}
\maketitle
\subsection*{2. P18. Exercise 3:}
Assume we have a fair eight-sided die with the numbers 1, 2, 3, 3, 4, 5, 5, 5 on its sides.
What is the probability that each of the numbers 1 through 5 will be rolled? 
If we roll two of these dice, what is the range of possible totals of the values showing 
on the two dice? What is the chance that each of the numbers in this range will be rolled?\par

\noindent Test
\end{document}

然后替换\par\\再次编译。

在我的版本中,第一种情况下没有警告,但第二种情况下有警告。

\\是您必须避免在文本段落中使用的东西。它可用于表格或类似环境中,但不能用于文本行中。

更多内容请参见此处: https://tex.stackexchange.com/a/82666/120578

相关内容