Thread: [Vim-latex-devel] Re: Your compiler/tex.vim plugin
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2003-01-20 05:08:53
|
Hello Artem, I am forwarding this to the vim-latex-devel group also because it is of interest. On Sun, 19 Jan 2003, Artem Chuprina wrote: > SA> i found out that the %f flag actually looks for a valid file, i.e if its > SA> not readable then it doesnt match. therefore the 'haha' thingie broke > SA> the parsing. however, sometimes things like this do happen in actual > SA> compilation: > > SA> [10] (file1 (badness 1000) file3 ( > > For badness such a message is impossible, because it is always a part of > underfull warning message. But I tried to fit other such possibilities > (actually unknown for me). Diff is attached. I'll send it to Bram after a > little more testing, so I'll thank you if you test this patch too and send me > a bugreport if you find bugs. > > SA> where the badness warnings occur because of improber \hbox placements. > SA> the following simple thing therefore seems to work around the problem: > > SA> > 1 \%+O(%f)%r, > > SA> %O(%*[^()])%r > > as is this does not help, because in this situation it was not this O who eats > closing parenthesis (line does not begin with opening parenthesis, so O does > not match). See the diff. > Thanks! I will test this. > SA> also, another thing which you might want to do in your makeprg setting > SA> is the following: > > SA> if has('win32') > SA> set &makeprg = 'latex -interaction=nonstopmode $*' > SA> endif > > SA> this is how miktex likes it. > > Well, I discovered that teTeX likes this too, so I changed makeprg to this > version. > This might be of quite a bit of interest to the vim-latex-devel people. Benji was concerned that the -interaction=nonstopmode (I thought it was --interaction but it looks like -interaction works too for miktex) will break tex compilers and that the \\nonstopmode is a better alternative. If it is true that most if not all latex compilers can handle -interaction style syntax, it will take care of the old backslash escaping problem once and for all.. > SA> yet another thingie which broke when i used it with bash/cygwin is that > SA> external programs get executed as following: > > SA> !bash -c "latex \\nonstopmode \\input\{thesis.tex\}" > > why not > > !bash -c 'latex \\nonstopmode \\input\{thesis.tex\}' > Yes... I guess I could have changed the value of shellquote. Vim guesses 'shellquote' to be " when I do :set shell=bash in my .vimrc... Srinath |
From: Benji F. <be...@me...> - 2003-01-20 13:51:12
|
Srinath Avadhanula wrote: > Hello Artem, > >>SA> also, another thing which you might want to do in your makeprg setting >>SA> is the following: >> >>SA> if has('win32') >>SA> set &makeprg = 'latex -interaction=nonstopmode $*' >>SA> endif >> >>SA> this is how miktex likes it. >> >>Well, I discovered that teTeX likes this too, so I changed makeprg to this >>version. >> > > This might be of quite a bit of interest to the vim-latex-devel people. > Benji was concerned that the -interaction=nonstopmode (I thought it was > --interaction but it looks like -interaction works too for miktex) will > break tex compilers and that the \\nonstopmode is a better alternative. > If it is true that most if not all latex compilers can handle > -interaction style syntax, it will take care of the old backslash > escaping problem once and for all.. Just yesterday, I updated teTeX on my Linux system, with the latest RPM's from Red Hat, and now tex understands the -interaction option. I still think that a lot of people are using older distributions of tex. It has been a long time since there was an official release of teTeX. True, a lot of people have switched to the beta version, which supportsd this option; in fact, I am not sure which version is in the RPM I downloaded. If this is the only place where escaping backslashes is an issue, and that is still causing problems, then it is a judgment call. For someone using an old version of tex, how hard will it be to fix the problem if the default is changed? >>SA> yet another thingie which broke when i used it with bash/cygwin is that >>SA> external programs get executed as following: >> >>SA> !bash -c "latex \\nonstopmode \\input\{thesis.tex\}" >> >>why not >> >>!bash -c 'latex \\nonstopmode \\input\{thesis.tex\}' > > Yes... I guess I could have changed the value of shellquote. Vim guesses > 'shellquote' to be " when I do :set shell=bash in my .vimrc... > > Srinath Is there any way to guess which is more common: ancient versions of tex or cygwin installations? --Benji |
From: Artem C. <ra...@ra...> - 2003-01-20 16:03:15
|
On 2003.01.20 at 09:01:56 -0500, Benji Fisher wrote: > >>SA> also, another thing which you might want to do in your makeprg setting > >>SA> is the following: > >> > >>SA> if has('win32') > >>SA> set &makeprg = 'latex -interaction=nonstopmode $*' > >>SA> endif > >> > >>SA> this is how miktex likes it. > >> > >>Well, I discovered that teTeX likes this too, so I changed makeprg to this > >>version. > >> > > > >This might be of quite a bit of interest to the vim-latex-devel people. > >Benji was concerned that the -interaction=nonstopmode (I thought it was > >--interaction but it looks like -interaction works too for miktex) will > >break tex compilers and that the \\nonstopmode is a better alternative. > >If it is true that most if not all latex compilers can handle > >-interaction style syntax, it will take care of the old backslash > >escaping problem once and for all.. > > Just yesterday, I updated teTeX on my Linux system, with the > latest RPM's from Red Hat, and now tex understands the -interaction > option. I still think that a lot of people are using older > distributions of tex. It has been a long time since there was an > official release of teTeX. True, a lot of people have switched to the > beta version, which supportsd this option; in fact, I am not sure which > version is in the RPM I downloaded. If this is the only place where > escaping backslashes is an issue, and that is still causing problems, > then it is a judgment call. > > For someone using an old version of tex, how hard will it be to > fix the problem if the default is changed? I hope that this compiler was in vim not so much time that this is an issue. But I know many people who use old emTeX under Win32. So I am going to support \nonstopmode as a fallback for them, but I need to resolve backslash escaping issues. > >>SA> yet another thingie which broke when i used it with bash/cygwin is > >>that > >>SA> external programs get executed as following: > >> > >>SA> !bash -c "latex \\nonstopmode \\input\{thesis.tex\}" > >> > >>why not > >> > >>!bash -c 'latex \\nonstopmode \\input\{thesis.tex\}' > > > >Yes... I guess I could have changed the value of shellquote. Vim guesses > >'shellquote' to be " when I do :set shell=bash in my .vimrc... > > > >Srinath > > Is there any way to guess which is more common: ancient versions > of tex or cygwin installations? Both are rare. Ancient TeX with vim 6.1 seems to be more rare. -- Artem Chuprina (Ran) RFC2822: <ra...@ra...>, FIDO: 2:5020/358.49 |
From: Srinath A. <sr...@fa...> - 2003-01-20 18:36:07
|
Hello, On Mon, 20 Jan 2003, Artem Chuprina wrote: > > Just yesterday, I updated teTeX on my Linux system, with the > > latest RPM's from Red Hat, and now tex understands the -interaction > > option. I still think that a lot of people are using older > > distributions of tex. It has been a long time since there was an > > official release of teTeX. True, a lot of people have switched to the > > beta version, which supportsd this option; in fact, I am not sure which > > version is in the RPM I downloaded. If this is the only place where > > escaping backslashes is an issue, and that is still causing problems, > > then it is a judgment call. > > > > For someone using an old version of tex, how hard will it be to > > fix the problem if the default is changed? > > I hope that this compiler was in vim not so much time that this is an issue. > But I know many people who use old emTeX under Win32. So I am going to support > \nonstopmode as a fallback for them, but I need to resolve backslash escaping > issues. > Hmm... If you are going to have to support escape backslashing, then you might as well support only that since all compilers accept that syntax as best as I know... As far as escape backslashing goes, although the compiler in latex-suite tries to do a fair bit of guessing, it still fails in the situation where cygwin is used in a win32 environment. You can see the latest compiler/tex.vim for latex-suite at: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vim-latex/vimfiles/compiler/tex.vim And how to hack around the second issue at: http://vim-latex.sourceforge.net/index.php?subject=faq#faq-2 I think that we could have improved the guesswork if we had somehow detected whether 'shellquote' was " or ' What happens in win32 is: - if &shell='' then cmd.exe is used and things should be called like: cmd.exe /c latex \nonstopmode \input{$*} This is because cmd.exe doesn't see \ as an escape character and it is passed verbatim to latex. - if &shell=bash, then vim guesses &shellquote = '"', so that things need to be called like: bash -c "latex \\\\nonstopmode \\\\input\\{$*\\} Somehow there are 2 levels of escaping before this finally gets to latex. I know that bash will do one level. I do not know what does the second... (is it vim itself?) So just to be complete, I think we'll need to also check for &shellquote in addition to &shell. See :help dos-shell for all the gory details. I might spend a little more time on this next time I get a chance. Ofcourse, if we just use the --interaction sytnax, we instantly take care of all these problems. Also, in the standard compiler/tex.vim it might be a good idea to provide an option to let the use specify the complete command line for calling the compiler. > > Both are rare. Ancient TeX with vim 6.1 seems to be more rare. > I do not think cygwin is too rare. If its not cygwin, then its some other winutils kind of a shell... On windows cygwin provides a great terminal and all the familiar unix tools. Artem: You are welcome to join the mailing list: http://lists.sourceforge.net/lists/listinfo/vim-latex-devel If you wish, take a look at the archives to get an idea of the activity level. Srinath |
From: Artem C. <ra...@ra...> - 2003-01-20 23:40:07
|
On 2003.01.20 at 10:35:49 -0800, Srinath Avadhanula wrote: > > I hope that this compiler was in vim not so much time that this is an issue. > > But I know many people who use old emTeX under Win32. So I am going to support > > \nonstopmode as a fallback for them, but I need to resolve backslash escaping > > issues. > > > Hmm... If you are going to have to support escape backslashing, then you > might as well support only that since all compilers accept that syntax > as best as I know... First, I cannot guarantee that I'll succeed in this backslash escaping. Second, backslash syntax prevents from specifying any other options for TeX through :make while commandline syntax allows. Maybe "second" is indeed "first". So I am going to fallback to this syntax (by user's variable setting) on his own risk, not as a reliable solution. [skip!] I'll read the skipped carefully but not at late night... > > Both are rare. Ancient TeX with vim 6.1 seems to be more rare. > > > I do not think cygwin is too rare. If its not cygwin, then its some > other winutils kind of a shell... But does it is the UNIX-like or Windows native shell that is the specified (or unspecified :-)) in user's Vim configuration? Moreover, I think that UNIX-like utilities on Windows is even more marginal than UNIX itself. But I do not think that they are ignorably rare, because _I_ use them when I need to work with Windows :-) > On windows cygwin provides a great > terminal and all the familiar unix tools. Yes... If it could also support Russian well enough... > Artem: > You are welcome to join the mailing list: > http://lists.sourceforge.net/lists/listinfo/vim-latex-devel > If you wish, take a look at the archives to get an idea of the activity > level. Thank you. -- Sorry for my English, Artem Chuprina (Ran) RFC2822: <ra...@ra...>, FIDO: 2:5020/358.49 |