{typewriter} is the term used for a "monospaced" font, that is, a font in which all characters have the same width.

learn more… | top users | synonyms (2)

22
votes
4answers
11k 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 ...
17
votes
3answers
12k 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, ...
4
votes
1answer
2k 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 ...
4
votes
1answer
3k 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 ...
5
votes
3answers
11k 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?
12
votes
4answers
2k 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
594 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 ...
6
votes
2answers
2k 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 ...
7
votes
1answer
2k 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) ...
5
votes
3answers
4k 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
1k 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
474 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. ...
8
votes
2answers
4k 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
786 views

Using \texttt with polyglossia Hebrew

\texttt does not work as expected when using it with the polyglossia package, in a segment in the Hebrew language, even when the actual text to be set is Latin. I tried reading fontspec documentation, ...
15
votes
2answers
5k 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 ...
5
votes
3answers
903 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
1k 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 ...
52
votes
2answers
42k 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?
14
votes
6answers
8k 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 ...
11
votes
3answers
771 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
2k 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]{% ...
28
votes
3answers
14k 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 ...