How to create simple macro (user tag) with content placeholder?

TXS - Help
  • VYS

    VYS - 2013-04-22


    I just want to create a command user tag, for example, my macro is:

    Name: vect
    Abbreviation: \vect
    Type: Normal
    Content: \vect{%}

    "%" sign in this case represents a content that I select in my editor (in TeXmaker I used the @ sign, it worked well), however when I select some text, e.g. A, and use the command, I get \vect{%} instead of \vect{A}, so % is not substituted by content. What's wrong?

    Thank you in advance.


    Last edit: VYS 2013-04-22
  • Denis Bitouzé

    Denis Bitouzé - 2013-04-22

    What's wrong?

    You forgot a pipe character: \vect{%} -> \vect{%|}

    Have a look at § 4.5.1 "Text macros" of TeXstudio manual.

    Thank you in advance.

    You're welcome.


Log in to post a comment.