Linux code? I think you mean LaTeX?
The \diamond command is supposed to be in math mode. Since you left it off, when the compiler gets there, it thinks there's a problem and so switches into math mode, but doesn't know when to switch back to text mode.
Put \diamond in $..$ and it should work:
Code: Select all
\documentclass{article}
\begin{document}
$\diamond$ this is the first way
\end{document}
It looks, however, like you're trying to create a list. If so, you should use one of the environments LaTeX provides for creating lists, like itemize (for bulleted lists) and enumerate (for numbered lists). Compare:
Code: Select all
\documentclass{article}
\begin{document}
There are three ways:
\begin{itemize}
\item this is the first way
\item this is another way
\item this is the final way
\end{itemize}
\end{document}
If you want to customize the bullets used for the list (usually a black circle), you can do so with the enumitem package. E.g., to use diamonds instead:
Code: Select all
\documentclass{article}
\usepackage{enumitem}
\begin{document}
There are three ways:
\begin{itemize}[label=$\diamond$]
\item this is the first way
\item this is another way
\item this is the final way
\end{itemize}
\end{document}