[texworks] Need Help creating a script

Mark Yagnatinsky markyag at gmail.com
Fri Aug 19 22:40:24 CEST 2016


YAY :)

On Fri, Aug 19, 2016 at 11:56 AM, Johannes Heck <heck.johannes at gmail.com>
wrote:

> Replace: \n
> With: \\\\\n
>
> works fine. As TeXWorks is able to remember the last search&replace
> requests, that works fine for me. No need for a script.
>
> Thanks, Johannes
>
> 2016-06-18 10:21 GMT+02:00 Mark Yagnatinsky <markyag at gmail.com>:
>
>> Ignasis said what I should have said.  To be even more explicit:
>>
>> Replace: \n
>> With: \\\\\n
>>
>> Make sure the following are checked: Regular expression, and Replace
>> within selection
>>
>> And if something goes wrong, there's always Undo :)
>>
>> On Sat, Jun 18, 2016 at 3:35 AM, Ignasi <nignasi at gmail.com> wrote:
>> > The search window shows an option for using "regular expressions", just
>> mark
>> > it and find_&_replace mechanism will support regular expressions
>> natively.
>> >
>> > Ignasi
>> >
>> > El 18/06/2016 a les 1:13, Reinhard Kotucha ha escrit:
>> >>
>> >> On 2016-06-17 at 16:41:39 -0400, Mark Yagnatinsky wrote:
>> >>
>> >>   > why not just use search & replace?
>> >>
>> >> This is exactly what Johannes had in mind when he said that he
>> >> probably needs regular expressions.  The usual search & replace
>> >> functions don't allow to specify the end of a line in the search part.
>> >>
>> >> IMO it would be best if TeXwork's find_&_replace mechanism supports
>> >> regular expressions natively, one way or another, without the need to
>> >> call external scripts.  Regexps are supported by Qt, hence the
>> >> implementation shouldn't be too difficult.
>> >>
>> >> The difficult part is the user interface.  Since TeXworks is supposed
>> >> to lower the barrier to entry, unexperienced users shouldn't be
>> >> bothered with things they don't understand.  On the other hand it's
>> >> necessary to support experienced users too.
>> >>
>> >> Designing a good graphical user interface is always a big challenge.
>> >>
>> >> Regards,
>> >>    Reinhard
>> >>
>> >>   > On Fri, Jun 17, 2016 at 7:24 AM, Johannes Heck
>> >> <heck.johannes at gmail.com> wrote:
>> >>   > > Dear TW-Users,
>> >>   > >
>> >>   > > I want to create a TW script that inserts a \\ linewrap at the
>> >>   > > end of every line of a selected text.  I guess I'll have to use
>> >>   > > some regex, but I don't now how to start...  Can anyone help?
>> >>   > >
>> >>   > > Thanks!
>> >>
>> >
>> >
>> > ---
>> > Aquest correu electrònic s'ha verificat mitjançant l'Avast antivirus.
>> > https://www.avast.com/antivirus
>> >
>> >
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20160819/44436951/attachment-0001.html>


More information about the texworks mailing list