So I'm supposed to make a command that manually applies label to a picture, using hypertarget and a counter, and then adds the one to list of figures. Note that the pictures I'm manipulating with, have to be included outside of figure environment, but rather in minipage. I've tried to manually put everything together, but it looks dull and not as the tex generates the list of contents. Here is the snippet of the code, any help is appreciated.
\documentclass[10pt,a4paper]{article}
\newcounter{x}
\listoffigures
\newcommand{\naziv}[1]
{
\centering
\vspace{2mm}
\stepcounter{x}
\hspace{15mm}
\addcontentsline{lof}{section}{\arabic{x} \hspace{4mm} #1}
\hypertarget{labela\arabic{x}}{Slika \arabic{x}.{#1}}
}
\begin{minipage}{0.33\textwidth}
\hspace{0.33\textwidth}
\includegraphics[scale=0.11]{slika1.pdf}
\naziv{Pahuljica}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\hspace{0.33\textwidth}
\includegraphics[scale=0.14]{slika2.pdf}
\naziv{Trougao}
\end{minipage}
\begin{minipage}{0.33\textwidth}
\hspace{0.33\textwidth}
\includegraphics[scale=0.2]{slika3.pdf}
\naziv{Sestougao}
\end{minipage}
I hope it's not an issue that some of the words in there are not in english, it's just the names of the variables so to say anyway.
Thanks
\textwidthchanges to the minipage width. I suspect that what you really want isvspace*{\baselineskip}. or\null\newline. – John Kormylo Apr 04 '19 at 18:08