2
  1. Following the author guideline, I downloaded Wiley NJD v5 template zip file from the official site.
  2. Then, as I following the author-guideline.pdf inside the zip file to compile the tex file, it failed.
  3. Tried Xelatex, pdflatex, latexmk, lualatex... ALL FAILED.
  4. Upload the zip folder onto overleaf. Builded it. Failed.

Anything wrong with my operations?

My environment: windows 11, texlive 2023.

7
  • 1
    what does failed mean, show the error message from the log file Commented Nov 22, 2023 at 11:28
  • Could it possible that the template offfered on the official site is not compilable? Sorry, I'm not proffesional on latex. I tried my best and yet I could not make it.
    – Kasoll
    Commented Nov 22, 2023 at 11:32
  • 3
    The template is a complete mess Commented Nov 22, 2023 at 11:35
  • 2
    well the first step would be to remove the local listings.sty they are distributing. The next to complain to them why their class is missing so many \fi (starting from line 4740. Commented Nov 22, 2023 at 11:36
  • 3
    the only way to avoid that other struggle with this too is to correct the package at the source. So complain. Commented Nov 22, 2023 at 11:41

4 Answers 4

5

The template includes private copies of standard packages and standard fonts which makes very little sense, and if you use it with texlive 2023 it stops with

) (./listings.sty
(/usr/local/texlive/2023/texmf-dist/tex/latex/listings/lstmisc.sty

***
*** This file requires `listings.sty' version 1.9.
*** You have a serious problem, so I'm exiting ...
***

If you delete the version of listings.sty in the template, the supplied wileyNJDv5_AMA.tex does run without error with both pdflatex and lualatex but with several warnings and ending with

(\end occurred when \iftrue on line 4824 was incomplete)
(\end occurred when \if on line 4812 was incomplete)
(\end occurred when \if on line 4800 was incomplete)
(\end occurred when \if on line 4788 was incomplete)
(\end occurred when \if on line 4776 was incomplete)
(\end occurred when \if on line 4764 was incomplete)
(\end occurred when \if on line 4752 was incomplete)
(\end occurred when \if on line 4740 was incomplete)
(\end occurred when \if on line 2 was incomplete)

However as a commercially supported class, it's not reasonable to debug it, I would just use it as is if they are requiring that, but complain to the publisher and ask that they provide an example document that runs without warning.

1
  • Thanks very much! I checked listings.sty if it is installed on my computer and wondered why is this warning poped. Just deleted it and successed compiling. You are my hero!
    – Kasoll
    Commented Nov 22, 2023 at 11:56
4

I have also been plagued by this and have found the answer. It's an embarrassment to see the poor support Wiley gives for this NJD-v5 template.

The issue with Overleaf/LaTeX editors is the version of TeX Live 2023. If you roll back to 2022, the template compiles successfully with listings.sty.

It is probably not wise to delete that file.

If you use Overleaf (why don't you), click 'Menu' in the top left and then change the 'TeX Live' version to 2022, the template compiles without error.

I can't speak to other LaTeX editors but hopefully a change in TeX live versions is easy to do.

enter image description here

1
  • 2
    The issue is not the LaTeX version, but the poorly created template. Though from a user's point of view the easiest fix is indeed to use an outdated LaTeX version to make this thing run.
    – Skillmon
    Commented Jul 3 at 22:25
0

I changed the file name of 'listings.sty' to 'listings__.sty' and then it starts to compile in TeXstudio 4.8.1 (git 4.8.1)

-1

In my case, it helped to set the version to 1.9 in the listings.sty file:

\def\filedate{2020/03/24} \def\fileversion{1.9}%previously 1.8d

This enables TeXlive 2023, which also allows you to submit it to arXiv.

1
  • 2
    You should NOT do that, rename the file instead and it will be ignored. You have no idea if there are changes in newer versions of listings.sty that the other listings support files are relying on.
    – daleif
    Commented Apr 17 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .