# Did something that made right margin goofy

I'm editing a .tex file, adding a color box around changes I make.

\vpara{Problem:} Given $k$ social networks $\textbf{G} = \{G_1, G_2, ..., G_k\}$,
we want to output a set of partial one-to-one mappings $\textbf{M} = \{\textbf{M}_{i,j}\}$
where $\forall i, j = 1,2,...,k; i > j$. Each $m = (v_i, v_j) \in \textbf{M}_{i,j}$ denotes the
two accounts $v_i$ and $v_j$ belonging to the same person, and by partial, we mean that one person
may have an account on $G_i$ but do not have account on $G_j$.


Changed to this:

\vpara{Problem:} Given $k$ social networks $\textbf{G} = \{G_1, G_2, ..., G_k\}$, we want to
output a set of partial one-to-one mappings $\textbf{M} = \{\textbf{M}_{i,j}\}$\colorbox{yellow}{,}
where $\forall i, j = 1,2,...,k; i > j$. Each $m = (v_i, v_j) \in \textbf{M}_{i,j}$
denotes the two accounts $v_i$ and $v_j$ belonging to the same person\colorbox{yellow}{.
We designate as \textit{partial} a mapping for which a person may have an account on $G_i$
but not on $G_j$.}


Now the line beginning "We designate..." does not break at the right margin in the PDF; just goes right across the page.

Any help will be greatly appreciated!

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
– user31729
Jul 30, 2014 at 19:03
• In particular, what does \vpara do? I've never heard of that.
– JPi
Jul 30, 2014 at 19:10
• Thank you for the helpful guidance, Christian and Werner! Aug 1, 2014 at 17:17

I still don't know what \vpara does, but I suspect that your problem is with \colorbox. It seems that you just want to highlight text. For that, the soul package is preferable to using \colorbox. Presumably this does what you want.

\documentclass{article}

\usepackage{color}
\usepackage{soul}

\begin{document}
Problem: Given $k$ social networks $\textbf{G} = \{G_1, G_2, ..., G_k\}$, we want to
output a set of partial one-to-one mappings $\textbf{M} = \{\textbf{M}_{i,j}\}$\colorbox{yellow}{,}
where $\forall i, j = 1,2,...,k; i > j$. Each $m = (v_i, v_j) \in \textbf{M}_{i,j}$
denotes the two accounts $v_i$ and $v_j$ belonging to the same person\hl{.
We designate as \textit{partial} a mapping for which a person may have an account on $G_i$
but not on $G_j$.}

\end{document}

• (Tobi, I am an editor, and this is my first foray into the world of TeX; I don't know what \vpara does either.) Thank you for the soul recommendation, Jpi! Aug 1, 2014 at 17:20