General ⇒ Compile error: ...requires `listings.sty' version 1.7, but I have it
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
Hi all,
I compile just fine until I try to include the listings package in my preamble. When I do I get the error below, suggesting that I am missing listings.sty version 1.7. However, I do have that file and that version. I tried uninstalling and reinstalling the listings package, but the problem persists. Any suggestions? Using MiKTeX 2.9. Thanks.
...texmf\tex\latex\listings\lstmisc.sty
File: lstmisc.sty 2018/09/02 1.7 (Carsten Heinz)
***
*** This file requires `listings.sty' version 1.7.
*** You have a serious problem, so I'm exiting ...
***
) ) )
(\end occurred inside a group at level 1)
### semi simple group (level 1) entered at line 1820 (\begingroup)
### bottom level
(\end occurred when \ifx on line 1820 was incomplete)...
I compile just fine until I try to include the listings package in my preamble. When I do I get the error below, suggesting that I am missing listings.sty version 1.7. However, I do have that file and that version. I tried uninstalling and reinstalling the listings package, but the problem persists. Any suggestions? Using MiKTeX 2.9. Thanks.
...texmf\tex\latex\listings\lstmisc.sty
File: lstmisc.sty 2018/09/02 1.7 (Carsten Heinz)
***
*** This file requires `listings.sty' version 1.7.
*** You have a serious problem, so I'm exiting ...
***
) ) )
(\end occurred inside a group at level 1)
### semi simple group (level 1) entered at line 1820 (\begingroup)
### bottom level
(\end occurred when \ifx on line 1820 was incomplete)...
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
Can you run a small document with just the listings package and show us the log file?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
Running the following does not produce the error:
\documentclass{article}
\usepackage{listings}
\begin{document}
Some input text.
\end{document}
Here is the log file. For comparison, the code that throws the error is:
\newcommand{\mydriver}{pdflatex} %Making a PDF directly using pdflatex.
\documentclass[12pt,\mydriver]{thesis}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{tabls}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{subeqn}
\usepackage{subfigure}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{listings}
\usepackage[colorlinks=true,urlcolor=black,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage{color, soul}
\usepackage{spverbatim}
% For use with Tables:
\usepackage{booktabs}
% For units
\usepackage{siunitx}
\newcommand{\tbsp}{\rule{0pt}{18pt}} %used to get a vertical distance after \hline
\renewcommand{\baselinestretch}{2}
\setlength{\textwidth}{5.9in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.50in}
\setlength{\oddsidemargin}{.55in}
\setlength{\parindent}{.4in}
\pagestyle{empty}
\begin{document}
\pagestyle{empty}
\include{Abstract} %(must be first, required, non-numbered)
\include{Titlepage} %(must follow Abstract, required, non-numbered)
\include{Copyright} %(highly recommended, non-numbered)
%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain} \pagenumbering{roman} \setcounter{page}{2}
\addcontentsline{toc}{chapter}{Acknowledgments}
\include{Acknowledgments} %(if present, lower-case Roman)
\renewcommand{\baselinestretch}{1}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
\listoftables %(if present, lower-case Roman)
\newpage
\listoffigures %(if present, lower-case Roman)
\newpage
% Nomeclature
\addcontentsline{toc}{chapter}{Nomenclature}
\include{Nomenclature-supertabular}
\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{2}
\small\normalsize
%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
%\include{Chapter5}
\titleformat{\chapter}
{\normalfont\large}{Appendix \thechapter:}{1em}{}
\include{AppendixA}
%\include{AppendixB}
%\include{AppendixC}
%\include{AppendixD}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\newpage
\bibliographystyle{unsrt}
\bibliography{MyReferences}
\end{document}
\documentclass{article}
\usepackage{listings}
\begin{document}
Some input text.
\end{document}
Here is the log file. For comparison, the code that throws the error is:
\newcommand{\mydriver}{pdflatex} %Making a PDF directly using pdflatex.
\documentclass[12pt,\mydriver]{thesis}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{tabls}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{longtable}
\usepackage{supertabular}
\usepackage{subeqn}
\usepackage{subfigure}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{listings}
\usepackage[colorlinks=true,urlcolor=black,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage{color, soul}
\usepackage{spverbatim}
% For use with Tables:
\usepackage{booktabs}
% For units
\usepackage{siunitx}
\newcommand{\tbsp}{\rule{0pt}{18pt}} %used to get a vertical distance after \hline
\renewcommand{\baselinestretch}{2}
\setlength{\textwidth}{5.9in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.50in}
\setlength{\oddsidemargin}{.55in}
\setlength{\parindent}{.4in}
\pagestyle{empty}
\begin{document}
\pagestyle{empty}
\include{Abstract} %(must be first, required, non-numbered)
\include{Titlepage} %(must follow Abstract, required, non-numbered)
\include{Copyright} %(highly recommended, non-numbered)
%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain} \pagenumbering{roman} \setcounter{page}{2}
\addcontentsline{toc}{chapter}{Acknowledgments}
\include{Acknowledgments} %(if present, lower-case Roman)
\renewcommand{\baselinestretch}{1}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
\listoftables %(if present, lower-case Roman)
\newpage
\listoffigures %(if present, lower-case Roman)
\newpage
% Nomeclature
\addcontentsline{toc}{chapter}{Nomenclature}
\include{Nomenclature-supertabular}
\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{2}
\small\normalsize
%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\include{Chapter3}
\include{Chapter4}
%\include{Chapter5}
\titleformat{\chapter}
{\normalfont\large}{Appendix \thechapter:}{1em}{}
\include{AppendixA}
%\include{AppendixB}
%\include{AppendixC}
%\include{AppendixD}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\newpage
\bibliographystyle{unsrt}
\bibliography{MyReferences}
\end{document}
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
I suspect you are using a very old thesis template that has gone obsolete years ago. It was shipped with an unneeded version of the listings package.
Can you attach the log file of the example that fails?
Can you attach the log file of the example that fails?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
Here is the log file of the example that fails to compile. Indeed, it does contain the line:
Package: listings 2002/04/01 1.0 (Carsten Heinz)
Which I'm guessing is the unneeded version you are referring to, however, I have no idea where this is coming from. Also, how could you tell the template shipped with the an older listings package?
Thanks
Package: listings 2002/04/01 1.0 (Carsten Heinz)
Which I'm guessing is the unneeded version you are referring to, however, I have no idea where this is coming from. Also, how could you tell the template shipped with the an older listings package?
Thanks
- Stefan Kottwitz
- Site Admin
- Posts: 10281
- Joined: Mon Mar 10, 2008 9:44 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
I can see in the log file that a very old thesis class is used that has not been updated since 12 years:
It looks similar to Benjamin Bengfort's template folder that contains an outdated version of the listings package.
Stefan
Is this one required (or recommended) by your university (of Maryland?) or institute? If not, you may change to a newer class and template.Document Class: thesis 2006/04/26 v0.1
It looks similar to Benjamin Bengfort's template folder that contains an outdated version of the listings package.
Stefan
LaTeX.org admin
-
- Posts: 4
- Joined: Sat Dec 29, 2018 6:40 am
Compile error: ...requires `listings.sty' version 1.7, but I have it
Thanks Stefan. Yes, the thesis template you linked to is the one I was directed to use. Now I get what's going on, and it was simply a matter of removing the old listings.sty which got copied along when I downloaded all the template files without me realizing it. I doubt using the old version is a strict requirement, but I suppose I'll find out
Thanks all for your help.

-
- Posts: 1
- Joined: Mon Aug 05, 2024 10:03 pm
Compile error: ...requires `listings.sty' version 1.7, but I have it
Thank you. Your answer helped me a lot when I had the same problem with a LaTeX template I had just downloaded from a Wiley journal's page.
-
- Posts: 1
- Joined: Sun Jan 19, 2025 6:52 am
Re: Compile error: ...requires `listings.sty' version 1.7, but I have it
Hi everyone,
I am having same issue as Ontic_Chimera with using the new template from Wiley journals (WileyNJDv5_Template), the error indicates that
*** This file requires `listings.sty' version 1.10c.
*** You have a serious problem, so I'm exiting...
Please I need help. Thank You
I am having same issue as Ontic_Chimera with using the new template from Wiley journals (WileyNJDv5_Template), the error indicates that
*** This file requires `listings.sty' version 1.10c.
*** You have a serious problem, so I'm exiting...
Please I need help. Thank You
- Stefan Kottwitz
- Site Admin
- Posts: 10281
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Compile error: ...requires `listings.sty' version 1.7, but I have it
Welcome to the forum!
I tested with that Wiley New Journal Design version 5 (NJD-v5) template on Overleaf, with a listings environment and the listings package, there was no error.
Probably the error is in your local LaTeX installation, I guess you need to update it. Perhaps post your .log file as attachment here. The "Attachments" link is below the text edit field, when writing a post.
Stefan
I tested with that Wiley New Journal Design version 5 (NJD-v5) template on Overleaf, with a listings environment and the listings package, there was no error.
Probably the error is in your local LaTeX installation, I guess you need to update it. Perhaps post your .log file as attachment here. The "Attachments" link is below the text edit field, when writing a post.
Stefan
LaTeX.org admin