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

3
votes
1answer
177 views

Typewriter Apostrophe

Is there a method to create a typewriter apostrophe \texttt{'} with only basic Latex or amssymb? The closest thing I've found requires the textcomp package.
5
votes
1answer
240 views

Using 12 Pitch Monospaced Font in Latex

I am trying to create a Latex document and the specification for the same asks for a 12 pitch font. After reading a bit about "pitch" I understand that I should be using a monospaced font like Courier....
43
votes
5answers
27k 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 ...
2
votes
1answer
29 views

Problems adjusting typewriter fonts [duplicate]

I was doing my report, and I face to some problem with typewriter font; it was not adjusted to the text width. I don't find any related answer or topic. Here's my MWE: \documentclass[12pt,a4paper]{...
1
vote
1answer
54 views

Trouble installing Letter Gothic font

I am unable to install the Letter Gothic font. I downloaded the lettergothic.zip file from the ctan website. The readme file instructed me to copy some files to certain places, which I did. However, ...
2
votes
1answer
59 views

Why does a dash ('-') in \texttt{} cause the last character not to be rendered?

I have modified the \texttt{} command based on this answer to give the rendered text a highlight: \let\OldTexttt\texttt \renewcommand{\texttt}[1]{\OldTexttt{\hl{#1}}} I am not experienced in TeX, ...
8
votes
1answer
342 views

what is the differences between “\verb” and “\tt”

I am wondering the diffference between \verb and \tt. For example \verb|difference| appears the same with \tt{difference}
70
votes
7answers
205k 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: \texttt{Samp\_Dist\...
4
votes
0answers
37 views

newtxtext typewriter text OK on screen but does not print (sometimes)

MWE: \documentclass{article} \usepackage{newtxtext} \begin{document} Hello world \texttt{Hello world} \end{document} Compiled with just-updated TeX Live 2015 on OS X El Capitan 10.11.3. newtx is ...
2
votes
1answer
101 views

Cyrillic monospaced fonts problem in beamer

Note: Please scroll down and see the UPD 2, which clarifies the problem. I need to use \texttt (or even \verbatim) in my presentation. Unfortunately, it looks like it doesn’t work with beamer at all. ...
4
votes
1answer
59 views

How can I change my abstract font to text terminal (texttt) including the section title “Abstract”

I have a document with an abstract. \begin{abstract} \texttt{ blaa blaa } \end{abstract} The abstract text appears as texttt as expected. How can I make the heading, i.e., the ...
1
vote
0answers
39 views

Problem writing the absolute value of a series using LaTeX [closed]

I tried, but I was not able to write the absolute value of a series, using LaTeX. I have the same problem for any k partial sum. Is there anyone who can explain to me how to do it?
2
votes
0answers
68 views

Using typewriter font and turning off hyphenation in ConTeXt

I want to set the font for my entire document as a courier / typewriter font, so that it resembles a typewritten manuscript. This includes turning off hyphenation for the entire document. So far, I ...
3
votes
1answer
91 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 ...
1
vote
1answer
54 views

Can't apply monospaced font to listings (when using pdflatex)

I'm a newbie to LaTeX and I can't find the cause of a problem described below. I need to insert several C++ code snippets into my document, so I use the listings package for this purpose. The ...
9
votes
3answers
4k 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 ...
1
vote
2answers
82 views

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

MWE: \documentclass{scrartcl} \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} \RequirePackage[a4paper,includeheadfoot,inner=2.4cm,outer=2cm,top=1.78cm,bottom=1.5cm,twoside,headheight=1....
1
vote
1answer
106 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 (...
45
votes
2answers
6k 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 ...
2
votes
2answers
58 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} \usepackage{...
1
vote
2answers
86 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
264 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
44 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
255 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
53 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?
6
votes
3answers
3k 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]{% {...
6
votes
1answer
1k views

Typewriter quotation marks in texttt

I'd like to do the text "conservative" with the quotation marks into a \texttt. However, when I do so, the first quotation mark is removed. I'm using the LNCS documentclass, I'm not sure if this ...
2
votes
1answer
82 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, text\...
2
votes
1answer
57 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
101 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
54 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
40 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 ...
5
votes
2answers
375 views

long Hungarian umlaut in typewriter

An exercise from 'The TeXbook' asks to write "Pál Erdős" in typewriter type. The difficulty comes that \H cannot be used, as the typewriter font contains other symbols (namely a }) The proposed ...
1
vote
2answers
97 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 \...
5
votes
3answers
3k 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 ...
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 \...
24
votes
2answers
9k 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 ...
2
votes
1answer
44 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} \usepackage{classicthesis,...
8
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 "-//...
2
votes
1answer
118 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 ...
3
votes
1answer
46 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
133 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
127 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 ...
15
votes
2answers
1k 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 top-...
1
vote
1answer
105 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
75 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 ...
87
votes
4answers
117k 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
259 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
135 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: \documentclass{...
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 ...