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

0
votes
1answer
862 views

Use verbatim inside \texttt

Why can't I use \begin{verbatim} inside \texttt? \texttt{ \small \begin{verbatim} iab <key> <expansion> <key> is the string which should be expanded to <expansion> ...
3
votes
2answers
366 views

Print $ inside \tt

How do I print a $ inside \tt? I tried escaping with a backslash, but didn't work. \tt{\$} throws an error. ! Argument of \OT1\^ has an extra } Update Sorry, the issue was not with $, but ...
4
votes
1answer
226 views

Why is the doi in biblatex a different font?

I am using biblatex-chicago (with \autocite) and a standard BibTeX file. For some reason, the DOI in my references is in a different font from the rest of the entry. Is this normal?
33
votes
3answers
2k 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. ...
2
votes
1answer
815 views

How to make all the entries in a table verbatim font

I have a large table in the tabular environment and I need to make all the text verbatim font. I know I can use \begin{verbatim}...\end{verbatim} for all the entries but they are just too much for me ...
6
votes
2answers
330 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
413 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
210 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
461 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
536 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
252 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
207 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
284 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
614 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
490 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 ...
8
votes
1answer
2k 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 ...
1
vote
1answer
522 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
395 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
299 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
975 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
870 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 ...
13
votes
1answer
339 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
628 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
737 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
370 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
17k 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
569 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
343 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
193 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, ...
4
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
484 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
275 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
3k 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
684 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
506 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 ...
25
votes
5answers
47k 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
507 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
243 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
659 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
2k 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
386 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 ...
12
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
198 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: ...