Function definition with LaTeX

Function definition with LaTeX

3
NewbieNewbie
3

    Jun 22, 2009#1

    Hi there,

    I like to use function definition with \section in LaTeX so I can see the structure of a document when I see function list in UltraEdit. Before upgrading to UE15, it worked, but after the update it stopped working. (No Functions! message at funtion list)

    Here is the header for my LaTeX Wordfile:

    Code: Select all

    /L14"TeX/LaTeX" LATEX_LANG Noquote Line Comment Num = 2% String Chars = {} File Extensions = LAT TEX LEX
    /Colors = 0,8421376,8421376,8421504,255,
    /Colors Back = 16777215,16777215,16777215,16777215,16777215,
    /Colors Auto Back = 1,1,1,1,1,
    /Font Style = 0,2,0,0,0,
    /Regexp Type = Perl
    /Function String = "\\section{([^}]+)}"
    /Delimiters = #$%&()+,-. /0123456789:;<=>[\]^_{|}~`
    /Open Brace Strings =  "{"
    /Close Brace Strings = "}"
    /Marker Characters = "{}"
    /C1 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
    
    I tried many things with /Function String = "RegEx" in case I had it wrong, but no luck. I have never succeeded.

    Any help will be very apprecieated.

    Best Regards,
    Joon

    6,686585
    Grand MasterGrand Master
    6,686585

      Jun 22, 2009#2

      You have really used that Perl function string before?

      If I copy that regular expression string into the find dialog and try to run a Perl regex search with it, I get an error message indicating that this is an invalid regular expression. Correct is:

      \\section\{([^}]+)\}
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Jun 22, 2009#3

        That RegEx was what I was using previously, which was working with UE14. The one I posted was wrong because I did a lot of tests since it stopped working with the RegEx. I tried that again but still no luck. :cry:

        Best Regards,
        Joon

        6,686585
        Grand MasterGrand Master
        6,686585

          Jun 23, 2009#4

          Do you have also some example lines, so I can test it too? I don't have a LaTeX file for testing.

          Try also deleting line /Regexp Type = Perl and use following UltraEdit regular expression:

          /Function String = "\section{^([~}]+^)}"

          or better when } is always on the same line as {

          /Function String = "\section{^(?+^)}"


          The Perl version for the regular expression string above would be:

          /Function String = "\\section\{(.+)\}"

          Maybe this one works better because it can't span over multiple lines.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Jun 23, 2009#5

            Mofi wrote:Do you have also some example lines, so I can test it too? I don't have a LaTeX file for testing.

            Code: Select all

            \section{Analytic derivation}
            
            \section{A Numerical Simulation}
            
            \section{Conclusion}
            
            \appendix
            
            Mofi wrote: Try also deleting line /Regexp Type = Perl and use following UltraEdit regular expression:

            /Function String = "\section{^([~}]+^)}"

            or better when } is always on the same line as {

            /Function String = "\section{^(?+^)}"
            I tried

            Code: Select all

            /Function String = "\section{^(?+^)}"
            , and it worked! Since the Perl style RegEx worked in 14 version, I think there might be a bug ..

            Thanks a lot for your help. I really appreciate it.

            Joon