0

Are there any shorter keyword rather than using \textsubscript or \textsuperscript in TexStudio ?

Usually I use these two keyword to make a sub-/super-script in presentation. I found that even I tried \texttt{example\_example} or \verb|example\_example}|, both of these commands gave me an error and strange output as well.

Then I switch to use the kind of \textsubscript instead, it works well but very consuming the time.

So can I ask you guys for the another way that faster than using such of above those keywords ?

THX in adv.

  • Welcome to TeX.SX! Can you explain in which context you need these two commands? Usually there should be no need to use them frequently; and in math mode you have _ and ^. – gernot Nov 14 '16 at 8:59
  • @gernot I already tried these symbols, says, text_{text}, but unluckily TexStudio gave me an error every time of compiling. Btw, I do not sure that if I do need to change the program setting or not? – rangsiman Nov 14 '16 at 9:05
  • @gernot This text is some of error that I got. Missing $ inserted. \end{frame} Extra }, or forgotten $. \end{frame} Missing $ inserted. \end{frame} – rangsiman Nov 14 '16 at 9:07
  • Please add the code of a short document (starting with \documentclass and ending with \end{document}) to your question that illustrates your problem. Use the edit button left below of your posting. – gernot Nov 14 '16 at 9:09
  • Thx so much. @gernot – rangsiman Nov 14 '16 at 9:20
1

texstudio is completely unrelated to this question, it is just the editor you used to type the tex source. You would get the identical behaviour if you used notepad or emacs or even vim.

The behaviour is coming from latex. As with any command, you can define your own names. If you define

\newcommand\SB[1]{\textsubscript{#1}}

then you can use \SB{text} instead of \textsubscript{text}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.