Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
What type of file is justa? PNG? JPEG? PDF? EPS? PS? Only the last two would work with LaTeX. –  Werner May 3 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 at 6:23
    
What has your example to do with PSTricks? There is no such code? –  Herbert May 3 at 6:28
    
"justa" is PNG -- the thing is, it compiles fine without this package, even if it isn't EPS or PS. –  mateuz May 3 at 6:46
1  
@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 at 7:05

1 Answer 1

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}

enter image description here

share|improve this answer
    
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." –  mateuz May 3 at 11:34
    
provide your complete logfile for a download. –  Herbert May 3 at 11:46
    
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2013.9.28) 3 MAY 2014 14:07 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. %&-line parsing enabled. **Mateus_010514.tex (./Mateus_010514.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size11.clo File: size11.clo 2007/10/19 –  mateuz May 3 at 12:09
    
that is only the beginning of the logfile. –  Herbert May 3 at 12:19
    
indeed. docs.google.com/document/d/… –  mateuz May 3 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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