Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 943007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:21:59+00:00 2026-05-15T22:21:59+00:00

While writing in LaTeX, I happened to type something like $ variable = test

  • 0

While writing in LaTeX, I happened to type something like “$ variable = test” as a text. However, LaTeX said something like: Missing $ ..

I tried putting \ before the $ and other math symbols, but it still messed up the shape of the text.

My question is: how can I instruct LaTeX that this whole paragraph or sentence, is pure text, and no math in it?

Also, away from this, when I try adding the symbol ” | ” it shows it as double underscore ” __ “. How to solve this?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:22:00+00:00Added an answer on May 15, 2026 at 10:22 pm

    You can use \textdollar{} to insert a text dollar. (Though \$ ought to work too; and I’m not sure why it doesn’t for you.) And you can specify that something should be reproduced verbatim, and typeset in a tt font, by using \verb and the same character to surround it, e.g. \verb+|+ or \verb=$=.

    The real issue here seems to be that you’re typesetting some code in LaTeX: for this, use package listings, or one of the other packages for code listings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While writing a small paint-like application (for myself), I originally had the following code
I used LaTeX for writing couple of white papers while I was in grad
I am writing an article in LaTeX and I would like to display some
While writing an encryption method in JavaScript, I came to wondering what character encoding
While writing some C code, I decided to compile it to assembly and read
While writing code in a file that would comprise of PHP, HTML, CSS &
While writing code, it is pretty common to request a page with an appended
While writing a card shuffling algorithm I realized that there are 52! ~= 2^225
While writing a .jsp file, can i include all the html5 tags in it
While writing a login system for a web project Im working on I came

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.