When using the following code I get unsightly spaces (following the opening parentheses, after the = and between the x' and y'):

[$](\quad \overline{x+y})=\quad \overline{x}\quad \overline{y}[/$]

Bad spacing

What am I doing wrong?

If it helps, I am using Anki with its default header and footer settings:



Also, please forgive me if I am unclear or have duplicated a question; I am new to TeX and unfamiliar with the terminology.

  • That did the trick. I assumed that it was a requisite prefix to \overline. Cheers! – somehume Oct 23 '11 at 6:28
  • In the previous example, this was included merely to separate the difference instances of negation. – Werner Oct 23 '11 at 6:46
  • That made sense to me as soon as I read your comment to remove them, thank you! – somehume Oct 23 '11 at 6:49

LaTeX provides a number of ways to print skips (blanks, or whitespace):

\def\thinspace{\kern .16667em }
\def\negthinspace{\kern-.16667em }
\def\enspace{\kern.5em }

The above are in addition to using \hspace{<len>} that you can use to print whitespace of length <len>. In your specific example, \quad skips "forward" by exactly 1em, which leaves the blank spaces you witness. Removing them leaves the correct typesetting:

enter image description here


With the introduction of some of these spaces, you can also improve the presentation by inserting (say) a \thinspace between the x and y:

enter image description here


For completeness, here's a table from Herbert Voss' mathmode document that illustrates some of the well-known spacing techniques/commands (Section 11.2 Additional horizontal spacing, Table 7, p 29):

enter image description here

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.