# LaTeX error message

I have a hard-to-understand LaTeX error on the R Win-builder test website.

My R package stationery has examples of LaTeX (Sweave or knit) and R markdown documents. The documents all build fine on my systems, but there is one markdown file that fails to compile to PDF on the test server for Windows.

The workflow goes like this. Rmarkdown.Rmd is converted to a markdown file. Which pandoc converts to tex. Then the pdf compiler tries to turn to PDF. On the remote test server, I don't have direct access to all of the processing steps, I just get a check.log file.

This is an entirely new problem, with same files I was fine in past.

Here is the error that need to understand:

-- re-building 'Rmarkdown.Rmd' using rmarkdown
! Undefined control sequence.
\lst@HRefStepCounter ...\begingroup \c@lstlisting
l.197 \begin{lstlisting}

Error: processing vignette 'Rmarkdown.Rmd' failed with diagnostics:
Failed to compile Rmarkdown.tex. See Rmarkdown.log for more info.
--- failed re-building 'Rmarkdown.Rmd'

--- re-building 'code_chunks.Rmd' using rmarkdown
--- finished re-building 'code_chunks.Rmd'

--- re-building 'stationery.Rnw' using Sweave
--- finished re-building 'stationery.Rnw'

SUMMARY: processing the following file failed:
'Rmarkdown.Rmd'

Error: Vignette re-building failed.
Execution halted


Because the build happens on the Windows build server, I don't actually have access to Rmarkdown.log for more details and I'm quite baffled about what is wrong now that was not wrong before.

I don't know which file is being referred to by "l.197", that's not my document Rmarkdown.Rmd for sure.

In the listings.sty file, I do find a stanza with the same words (line 1653 in listings.sty version 1.6, 2015/06/04:

\def\lst@HRefStepCounter#1{%
\begingroup
\c@lstlisting\lst@neglisting