[TxMt] Latex : Command-\command{...}

Alain Matthes alain.matthes at mac.com
Thu Sep 20 08:32:43 UTC 2007


hello

In the latex  bundle we find:

A) a command (ctrl+shift+W)

   #!/usr/bin/env ruby
   require ENV['TM_SUPPORT_PATH'] +'/lib/escape.rb'
   print "\\\\${1:emph}{#{if s = ENV['TM_SELECTED_TEXT'] then e_sn(s)  
else '$2' end}}"

B) an other command (cmd B)

    toggle_style.rb -style=textbf

C) a snippet(ctrl+shift+E)

     \\${1:text${2:bf}}{$TM_SELECTED_TEXT}

----------------------------------------------------
three questions :

   1) Why this snippet ? (the commands are useful !)

   2) the snippet appears in the Select Bundle Item of the menu Bundle
       but not in the item Latex of the menu Bundle (perhaps i don't  
see it).

   3) \${1:text${2:bf}}{$TM_SELECTED_TEXT} i don't understand the syntax
      why not :

     \\${1:text}${2:bf}{$TM_SELECTED_TEXT} ?
      we can change text with math and bf with cal for example

Regards Alain





More information about the textmate mailing list