0

I'm using TeX 3.14159265 (TeX Live 2015/Debian) on Ubuntu 16.04 LTS with frontend as Texmaker 4.4.1.

I used matlabfrag script to produce an eps file to be used with psfragfig in pdflatex. The EPS file is basically a Matlab semilog plot of two spectra. I've successfully used other plots in my documents using this technique of matlabfrag, with only difference that they are linear scale plots & not log plots

However for log plots I get a graphics processing error with this warning:

Package pstool Warning: Execution failed during process: latex -shell-escape -output-format=dvi -output-directory="./" -interaction=ba tchmode "f068a10019aalldatap5_spec-pstool.tex"

The companion tex file to .eps reads as:

% Generated using matlabfrag
% Version: v0.7.0devb04
% Version Date: 30-May-2013
% Author: Zebb Prime
%
\providecommand\matlabfragNegTickNoWidth{\makebox[0pt][r]{\ensuremath{-}}}%
%
%% <text>
%
\providecommand\matlabtextA{\color[rgb]{0.150,0.150,0.150}\fontsize{8}{8}\selectfont\strut}%
\psfrag{014}[tc][tc]{\matlabtextA Frequency, f(Hz)}%
\psfrag{015}[bc][bc]{\matlabtextA S(f) (m^2)}%
%
%% </text>
%
%% <xtick>
%
\psfrag{000}[ct][ct]{\matlabtextA $0$}%
\psfrag{001}[ct][ct]{\matlabtextA $0.5$}%
\psfrag{002}[ct][ct]{\matlabtextA $1$}%
\psfrag{003}[ct][ct]{\matlabtextA $1.5$}%
\psfrag{004}[ct][ct]{\matlabtextA $2$}%
\psfrag{005}[ct][ct]{\matlabtextA $2.5$}%
%
%% </xtick>
%
%% <ytick>
%
\psfrag{006}[rc][rc]{\matlabtextA 10^{-11}}%
\psfrag{007}[rc][rc]{\matlabtextA 10^{-10}}%
\psfrag{008}[rc][rc]{\matlabtextA 10^{-9}}%
\psfrag{009}[rc][rc]{\matlabtextA 10^{-8}}%
\psfrag{010}[rc][rc]{\matlabtextA 10^{-7}}%
\psfrag{011}[rc][rc]{\matlabtextA 10^{-6}}%
\psfrag{012}[rc][rc]{\matlabtextA 10^{-5}}%
\psfrag{013}[rc][rc]{\matlabtextA 10^{-4}}%
%
%% </ytick>

I've tried to change log labels to, say for example, \matlabtextA $10^{-5}$ instead of the above as shown. The sample eps file can be found here.

The pstool (f068a10019aalldatap5_spec-pstool.tex) file reads as

\pdfoutput =0\relax 
\documentclass[a4paper,12pt,3p,oneside,final,number,times,sort&compress]{article}

\usepackage[crop=pdfcrop]{pstool}
\usepackage{graphicx}

\pagestyle {empty}

\makeatletter 
\def \thepage {\csname @arabic\endcsname \c@page }
\setcounter {page}{1}
\@input {samplepsfrag.oldaux}
\makeatother 

\begin {document}
\makeatletter 
\immediate \write \@mainaux {\@percentchar <*PSTOOLLABELS>}
\makeatother 

\centering \null \vfill 

\csname @input\endcsname {f068a10019aalldatap5_spec.tex}
 \includegraphics [width=0.45\textwidth ] {f068a10019aalldatap5_spec}

\vfill 

\makeatletter 
\immediate \write \@mainaux {\@percentchar </PSTOOLLABELS>}
\makeatother 
\end {document}

The following is the code for SWE

\documentclass[a4paper,12pt,3p,oneside,final,number,times,sort&compress]{article}

\usepackage[crop=pdfcrop]{pstool}
\usepackage{graphicx}

\begin{document}

Blah\\

\begin{figure*}
    \begin{minipage}[t][0.3\textheight]{0.45\textwidth}
           \psfragfig*[width=0.45\textwidth,height=0.3\textheight,keepaspectratio]{f068a10019aalldatap5_spec}
            \\ \footnotesize{(a)}
    \end{minipage}
\end{figure*}
\end{document

1 Answer 1

1

The problem can be located in \psfrag{015}[bc][bc]{\matlabtextA S(f) (m^2)}% and likewise every line using circumflex('^')

The usage of circumflex should be in math mode like \psfrag{015}[bc][bc]{\matlabtextA S(f) ($m^2$)}%. Similarly, the labels of the log plot should read as \psfrag{006}[rc][rc]{\matlabtextA $10^{-11}$}% and likewise

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .