Re: [BLACKBOX] LaTeX for BlackBox ? - Progress report - 3

From: [at]} <Robert>
Date: Fri, 21 Nov 2008 17:25:11 +0000

----boundary-LibPST-iamunique-707157939_-_-
Content-type: text/plain

Hi

I think I need more help.


It has been suggested that I use dvipng.exe,
part of the LaTeX (MikTeX) distribution rather than
GladTeX. This seems like a good idea.

The problem I have actually applies to both methods.

I can create a .png file from the Command prompt; for example the command
     "c:\Program Files\MikTeX 2.5\miktex\bin\dvipng" c:\gladtex\myeq000'
works.

But how do I replicate this 'DOS' command from within BlackBox?

My attempt is below - maybe WinApi.WinExec is the wrong call?


The result I get is 33, which I don't think is an error code.
If I deliberately get the path wrong the result I get is 3, which I do think
is an error code.


Cheers

Robert


PS - I have had 3 people contribute to this thread privately, as their attempts
to use the list have not worked. In future, if you ask, I will try to forward
such messages to the list myself.


MODULE RdcLatex;
IMPORT Fmtrs := LibFmtrs, Api := WinApi, SYSTEM;

VAR
   f : Fmtrs.Fmtr;
   str : ARRAY 80 OF CHAR;

(* PROCEDURE WinExec (lpCmdLine: WinApi.PtrSTR; uCmdShow: INTEGER): INTEGER; *)
PROCEDURE Do*;
   CONST
     cmdStr = '"c:\Program Files\MikTeX 2.5\miktex\bin\dvipng"
c:\gladtex\myeq000';
   VAR
     res : INTEGER;
     cmd : ARRAY [untagged] 80 OF SHORTCHAR;
   BEGIN
     cmd := cmdStr;
     res := Api.WinExec (cmd, 0);

     f.SetToEnd;
     f.StrIntLn ('Result = ', res, 0)
   END Do;


BEGIN
   f := Fmtrs.logFmtr
END RdcLatex.


Q DevDebug.Unload

Q RdcLatex.Do


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-707157939_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyB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BGaWxlc1xcTWlrVGVYIDIu
NVxcbWlrdGV4XFxiaW5cXGR2aXBuZyIgXHBhcg0KYzpcXGdsYWR0ZXhcXG15ZXEwMDAnO1xwYXIN
CiAgIFZBUlxwYXINCiAgICAgcmVzICA6ICBJTlRFR0VSO1xwYXINCiAgICAgY21kICA6ICBBUlJB
WSBbdW50YWdnZWRdIDgwICBPRiAgU0hPUlRDSEFSO1xwYXINCiAgIEJFR0lOXHBhcg0KICAgICBj
bWQgIDo9ICBjbWRTdHI7XHBhcg0KICAgICByZXMgIDo9ICBBcGkuV2luRXhlYyAoY21kLCAwKTtc
cGFyDQpccGFyDQogICAgIGYuU2V0VG9FbmQ7XHBhcg0KICAgICBmLlN0ckludExuICgnUmVzdWx0
ICA9ICcsIHJlcywgMClccGFyDQogICBFTkQgIERvO1xwYXINClxwYXINClxwYXINCkJFR0lOXHBh
cg0KICAgZiAgOj0gIEZtdHJzLmxvZ0ZtdHJccGFyDQpFTkQgIFJkY0xhdGV4LlxwYXINClxwYXIN
ClxwYXINClEgICAgRGV2RGVidWcuVW5sb2FkXHBhcg0KXHBhcg0KUSAgICBSZGNMYXRleC5Eb1xw
YXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ug
d2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hc
cGFyDQp9
----boundary-LibPST-iamunique-707157939_-_---
Received on Fri Nov 21 2008 - 18:25:11 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:50 UTC