Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

\documentclass[12pt]{article}
\special{papersize=3in,5in}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsmath}
\pagestyle{empty}
\setlength{\parindent}{0in}
\begin{document}

\end{document}

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

share|improve this question
    
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

1 Answer 1

up vote 4 down vote accepted

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

\def\thinspace{\kern .16667em }
\def\negthinspace{\kern-.16667em }
\def\enspace{\kern.5em }
\def\enskip{\hskip.5em\relax}
\def\quad{\hskip1em\relax}
\def\qquad{\hskip2em\relax}

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

\documentclass{article}
\begin{document}
$(\overline{x+y})=\overline{x}\overline{y}$
\end{document}

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

\documentclass{article}
\begin{document}
$(\overline{x+y})=\overline{x}\thinspace\overline{y}$
\end{document}

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.