Ciao Folks,
at first I would like to offer my thanks for the great work on the new LaTeX bundle. It's a big step forward especially in the area of displaying the log after compilation. I really missed that compared to TeXShop.
Tonight, while playing around with the new "%!TEX root" directives to define a master file, I noticed that Auto-Completion for \cite{} etc. using ALT+ESC only works recursively if the master file is still specified using the TM_LATEX_MASTER variable either in a project or global. the %!TEX directive does work for compilation but not for completion as it seems.
Is this a correct observation or rather a bug on my side. I am not sure, if it would even be possible to enable recursive search using only the directives. If that is the case, I guess it would be best to mention that in section 2.3 of the bundle help as advantage of the TM_LATEX_MASTER variable.
Just my two cents ;-)
Best Wishes Bastian
Bastian,
This is a bug in the current completion code. It should be updated to work with the %!TEX root directive.
Thanks,
Brad
Haris, Robin,
I think the right way to fix this is to merge options.rb into LaTeXUtils.rb, then the get_labels, get_citation methods can use master directly. I tried that out and it worked just fine.
There are a handful of commands that will need to require LaTeXUtils instead of options.rb, but that is pretty easy to fix up. the downside is that more Latex bundle commands now have a dependency on LaTeXUtils which is in the main Support directory and not in the bundle.
Brad
On Aug 12, 2007, at 3:20 PM, Brad Miller wrote:
Haris, Robin,
I think the right way to fix this is to merge options.rb into LaTeXUtils.rb, then the get_labels, get_citation methods can use master directly. I tried that out and it worked just fine.
There are a handful of commands that will need to require LaTeXUtils instead of options.rb, but that is pretty easy to fix up. the downside is that more Latex bundle commands now have a dependency on LaTeXUtils which is in the main Support directory and not in the bundle.
I see no problem with that really, LaTeXUtils is not a file we are going to update very often anyway, and by now pretty much most updates to bundles often require users to update the Support directory anyway.
The only reason LaTeXUtils is in the main directory is that it is required by the regular (pressing esc) completion commands, and for some reason those commands are not very aware of the bundle's support directory (Unless this has changed now). Perhaps some time in the future we will be able to move it back into the LaTeX bundle anyway.
So, did you also check the label and cite completions via "esc", and they work fine as well?
If it works out just fine, I'm all for merging the two files.
Brad
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Aug 12, 2007, at 4:05 PM, Brad Miller wrote:
One thing I wish we could improve for citations would be to make the completion command use the BIBINPUTS variable. I keep all my bib files together in a single directory since I tend to reuse them for lots of different papers. cite_scan/parse_bibfile assumes that the bib files are in the same directory as the master file. Unless you specify *a* file with TM_LATEX_BIB.
IIRC (haven't looked at them in a while) the commands use kpsewhich to decide at which locations to look for bib files. So I suppose the issue is the familiar issue that ruby scripts don't for the most part inherit shell environment variables. So we can probably solve this in a way similar to how we do it for the LaTeX command, by actually calling the script from within a shell script, to force TM to go through its process of sourcing the relevant init files. The problem with this however is that, IIRC, Allan was thinking of dropping sourcing of shell init files for commands in general, and not just for those with a shebang line.
So, if you define BIBINPUTS from within TM, the completion commands don't respect it?
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Aug 12, 2007, at 3:28 PM, Charilaos Skiadas wrote:
[...] IIRC, Allan was thinking of dropping sourcing of shell init files for commands in general, and not just for those with a shebang line.
Indeed -- while it is nice to have things work out of the box for most users, it also means breaking things for some users (who do “complex” stuff in the startup), it adds the startup-time of the init files to every little command (just to get PATH), and it didn’t work for non-bash-users anyway.
Bastian,
I believe this has been addressed by a recent commit by Brad. Let us know if you are still having problems.
Haris On Aug 11, 2007, at 5:29 PM, Brad Miller wrote:
Bastian,
This is a bug in the current completion code. It should be updated to work with the %!TEX root directive.
Thanks,
Brad
-- Brad Miller Assistant Professor, Computer Science Luther College
On 8/11/07, Bastian Philipps bp.profiles@gmail.com wrote: Ciao Folks,
at first I would like to offer my thanks for the great work on the new LaTeX bundle. It's a big step forward especially in the area of displaying the log after compilation. I really missed that compared to TeXShop.
Tonight, while playing around with the new "%!TEX root" directives to define a master file, I noticed that Auto-Completion for \cite{} etc. using ALT+ESC only works recursively if the master file is still specified using the TM_LATEX_MASTER variable either in a project or global. the %!TEX directive does work for compilation but not for completion as it seems.
Is this a correct observation or rather a bug on my side. I am not sure, if it would even be possible to enable recursive search using only the directives. If that is the case, I guess it would be best to mention that in section 2.3 of the bundle help as advantage of the TM_LATEX_MASTER variable.
Just my two cents ;-)
Best Wishes Bastian
Charilaos Skiadas <cskiadas@...> writes:
Bastian,
I believe this has been addressed by a recent commit by Brad. Let us know if you are still having problems.
Haris
Haris, Brad,
Recursive TextMate completion for references and citations now works like a charm with both methods to specify a master file.
As I having been following the list the last couple of days, I have to check if anyone else is seeing this In one of the svn checkins the last days, automatic image inclusion by drag-and-drop into a LaTeX file broke. If I drag an image into a file now I receive: /usr/lib/ruby/1.8/pathname.rb:189:in /bin/bash: -c: line 1: syntax error near unexpected token `(' /bin/bash: -c: line 1: `dup': can't dup NilClass (TypeError)'initialize' from /tmp/temp_textmate.ZUQ4tn:7:in rather than the usually code for a figure environment.
Thanks for the great and quick work on the bundle Bastian
Bastian,
The image drag and drop is working for me. I can think of one thing that may be causing your problem. If you updated your Latex bundle in the last few days you should also update the main support directory to get an updated version of LaTeXUtils.rb
Brad
On 8/14/07, Bastian Philipps bp.profiles@gmail.com wrote:
Charilaos Skiadas <cskiadas@...> writes:
Bastian,
I believe this has been addressed by a recent commit by Brad. Let
us
know if you are still having problems.
Haris
Haris, Brad,
Recursive TextMate completion for references and citations now works like a charm with both methods to specify a master file.
As I having been following the list the last couple of days, I have to check if anyone else is seeing this In one of the svn checkins the last days, automatic image inclusion by drag-and-drop into a LaTeX file broke. If I drag an image into a file now I receive: /usr/lib/ruby/1.8/pathname.rb:189:in /bin/bash: -c: line 1: syntax error near unexpected token `(' /bin/bash: -c: line 1: `dup': can't dup NilClass (TypeError)'initialize' from /tmp/temp_textmate.ZUQ4tn:7:in rather than the usually code for a figure environment.
Thanks for the great and quick work on the bundle Bastian
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Aug 14, 2007, at 7:09 AM, Brad Miller wrote:
[...] If you updated your Latex bundle in the last few days you should also update the main support directory to get an updated version of LaTeXUtils.rb
Can we move the file to the LaTeX bundle and then in Support create a symbolic link that points to ../../Bundles/Latex.tmbundle/Support/…
The completion command can still read it via TM_SUPPORT_PATH, but the rest of the commands should use TM_BUNDLE_SUPPORT.
On Aug 14, 2007, at 9:25 AM, Brad Miller wrote:
[...] I tried that idea as an experiment and it seems to work. I guess that should be OK as long as people do 'sensible' things when they check out the svn repository.
Yeah, doing a Support check-out of its own is already bad ;)
Why is it that [...] am not able to use TM_BUNDLE_SUPPORT as part of the completion?
This is only because TM caches all “settings” associated with a given scope (so it doesn’t have to scan everything each time) and in this cache, which bundle a given setting came from (like the completion setting) is not cached.
Improving this in 1.x is a lot of work with relatively little gain, but ti will not be a problem in 2.x.
On Aug 14, 2007, at 10:25 AM, Brad Miller wrote:
Can we move the file to the LaTeX bundle and then in Support create a symbolic link that points to ../../Bundles/Latex.tmbundle/Support/…
The completion command can still read it via TM_SUPPORT_PATH, but the rest of the commands should use TM_BUNDLE_SUPPORT.
I tried that idea as an experiment and it seems to work. I guess that should be OK as long as people do 'sensible' things when they check out the svn repository. If they check out the support directory one place and put the Latex bundle somewhere else that will break the symlinks. I think its still a win as that only breaks the completion commands whereas moving LaTeXUtils to the bundle reduces external dependencies for a bunch of commands.
That seems reasonable, and we can drop the link in any case once TM 2.0 is around. I would think it extremely unlikely for anyone to check the two things in different places (though I guess I have heard of people doing an svn checkout at the Pristine Copy dir, so you never know).
Haris Skiadas Department of Mathematics and Computer Science Hanover College
Am 14.08.2007, 14:09 Uhr, schrieb Brad Miller bmiller@luther.edu:
Bastian,
The image drag and drop is working for me. I can think of one thing that may be causing your problem. If you updated your Latex bundle in the last few days you should also update the main support directory to get an updated version of LaTeXUtils.rb
Brad
Just checked out the latest revisions from subversion. As far as I can see from the file deletions and additions I now have the setup, with LaTeXUtils.rb in the bundle and a link in the main support directory.
Sadly, image drag-and-drop still is not working. To be sure, I used a file, where I definitely know it worked before. I am only receiving: /Library/Application Support/TextMate/Bundles/Latex.tmbundle/Support/lib/LaTeXUtils.rb:19:in /bin/bash: -c: line 1: unexpected EOF while looking for matching `'' /bin/bash: -c: line 3: syntax error: unexpected end of fileopen' from /Library/Application Support/TextMate/Bundles/Latex.tmbundle/Support/lib/LaTeXUtils.rb:19:in /bin/bash: -c: line 1: unexpected EOF while looking for matching `'' /bin/bash: -c: line 3: syntax error: unexpected end of filemaster' from /tmp/temp_textmate.XIkDwD:7
Thanks for your efforts, All the best Bastian
Hmmm, I can't really make heads or tails out of those error messages. The whole thing is a ruby script so I'm really confused by the /bin/bash -c business. Maybe someone with more ruby experience can decode that better than I.
In the meantime, can you be a bit more explicit about what exactly you are doing. What kind of file are you dragging? Are there spaces in the name? Does the .tex file have a master file set or not? How exactly is the master file set?
Thanks,
Brad
Brad Miller wrote:
In the meantime, can you be a bit more explicit about what exactly you are doing. What kind of file are you dragging? Are there spaces in the name? Does the .tex file have a master file set or not? How exactly is the master file set?
Sure,
after a little testing, I am quite positive that it's related to the specification method of a master file. I am dragging in an .png image file named something like image_tbd.png, so no spaces, no special characters.
Dragging into a single-file .tex document works as does dragging into a project file with master file set by TM_LATEX_MASTER as project variable. Dragging into a project file using %!TEX root does not work and results in earlier mentioned error. Both master specifications use full path names.
Hope that helps
Best wishes
I still can't reproduce your problem. If you have access to ##textmate on irc send me a message (bnmnetp) and we'll see if we can debug this in real time.
Brad