做了一些让右边距变得愚蠢的事情

做了一些让右边距变得愚蠢的事情

我正在编辑一个.tex文件,并在我所做的更改周围添加一个颜色框。

有这个:

\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$.

改为:

\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$.}

现在,以“我们指定...”开头的行不会在 PDF 的右边距处断开;而是直接穿过整个页面。

任何帮助将不胜感激!

答案1

我仍然不知道它的\vpara作用是什么,但我怀疑你的问题出在\colorbox。看来你只是想突出显示文本。为此,soul 包比使用 更可取\colorbox。想必这能满足你的要求。

\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}

相关内容