I am attempting to use the class file qt.cls, available at the journal's website, but when I try to compile, even just using their example document in TexShop v3.61, I get the error:

enter image description here

and when I go to the spot in the class file where this occurs, it looks like this:

    \def\@tempb#1 v#2.#3\@nil{#2}%
    \ifnum\@xp\@xp\@xp\@tempb\csname ver@amsmath.sty\endcsname v0.0\@nil
  \hbox to.77778em{%
  \vbox to.675em{\hrule width.6em\vfil\hrule}%
  \begingroup \usefont{U}{msa}{m}{n}\thr@@\endgroup
  \normalfont \topsep6\p@\@plus6\p@\relax

Can anyone figure out what the problem is here? I am a newcomer to the forum, so please feel free to re-tag.

  • @barbarabeeton seems they are messing with \[, wasn't \[ made robust by default in a recent amsmath update? Line 1284, right before looking for amstex – daleif May 4 '16 at 20:56
  • well, i was mistaken -- the trap for amstex is still in the public version of amsthm, which is embedded in full in this document class, with only minor modifications of a reasonable nature. however, what is shown in your error message isn't an accurate copy of what's in QT.cls that i just downloaded. there should be a closing brace just before \@ifpackageloaded{amstex} and it's missing. that would explain the Paragraph ended error. but there's lots more missing there. i think you have a corrupted QT.cls file. – barbara beeton May 4 '16 at 20:57
  • @barbarabeeton where exactly is that brace missing? I seem to have a } right above \@ifpackageloaded{amstex}{%, ahh, no amsmath is even used. Was it the core that made \[ robust? – daleif May 4 '16 at 20:58
  • @daleif -- brace missing from line 1286 of the version of QT.cls that i just downloaded, right after the \@nil. there's another problem i spotted: amsthm checks to see if amsmath is loaded, but QT.cls doesn't load amsmath (with \RequirePackage{amsmath}) until after the embedded amsthm. but that wouldn't cause the error as reported. and i don't see \x@protect anywhere in QT.cls, so i don't know how it got into the error report in the log. – barbara beeton May 4 '16 at 21:05
  • @daleif: so is the robustness of [ causing an error because there's no closing ] on line 1286? – Jim Conant May 4 '16 at 21:11

First, this has nothing to do with TeXShop.

Second it has everything to do with the QT.cls file. There are several \RequirePackage lines around line 1339. Copy all of those lines and duplicate them just after the \ProcessOptions line at line 130. You can then remove the original lines if you wish. The example file compiles fine afterward.

That's what happens when a class file isn't updated when necessary.

Hopefully that fixes the problem in all cases.

  • Welcome back to TeX.SE! – Mico May 5 '16 at 6:45

I followed daleif's idea and commented out the line \expandafter\@tempa\[\@nil from the qt.cls class file. It seems to compile normally now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.