# Why doesn't pstricks allow for my images to show?

I have a simple file with a simple an figure I want to display on top but it's not showing. Instead, I just get this file:

Latex Error: ./Mateus_010514.tex:17 LaTeX Error: File justa' not found.

This one figure doesn't compile, even though it should! And if I remove the packages, it does just fine.

\begin{figure}[htbp]  \centering
\includegraphics[width=0.9\textwidth]{justa}  \caption{Waveforms for
[hustatwa] and [hustatawa]}  \label{fig:justa} \end{figure}


I guess it's easier just to show you what I mean:

\documentclass[11pt]{article} %\documentclass{minimal} \usepackage{pstricks} \usepackage{tikz}

\usetikzlibrary{matrix}

\pagestyle{empty} \begin{document}

%\begin{tikzpicture} %{\usebox{\test}}; %\end{tikzpicture}

\begin{figure}[htbp]  \centering  \includegraphics[width=0.9\textwidth]{justa}  \caption{Waveforms for [hustatwa] and [hustatawa]}  \label{fig:justa} \end{figure}

\color{white} %\color{black} % activate to see bounding box \fboxsep=0pt
% this figure is 50mm by 50mm
\newsavebox{\gaussians}
\savebox{\gaussians}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\draw (-0.5,1.5) -- (-0.2,0.5);
\draw (-0.2,0.5) -- (-0.6,0);
\end{tikzpicture}
}
\newsavebox{\gaussianss}
\savebox{\gaussianss}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.3,1.5);
\draw (-0.27,1.6) node{$\sigma$};
\draw (-0.3,1.5) -- (-0.2,0.45);
\draw (-0.2,0.45) -- (-0.6,0);
\end{tikzpicture}
}
\newsavebox{\gaussiansss}
\savebox{\gaussiansss}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\draw (-0.5,1.5) -- (-0.2,0.5);
\draw (-0.2,0.5) -- (-0.65,0);
\draw (-0.2,0.5) -- (-0.4,0);
\draw (-0.2,0.5) -- (0.5,0);
\draw (-0.2,0.5) -- (1.8,0);
\draw (-0.2,0.5) -- (2.4,0);
\end{tikzpicture}
}
\newsavebox{\oneline}
\savebox{\oneline}{
\begin{tikzpicture}
\psset{unit=1mm}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\end{tikzpicture}
}
%\tikz\draw (1,1) node{$\sigma$} -- (2,2) node{B};
\begin{tikzpicture}
\draw (0,0) node {\usebox{\gaussians}};
\draw (0.7,0) node {\usebox{\gaussians}};
\draw (2.3,0) node {\usebox{\gaussians}};
\draw (3.75,0) node {\usebox{\gaussians}};
\draw (5.2,0) node {\usebox{\oneline}};
\draw (6.35,0) node {\usebox{\gaussianss}};
\draw (9.5,0) node {\usebox{\gaussiansss}};
\end{tikzpicture}

