SDStyLeZ
SDStyLeZ

Reputation: 61

Adding Arrows inside itemize in latex

I want to add a long left right arrow inside itemize. At the moment I use:

\begin{itemize}
\item DNS <-> check\_dns
\item DHCP <-> check\_dhcp
\end{itemize}

But I want something like ↔ instead of <->.

Unfurtunatly I can't use "\longleftrightarrow" cause i get "\item invalid in math mode" if I try.

any ideas?

Upvotes: 3

Views: 9967

Answers (1)

Christof Vermeersch
Christof Vermeersch

Reputation: 495

The answer to your question is quite simple. The command "\longleftrightarrow" only works in math mode. The solution is thus to use inline math mode by using \( \longleftrightarrow \) or $ \longleftrightarrow $.

Your code then changes to:

\begin{itemize}
    \item DNS **\(\longleftrightarrow\)** check\_dns
    \item DHCP **\(\longleftrightarrow\)** check\_dhcp
\end{itemize}

Note: if you are a new latex user and you want more information about the concept math mode, then this link could be interesting: wikibooks about latex

Upvotes: 3

Related Questions