0

The cleveref package doesn't work properly with the lj-igpl package. There are many discussions about cleveref, however, none of them solves my problem. I am using the ntheorem package as well, but switching to amsthm doesn't help.

Code:

\documentclass[twoside]{report}
\usepackage{ntheorem}    
\usepackage{hyperref}
\usepackage{cleveref}    
\usepackage{lj-igpl}  
\Title{Example}  
 \ShortAuthor{}
 \LongAuthor{}

\begin{document}
\begin{paper}
\begin{lemma}
\label{lem1}
This is a lemma.
\end{lemma}

By \Cref{lem1}, bla bla.
\end{paper}

\end{document}

The result is "By Chapter 1" instead of "By Lemma 1".

If I turn off ntheorem, then "Chapter" is replaced by "??".

Also, it doesn't help to load lj-igpl before cleveref.

Any ideas?

migrated from stackoverflow.com Jul 31 '14 at 11:13

This question came from our site for professional and enthusiast programmers.

  • 1
    Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. As lj-igpl.sty is not available from CTAN, can you add a link to where it can be downloaded? – Torbjørn T. Jul 31 '14 at 11:41
0

I managed to download lj-igpl.sty. The reason that the cross referencing is messed up is because of the passage in lj-igpl.sty reproduced below. It just messes with latex's theorem numbering mechanisms. If you can give up on lj-igpl.sty (if need be, submit to a better journal ;-)); otherwise just use \ref.

% THEOREM ENVIRONMENTS

% Prevent users from defining new numbering schemes for theorems by
% mapping 
%
%  \newtheorem{1}[2]{3}  to  \newtheorem{1}[thmcount]{3}
%  \newtheorem{1}{2}     to  \newtheorem{1}[thmcount]{3}
%  \newtheorem{1}{2}[3]  to  \newtheorem{1}[thmcount]{3}
%

\@definecounter{thmcount}\@addtoreset{thmcount}{section}
\def\thethmcount{\thesection .\arabic{thmcount}}

\let\@@othm\@othm
\def\@othm#1[#2]#3{%
   % if #1 is already defined, do nothing (but print a warning)
   \@ifundefined{#1}{%
      % if #1 is undefined, do \@othm but force counter to thmcount
      \@@othm{#1}[thmcount]{#3}
   }{\@warning{othm: `#1' already defined; skipping this definition}}}

\def\@xnthm#1#2[#3]{%
   % if already defined, just print a warning
   \@ifundefined{#1}{%
      % if #1 is undefined, do \@othm but force counter to thmcount
      \@@othm{#1}[thmcount]{#2}
   }{\@warning{xnthm: `#1' already defined; skipping this definition}}}

\def\@ynthm#1#2{%
   \@ifundefined{#1}{%
      % if #1 is undefined, do \@othm but force counter to thmcount
      \@@othm{#1}[thmcount]{#2}
   }{\@warning{ynthm: `#1' already defined; skipping this definition}}}
  • Well, following your advice I am trying another journal: The review of symbolic logic. For this one, I use rsl.cls from here: ftp.cambridge.org/pub/texarchive/journals/latex/rsl-cls and a similar problem occurs. I don't find similarities between your snippet from igpl and this cls file. Maybe here something can be done, other than switching to a third journal? – Yoni Zohar Feb 15 '17 at 18:19

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.