Nicolae Garleanu | 12 Aug 23:17

registry problem

Hi.

As I was trying to get a particular macro to work, I must have done something funny, but now my winedt interface to miktex is doing very strange things. In particular, whatever file I try to run latex on, it apparently runs on a particular file (say, FileF.tex) it is stuck on. (Tex also gives me a weird error on that file, but that is probably another issue.) When I try to look at the log file, then an error message tells me that the file FileF.log is not found, confirming my suspicion.

I could actually check that register F is stuck with the value ‘FileF’ (using the prompt command), and I do not know how to clear it (nor why it happened in the first place). I tried running the command line Release(‘%F’) with some variations – Accessories|Run –  but clearly it was not right.

By the way, I am (still) using WinEdt 5.4.

I would appreciate any suggestion concerning how to get out of this problem. (I was trying to fix a small one, etc.)

Best,

Nicolae

WinEdt Team | 13 Aug 18:19
Favicon

Re: registry problem

> As I was trying to get a particular macro to work, I must have
> done something funny, but now my winedt interface to miktex is
> doing very strange things. In particular, whatever file I try
> to run latex on, it apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on
> that file, but that is probably another issue.) When I try to
> look at the log file, then an error message tells me that the
> file FileF.log is not found, confirming my suspicion. I could
> actually check that register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it
> (nor why it happened in the first place). I tried running the
> command line Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion
> concerning how to get out of this problem. (I was trying to fix
> a small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to
change the main file or Remove Main File if you want
compilation to run on a current document.

You probably used SetMainFile macro but things went wrong
somewhere in your macro script and the wrong main file persists
until you change it. Perhaps you are not quite ready for
writing your own macro scripts.

Best regards,

alex

Nicolae Garleanu | 13 Aug 23:58

RE: registry problem

All right, I am not ready to write macros, as it has become rather clear, and probably will never be (set-up
costs seem too high).

Given all the effort already put into this (not only by me), it seems a shame not to add the last tiny push that
would make the following macro work --- a macro written collaboratively by David and Alex.

DosToUnix("%p\%n%t",0);
FindInString( "%!0", "_body\.tex", 1, 2, 1);
ReplaceInString( "%!0", "_ps", %!1, %!2, 1, 3);

Assign('Main_File','%!F');
SetMainFile('%!3');
Exe('%B\Exec\MiKTeX\LaTeX.edt');
Exe('%B\Exec\MiKTeX\dvi2ps.edt');
Exe('%B\Exec\ps2pdf.edt');

SetMainFile("%$(|Main_File|);");   // Reset the Main File

The first three lines produce the new file name. The next two change the main file (I don't think that I
normally have a main file; I could not find what a main file is from Macros.txt, but I guess it's got to do with projects).

Then comes my piece, the executables. LaTeX works OK, but then I get the error message 'dvi2ps failed to
create a ps file. For possible explanations ...'. All commands work well when running them directly (as a
macro) from the file stored in 3. My guess is that dvi2ps tries to run on the wrong file, but I don't know how to
check that (error message notwithstanding, the only log file I know of is from Latex, and it does not help),
nor how to fix it. If you could fix this me, I would be very happy.

Of course, I could also use a 'Run' command, except that I do not understand how the command line should look
in order to run a given macro on a given file. (What is worse, I think that I do not understand how to use the
'help' to figure such things out, as I spent quite some time looking through the help files, but without success.)

Best,
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 9:19 AM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> As I was trying to get a particular macro to work, I must have
> done something funny, but now my winedt interface to miktex is
> doing very strange things. In particular, whatever file I try
> to run latex on, it apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on
> that file, but that is probably another issue.) When I try to
> look at the log file, then an error message tells me that the
> file FileF.log is not found, confirming my suspicion. I could
> actually check that register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it
> (nor why it happened in the first place). I tried running the
> command line Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion
> concerning how to get out of this problem. (I was trying to fix
> a small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to
change the main file or Remove Main File if you want
compilation to run on a current document.

You probably used SetMainFile macro but things went wrong
somewhere in your macro script and the wrong main file persists
until you change it. Perhaps you are not quite ready for
writing your own macro scripts.

Best regards,

alex

David Huffer | 14 Aug 00:11

RE: registry problem

There may be a little bit of startup costs just learning alex's macro
language, but it certainly isnt difficult; he did a bang-up job there.
There are a few things I wish were different but overall its really
flexible.  Its well worth spending the time to get into it!

-- 
 David

 David Huffer, Ph.D
 Senior Statistician
 CSOSA, Washington DC 

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu] 
Sent: Wednesday, August 13, 2008 5:59 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

