Simple macro question: environment

TXS - Help
2013-04-03
2013-04-03
  • Hi,

    I am learning to create simple environment macros. From the macros edit, I have created the following macro:

    Name: itemize
    Abbreaviation: [empty]
    Trigger: (?=\S)%
    Type: environment
    Latex content: %itemize

    when I type itemize% then I got:

    itemize\begin{itemize}
    content...
    \end{itemize}

    of if change

    Trigger: (?=\s^|)%

    and I type itemize% then I got:

    \begin{itemize}
    content...
    \end{itemize}itemize

    How can get:
    \begin{itemize}
    content...
    \end{itemize}itemize

    after typing %itemize or itemize% ?

    Thank you

     
    • Have you tried "itemize%" without any special characters ?

      On 03.04.2013 12:56, Zulkifli Hidayat wrote:

      Hi,

      I am learning to create simple environment macros. From the macros
      edit, I have created the following macro:

      Name: itemize
      Abbreaviation: [empty]
      Trigger: (?=\S)%
      Type: environment
      Latex content: %itemize

      when I type itemize% then I got:

      itemize\begin{itemize}
      content...
      \end{itemize}

      of if change

      Trigger: (?=\s^|)%

      and I type itemize% then I got:

      \begin{itemize}
      content...
      \end{itemize}itemize

      How can get:
      \begin{itemize}
      content...
      \end{itemize}itemize

      after typing %itemize or itemize% ?

      Thank you
      

      Simple macro question: environment
      https://sourceforge.net/p/texstudio/discussion/907840/thread/6da6c24d/?limit=25#2a09


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/texstudio/discussion/907840/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/