GeneralGetting the Dollar Sign in the Output

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lubica
Posts: 1
Joined: Tue Sep 01, 2009 3:18 pm

Getting the Dollar Sign in the Output

Post by lubica »

Hello,

I know the us dollar sign "$" is used to characterize number in latex but how to write a dollar sign itself not to characterize numbers but the currency itself?
For example: The cost of material is $150...

I appreciate your response. Thanks.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Getting the Dollar Sign in the Output

Post by localghost »

Such basics can be found in introductions like lshort. This document is also listed in a special topic for beginners [1]. Since this character (among others) is reserved to LaTeX, you need a special input to get the desired result.

Code: Select all

\$ 150
[1] LaTeX Resources for Beginners


Best regards and welcome to the board
Thorsten
BHorn
Posts: 1
Joined: Wed Jan 08, 2014 8:56 am

Getting the Dollar Sign in the Output

Post by BHorn »

The following ten characters have special meanings in (La)TeX:

& % $ # _ { } ~ ^ \

Outside \verb, the first seven of them can be typeset by prepending a backslash; for the other three, you can use the macros \textasciitilde, \textasciicircum and \textbackslash.

Code: Select all

\documentclass{article}

\begin{document}

\& \% \$ \# \_ \{ \}

\textasciitilde

\textasciicircum

\textbackslash

\end{document}
Last edited by cgnieder on Wed Jan 08, 2014 9:39 am, edited 1 time in total.
Post Reply