All right, I am not ready to write macros, as it has become rather
clear, and probably will never be (set-up costs seem too high).

Given all the effort already put into this (not only by me), it seems a
shame not to add the last tiny push that would make the following macro
work --- a macro written collaboratively by David and Alex.

DosToUnix("%p\%n%t",0);
FindInString( "%!0", "_body\.tex", 1, 2, 1); ReplaceInString( "%!0",
"_ps", %!1, %!2, 1, 3);

Assign('Main_File','%!F');
SetMainFile('%!3');
Exe('%B\Exec\MiKTeX\LaTeX.edt');
Exe('%B\Exec\MiKTeX\dvi2ps.edt');
Exe('%B\Exec\ps2pdf.edt');

SetMainFile("%$(|Main_File|);");   // Reset the Main File

The first three lines produce the new file name. The next two change the
main file (I don't think that I normally have a main file; I could not
find what a main file is from Macros.txt, but I guess it's got to do
with projects).

Then comes my piece, the executables. LaTeX works OK, but then I get the
error message 'dvi2ps failed to create a ps file. For possible
explanations ...'. All commands work well when running them directly (as
a macro) from the file stored in 3. My guess is that dvi2ps tries to run
on the wrong file, but I don't know how to check that (error message
notwithstanding, the only log file I know of is from Latex, and it does
not help), nor how to fix it. If you could fix this me, I would be very
happy.

Of course, I could also use a 'Run' command, except that I do not
understand how the command line should look in order to run a given
macro on a given file. (What is worse, I think that I do not understand
how to use the 'help' to figure such things out, as I spent quite some
time looking through the help files, but without success.)

Best,
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 9:19 AM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> As I was trying to get a particular macro to work, I must have done 
> something funny, but now my winedt interface to miktex is doing very 
> strange things. In particular, whatever file I try to run latex on, it

> apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on that 
> file, but that is probably another issue.) When I try to look at the 
> log file, then an error message tells me that the file FileF.log is 
> not found, confirming my suspicion. I could actually check that 
> register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it (nor why

> it happened in the first place). I tried running the command line 
> Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion 
> concerning how to get out of this problem. (I was trying to fix a 
> small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to change the
main file or Remove Main File if you want compilation to run on a
current document.

You probably used SetMainFile macro but things went wrong somewhere in
your macro script and the wrong main file persists until you change it.
Perhaps you are not quite ready for writing your own macro scripts.

Best regards,

alex

Nicolae Garleanu | 14 Aug 00:18

RE: registry problem

I am perfectly willing to believe that; I am probably not going about it the right way, either, which
increases these costs for me. C++, LISP, PERL, and matlab came much more naturally to me. Little knowledge
of DOS may also be an issue here.
Best,
Nicolae

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov]
Sent: Wednesday, August 13, 2008 3:12 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

There may be a little bit of startup costs just learning alex's macro
language, but it certainly isnt difficult; he did a bang-up job there.
There are a few things I wish were different but overall its really
flexible.  Its well worth spending the time to get into it!

--
 David

 David Huffer, Ph.D
 Senior Statistician
 CSOSA, Washington DC

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu]
Sent: Wednesday, August 13, 2008 5:59 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

All right, I am not ready to write macros, as it has become rather
clear, and probably will never be (set-up costs seem too high).

Given all the effort already put into this (not only by me), it seems a
shame not to add the last tiny push that would make the following macro
work --- a macro written collaboratively by David and Alex.

