0

I'm quite new to Latex (and Sublime Text 2) and currently writing my master thesis with them. I need to draw a lot of molecules and want to number them throughout the whole thesis. No, problem, used package chemnum and it worked (partly).

Problems arise when I used chemdraw and want to replace tags in the eps. file saved with chemdraw. After spending several hours in different forums etc., I have tried plenty of things so far, but it still doenst work. Can anyone please take a look at this and make at least an educated guess where the problem is(?)

What I've tried and it changed:

  • using auto-pst-pdf of course, implemented after graphicx (which seems to be crucial)

  • analog to that link ( http://wiki.contextgarden.net/write18 ) I enabled write18 and something changed: Whereas before I didnt get a "Name-pics.pdf" I now get that pdf, problems are:

    • The file itself doesn't show any sign of a graphic now (not even the empty triangle)
    • my log file still doesn't say anywhere (I think it should be in the first few lines) that write18 is enabled
  • I tried changing in sublime text 2 the sublime settings. But that is were i get a little confused. Do I have to do this on top of enabling write18 in windows or should it be sufficient to do it in sublime? (non of it worked for me)

    Can anybody please post the exact lines I have to copy under "builder-settings" in the file?

  • I've also tried "Magic comment" %!TEX option = --shell-escape at the beginning of my file, but that doesn'tseem to change anything

I would be very glad if anyone could help me. Down below all the files and lines you need to test what I produced...

The eps: https://www.dropbox.com/s/pjdpdyj0fxc6laz/Merck_process_for_test.eps?dl=0

    \documentclass[11pt,pointlessnumbers,headsepline,cleardoubleempty,DIV12,BCOR8mm,a4paper,twoside,tablecaptionabove,openany]{scrbook}
\pagestyle{headings}   %---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\usepackage[english]{babel} 
\usepackage[section]{placeins}      
\usepackage{setspace}                   
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{epsfig} 
\usepackage[runs=2,crop=off]{auto-pst-pdf}
\usepackage{psfrag}
%\usepackage[outdir=./]{epstopdf}

\usepackage[version=3]{mhchem}                      % chemische formeln
\usepackage{siunitx}                                % Si-Einheiten
\usepackage{chemfig}
\usepackage{chemnum}



%\usepackage[pagebackref,pdftex]{hyperref}
%\usepackage[pdftex]{hyperref}
%\usepackage[pdftex,plainpages=false]{hyperref}         

\begin{document}

testtesttest

\begin{figure}
    \begin{center}
        \replacecmpd{isoqu}% replaces TMP1
        \replacecmpd{reissert_prod}% replaces TMP1
        \replacecmpd{hydrogen_prod}% replaces TMP1
    \includegraphics[width=0.90\textwidth]{Merck_process_for_test}
    \end{center}
    \caption{Merck process to PZQ} 
\label{merck_process}
\end{figure}


\end{document}
  • 1
    Running this (a bit more minimized) with pdflatex (TL16 updated earlier today) and shell-escape activated I get ! Undefined control sequence. \pfg@Ginclude@eps – clemens Jun 29 '16 at 10:05
1

This isn't an answer, but only to address the part of this that seems to be about LaTeXTools on Sublime (if you're using LaTeXing, I have no idea how to make things work). The builder settings block should look like this:

"builder_settings": {
    "options": ["--shell-escape"]
}

That said if you've already enabled write18 in the config, it's unnecessary, as they do the same thing. Note that enabling unrestricted write18 won't solve the problem @clemeno noted in your document.

  • Well, I figured it out (more or less). I put the "builder_settings": { "options": ["--shell-escape"] } in as suggested ( and tried many times before) and I commented out all packages out which are not necessary for that specific part. Turns out, when I take out \usepackage{chemfig} everything works fine.... Unfortunately, for my work I need that package... Does anybody have a clue why it doesn't work together? (Should I post this as a new question?) – PHI Lipp Jun 30 '16 at 5:15
  • @PHILipp Yes, please post a new question (or edit your question here). – Stefan Kottwitz Jun 30 '16 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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