#1 Drag and Drop images (in newer Gedit)

open
None
3
2007-09-29
2007-08-30
Anonymous
No

The following makes for a nice snippet. It creates a figure when an image is dropped into the document.

\begin{figure}[${1:htbp}]
\begin{center}
\includegraphics[${2:scale=1}]{$GEDIT_DROP_REL_FILENAME}
\end{center}
\caption{$3}
\label{fig:$4}
\end{figure}

With drop target set to "image" in gedit 2.19.x. This version will be the stable version in about a month.

Also, could you write actual commit meesages, please?

Discussion

  • Logged In: NO

    The same thing could also be done for other mime types, like PDF (it’s the preferred vector graphics format for pdflatex).

     
  • Logged In: NO

    According to l2tabu this is better:

    \begin{figure}[${1:htbp}]
    \centering
    \includegraphics[${2:scale=1}]{$GEDIT_DROP_REL_FILENAME}
    \caption{$3}
    \label{fig:$4}
    \end{figure}

    This is because \centering doesn't introduce an unnecessary vertical skip. And, it's shorter.

     
  • Logged In: YES
    user_id=1016811
    Originator: NO

    Hi,

    this is a nice idea, I'll see how to implement this... and thanks for pointing to l2tabu!

     
    • assigned_to: nobody --> m_zeising
     
    • priority: 5 --> 3