LaTeX: Prevent line break in a span of text

后端 未结 5 1356
离开以前
离开以前 2021-01-30 06:07

How can I prevent LaTeX from inserting linebreaks in my \\texttt{...} or \\url{...} text regions? There\'s no spaces inside I can replace with ~

5条回答
  •  深忆病人
    2021-01-30 06:21

    Use \nolinebreak

    \nolinebreak[number]

    The \nolinebreak command prevents LaTeX from breaking the current line at the point of the command. With the optional argument, number, you can convert the \nolinebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

    Source: http://www.personal.ceu.hu/tex/breaking.htm#nolinebreak

提交回复
热议问题