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.
\begin{equation}
\label{eq:policy}
\(\text{[DIP:10.1.0.17] $\rightarrow$ F $\rightarrow$ L}\)
\end{equation}

Gives me many errors like ! Missing $ inserted and Bad math environment delimiter. How do I remove these errors?

share|improve this question

closed as too localized by tohecz, Thorsten, lockstep, mafp, diabonas May 10 '13 at 8:48

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Remove the \( and \) from equation environment -- it's already math-mode. If it were me, though, I would go through and see what actually needs to be in math-mode - the code is a bit wonky as it stands. –  Sean Allred May 10 '13 at 4:41
2  
It seems like you're lacking some basic fundamentals of math mode in LaTeX. Perhaps consider reading the Not So Short Introduction to LaTeX. Also, you might consider it useful to view Which manuals are on your “TeX Reference” shelf? –  Werner May 10 '13 at 4:56

3 Answers 3

up vote 6 down vote accepted

You've got your math-modes mixed up.

Consider:

\begin{equation}
                                 % In math mode now!
  \(                             % in math mode... again?
    \text{                       % text exits math mode temporarily
      [DIP:10.1.0.17]
      $                          % wait, back in math mode?
      \rightarrow$               % and out again
      F
      $                          % back in math mode
      \rightarrow$               % and out again
      L}                         % back in (out of \text)
  \)                             % and out
\end{equation}                   % and out again??

(Spaces added for clarity.)

You main problem was math-mode-inception. You can't enter math mode twice (nor exit it twice).

Consider using the following instead:

\begin{equation}
  \label{eq:policy}
  \text{[DIP:10.1.0.17]} \rightarrow \text{F} \rightarrow \text{L}
\end{equation}

output

To add an underscore, use it as a control sequence:

\begin{equation}
  \label{eq:policy}
  \text{[DIP:10.1.0.17]} \rightarrow \text{F} \rightarrow \text{L\_}
\end{equation}

underscore

(By the way, this control-sequence technique is used for most special characters ($%#_{}&) - see Escape character in LaTeX. If you have experience in programming C-like languages, think of it as an 'escape'.)

share|improve this answer
    
You can borrow my output image from my answer if you don't mind. –  Who is crazy first May 10 '13 at 4:56
    
@Bugbusters Thanks! –  Sean Allred May 10 '13 at 4:58

Version 1:

enter image description here

\documentclass[preview,border=12pt]{standalone}
\usepackage{amsmath}
\begin{document}

\(\text{[DIP:10.1.0.17] $\rightarrow$ F $\rightarrow$ L\_}\)

\end{document}

Version 2:

enter image description here

\documentclass[preview,border=12pt]{standalone}
\usepackage{amsmath}
\begin{document}

\begin{equation}
\text{[DIP:10.1.0.17] $\rightarrow$ F $\rightarrow$ L\_}
\label{eq:something}
\end{equation}

\end{document}

Note that you need to change the document class to meet your requirement.

share|improve this answer
    
Good answer, but this doesn't really explain what went wrong -- it would be helpful for learning's sake, at least. –  Sean Allred May 10 '13 at 4:43
\begin{equation}
\label{eq:policy}
\text{[DIP:10.1.0.17] $\rightarrow$ F $\rightarrow$ L}
\end{equation}

or

\begin{equation}
\text{[DIP:10.1.0.17]} \rightarrow F \rightarrow L
\end{equation}

Your main error was that you tried to enter math mode inside of an equation environment, where you were already in math mode. For the first display above I just removed your \( and \); for the second one, I also made the \text apply to only the business in between the square brackets. That way, the F and the L appear as math symbols.

share|improve this answer

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