4

I started using \cref from the cleveref package because it gives me better readability than \autoref from hyperref package. But I am having problems with \cref command not recognizing the label that has been put into the external \chapter or \section etc. environment. As I wrote my thesis long time ago, and was fiddling with the look of it in last few days, problem occurred when I try to reference outside chapters with \cref, error that it gives is cref reference format for label type ' undefined, keep in mind that pictures are being referenced correctly, being in the same chapter or external.

\documentclass[a4paper, 12pt, oneside]{report}  
\usepackage{graphicx}  
\usepackage{amsmath}  
\usepackage{amssymb}  
\usepackage{hyperref}  
\usepackage{cleveref}  

\begin{document}
%------------------------------------------------------
\include{MainMatter/Chapter1}  
\include{MainMatter/Chapter2}  
\include{MainMatter/Chapter3}  
\include{MainMatter/Chapter4}  
\include{MainMatter/Chapter5}  
\include{MainMatter/Chapter6}  
\include{MainMatter/Chapter7}  
%======================================================  
\end{document}

So next I have a chapter4.tex in one of the sections that I am referencing some other chapter or section:

For this purpose special gripper fingers have been constructed and implemented (more in `\cref{Ch:GripHandBeerBottGlass}`).

Which is called from a separate file in chapter6.tex and labeled

\chapter{Gripper for Handling Beer Bottles and Beer Glasses}\label{Ch:GripHandBeerBottGlass}  

I know that it works with hyperref package, but not with cleveref package. With \cref I just get

For this purpose special gripper fingers have been constructed and implemented (more in ??).

As mentioned by Christian to upload basic parts of the Chapters.

%This is the Chpater 4 Chapter4.tex
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\footnotesize \slshape \rightmark}
\fancyhead[R]{\thepage}
\fancyfoot{}
\chapter{Modelling of System Layout}\label{Ch:ModelSysLay}
    \thispagestyle{empty}
%============================================================================
        \subsubsection{Gripper and Gripper Fingers}\label{Sss:C4_GripnGriFing}

 \newcommand{\parl}{\setlength{\parskip}{\baselineskip}}
 For manipulating of bottles, glasses, fixtures and opening of bottles in the workcell there should be a robot gripper that can utilize gripper jaw to its full potential. As it was mentioned in the beginning, these gripper jaws should be able to pick up bottle from a crate, take a bottle for opening and in the end pouring, and manipulating fixtures if needed. For this purpose special gripper fingers have been constructed and implemented (more in \cref{Ch:GripHandBeerBottGlass}).\parl%

As it is seen, I'm trying to reference Chapter 6 in the subsubsection of the Chapter 4.

%This is the Chpater 6 Chapter6.tex
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\footnotesize \slshape \rightmark}
\fancyhead[R]{\thepage}
\fancyfoot{}

%============================================================================
\chapter{Gripper for Handling Beer Bottles and Beer Glasses}\label{Ch:GripHandBeerBottGlass}
\thispagestyle{empty}

closed as unclear what you're asking by user31729, user13907, Paul Gaborit, egreg, barbara beeton Jan 4 '16 at 0:26

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please post the relevant files -- \include{...} is most times not really helpful in tracking errors – user31729 Oct 8 '15 at 15:08
  • Should I upload preamble and any two chapters that problem is occurring, or? Thanks in advance. – Slavisa Galamic Oct 8 '15 at 15:14
  • 1
    The preamble is already in your post above -- try to reduce your document to that one that still shows the wrong feature (i.e. make a copy and throw all stuff out that does not belong to this question ;-)) – user31729 Oct 8 '15 at 15:16
  • Well, we've to glue your fragments in a working file still – user31729 Oct 8 '15 at 15:44
  • Could you please post the relevant code in one contiguous document here, instead of multiple fragments? – user31729 Oct 9 '15 at 11:06