
シンプルなコード (LaTeX 初心者)。次のエラーが発生します:
Underfull \hbox (badness 10000) in paragraph at lines 13--14
Underfull \hbox (badness 10000) in paragraph at lines 15--26
Underfull \hbox (badness 10000) in paragraph at lines 15--26
Underfull \hbox (badness 10000) in paragraph at lines 15--26
Underfull \hbox (badness 10000) in paragraph at lines 27--28
コードはこちら
\documentclass[11pt]{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{verbatim}
\begin{document}
\title{Homework 1}
\author{Joshua Hazel}
\date{\today}
\maketitle
\textbf{2.3 Suppose that the values for a given set of data are grouped into intervals. The intervals and corresponding frequencies are as follows:} \\
\indent
\begin{tabular}
{|l r|} \hline
age & frequency \\ \hline
1-5 & 200 \\
6-15 & 450 \\
16-20 & 300 \\
21-50 & 1500 \\
51-80 & 700 \\
81-110 & 44 \\ \hline
\end{tabular} \\ \\ \\
\textbf{Compute an \textit{approximate median} value for the data.}\\
My answer here.
\end{document}
行番号は、\textbf を使用した 2 つのセクションを指しており、もう 1 つは表の開始/終了を指しています。
コードの何が問題なのでしょうか?
答え1
ドキュメント内での明示的なスペースの使用を避け、ドキュメント構造をマークアップしてから、構造要素が適切なレイアウトになるように全体的に配置する必要があります。
次のようなものが近いかもしれません(警告は出ません)
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{verbatim}
\usepackage{parskip}
\setlength\parskip{\baselineskip}
\setlength\parindent{0pt}
\begin{document}
\title{Homework 1}
\author{Joshua Hazel}
\date{\today}
\maketitle
\setcounter{section}{2}
\setcounter{subsection}{2}
\subsection{Suppose that the values for a given set of data are grouped into intervals. The intervals and corresponding frequencies are as follows:}
\begin{tabular}
{|l r|} \hline
age & frequency \\ \hline
1-5 & 200 \\
6-15 & 450 \\
16-20 & 300 \\
21-50 & 1500 \\
51-80 & 700 \\
81-110 & 44 \\ \hline
\end{tabular}
\textbf{Compute an \textit{approximate median} value for the data.}
My answer here.
\end{document}