DosToUnix("%p\%n%t",0);
FindInString( "%!0", "_body\.tex", 1, 2, 1); ReplaceInString( "%!0",
"_ps", %!1, %!2, 1, 3);

Assign('Main_File','%!F');
SetMainFile('%!3');
Exe('%B\Exec\MiKTeX\LaTeX.edt');
Exe('%B\Exec\MiKTeX\dvi2ps.edt');
Exe('%B\Exec\ps2pdf.edt');

SetMainFile("%$(|Main_File|);");   // Reset the Main File

The first three lines produce the new file name. The next two change the
main file (I don't think that I normally have a main file; I could not
find what a main file is from Macros.txt, but I guess it's got to do
with projects).

Then comes my piece, the executables. LaTeX works OK, but then I get the
error message 'dvi2ps failed to create a ps file. For possible
explanations ...'. All commands work well when running them directly (as
a macro) from the file stored in 3. My guess is that dvi2ps tries to run
on the wrong file, but I don't know how to check that (error message
notwithstanding, the only log file I know of is from Latex, and it does
not help), nor how to fix it. If you could fix this me, I would be very
happy.

Of course, I could also use a 'Run' command, except that I do not
understand how the command line should look in order to run a given
macro on a given file. (What is worse, I think that I do not understand
how to use the 'help' to figure such things out, as I spent quite some
time looking through the help files, but without success.)

Best,
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 9:19 AM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> As I was trying to get a particular macro to work, I must have done
> something funny, but now my winedt interface to miktex is doing very
> strange things. In particular, whatever file I try to run latex on, it

> apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on that
> file, but that is probably another issue.) When I try to look at the
> log file, then an error message tells me that the file FileF.log is
> not found, confirming my suspicion. I could actually check that
> register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it (nor why

> it happened in the first place). I tried running the command line
> Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion
> concerning how to get out of this problem. (I was trying to fix a
> small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to change the
main file or Remove Main File if you want compilation to run on a
current document.

You probably used SetMainFile macro but things went wrong somewhere in
your macro script and the wrong main file persists until you change it.
Perhaps you are not quite ready for writing your own macro scripts.

Best regards,

alex

David Huffer | 14 Aug 00:20

RE: registry problem

If you like lisp you'd probably really like emacs. 

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu] 
Sent: Wednesday, August 13, 2008 6:19 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

I am perfectly willing to believe that; I am probably not going about it
the right way, either, which increases these costs for me. C++, LISP,
PERL, and matlab came much more naturally to me. Little knowledge of DOS
may also be an issue here.
Best,
Nicolae

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov]
Sent: Wednesday, August 13, 2008 3:12 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

There may be a little bit of startup costs just learning alex's macro
language, but it certainly isnt difficult; he did a bang-up job there.
There are a few things I wish were different but overall its really
flexible.  Its well worth spending the time to get into it!

--
 David

 David Huffer, Ph.D
 Senior Statistician
 CSOSA, Washington DC

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu]
Sent: Wednesday, August 13, 2008 5:59 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

All right, I am not ready to write macros, as it has become rather
clear, and probably will never be (set-up costs seem too high).

Given all the effort already put into this (not only by me), it seems a
shame not to add the last tiny push that would make the following macro
work --- a macro written collaboratively by David and Alex.

DosToUnix("%p\%n%t",0);
FindInString( "%!0", "_body\.tex", 1, 2, 1); ReplaceInString( "%!0",
"_ps", %!1, %!2, 1, 3);

Assign('Main_File','%!F');
SetMainFile('%!3');
Exe('%B\Exec\MiKTeX\LaTeX.edt');
Exe('%B\Exec\MiKTeX\dvi2ps.edt');
Exe('%B\Exec\ps2pdf.edt');

SetMainFile("%$(|Main_File|);");   // Reset the Main File

The first three lines produce the new file name. The next two change the
main file (I don't think that I normally have a main file; I could not
find what a main file is from Macros.txt, but I guess it's got to do
with projects).

