Graphics, Figures & TablesGraphics problems depending on MiKTeX version

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
hmjamil
Posts: 8
Joined: Sat Mar 28, 2009 2:32 am

Graphics problems depending on MiKTeX version

Post by hmjamil »

Hi,
I am using the following figure environment.

\begin{figure}[h]
\centering
\includegraphics[height=2in, width=.45\textwidth, bb=0 0 1201 755]{Method.jpg}
\caption{$\beta$-Signature and similarity generation for the query and the localized data graph.}
\label{fig:M1}
\end{figure}

The packages I am using are as follows:

\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{amsmath,amssymb}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{subfigure}
\usepackage{mathptmx}
\usepackage{verbatim}

This document compiles in MikTex 2.7 just fine. But when I compile it with MikTex 2.8, it shrinks the fingure to a tiny one and I am forced to do all sorts of things to bring it to the size, but still my doc looks ugly. Any idea why this is happening?

Thanks,
- Hasan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Graphics problems depending on MiKTeX version

Post by localghost »

How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
hmjamil
Posts: 8
Joined: Sat Mar 28, 2009 2:32 am

Re: Graphics problems depending on MiKTeX version

Post by hmjamil »

Hi,

For now, I have installed MikTex 2.7 in all my machines and its workin just fine. I think MikTex admin needs to have a look at the following two issues.

1. MikTex 2.7 download links are not working at miktex.org. Links for 2.6 and 2.8 are working just fine.
2. I believe the graphics env in 2.8 has a bug somewhere. I am attaching the picture and the style file I used with this message. Please have a look. Create the doc with the two versions of MikTex (2.7 and 2.8), and you will see. Please use the packages and the figure environment I used (in my original post), and you will see.

Thanks,
- Hasan
Attachments
vldb.cls
style file
(46.83 KiB) Downloaded 158 times
picture
picture
Method.jpg (126.24 KiB) Viewed 3684 times
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Graphics problems depending on MiKTeX version

Post by localghost »

Most of the packages you are using are not relevant for the problem. And before you claim that MiKTeX might have a bug, you should exclude all possibilities by building a minimal working example (MWE) that reproduces the misbehaviour. It is more likely that your class file is erroneous. Moreover you are still using obsolete packages which might cause trouble [1].

Note that images in JPEG format don't have a bounding box. So this parameter for the \includegraphics command can't work. Try instead to scale the graphics.

Code: Select all

\includegraphics[scale=0.75]{Method}
[1] View topic: Obsolete packages and document classes - Avoid usage!


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
hmjamil
Posts: 8
Joined: Sat Mar 28, 2009 2:32 am

Re: Graphics problems depending on MiKTeX version

Post by hmjamil »

Thorsten,
Granted I did not supply a MWE. So, here is one (hopefully).

\documentclass{vldb}
\begin{document}
\section{The Language of Biology -- ConLog}

The language ConLog essentially supports the description of basic and composite concepts, and their derivation rules. ConLog is derived from ORLog \cite{x}, a derivative of F-Logic \cite{x}. But unlike ORLog, ConLog supports schema description, schema compliance and schema queries somewhat similar to F-Logic, but in a restricted way. Since a full description of ConLog is beyond the scope of this paper, we will mostly use illustrative examples to discuss the salient features of our language.

\begin{figure}[h]
\centering
% \includegraphics[height=2in, width=.45\textwidth, bb=0 0 1201 755]{Method.jpg}
\includegraphics[scale=0.75]{Method}
\caption{Localized data graph.}
\label{fig:M1}
\end{figure}
\end{document}

The uncommented \includegraphics do not compile in 2.7. The commented \includegraphics compiles only if bounding box is included. Since I no longer have 2.8 installed, I could not check if it would compile in 2.8. I can try and let you know if you want me to. Please let me know.

By the way I am not suggesting that there is a bug. I am merely saying that my text compiles in 2.7, but not "properly" in 2.8. Unless 2.8 disallows and thus compiles unexpectedly for wrong environments or descriptions, it should compile the way 2.7 does because I can assume that 2.8 is upward compatible.

Thanks,
- Hasan
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Graphics problems depending on MiKTeX version

Post by localghost »

Your code works as expected on my MiKTeX 2.8 system. But the figure appears to small due to your size specifications. And as I already said earlier, the specification of a bounding box for a JPG image file makes no sense. It seems better to scale the image in dependence of the line width as shown below.

Code: Select all

\begin{figure}[!ht]
  \centering
  \includegraphics[width=0.9\linewidth]{Method}
  \caption{Localized data graph.}\label{fig:M1}
\end{figure}
If this code doesn't work for you, insert the \listfiles command as very first line to your example, start a run and submit the complete log file by attaching it to your next post.

There are some concerns about the class file.
  • The class file has the wrong name. It should be named »sig-alternate.cls«. Furthermore it does not identify itself correctly.
  • The class file uses the obsolete epsfig package for graphics inclusion. This should either be left out or replaced by the graphicx package. It might cause problems when compiling with pdflatex.
I recommend to contact the maintainer of the class and ask for corrections.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
hmjamil
Posts: 8
Joined: Sat Mar 28, 2009 2:32 am

Re: Graphics problems depending on MiKTeX version

Post by hmjamil »

Hi,

I will try 2.8 in a week when my students return from a conference. I have removed 2.8 from all the machines I have access to. 2.7 works for me just fine. As for the class file, I do not maintain it, someone at VLDB endowment does. I will write to them, but I think it will not make any difference until they face any problem creating documents using their versions of Latex/MikTex.

Thanks for your time, I really appreciate it. I will get back with you in about a week.

- Hasan
Post Reply