# Tikz Sub/superscripts within a node

I just started using TikZ, and I'm still reaqcuainting myself with LaTex in general. When defining a node in TikZ, how do I apply simple stylistic things like subscripts and superscripts?

• Welcome. In the usual way. In math mode, a simple ^ is sufficient, e.g. $x^y$ and in text mode you can do 2\textsuperscript{nd}, say, and similarly for subscripts: e.g. $a_i$. E.g. \documentclass{article} \usepackage{tikz} \begin{document} \tikz{\node[circle,draw]{$x^y$};} \tikz{\node[circle,draw]{2\textsuperscript{nd}};} \tikz{\node[circle,draw]{$a_i$};} \end{document}. – Schrödinger's cat Sep 11 '19 at 22:07