Mailing List Archive

texvc on Windows
Hi!

Did anybody ever tried to port texvc on Windows??

I did not, but trying to emulate it, I found no way to handle correctly the
character + in a command line
argument. This is quite annoying for math formulae!

My emulation is via a php script. The problem could be because of DOS or of
php. I tried to get some help on the windows-php forum, and the answers I
got are not conclusive: it could then be a DOS issue, in which case the
present approach for the interface between outputpage.php and texvc will be
difficult to port on Windows...

In addition, the php function escapeshellarg does not seem to be adapted to
Windows, either.

My original approach, using a file as interface, has not such problem.

Michel Mouly
Re: texvc on Windows [ In reply to ]
On Wed, Apr 02, 2003 at 01:31:36PM +0200, Michel Mouly wrote:
> Hi!
>
> Did anybody ever tried to port texvc on Windows??

I (=author of texvc) certainly didn't.
Windows on servers is not really relevant.

> I did not, but trying to emulate it, I found no way to handle correctly the
> character + in a command line
> argument. This is quite annoying for math formulae!
>
> My emulation is via a php script. The problem could be because of DOS or of
> php. I tried to get some help on the windows-php forum, and the answers I
> got are not conclusive: it could then be a DOS issue, in which case the
> present approach for the interface between outputpage.php and texvc will be
> difficult to port on Windows...
>
> In addition, the php function escapeshellarg does not seem to be adapted to
> Windows, either.
>
> My original approach, using a file as interface, has not such problem.

I originally planned to use popen2-based interface, but for some reason
it's off by default in PHP.

In such case texvc.ml's lines:

Texutil.set_encoding (try Sys.argv.(4) with _ -> "UTF-8");
try render Sys.argv.(1) Sys.argv.(2) (Parser.tex_expr lexer_token_safe (Lexing.from_string Sys.argv.(3)))

need to be replaced by

Texutil.set_encoding (try Sys.argv.(3) with _ -> "UTF-8");
try render Sys.argv.(1) Sys.argv.(2) (Parser.tex_expr lexer_token_safe (Lexing.from_channel stdin))

If your php is compiled with popen2 (does it work on windows at all ?)
you could just put formula onto it's stdin, close it, and then read answer from
its stdout.
Re: texvc on Windows [ In reply to ]
On Wed, Apr 02, 2003 at 01:31:36PM +0200, Michel Mouly wrote:
> Hi!
>
> Did anybody ever tried to port texvc on Windows??
>
> I did not, but trying to emulate it, I found no way to handle correctly the
> character + in a command line
> argument. This is quite annoying for math formulae!
>
> My emulation is via a php script. The problem could be because of DOS or of
> php. I tried to get some help on the windows-php forum, and the answers I
> got are not conclusive: it could then be a DOS issue, in which case the
> present approach for the interface between outputpage.php and texvc will be
> difficult to port on Windows...
>
> In addition, the php function escapeshellarg does not seem to be adapted to
> Windows, either.
>
> My original approach, using a file as interface, has not such problem.
>
> Michel Mouly

Your best bet is probably to use Cygwin and their shell. They have an
rxvt-nox that works great. I have the base X11 font that I ported to
Windows on my website: http://www.twoevils.org with instructions on how
to use it with Cygwin (www.cygwin.com/setup.exe)

--
Nick Reinking -- eschewing obfuscation since 1981 -- Minneapolis, MN
Re: texvc on Windows [ In reply to ]
At 14:02 02/04/2003 +0200, you wrote:
>On Wed, Apr 02, 2003 at 01:31:36PM +0200, Michel Mouly wrote:
> > Hi!
> >
> > Did anybody ever tried to port texvc on Windows??
>
>I (=author of texvc) certainly didn't.
>Windows on servers is not really relevant.

I agree. When I started (to install a wiki on Windows) I thought it would
not work. Astonishingly, it does, at 95%. I pursue, and share my
experience, so that you and the others know some of the answers if somebody
else asks about such an irrelevant scenario! If ever I want to install
something widely open, I'll do differently (what I do is on a small closed
network).
Re: texvc on Windows [ In reply to ]
> (Michel Mouly <mmouly@wanadoo.fr>):
> At 14:02 02/04/2003 +0200, you wrote:
> >On Wed, Apr 02, 2003 at 01:31:36PM +0200, Michel Mouly wrote:
> >> Hi!
> >>
> >> Did anybody ever tried to port texvc on Windows??
> >
> >I (=author of texvc) certainly didn't.
> >Windows on servers is not really relevant.
>
> I agree. When I started (to install a wiki on Windows) I thought it would
> not work. Astonishingly, it does, at 95%. I pursue, and share my
> experience, so that you and the others know some of the answers if somebody
> else asks about such an irrelevant scenario! If ever I want to install
> something widely open, I'll do differently (what I do is on a small closed
> network).

Perhaps I should add some language into the README to that effect:
this code was developed and tested on and for Linux. No attempt has
been made to make it portable to other OSs, though it just might
hapen to work on some. If you attempt this, you do so at your own
risk and without support.

--
Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
"All inventions or works of authorship original to me, herein and past,
are placed irrevocably in the public domain, and may be used or modified
for any purpose, without permission, attribution, or notification."--LDC
Re: texvc on Windows [ In reply to ]
On Wed, Apr 02, 2003 at 01:05:21PM -0600, Lee Daniel Crocker wrote:
> Perhaps I should add some language into the README to that effect:
> this code was developed and tested on and for Linux. No attempt has
> been made to make it portable to other OSs, though it just might
> hapen to work on some. If you attempt this, you do so at your own
> risk and without support.

I think it should work on other Unices too.
It's just Windows that's too different.
Re: texvc on Windows [ In reply to ]
>Hi!
>
>Did anybody ever tried to port texvc on Windows??
>
>I did not, but trying to emulate it, I found no way to handle correctly the
>character + in a command line
>argument. This is quite annoying for math formulae!
>
>My emulation is via a php script. The problem could be because of DOS or of
>php. I tried to get some help on the windows-php forum, and the answers I
>got are not conclusive: it could then be a DOS issue, in which case the
>present approach for the interface between outputpage.php and texvc will be
>difficult to port on Windows...

I doubt it's a DOS problem -- some DOS commands require passing of + on the
command line (attrib and copy for example). Try typing "echo +" if you don't
believe me.

>In addition, the php function escapeshellarg does not seem to be adapted to
>Windows, either.
>
>My original approach, using a file as interface, has not such problem.

It might be a PHP bug. I couldn't find any mention of it in
http://www.php.net/manual/en/features.commandline.php . You might have to
just think of a workaround. Maybe you can try using W32api to call
GetCommandLineA, if you're brave.

-- Tim Starling.




_________________________________________________________________
MSN Instant Messenger now available on Australian mobile phones. Go to
http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp