# How to avoid unbreakable \pmb boxes when typesetting math?

I have a big problem called as a river problem. I'm using the report class defined as:

\documentclass[11pt,notitlepage,a4paper,oneside]{report}
\usepackage[english]{babel}
\usepackage[cp1250]{inputenc}
\usepackage{graphicx,amsmath,amsthm,amssymb,a4wide,eucal,exscale,china2e,varioref,acronym}
\usepackage[left=3.5cm,top=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\newtheorem{definition}{Definition}[chapter]
\hyphenpenalty=10000
\sloppy
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}
}

\begin{document}

\begin{definition}
Let $(\Omega,\mathcal{F},\mathsf{F},\mathsf{P})$ be a stochastic
basis. A vector process $\mathbf{W}=(\mathbf{W}_{t},\;t\ge 0)=(W^{1}_{t},W^{2}_{t},\ldots,W^{n}_{t})_{t\ge 0}$ is called an
\pmb{n-dimensional $(\mathcal{F}_{t})$-Wiener process with
covariance matrix $Q$} if it has the following properties:
\begin{itemize}
\item[$\widetilde{(W1)}$] $\mathbf{W}_{t}-\mathbf{W}_{s}$ is
independent of $\mathcal{F}_{s}$ for all $0\le s<t$.
\item[$\widetilde{(W2)}$]
$\mathcal{L}(\mathbf{W}_{t}-\mathbf{W}_{s})= N(\mathbf{0},(t-s)\mathbf{Q})$ \item[$\widetilde{(W3)}$]
$\mathbf{W}$ has $\mathsf{P}$-a.s. continuous trajectories.
\item[$\widetilde{(W4)}$] $\mathbf{W}_{t}$ is an
$(\mathcal{F}_{t})$-adapted process for every $t\ge 0$.
\end{itemize}
\end{definition}

\end{document}


In some cases the output is really ugly. Is it possible to get rid of "rivers" without deleting the command sloppy, which I need to keep in the document?

-
Please add a small minimal working example (MWE) that illustrates your problem. – Martin Scharrer May 20 '12 at 20:19
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the “code” button (with “{}” on it). – Tobi May 21 '12 at 7:46
Of course you know that \pmb is to be used as the very last resort and won't split its contents across lines. I would never use it for more than one symbol which can't be obtained in other ways. Usually definitions are typeset in upright type and the defined term is in italics. – egreg May 21 '12 at 14:09

Section 8.5 of the Comprehensive LaTeX Symbol List shows various ways to get bold math which seems to be the main problem here. I chose \boldsymbol, microtype is always a good idea and although I prefer paralist over enumitem, the latter is actually needed in this case so I stole egreg's solution for this:

\documentclass[11pt,notitlepage,a4paper,oneside]{report}
\usepackage[english]{babel}
\usepackage[cp1250]{inputenc}
\usepackage{graphicx,amsmath,amsthm,amssymb,a4wide,eucal,exscale,varioref,acronym,china2e}
\usepackage[left=3.5cm,top=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\usepackage{microtype}
\usepackage{enumitem}
\newtheorem{definition}{Definition}[chapter]
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}
}

\begin{document}

\begin{definition}
Let $(\Omega,\mathcal{F},\mathsf{F},\mathsf{P})$ be a stochastic
basis. A vector process $\mathbf{W}=(\mathbf{W}_{t},\;t\ge 0)=(W^{1}_{t},W^{2}_{t},\ldots,W^{n}_{t})_{t\ge 0}$ is called an
\textbf{n-dimensional $\boldsymbol{(\mathcal{F}_{t})}$-Wiener process with
covariance matrix $\mathbf{Q}$} if it has the following properties:
\begin{enumerate}[label=$\widetilde{(W\arabic*)}$,leftmargin=*]
\item $\mathbf{W}_{t}-\mathbf{W}_{s}$ is independent of $\mathcal{F}_{s}$ for all $0\le s<t$.
\item $\mathcal{L}(\mathbf{W}_{t}-\mathbf{W}_{s})=N(\mathbf{0},(t-s)\mathbf{Q})$
\item $\mathbf{W}$ has $\mathsf{P}$-a.s. continuous trajectories.
\item $\mathbf{W}_{t}$ is an $(\mathcal{F}_{t})$-adapted process for every $t\ge 0$.
\end{enumerate}
\end{definition}
\end{document}


I hope this is how you want it to look like:

