{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)

2
votes
1answer
38 views

Cannot change teletype font to beramono

I am trying to change the teletype font in my thesis document to Bera Mono. I downloaded the beramono CTAN package and unzipped it in my ~/texmf folder (where I've already installed a few dozen ...
2
votes
1answer
27 views

change catcode with tickets (business card print) and tables

changing the direction of the slash of the digit zero In this answer I learned how to change the direction of the slash through the digit 0 inside a texttt block. This works fine, except it doesn’t ...
3
votes
1answer
37 views

Aligning two collumns in a different way

I have to print a multiple sequence alignment, which means I have to use monospaced font and two collums to achieve good alignment on a text which looks like this one: gi|161129|gb|AAA29941.1| ...
2
votes
1answer
58 views

Setting math fonts with mathspec changes monotype fonts of urls in bibliography

I'm working on a document with Xelatex so I use \fontspec. I have set the monotype fonts with \setmonofont to use Inconsolata, for example, in the urls of the bibliography. This minimal example shows ...
4
votes
2answers
49 views

Adding line break without hyphen

I'm writing a lab report about gene sequencing, and I have to put a large sequence of nucleotides. I don't really intend to put it on a special box, just add it as if it were another paragraph only ...
14
votes
2answers
619 views

Slashed zero, the “right” way?

The digit 0 in our documents, such as this one (external PDF link), is slashed “the wrong way” in source code blocks (lstlisting). How can we get it slashed “the right way” (from bottom-left to ...
1
vote
1answer
64 views

Make \usepackage{polski} and \texttt work in the same document

I would like to use Polish language in a part of my Acknowledgements. In order to do it I introduced in the preamble: \usepackage{polski} \usepackage[polish, english]{babel} And later on, to ...
1
vote
1answer
43 views

change kerning of \texttt

I tried to use a font different than courier for monospaced fonts but none of this list (http://www.ctan.org/topic/font-mono) are available on my system - and as we work in a distributed system custom ...
70
votes
4answers
74k 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?
4
votes
2answers
72 views

Why \texttt and \verb giving errors when using with LaTeX commands inside their input

On latest version of MikTeX, following works: \begin{align*} \int sinxdx && \texttt{test line 1}\\ \int{sinx}dx && \texttt{test line 2}\\ \end{align*} But the following gives error: ...
6
votes
2answers
90 views

Can't get teletype \texttt to move to next line

I'm having a problem that, whenever I have a lengthy region of \texttt{} at the end of a line where it continues to trail off rather than wrapping to the next line. Here is a MWE: ...
43
votes
6answers
117k views

Underscores in words (text)

How can I produce the text Word_one_two in LaTeX? I tried: Samp\_Dist\_Corr But, it doesn't quite look right. Also, I want it in the typewriter font, so actually, I'm doing: ...
37
votes
4answers
20k 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 ...
3
votes
0answers
24 views

Typewriter text without spaces not wrapping in LyX [duplicate]

I'm using typewriter text to highlight program code within my writing, however, long method names without spaces don't seem to wrap to the next line (see Figure 1). It is possible to make typewriter ...
0
votes
1answer
75 views

Type small caps, raised text in Latex

I want to write the string "Uppaal" in Latex in this form: How can i made it ?
2
votes
1answer
84 views

Noindent for a paragraph with typewriter font set

I like to use noindent for a paragraph that has its font as typewriter -tt.The code snippet is, \noindent {\tt \noindent [cloud-user@sgmanager1 ~]\$ sudo yum list | grep kumo\\ ...
25
votes
5answers
16k 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 ...
5
votes
3answers
2k views

how can we equalize the fonts of mathtt and texttt

I'm trying to use a mono-font in my text, but it seems that mono texts differ in character map in math and text environment. Is there any solution? \documentclass[fleqn]{article} ...
4
votes
2answers
156 views

Show whitespace characters in monospace environments

I need to render an ASCII file for printing in a way that removes ambiguity if (very unlikely) one decides to type it in and validate the signatures. Essentially, I need a monospace typesetter that ...
2
votes
1answer
233 views

To escape underscore without \verb and \texttt [duplicate]

I know this thread which implementation is about verb and \texttt such that you have something inside the phrase. I do not want to change the phrase at all. I want to have this as text in my ...
0
votes
0answers
32 views

Does not break word into parts for a new paragraph [duplicate]

When I use \texttt{}, it does not break it into parts for new paragraph. Do you have any idea?
7
votes
2answers
3k views

How to escape curly braces within \texttt{}

How can I escape curly braces within the \texttt{} environment? \texttt{ \{ } produces errors within my template, which can be found here: (link) I saw this question for square braces, but the ...
6
votes
5answers
144 views

Different fonts in same math environment

I would like to display text like 0^3 1^5 ... with the exponents (3 and 5 in the example, can be any number) written in usual math, but the bases (0 and 1) in typewriter font. I tried various ...
13
votes
2answers
338 views

Typewriter apostrophe in typewriter font for apostrophe symbol

Is there a way of producing a typewriter apostrophe (U+0027) in a typewriter font when an apostrophe symbol is entered in .tex document? To give an example, I’d like \texttt{'hello'} to produce ...
3
votes
1answer
84 views

How to define a fraction of tt font variables?

I am trying to define something like $\frac\mathtt{A\_B}\mathtt{C\_D}$ to get a fraction of two typewriter-font variables (inline math preferred), but I keep getting errors such as "missing } ...
7
votes
2answers
590 views

Line break in texttt

I would like latex to break long text inside \texttt{} that does not contain any whitespaces. Currently the text just runs off the page. The latex document is generated from a reStructureText ...
3
votes
2answers
1k views

How do I get \texttt with bold face in LaTeX?

This question was asked and answered 20 years ago but I wonder if there is a more modern solution today that does not involve quite so much hackery with overriding settings in font files. I want my ...
9
votes
1answer
323 views

Introduce random imperfections to typeset' text

LaTeX does an outstanding job in typesetting things perfectly (as if that needed to be said yet one more time...). Now, I'd like to introduce certain imperfections to my text to make it look like it ...
9
votes
3answers
803 views

Using many typewriter fonts in a single document

Reading topics about monospaced fonts, I found out that changing \tt font for the document requires replacing only one line in the preambule. For example, I only change the commented line ...
6
votes
2answers
793 views

Latex doesn't break spaces in \texttt correctly (Overfull \hbox)

I'm having some text in an \texttt environment and it turns out that latex breaks the lines in these environments sometimes correctly and sometimes not. A working minimum example ...
21
votes
3answers
16k 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
2answers
282 views

How to escape curly braces in \texttt inside math mode?

In a previous question was answered how to escape curly braces within \texttt{}. On answer suggest using the fontenc package. \documentclass{article} \usepackage[T1]{fontenc} \begin{document} \(a ...
5
votes
2answers
102 views

How to hyphenate automatically within \texttt when using T1 encoding and lmodern

I was looking for a way to enable hyphenation within \texttt. I found this answer and it seemed perfect: simple and useful to many people. I chose to enable hyphenation globally in \texttt and as ...
1
vote
0answers
168 views

Sans-Serif and Monospace font matching Gentium (pdflatex) [closed]

Since I could not find a typography / font SX I figure this question might be suited best here (also I want to use the fonts for a LaTeX document). I find the Gentium font visually attractive and I ...
4
votes
2answers
89 views

Strange output when writing \texttt{“avg”} in spanish

I'm using pandoc, which parses markdown into LaTeX. In this case I configured pandoc to use babel in spanish and wrote `"avg"` which is translated by pandoc as \texttt{"avg"}. When I do this I obtain ...
1
vote
0answers
109 views

Underscore not showing up in lstlisting [closed]

I have the following code: \begin{lstlisting} path/usearch -cluster_otus inp.fasta -otu_radius_pct distInPercent -otus outGroups.fasta -fastaout outpUSEARCH.fasta \end{lstlisting} The ...
33
votes
3answers
3k views

What's a good typewriter template?

I'm searching for a template which makes a document look like it's written with a real typewriter. Ideally, this means it's not only in mono-spaced font, but the hyphenation is adjusted accordingly. ...
1
vote
6answers
1k views

Greek typewriter font

Hello I want to use a greek typewriter font. So far I can't manage to find any font of that kind. Can someone tell me where I can find one?
15
votes
4answers
3k 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
3answers
5k 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) ...
10
votes
4answers
4k views

Writing a backslash in the \texttt environment

How do you go about writing a backslash in the /texttt environment? The $\backslash$ trick makes the font inconsistent. The reason I am asking is that I am writing some introductory computer science ...
5
votes
2answers
283 views

cmtt as font in texttt

I am using libertine fonts and I would like to change the texttt command to use the cmtt font. I tried : \renewcommand{\texttt}[1]{\fontfamily{cmtt}\selectfont{#1}} but it seems to switch the font ...
1
vote
1answer
140 views

>> is changed to » using beramono [duplicate]

I have the following piece of text in Latex: \texttt{List<List<Integer>>} and it was rendering properly. Then, I decided to use beramono as my typewriter font, and I have a problem: >> is ...
3
votes
0answers
94 views

Can I turn a variable width font into a fixed-width font?

I found a free ancient-typewriter font I'd like to use in a project, but the person who made it apparently traced some scanned outlines and poured them into a variable width truetype font. That is not ...
7
votes
3answers
179 views

Handling typesetting of plural class names

I'm sorry if this is the wrong stackexchange to ask in, but it seems to be the place where people care about typography :) I'm writing lecture notes on Android development, and I like to put class ...
2
votes
2answers
1k views

Using consolas as the default teletype style font for listings package?

Is it possible to use consolas as the default teletype font to display code listings using the listings package? The default computer modern teletype font is too wide for my taste. Edit: I am using ...
3
votes
3answers
272 views

How to improve this text highlighting?

I want to highlight some letters which represent an amino acid sequence of a protein using different colors. The below code works fine, but the highlighted box is not fitting exactly the letters, as ...
2
votes
1answer
161 views

wordbreaking, justification and ttfamily

Edit I think this differes slightly from the linked "duplicate" as here are paragraphs formatted as typewriter, using \ttfamily while in the duplicate there are a lot of "common words" in ...
3
votes
1answer
214 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 ...
1
vote
1answer
168 views

How can I automatically use typewriter font for one column of a tabular?

I'm trying to create a table where everything in one column is in typewriter font. In other words, it should perform like this: \begin{tabular} {| l | p{5cm} |} \hline \multicolumn{2}{|l|}{Sample ...