3
votes
1answer
71 views

LaTeX Macro for “code” style, underscore package and hyphenation

I'm looking for a way to nicely set code inside my document. I used \def\code#1{{\texttt{#1}}}, but it still allows the text to be hyphenated. To prevent that, I tried the advise from Prevent ...
3
votes
1answer
200 views

Hyphenation when using \verb command

I'm having a problem using \verb command. Usually when I want some verbatim font in the current line (not in a new paragraph) I use the \verb command, not the verbatim environment. So, when I use ...
1
vote
1answer
199 views

Hyphenate typewriter / avoid overfull \hboxes in code, using fontspec and XeTeX

I would like to avoid overfull \hboxes as a result of inline code, inserted with \textt{foo} or \ttfamily, e.g. in this MWE: % compile with xelatex \documentclass{article} \usepackage[textwidth=4cm, ...
0
votes
0answers
418 views

How to get my teletype (\tt) text to wrap to the next line, rather than run off the edge of the PDF? [duplicate]

Possible Duplicate: \texttt overfull hbox problem How to automatically hyphenate within \texttt? Much of the LaTeX documents I write deal with computer-sciencey stuff that I like to put ...
9
votes
1answer
238 views

Hyphenate \ttfamily without hyphen dash

Is it possible to hyphenate text without inserting a hyphen. \documentclass{article} %\usepackage{courier} %\usepackage{bera} %\usepackage{arev} \begin{document} ...
30
votes
1answer
3k views

How to automatically hyphenate within \texttt?

This question was phrased as a bug report for LaTeX and I thought it would be helpful to be presented here (including an answer). The person had a lot of "common words" in typewriter font sprinkled ...
5
votes
3answers
882 views

Prevent hyphenation in \texttt words

Background The text contains programming variable names such as report_city and SUBREPORT_FILE. All such variables are marked up with \texttt. Problem Some variable names are hyphenated: ...