Others ⇒ In TexStudio, how to define macro for a command with text
In TexStudio, how to define macro for a command with text
I am writing my text in Arabic, but sometimes I have English sentences. Those need to be done like this:
\textenglish{sample text here}
I was able to define new macro for that command, but I want to go a step further, I want that when I select a text, and press the macro shortcut, I want the text to be entered into that command, and NOT overwritten. This actually works with the $..$ environment/command shortcut provided by default in TexStudio.
Any idea?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: In TexStudio, how to define macro for a command with tex
%< ... %>
in macros, whereas the ... stand for the default input at that place. If you then mark some text and use the macro, the marked text is inserted there instead of the default.