If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Needs help in constructing an amslatex.vdf file.

Scott,

A big thank you for latex2e.vdf.

Now I would like to construct an amslatex.vdf file.
First, I would like to try a strategy, similar to the on used to construct the larex2e.vdf file.
In other words, look for an amslatex manual in the Miktex 2.9 documentation. I found two files which are good candidates.

My problem is that they are in .pdf format. So, my question is, can you extract latex commands from a .pdf file ?

Vedit will of course load a pdf file, but what you see makes no sense. As you may know, the format is based on PostScript. Writing a macro to decode that is way above pay scale

In my version of Acrobat Reader, there is in the File menu, an option to "Save as text". So I opened the Vedit User Manual from within Vedit, and used this option, and I did get a text file with absolutely no formatting, just the words.

The other option if not too many pages is you can highlight pages and right-click to copy and then paste into Vedit.

In my version of Acrobat Reader, there is in the File menu, an option to "Save as text". So I opened the Vedit User Manual from within Vedit, and used this option, and I did get a text file with absolutely no formatting, just the words.

Scott

Hi Scott,

I have a hunch that in the Vedit Macro Language Reference manual the Vedit commands have an "( )" string right after the command.

Now my question is about your "extraction macro". In other words, I take that you used a macro to extract the latex commands from the Karl Berry file that I have sent you. My specific question is: In order to apply your macro do you need some formatting requirements ?

Actually, this leads to another question about latex2e.vdf. How complete is latex2e.vdf ? One possible source of missing a latex command is that I made a typo in preparing the truncated file for you. I had no choice, I had to meet the 19KB limit of the our bulletin board.
So, I did it by hand. I certainly would prefer to automate this procedure, but I can not. In short, could your macro handle the original Karl Berry file ?

So basically, I open a file to receive the extracted info, then I go to a line number close to where the info I need is located, then I search for my landmark,"* \", and then grab the letters that follow to the next separator, and then dump that word in the file I opened for that purpose. I have the line:

if(cur_line>=846) {break}

This breaks the loop once we have reached the last relevant line.

So basically to adapt this macro to your next text file, I just have to find my landmark and modify the lines that refer to line numbers.

I have no idea how complete latex2e.vdf is. You are the Latex expert here. What I don't know about Latex is a hole with no bottom. My suggestion is just use it awhile and if Scribe never flags a Latex word, it is complete for your purposes.

I have no idea how complete latex2e.vdf is. You are the Latex expert here. What I don't know about Latex is a hole with no bottom. My suggestion is just use it awhile and if Scribe never flags a Latex word, it is complete for your purposes.

Scott

Hi Scott,

A big thank you for sharing your rather sophisticated "extraction macro" with me.

About, the completeness of the latex2e.vdf file, I have the informal attitude that :
if it is good enough for MiKTex 2.9 then, it is good enough for me. In other words, it is the same attitude as yours. Only the words are different.

Now I would like to come back to your .pdf message. In short, I would like to come back to the vedit.vdf versus the Appendix F of the Vedit Language Reference Manual question. In my version of the Acrobat Reader I do not have the option of saving in .txt format.
However, I did succeed in copying page 1 of that Appendix to Vedit. Then I take, using clip-clatch I could copy the rest of that Appendix.

I learned that with the exception of two Vedit Commands, the commands were followed by the string ( ) . Without studying your macro, I believ that it should work for the string ( ) in place of the string \ . In other words, your extraction macro should give a bunch of Vedit commands. The question is, did I catch any new ones ?

I think the attached vedit.vdf is as complete as practically possible. Remember Ted is always adding new commands, parameters, etc. Besides that appendix is out of date anyways, it is version 6.0, we are up to 6.2.
If you encounter any missing stuff, it is very easy to just add it to the vedit.vdf file at that point. I say we have done what we can.

So basically, I open a file to receive the extracted info, then I go to a line number close to where the info I need is located, then I search for my landmark,"* \", and then grab the letters that follow to the next separator, and then dump that word in the file I opened for that purpose. I have the line:

if(cur_line>=846) {break}

This breaks the loop once we have reached the last relevant line.

So basically to adapt this macro to your next text file, I just have to find my landmark and modify the lines that refer to line numbers.

I have no idea how complete latex2e.vdf is. You are the Latex expert here. What I don't know about Latex is a hole with no bottom. My suggestion is just use it awhile and if Scribe never flags a Latex word, it is complete for your purposes.

Scott

Hi Scott,

You asked me before about my motivation for my word_find.vdm subroutine and your extension of it, the getword.vdm subroutine. So, I ended up at this message.

I have a hunch that latex2e.vdf is correct/complete with reference to the Berry Latex Commands of type (a) and with reference to the Berry file of latex2e.txt. That is to say, your conversion macro did copy all Latex commands of the form
\ followed by a string of letters from the Berry file latex2e.txt .

So, I would add this to the latex2evdf.txt file of the latex2e package. I would also add that the macro is included, so similar extractions can be made from similar files. Of course, feed backs are always appreciated.

Now, I would like to think about the possibility that a typo did sneak in. First, I was concerned about the Search("|S") versus the Search("|A"). In other words, may be one hits an _ after the \ and before the separator. Unlikely, but possible ? Now the Search("|A") in your getword subroutine takes care of this. Another possible typo would be
\begin{commands} versus \begin{command}. However, this is not of Berry type (a), so it is not in vedit.vdf.

In any case I would emphasize that the conversion is done by a macro and so human error is excluded.
(In fact, originally this was a concern of mine, since I had to do some editing of latex2e.txt to meet the forum.vedit.com size restrictions. )

Vedit will of course load a pdf file, but what you see makes no sense. As you may know, the format is based on PostScript. Writing a macro to decode that is way above pay scale

In my version of Acrobat Reader, there is in the File menu, an option to "Save as text". So I opened the Vedit User Manual from within Vedit, and used this option, and I did get a text file with absolutely no formatting, just the words.

The other option if not too many pages is you can highlight pages and right-click to copy and then paste into Vedit.