Dirk's Tech Findings

Latex: Overlines run into each other

Publication date: 2023-10-30

Issue: Overlines in Latex run into each other

Using "\overline{a}\overline{b}" looks the same as "\overline{ab}" in a Latex formula. This is not desired, especially when it has a different meaning like in Boolean algebra

Solution: Shorten the overlines using a custom command

Define a new command and afterwards use "\closure{a}\closure{b}" instead of "\overline{a}\overline{b}":

\newcommand{\closure}[2][3]{%
{}\mkern#1mu\overline{\mkern-#1mu#2}}

Hint towards the solution

Back to topic list...