Then comes my piece, the executables. LaTeX works OK, but then I get the
error message 'dvi2ps failed to create a ps file. For possible
explanations ...'. All commands work well when running them directly (as
a macro) from the file stored in 3. My guess is that dvi2ps tries to run
on the wrong file, but I don't know how to check that (error message
notwithstanding, the only log file I know of is from Latex, and it does
not help), nor how to fix it. If you could fix this me, I would be very
happy.

Of course, I could also use a 'Run' command, except that I do not
understand how the command line should look in order to run a given
macro on a given file. (What is worse, I think that I do not understand
how to use the 'help' to figure such things out, as I spent quite some
time looking through the help files, but without success.)

Best,
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 9:19 AM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> As I was trying to get a particular macro to work, I must have done 
> something funny, but now my winedt interface to miktex is doing very 
> strange things. In particular, whatever file I try to run latex on, it

> apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on that 
> file, but that is probably another issue.) When I try to look at the 
> log file, then an error message tells me that the file FileF.log is 
> not found, confirming my suspicion. I could actually check that 
> register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it (nor why

> it happened in the first place). I tried running the command line
> Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion 
> concerning how to get out of this problem. (I was trying to fix a 
> small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to change the
main file or Remove Main File if you want compilation to run on a
current document.

You probably used SetMainFile macro but things went wrong somewhere in
your macro script and the wrong main file persists until you change it.
Perhaps you are not quite ready for writing your own macro scripts.

Best regards,

alex

Nicolae Garleanu | 14 Aug 00:29

RE: registry problem

During my PhD years I was using UNIX, and emacs was the natural editor. Upon 'graduating' to PCs, though, I
followed my friends and switched to WinEdt. Generally I am very happy, I like the interface a lot, but I do
wish I found it slightly less difficult to write low-level code. Again, I think that I have not figured out
the best way to learn about the WinEdt language. The file Macro.txt, in particular, did not help much with
my problem at hand.
Nicolae

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov]
Sent: Wednesday, August 13, 2008 3:21 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

If you like lisp you'd probably really like emacs.

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu]
Sent: Wednesday, August 13, 2008 6:19 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

I am perfectly willing to believe that; I am probably not going about it
the right way, either, which increases these costs for me. C++, LISP,
PERL, and matlab came much more naturally to me. Little knowledge of DOS
may also be an issue here.
Best,
Nicolae

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov]
Sent: Wednesday, August 13, 2008 3:12 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

There may be a little bit of startup costs just learning alex's macro
language, but it certainly isnt difficult; he did a bang-up job there.
There are a few things I wish were different but overall its really
flexible.  Its well worth spending the time to get into it!

--
 David

 David Huffer, Ph.D
 Senior Statistician
 CSOSA, Washington DC

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu]
Sent: Wednesday, August 13, 2008 5:59 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

All right, I am not ready to write macros, as it has become rather
clear, and probably will never be (set-up costs seem too high).

Given all the effort already put into this (not only by me), it seems a
shame not to add the last tiny push that would make the following macro
work --- a macro written collaboratively by David and Alex.

DosToUnix("%p\%n%t",0);
FindInString( "%!0", "_body\.tex", 1, 2, 1); ReplaceInString( "%!0",
"_ps", %!1, %!2, 1, 3);

Assign('Main_File','%!F');
SetMainFile('%!3');
Exe('%B\Exec\MiKTeX\LaTeX.edt');
Exe('%B\Exec\MiKTeX\dvi2ps.edt');
Exe('%B\Exec\ps2pdf.edt');

SetMainFile("%$(|Main_File|);");   // Reset the Main File

The first three lines produce the new file name. The next two change the
main file (I don't think that I normally have a main file; I could not
find what a main file is from Macros.txt, but I guess it's got to do
with projects).

Then comes my piece, the executables. LaTeX works OK, but then I get the
error message 'dvi2ps failed to create a ps file. For possible
explanations ...'. All commands work well when running them directly (as
a macro) from the file stored in 3. My guess is that dvi2ps tries to run
on the wrong file, but I don't know how to check that (error message
notwithstanding, the only log file I know of is from Latex, and it does
not help), nor how to fix it. If you could fix this me, I would be very
happy.

Of course, I could also use a 'Run' command, except that I do not
understand how the command line should look in order to run a given
macro on a given file. (What is worse, I think that I do not understand
how to use the 'help' to figure such things out, as I spent quite some
time looking through the help files, but without success.)

Best,
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 9:19 AM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> As I was trying to get a particular macro to work, I must have done
> something funny, but now my winedt interface to miktex is doing very
> strange things. In particular, whatever file I try to run latex on, it

> apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on that
> file, but that is probably another issue.) When I try to look at the
> log file, then an error message tells me that the file FileF.log is
> not found, confirming my suspicion. I could actually check that
> register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it (nor why

> it happened in the first place). I tried running the command line
> Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion
> concerning how to get out of this problem. (I was trying to fix a
> small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to change the
main file or Remove Main File if you want compilation to run on a
current document.

You probably used SetMainFile macro but things went wrong somewhere in
your macro script and the wrong main file persists until you change it.
Perhaps you are not quite ready for writing your own macro scripts.

Best regards,

alex

David Huffer | 14 Aug 00:39

RE: registry problem

I feel the same way about emacs.  

I think there were some FAQs on robert's site.  If there arent manyt
topics wrt macros then maybe we should all be a little more proactive.
The sad thing is that most times alex responds to questions himself.
This, I think, is a mostly a hobby for him...surely he gets overwhelmed.

What about the macro manual itself?  Was that helpful? Alex put some
snippets throughout and some example macros that demonstrate a lot of
it.   

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu] 
Sent: Wednesday, August 13, 2008 6:30 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

During my PhD years I was using UNIX, and emacs was the natural editor.
Upon 'graduating' to PCs, though, I followed my friends and switched to
WinEdt. Generally I am very happy, I like the interface a lot, but I do
wish I found it slightly less difficult to write low-level code. Again,
I think that I have not figured out the best way to learn about the
WinEdt language. The file Macro.txt, in particular, did not help much
with my problem at hand.
Nicolae

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov]
Sent: Wednesday, August 13, 2008 3:21 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

If you like lisp you'd probably really like emacs.

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu]
Sent: Wednesday, August 13, 2008 6:19 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

I am perfectly willing to believe that; I am probably not going about it
the right way, either, which increases these costs for me. C++, LISP,
PERL, and matlab came much more naturally to me. Little knowledge of DOS
may also be an issue here.
Best,
Nicolae

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov]
Sent: Wednesday, August 13, 2008 3:12 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

There may be a little bit of startup costs just learning alex's macro
language, but it certainly isnt difficult; he did a bang-up job there.
There are a few things I wish were different but overall its really
flexible.  Its well worth spending the time to get into it!

--
 David

 David Huffer, Ph.D
 Senior Statistician
 CSOSA, Washington DC

-----Original Message-----
From: Nicolae Garleanu [mailto:garleanu <at> haas.berkeley.edu]
Sent: Wednesday, August 13, 2008 5:59 PM
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] registry problem

All right, I am not ready to write macros, as it has become rather
clear, and probably will never be (set-up costs seem too high).

Given all the effort already put into this (not only by me), it seems a
shame not to add the last tiny push that would make the following macro
work --- a macro written collaboratively by David and Alex.

DosToUnix("%p\%n%t",0);
FindInString( "%!0", "_body\.tex", 1, 2, 1); ReplaceInString( "%!0",
"_ps", %!1, %!2, 1, 3);

Assign('Main_File','%!F');
SetMainFile('%!3');
Exe('%B\Exec\MiKTeX\LaTeX.edt');
Exe('%B\Exec\MiKTeX\dvi2ps.edt');
Exe('%B\Exec\ps2pdf.edt');

SetMainFile("%$(|Main_File|);");   // Reset the Main File

The first three lines produce the new file name. The next two change the
main file (I don't think that I normally have a main file; I could not
find what a main file is from Macros.txt, but I guess it's got to do
with projects).

Then comes my piece, the executables. LaTeX works OK, but then I get the
error message 'dvi2ps failed to create a ps file. For possible
explanations ...'. All commands work well when running them directly (as
a macro) from the file stored in 3. My guess is that dvi2ps tries to run
on the wrong file, but I don't know how to check that (error message
notwithstanding, the only log file I know of is from Latex, and it does
not help), nor how to fix it. If you could fix this me, I would be very
happy.

Of course, I could also use a 'Run' command, except that I do not
understand how the command line should look in order to run a given
macro on a given file. (What is worse, I think that I do not understand
how to use the 'help' to figure such things out, as I spent quite some
time looking through the help files, but without success.)

Best,
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 9:19 AM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> As I was trying to get a particular macro to work, I must have done 
> something funny, but now my winedt interface to miktex is doing very 
> strange things. In particular, whatever file I try to run latex on, it

> apparently runs on a particular file (say,
> FileF.tex) it is stuck on. (Tex also gives me a weird error on that 
> file, but that is probably another issue.) When I try to look at the 
> log file, then an error message tells me that the file FileF.log is 
> not found, confirming my suspicion. I could actually check that 
> register F is stuck with the value 'FileF'
> (using the prompt command), and I do not know how to clear it (nor why

> it happened in the first place). I tried running the command line
> Release('%F') with some variations -
> Accessories|Run - but clearly it was not right. By the way, I
> am (still) using WinEdt 5.4. I would appreciate any suggestion 
> concerning how to get out of this problem. (I was trying to fix a 
> small one, etc.)

Use Set Main File command in the Project Menu (or toolbar) to change the
main file or Remove Main File if you want compilation to run on a
current document.

You probably used SetMainFile macro but things went wrong somewhere in
your macro script and the wrong main file persists until you change it.
Perhaps you are not quite ready for writing your own macro scripts.

Best regards,

alex

WinEdt Team | 14 Aug 01:07
Favicon

Re: registry problem

> Given all the effort already put into this (not only by me), it
> seems a shame not to add the last tiny push that would make the
> following macro work --- a macro written collaboratively by
> David and Alex.
>
> DosToUnix("%p\%n%t",0);
> FindInString( "%!0", "_body\.tex", 1, 2, 1);
> ReplaceInString( "%!0", "_ps", %!1, %!2, 1, 3);
>
> Assign('Main_File','%!F');
> SetMainFile('%!3');
> Exe('%B\Exec\MiKTeX\LaTeX.edt');
> Exe('%B\Exec\MiKTeX\dvi2ps.edt');
> Exe('%B\Exec\ps2pdf.edt');
>
> SetMainFile("%$(|Main_File|);");   // Reset the Main File
>
> The first three lines produce the new file name. The next two
> change the main file (I don't think that I normally have a main
> file; I could not find what a main file is from Macros.txt, but
> I guess it's got to do with projects).

Macros.txt is completely obsolete and out of date (and
non-existent since WinEdt 5.4). For years now WinEdt comes with
HTML Help and indexed macro manual (with no reference to
Macros.txt in the default settings). Try to restore the default
Help Menu (even in 5.4 the macro manual is there). You don't
even know what you are missing there:-)

> Then comes my piece, the executables. LaTeX works OK, but then
> I get the error message 'dvi2ps failed to create a ps file. For
> possible explanations ...'. All commands work well when running
> them directly (as a macro) from the file stored in 3. My guess
> is that dvi2ps tries to run on the wrong file, but I don't know
> how to check that (error message notwithstanding, the only log
> file I know of is from Latex, and it does not help), nor how to
> fix it. If you could fix this me, I would be very happy.

All three macros run executables on the Main File. Thus I
seriously doubt that this (filename?) is a problem.

Start Options -> Execution Modes and check if Wait for
Execution to Finish option is enabled for all of the above
items. The problem could be that ps2pdf starts before latex is
done and it is thus doomed to fail. OK?

When you say that macros work directly on the file you probably
mean one by one and not as a sequence (like in the above
script). Correct?

> Of course, I could also use a 'Run' command, except that I do
> not understand how the command line should look in order to run
> a given macro on a given file. (What is worse, I think that I
> do not understand how to use the 'help' to figure such things
> out, as I spent quite some time looking through the help files,
> but without success.)

Run cannot execute WinEdt macros. It calls Windows executables
or batch files (which is what the above macros eventually do).
If you know what to type at the command prompt then you know
what to put inside the Run macro -- it is that easy!

Again, your problem might be that you are not aware of the new
documentation (starting in WinEdt 5.4!) and you might be trying
too hard to decipher secrets of macro language from old, bad,
and obsolete documentation that should not even be there (but
it is if you upgraded over older WinEdt and preserved ALL your
menus -- never a good idea as it leaves you with a severely
crippled version of WinEdt).

Best regards,

alex

Nicolae Garleanu | 14 Aug 01:40

RE: registry problem

Thanks, that is plenty of issues to fix, including the very promising suggestion concerning the macro
manual. As for the command line, I don't really know what to write there, I admit.

To answer your questions from below, though, when I do run the macro directly on the file '*_ps.tex', I am
running one file with the three 'Exe' lines. And the 'Wait for Execution to finish' box is checked for all of
them. I was trying to achieve the same when running from the file '*_body.tex'. Instead of the three lines,
I can also write the name of the macro that contains the three lines, with the same result: latex works,
dvi2ps does not.

I thought of the filename possibility mostly because I could think of nothing else, which I still cannot.
(The .dvi file looks OK, btw.) Is there a way to see what dvi2ps tries to do, and what it complains about, when
I run the macro on '*_body.tex'?

Thanks again.
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 4:07 PM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> Given all the effort already put into this (not only by me), it
> seems a shame not to add the last tiny push that would make the
> following macro work --- a macro written collaboratively by
> David and Alex.
>
> DosToUnix("%p\%n%t",0);
> FindInString( "%!0", "_body\.tex", 1, 2, 1);
> ReplaceInString( "%!0", "_ps", %!1, %!2, 1, 3);
>
> Assign('Main_File','%!F');
> SetMainFile('%!3');
> Exe('%B\Exec\MiKTeX\LaTeX.edt');
> Exe('%B\Exec\MiKTeX\dvi2ps.edt');
> Exe('%B\Exec\ps2pdf.edt');
>
> SetMainFile("%$(|Main_File|);");   // Reset the Main File
>
> The first three lines produce the new file name. The next two
> change the main file (I don't think that I normally have a main
> file; I could not find what a main file is from Macros.txt, but
> I guess it's got to do with projects).

Macros.txt is completely obsolete and out of date (and
non-existent since WinEdt 5.4). For years now WinEdt comes with
HTML Help and indexed macro manual (with no reference to
Macros.txt in the default settings). Try to restore the default
Help Menu (even in 5.4 the macro manual is there). You don't
even know what you are missing there:-)

> Then comes my piece, the executables. LaTeX works OK, but then
> I get the error message 'dvi2ps failed to create a ps file. For
> possible explanations ...'. All commands work well when running
> them directly (as a macro) from the file stored in 3. My guess
> is that dvi2ps tries to run on the wrong file, but I don't know
> how to check that (error message notwithstanding, the only log
> file I know of is from Latex, and it does not help), nor how to
> fix it. If you could fix this me, I would be very happy.

All three macros run executables on the Main File. Thus I
seriously doubt that this (filename?) is a problem.

Start Options -> Execution Modes and check if Wait for
Execution to Finish option is enabled for all of the above
items. The problem could be that ps2pdf starts before latex is
done and it is thus doomed to fail. OK?

When you say that macros work directly on the file you probably
mean one by one and not as a sequence (like in the above
script). Correct?

> Of course, I could also use a 'Run' command, except that I do
> not understand how the command line should look in order to run
> a given macro on a given file. (What is worse, I think that I
> do not understand how to use the 'help' to figure such things
> out, as I spent quite some time looking through the help files,
> but without success.)

Run cannot execute WinEdt macros. It calls Windows executables
or batch files (which is what the above macros eventually do).
If you know what to type at the command prompt then you know
what to put inside the Run macro -- it is that easy!

Again, your problem might be that you are not aware of the new
documentation (starting in WinEdt 5.4!) and you might be trying
too hard to decipher secrets of macro language from old, bad,
and obsolete documentation that should not even be there (but
it is if you upgraded over older WinEdt and preserved ALL your
menus -- never a good idea as it leaves you with a severely
crippled version of WinEdt).

Best regards,

alex

Nicolae Garleanu | 14 Aug 03:55

RE: registry problem

I actually have another detail. The error messages I get --- now I get one even for latex, i.e., 'latex failed
to create a dvi file' --- does not mean that the dvi file does not get created. In fact, dvi and ps files are
generated, though not the pdf file. Again, no issue running the 3-line macro directly on the '*_ps.tex' file.
It appears increasingly likely that the issue has to do with something specific to my set-up, and the way I
changed it inadvertently as I was trying to fix my issues.
Nicolae

-----Original Message-----
From: WinEdt Team [mailto:support <at> winedt.com]
Sent: Wednesday, August 13, 2008 4:07 PM
To: winedt+list <at> wsg.net
Subject: Re: [WinEdt] registry problem

> Given all the effort already put into this (not only by me), it
> seems a shame not to add the last tiny push that would make the
> following macro work --- a macro written collaboratively by
> David and Alex.
>
> DosToUnix("%p\%n%t",0);
> FindInString( "%!0", "_body\.tex", 1, 2, 1);
> ReplaceInString( "%!0", "_ps", %!1, %!2, 1, 3);
>
> Assign('Main_File','%!F');
> SetMainFile('%!3');
> Exe('%B\Exec\MiKTeX\LaTeX.edt');
> Exe('%B\Exec\MiKTeX\dvi2ps.edt');
> Exe('%B\Exec\ps2pdf.edt');
>
> SetMainFile("%$(|Main_File|);");   // Reset the Main File
>
> The first three lines produce the new file name. The next two
> change the main file (I don't think that I normally have a main
> file; I could not find what a main file is from Macros.txt, but
> I guess it's got to do with projects).

Macros.txt is completely obsolete and out of date (and
non-existent since WinEdt 5.4). For years now WinEdt comes with
HTML Help and indexed macro manual (with no reference to
Macros.txt in the default settings). Try to restore the default
Help Menu (even in 5.4 the macro manual is there). You don't
even know what you are missing there:-)

> Then comes my piece, the executables. LaTeX works OK, but then
> I get the error message 'dvi2ps failed to create a ps file. For
> possible explanations ...'. All commands work well when running
> them directly (as a macro) from the file stored in 3. My guess
> is that dvi2ps tries to run on the wrong file, but I don't know
> how to check that (error message notwithstanding, the only log
> file I know of is from Latex, and it does not help), nor how to
> fix it. If you could fix this me, I would be very happy.

All three macros run executables on the Main File. Thus I
seriously doubt that this (filename?) is a problem.

Start Options -> Execution Modes and check if Wait for
Execution to Finish option is enabled for all of the above
items. The problem could be that ps2pdf starts before latex is
done and it is thus doomed to fail. OK?

When you say that macros work directly on the file you probably
mean one by one and not as a sequence (like in the above
script). Correct?

> Of course, I could also use a 'Run' command, except that I do
> not understand how the command line should look in order to run
> a given macro on a given file. (What is worse, I think that I
> do not understand how to use the 'help' to figure such things
> out, as I spent quite some time looking through the help files,
> but without success.)

Run cannot execute WinEdt macros. It calls Windows executables
or batch files (which is what the above macros eventually do).
If you know what to type at the command prompt then you know
what to put inside the Run macro -- it is that easy!

Again, your problem might be that you are not aware of the new
documentation (starting in WinEdt 5.4!) and you might be trying
too hard to decipher secrets of macro language from old, bad,
and obsolete documentation that should not even be there (but
it is if you upgraded over older WinEdt and preserved ALL your
menus -- never a good idea as it leaves you with a severely
crippled version of WinEdt).

Best regards,

alex


Gmane