[OS X TeX] eps to pdf conversion

Herbert Schulz herbs at wideopenwest.com
Tue Oct 9 00:05:50 CEST 2012

```On Oct 8, 2012, at 4:20 PM, Themis Matsoukas <tmatsoukas at me.com> wrote:

> I am  running into this problem on my laptop  but not on my imac. My tree structure is this:
>
> ../hw-folder/main.tex
> ../problem-dbase/problem1/problem.tex
> ../problem-dbase/problem1/fig.pdf
> ../problem-dbase/problem1/fig.eps
>
> main.tex reads problem.tex which loads the figure using \includegraphics{fig}. If fig.pdf exists, all is well. But if I delete fig.pdf while leaving fig.eps intact, I get:
>
> !!! Error: Output filename '../problem-dbase/problem1/fig.pdf' not allowed in restricted mode.
>
>
> ../problem-dbase/problem1/problem.tex:23: Package pdftex.def Error: File `../pr
>
> See the pdftex.def package documentation for explanation.
> Type  H <return>  for immediate help.
> ...
>
> l.23 \includegraphics{fig}
>
> ? x
>
> Strangely, I don't get this problem on my imac. On the imac,  if fig.pdf does not exist, it is generated on the fly from the eps file. Both computers are on texlive 2012 and the problem started after the update. Obviously the two setups are not identical but I can't think what i did differently.
>
> Themis

Howdy,

I'm not sure I understand... \includegraphics{fig} could only find the graphic fig in the same directory as main.tex unless you've got other stuff in your preamble defining a graphics path.

Also, in restricted mode, i.e., no --shell-escape, paths which go up directory, signified by the leading .., are not allowed by default. You have to edit texmf.cnf or create a new one in /usr/local/texlive/texmf-local/web2c with the new default for openout_any: the following is the defaults set

% Allow TeX \openin, \openout, or \input on filenames starting with `.'
% (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)?
% a (any)        : any file can be opened.
% r (restricted) : disallow opening "dotfiles".
% p (paranoid)   : as `r' and disallow going to parent directories, and
%                  restrict absolute paths to be under \$TEXMFOUTPUT.
openout_any = p
openin_any = a

so you would change openout_any to

openout_any = a

even though that could be dangerous.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

```