1

How do I create a file in windows from where LaTex can extract the pdf or Jpg file I want to insert in my document? In other words I need an example of inserting either images or pdf files in my document Here's the image I want to insert

enter image description here

The Image will be placed center to the page just beneath this codes

\[
\overline \rho = \overline P + 0.645 \Big (\frac { \overline P}{K}\Big) ^{\frac {3}{4}} \tag { Tazkera}
\]
  • 1
    Well you need to learn to use LaTeX better, read more [such as this] (ctan.math.utah.edu/ctan/tex-archive/info/lshort/english/…). And if you could bring us a Minimal Working Example will be better. For insert a picture you can use the package graphicx. You can use files in jpg, png, etc., but not eps. You can use pdf instead also and always compile with pdflatex. I hope you understand this, if not please tell me and I'll explain it again better. – Aradnix Aug 9 '14 at 4:32
  • \includegraphics{filename}, where filename is the name of you file. You need \usepackage{graphicx}, see the documentation please for more options such as scaling etc. For the rest, Aradnix made some good statements on the graphicx format pdflatex already – user31729 Aug 9 '14 at 4:35
  • 2
    A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – user31729 Aug 9 '14 at 4:38
3

Well, let's try with something very basic.

\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vestibulum in lectus ut imperdiet. Vivamus porta orci in mauris ultrices, feugiat vestibulum arcu egestas. Maecenas fringilla hendrerit consequat. Aliquam eu feugiat odio. Sed rutrum blandit augue at dictum. Proin nec mi consectetur, aliquam massa vel, sagittis quam. Nulla non ipsum non elit feugiat luctus nec vel magna. Cras varius urna vitae rhoncus sagittis. Aenean vitae lobortis orci, id pulvinar purus. Vestibulum faucibus, eros vitae imperdiet congue, libero risus malesuada ipsum, et commodo massa erat ac nulla. Praesent sed facilisis tortor. 

\[
\overline{\rho} = \overline{P} + 0.645 \Big (\dfrac{\overline{P}}{K}\Big) ^{\dfrac {3}{4}} \tag{Tazkera} \label{eq:Tazk}
\]

\begin{figure}[htb]
\begin{center}
\includegraphics[width=\pagewidth]{image.jpg}
\end{center}
\caption{Caption here}
\label{fig:figure1}
\end{figure}

Belong the figure~\ref{figure1} the expression~\eqref{eq:Tazk} show us\ldots

\end{document}

Copy this code in your editor, and save it with a name and the tex extension. Try to save this file in the same directory where you place the picture for avoid troubles. Compile it using pdflatexinstead of latex. You'll need to compile it twice for see the references correctly.

I hope this help you.

  • thanks a lot for your nice explanation. But my problem is the image is not being inserted in the document. Where should in my computer I need to save the image so that LaTex can find it? I am very new to LaTex ,so my words may sound stupid, but everytime I compile they show everything but the image. – Tazkera Haque Trina Aug 9 '14 at 4:54
  • @TazkeraHaqueTrina: As in this answer by Aradnix, the image is to be expected in the same directory as the *.tex file – user31729 Aug 9 '14 at 4:57
  • I m doing it on shareLaTex, so unless I download it as pdf , does it occupy any location inn my pc? – Tazkera Haque Trina Aug 9 '14 at 5:00
  • 2
    You should start telling us you're using LaTeX since the cloud. Well in writelatex and sharelatex you're able to create projects, and you can upload files to the directory of each project. So you must upload your picture to your project and use the graphicx package to can compile properly your file. – Aradnix Aug 9 '14 at 5:19
  • @TazkeraHaqueTrina In the left side of your window there is the tree of the project and the option for upload files. Use it. – Aradnix Aug 9 '14 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.