\begin{picture}(100,100)
\color{black} % for text
\put(-3,93){\Large{/mun}(a)}
\put(52,93){\Large{+}}
\put(68,93){\Large{t'(a)}}
\put(95,93){\Large{+}}
\put(110,93){\Large{k(a)}}
\put(137,93){\Large{+}}
\put(153,93){\Large{t}}
\put(165,93){\Large{+}}
\put(183,93){\Large{t(i)/}}
\put(232,93){\Large{[mun + t'+k+t+t]}}
\end{picture}
%\begin{tikzpicture}
%\psset{unit=1mm}
%\color{black} % for text
%\draw (-4.4,1.4) node{/mun};
%%\draw node{/mun(a) + t'(a) + k(a) + t + t(i)/};
%%\draw (7.6,0) node{[mun + t' + k + t + t]};
%\end{tikzpicture}

\end{document}

-
What type of file is justa? PNG? JPEG? PDF? EPS? PS? Only the last two would work with LaTeX. –  Werner May 3 '14 at 6:23
Do you have a file named justa.eps, especially in the directory where you are trying to compile your document. The error message just says,that there is no such file –  Christian Hupfer May 3 '14 at 6:23
What has your example to do with PSTricks? There is no such code? –  Herbert May 3 '14 at 6:28
"justa" is PNG -- the thing is, it compiles fine without this package, even if it isn't EPS or PS. –  Teusz May 3 '14 at 6:46
@mateuz: telling truth, I think mix TikZ and PSTricks as you did is not a good idea. For example, in first \gaussians box, you set \psset{unit=1mm} within a tikzpicture: it's hard to imagine the reason. –  Claudio Fiandrino May 3 '14 at 7:05

this one runs fine (except the image, which I replaced by tigereps|pdf) with pdflatex, xelatex, and latex->dvips->ps2pdf. If your image isn't found then it is not in your documents directory or has not the valid extension (eps for latexor pdf for pdflatex):

\documentclass[11pt]{article}
\usepackage{pstricks}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{matrix}

\pagestyle{empty}
\begin{document}

\begin{figure}[htbp]
\centering
\includegraphics[width=0.9\textwidth,height=3cm]{tiger}
\caption{Waveforms for [hustatwa] and [hustatawa]}  \label{fig:justa}
\end{figure}

\color{white} %\color{black} % activate to see bounding box \fboxsep=0pt
% this figure is 50mm by 50mm
\newsavebox{\gaussians}
\savebox{\gaussians}{
\begin{tikzpicture}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\draw (-0.5,1.5) -- (-0.2,0.5);
\draw (-0.2,0.5) -- (-0.6,0);
\end{tikzpicture}
}
\newsavebox{\gaussianss}
\savebox{\gaussianss}{
\begin{tikzpicture}
\color{black} % for text
\draw (-1,0) -- (-0.3,1.5);
\draw (-0.27,1.6) node{$\sigma$};
\draw (-0.3,1.5) -- (-0.2,0.45);
\draw (-0.2,0.45) -- (-0.6,0);
\end{tikzpicture}
}
\newsavebox{\gaussiansss}
\savebox{\gaussiansss}{
\begin{tikzpicture}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\draw (-0.5,1.5) -- (-0.2,0.5);
\draw (-0.2,0.5) -- (-0.65,0);
\draw (-0.2,0.5) -- (-0.4,0);
\draw (-0.2,0.5) -- (0.5,0);
\draw (-0.2,0.5) -- (1.8,0);
\draw (-0.2,0.5) -- (2.4,0);
\end{tikzpicture}
}
\newsavebox{\oneline}
\savebox{\oneline}{
\begin{tikzpicture}
\color{black} % for text
\draw (-1,0) -- (-0.5,1.5);
\draw (-0.47,1.6) node{$\sigma$};
\end{tikzpicture}
}
%\tikz\draw (1,1) node{$\sigma$} -- (2,2) node{B};
\begin{tikzpicture}
\draw (0,0) node {\usebox{\gaussians}};
\draw (0.7,0) node {\usebox{\gaussians}};
\draw (2.3,0) node {\usebox{\gaussians}};
\draw (3.75,0) node {\usebox{\gaussians}};
\draw (5.2,0) node {\usebox{\oneline}};
\draw (6.35,0) node {\usebox{\gaussianss}};
\draw (9.5,0) node {\usebox{\gaussiansss}};
\end{tikzpicture}

\begin{picture}(100,100)
\color{black} % for text
\put(-3,93){\Large{/mun}(a)}
\put(52,93){\Large{+}}
\put(68,93){\Large{t'(a)}}
\put(95,93){\Large{+}}
\put(110,93){\Large{k(a)}}
\put(137,93){\Large{+}}
\put(153,93){\Large{t}}
\put(165,93){\Large{+}}
\put(183,93){\Large{t(i)/}}
\put(232,93){\Large{[mun + t'+k+t+t]}}
\end{picture}

\end{document}
`

-
Now I'm getting an undefined control sequence on line 37: i.e. the first "}" on a line of its own... "Document Class: article 2007/10/19 v1.4h Standard LaTeX document class Including: justa.png Latex Error: ./Mateus_010514.tex:37 Undefined control sequence." –  Teusz May 3 '14 at 11:34