Graphics, Figures & Tableshyperref and float package problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

hyperref and float package problem

Post by alicehs »

I am using both the "float" usepackage and the "hyperref" usepackage, and the two seem to disagree...

Using the following MWE:

Code: Select all

\documentclass[10pt]{article}
\usepackage{float}
\usepackage{hyperref}			

% new float style
\floatstyle{ruled}
\newfloat{fileex}{htbp}{lop}											
\floatname{fileex}{File}

\begin{document}

\begin{fileex}[htp]
	\begin{footnotesize}
			hello
	\end{footnotesize}
	\caption{this is a test file}
	\label{fig:test}
\end{fileex}

This is an example of a hyper ref \ref{fig:test}.

\end{document}
I receive the following warning (using This is pdfTeX, Version 3.1415926-1.40.8-beta-20080627 (MiKTeX 2.7)):

Code: Select all

Package hyperref Info: bookmark level for unknown fileex defaults to 0 on input
 line 16.
This is not a problem for me, however, when a colleague of mine compiles (using pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6)), he recieves the following error which stops the compilation:

Code: Select all

! Missing number, treated as zero.
<to be read again> 
                   \relax 
l.6 \end{fileex}
Can anyone tell me why this is? And possibly a solution?

I have looked at similar poblems in various forums, and there is mention of the order in wih you use the packages, or including the usepackages "algorithm" and/or "agorithmic". None of which work...

Any suggestions would be greatfully accepted...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: hyperref and float package problem

Post by josephwright »

No problems here. \listfiles says:

*File List*
article.cls 2005/09/16 v1.4f Standard LaTeX document class
size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
float.sty 2001/11/08 v1.3d Float enhancements (AL)
hyperref.sty 2009/04/04 v6.78q Hypertext links for LaTeX
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
ifpdf.sty 2009/04/10 v2.0 Provides the ifpdf switch (HO)
ifvtex.sty 2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
ifxetex.sty 2009/01/23 v0.5 Provides ifxetex conditional
hycolor.sty 2008/09/08 v1.4 Code for color options of hyperref/bookmark (HO
)
xcolor-patch.sty 2008/09/08 xcolor patch
pd1enc.def 2009/04/04 v6.78q Hyperref: PDFDocEncoding definition (HO)
etexcmds.sty 2007/12/12 v1.2 Prefix for e-TeX command names (HO)
infwarerr.sty 2007/09/09 v1.2 Providing info/warning/message (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2009/04/10 v3.1 Keyval support for LaTeX options (HO)
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
bitset.sty 2007/09/28 v1.0 Data type bit set (HO)
intcalc.sty 2007/09/27 v1.1 Expandable integer calculations (HO)
bigintcalc.sty 2007/11/11 v1.1 Expandable big integer calculations (HO)
pdftexcmds.sty 2009/04/10 v0.4 LuaTeX support for pdfTeX utility functions (
HO)
ifluatex.sty 2009/04/10 v1.1 Provides the ifluatex switch (HO)
kvsetkeys.sty 2007/09/29 v1.3 Key value parser with default handler support
(HO)
atbegshi.sty 2008/07/31 v1.9 At begin shipout hook (HO)
hpdftex.def 2009/04/04 v6.78q Hyperref driver for pdfTeX
nameref.sty 2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty 2008/08/11 v3.1 Data extraction from references (HO)
untitled-2.out
untitled-2.out
***********
Joseph Wright
Post Reply