ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Simple rings with svg
Date: Thu, 10 May 2012 12:50:42 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.02.1205101240190.14235@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4FABD7F7.7070805@wxs.nl>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1066 bytes --]

On Thu, 10 May 2012, Hans Hagen wrote:

> On 10-5-2012 16:59, Aditya Mahajan wrote:
>> On Thu, 10 May 2012, Ian Lawrence wrote:
>> 
>>> I read on the wiki that now svg is natively supported. Hmm.
>> 
>> No. You need to have inkscape installed (and in your PATH) for svg to
>> pdf conversion to work.
>> 
>>> FWIW, I cannot find the intermediate file
>>> 'm_k_i_v_ChangingField_ILUC.pdf' on my disk either…both graphics files
>>> are in the same location, both exist, both are named correctly….
>> 
>> @Hans, could we change the conversion so that it checks for inkscape and
>> gives a more sensible warning if inkscape is absent?
>
> so what is a robust check ...

How about just implementing the unix which command in lua?

(untested code)

function which(string file)
   local path = os.getenv("PATH")
   local splitter = lpeg.splitat(io.fileseparator)
   local directories = lpeg.match(splitter, path)

   for dir in directories
     if io.exists(file.join(dir,file)) then
       return true
     end
   end

   return false
end

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2012-05-10 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 14:48 Ian Lawrence
2012-05-10 14:59 ` Aditya Mahajan
2012-05-10 15:00   ` Hans Hagen
2012-05-10 15:09     ` Marco
2012-05-10 16:50     ` Aditya Mahajan [this message]
2012-05-11  7:57       ` Hans Hagen
2012-05-11  9:10         ` Ian Lawrence
2012-05-11  9:31           ` Marco
2012-05-11  9:36             ` Hans Hagen
2012-05-10 17:47     ` Peter Münster
2012-05-11  7:53       ` Hans Hagen
2012-05-10 15:22   ` Khaled Hosny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.02.1205101240190.14235@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).