set mathText to selectionText()
set wrappedText to "\\( " & mathText & " \\)"
setSelectionText to wrappedText
if (length of mathText) equals 0 then
set {startChar, nextChar} to selectionRange without extendingFront or extendingEnd
setSelectionRange to (startChar + length of mathText + 3)
end if
on seescriptsettings()
{displayName:"Inline Math", keyboardShortcut:"@~^m", inContextMenu:"yes"}
end seescriptsettings
include(`SubEthaEditTools.applescript')
set wrappedText to "\\( " & mathText & " \\)"
setSelectionText to wrappedText
if (length of mathText) equals 0 then
set {startChar, nextChar} to selectionRange without extendingFront or extendingEnd
setSelectionRange to (startChar + length of mathText + 3)
end if
on seescriptsettings()
{displayName:"Inline Math", keyboardShortcut:"@~^m", inContextMenu:"yes"}
end seescriptsettings
include(`SubEthaEditTools.applescript')
No comments:
Post a Comment