# Decrease spacing between double bars [duplicate]

I'd like double bars over my X, that I can get using these overline symbols

$\overline{\overline{X}}$


I also tried the bar symbols, but they're misaligned over the X.

$\bar{\bar{X}}$


What I end up with is two bars, but the spacing seems too large between the bars. How do I decrease the spacing with double bars?

## marked as duplicate by egreg math-mode StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Apr 29 at 14:57

A general version that works across math styles.

\documentclass{article}
\usepackage{amsmath,scalerel}
\newcommand\doverline[1]{\ThisStyle{%
\setbox0=\hbox{$\SavedStyle\overline{#1}$}%
\ht0=\dimexpr\ht0-.15ex\relax% CHANGE .15 TO AFFECT SPACING
\overline{\copy0}%
}}

\begin{document}
$\overline{X} + \doverline{X}$

$\scriptstyle\overline{X} + \doverline{X}$

$\scriptscriptstyle\overline{X} + \doverline{X}$
\end{document}


If you only require it in \displaystyle,

\documentclass{article}
\usepackage{amsmath}
\newcommand\doverline[1]{%
\setbox0=\hbox{$\overline{#1}$}%
\ht0=\dimexpr\ht0-.15ex\relax% CHANGE .15 TO AFFECT SPACING
\overline{\copy0}%
}

\begin{document}
$\overline{X} + \doverline{X}$
\end{document}

• @Sebastiano As they say, there are many ways to skin a cat! – Steven B. Segletes Apr 29 at 15:39
• It is absolutely true. But I wanted to beat you ahahahah. My regards. – Sebastiano Apr 29 at 15:41