[Tex/LaTex] epstopdf outdir challenges

epstopdf

I'm currently working on setting up the appendices for a dissertation project, which are going to contain +100 figures from several individual parametric studies.

The majority of the figures have are included as EPS-files hence the challenge relates to conversion of the many eps-files having. Note, the files have the same names across the subsets of the parametric studies. Therefore when having specified the epstopdf-outdir in the preamble** and consequently converting the picture files with epstopdf the files overwrite in some instances and others they don't so the result is a mess.

Using renewcommand appears inapplicable when trying to specify a subdirectory in the document body to the initially specified conversion-folder.

Any suggestions will be very appreciated.

** Suggested work-around to deal with error of converted files not found (Converted EPS not found with TeX Live 2012 and Windows 8).

MWE:

\documentclass[]{report}
\usepackage[english]{babel} 

\usepackage{blindtext}

\usepackage{graphicx}
\usepackage{epstopdf}
\epstopdfsetup{outdir=./figures/epstopdf_converted/}

\begin{document}
\chapter{Main report}
\blindtext\blindtext\blindtext\blindtext\blindtext

\appendix
\chapter{Parametric study}
\clearpage

\renewcommand{\epstopdfsetup}{outdir=./figures/epstopdf_converted/par_stud-A/} 
\section{Subset A}
\begin{figure}[H]
\centering
\includegraphics[scale=0.45]{figures/par_stud-A/example.eps}
\caption{Parametric study - subset A.}
\label{fig:A-example}
\end{figure}
\clearpage

\renewcommand{\epstopdfsetup}{outdir=./figures/epstopdf_converted/par_stud-B/}
\section{Subset B}
\begin{figure}[H]
\centering
\includegraphics[scale=0.45]{figures/par_stud-B/example.eps}
\caption{Parametric study - subset B.}
\label{fig:B-example}
\end{figure}
\end{document}

Folder structure and examples of eps files can be obtained here:
https://www.dropbox.com/s/fi3hwr93ylbpruo/epstopdf_outdir_example.zip

Best Answer

The error is here:

\renewcommand{\epstopdfsetup}{outdir=./figures/epstopdf_converted/par_stud-A/}

This destroys \epstopdfsetup and the setting outdir is not seen by package epstopdf.

Use \epstopdfsetup directly:

\epstopdfsetup{outdir=./figures/epstopdf_converted/par_stud-A/}