Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Identifying the TeXgroups in search-replace

2012-06-05
2012-10-17
  • SEHAR TAHIR
    SEHAR TAHIR
    2012-06-05

    Dear All,

    I want to add a short cut to TeXStudio where my script searches a command say
    "\newinsert{...}" in the file, removes the command i.e. its TeXgroup and only
    the data is left in the file. I can use Perl or any other script, but these
    scripts will not auto-identify the TeXgroups, so I want to make use of the
    internal mecahnism of TeXStudio to indentify these tex groups.

    Any suggestion in this regard is welcome.

    Best Wishes!
    Ms. Sehar

     
  • so I want to make use of the internal
    mecahnism of TeXStudio to indentify these tex groups.
    You can't access our LaTeX parser from scripts.

    I could add it, but the parser is not that great, because it only splits each
    line
    into tokens. (e.g. "\test{foo bar\xyz{123}}" becomes "\test, {, foo, bar,
    \xyz, {, 123, }, }")

    It is probably easier to use a regular expression with the editor.replace
    method

     
  • SEHAR TAHIR
    SEHAR TAHIR
    2012-06-19

    Thanks a lot!

    ... Sehar