GeneralHow to enable write18 with TexnicCenter

General information and discussion about TeXnicCenter
Post Reply
Lorenzoc1980
Posts: 3
Joined: Wed Dec 12, 2007 5:11 am

How to enable write18 with TexnicCenter

Post by Lorenzoc1980 »

Hello everybody,

I am trying to get write18 to work with TexnicCenter. I have Miktex 2.6 and Windows. I have been reading that I need to pass the command line --enable-write18 to the compiler (pdftex in this case).
I tried to include the command under Output Profiles, but it is not working. I am afraid that the syntax is wrong. :?: Any idea?

I could "easily" enable write18 with Miktex 2.4 by modifying the miktec.ini file. Unfortunately there is not such thing on later versions...or is there?

THX

Lorenzo

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
MartinC
Posts: 153
Joined: Wed Jan 17, 2007 10:09 pm

Re: How to enable write18 with TexnicCenter

Post by MartinC »

Just add "--enable-write18" in the command line arguments of pdflatex.
Lorenzoc1980
Posts: 3
Joined: Wed Dec 12, 2007 5:11 am

How to enable write18 with TexnicCenter

Post by Lorenzoc1980 »

Well it seems that all you need is indeed to add

--enable-write18

in the command line in TexnicCenter Output Profiles. However, I think that in the code the command \immediate before \write18 is necessary. I tested this and it worked for me:

Code: Select all

\documentclass{article}

\begingroup
\expandafter\ifx\csname pdfshellescape\endcsname\relax
\else
\ifnum\pdfshellescape>0 %
\else
\PackageWarningNoLine{epstopdf}{%
  Shell escape feature is not enabled%
}%

\fi
\fi
\endgroup

\begin{document}

\immediate\write18{dir > listing}
\IfFileExists{listing}{\message{\string\write18 ENABLED}}
{\message{\string\write18DISABLED}}
\end{document}
alex1816129
Posts: 1
Joined: Wed Feb 20, 2008 3:47 pm

Re: How to enable write18 with TexnicCenter

Post by alex1816129 »

Hi,
in fact i am beginner in LateX and you write down just add --enable-write18 in the command line, it doesn't mean anything to me and when i read the code it's even worse...
I don't know where to put this code where i have to write, ect

Please, help!!!!!
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

How to enable write18 with TexnicCenter

Post by localghost »

alex1816129 wrote:[...] I don't know where to put this code where i have to write, ect [...]
The code is a command line parameter for the compiler that you have to add in the right place. Just go to the output profiles configuration (Alt+F7) and choose the profile you want to modify in the dialogue window. The dialogue is described better in another thread [1]. It's better to copy an existing profile and modify the new one,

[1] Forum thread: Problems with pstricks :S


Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply