So I have been writing report, and had to put two - in row. It typesets as one instead of two -. I remember as I read Stefan Kottwitz's Latex for beginners guide, he have mentioned about --, but hadn't said how to actually typeset two - in row. (I may be wrong but anyways)
So, code
\subsection{Тестування}
\paragraph{Пункт \code{а}}
Відкриємо термінал та попросимо програму вивести справку користувача.
\begin{figure}[H]
\begin{minipage}{.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{images/t1.1}
\end{figure}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{images/t1.2}
\end{figure}
\end{minipage}
\caption{Справка користувача, опція \code{--help (-h)}}
\label{fig:help}
\end{figure}
Відштовхуючись від \cref{fig:help}, перевіримо решту опцій.
\begin{figure}[H]
\begin{minipage}{.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{images/t3.1}
\end{figure}
\end{minipage}
\begin{minipage}{.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{images/t3.2}
\end{figure}
\end{minipage}
\caption{Опція \code{--file (-f)}}
\label{fig:file}
\end{figure}
produces
How to typeset -- as two minuses?

----fileinstead of--fileit works. Bruh. – Vladyslav Rehan Apr 02 '23 at 20:17\codeis defined. If this is a macro that is verbatim, it should output two hyphens:\verb{--file (-f)}. But it seems that it is not, so you could try-{}-or-\/-. The problem is that--is taken as a ligature for an en-dash and---is taken as ligature for an em-dash. Therefore, if you write----, you won't get two hyphens but one em-dash and one hyphen, which might not be exactly what you want. – Jasper Habicht Apr 02 '23 at 20:21\begin{figure}[H]inside aminipage? And theminipageis also useless. – egreg Apr 02 '23 at 20:25\newcommand{\code}[1]{\ttfamily{#1}}– Vladyslav Rehan Apr 03 '23 at 07:53\includegraphicsfor each figure with width.5\linewidthwill make them side-by-side. – Teddy van Jerry Apr 03 '23 at 09:59\newcommand{\code}{\lstinline}with packagelistings, so--will be displayed as is. – Teddy van Jerry Apr 03 '23 at 12:21