Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5520
  • Last Modified:

insert image in latex

I have an image pipo.eps and a latex file named invoice.tex
Both are placed in the same dir on a server, and I have a webapplication that displays a nice pdf document from the tex file. Now, I want to insert pipo.eps into the file. Assume that I really know nothing about latex. Someone gave me some code but it gives errors. Someone else said there is something wrong with "usepackage". I really don't know what to do?
0
alberthendriks
Asked:
alberthendriks
  • 2
1 Solution
 
yuzhCommented:
I have not played with Latex for more than 10 years now, please have a look at my answer in
http:Q_20969955.html

Just follow the links to have a look at the sample codes.
0
 
kairenyCommented:
hi,

here is an exemple to show you how to insert image(.eps) in your file

% invoice.tex
\documentclass[pdf,umbc3,slideColor,colorBG]{prosper}
\Logo{\umbclogo}   % add an optional UMBC logo
\begin{document}

\begin{slide}{Graphics}

Use the \verb|\includegraphics| command to include
encapsulated Postscript graphics in \LaTeX\ documents,
like this:

\bigskip

\begin{center}
    \includegraphics[height=35mm]{pipo.eps}

\end{center}

\end{slide}

\end{document}




You can get this exemple here :
http://www.math.umbc.edu/~rouben/prosper/graphics.html

Hope this helps,

Regards,

Kaireny.
0
 
alberthendriksAuthor Commented:
Sorry, it seems that the problem is different. Although the embedded latex compiler I am using generates a pdf document, there seem to be errors in it. Because small normal modifications to the document cause the compiler to fail generating a pdf document, with errors. I am not a latex expert. I did not make this document, I just have to add an image to it. Could someone debug? The below document works, but if I remove the % on the 2nd line, it fails with errors. (points increased).

\documentclass[twoside]{scrartcl}
%\usepackage{graphicx}
\usepackage[frame]{xy}
\usepackage{tabularx}
\usepackage[latin1]{inputenc}
\setlength{\voffset}{0.5cm}
\setlength{\hoffset}{-2.0cm}
\setlength{\topmargin}{0cm}
\setlength{\headheight}{0.5cm}
\setlength{\headsep}{1cm}
\setlength{\topskip}{0pt}
\setlength{\oddsidemargin}{1.0cm}
\setlength{\evensidemargin}{1.0cm}
\setlength{\textwidth}{19.2cm}
\setlength{\textheight}{24.5cm}
\setlength{\footskip}{1cm}
\setlength{\parindent}{0pt}
\renewcommand{\baselinestretch}{1}
\begin{document}

\newlength{\descrwidth}\setlength{\descrwidth}{10cm}

\newsavebox{\hdr}
\sbox{\hdr}{
  \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont

  \parbox{\textwidth}{
    \parbox[b]{12cm}{
     
     
      }\hfill
    \begin{tabular}[b]{rr@{}}
    Telephone & \\
    Facsimile & 
    \end{tabular}

    \rule[1.5ex]{\textwidth}{0.5pt}
  }
}
   
\fontfamily{cmss}\fontshape{n}\selectfont

\markboth{}{\usebox{\hdr}}

\pagestyle{myheadings}
%\thispagestyle{empty}     use this with letterhead paper



  \rule{\textwidth}{2pt}
 
  \hfill
  \begin{tabularx}{7cm}{Xr@{}}
  \textbf{Subtotal} & \textbf{} \\
  \end{tabularx}

\newpage

\markright{}

\vspace*{-12pt}

\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
  \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
    \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
  & carried forward from page  \\
\end{tabular*}



\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont

\vspace*{2cm}


\vspace{3.5cm}

\textbf{F A K T U U R}
\hfill
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
  \textbf{Datum} &  \\
  \textbf{Faktuurnummer} &  \\
  \textbf{Klantnummer} & 
\end{tabular}

\vspace{1cm}

\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
  \textbf{Artikelnr} & \textbf{Omschrijving} & \textbf{Aantal} &
    \textbf{Eenheid} & \textbf{Prijs} & \textbf{Korting} & \textbf{Bedrag} \\

   &
     \\

\end{tabular*}


\parbox{\textwidth}{
\rule{\textwidth}{2pt}

\vspace{0.2cm}

\hfill
\begin{tabularx}{7cm}{Xr@{}}
  \textbf{Subtotaal} & \textbf{} \\

  \\

  \hline
  \textbf{Totaal} & \textbf{}\\
\end{tabularx}

\vspace{0.3cm}

\hfill
  Alle prijzen in \textbf{}.

\vspace{12pt}


 


}

\vfill
\centerline{\textbf{Dank voor uw gewaardeerde klandizie!}}

\end{document}

0
 
kairenyCommented:
Well, if when you uncomment the graphic package, you get an error, i would say you have a probleme with your package.
If i well remember, graphicx is a standard package, but maybe yours is corrupted or somethig likes that.
Maybe reinstalling it is a good idea.

Here is a pdf file for LateX : http://158.110.32.35/LATEX/beginlatex.pdf
Check chapter 5.1 etc for packages installation.

Hope you will find what you need,
Regards,

Kair.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now