[texworks] Auto-completion - Document Jumps
Paul A Norman
paul.a.norman at gmail.com
Wed Jun 15 23:44:00 CEST 2011
On 16 June 2011 04:23, Alain Delmotte <esperanto at swing.be> wrote:
> Hei!
>
> Do you speak Esperanto?
No just always been fascinated by Latin derived/connected downstream languages
> I was in Kinshasa for a conference and a crash course of Esperanto. They
> like very much the langage.
>
> Regards,
>
> Alain
> Le 15/06/2011 11:46, Paul A Norman a écrit :
>>
>> On 15 June 2011 21:11, Alain Delmotte<esperanto at swing.be> wrote:
>>>
>>> Dear Paul,
>>>
>>> Thanks! It works (I was not expecting anything else!)
>>> And yes, I want to program in Python. The .js did work of course!
>>>
>> tiu estas bona ĝi estis mia plezuro
>>
>>> Yes I was in Kinshasa the seond half of April.
>>>
>>> Alain
>>>
>>> Le 15/06/2011 09:26, Paul A Norman a écrit :
>>>>
>>>> Dear Alain,
>>>>
>>>> Good to see you on the list lately - been back in Africa at all?
>>>>
>>>> Python is not yet a strength of mine--on a long to do list, I really
>>>> like the look of it :)
>>>>
>>>> Head looks great...
>>>>
>>>> # TeXworksScript
>>>> # Title: Make Bullet
>>>> # Description: Inserts a bullet for autocompletion
>>>> # Author: Paul Norman
>>>> # Version: 0.1
>>>> # Date: 2011-06-15
>>>> # Script-Type: standalone
>>>> # Context: TeXDocument
>>>> # Shortcut: Alt+M, Alt+B
>>>>
>>>> TW.target.insertText(u"\u2022")
>>>>
>>>> Indentation and spacing is everything in Python from what I recall.
>>>> This works, note the u in-front of the quote mark for Python encoding
>>>> needs here.
>>>>
>>>> Here is a link to a script for writing new scripts :) helps get the
>>>> head consistently in order.
>>>>
>>>> http://code.google.com/p/texworks/issues/detail?id=261#c41
>>>>
>>>> re the QtScript version ...
>>>>
>>>> Have you got Alt+M, Alt+B assigned to any other Script at all?
>>>>
>>>> Does the Script appear in Script manager? Or on the Script menu?
>>>>
>>>> .js is one of the standard QtScript extensions.
>>>>
>>>> Or did I misunderstand and you just want to do it in python anyway?
>>>>
>>>> paul
>>>>
>>>>
>>>> On 15 June 2011 18:44, Alain Delmotte<esperanto at swing.be> wrote:
>>>>>
>>>>> Hi Paul,
>>>>>
>>>>> This is a .js script, how to make it Python?
>>>>>
>>>>> ------------------------
>>>>> # TeXworksScript
>>>>> # Title: Make Bullet
>>>>> # Description: Inserts a bullet for autocompletion
>>>>> # Author: Paul Norman
>>>>> # Version: 0.1
>>>>> # Date: 2011-03-05
>>>>> # Script-Type: standalone
>>>>> # Context: TeXDocument
>>>>> # Shortcut: Alt+M, Alt+B
>>>>>
>>>>
>>>> The header look right
>>>>
>>>> Python is not my strength in scripting but ...
>>>>
>>>> For python try this, note the leading u
>>>>
>>>> TW.target.insertText(u"\u2022")
>>>>
>>>> or perhaps
>>>>
>>>> mybullet = str(u"\u2022")
>>>>
>>>> TW.target.insertText(mybullet)
>>>>
>>>>
>>>>
>>>>
>>>>> ------------------------
>>>>> doesn't work for me.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alain
>>>>>
>>>>> Le 15/06/2011 01:10, Paul A Norman a écrit :
>>>>>>
>>>>>> P.S. a simple script for inserting bullets if keyboard is too
>>>>>> difficult
>>>>>>
>>>>>> // TeXworksScript
>>>>>> // Title: Make Bullet
>>>>>> // Description: Inserts a bullet for autocompletion
>>>>>> // Author: Paul Norman
>>>>>> // Version: 0.1
>>>>>> // Date: 2011-03-05
>>>>>> // Script-Type: standalone
>>>>>> // Context: TeXDocument
>>>>>> // Shortcut: Alt+M, Alt+B
>>>>>>
>>>>>> TW.target.insertText("\u2022");
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
More information about the texworks
mailing list