{typewriter} is the term used for a "monospaced" font, that is, a font in which all characters have the same width.
3
votes
3answers
837 views
looking for monospaced condensed font
I am looking for condensed mono spaced (typewriter) fonts to typeset program listings with pdflatex. The fonts should have the common shapes (up and italic or slanted) and series (normal and bold). ...
9
votes
1answer
164 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}
...
24
votes
1answer
1k 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 ...
4
votes
1answer
423 views
How do I change the default typewriter font with XeTeX?
In this question, it is detailed how to convert a project to use TrueType or OpenType fonts by switching from LaTeX to XeLaTeX. I've successfully changed my build over to use XeTeX, but I'd like to ...
2
votes
1answer
878 views
Adding a highlight to \texttt blocks
I'm trying the add a grey highlight to the \texttt command to essentially achieve the same effect as the code blocks on here.
This is something I attempted to do when I first started writing my ...
5
votes
3answers
242 views
Replace cmtt10 \char32 (visible cup space) with something more gentle?
I'm typesetting source code, and I want to replace cmtt10's \char32 with something easier on the eyes. I came up with something that I like, but I'm not pleased with the implementation. Here's how ...
9
votes
1answer
999 views
Difference between {\tt \{} and \verb+{+
Why is {\tt \{} typeset as an ordinary { and not the same as for instance \verb+{+?
To illustrate:
{\tt With tt:~ \{}
\verb+With verb: {+
yields
3
votes
1answer
154 views
Installed Luximono is not working
I am using MacTex-2011 on a mac 10.7. Recently, I have installed luximono using getnonfreefonts. Everything went ok, but when I was compiling the document (pdfLaTeX) with the packages:
...
15
votes
2answers
373 views
How to center a typewriter (ttfamily) '+'
I would like to draw a circular TikZ node with + in its center, but font=\ttfamily moves it up. Why? How to solve it?
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\begin{document}
...
10
votes
3answers
393 views
How can I ensure all teletype/monospaced text is in a certain color?
I'm trying to include some monospaced text, and I'd like it to be in a different color than the normal text. There will be several (read: hundreds) of instances of monospaced text, and I want it all ...
1
vote
1answer
182 views
table with monospaced and nonbreaking spaces
I have a xtable generated in R/Sweave that I would like displayed in portrait mode in a pdf. The spaces in the spacedSeq should properly align the sequences.
How can I force this to be in a monospace ...
7
votes
2answers
740 views
Scaling fonts document-wide
I'm looking to use lcmtt mentioned here as my default typewriter font, but the scaling is way out of proportion with the rest of the text. I've used the following commands to enable the font:
...
13
votes
4answers
4k views
Using \ttfamily with \bfseries (or how to enable bold in fixed-width font)
I'm using listings package, and I've added basicstyle=\ttfamily\footnotesize. However, when I do that, the keywords from the embedded source-code are not bold anymore.
I figured that \ttfamily ...
9
votes
2answers
5k views
Shrinking monospace style for listings package
I am working on a thesis and putting together a "pretty" listing. I'm looking at setting up a small font style for a code view. What I have here is:
\usepackage{listings}
\lstset{language=C,
...
3
votes
1answer
732 views
Put a leading space to a paragraph using texttt
This line
~~Some~~thing
produces two leading spaces before the word 'Some' and the spaces before 'thing'.
However,
\texttt{~~Some~~thing}
does not produces the first two spaces (but produces ...
3
votes
1answer
1k views
Using \verbatiminput on filenames with underscores
I'm trying to include some source files using \verbatiminput{}. Some of these filenames have underscores in them. This works fine by default. But if I try to include the underscore package so that I ...
3
votes
3answers
6k views
How to change the font of a LaTeX table to typewriter font?
I want to create a table in LaTeX, and this table needs to be in typewriter font.
I have found Typesetting Tables with LaTeX, but I don't understand how to use it.
How could I do this?
9
votes
4answers
1k views
Minion Pro and Monospace Font
This is more a typography question than a TeX one, but can anyone recommend me a good monospaced font that blends well with Minion Pro?
5
votes
2answers
425 views
How to use condensed typewriter with latin modern and doc
I'm documenting a class with (ltx)doc. The macro names are quite long so I get a lot of overfull hboxes.
AFAIK latin modern has an additional typewriter font which is condensed. How do I switch the ...
5
votes
2answers
1k views
How do I change the \mathtt font with mathspec?
I have a document where the main font is Gotham Narrow Book but the numbers are set in Gotham Narrow Light, and this is set with commands provided by the mathspec package. I'd like to typeset a table ...
5
votes
1answer
983 views
Suggestions for typewriter font to match Concrete and Euler
I'm having fun using a combination of Concrete and Euler in some of my documents. I wonder if anyone has a suggestion about a matching typewriter font? I've been trying Inconsolata (scaled to .97) ...
4
votes
2answers
2k views
Which sans serif and monospace fonts suit Century Schoolbook?
I find the Century Schoolbook family very legible for online documentation. However, I am unsure what sans serif (for typesetting, e.g., LaTeX package names) and monospace (for typesetting code) ...
4
votes
1answer
967 views
Correctly typesetting words surrounded by double underscores?
Forgive me if the answer to this is obvious, I've just begun working with LaTex and I've had no luck with Google.
I'm working on learning LaTeX, and as part of my practice I'm rewriting a guide on ...
5
votes
3answers
334 views
Display “.\integrate blah” in monospaced font (like \texttt and \verb)
I'm trying to display the following:
.\integrate blah
in a monospaced font.
For everything else I've wanted to put in a monospace font, \texttt or \verb has worked fine, but it doesn't with this. ...
6
votes
2answers
2k views
Bold Typewriter Type fonts
I found out that there are cmbtt10 and cmttb10 fonts available. Unfortunately they are not used until I activate them with the \font macro, so just searching for those fonts is not possible.
The ...
5
votes
1answer
637 views
Using \texttt with polyglossia Hebrew.
Here is a minimal example, which shows that \texttt fails in the said circumstances. I tried reading fontspec documentation, but was overwhelmed by the quantity of the material, and the fix I tried ...
12
votes
2answers
3k views
\texttt overfull hbox problem
I asked a question earlier about \verb and overfull hbox :
In-line \verb -- overfull hbox problem
And regarding the solution there, changed many of my \verbs to \texttt{}s. I have come up with a new ...
3
votes
3answers
736 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:
...
7
votes
1answer
895 views
Double quotes with monospaced font and LuaLaTeX
I am trying to set the following minimal document:
\documentclass[a4paper,11pt]{article}
\usepackage{fontspec}
\setmonofont{Inconsolata}
\begin{document}
\begin{verbatim}
<!DOCTYPE HTML PUBLIC ...
16
votes
3answers
2k views
How can I create a full-size circumflex in typewriter font?
I have some C source code and would like to show the circumflex or caret (^) in the way it is typically shown in source code -- as a full-size character. The source code will be appearing in ...
36
votes
2answers
14k views
When should one use \verb and when \texttt
Sometimes people here use \verb!A SHORT COMMAND! and sometimes \textt{A SHORT COMMAND}.
I'm unsure when to use which.
Are there any guidelines or arguments for \verbatim vs. \texttt?
9
votes
6answers
5k views
Alternative monospace fonts
My document uses the txfonts package, which provides Times Roman, Helvetica and what appears to be a facsimile of Courier.
However, I dislike the monospace font and find it to be particularly ugly. I ...
10
votes
2answers
597 views
unicode \begin{verbatim} with cmtt?
A lot of leading-edge programming languages (like Coq and Agda) allow nearly unrestricted use of unicode symbols in program text, so you can have math characters like $\otimes$ (Unicode U+2A02) as ...
9
votes
3answers
1k views
A monospace or typewriter font with matching math support
This might sound odd but I really like the old typewriter books from the pre-TeX era (the type of books that inspired Knuth to make TeX!). I don't know the exact reason, maybe its because I am very ...
5
votes
3answers
2k views
parameter passing to \verb|| environment
I happen to write the following code over and over again.
{\color{blue}\verb|>|} {\footnotesize\verb|HI|}
So, I came up with the following code to make it a command.
\newcommand{\result}[2]{%
...
21
votes
3answers
7k views
How to get long \texttt sections to break
I often format path names with \texttt which can be very long. Usually Tex will not break this text. The line will just create a hbox overflow. It looks like this:
................
...C:\documents ...