-
@ Christian: You are right, this one I was trying to get. Thank you. Just one more question, I could not open the Comprehensive latex Symbol List above. I guess I mean this one math.boun.edu.tr/instructors/gurel/symbols-a4.pdf but I cannot find the section 8.5. It is nothing to do with my problem, but I am just curious what you were talking about. – Laura May 23 '12 at 11:53
@Jane Interesting, the link works fine for me. The version you found is from 2002. Perhaps you're behind a proxy or firewall, got redirected and have problems with ftp links? Or you just got redirected to a broken link? Try this specific one instead: ftp.tu-chemnitz.de/pub/tex/info/symbols/comprehensive/… – Christian May 23 '12 at 14:59
@ christian: I can't opet it either. In both cases I read, the file is damaged and cannot be fixed. – Laura May 23 '12 at 20:55
@Jane That's strange. Works fine for me in every PDF reader I try, including Adobe Reader which is the reference implementation I guess. What do you use to view PDFs? Can you try something else? – Christian May 24 '12 at 6:34
BTW, file size is 4387686 bytes (4.2MiB), md5sum is f415065197af67c5cd7a7bc8e09579bc. Just in case you want to check you got the whole and intact file. – Christian May 24 '12 at 6:37

Use the microtype package and if it need be the ragged2e package. It will improve the text tremendously as you will observe by comparing your minimal with the below:

before

after

without "poor man's bold"

However, the bigger source of the problem is you are adding too many inline equations and symbols, that neither add to the readability of your publication nor to the typography of the text.

The macro \pmb stands for poor man's bold. In the early days of TeX many printers were incapable of printing in bold. Knuth in the TeXBook gave an example of "poor man's bold," (The TeXbook, p. 386) which can be typeset obtained by overprinting the normal weight symbol with slight offsets. See http://tex.stackexchange.com/a/8957/963 for a bit of additional explanations. Don't use it rather use \textbf directly.

For most normal texts, it is very difficult and unusual for TeX to produce rivers, provided you do not fiddle with parameters. As the macro \pmb typesets its contents in an box, TeX cannot hyphenate it causing the problems you experienced.

Once you free TeX, from the limitations you imposed on it and you add microtype that will minimize hyphenation the text will improve as you can see in the third image.

Finally, for emphasis is considered better typography to use an italic font.

\documentclass[11pt,notitlepage,a4paper,oneside]{report}
\usepackage[english]{babel}
\usepackage[cp1250]{inputenc}
\usepackage{graphicx,amsmath,amsthm,amssymb,a4wide,eucal,exscale,china2e,varioref,acronym,microtype,ragged2e}
\usepackage[left=3.5cm,top=2cm,right=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\newtheorem{definition}{Definition}[chapter]
%\hyphenpenalty=10000
%\sloppy
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}
}

\begin{document}

\begin{definition}
Let $(\Omega,\mathcal{F},\mathsf{F},\mathsf{P})$ be a stochastic
basis. A vector process $\mathbf{W}=(\mathbf{W}_{t},\;t\ge 0)=(W^{1}_{t},W^{2}_{t},\ldots,W^{n}_{t})_{t\ge 0}$ is called an
\pmb{n-dimensional $(\mathcal{F}_{t})$-Wiener process with
covariance matrix $Q$} if it has the following properties:
\begin{itemize}
\item[$\widetilde{(W1)}$] $\mathbf{W}_{t}-\mathbf{W}_{s}$ is
independent of $\mathcal{F}_{s}$ for all $0\le s<t$.
\item[$\widetilde{(W2)}$]
$\mathcal{L}(\mathbf{W}_{t}-\mathbf{W}_{s})= N(\mathbf{0},(t-s)\mathbf{Q})$ \item[$\widetilde{(W3)}$]
$\mathbf{W}$ has $\mathsf{P}$-a.s. continuous trajectories.
\item[$\widetilde{(W4)}$] $\mathbf{W}_{t}$ is an
$(\mathcal{F}_{t})$-adapted process for every $t\ge 0$.
\end{itemize}
\end{definition}
\end{document}

