[OS X TeX] \ifpdf in TeX4ht?
Peter Dyballa
Peter_Dyballa at Web.DE
Mon Apr 2 11:38:38 CEST 2007
Am 01.04.2007 um 14:01 schrieb Piet van Oostrum:
>>>>>> Eitan Gurari <gurari at cse.ohio-state.edu> (EG) wrote:
>
>>>> Execute script `File.lg'
>>>> ----------------------------
>>>> t4ht.c (2006-09-13-14:28 kpathsea)
>>>> t4ht -f/File.tex
>>>> (/usr/local/gwTeX/texmf.pkgs/tex4ht/base/win32/tex4ht.env)
>>>> •this could be a good reason why gs fails: I have installed a newer
>>>> version with MiKTeX Package Manager•
>>>> Entering File.lg
>>>> System call: if exist zzFile.ps DEL zzFile.ps >nul
>>>> sh: -c: line 2: syntax error: unexpected end of file
>>>> --- Warning --- System return: 512
>
>> EG> The execution of the conversion script stopped here for a
>> reason I
>> EG> don't understand.
>
> The system call above looks like a Windows call, which won't work
> on OS X
> (nor on any other Posix based system).
I found that on Saturday and added the UNIX files from the TeX Live
2007 DVD to the MiKTeX installation. This particular error goes away,
but it's still not possible to work with PNG, TIFF, GIF, or JPEG
format images. Even TeX Live 2007 fails:
Execute script `File.lg'
----------------------------
t4ht.c (2007-01-05-03:17 kpathsea)
t4ht dirchar
File.tex
(/usr/local/texlive/2007/texmf-dist/tex4ht/base/unix/tex4ht.env)
Entering File.lg
System call: dvips -E -Ppdf -mode ibmvga -D 110 -f File.idv -pp 1 >
zzFile.ps
This is dvips(k) 5.96 Copyright 2005 Radical Eye Software
(www.radicaleye.com)
' TeX output 2007.04.02:1057' ->
<tex.pro><alt-rule.pro><texps.pro><special.pro>. [1<Image.png>]
System return: 0
System call: convert -trim +repage -density 110x110 -transparent
'#FFFFFF' zzFile.ps File0x.png
Error: /syntaxerror in --%ztokenexec_continue--
Operand stack:
--nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --
nostringval-- 2 %stopped_push --nostringval-- --
nostringval-- --nostringval-- false 1 %stopped_push 1 3
%oparray_pop 1 3 %oparray_pop --nostringval-- 1 3 %
oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --
nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1128/1686(ro)(G)-- --dict:0/20(G)-- --dict:76/200
(L)-- --dict:100/300(L)-- --dict:43/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 9005
AFPL Ghostscript 8.54: Unrecoverable error, exit code 1
Error: /syntaxerror in --%ztokenexec_continue--
Operand stack:
--nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --
nostringval-- 2 %stopped_push --nostringval-- --
nostringval-- --nostringval-- false 1 %stopped_push 1 3
%oparray_pop 1 3 %oparray_pop --nostringval-- 1 3 %
oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --
nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1128/1686(ro)(G)-- --dict:0/20(G)-- --dict:76/200
(L)-- --dict:100/300(L)-- --dict:43/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 9005
AFPL Ghostscript 8.54: Unrecoverable error, exit code 1
convert: no decode delegate for this image format `zzFile.ps'.
convert: Postscript delegate failed `zzFile.ps'.
convert: missing an image filename `File0x.png'.
--- Warning --- System return: 256
Entering File.css
Entering File.tmp
Reason is obviously that dvips creates a bad zzFile.ps file: gv can't
display it, it shows in a window the same error from gs as cited
above. Running Apple's pstopdf on zzFile.ps I get this error:
%%[ Error: syntaxerror; OffendingCommand: binary token, type=137 ]%%
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%
pstopdf failed on file zzFile.ps with error code -31000
PStill reports:
* PStill Interpreter concluded, 0 pages, status Error 1, vmstat
2426.0 kByte
The interpretation produced the following messages:
PS-Messages> * PStill is interpreting .../TemporaryItems/PStill/pete/
tempstdin.ps
PS-Messages> * Interpreter LanguageLevel 2 commandset active
PS-Messages> + Included EPS encountered: 'Image.png'
PS-Messages> PostScript Error: undefined, Command \211PNG
PS-Messages> Error near file position: 8458
PS-Messages> false
- End of messages -
It makes me believe that latex is not correctly embedding graphics
files anymore ... Is the use of the command line option ``-src-
specials´´ now mandatory?
Right now it seems that TeX4ht only works fine with graphics as PS
files ... on Mac OS X.
--
Greetings
Pete (:
_ / __ - -
_/ \__/_/ - -
(´`) (´`) - -
`´ `´
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the macostex-archives
mailing list