Text Formatting\infty in typewriter font

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

\infty in typewriter font

Post by svend_tveskaeg »

Hi everyone!

Is it possible to get an infinity symbol in a typewriter font? (I am using the article document class.)

Thanks in advance!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

\infty in typewriter font

Post by coachbennett1981 »

Good evening. To show typewriter text we use

Code: Select all


\texttt{Anything you want to say}
To use infinity:

Code: Select all


\texttt{$\infty$}

Hope this helps.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

\infty in typewriter font

Post by svend_tveskaeg »

Thanks for the reply.

When using

Code: Select all

\texttt{$\infty$}
the resulting infinity symbol is not in typewriter font; it is in `normal' CM mathfont.

Below is a MWE of the equation where I would like the infinity symbol to be in a typewriter-like font as the rest of the equation. (I hope this makes sense.)

Code: Select all

\documentclass[12pt,danish]{article}

\usepackage{babel}
\usepackage{mathtools}

\begin{document}

\begin{align*}
  &\texttt{solve(TIStat.normCdf(-$\infty$,a,10,3)}\\
  &\hphantom{{}\texttt{solve}}
  \texttt{=TIStat.normCdf(-$\infty$,a,9.64608125,1.608703175),a)}
\end{align*}

\end{document}
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply