[TxMt] Drag problem with LaTeX bundle

Charilaos Skiadas skiadas at hanover.edu
Wed Oct 18 20:57:41 UTC 2006


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





More information about the textmate mailing list