Graphics, Figures & TablesTrouble with subfig package

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
NakaharaOsuke
Posts: 4
Joined: Sun Jun 06, 2010 6:51 am

Trouble with subfig package

Post by NakaharaOsuke »

Hi everyone,

I am having trouble with subfig package and was wondering if anybody could help me. As soon as I add

\usepackage{subfig}

in the preamble, suddenly my tex document stopped compiling and give an error saying

I found no \bibdata command--- ....
I found no \bibstyle command--- ....
Couldn't find input index file ....

I already checked that my Miktex2.8 has subfig package installed. If you know any solution to this problem, please please let me know.

Thank you,
Aki

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Trouble with subfig package

Post by localghost »

At first, always provide a full, but minimal example [1]. The operative word is minimal. Otherwise it's nearly impossible to give specific help. So I can only guess that you are using TeXnicCenter (TXC) as your editor. The errors come from TXC which tries to run BibTeX on the auxiliary file (*.aux) of your document. And the like applies to MakeIndex with »*.idx« file. At the end these warnings can be neglected. Hence this is not related to the subfig package. Since this package is not maintained anymore and can cause problems with hyperref, consider to use either the »subcaption« package (shipped with caption) or the floatrow package.

[1] View topic: Avoidable mistakes


Best regards and welcome to the board
Thorsten
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Trouble with subfig package

Post by CrazyHorse »

NakaharaOsuke wrote: I am having trouble with subfig package and was wondering if anybody could help me. As soon as I add

\usepackage{subfig}

in the preamble, suddenly my tex document stopped compiling and give an error saying

I found no \bibdata command--- ....
I found no \bibstyle command--- ....
Couldn't find input index file ....

I already checked that my Miktex2.8 has subfig package installed. If you know any solution to this problem, please please let me know.
This is not a problem, because it is your TeXnicCenter which
runs by default bibtex and makeindex with your TeX document.
Simply ignore these messages or disable the commands in the
TeXnicCenter configuration. Your pdf output will always be
created, the compilation is _not_ stopped.

Herbert
NakaharaOsuke
Posts: 4
Joined: Sun Jun 06, 2010 6:51 am

Re: Trouble with subfig package

Post by NakaharaOsuke »

Sorry for not providing enough information. Hope this is a minimal working example.

Yes, I am using TXC. I found out that the short code below already cause the problem:

\documentclass[letterpaper, 12pt]{article}
\usepackage{floatrow}
\pagestyle{plain}
\begin{document}
Test
\end{document}

The above code does not produce a pdf file. But if I comment out "\usepackage{floatrow}," then the code at least produce a one-page pdf file. I tried replacing "floatrow" with "caption" or "subfig" and they all give the same kind of problem. And I have checked that all of these packages are installed in my Miktex2.8. Other packages I tried worked just fine. Except for the fact that TXC stops compiling, the error massage seems identical whether I include the line "\usepackage{floatrow}" or not.

Thank you in advance for your help,
Aki
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Trouble with subfig package

Post by CrazyHorse »

NakaharaOsuke wrote:Yes, I am using TXC. I found out that the short code below already cause the problem:
Aki
Look into the logfile or post it here. It has the extension ".log"
and shows what's going wrong. You can also scroll back in the
TeXnicCenter output window.

Herbert
NakaharaOsuke
Posts: 4
Joined: Sun Jun 06, 2010 6:51 am

Re: Trouble with subfig package

Post by NakaharaOsuke »

Hi,

Here is what was written inside the log file after trying to compile the code I previously posted. Does anybody see a problem?

Thank you again for your help,
Aki

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2010.2.8) 6 JUN 2010 12:23
entering extended mode
**C:/Users/Akihiko*Nishimura/Documents/Academic*Year*2009-10/Honors*Thesis*Mate
rials/Project/LaTeX1.tex

("C:/Users/Akihiko Nishimura/Documents/Academic Year 2009-10/Honors Thesis Mate
rials/Project/LaTeX1.tex"
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
("C:\Program Files\MiKTeX 2.8\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.8\tex\latex\base\size12.clo"
File: size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Trouble with subfig package

Post by CrazyHorse »

NakaharaOsuke wrote: Here is what was written inside the log file after trying to compile the code I previously posted. Does anybody see a problem?

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2010.2.8) 6 JUN 2010 12:23
entering extended mode
...
that is okay and shows no problem. You can test to run
pdflatex by hand. Open a command window from the Windows menu,
go with cd .. into your document directory and then run

pdflatex <your file name>

Herbert
NakaharaOsuke
Posts: 4
Joined: Sun Jun 06, 2010 6:51 am

Re: Trouble with subfig package

Post by NakaharaOsuke »

Thank you very much Herbert, the problem has been solved.

Apparently, some files were missing from my Miktex and when I compiled the tex file from a command window those files were automatically downloaded and installed.
Post Reply