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

1
vote
1answer
24 views

Math + DejaVu Sans Mono fonts

people! I'm having some trouble to make a thing in LaTeX. I want to use math's font in my document like I show in the next image: But I want to use DejaVu Sans Mono as my monospace default font ...
2
votes
2answers
29 views

How to activate hyphenation in \ttfamily without setting a font explicite?

I am suprised that in the code below no hyphenation is done. And I can not find something about that on the web. Maybe I use the wrong words for searching. \documentclass{scrartcl} ...
1
vote
2answers
42 views

bullet list within texttt

I wish to insert a bullet list inside \texttt{} as part of the original reproduction. Is there a way to do this? When the list is copied directly from the original text, the rendering inside \texttt{} ...
2
votes
2answers
90 views

Force latex to parse command as raw text

I'm writing a text about programming and want to include some inline small code snippets. In markdown one would simply use backticks for this test. This automatically becomes monospace font. I want a ...
0
votes
1answer
29 views

Breaking Typewriter-styled Detokenized Text

The goal is to have snake_cased elements typewriter-styled breaking properly. I am using \detokenize rather than simply \_ because otherwise the snake_casing looks wrong, namely like this: rather ...
6
votes
1answer
171 views

Proper typewriter font for math symbols (∀, ∃, →), e.g. in verbatim environment

I have a listing to be used in verbatim (acutally Verbatim) that uses unicode characters such as ∀, ∃, →, ∨. Using \DeclareUnicodeCharacter{2203}{\ensuremath\exists} they do appear in the listing, ...
1
vote
0answers
39 views

Help identifying LaTeX code-style feature

The document below uses a feature I can't quite identify to display monospaced code-style font sections: Does anyone know how to achieve this effect?
1
vote
2answers
53 views

Lines with texttt reach into the page border, how to prevent?

MWE: \documentclass{scrartcl} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} ...
2
votes
1answer
48 views

Monospace font in cases environment

I have this code: \[ text \begin{cases} text, text \rightarrow text\\ text \rightarrow text, text, text, text text \end{cases} \] ... \[ text \begin{cases} text text \rightarrow text, text text, ...
2
votes
1answer
32 views

How to add background for texttt (and allow line breaks)

I use texttt{} to write names of software, commands etc. within the text. Sometimes the texttt text is longer and there is a line break within it. It works well, no problem here. I wish to add ...
3
votes
1answer
75 views

Questions about including source code in a TeX file

I'd like to include some Sage code in a TeX file. Originally I thought the right way would be to use $\texttt{}$ whenever I had to include the source code, but then I ran into some difficulties: ...
3
votes
1answer
42 views

Too much space when mixing typewriter upright and italics

There seems to be too much horizontal whitespace following italic typewriter text. Consider this example: \documentclass{article} \begin{document} \noindent \texttt{This is a perfectly \textit{fine ...
2
votes
1answer
37 views

Typewriter Text inside multicolumn

I'm using multicols to show the content of a text file, however I need to use the \ttfamily font. As in \texttt{} but that doesn't allow line breaks. Since is a very extensive file I don't want to ...
1
vote
2answers
51 views

Remove indentation to \texttt

I'm writing my thesis using the book document class. Each paragraph is indented automatically. This is fine with me for the whole thesis except in small pieces of "code" that are enclosed between ...
0
votes
0answers
40 views

make formulas as \ttfamily [duplicate]

I am not new to \XeTeX but new with using formulas. For me it would make sense to display the formulas in monotype (\ttfamily). Does it make sense to do that? How can I do that? % math.tex ...
2
votes
1answer
38 views

Typewriter hyphenation with special characters

I read this answer, and this one about how to hyphenate \texttt text and handling special chars. However, it is not really doing what I intend. \documentclass{scrreprt} ...
2
votes
1answer
86 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
75 views

change catcode with tickets (business card print) and tables

Update, much later Don’t do this. Change the font instead. This just causes much trouble in unexpected and hard-to-debug places. See the other answer to the same question for details. changing the ...
3
votes
1answer
45 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| ...
4
votes
2answers
90 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 ...
2
votes
1answer
99 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 ...
1
vote
1answer
57 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 ...
4
votes
2answers
161 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
109 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: ...
3
votes
0answers
25 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
97 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
106 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\\ ...
1
vote
1answer
90 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 ...
2
votes
1answer
445 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 ...
14
votes
2answers
925 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 ...
0
votes
0answers
33 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?
6
votes
5answers
156 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
444 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
95 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
963 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 ...
7
votes
2answers
2k 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
3answers
1k 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
1k 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 ...
9
votes
1answer
435 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 ...
4
votes
2answers
408 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
150 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
219 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
106 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
153 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 ...
2
votes
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?
5
votes
2answers
404 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
165 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
105 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 ...
4
votes
2answers
255 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 ...
7
votes
3answers
194 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 ...