Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Hi I want to write an inline equation with some texts like

Amplitude = 0.3 * Max_Amp_Of_Signal

How can I do it with LaTeX?

share|improve this question

migrated from stackoverflow.com Apr 17 '12 at 14:44

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 8 down vote accepted

Enclose your formula in single $, as follows:

Text text text $ \some \math \commands $ more text text text.

Note that if you use double $$ instead, the formula will appear in it's own line, and the text will continue below.

share|improve this answer
    
Cant I include text inside math like $ \math some text $ –  user570593 Apr 16 '12 at 22:50
1  
Oh, yes, you can just put text in the equation. Use \text{YOUR TEXT HERE} so that it looks properly and spaces are reproduced. You might have to include \usepackage{amsmath} in your preamble in order to use this command. –  thundersteele Apr 16 '12 at 22:56
    
Interesting, didn't know it is deprecated. I always use the align environment from the amsmath package btw. –  thundersteele Apr 17 '12 at 1:20
add comment

It depends also on how you want your "variables" to appear; if you want them in the normal text font, then

$\textrm{Amplitude} = 0.3 \cdot \textrm{Max\_Amp\_Of\_Signal}$

is sufficient. Notice the \_ to get the underscore, because _ has a special meaning in LaTeX.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.