I am using lstlisting command in Latex. I want to use double hyphens "--help", but latex hyphens connects like in normal text (but it is source code) and I can't use "-{}-" for separation.
\begin{lstlisting}
$ oc <command> --help
\end{lstlisting}
Could you help me please? Thanks
Seeing as you're using a terminal-like code display, consider using a \ttfamily
as your basicstyle
:
\documentclass{article}
\usepackage{listings}
\lstset{basicstyle=\ttfamily}
\begin{document}
\begin{lstlisting}
$ oc <command> --help
\end{lstlisting}
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With