0

enter image description here

here's the code: \node[circle, draw=black, solid] (Q9) at (10.5,-1.5){Q9}; \node[circle, draw=black, solid] (Q10) at (9.0, -1.5){Q10};

1 Answers1

1

It is recommended that you post a minimal working example (MWE) that starts with \documentclass and ends with \end{document}.

Anyway, I came up with

\documentclass{standalone}
\usepackage{tikz}

\begin{document} \begin{tikzpicture} \node[circle, draw=black, solid] (Q9) at (10.5,-1.5){\phantom{Q10}}; \node at (Q9) {Q9}; \node[circle, draw=black, solid] (Q10) at (9.0, -1.5){Q10}; \end{tikzpicture} \end{document}

which produces the next output:

output

Notice how I put {\phantom{Q10}} in the first \node to get the spacing of Q10, and in the line below, I place the text Q9 at the coordinate (Q9).

  • thank you. I really appreciate it. but I still have a question. how can I add a subscript(number) in Q. just like Q_10 in latex. I tried. but it doesn't work and it will report an error. – wu Peter Dec 24 '20 at 05:07
  • The error is beacause the subscript written that way must be inside math mode. If you only need numbers, you could do Q$_{10}$ if you want an upright Q, or $Q_{10}$ for an italic Q. If you plan to have text in the subscript, another option would be Q\textsubscript{10}. And well, to have the correct spacing, you should change that as well inside the \phantom command – Luis Sibaja Dec 24 '20 at 06:12
  • thank you. have a good day – wu Peter Dec 24 '20 at 08:27