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

6
votes
2answers
329 views

C++ operators ^=, <<=, >>= misinterpreted

I write a list of C/C++ operators of the following form : \texttt{operator+=}, \texttt{operator-=}, \texttt{operator*=}... The problem is that \texttt{operator\^=}, \texttt{operator>>=}, ...
7
votes
1answer
362 views

Typewriter text in sections with ACM “sig-alternate” document class

I would like to put a \texttt{} block in a section, e.g. \section{Algorithm \texttt{FSG}} But the problem of this approach is that the text inside the\texttt{} block does not inherit the size and ...
2
votes
1answer
202 views

issues after verbatim section

I'm havin an issue which I cannot solve. If I have a subsubsection containing text with a verbatim section in between, the first line after the verbatim section is not aligned properly. If I put a ...
6
votes
4answers
443 views

How do I change the standard “math font”?

What I can tell, the font you get, it looks like the standard, "bookish" font, only tilted. How can I get a monospace font with a straight spine, e.g., the font you get with texttt? I'm happy with ...
2
votes
1answer
504 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 ...
3
votes
1answer
244 views

ttfamily usage (newline failing)

I'm unable to insert a new line while using \ttfamily. Is there any reason why \ttfamily prevents to do that? My problem (here's the code): Let's consider an e-commerce web application whose address ...
1
vote
1answer
203 views

Hyphenate typewriter / avoid overfull \hboxes in code, using fontspec and XeTeX