-
Thanks for answer. I added the packages microtype and ragged2e but I still do dot know what you used instead of \pmb command. – Laura May 21 '12 at 16:10
As you can see in the example code, I just added microtype and removed the sloppy and penalty. Microtype will tend to balance the text. I did leave \pmb, but as egreg mentioned in the comments it is as a last resort. – Yiannis Lazarides May 21 '12 at 17:07
@ Yiannis: Thanks for the package microtype, very useful one. All text looks much better. However I will have to find other solution with the "river" problem. It is impossible to omit in a long text sloppy and hyphenpenalty commands. It causes lots of problems at the end of lines. What would you use instead of \pmb for the same emphasis? Why is it a bad command? – Laura May 22 '12 at 10:01
@Jane Sorry if I was not very clear. Let me extend the post this evening with full details. (We are probably on different Continents:) – Yiannis Lazarides May 22 '12 at 10:32
What will ragged2e do when the text is justified? – Christian May 23 '12 at 15:03

Here's a way to solve some your river problems: first of all no \sloppy declaration; then the usual way to treat definitions: text in upright type and the defined term in italics.

\documentclass[11pt,notitlepage,a4paper,oneside]{report}
\usepackage[english]{babel}
\usepackage{amsmath,amsthm}
\usepackage[left=3.5cm,top=2cm,right=2cm,bottom=2cm]{geometry}

\usepackage{microtype}
\usepackage{enumitem}
\usepackage{fancyhdr}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}
}

%%% Theorem-like environments %%%
\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]

\theoremstyle{plain}
\newtheorem{proposition}[definition]{Proposition}
\newtheorem{theorem}[definition]{Theorem}
\newtheorem{lemma}[definition]{Lemma}
\newtheorem{corollary}[definition]{Corollary}

\theoremstyle{remark}
\newtheorem{example}[definition]{Example}
\newtheorem{remark}[definition]{Remark}
\newtheorem{notation}[definition]{Notation}
\newtheorem{convention}[definition]{Convention}

\begin{document}

\chapter{Wiener processes}

\begin{definition}
Let $(\Omega,\mathcal{F},\mathsf{F},\mathsf{P})$ be a stochastic
basis. A vector process $\mathbf{W}={(\mathbf{W}_{t},\,t\ge 0)}= (W^{1}_{t},W^{2}_{t},\ldots,W^{n}_{t})_{t\ge 0}$ is called an
\emph{$n$-dimensional $(\mathcal{F}_{t})$-Wiener process with
covariance matrix~$Q$} if it has the following properties:
\begin{enumerate}[label=$\widetilde{(W\arabic*)}$,leftmargin=*]
\item $\mathbf{W}_{t}-\mathbf{W}_{s}$ is independent of $\mathcal{F}_{s}$
for all $0\le s<t$;

\item $\mathcal{L}(\mathbf{W}_{t}-\mathbf{W}_{s})=N(\mathbf{0},(t-s)\mathbf{Q})$;

\item $\mathbf{W}$ has $\mathsf{P}$-a.s.\ continuous trajectories;

\item $\mathbf{W}_{t}$ is an $(\mathcal{F}_{t})$-adapted process for every $t\ge 0$.
\end{enumerate}
\end{definition}

\end{document}


Notice how \emph is used for the defined term; the definition environment is declared after \theoremstyle{definition}, which causes all subsequent theorem-like environments to have the body text in upright type.

The enumerated list is best treated with enumitem features.

I've removed all packages not essential for the example.

-
@ egreg: Thanks for your patient, but I don't like the way with the \emph command at all, the defined term is not marked enough. The version with \pmb is much more prettier for me. However I would like to ask you how to define sequence definitions, theorems, propositions....In my work it is defined in teh following way, probably wrong one – Laura May 22 '12 at 15:08
@ egreg: \newtheorem{definition}{Definition}[chapter] \newtheorem{proposition}[definition]{Proposition} \newtheorem{theorem}[definition]{Theorem} \newtheorem{lemma}[definition]{Lemma} \newtheorem{corollary}[definition]{Corollary} \theoremstyle{remark} \newtheorem{example}[definition]{Example} \theoremstyle{remark} \newtheorem{remark}[definition]{Remark} \theoremstyle{remark} \newtheorem{notation}[definition]{Notation} \newtheorem{convention}[definition]{Convention} – Laura May 22 '12 at 15:09
@Jane Italics is the most frequently way to emphasize defined terms. For the big list of theorems, add \theoremstyle{definition} in front of the first and \theoremstyle{plain} just after it. – egreg May 22 '12 at 15:12
@ greg: I tried to use your advice \theoremstyle{definition} in front of the first and \theoremstyle{plain} just after it. Don't want to see what I got:-))) Absoluty horrible looking theorems and definitions merging with other text. No italics, nothing. – Laura May 22 '12 at 16:21
@Jane I've added the proper definitions to my answer – egreg May 22 '12 at 16:28