Bug#311424: checking for write18

2006-01-18 Thread Ralf Stubner
Frank Küster wrote:
> Ralf Stubner <[EMAIL PROTECTED]> wrote:
> 
>>> but one should really check \tmpfile didnt exist before the 'touch',
>>> and maybe get rid of \tmpfile afterwards (which has possible security
>>> risks i suppose).
>>
>> Indeed, it's an unsave way to create a temporary file. An it has /tmp
>> hardcoded in it. I am quite sure that Heiko won't add something like
>> this to epstopdf.sty.
> 
> So instead it should be a static warning message, shouldn't it?

Either that or some better documentation. Having to look into the sty
file isn't uncommen, but not ideal either. The only epstopdf related
documentation known to texdoc seems to be the cataloge page about the
perl script with the same name.

cheerio
ralf



Bug#311424: checking for write18

2006-01-18 Thread Frank Küster
Ralf Stubner <[EMAIL PROTECTED]> wrote:

>> but one should really check \tmpfile didnt exist before the 'touch',
>> and maybe get rid of \tmpfile afterwards (which has possible security
>> risks i suppose).
>
> Indeed, it's an unsave way to create a temporary file. An it has /tmp
> hardcoded in it. I am quite sure that Heiko won't add something like
> this to epstopdf.sty.

So instead it should be a static warning message, shouldn't it?

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer




Bug#311424: checking for write18

2006-01-18 Thread Ralf Stubner
On Tue, Jan 17, 2006 at 17:02 +, Richard Lewis wrote:
> Frank Küster <[EMAIL PROTECTED]> writes:
> 
> > Does anybody on the list know how to check whether \write18 is enabled
> > in a TeX document?
> 
> This page
> 

Ah, there was this discussion.
 
> gives one possibility:
> 
> \def\tmpfile{/tmp/w18-test-\the\year\the\month\the\day\the\time}
> \immediate\write18{touch \tmpfile}
> \IfFileExists{\tmpfile}{\message{YES}}{\message{NO}} 
> 
> but one should really check \tmpfile didnt exist before the 'touch',
> and maybe get rid of \tmpfile afterwards (which has possible security
> risks i suppose).

Indeed, it's an unsave way to create a temporary file. An it has /tmp
hardcoded in it. I am quite sure that Heiko won't add something like
this to epstopdf.sty.

cheerio
ralf


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#311424: checking for write18

2006-01-17 Thread Richard Lewis
The following message is a courtesy copy of an article
that has been posted to gmane.linux.debian.devel.tetex as well.

Frank Küster <[EMAIL PROTECTED]> writes:

> Norbert Preining <[EMAIL PROTECTED]> wrote:
>

>> Therefor I suggest an appropriate error message, when the epstopdf
>> packages is used in latex documents, but `\write18' is disabled. In
>> addition an example of how to enable it (example: pdflatex -shell-escape
>> test.tex) would be very helpful.
>
> Does anybody on the list know how to check whether \write18 is enabled
> in a TeX document?

This page


gives one possibility:

\def\tmpfile{/tmp/w18-test-\the\year\the\month\the\day\the\time}
\immediate\write18{touch \tmpfile}
\IfFileExists{\tmpfile}{\message{YES}}{\message{NO}} 

but one should really check \tmpfile didnt exist before the 'touch',
and maybe get rid of \tmpfile afterwards (which has possible security
risks i suppose).  And as Ralf said this is non-portable: 'touch'
wouldnt work in miktex (i dont know if windows even has an equivalent
command), and nor is -shell-escape the correct option for turning on
\write18 under miktex...



Bug#311424: checking for write18

2006-01-17 Thread Ralf Stubner
Frank Küster wrote:
> Norbert Preining <[EMAIL PROTECTED]> wrote:
>
>> From the bug reports last entry:
>> I have realized the cause of the problem. To enable pdf creation on the
>> fly, the `\write18' has to be enabled via the command line option:
>> -shell-escape of pdflatex
>> (example: pdflatex -shell-escape test.tex) or via the configuration file
>> `texmf.cnf': (shell_escape = 1) as it is stated in the epstopdf.sty
>> file.
>> However one should not expect the user to dig into the sty files.

Documentation inside the sty file is not that uncommon. Main problem is
that it doesn't work together with texdoc.

>> Therefor I suggest an appropriate error message, when the epstopdf
>> packages is used in latex documents, but `\write18' is disabled. In
>> addition an example of how to enable it (example: pdflatex -shell-escape
>> test.tex) would be very helpful.
> 
> Does anybody on the list know how to check whether \write18 is enabled
> in a TeX document?

I remember vaguely some discussion on (de.)comp.text.tex that it is
difficult/almost impossible, especially in a platform independent way.
However, I didn't find anything on groups.google.com yet. One could ask
upstream to add an uncoditional message telling people to enable
write18/shell escapes.

cheerio
ralf




Bug#311424: checking for write18 (was: Reminder: Bugs to look at)

2006-01-17 Thread Frank Küster
Norbert Preining <[EMAIL PROTECTED]> wrote:

>> #311424: \usepackage{epstopdf} does not create pdf files
>>  did we ever investigate this, is it an upstream issue?  Don't
>>  remember (maybe during my sabbatical?).
>
>>From the bug reports last entry:
> I have realized the cause of the problem. To enable pdf creation on the
> fly, the `\write18' has to be enabled via the command line option:
> -shell-escape of pdflatex
> (example: pdflatex -shell-escape test.tex) or via the configuration file
> `texmf.cnf': (shell_escape = 1) as it is stated in the epstopdf.sty
> file.
> However one should not expect the user to dig into the sty files.
>
> Therefor I suggest an appropriate error message, when the epstopdf
> packages is used in latex documents, but `\write18' is disabled. In
> addition an example of how to enable it (example: pdflatex -shell-escape
> test.tex) would be very helpful.

Does anybody on the list know how to check whether \write18 is enabled
in a TeX document?

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer