Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (1 of 39), Read 119 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Tuesday, April 13, 2004 09:18 PM

Hello,

First and foremost a big thank you to Christian for his update of C-INIT.VDM, which works perfectly well for me, after an adjustment. This adjustment was made by Fritz, in order to run his yap.vdm. To be sure this adjustment is a small price to pay for the "inverse search" feature, which I gain.

To be specific, I am uploading my file, c-init_pr.vdm. First, I would like to make it explicit that such an adjustment is needed. So, I am asking Christian and Fritz to make an additional note in their Latex.vcs file saying that c-init.vdm indeed has to be adjusted.(May be I am overlooking something ?)

Second, I would like to minimize this adjustment. This is a vague and open ended question. For example, would it be possible to assign user registers in addition to the 20 odd Text registers used by the macro? If so, then Fritz would have to rewrite his temporary file routine in yap.vdm to T-reg routines. I just do not know how much time would this take.

Somehow, I just feel uneasy about my solution which consisted of inserting Fritz's code at lines 492-496, I believe.


Looking forward to hearing your reactions.

-peter.

 
latex.vcs adjuste c-init.vdm

 


Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (2 of 39), Read 95 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Wednesday, April 14, 2004 02:14 PM

Christian and Fritz:

I did some more thinking about this adjustment problem.
Then, I came up with a surprisingly simple answer:

Specifically, I have moved the Heberlein code from c-init.vdm to the :COMPILE: subroutine of the latex.vcs
file. In other words, I have made the adjustment on your latex.vcs file and left the c-init.vdm file untouched.

Although, I did not have a chance to give my adjustment a thorough testing, it seems to work me. I hope, that this will save some editing for Fritz, when he updates from 6.12beta to 6.12.1.

I am uploading my adjusted latex.vcs, which I called latex_par.vcs.

Looking forward to hearing your reactions.

-peter.

 
Adjusted latex.vcs;original c-init.vdm

 


Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (3 of 39), Read 100 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Wednesday, April 14, 2004 03:51 PM

Peter,

i have studied your solution: it is superior to the current one, since it makes it superfluous to edit c-init.vdm on every update.

As far as I can understand the complex interactions of c-compil.vdm, c-init.vdm, and latex.vcs,

c-compil.vdm

(1) calls c-init.vdm

which does, inter alia,

Reg_Set(96,PATHONLY)
Reg_Set(85,FILEONLY)

[** at this point the file_ / path_name would be saved until now into lastfile.txt / lastpath.txt]

...and returns to c-compil

(2) calls latex.vcs :compile:

** in the future, we will save @96 and @85 here ...

... provided Christian doesn't tell us that we are complete fools!

Fritz

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (4 of 39), Read 101 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, April 14, 2004 04:12 PM

Fritz, Peter:

On Wed, 14 Apr 2004 15:51:00 -0400, Fritz wrote:

>As far as I can understand the complex interactions of c-compil.vdm,
>c-init.vdm, and latex.vcs,
> [...]

Your description is correct!

Perhaps it would be possible to use T-Regs instead of files to store
your values (like Peter suggested), but since those macros are really
complex to modify, I would still use the files for now.


>... provided Christian doesn't tell us that we are complete fools!

Hey, have I ever done that? No. ;-)

I really like it to see both of you learning more and more about
VEDIT's macro language!

Christian

 


Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (5 of 39), Read 98 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Thursday, April 15, 2004 10:49 AM

On 4/14/2004 3:51:10 PM, Fritz Heberlein wrote:
>Peter,
>

>(2) calls latex.vcs :compile:
>
>** in the future, we will save
>@96 and @85 here ...

Thanks Fritz,

Bad news. I have purged my old files and now my idea does not work, after all!

I have also commented out my changes and I get the same error message. I am uploading my file, latex_check.vcs,
which contains the exact error message.

So far as I can tell, the only differences between your old 2002 latex.vcs file and my present latex_check.vcs file, are the comments. But then they should be functionally equivalent? They are not. Your old latex.vcs file just works like a charm! Mine does not work at all.

May be, before we continue working on this problem, we should ask Christian to write another file compare macro which would ignore comments. Well, may be we should ask Fritz, since he already showed Scott how to ignore Latex commands. In fact, more recently, he wrote a macro how to
exclude Latex stuff from the word count.

Looking forward to hearing your reactions.

-peter

 


Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (6 of 39), Read 93 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Thursday, April 15, 2004 11:01 AM

OOPS,
Once again I had trouble uploading.
I try again;

 
ltx.vcs diagnostics;placing the F.H.code

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (7 of 39), Read 90 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, April 15, 2004 01:17 PM

On Thu, 15 Apr 2004 10:49:00 -0400, Peter Rejto wrote:

>Bad news. I have purged my old files and now my idea does not work, after all!
>
>I have also commented out my changes and I get the same error message. I am
>uploading my file, latex_check.vcs,
>which contains the exact error message.

Peter:

Here a quote of some lines of your macro:

// (Moved the Heberlein code from c-init.vdm to lines 32--37;
// i.e. moved the code to the :COMPILE: subroutine.)
// REJTO CHANGE COMMENTED OUT! STILL GETTING ERROR MESSAGE:
// MACRO ERROR IN 99 -
// INVALID COMMAND: subroutine )

Those few lines contain the error. :-)
I ran into a similar one last year or so...

It's the second line:
It has a ":COMPILE:" in it which is interpreted as label!
After the Call("COMPILE") VEDIT searches for the first fitting label
and finds it above. Then it tries to execute the directly following
word "subroutine", and that is an invalid command.

Tip: Never use a string looking like a (really used) label where it is
not meant as label. Even in comments or other strings.
VEDIT parses the macro without special checking (to be fast IMHO) to
find the label.


>May be, before we continue working on this problem, we should ask Christian to
>write another file compare macro which would ignore comments.

That wouldn't have been a good idea in this special case. ;-)


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (8 of 39), Read 94 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Thursday, April 15, 2004 04:23 PM

> It's the second line:
> It has a ":COMPILE:" in it which is interpreted as label!

I had removed that comments before testing the new version and
therefore didn't run into this error.

Besides the "} - problem", this seems to be another point that
deserves mentioning in the "debugging macros" section of the manual.

Fritz


--
Dr. Friedrich Heberlein, Akad. Direktor
Seminar für Klassische Philologie, KU Eichstaett-Ingolstadt
Universitaetsallee 1
D-85071 Eichstaett / Bayern

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (9 of 39), Read 101 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Thursday, April 15, 2004 04:29 PM

At 04:24 PM 4/15/2004, you wrote:

>Besides the "} - problem", this seems to be another point that
>deserves mentioning in the "debugging macros" section of the manual.

Yes, I will add this to the to-do list.

Ted.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (10 of 39), Read 93 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Friday, April 16, 2004 05:53 AM

On 4/15/2004 4:23:37 PM, Fritz Heberlein wrote:
>> It's the second line:
>> It has a ":COMPILE:" in it which is interpreted as label!
>
>I had removed that comments
>before testing the new version
>and
>therefore didn't run into this
>error.

Thanks Fritz,

Now, I would like to give you a progress report:


I have edited my file, as per the instructions of Christian.
Then, I renamed the edited file to latex.vcs. It seems to be working fine.

Incidentally, I looked at your second note in the 2003 edition. It is a nice extension of your previous note on latex errors versus warnings.

Once again, a big thank you for making the "inverse search" possible in Vedit.



-peter.

 


Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (11 of 39), Read 79 times, 3 File Attachments
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Friday, April 16, 2004 06:51 PM

On 4/14/2004 3:51:10 PM, Fritz Heberlein wrote:
>Peter,


>As far as I can understand the
>complex interactions of
>c-compil.vdm, c-init.vdm, and
>latex.vcs,
>
>c-compil.vdm
>
>(1) calls c-init.vdm
>
> which does, ...
>
> ...and returns to c-compil
>
>(2) calls latex.vcs :compile:


Thanks Fritz,

I am back to studying your message. It is certainly nice to have Christian's approval on this complex issue.

So, I thought to incorporate these comments into latex.vcs.
I am uploading the commented version, which I called latex_pr.vcs.

Actually, I also tacked on a possible diagnostic code of my own. It very closely follows yours. Well, you use your temporary files to transmit parameters between programs. I would like to use them to report parameters for diagnostic purposes.

Eventually, I would like to be able to compile latex files with possibly none .tex extensions. So, it would be a real help for me, if this documentation would be on the latex.vcs file, when I need it.

At the same time, please feel free to incorporate as many or as few of my suggestions as you wish. After all, it is your program and you have to feel comfortable with it.

Thanks,

-peter.

 
pr-commented version of latex.vcs
  pr-commented version of latex.vcs
  pr-commented version of latex.vcs

 


Topic: 6.12 Latex.vcs adjusted C-INIT.VDM (12 of 39), Read 70 times, 2 File Attachments
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Friday, May 28, 2004 06:28 PM

On 4/16/2004 6:51:18 PM, Peter Rejto wrote:

>Eventually, I would like to be able to
>compile latex files with possibly none
>.tex extensions.

Cristian and Fritz:

Finally, I did succeeded in enhancing your macros to do this. That is to say, to compile tex files with possibly non .tex extensions. (My unix compiler does this routinely.)

My adaptation was really minor: First, as per the c-init.vdm comments, I used T-reg 83 for the .vcs file. Specifically, I entered
Reg_Set(83, EXT_ONLY)
in that file, shortly after the Reg_Empty(83) command. Second, I replaced .tex by .|@(83) in the latex.vcs file.
Third, I did some editing of that file. In particular, I added a History section and tried to incorporate Fritz's comments in this thread about the interactions between this family of macros. It is certainly much easier to describe this interaction on the program level than on the T-reg level, where the various subroutines are loaded.

I am uploading my macros and looking forward to hearing your reactions.

-peter.

 
Enhanced latex.vcs
  c-init.vdm for enhanced latex.vcs

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (13 of 39), Read 63 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Saturday, May 29, 2004 11:05 AM

Peter:

On Fri, 28 May 2004 18:28:00 -0400, you wrote:

>Finally, I did succeeded in enhancing your macros to do this. That is to say,
>to compile tex files with possibly non .tex extensions.
>
>My adaptation was really minor: First, as per the c-init.vdm comments, I used
>T-reg 83 for the .vcs file.

Your modifications look o.k.
(But haven't tested it due to my lack of Tex.)

That improves the flexibility of those macros. Good!

I see you are becoming more and more familiar with the macro language!


>... I added a History section and tried to incorporate Fritz's comments ...
>
> Here the exact name of the "COMPXXX".VDM
>-macro could not be spelled out since it is also the name of a label and
>-leads to an error message.

That's a bit too hard! ;-)
The word COMPILE is allowed in the comments, even if it is used as
label elsewhere!
But you must not add the colons around it like :COMPILE:
THEN Vedit interprets it as label and may get confused.

Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (14 of 39), Read 63 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Tuesday, June 01, 2004 11:25 AM

On 5/29/2004 11:05:53 AM, Christian Ziemski wrote:
>Peter:

>>... I added a History section and tried to incorporate Fritz's comments ...
>>
>> Here the exact name of the "COMPXXX".VDM
>>-macro could not be spelled out since it is also the name of a label and
>>-leads to an error message.
>
>That's a bit too hard! ;-)
>The word COMPILE is allowed in the
>comments, even if it is used as
>label elsewhere!
>But you must not add the colons around
>it like :COMPILE:
>THEN Vedit interprets it as label and
>may get confused.

Christian:

Thanks, I shall edit my history comments accordingly.


I also went back to C-INIT.VDM and did a little bit more studying. I learned something interesting: Specifically, I learned that the ADD_PROJECT subroutine puts the project filename extension into T-Reg 93. So, there is no need for me to duplicate this in T-Reg 83. (I simply can use T-Reg 93 in my adaptation of LATEX.VCS.)

I am sure glad to see that I do not have to make any command changes in C-INIT.VDM, in order to enhance LATEX.VCS. At the same time I did change to the comment on the usage of T-Reg 93: I expanded it to " Temporary and it can be used in .VCS for the project filename extension."

If you agree, I would appreciate your making a similar change in your copy. So, I would not loose the expanded comment on my next Vedit update.

I have two other cosmetic questions on C-INIT.VDM: First,I made a search on (83 in the file. My search showed only the string Reg_Empty(83). So, I concluded that T-Reg 83 is reset but not used. Accordingly, I would also change the comment on the usage of T-Reg 83, to: not used. Second, I studied the title line C-INIT.VDM. Do I understand it correctly: item refers to the C-COMPIL.VDM family of macros?

I do not know who put the comment "it can be used in .VCS" into this file. A big THANK YOU to him! This was the comment that allowed me to compile tex files with a possibly non .tex extension.

Incidentally, do you know of a C++ programmer who decided to be fussy. Then, not to call the extension of the file .c ?

Thanks for everything,

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (15 of 39), Read 63 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, June 01, 2004 04:09 PM

On Tue, 01 Jun 2004 11:25:00 -0400, Peter Rejto wrote:

>I also went back to C-INIT.VDM and did a little bit more studying.
>[...]
>I am sure glad to see that I do not have to make any command changes in
>C-INIT.VDM, in order to enhance LATEX.VCS. At the same time I did change to the
>comment on the usage of T-Reg 93: I expanded it to " Temporary and it can be
>used in .VCS for the project filename extension."
>
>If you agree, I would appreciate your making a similar change in your copy. So,
>I would not loose the expanded comment on my next Vedit update.

I can do that on my copy. But that wouldn't help. ;-)
It's not my macro, I only modified it a few times in the past...

But I'll later summarize our discussion and let Ted know about the
result. (With the updated macro(s) included.)


BTW: The supplied SAMPLE.VCS has the following comment in it:

// Usage: #97 and #100 thru #106 can be used as temporary variables
// T-Regs 83 and 96 can be used a temporary text registers
// Extra_Buffer_1 can be used as a temporary edit buffer

There is a typo in it:
T-Reg 96 is used for the project directory and isn't temporary, and
not usable in own VCS's!
It should read "T-Regs 83 and 93 can be used as ..."
(As you found out by yourself.)


>Second, I studied the title line C-INIT.VDM.
>Do I understand it correctly: item refers to the C-COMPIL.VDM
>family of macros?

C-INIT is called as INITialization macro from many Compiler macros
(If that was your question (I'm not sure).).


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (19 of 39), Read 59 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Thursday, June 03, 2004 09:37 AM

On 6/1/2004 4:09:37 PM, Christian Ziemski wrote:


>BTW: The supplied SAMPLE.VCS has the
>following comment in it:
>
>// Usage: #97 and #100 thru #106 can be
>used as temporary variables
>// T-Regs 83 and 96 can be used a
>temporary text registers
>// Extra_Buffer_1 can be used as a
>temporary edit buffer
>
>There is a typo in it:
>T-Reg 96 is used for the project
>directory and isn't temporary, and
>not usable in own VCS's!
>It should read "T-Regs 83 and 93 can be
>used as ..."
>(As you found out by yourself.)

Thanks Christian:

My problem is that I do not know what a temporary register means. (Please note that I do not have a programming background)

Therefore, I appreciate your spelling out for me that a given C-INIT.VDM register can or can not be used in .VCS.
It seems to me that is all I need to know about temporary registers?

I plan to incorporate it into my version of LATEX.VCS together with the other useful information that you have given me. (I would like to have the option of adding the expanded compiler command to temp.vcs) However, I have to study them first.

Thanks again,

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (21 of 39), Read 56 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, June 03, 2004 02:53 PM

On Thu, 03 Jun 2004 09:37:00 -0400, Peter Rejto wrote:

>My problem is that I do not know what a temporary register means.

"Temporary register" usually means that it is used only in a short
part of the code.
For example as counter in a loop or to put some text together.

So it can be re-used for another task elsewhere in the code (or in a
called macro).

Text register 93 is such an example in C-INIT.VDM.
First it holds "\" or "/" as devider in pathnames.
Later it's used in a Get_Input() to hold the project name.


Contrary there are the "normal" register. They are set sometime and
are used during the whole (or big part of the) macro.

But all that is relative, since the latter are temporary too:
At least when VEDIT is closed, they are also gone.. ;-)

But that's exactly it: "Temporary" is relative...


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (34 of 39), Read 46 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, June 13, 2004 10:46 AM

On 6/1/2004 4:09:37 PM, Christian Ziemski wrote:

>
>BTW: The supplied SAMPLE.VCS has the
>following comment in it:
>
>// Usage: #97 and #100 thru #106 can be
>used as temporary variables
>// T-Regs 83 and 96 can be used a
>temporary text registers
>// Extra_Buffer_1 can be used as a
>temporary edit buffer
>
>There is a typo in it:
>T-Reg 96 is used for the project
>directory and isn't temporary, and
>not usable in own VCS's!
>It should read "T-Regs 83 and 93 can be
>used as ..."
>(As you found out by yourself.)

Thanks Christian:

I think I did find another typo: This file refers to COMPILE.VDM.(Now this macro loads the {Tool} menu?)
It should be C-COMPIL.VDM.

A possible update: SAMPLES.VCS mentions that from DOS a compiler also can be called via the Sys(" ",DOS)
command. This is a nice motivation for the Windows adjustment that is next.

Now I am re-reading WHATSNEW_612.TXT, which is very enthusiastic about the RUNSHELL.VDM option. I think that this option should also be mentioned here. May be this is the present preferred option? Since, as per this file, runshell does close the compiler DOS window, I certainly do prefer this feature.

Incidentally, I tried to program this DOS window closing in the Sys( ) command version and could not. Is it involved to do?

Oops. There is a possible other typo in WHATSNEW_612.TXT. Do I understand it correctly:RUNSHELL.VDM has been promoted from {User} status to {Misc} status?

Finally a very minor cosmetic suggestion to SAMPLE.VCS:
I would put the general string arguments into the pattern set of the search command. In other words, I would write
something like,

Search("{x,y,z}', etc, parameters)

(Sorry, I am away from my PC and can not check the exact syntax.) Do I understand it correctly: One of Fritz's difficulties in creating his LATEX.VCS was to find such strings for the latex/miktex compiler?

Finally, a big thank you for giving me the SAMPLES.VCS reference. Somehow, I completetly missed it.

-peter

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (35 of 39), Read 47 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Sunday, June 13, 2004 12:38 PM

On Sun, 13 Jun 2004 10:46:00 -0400, Peter Rejto wrote:

>I think I did find another typo: This file refers to COMPILE.VDM.
>(Now this macro loads the {Tool} menu?)
>It should be C-COMPIL.VDM.

In detail:
- COMPILE.VDM loads the Tools menu for the compiler support.
- If you start the compiler from the Tools menu, C-COMPIL.VDM is
executed which in turn calls C-INIT.VDM at the beginning
- C-INIT.VDM then loads the VCS file into T-Reg 99.


>Now I am re-reading WHATSNEW_612.TXT, which is very enthusiastic about the
>RUNSHELL.VDM option.

Huh? That's in the part "CHANGES FROM 5.10 TO 5.16" - very old.

>I think that this option should also be mentioned here.
>May be this is the present preferred option? Since, as per this file, runshell
>does close the compiler DOS window, I certainly do prefer this feature.

The RUNSHELL menu commands are not part of the compiler support!

>Incidentally, I tried to program this DOS window closing in the Sys( ) command
>version and could not. Is it involved to do?

Perhaps with: System("command", DOS+DELETE) ?


>Oops. There is a possible other typo in WHATSNEW_612.TXT. Do I understand it
>correctly:RUNSHELL.VDM has been promoted from {User} status to {Misc} status?

Yes, in the part "CHANGES FROM 5.16 TO 5.20" ...


>Finally a very minor cosmetic suggestion to SAMPLE.VCS:
>I would put the general string arguments into the pattern set of the
>search command. In other words, I would write something like,
>
>Search("{x,y,z}', etc, parameters)
>
>(Sorry, I am away from my PC and can not check the exact syntax.)

I don't understand. Please let us know the exact line in SAMPLE.VCS
you are referring to.


>Do I understand it correctly: One of Fritz's difficulties in creating
>his LATEX.VCS was to find such strings for the latex/miktex compiler?

Perhaps... Let's wait if he'll write a message too.


>Finally, a big thank you for giving me the SAMPLES.VCS reference.
>Somehow, I completetly missed it.

You are welcome.


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (36 of 39), Read 46 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Monday, June 14, 2004 06:15 AM

On 6/13/2004 12:38:36 PM, Christian Ziemski wrote:
>On Sun, 13 Jun 2004 10:46:00 -0400,

Thanks Crsitian:



>>Now I am re-reading WHATSNEW_612.TXT, which is very enthusiastic about the
>>RUNSHELL.VDM option.
>
>Huh? That's in the part "CHANGES FROM
>5.10 TO 5.16" - very old.

Humm?
I thought I just did something harmless by searching for the runshell macro in this text file.





>>Finally a very minor cosmetic suggestion to SAMPLE.VCS:
>>I would put the general string arguments into the pattern set of the
>>search command. In other words, I would write something like,
>>
>>Search("{x,y,z}', etc, parameters)
>>
>>(Sorry, I am away from my PC and can not check the exact syntax.)
>
>I don't understand. Please let us know
>the exact line in SAMPLE.VCS
>you are referring to.

Yes, of course ...
Let me start from the beginning.

Cosmetic suggestion for the comparison of the search commands on line 162 of SAMPLES.VCS and on line 23 of CL.VCS, respectively:


First, on line 162 replace the error string by the string coming from line 157. That is to say, by |{x,y...}
Second, move line 162 up to line 158, after the period. Third, replace the An example sentence by,
An example of such a search command is the one on line 23 of the CL.VCS file.

Oops: I do not know what to do with the Match Item sentence. I simply do not understand whether that sentence feeds into the search comparison issue or into the next issue.



Thanks for everything.

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (37 of 39), Read 48 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Monday, June 14, 2004 04:17 PM

On Mon, 14 Jun 2004 06:15:00 -0400, Peter Rejto wrote:

>Cosmetic suggestion for the comparison of the search commands on line
>162 of SAMPLES.VCS and on line 23 of CL.VCS, respectively:
>
>First, on line 162 replace the error string by the string coming
>from line 157. That is to say, by |{x,y...}
>Second, move line 162 up to line 158, after the period. Third,
>replace the An example sentence by,
>An example of such a search command is the one on line 23 of the
>CL.VCS file.

Aha, now I begin to understand what you mean.

But the "problem" is that SAMPLE.VCS is an example only...

As far as I can see Ted and Tom tried to pack it with comments, but it
can't be a template for every thinkable compiler case.
And it also can't be a complete tutorial for programming and/or for
regular expressions.
So there are compromises in the comments.
For example in your line 162 there is only a simple search, but in the
comments above there are hints about a more sophisticated way of
finding and handling errors (e.g. in CL.VCS, line 34 etc.).


>Oops: I do not know what to do with the Match Item sentence.
>I simply do not understand whether that sentence feeds into the
>search comparison issue or into the next issue.

It has to do with the Search(), but only if the search uses the
mentioned pattern code |{x,y,...}.
With Match_Item() you can find out which of the searched patterns
(x or y or ...) has been found by the Search().


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (16 of 39), Read 77 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Tuesday, June 01, 2004 05:34 PM

>I learned
>something interesting: Specifically, I
>learned that the ADD_PROJECT subroutine
>puts the project filename extension into
>T-Reg 93. So, there is no need for me to
>duplicate this in T-Reg 83. (I simply
>can use T-Reg 93 in my adaptation of
>LATEX.VCS.)

Peter and / or Christian:

i need some input from you to support the process of my enlightenment: where exactly is the extension put into @93?
I cant find it in the :add_project: section.

Thanks,

Fritz

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (17 of 39), Read 76 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, June 02, 2004 02:17 AM

On 6/1/2004 5:34:55 PM, Fritz Heberlein wrote:
>
>i need some input from you to support the process of my
>enlightenment: where exactly is the extension put into @93?
>I cant find it in the :add_project: section.

Line 612:

Reg_Set(93,EXT_ONLY) //to get the extension


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (18 of 39), Read 80 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Wednesday, June 02, 2004 04:45 AM



vedit-macros Listmanager am 2 Jun 2004, 2:17:

> Line 612:
>
> Reg_Set(93,EXT_ONLY) //to get the extension

I see. apparently, I had an outdated version of c-init. Thank you. I
tested Peter's new version of latex.vcs with the |@(93) replacement,
and it works well. Thank you Peter.

Fritz
--
Dr. Friedrich Heberlein, Akad. Direktor
Seminar für Klassische Philologie, KU Eichstaett-Ingolstadt
Universitaetsallee 1
D-85071 Eichstaett / Bayern

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (20 of 39), Read 75 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Thursday, June 03, 2004 01:38 PM

On 6/2/2004 4:45:17 AM, Fritz Heberlein wrote:


> I tested Peter's new version of
>latex.vcs with the |@(93)
>replacement,
>and it works well. Thank you
>Peter.

Fritz:

I made some more experiments with LATEX.VCS and stumbled across something interesting.

Specifically, by mistake, I have replaced the string .tex by the empty string in this file. To my surprise, the new LATEX.VCS file just worked fine! I certainly would appreciate your independent confirmation of this fact.

Then, I started to think why this should be the case. First, I realized that this fact is very much in agreement with the previous messages that you have sent me under a different thread. Do I remember it correctly: The gist of those messages was that the error messages should be independent of the filename extension? Well in an ideal situation, they should. Now, I can achieve such an ideal situation by removing the extension from the .log file. My other option is, to remove the extension from my search string. I believe, essentially, this is what I have done.

Actually, I think there is a hidden assumption in going from the "essential" to the "exact" statement. This is how I see it: Your search string is of the form |{x,y}, where x and y are shorthand for your strings. Now, if I remove a substring from the "middle" of a string than the string "breaks" into two. In other words, I no longer get a string. However, I was lucky and the substring .tex that I removed was at the end. So, I ended up with a substring of the original string. I have reduced my problem to a previously solved one.

If this reasoning holds water, then the previous register issue was a red herring. (Well, it is somewhat dangerous for me to try to make a precise reasoning in a field where I do not know the precise definitions.)

At the same time, I think of my time spent on studying C-INIT.VDM as well spent. In fact I would like to take up other LATEX.VCS issues:

First, there is the stylistic question of your using the two "last_....txt" temporary files. I have a hunch that using the EXTRA_BUFFER_1, as per Christian's suggestion one could write these two filenames into this buffer and saving this buffer into T-Reg 83. So, the real question would be to re-write your YAP.VDM in such a way that it should look for the "last" information in T-Reg 83. Since, I did not study your macro, I just do not know how much work would be involved.

Second, I noticed that if I put a trace command into my tex file and compiling it via Vedit, then I get a discrepancy between the tmp.vcs.tmp file ands the Miktex .log files. I did not have time to study this issue.

Looking forward to hearing your reactions.

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (22 of 39), Read 76 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Friday, June 04, 2004 01:35 PM

Peter,

unfortunately I don't have time to get into all that things right
now, but i will try to next week.

In the meantime, could you do me a favour, please:

1. what happens if you try to compile a file without extension? I get
an error message - of course, since the search syntax for errors

"S("|{|<|a:/|*.tex:|d ..." requires the existence of an file
extension. I have no idea how we could dispense with an extension.

2. what happens if you try to compile a file without extension, say
"alpha", if there exists a file "alpha.tex" as well?

3. could you load up please your latex.vcs in its final (or present)
form

> Second, I noticed that if I put a trace command into my tex file and
> compiling it via Vedit, then I get a discrepancy between the
> tmp.vcs.tmp file ands the Miktex .log files.

This is true. Some parts of the *.log file are swallowed by the
redirection - i never was able to understand why. But as a rule, this
concerns the initial messages about packages and fonts loaded only,
so I never have cared about that. A workaround might be to copy
"file.log" to vcs.tmp and at the same time to prevent the creation of
vcs.tmp in the :compile: section.

Fritz

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (23 of 39), Read 78 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Saturday, June 05, 2004 09:57 AM

On 6/4/2004 1:35:57 PM, Fritz Heberlein wrote:
>Peter,

Thanks Fritz:


>In the meantime, could you do
>me a favour, please:

Let me do the actual experiments later. Let me just give you my "top of the head reactions:.

>since the search syntax for
>errors
>"S("|{|<|a:/|*.tex:|d ..."
>requires the existence of an
>file
>extension. I have no idea how
>we could dispense with an
>extension.

This is exactly why I was so surprised and sent you my message. I do not know the answer! I can offer some mathematical mumbo jumbo. Do you believe in them?
Anyway here it is: I always have the option of searching for a substring instead of the original one. If I am lucky I end up with the same answer. Since ".tex" was at the end and since we talk about filenames without extensions I should be lucky. In other words, the real question is to explain why I am lucky in this case.

Another way of saying this, would be: If I choose my substring to be the empty string, then I am not searching at all. So, I killed the problem. In this case, I left out only a small part of my string so, I should not be extremely unlucky. Now there are many cases between these two extreme cases. I really, can not give a good explanation why I ended up in the other extreme situation.(I would have to seriously study your previous messages. At the same time, I feel, that somehow the gist of them is that extensions don't count anyway.)
>
>3. could you load up please
>your latex.vcs in its final
>(or present)
>form
>

I am doing other experiments as well, so my files are little bit disorganized. I shall come back to this soon.

>> Second, I noticed that if I put a trace command into my tex file and
>> compiling it via Vedit, then I get a discrepancy between the
>> vcs.tmp.vcs. file ands the Miktex .log files.
>
>This is true. Some parts of
>the *.log file are swallowed
>by the
>redirection - i never was able
>to understand why. But as a
>rule, this
>concerns the initial messages
>about packages and fonts
>loaded only,
>so I never have cared about
>that. A workaround might be
>to copy
>"file.log" to vcs.tmp and at
>the same time to prevent the
>creation of
>vcs.tmp in the :compile:
>section.


As you see, I am having surprises and sometimes I have trouble distinguishing reality from virtual reality. Therefore, I appreciate your verifying this fact. At present, I am not ready to talk about work around. If I understand you correctly, this issue is not restricted to Latex?

Thanks again,

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (24 of 39), Read 90 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Saturday, June 05, 2004 05:30 PM

On 6/4/2004 1:35:57 PM, Fritz Heberlein wrote:
>Peter,

>In the meantime, could you do
>me a favour, please:
>
>1. what happens if you try to
>compile a file without
>extension? I get
>an error message - of course,
>since the search syntax for
>errors
>
>"S("|{|<|a:/|*.tex:|d ..."
>requires the existence of an
>file
>extension. I have no idea how
>we could dispense with an
>extension.

Exactly! More specifically, I have renamed a latex file to ftest (without the dot). Then I texed it via LATEX.VCS. I got the error message

can not find |40|a:/|*.





I have also texed it vis {Misc}{Save and run..} by entering latex ftest . The response was,

can not find ftest.tex.....
enter another file name.


>
>2. what happens if you try to
>compile a file without
>extension, say
>"alpha", if there exists a
>file "alpha.tex" as well?

I am answering your message from my unix machine. Sorry I forgot about this option. My guess is that looking for alpha.tex is a Knuthian turn and Vedit is unaware of it.
Incidentally, I have downloaded the file texbook.tex. However, I do not know how would I search for this one. Any suggestions?


>3. could you load up please
>your latex.vcs in its final
>(or present)
>form
>

I shall try to upload latexpr2.vcs and latexpr3.vcs. The relevant one is the first. The second one shows the stuff I am working on now. Your suggestions are most welcome.

I take your questions were model questions only. You would like to know exactly what is the command that the "COMPILE" subroutine of LATEX.VCS sends to the Miktex. I would love to have this prepended or appended to the file vcs.tmp.
I also have a hunch that we are pretty close to it. The T-Reg containing it is described in C-INIT.VDM. Christian also told us that the Extra_Buffer_1 is user editable. I just can not put the things together.


Looking forward to hearing from you.

-peter

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (25 of 39), Read 88 times, 2 File Attachments
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Saturday, June 05, 2004 05:46 PM

I try the upload again. Here we go,

 
For compiling tex files with any ext.
  For compiling tex files with any ext.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (26 of 39), Read 102 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Sunday, June 06, 2004 06:06 AM

On Sat, 05 Jun 2004 17:30:00 -0400, Peter Rejto wrote:

>[Fritz wrote:]
>>"S("|{|<|a:/|*.tex:|d ..."
>>requires the existence of an file extension. I have no idea how
>>we could dispense with an extension.

Is that the correct version with hard coded ".tex" ?

In your modified LATEX.VCS it reads

S("|{|<|a:/|*.|@(83):|d,...

(or for HTML-display S("|{|<|a:/|*.|@(83):|d,.... )

>Then I texed it via LATEX.VCS. I got the error message
>can not find |40|a:/|*.

What should that "|40" mean? Is that a typo in LATEX.VCS?


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (29 of 39), Read 100 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, June 06, 2004 04:04 PM

On 6/6/2004 6:06:19 AM, Christian Ziemski wrote:
>On Sat, 05 Jun 2004 17:30:00 -0400,
>Peter Rejto wrote:
>
>>[Fritz wrote:]
>>>"S("|{|<|a:/|*.tex:|d ..."
>>>requires the existence of an file extension. I have no idea how
>>>we could dispense with an extension.
>
>Is that the correct version with hard
>coded ".tex" ?
>
>In your modified LATEX.VCS it reads
>
> S("|{|<|a:/|*.|@(83):|d,...
>
>(or for HTML-display
>S("|{|<|a:/|*.|@(83):|d,.... )
>
>>Then I texed it via LATEX.VCS. I got the error message
>>can not find |40|a:/|*.
>
>What should that "|40" mean? Is that a
>typo in LATEX.VCS?

Thanks Christian:

I shall check my LATEX.VCS. Recently, I have been using quite a few versions of LATEX.VCS so it could be a typo. On the other hand, everything else is working fine.

Also, I tried to upload a file in my previous message, but could not. Let me try again:

Thanks again,

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (30 of 39), Read 105 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, June 06, 2004 04:12 PM

Let me try the upload again:

 
LATEX.VCS diagnostic file

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (31 of 39), Read 103 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Sunday, June 06, 2004 05:57 PM


>[Fritz wrote:]
>>"S("|{|<|a:/|*.tex:|d ..."
>>requires the existence of an file extension. I have no idea how
>>we could dispense with an extension.

>Is that the correct version with hard coded ".tex" ?

This is the original latex.vcs. Peter suggested to replace it by
|@(93), the Treg, which the file extension is written at by c-
init.vdm.
This is an important improvement, since we are now able to compile
TeX
files that have a different extension from *.tex.

As a rule, (La)TeX expects an extension *.tex, but when compiling
additional packages, it may expect *.dtx and *.ins as well. This can
be handled with the improved version.

As far as I can see, latex.vcs, even in its new shape, cannot compile
files without extension. The collocation
"[extension]:[line number]" is the only reliable identifier for locating errors.

But this wont worry anybody who is willing to conform to LaTeX< conventions, i.e. not to use files without extension ...

To sum up, the modified search string

"S("|{|<|a:/|*.|@(93):|d ..."

enables us to compile anything that is legal in the "real" TeX world.
Personally, I'm happy with Peter's improvement, and for those who are
not we should put a note into latex.vcs to the effect that
a version which can stand in the wolkenkuckucksheim-TeX-world is
still to come ... :))

Fritz

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (32 of 39), Read 101 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Friday, June 11, 2004 04:13 PM

On 6/6/2004 6:06:19 AM, Christian Ziemski wrote:
>On Sat, 05 Jun 2004 17:30:00 -0400,
>Peter Rejto wrote:


>>Then I texed it via LATEX.VCS. I got the error message
>>can not find |40|a:/|*.
>
>What should that "|40" mean? Is that a
>typo in LATEX.VCS?


Thanks Christian:


I did check LATEX.VCS and I did find the relavant line.

Specifically, the "FINDERROR" subroutine has three search commands. This comes from the third one. I also checked the character 40 . It is the ASCII code for the left round brace ( . Since the name of the subsubroutine, where it comes from, is RUNAWAY ARGUMENTS, the pieces seem to fit together.

I also tried to trace the first "S( )" command. It is similar to the "Search( )" command in SAMPLES.VCS inasmuch as they both have the same arguments. However, I could not trace the other two "search" commands. I take that Fritz put them there and I am looking forward to hearing from him. Thanks Fritz.

-peter

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (33 of 39), Read 107 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Friday, June 11, 2004 04:39 PM

On Fri, 11 Jun 2004 16:13:00 -0400, Peter Rejto wrote:

>On 6/6/2004 6:06:19 AM, Christian Ziemski wrote:
>>What should that "|40" mean? Is that a typo in LATEX.VCS?
>
>I did check LATEX.VCS and I did find the relavant line.
>
>Specifically, the "FINDERROR" subroutine has three search commands. This comes
>from the third one. I also checked the character 40 . It is the ASCII code for
>the left round brace ( .

Ouch, I forgot about that pattern code. :-|40

>Since the name of the subsubroutine, where it comes
>from, is RUNAWAY ARGUMENTS, the pieces seem to fit together.

Good! Sorry for the confusion!


Christian

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (38 of 39), Read 89 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Monday, June 14, 2004 06:45 PM

>What should that "|40" mean? Is that a
>typo in LATEX.VCS?


Sorry for my slow response - i was away from work for a couple of days.

I had to replace a "(" by that code, since vedit refused to accept the "(" for some reason i never have been able to figure out. Strangely enough, in the "Warnings" section is the same "(" which marks the beginning of the name of the file actually compiled by TeX), and Vedit doesn't feel offended by it ... :)

Peter, you might want to try it yourself: simply replace the "|40" and watch what happens.

Fritz

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (39 of 39), Read 100 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Monday, June 14, 2004 07:36 PM

Thanks Fritz:

Do I understand it correctly: The purpose of your experiment was to send Vedit on a Mission Impossible and watch the error messages?

In other words, if we try to Tex the FTEST file and there is no FTEST.TEX in the search path of the Latex/Miktex compiler, we know what happens. The compiling process does stop. In this case the FTEST.LOG file contains more information and this should be displayed.

Actually, I learned something interesting: Specifically, I learned that Vedit understands the compiler error messages very well. I also found out that she puts them into the Extra_Buffer_1, which is user editable, as we learned from Christian. I found this out by simple experimentation. I have a hunch that there is a simple way of getting the compiler error messages from Vedit. I am just missing it.

-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (27 of 39), Read 83 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, June 06, 2004 03:00 PM

On 6/5/2004 5:30:45 PM, Peter Rejto wrote:
>On 6/4/2004 1:35:57 PM, Fritz Heberlein
>wrote:
>>Peter,
>
>>In the meantime, could you do
>>me a favour, please:
>>
>>2. what happens if you try to
>>compile a file without
>>extension, say
>>"alpha", if there exists a
>>file "alpha.tex" as well?
>
>I am answering your message from my unix
>machine. Sorry I forgot about this
>option. My guess is that looking for
>alpha.tex is a Knuthian turn and Vedit
>is unaware of it.

Fritz,

I did the experiment for this case. I have also looked at Christian's message. So, may be I should backtrack and give my parameters first: I am using LATEXPR3.VCS, that is to say I have overwritten my LATEX.VCS file by this one.

I have also replaced your alpha.tex by ftest.tex, which is a little bit more specific, on account of the "f".

So, I saved ftest.tex as ftest. (Here the . refers to the English sentence and not to the filename.) Then I compiled it the usual way. No problem! It seems that Vedit ignored ftest altogether and compiled ftest.tex.

Note that my above conjecture is dead wrong! Especially, I was wrong guessing the way Vedit handles Knuthian prompts.
Actually, Vedit knows very well, how to handle compiler errors, whether Knuthian or not! I found this out by re-doing the more interesting case of no ftest.tex file in the path of the Miktex compiler. So, let me re-do this part of my report in a new message.


-peter.

 


Topic: Re: 6.12 Latex.vcs adjusted C-INIT.VDM (28 of 39), Read 84 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Sunday, June 06, 2004 03:45 PM

On 6/5/2004 5:30:45 PM, Peter Rejto wrote:
>On 6/4/2004 1:35:57 PM, Fritz Heberlein
>wrote:
>>Peter,
>
>>In the meantime, could you do
>>me a favour, please:
>>
>>1. what happens if you try to
>>compile a file without
>>extension? I get
>>an error message - of course,
>>since the search syntax for
>>errors
>>
>>"S("|{|<|a:/|*.tex:|d ..."
>>requires the existence of an
>>file
>>extension. I have no idea how
>>we could dispense with an
>>extension.
>
>Exactly! More specifically, I have
>renamed a latex file to ftest (without
>the dot). Then I texed it via LATEX.VCS.
>I got the error message
>
>can not find |40|a:/|*.

Fritz,

I have redone this experiment. I am reading Christian's message as well. So, may be first I should backtrack and give you my parameters. I am using LATEXPR3.VCS under the additional hypothesis that there is no ftest.tex file in the path of the Miktex compiler.

I have learned that Vedit knows very well, how to handle compiler error messages. She puts them into the EXTRA_BUFFER_2. I also learned how to access this buffer.

Here are the specifics: When I try to compile ftest a Vedit Compiler Support Error dialog box opens with the messages;


An unexpected error..


[Continue]

[Debug] (for experienced users)

Then a window with;

Miktex-latex--src-specials--
(I believe this is an "expanded compiler command")

CANNOT FIND: |40\a:/*.


Choosing first [debug] then the "v" option, opens EXTRA_BUFFER_2. There I found the Knuthian message,
can not find ftest.tex or something like that. I could save this buffer and I called it FTEST_101.TMP. (I believe that 101 is the number of XB2.) I am uploading this file.

I remember, I had such a situation before and of course the [Debug] "for experinced users" option really scared me. So, I would prefer an additonal option like,

[Open EXTRA_BUFER_2] "for unexpected compiler errors"


Looking forward to hearing from you.

-peter.