[OS X TeX] TexShop: macro to insert text, preserve indentation

Nicolae Garleanu garleanu at haas.berkeley.edu
Mon Jun 4 03:32:57 CEST 2012


Hi,

I wanted to write a macro that inserts "\item" on the line below — specifically, that behaves exactly as when I type <Enter>, the type the text. When I do that, in particular, "\item" is indented just like the previous instance of "\item". For my macro, the only thing I could think of was to have an empty line followed by my text ("\item"). As some of you might guess, that does what I want save for inserting the text at the very beginning of the second line, rather than preserving the indentation as when I type it directly in the source code. (Command completion, for instance, places the first "\item" indented, all the others follow.)

How could I get the desired behavior? I should also say clearly that the more explicit the answer, the better. (I have virtually no experience with Applescript, although I expect to be able to modify reasonably closely related code.)

Thank you.
Nicolae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20120603/06f3bdeb/attachment.html>


More information about the macostex-archives mailing list