[OS X TeX] placeholders

Herbert Schulz herbs at wideopenwest.com
Mon Nov 2 05:39:43 EST 2009


On Nov 2, 2009, at 4:20 AM, Sime wrote:

>
> Dear list,
> I am using TeXShop as the LaTeX editor, and in my CommandCompletion  
> file I
> have quite a few shortcuts like this one:
>
> grmp:=\begin{minipage}{#INS#mm}#RET#\begin{picture}(•) 
> (0,0)\footnotesize#RET#\put(0,0){\includegraphics<•->[•]{•}}#RET#\end 
> {picture}#RET#\end{minipage}~%#RET#\begin{minipage}{•mm}#RET#•#RET# 
> \end{minipage}
>
> which triggered (in the above case by typing "grmp" and hitting  
> ESCape key)
> put
>
> \begin{minipage}{mm}
> \begin{picture}(•)(0,0)\footnotesize
> \put(0,0){\includegraphics<•->[•]{•}}
> \end{picture}
> \end{minipage}~%
> \begin{minipage}{•mm}
>> \end{minipage}
>
> in my tex-file, with the insertion point in front of mm for the  
> width of the
> minipage .
> (I use this particular shortcut to put a graphics parallel with some  
> text in
> a beamer presentation.)
>
> After inserting the number (of millimeters), hitting the TAB key  
> takes me to
> the first bullet (OPT+8), the next TAB puts the insertion point at  
> the next
> bullet, and so on.
>
> This has worked fine on my old TI PowerBook under Tiger, but it does  
> not
> work anymore on MacBook under Leopard. After a while I realized that  
> all
> this worked due to a small application, actually a PreferencePane,  
> called
> TextMacro. Trying to run it on the MacBook under Leopard I got "You  
> cannot
> open TextMacro preferences because it doesn't work on an Intel-based  
> Mac". I
> have contacted the author Mikael Langer, and he explained to me that  
> as of
> OSX 10.5 Apple has blocked the mechanism that makes TextMacro work.
>
> My question is: Does anyone know any substitute/replacement for  
> TextMacro or
> something similar? Would it be possible to implement such a thing in  
> TeXShop
> (e.g. like #INS# and #RET#)? What I currently do is to put the  
> bullet into
> the search field in the Find window and keep hitting CMD+G.
>
> I would appreciate any help.
>
>     Sime Ungar
>

Howdy,

Attached are two applescripts that may help. You can add each one,  
separately, to your Macros Menu using the Macros->Open Macro Editor...  
and adding a new macro for each one. Unfortunately you won't be able  
to assign the Tab key as the shortcut since the Cmd key is needed when  
you define the shortcut in the Editor.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Applescripts.txt
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20091102/d09616a1/attachment.txt>
-------------- next part --------------


Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)





More information about the MacOSX-TeX mailing list