[plt-scheme] Still having trouble getting Tex2Page working...

From: Mark Engelberg (mark.engelberg at gmail.com)
Date: Wed Apr 16 02:57:00 EDT 2008

OK, I ran it in DrScheme and got the same error.  I followed your -lc
suggestion, and then got a backtrace version:
c:\program files\plt\collects\tex2page\tex2page-aux.ss::239765:
file-exists?: expects argument of type <path or string>; given #f

So, the source of the error seems to be in the function
tex2page-file-if-exists, which is called from this line:

          (tex2page-file-if-exists (file-in-home ".tex2page.t2p"))

The problem is that file-in-home assumes that a HOME environment
variable is set.  If none is set, then it returns false, and that
causes tex2page-file-if-exists to mysteriously crash.

So, I set a HOME variable, and now it works.

A troublesome bug, but I'm glad you were able to help me identify it.
Hopefully it will be fixed in the future so others don't end up as
baffled as I was.

Thanks,

Mark

On Tue, Apr 15, 2008 at 11:23 PM, John Clements
<clements at brinckerhoff.org> wrote:
>
>  On Apr 15, 2008, at 11:01 PM, Mark Engelberg wrote:
>
> > No, I get the same error message.
> >
>
>  I'm mildly embarrassed to report that I tried it and (sorry, Dorai)
> expected to be able to reproduce this error... but I couldn't.  It worked
> fine.
>
>  I suggest that you try running the thing in DrScheme to get a better error
> message.  Here's what I tried:
>
>  (module foo mzscheme
>   (require (lib "tex2page.ss" "tex2page"))
>   (tex2page "/tmp/story.tex"))
>
>  This worked (mostly) fine, with this output:
>
>  Welcome to DrScheme, version 372 [3m].
>  Language: (module ...).
>  This is TeX2page, Version 20070609 (MzScheme 372, unix)
>  /bin/sh: line 1: kpsewhich: command not found
>  (/tmp/story.tex) [0]
>  Output written on story.html (1 page).
>  Transcript written on story.hlog.
>  >
>
>  ... the error there is because I ran DrScheme from the Finder directly, and
> (for me) that means that the path isn't set up directly.
>
>  Anyhow, give this a try and see whether DrScheme gives you a better error
> location.
>
>  Oh! you'll also probably want to run
>
>  setup-plt -lc tex2page
>
>  ... IIRC, in versions <3.99 the presence of the compiled files can mean
> less debugging info.
>
>  John Clements
>
>
>
> >
> >
> >
> > On Tue, Apr 15, 2008 at 10:54 PM, Noel Welsh <noelwelsh at gmail.com> wrote:
> >
> > > On Wed, Apr 16, 2008 at 4:41 AM, Mark Engelberg
> > >  <mark.engelberg at gmail.com> wrote:
> > >
> > > >  My scheme directory containing tex2page is in my path.  I go to the
> > > >  directory containing a sample tex file (story.tex), and type:
> > > >  tex2page story
> > > >  at the prompt, and get the following error:
> > > >
> > >
> > >  If you try
> > >
> > >  tex2page story.tex
> > >
> > >  instead, does that work?  That's all I can think of.
> > >
> > >  N.
> > >
> > >
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
>
>


Posted on the users mailing list.