Home › Monthly Archives › November 2013

pdflatex custom command for texstudio only run in cmd

I've just installed MikTex by which TexStudio came aswell as the editor. So far the editor seems fine. My only problem arises once I have to compile and actually look at what I've created.

For now every time I compile something it goes into my C:\users\myname folder. But my tex file is saved under C:\Development\latexWorkspace under the name helloWorld.tex.

I've read through some forums and found out i could do

pdflatex -aux-directory=C:\Development\latexWorkspace -output-directory=C:\Development\latexWorkspace C:\Development\latexWorkspace\helloWorld.tex

So I thought, hey I just change the build in execution of pdflatex in TexStudio. So i changed that command under Options > Configure TexStudio > Commands > PdfLatex to

pdflatex -aux-directory=C:\Development\LatexWorkspace -output-directory=C:\Development\LatexWorkspace %.tex

However i was just given the message:

Error: Could not start the command: pdflatex -aux-directory=C:\Development\LatexWorkspace -output-directory=C:\Development\LatexWorkspace "HelloWorld".tex

I even copied that Error right into CMD and it ran just fine as expected.

Can it be that TexStudio use a custom shell to run commands or such? How can i make it output everything to that folder of mine I want it to?

Errors using chemstyle in LaTeX [closed]

I am a total novice with no TeX or programming experience, trying to learn how to use LaTeX in general, but specifically attempting to use the 'chemstyle' package, so as to allow for automated numbering of my chemical compounds when drawn in ChemDraw and saved as '.eps' files containing temporary labels of 'TMP'.

I am currently using MikTeX and TexStudio (also have TeXworks) and have attempted both manually installing the chemstyle package from CTAN and directly from the MikTeX repository with no apparent difference between the two.

I have been using the tutorial here and typing the lines below in my preamble:

\usepackage[crop=off,runs=2]{auto-pst-pdf}
\usepackage{chemstyle}

I can't remember where I got it from but the inclusion of "crop=off" eliminates an intial error of:

pdfcrop: The Perl interpreter could not be found.
Process exited with error(s)

I have also attempted to enable shell escape in the command line, I think successfully, as I've read in a few places that it's necessary with this package.

Unfortunately whether I use my own file or the example ones given in the tutorial, the file never compiles successfully and I get a lot of error messages concerning 'caption3.sty' such as:

Command \caption@ifinlist already defined. \@expandtwoargs\caption@@ifinlist}

as well as a warning about 'typearea.sty'.

Below is a basic version of my document:

\documentclass[oneside,14pt,parskip=full]{scrbook}

\usepackage{graphicx}
\usepackage[left=2in,right=1.3in,top=1.3in,bottom=1.3in]{geometry}

\usepackage[crop=off,runs=2]{auto-pst-pdf}
\usepackage{chemstyle}

\usepackage{libertine}

\addtokomafont{chapter}{\Huge\scshape}
\addtokomafont{section}{\mdseries\LARGE\it}
\addtokomafont{subsection}{\fontsize{20}{24}\selectfont\bfseries}
\addtokomafont{subsubsection}{\fontsize{17}{20}\selectfont\mdseries\scshape}

\usepackage{fancyhdr}

\fancypagestyle{main}{ %
\fancyhf{}
\fancyhead[L]{\rightmark}
\fancyhead[R]{\leftmark}
\fancyfoot[C]{}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}}

\newcommand{\markedsection}[2]{\section[#2]{#2%
\sectionmark{#1}}
\sectionmark{#1}}
\newcommand{\markedchapter}[2]{\chapter[#2]{#2%
\chaptermark{#1}}
\chaptermark{#1}}

\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}

\usepackage[nottoc]{tocbibind}

\newcommand*{\TitleFont}{\scshape
      \fontsize{35}{20}
      \selectfont}

\title{\TitleFont Thesis}
\author{A Name}
\date{\today}
\publishers{Dept.\\Uni.}

\begin{document}

\frontmatter

\pagestyle{plain}
\maketitle
\tableofcontents
\listoffigures
\listoftables

\chapter{Acknowledgements}

Some thanks.

\chapter{Abstract}

An abstract.

\chapter{Glossary}

This is the glossary...

\mainmatter
\pagestyle{main}

\markedchapter{Intro}{Introduction}
\label{ch:intro}

Here is the introduction.

\markedsection{Sec1}{First Section}
\label{sc:sc1}

\subsection{First Subsection}
\label{subsc:subsc1}

\subsubsection{First Subsubsection}
\label{subsub:subsub1}

\backmatter

\chapter{Appendices}

\end{document}

Thank you in advance for any help you can give and apologies if I've left out any necessary information.

Edit: The output message following an attempt to compile is as below.

Process started: "C:\Program Files\MiKTeX 2.9\miktex\bin\pdflatex.exe" -synctex=1 -interaction=nonstopmode "chemstyle".tex

This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com) ' TeX output 2013.11.12:1417' -> chemstyle-autopp.ps <C:/Program Files/MiKTeX 2.9/dvips/base/tex.pro> <C:/Program Files/MiKTeX 2.9/dvips/misc/alt-rule.pro> <C:/Program Files/MiKTeX 2.9/dvips/psfrag/psfrag.pro> <C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/libertine/lbtn_c7kyj5.enc> <C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/libertine/lbtn_s5bq4i.enc> <C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/libertine/lbtn_c6xmqr.enc> <C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/libertine/lbtn_xogrpz.enc> <C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/libertine/lbtn_p657rp.enc> <C:/Program Files/MiKTeX 2.9/dvips/base/texps.pro> <C:/Program Files/MiKTeX 2.9/dvips/base/special.pro> <C:/Program Files/MiKTeX 2.9/dvips/base/color.pro>.

<C:/Program Files/MiKTeX 2.9/fonts/type1/public/libertine/LinBiolinumT.pfb> <C:/Program Files/MiKTeX 2.9/fonts/type1/public/libertine/LinBiolinumTB.pfb> <C:/Program Files/MiKTeX 2.9/fonts/type1/public/libertine/LinLibertineTI.pfb> <C:/Program Files/MiKTeX 2.9/fonts/type1/public/libertine/LinLibertineT.pfb> <C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb>[1] [1] [2] [3] [4] [5] [6] [7] [1] [2]

Process exited with error(s)