{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
0answers
73 views

Broken display of 11pt typewriter text in Acrobat Reader [duplicate]

I set some all-caps words in my document as typewriter. Using scrartcl as documentclass, with a default fontsize of 11pt, yields a PDF that looks rather bad in Acrobat Reader. Here is an example: ...
2
votes
2answers
1k views

\ttfamily is too bold for me

I use the following settings for my listings: \lstset{ %basicstyle=\ttfamily\tiny, % small basicstyle=\ttfamily\scriptsize, % middle } But the font in the listings is too bold for me. I tried a ...
3
votes
1answer
571 views

Using same font for \texttt and \Verb

I would like to configure my document to use exactly the same font for \texttt and \Verb. I got as far as this, which still misses making \ttdefault smaller: \documentclass{article} ...
8
votes
1answer
519 views

Libertine monospaced font seems to big

I'd like to write a document with the Libertine font (using the libertine package). I have a couple of code snippets in the text, and to me it seems like the Libertine Mono font that is used by the ...
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} ...
0
votes
1answer
794 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> ...
7
votes
1answer
152 views

characters “>>” in LaTeX

I'm writing about programming language Haskell and I need to describe operators named >>= and >>. I wrap all references to names from the programming language in \texttt{ ... }, for ...
3
votes
2answers
351 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
210 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?
16
votes
3answers
2k views

How can I create a full-size circumflex in typewriter font?

I have some C source code and would like to show the circumflex or caret (^) in the way it is typically shown in source code -- as a full-size character. The source code will be appearing in ...
31
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. ...
5
votes
2answers
581 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!} ...
2
votes
1answer
677 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 ...
5
votes
3answers
2k 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
2answers
328 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
346 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
198 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 ...
2
votes
1answer
473 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
240 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
199 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, ...
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. ...
2
votes
1answer
268 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 ...
16
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. ...
3
votes
1answer
123 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
420 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 ...
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 ...
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
469 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: ...
2
votes
1answer
586 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 ...
9
votes
1answer
337 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
267 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
926 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
824 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
993 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
319 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 \$ \% ...
7
votes
1answer
2k views

Suggestions for typewriter font to match Concrete and Euler

I'm having fun using a combination of Concrete and Euler in some of my documents. I wonder if anyone has a suggestion about a matching typewriter font? I've been trying Inconsolata (scaled to .97) ...
9
votes
1answer
506 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{...} ...
4
votes
1answer
686 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
361 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} ...
15
votes
2answers
5k 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 ...
6
votes
1answer
331 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
190 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 ...
22
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, ...
14
votes
6answers
7k views

Alternative monospace fonts

My document uses the txfonts package, which provides Times Roman, Helvetica and what appears to be a facsimile of Courier. However, I dislike the monospace font and find it to be particularly ugly. I ...
4
votes
1answer
465 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
269 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 ...
7
votes
1answer
647 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
478 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 ...
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
491 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 ...