Generalcleveref | Cite multiple Sections in Appendix

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
abalenkm
Posts: 3
Joined: Sat Mar 19, 2011 2:20 pm

cleveref | Cite multiple Sections in Appendix

Post by abalenkm »

Dear all,

I have a problem using the cleveref package in combination with the built-in \appendix command. I receive the following error: "Missing number, treated as zero..." as soon as I activate the \appendix command. If no appendix is used, the document compiles well. Please see the minimal working example below. Thank you for your time.

Code: Select all

\documentclass{report}
\usepackage[capitalise]{cleveref}

\begin{document}

\appendix

\chapter{World}
\label{C:World}

\cref{C:World} gives an overview of the world continents.
\cref{S:Eurasia,S:Africa} describe the continents of Eurasia and Africa.


\section{Eurasia}
\label{S:Eurasia}

Eurasia is a continent or supercontinent covering about 52,990,000 km$^2$
(20,846,000 mi$^2$) or about 10.6\% of the Earth's surface (36.2\% of the land
area) located primarily in the eastern and northern hemispheres.


\section{Africa}
\label{S:Africa}

Africa is the world's second largest and second most populous continent, after
Asia. At about 30.2 million km$^2$ (11.7 million sq mi) including adjacent
islands, it covers 6\% of the Earth's total surface area and 20.4\% of the total
land area.

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

cleveref | Cite multiple Sections in Appendix

Post by localghost »

No problem here. Perhaps a matter of an outdated package. Add the \listfiles command as very first line to your sample code and search the log file for the list of used files. Mine is the following.

Code: Select all

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
cleveref.sty    2010/06/24 v0.17.1 Intelligent cross-referencing
 ***********
And by the way, for typesetting physical quantities you can use the excellent siunitx package.

Code: Select all

\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{siunitx}

\sisetup{%
  load-configurations=abbreviations,
  group-separator={,},
  output-decimal-marker={.},
}
\DeclareSIUnit{\mile}{mi}

\begin{document}
  \SI{52990000}{\km\squared} (\SI{20846000}{\mile\squared})
\end{document}
P.S.: Nice minimal example.


Thorsten
Post Reply