Graphics, Figures & TablesUsing subfig package

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mail2priyashu
Posts: 5
Joined: Sat Aug 07, 2010 8:20 am

Using subfig package

Post by mail2priyashu »

Hi,

I'm trying to use the subfig package. I'm using TenixCenter 1.0. I need to distribute subfigures among multiple pages. When I include the package subfig in my tex file and use the \subfloat command I get an error. However, when I compile the test files available with the package I get the output. Here is the log file for my file.


Edit by localghost: Complete log files go as attachment onto the forum server. This keeps a post clear and legible.
Attachments
test.log
(13.67 KiB) Downloaded 302 times

Recommended reading 2024:

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

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

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Using subfig package

Post by sommerfee »

mail2priyashu wrote:When I include the package subfig in my tex file and use the \subfloat command I get an error.
And what do you not understand about this error message?

Code: Select all

! Package caption Error: For a successful cooperation we need at least version
(caption) `2003/11/30 v6.74m' of package hyperref,
(caption) but only version
(caption) `2003/01/20 v6.73l Hypertext links for LaTeX'
(caption) is available.
One can see in the log file that this very old version of the hyperref package will be loaded from the document folder:

Code: Select all

(hyperref.sty
Package: hyperref 2003/01/20 v6.73l Hypertext links for LaTeX
...
(pd1enc.def
File: pd1enc.def 2003/01/20 v6.73l Hyperref: PDFDocEncoding definition (HO)
...
(hpdftex.def
File: hpdftex.def 2003/01/20 v6.73l Hyperref driver for pdfTeX
...
(nameref.sty
Package: nameref 2001/01/27 v2.19 Cross-referencing by name of section
By deleting this outdated hyperref version TeX will be forced to use the actual version from MikTeX 2.7, so the error should go away. (And if you have further outdated LaTeX packages within your document folder, I would remove them, too.)
mail2priyashu
Posts: 5
Joined: Sat Aug 07, 2010 8:20 am

Using subfig package

Post by mail2priyashu »

Hi,

Thanks for the help. Sorry about that. I'm quite new to Latex. However, I'm still having trouble with \ifpdf. It says \ifpdf is already defined. Also, there is one more error that I don't understand. How should I go about it?


Edit by localghost: Complete log files go as attachment onto the forum server.
Attachments
test.log
(16.49 KiB) Downloaded 230 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Using subfig package

Post by localghost »

Reduce the problem to a minimal example that exactly reproduces the error(s) [1]. Log files alone are not very helpful.

[1] View topic: Avoidable mistakes


Best regards and welcome to the board
Thorsten
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Using subfig package

Post by sommerfee »

The problem is still the same - there are (still) outdated package versions within your document folder:

Code: Select all

(ifpdf.sty
Package: ifpdf 2001/06/14 v1.0 Providing \ifpdf (HO)
...
(pd1enc.def
File: pd1enc.def 2003/01/20 v6.73l Hyperref: PDFDocEncoding definition (HO)
...
(and many more!)
Just remove them all. (If you look into the log file you will see which files are loaded from the MikTeX directory and which one are loaded from your documents folder. Usually only the document files (your text and images) should be loaded from your documents folder.)

If you don't know which files belong to the document (you got for maintenance I assume) and which one not - just copy the main document file to a new, empty directory. If you can't compile it because of missing files, just copy the missing files from the old directory and try again.
mail2priyashu
Posts: 5
Joined: Sat Aug 07, 2010 8:20 am

Re: Using subfig package

Post by mail2priyashu »

Hi,

Thanks for your support. I have removed all the .sty and other latex files from the document directory. I'm using a template file boaz.sty to write my report. So, I have it in my document directory. I have written few documents using latex in the past. However, this time I need to use subfig package to let my sufigures float on multiple pages. Is there any other easier way to do so?

ifpdf.sty is still troubling stating that \ifpdf is already defined. Now it is not present in my document directory. Also, there is just one file with this name in the latex installation directory. How should I go about the version issue of this file(if any)? It is present in the oberdiek directory in my latex installation directory.When I manually remove and compile my code, package manager runs and installs it in the oberdiek directory. Error message is


("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2010/01/28 v2.1 Provides the ifpdf switch (HO)


! Package ifpdf Error: Name clash, \ifpdf is already defined.
mail2priyashu
Posts: 5
Joined: Sat Aug 07, 2010 8:20 am

Using subfig package

Post by mail2priyashu »

Here is a minimal working example.

Code: Select all

\documentclass[12pt]{article}
\usepackage[notitlepage,final,nousetoc,hylinks,titlepage,full]{boaz}

\title{\bf abc}
\author{xyz}

\begin{document}
\section{Introduction} \label{sec:intro}
\end{document}
Also »boaz.sty« file is attached.
Attachments
boaz.sty
The »boaz« package.
(11.43 KiB) Downloaded 305 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Using subfig package

Post by localghost »

Complete files can be uploaded as attachment to the forum server. Your last post is completely unclear and illegible to me. Would be good if ou elaborate a bit.
mail2priyashu
Posts: 5
Joined: Sat Aug 07, 2010 8:20 am

Re: Using subfig package

Post by mail2priyashu »

Hi localghost,

I'm sorry about the posting. I will make sure that in future I'll post as per the specified guidelines. I have figured out the problem and now it's working. Thanks for the help.
Post Reply