GeneralRegarding \cref

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
mecatuls
Posts: 17
Joined: Thu Jun 26, 2008 9:41 am

Regarding \cref

Post by mecatuls »

Hi,
I am using cleveref package for labeling and referencing in my document.

I have labeled an Appendix as say, \label(text) and when I am referring it using \cref{text}

I am not getting the reference as 'Appendix A' but my compiled document shows "?? A"

I am using this in my preamble
----
\crefname{chapter}{Chapter}{Chapters}
\crefname{section}{Section}{Sections}
\crefname{subsection}{Section}{Sections}
\crefname{subsubsection}{Section}{Sections}
\crefname{figure}{Figure}{Figures} % changes default behavior to Figure. 1
\crefname{table}{Table}{Tables}
%\crefname{equation}{Equation}{Equations}
\crefname{subfigure}{Figure}{Figures}
\crefname{subsubfigure}{Figure}{Figures}
%\crefname{appendix}{appendix}{Appendices}

\crefformat{equation}{Eq.~(#2#1#3)} %<--- will give Eq. (2.1)
\crefformat{appendices}{Appendix~(#2#1#3)}
-------
I have tried different options in settings for using cref for Appendix there.

Can anyone help?

Thanks and Regards,
Atul

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Regarding \cref

Post by gmedina »

Hi,

as you can see the following code behaves as expected:

Code: Select all

\documentclass{article}
\usepackage{cleveref}

\begin{document}

\section{Dummy section}
As we can see in \Cref{sec:testapp}
\appendix
\section{Dummy Appendix}\label{sec:testapp}

\end{document} 
So we need to see some of your actual code, in the sense of a minimal working example, to detect the problem.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
mecatuls
Posts: 17
Joined: Thu Jun 26, 2008 9:41 am

Re: Regarding \cref

Post by mecatuls »

Thanks, it is working now. I was using include and includeonly commands to include individual chapters. Once I compiled all of the chapters. This problem of recognizing Appendix using \cref command was solved.

But I have run into another problem. In the middle of my thesis, the page number restarts from 1. Can anyone help me with this. I am not able to figure out the reason for it.

I get an error corresponding to the page from where number restarts.

Error message reads like

pdfTex warning (ext4): destination with the same identifier (name(page.2)) has been already used, duplicate ignored <to be read again>

Thanks
Post Reply