ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: fixing mpiv on installation path with spaces
Date: Wed, 16 May 2012 01:45:30 +0200	[thread overview]
Message-ID: <CALBOmsaJpj8GDYGo9AXdNbE1+YLo4UtLNEB+W5fnZD8hzCv_Sg@mail.gmail.com> (raw)

Hello,

last year Taco added many patches to make sure that ConTeXt works even
when installed to "C:\Documents and Settings\ ..." and other weird
paths with spaces. However metapost in mkiv still fails. I figured out
that the following patch (which *won't* handle paths with quotation
marks properly) in mlib-run.lua fixes the problem:

    local preamble = [[
        boolean mplib ; mplib := true ;
        let dump = endinput ;
-        input %s ;
+        input "%s" ;
    ]]

but I'm not sure if there are any other side effects or if there are
other places that also need a patch. I didn't test with filenames with
spaces or with filenames with weird characters that need escaping.
Maybe it would be helpful to pass
    file.addsuffix(name,"mp")
through additional filter (instead of simply adding quotation marks)
that would also check if any other character needs escaping and add
quotation marks if needed.

Minimal example:
- install ConTeXt into path with spaces
- test with context on
    \starttext
    \startMPcode
    draw fullcircle scaled 3cm;
    \stopMPcode
    \stoptext

I would be grateful if somebody could take a look, so that a fix could
make it into TL 2012.

Thanks,
    Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


             reply	other threads:[~2012-05-15 23:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15 23:45 Mojca Miklavec [this message]
2012-05-16  7:15 ` Hans Hagen
2012-05-16  7:51 ` Hans Hagen

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=CALBOmsaJpj8GDYGo9AXdNbE1+YLo4UtLNEB+W5fnZD8hzCv_Sg@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.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).