When I wrote my LaTeX file in windows, I have just given the name of the image without extension to add it anywhere like the following.
\begin{figure}[h]
\centering
\includegraphics[scale=0.6]{./img/varsityLogo}
\end{figure}
For the above lines in action, I put the image varsityLogo.png under the img sub-folder of the folder containing this file.
But when I went to compile it in ubuntu 16.04 LTS, it gives the following error.
! LaTeX Error: File `./img/varsityLogo' not found.
How to solve it? Should I edit all the paths of images and add corresponding extension like the code below? If yes, then is not there any way to make it platform independent?
\begin{figure}[h]
\centering
\includegraphics[scale=0.6]{./img/varsityLogo.png}
\end{figure}
But it produces a new error:
! LaTeX Error: Cannot determine size of graphic in ./img/varsityLogo.png (no Bo
undingBox).
What is the simplest way to resolve these issues while changing the platform?
Note that, my .tex file runs and produces pdf file without any error in windows.
[h](normally it gives a warning and is turned into[ht]but[htp]makes it far less likely that the image goes to the end of the document.) – David Carlisle Sep 23 '16 at 13:26latex <file_name>, I had to usepdflatex <file_name>. However, Thanks once again. :) – Enamul Hassan Sep 23 '16 at 13:32