[Tex/LaTex] the problem of using “~\\” and blank line

warnings

Recently,I found the code that cotains the"~\\" and blank line always shows the warning imformation "Underfull \hbox (badness 10000) in paragraph at lines"

\documentclass{ctexart}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{epstopdf}
\hfuzz=\maxdimen


$(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1}$,$(A \pm  B)^* \neq A^* \pm B^*$~\\

$|(A^*)^*|=|A|^{n^2-2 n+1}$~\\

\end {document}

I add the code:

\tolerance=10000
\hbadness=10000
\begin{document}

However,fail to solve it!

Best Answer

A paragraph should be ended by leaving a blank line in the input, not with ~\\. What happens is that an empty line is produced and it's underfull by construction, because it has nothing in it.

If you really need a blank line between two paragraph, use \bigskip (better yet \medskip) between them:

... this is the end of a paragraph.

\bigskip % or \medskip

Here a new one starts ...

If you want a vertical space between all paragraphs, consider loading instead the parskip package (look at its documentation). Note that “leaving blank lines” here and there is a practice coming from the usage of word processors, where it's very easy to do it (and thus spoil the document's appearance).

For your formulas, you should use an alignment environment; if you want (almost) flush left equations, there's the option fleqn:

\documentclass[fleqn]{article}
\usepackage{amsmath}
\usepackage{lipsum} % just for the example
\begin{document}

\lipsum*[2]
\begin{gather*}
(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1},\quad
(A \pm  B)^* \neq A^* \pm B^*\\
|(A^*)^*|=|A|^{n^2-2 n+1}
\end{gather*}
\lipsum*[3]

\end{document}

enter image description here

Warning

Use none of the following commands:

\hfuzz=\maxdimen
\tolerance=10000
\hbadness=10000

With them you're basically saying that you don't care about getting good paragraphs. Maybe you don't care, but your readers do.

Related Question