0

I understand that I'll need to compile my document multiple times to update references links. However I compiled it three times and it still can't display references before the actual table occurs. Figure links somehow work, but not tables.

Example

% ...
\begin{document}
    % ...
    \begin{table}[H]
        \label{tab:studium_komplet}
        \caption{Shrnující údaje doby strávené studiem (úplné údaje)}
        \begin{tabular}{ l | c c }
            Výhradně legální software          &        Ano &         Ne\\
            \hline % ------------------------- | ----------   ------------
            Rozsah výběru                      &   \num{38} &   \num{55}\\
            Počet chybějících hodnot           &    \num{0} &    \num{0}\\
            Minimum                            & \num{0.25} &    \num{0}\\
            Dolní kvartil                      &    \num{2} &    \num{1}\\
            Medián                             &    \num{3} &    \num{2}\\
            Průměr                             & \num{3.97} & \num{3.19}\\
            Horní kvartil                      &    \num{5} &    \num{5}\\
            Maximum                            &   \num{14} &   \num{22}\\
            Směrodatná odchylka                & \num{3.31} & \num{3.35}\\
            Variační koeficient~(\%)           & \num{83.3} &  \num{105}\\
            Standardní šikmost~(\textendash)   & \num{1.36} & \num{3.41}\\
            Standardní špičatost~(\textendash) & \num{1.29} & \num{16.8}
        \end{tabular}
    \end{table}
    % ...
\end{document}

I have this table. I need to reference it before it occurs. But this is how it looks like: Tables references do not quite work as intended

How can I reference tables before they occur? Please note, I am using cleveref package.

Polda18
  • 31
  • 3
    You have 2 issues here: (1) \label has to come after \caption; (2) you need to compile at least twice on the first go since references uses the .aux file to retrieve information, and that information is not available on the first compilation. – Werner Mar 24 '20 at 17:27
  • Welcome! Try putting \label{tab:studium_komplet} after \caption{..}. – luki Mar 24 '20 at 17:27
  • Yes, that's it. Thank you a lot :) I am quite new to LaTeX. I decided to go for LaTeX because it seems much cleaner than using Office. – Polda18 Mar 24 '20 at 17:39

0 Answers0