Pepijn B.
Pepijn B.

Reputation: 31

TexLive and MikTex produce different references using cref

Problem description

I use Texlive 2024 in a docker-image to build my PDF in a github action. On my laptop I use TexStudio with MikTex to build my PDF. TexLive and MikTex produce different outputs for the references when using \cref{}. I want to figure out why and how I can solve the issue.

I can reproduce the TexLive issue on my laptop, using the docker: FROM texlive/texlive:latest

In both cases I'm using lualatex for building the PDF. I get the same results with pdflatex or xelatex.

Used versions:

What I already tried

My question

I can use some hints of how to figure out what is going on. Does anyone have an idea?

MWE

\documentclass{report}

\usepackage{longtable}
\RequirePackage{cleveref}

\begin{document}
    \chapter{Table referencing problem}\label{ch:this_chapter}
    When using cleverref, we get this reference to the table: \textbf{\cref{tab:recipe}}. 

    When using a good-old ref: \textbf{table~\ref{tab:recipe}}. 

    This should show "\textbf{table 1.1}" both times.    
    
    \let\tableHeader\outer\renewcommand{\tableHeader}{\textbf{amount} & \textbf{ingeredient} & \textbf{step}\\}
    \let\numcols\outer\renewcommand{\numcols}{3}
    \begin{center}
        \begin{longtable}{c c c}
            \caption{Cherries} \label{tab:recipe}\\
            \tableHeader
            \endfirsthead
    
            \multicolumn{\numcols}{c}{{\textbf{\tablename\ \thetable{}:} \textit{\ldots continued from previous page}}} \\
            \tableHeader
            \endhead
        
            \multicolumn{\numcols}{r}{{\textit{\ldots continued on next page}}}
            \endfoot
        
            \endlastfoot
    
            150g & Ice cream & put into bowl \\
            50g  & cherries & heat up and add to bowl
            \end{longtable}
    \end{center}
\end{document}

TexLive output

TexLive output

MikTex output

MikTex output

Upvotes: 1

Views: 98

Answers (0)

Related Questions