hello
if i create a new file with Latex bundle and if i drag a .pdf file, the result is correct
\begin{figure}[htbp] \begin{center} \includegraphics[height=3in]{/Users/ego/Desktop/ AmeriqueNordES2005.pdf} \end{center} \caption{caption} \label{fig:label} \end{figure}
but if i save the .tex file and i want to drag again a .pdf file :
the result is /usr/lib/ruby/1.8/pathname.rb:529:in ??? strange
Thanks for a solution
Alain Matthes
TextMate Version 1.5.3 (1292)
Hi Alain,
first, make sure you have the most updated version of the command. The text in the command should be the following:
#!/usr/bin/env ruby require 'pathname' filename = Pathname.new(ENV['TM_DROPPED_FILE']).realpath dir = ENV['TM_DIRECTORY'] || "" filename = filename.relative_path_from(Pathname.new(dir)) if dir != "" case ENV['TM_MODIFIER_FLAGS'] when /OPTION/ puts ["\\begin{center}", " \\includegraphics[height=${1:3in}]{#{filename}}", "\\end{center}"].join("\n") when /SHIFT/ puts "\\includegraphics[height=${1:3in}]{#{filename}}" else puts ["\\begin{figure}[${1:htbp}]", " \\begin{center}", " \\includegraphics[height=${2:3in}]{#{filename}}", " \\end{center}", " \\caption{${4:caption}}", " \\label{fig:${5:label}}", "\\end{figure}"].join("\n") end
If this is indeed what you have there, then please send me the full paths of both the pdf file and the tex file. Note in particular the first 5-6 lines. Are you using the subversion copy of the LaTeX bundle?
On Oct 18, 2006, at 4:44 PM, Alain Matthes wrote:
hello
if i create a new file with Latex bundle and if i drag a .pdf file, the result is correct
\begin{figure}[htbp] \begin{center} \includegraphics[height=3in]{/Users/ego/Desktop/
AmeriqueNordES2005.pdf} \end{center} \caption{caption} \label{fig:label} \end{figure}
but if i save the .tex file and i want to drag again a .pdf file :
the result is /usr/lib/ruby/1.8/pathname.rb:529:in ??? strange
Thanks for a solution
Alain Matthes
TextMate Version 1.5.3 (1292)
Haris
Le 18 oct. 06 à 22:57, Charilaos Skiadas a écrit :
If this is indeed what you have there, then please send me the full paths of both the pdf file and the tex file. Note in particular the first 5-6 lines. Are you using the subversion copy of the LaTeX bundle?
The drag command is
#!/usr/bin/env ruby require 'pathname' filename = Pathname.new(ENV['TM_DROPPED_FILE']) dir = ENV['TM_DIRECTORY'] || "" filename = filename.relative_path_from(Pathname.new(dir)) if dir != "" case ENV['TM_MODIFIER_FLAGS'] when /OPTION/ puts ["\\begin{center}", " \\includegraphics[height=${1:3in}]{#{filename}}", "\\end{center}"].join("\n") when /SHIFT/ puts "\\includegraphics[height=${1:3in}]{#{filename}}" else puts ["\\begin{figure}[${1:htbp}]", " \\begin{center}", " \\includegraphics[height=${2:3in}]{#{filename}}", " \\end{center}", " \\caption{${4:caption}}", " \\label{fig:${5:label}}", "\\end{figure}"].join("\n") end
In my library, and in the folder \Application Support\TextMate i've a LateX bundle and it's a subversion copy but without this bundle the problem is the same...
drag.tex : "/Users/ego/Boulot/drag.tex"
.pdf tex "/Users/ego/Boulot/doc_tukey.pdf"
If this is indeed what you have there, then please send me the full paths of both the pdf file and the tex file. Note in particular the first 5-6 lines.
I don't understand the first 5-6 lines. lines of what ??? ` but the problem is the same with an other pdf file.
If i create a new file in a project i've also the problem
The only way is to create a new file .tex outside of a project but if i save it : error !!
Thanks Alain
On Oct 18, 2006, at 6:23 PM, Alain Matthes wrote:
I don't understand the first 5-6 lines. lines of what ???
The first 5-6 lines of the command code. If you look at the command you pasted, it is not the same as what I pasted, which had this as its third line:
filename = Pathname.new(ENV['TM_DROPPED_FILE']).realpath
As opposed to:
filename = Pathname.new(ENV['TM_DROPPED_FILE'])
If you make that change, the command should start working. Alternatively, since you have the LaTeX bundle on subversion, you can just update that, I committed a fix for this problem on October 15th, in fact there were some emails on this list about it then. (http:// blog.gmane.org/gmane.editors.textmate.general/day=20061015)
Haris
Le 19 oct. 06 à 01:10, Charilaos Skiadas a écrit :
On Oct 18, 2006, at 6:23 PM, Alain Matthes wrote:
I don't understand the first 5-6 lines. lines of what ???
The first 5-6 lines of the command code. If you look at the command you pasted, it is not the same as what I pasted, which had this as its third line:
filename = Pathname.new(ENV['TM_DROPPED_FILE']).realpath
As opposed to:
filename = Pathname.new(ENV['TM_DROPPED_FILE'])
If you make that change, the command should start working. Alternatively, since you have the LaTeX bundle on subversion, you can just update that, I committed a fix for this problem on October 15th, in fact there were some emails on this list about it then. (http://blog.gmane.org/gmane.editors.textmate.general/day=20061015)
Thanks
When textmate is updated, the bundles are not updated ?
it' a little difficult :
I don't want to lose my prefs, my personnal commands and snippets etc....
Which are the good way for updating ? I don't have the time to read all the messages of the list..
Actually in my Latex Bundle i've Miscellaneous.tmDelta and now with subversion it's Miscellaneous.plist.
Can you give the good method
1) for updating TM (actually in my prefs : software updating -> Cutting Edge 2) for updating Latex Bundle but i don't want to lose my personnal configuration : commands, prefs etc...
Thanks
Alain
PS : I use SVN but i don't not understand very well this soft and perhaps i made a lot of mistakes
On Oct 19, 2006, at 1:19 AM, Alain Matthes wrote:
When textmate is updated, the bundles are not updated ?
They are, but the bundles might be updated without the core textmate being updated. In fact, every day we have anywhere from 20 to 100 updates to the bundles. When a new version of TextMate goes out, it contains in it a snapshot of how the bundles look like at the moment.
it' a little difficult :
I don't want to lose my prefs, my personnal commands and snippets etc....
Which are the good way for updating ? I don't have the time to read all the messages of the list..
Actually in my Latex Bundle i've Miscellaneous.tmDelta and now with subversion it's Miscellaneous.plist.
Can you give the good method
- for updating TM (actually in my prefs : software updating ->
Cutting Edge
Setting Software Update -> Cutting Edge like you have is all you have to do for updating TM.
- for updating Latex Bundle but i don't want to lose my personnal
configuration : commands, prefs etc...
The simplest thing for that is to not use the subversion repository at all. If you don't use it, then there is nothing you have to do to stay up to date, except that you are not entirely up to date. You will only be seeing changes in the bundle when a new TM version comes out.
If you do want to stay up to date with the absolutely cutting edge, most current version of the LaTeX bundle, you have to check out the subversion repository. If you do this, then there are three places where things live:
1. The location where you did the checkout, which should be probably:
/Library/Application Support/TextMate/Bundles/Latex.tmbundle
2. The version TextMate has built in, which is packaged inside the application itself. (Items from this will only be used if the same items don't appear in 1. 3. The location where you have your local modifications. This is:
~/Library/Application Support/TextMate/Bundles/Latex.tmbundle
This is the location that contains those tmDelta files. Those files guarantee that if for instance you change the key equivalent for a command, and then the text for the command changes, you will be able to see both changes. In other words they only keep the information of *what you changed*. So you can't lose those modifications you have made unless you mess with this directory.
Now basically, the only thing you have to do is to tell subversion, on a regular basis, to update the thing is 1. Typically you can do this from the command line with a command like:
svn up "/Library/Application Support/TextMate/Bundles/Latex.tmbundle"
This should be all you have to do. There is no easy way, as far as I know, to have this be done automatically for you, unless you schedule it as a cronjob or some such, but I'll let someone else talk about that. Basically, all you have to do is run the above command periodically. If you have also checked out from the subversion repository the global support path, then you also have a folder called: /Library/Application Support/TextMate/Support You would need to do the same thing for that in this case. Since that folder is not being updated as often as everything else, you probably can get by without having it checked out.
I hope this helps.
Thanks
Haris
Le 19 oct. 06 à 16:09, Charilaos Skiadas a écrit :
This should be all you have to do. There is no easy way, as far as I know, to have this be done automatically for you, unless you schedule it as a cronjob or some such, but I'll let someone else talk about that. Basically, all you have to do is run the above command periodically. If you have also checked out from the subversion repository the global support path, then you also have a folder called: /Library/Application Support/TextMate/Support You would need to do the same thing for that in this case. Since that folder is not being updated as often as everything else, you probably can get by without having it checked out.
I hope this helps.
This helps me a little. I used SVN and now I have the new latex bundle ~/Library/Application Support/TextMate/Bundles/Latex.tmbundle
I preserved my old latex bundle with my commands, prefs etc... (personal scripts).
I installed my old commands by hand in the new latex bundle but I do not see them in TextMate. How must I make to use my old scripts ?
Greetings Alain
Le 19 oct. 06 à 17:02, Alain Matthes a écrit :
Le 19 oct. 06 à 16:09, Charilaos Skiadas a écrit :
This should be all you have to do. There is no easy way, as far as I know, to have this be done automatically for you, unless you schedule it as a cronjob or some such, but I'll let someone else talk about that. Basically, all you have to do is run the above command periodically. If you have also checked out from the subversion repository the global support path, then you also have a folder called: /Library/Application Support/TextMate/Support You would need to do the same thing for that in this case. Since that folder is not being updated as often as everything else, you probably can get by without having it checked out.
I hope this helps.
This helps me a little. I used SVN and now I have the new latex bundle ~/Library/Application Support/TextMate/Bundles/Latex.tmbundle
I preserved my old latex bundle with my commands, prefs etc... (personal scripts).
I installed my old commands by hand in the new latex bundle but I do not see them in TextMate. How must I make to use my old scripts ?
Sorry to disturb you with my questions but I do not know why now I have access to my old commands....
thank you for your help
Greetings Alain
On 19. Oct 2006, at 17:02, Alain Matthes wrote:
This helps me a little. I used SVN and now I have the new latex bundle ~/Library/Application Support/TextMate/Bundles/Latex.tmbundle
Be aware that by checking out to that location, if you edit the bundle from TM it will edit the svn checkout which might give you merge conflicts down the road and you also mix your stuff with default stuff. This is a problem e.g. if you want ot get rid of this svn checkout (e.g. if you learn they you don’t remember to update it regularly and so things start to break because you have an older svn checkout which eclipse the default LaTeX bundle included with TM).
I preserved my old latex bundle with my commands, prefs etc... (personal scripts).
I installed my old commands by hand in the new latex bundle but I do not see them in TextMate. How must I make to use my old scripts ?
I am not sure which scripts and how you installed them. Generally though it is recommended you do a *new* bundle for your custom stuff.
Le 19 oct. 06 à 17:29, Allan Odgaard a écrit :
On 19. Oct 2006, at 17:02, Alain Matthes wrote:
This helps me a little. I used SVN and now I have the new latex bundle ~/Library/Application Support/TextMate/Bundles/Latex.tmbundle
Be aware that by checking out to that location, if you edit the bundle from TM it will edit the svn checkout which might give you merge conflicts down the road and you also mix your stuff with default stuff. This is a problem e.g. if you want ot get rid of this svn checkout (e.g. if you learn they you don’t remember to update it regularly and so things start to break because you have an older svn checkout which eclipse the default LaTeX bundle included with TM).
I preserved my old latex bundle with my commands, prefs etc... (personal scripts).
I installed my old commands by hand in the new latex bundle but I do not see them in TextMate. How must I make to use my old scripts ?
I am not sure which scripts and how you installed them. Generally though it is recommended you do a *new* bundle for your custom stuff.
They are scripts to use LaTeX with Asymptote, to use pst-pdf i.e. pstricks with pdflatex etc... also I took the practice to put them in the bundle latex what seemed more natural to me
Greetings Alain
Alain Matthes wrote:
Le 19 oct. 06 à 17:29, Allan Odgaard a écrit :
On 19. Oct 2006, at 17:02, Alain Matthes wrote:
I installed my old commands by hand in the new latex bundle but I do not see them in TextMate. How must I make to use my old scripts ?
I am not sure which scripts and how you installed them. Generally though it is recommended you do a *new* bundle for your custom stuff.
They are scripts to use LaTeX with Asymptote, to use pst-pdf i.e. pstricks with pdflatex etc... also I took the practice to put them in the bundle latex what seemed more natural to me
Also, you shouldn't add bundle items in the finder. Instead, add them to a bundle by dragging them around in the bundle editor.
-Jacob