[OS X TeX] TexShop: macro to insert text, preserve indentation
garleanu at haas.berkeley.edu
Mon Jun 4 03:35:55 CEST 2012
Correction: command completion does not indent. I indent frequently (first instance) b/c I like it, etc. Sorry.
From: Nicolae Garleanu <garleanu at haas.berkeley.edu<mailto:garleanu at haas.berkeley.edu>>
Reply-To: TeX on Mac OS X Mailing List <macosx-tex at email.esm.psu.edu<mailto:macosx-tex at email.esm.psu.edu>>
To: "macosx-tex at email.esm.psu.edu<mailto:macosx-tex at email.esm.psu.edu>" <macosx-tex at email.esm.psu.edu<mailto:macosx-tex at email.esm.psu.edu>>
Subject: [OS X TeX] TexShop: macro to insert text, preserve indentation
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.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macostex-archives