LaTeX: Prevent line break in a span of text

后端 未结 5 1357
离开以前
离开以前 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:32

    Define myurl command:

    
    \def\myurl{\hfil\penalty 100 \hfilneg \hbox}
    
    I don't want to cause line overflows, 
    I'd just rather LaTeX insert linebreaks before 
    \myurl{\tt http://stackoverflow.com/questions/1012799/} 
    regions rather than inside them.
    
    

提交回复
热议问题