3
$\begingroup$

I want to write a question in which I have a bar on top of a number or letter to represent a recurring digit. however, I can't find any options to write the particular digit, even when I search the help center for Latex, which is supposed to be used to edit any math statements. What will I use to write it ?

Any suggestions will be appreciated.

$\endgroup$
4
  • 4
    $\begingroup$ $\overline{5}$$=\overline{5}$. $\endgroup$
    – David Roberts Mod
    Jun 25, 2023 at 10:18
  • 1
    $\begingroup$ @DavidRoberts thanks ! $\endgroup$ Jun 25, 2023 at 10:56
  • $\begingroup$ Corresponds to \underline $\endgroup$ Jun 26, 2023 at 15:30
  • $\begingroup$ @DavidRoberts, re, in case it's of interest, you can fix the poor spacing with a spurious atom: $\overline{5}$${}= \overline{5}$ `$\overline{5}$` ${}= \overline{5}$. $\endgroup$
    – LSpice
    Jun 29, 2023 at 23:57

1 Answer 1

8
$\begingroup$

To give the question an answer so it can be accepted: you can use $\overline{...}$ to get a bar over any letter or digit or group thereof.

$\endgroup$
3
  • 1
    $\begingroup$ Alrernatively, $\bar{5}$ $\bar{5}$ $\endgroup$ Jun 25, 2023 at 12:36
  • 1
    $\begingroup$ @TheAmplitwist, re, good point! Let's put them side by side to see the subtle difference: $\overline5\bar5$ \overline5\bar5. It's less subtle when overlining groups: $\overline5\overline6\overline{56}\bar5\bar6\bar{56}$ \overline5\overline6\overline{56}\bar{56}\bar5\bar6. (I don't see a rendering difference between \overline5\overline6 and \overline{56}, though the widths probably differ slightly. I include \bar{56} for parallelism, but, of course, it is almost certainly not what is desired.) $\endgroup$
    – LSpice
    Jun 25, 2023 at 18:55
  • 1
    $\begingroup$ Re, oops, I somehow switched \bar{56} and \bar5\bar6 between the actual code and the quoted code. They look like $\bar{56}$ \bar{56} vs. $\bar5\bar6$ \bar5\bar6. $\endgroup$
    – LSpice
    Jul 16, 2023 at 18:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .