Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\verb or \texttt? tt line break?

2,231 views
Skip to first unread message

rsl...@unix.tamu.edu

unread,
May 2, 1998, 3:00:00 AM5/2/98
to

Hi!

If I want to typeset a word in a typewriter family font, I sometime use
\verb or \texttt. Which one should I use? Is one better than the other? (I am
just asking about non-TeX text for which \verb does not necessarily need to be
used.)

Also, is there any support for line breaks when using the typewriter
family fonts? Now I am rewording my sentences when words spill into the
margin. This is not a very elequent solution. Any suggestions?

Thanks,
Ron

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

Donald Arseneau

unread,
May 3, 1998, 3:00:00 AM5/3/98
to

In article <6igbt2$ld0$1...@nnrp1.dejanews.com>, rsl...@unix.tamu.edu writes...

> If I want to typeset a word in a typewriter family font, I sometime use
>\verb or \texttt. Which one should I use? Is one better than the other? (I am

If it contains no LaTeX control characters, use \texttt.

> Also, is there any support for line breaks when using the typewriter
>family fonts?

Yes, but hyphenation is turned off.

>Now I am rewording my sentences when words spill into the
>margin. This is not a very elequent solution. Any suggestions?

The "teletype" spaced have fixed width so the line can't adjust to
line up at the margin. The lack of hyphenation makes it worse.

Use \raggedright

Or, if you have strings of tt text in a regular paragraph with
flush margins, allow the space to stretch, allow hyphenation.

\newcommand\kw[1]{% keywords
\texttt{\spaceskip .5em plus .3em minus .3em
\hyphenchar\font=`\-\relax #1}}

(Note other postings on a similar thread)

Donald Arseneau as...@triumf.ca

0 new messages