3

all. I need some help with subscript and superscript in a non-math context. I am using \textsubscript now but this turned out to be very inconvenient. I tried $a_1$ but the letter turned out to be in italic, which is not what I want. Is there a similar shortcut for sub(super)script that does not make letters in italics? Thanks.

  • Do you need this for chemical formulas? – egreg Oct 11 '15 at 15:31
  • No.. I need it for logic. – H.Hong Oct 11 '15 at 15:48
  • Maybe you can add an example, so you can get better help; not that Mico's answer i s bad, but sometimes it happens that there are better ways for accomplishing a task. – egreg Oct 11 '15 at 15:51
  • Basically, I need to say something like "o1 is F1, o2 is F2... on is Fn" (1, 2,..., n as subscripts), and I also need to refer to them a lot in one single paragraph. And that's it. – H.Hong Oct 11 '15 at 18:16
  • A proper example would help to ensure the most effective answer for your situation, as @egreg suggested. – cfr Aug 29 '16 at 2:37
4

Are the following two shortcut macros

\newcommand\tsub[1]{\textsubscript{#1}}
\newcommand\tsup[1]{\textsuperscript{#1}}

convenient enough?

  • Wouldn't \newcommand\tsub{\textsubscript} be more efficient? – campa Oct 11 '15 at 15:26
  • Ha. thanks. this shows i'm new to the latex world... – H.Hong Oct 11 '15 at 15:28
  • 2
    @campa - I believe it's good programming practice to indicate explicitly how many arguments a given macro is supposed to take. If sheer brevity/terseness were a goal, I'd go with \let\tsb\textsubscript and \let\tsp\textsuperscript. – Mico Oct 11 '15 at 15:30
  • I'd use \newcommand* .... – cfr Aug 29 '16 at 2:36

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.