I would like to avoid overfull \hboxes as a result of inline code, inserted with \textt{foo} or \ttfamily, e.g. in this MWE: % compile with xelatex \documentclass{article} \usepackage[textwidth=4cm, ...
2
votes
1answer
278 views

Comma inside \texttt{} does’nt show up

I am trying to print a comma inside a \texttt{} tag, but it is not printing: \documentclass{article} \begin{document} \texttt{foo, bar} \end{document} produces: foo bar not foo, bar How ...
5
votes
2answers
594 views

Weird spacing with DejaVu Sans Mono with MiKTeX's XeLaTeX

\documentclass{article} \usepackage{fontspec} \setmainfont{DejaVu Serif} \setsansfont{DejaVu Sans} \setmonofont{DejaVu Sans Mono} \begin{document} Hello World! \textsf{Hello World!} ...
7
votes
1answer
2k views

not able to write bold characters using textbf

I'm working on latex and R (swaeave) and I am using utf8 encoding but when I use \textbf{dataset}, the text is not bold. Below is part of my code. But I am not sure what is reason behind it. ...
3
votes
1answer
124 views

Consecutive commas with ae package

How do I output two (or more) consecutive commas inside \texttt{} ? ,, displays a black square, \,\, displays nothing, \verb{,,} display three consecutive commas (what the heck!), \verb{\,\,} ...
0
votes
0answers
455 views

How to get my teletype (\tt) text to wrap to the next line, rather than run off the edge of the PDF? [duplicate]

Possible Duplicate: \texttt overfull hbox problem How to automatically hyphenate within \texttt? Much of the LaTeX documents I write deal with computer-sciencey stuff that I like to put ...
7
votes
1answer
1k views

Change font size of \texttt globally?

I'm using TeX Gyre Pagella as the main font of a document which is typeset using a font size of 10pt. For the technical terms, I want to replace the default Computer Modern Typewriter with Bera Mono ...
0
votes
1answer
489 views

\texttt converts apostrophe to Unicode quotation mark [duplicate]

Possible Duplicate: How to make a real apostrophe or single-quote in LaTeX I'm building a Python Regex cheat sheet using Latex, which has the following line: ...
9
votes
1answer
355 views

How to deal with it/sl/bold in lmtt?

I just stumbled upon the fact that the font lmtt (latin modern typewriter) seems to exist in italic slanted bold bold slanted but not bold italic At least the file t1lmtt.fd contains the ...
5
votes
1answer
276 views

Scaling cmtt to match times

I want to use Times Roman (times) as the default font and Computer Modern Typewriter (cmtt) for monospaced text. However, Computer Modern is a little too large. How do I scale it down document-wide? ...
15
votes
2answers
946 views

Which typewriter font fits to Linux Libertine and supports bold letters?

I'm thinking about using the Linux Libertine font (\usepackage{libertine}) in my next TeX documents. For listings with syntax highlighting I will need a typewriter font that supports boldface. I ...
17
votes
2answers
836 views

Entire document typed in monospace font

I want to put an entire document into monospace font for various reasons. This is nominally fairly easy; you can say \renewcommand{\familydefault}{\ttdefault}. However, there at least two problems ...
5
votes
3answers
1k views

monospaced fonts not respecting spaces?

Why does true type fonts consolidate spaces and is there any way to stop this? I need easily add white space between words equal to the width of a space(which for monospace should be the same for all ...
12
votes
1answer
326 views

Escaped characters in typewriter font

I know a number of ways to fix this (e.g. \usepackage[T1]{fontenc}), but I want to understand what's happening in the following example. \documentclass{article} \begin{document} \noindent \$ \% ...
2
votes
1answer
609 views

Cyrillic monospaced font

I need to use Cyrillic (russian) monospaced font. I chose courier and added \usepackage[T1]{fontenc} and {\fontfamily{pcr}\selectfont blabla } and that "blabla" is displayed like usual text ...
4
votes
1answer
709 views

How to change math font to monospace, only inside \texttt

Related with "Can I change all math output to use monospaced text?", is it possible to use the monospace math only inside \texttt (or other custom command)? I tried to include the \everymath inside a ...
18
votes
1answer
363 views

Improving typewriter animation

How can I improve the code for this animation so that I can write more words? I wanted a smarter code. \documentclass{article} \usepackage{tikz} \usepackage[active,tightpage]{preview} ...
17
votes
2answers
16k views

How to make a real apostrophe or single-quote in LaTeX

I am trying to incorporate programming examples in a LaTeX document. The document renders nicely with pdflatex; however, the single quotes get transformed into U+2019, a right-single-quotation mark. ...
9
votes
1answer
531 views

Can I change all math output to use monospaced text?

Is there any way of modifying the preamble, so instead of typing $\mathtt{x}$ ... \begin{eqnarray} \mathtt{y} & \mathtt{=} & \mathtt{z^\pi} \end{eqnarray} I can omit the \mathtt{...} ...
6
votes
1answer
334 views

Garamond and URL links

I am experimenting the use of the Garamond Premier Pro font for a dissertation and I still would like to keep the URL information in the bibliography when available. Obviously, there's a font problem ...
7
votes
1answer
192 views

How can I force pairs of brackets [][] to be closer to each other in \texttt?

\documentclass{article} \begin{document} Normal margin here. Normal margin here. Normal margin here. Normal margin here. Normal margin here. Normal margin here. Normal margin here. Abcdefgh ...
23
votes
5answers
4k views

Why are URLs typeset with monospace fonts by default?

When typesetting URLs in LaTeX using the url package, they are set in a mono space font by default. While I just accepted that as a fact for a long time, I am now starting to wonder why? In Browsers, ...
3
votes
2answers
3k views

Lyx is ignoring typewriter font setting for program listings

I'm using Lyx's Insert|Program Listing to insert a code listing into my document. Unfortunately, Lyx seems to ignore the Typewriter font selection I made in DocumentOptions under Fonts ⇒ ...
4
votes
1answer
478 views

How to escape xml code?

How to escape this kind of expression and make in typewritter font? I added $ dollars to both ends, it did work - warnings dissapear. But text became italic of unknown font and it doesn't jump on ...
8
votes
2answers
272 views

Problem with >> inside of \tt

I have an inline code example with a nested Java generic declaration, using the typewriter typeface. However, the closing >> is rendering as a black box. A cursory Google search suggested ...
19
votes
2answers
10k views

Good monospace font for code in LaTeX?

I'm currently working on my dissertation and am using Palatino for text with the Euler font for mathematics. As part of my work I'll be presenting quite a few code examples, and was wondering if ...
8
votes
2answers
2k views

Typesetting single quotes

How can the single quote character be typeset as the ascii character ' in a LaTeX document? For instance, consider the document: \documentclass{standalone} \usepackage[T1]{fontenc} ...
7
votes
1answer
664 views

verbatim environment does not produce monospace

I use quite a lot packages in my document and I cannot find which one's fault is that verbatim does not produce monospaces. Anyway, if I knew this, I have no idea how to solve problems when packages ...
4
votes
2answers
488 views

Define my own short-verb like macro?

I'm trying to define shorthand macros for \texttt that are a bit like the \verb ones. The end result is to do +asdf+ and this have the same effect as \texttt{asdf}. This is like the DefineShortVerb ...
24
votes
4answers
42k 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: ...
3
votes
1answer
501 views

Do mathdesign sans serif and monospaced fonts “fake” small caps?

The manual for mathdesign explains how to ensure "true" small caps are used for the main type family selected as an option, but it says nothing about whether the small caps used in other fonts are ...
5
votes
4answers
1k 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
242 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} ...
30
votes
1answer
3k 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
655 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 ...
4
votes
1answer
1k 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
379 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 ...
11
votes
1answer
3k 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
196 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
607 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
770 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
310 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 ...
8
votes
2answers
1k 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: ...
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 ...