ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mtx-epub.lua
@ 2012-06-04 21:58 Andy Thomas
  2012-06-04 22:17 ` mtx-epub.lua Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Thomas @ 2012-06-04 21:58 UTC (permalink / raw)
  To: ntg-context

Hello all,

while working on my ebook, I found the following issues in mtx-epub.lua. Once a successful run is done, there is no need to try the other zippers. It also gives error messages, although everything is already done. Fix is attached.

Then, I got confused about the error messages appearing 3 times and found an issue in texlua of TL2011 (beta-0.70.1-2011062107) as well as the newest standalone (beta-0.70.2-2012052309). Consider the following example:

print(os.execute("abcxyz"))

This gives in Lua 5.2: sh: abcxyz: command not found
nil	exit	127

But in texlua it does: sh: abcxyz: command not found
32512

This breaks the if conditional which becomes true, although there is no abcxyz command. If there are if statements such as this one in other places, they would not work as intended either.

Andy



274,279c274,281
<             if os.execute(format(zipper.uncompressed,epubfile,"mimetype")) then
<                 os.execute(format(zipper.compressed,epubfile,"META-INF"))
<                 os.execute(format(zipper.compressed,epubfile,"OPS"))
<                 done = zipper.name
<             else
<                 list[#list+1] = zipper.name
---
>             if not done then
>                 if os.execute(format(zipper.uncompressed,epubfile,"mimetype")) then
>                     os.execute(format(zipper.compressed,epubfile,"META-INF"))
>                     os.execute(format(zipper.compressed,epubfile,"OPS"))
>                     done = zipper.name
>                 else
>                     list[#list+1] = zipper.name
>                 end


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-04 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04 21:58 mtx-epub.lua Andy Thomas
2012-06-04 22:17 ` mtx-epub.lua Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).