# Chemnum/PSfrag - Replacement of Characters in eps

Using the chemnum package, I encounter problems with replacing temporary labels in EPS files. I first thought that it is a chemnum problem, but the result is the same using psfrag instead of chemnum. The problem is: Not only my temporary labels are replaced (correctly) but also other characters present in the EPS just vanish (but not all).

Attached you see on the left my EPS and on the right what I get in the PDF which is produced by PDFLaTeX.

I think the problem is the setting of the font.

If you have in the preamble only

\renewcommand{\familydefault}{\sfdefault}


everything seems fine.

\renewcommand{\sfdefault}{phv}


or also using

\usepackage{helvet}


gives strange character-replacement in the EPS.

So probably the more exact question is: How can I set my font to a sans-serif font with psfrag working?

\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{amsthm}
\usepackage[babel]{csquotes}
\usepackage{fancybox}
\usepackage[hang,center,nooneline,labelfont=bf]{caption}
\usepackage{kvoptions}
\usepackage[plainpages=false, pdfpagelabels,pdftex]{hyperref}
\usepackage{siunitx}
\usepackage{varioref}
\usepackage{endnotes}
\usepackage{booktabs}
\usepackage{supertabular}
\usepackage{picinpar}
\usepackage{graphicx}
\usepackage{auto-pst-pdf}
\usepackage{psfrag}
\usepackage{chemnum}
\setchemnum{replace-tag=temp}
\usepackage[version=3]{mhchem}
\usepackage{geometry}
\usepackage{textcomp}
\usepackage{listings}

\renewcommand{\sfdefault}{phv}
\renewcommand{\familydefault}{\sfdefault}

\makeindex

\usepackage[backend=biber,style=chem-angew]{biblatex}

\usepackage{floatrow}
\newfloat{scheme}{htbpH}{test}%[section]
\floatname{scheme}{Scheme}

\begin{document}

\begin{figure}[H]
\replacecmpd{alc}
\replacecmpd{Br}
\begin{center}
\includegraphics[scale=0.75]{test.eps}
\label{test}
\caption{test}
\end{center}
\end{figure}

\end{document}

• Welcome to TeX.SX Barbara. Can you also include your code for this? – percusse Mar 21 '14 at 5:31
• Can you make the .eps file available for download from somewhere? Without this file it's hard to diagnose the problem. – Ian Thompson Mar 21 '14 at 23:10
• n.ethz.ch/~cbarbara test.eps is the file. – Barbara Mar 24 '14 at 9:26
• This reminds me of tex.stackexchange.com/q/86916/5049 which showed the same problem... – clemens May 11 '14 at 14:18