# How to insert a dashed line over a bigwedge symbol so that the dashed line behaves like overline would?

I want to insert a dashed line over symbols \bigwedge and \bigvee in such a way that it looks exactly like a solid line over the same symbols. I know how to insert a solid line over those symbols (for example, \overline{\bigwedge}). Since I asked a question a few years ago about how to add a dashed arrow over a letter, I tried to use the code from there. Resulting code:

\documentclass[11pt,a4paper,draft]{amsart}
\pagestyle{plain}
\usepackage[a4paper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{tikz} %for dash

\makeatletter

\newcommand{\preclosure}[1]{%
\vbox {\m@th\ialign{##\crcr
\preclosurefill \crcr
\noalign{\kern-\p@\nointerlineskip}
$\hfil\displaystyle{#1}\hfil$\crcr}}}

%% fill with (short) minus signs
\def\preclosurefill{%
$\m@th% \xleaders\hbox{$\mkern0mu\shortbar\mkern0mu$}\hfill% \shortbar%$}

%% make the minus shorter to fit \dashedleftarrow
\def\shortbar{%
\smash{\scalebox{0.4}[1.0]{$-$}}}
\makeatother

\begin{document}

In order to distinguish between lattice operations $\bigvee, \bigwedge$ in structure A, we use the following symbols: $\overline{\bigvee}, \overline{\bigwedge}$. Similarly, to distinguish between operations $\bigvee, \bigwedge$ in structure B, we use the following symbols: $\preclosure{\bigvee}, \preclosure{\bigwedge}$.

Inline: $\overline{\bigvee}_{\alpha \in I}$, $\preclosure{\bigvee}_{\alpha \in I}$.

In separate line:
$\overline{\bigvee_{\alpha \in I}}, \preclosure{\bigvee_{\alpha \in I}}.$
\end{document}


Resulting document:

I have the following problems:

1. Somehow in inline mode the $\preclosure{\bigwedge}$ symbol is made bigger than just $\bigwedge$.
2. The dashed line does not allocate vertical space and runs into text
3. It seems to me that when $\overline{\bigvee}$ is inline, then the overline is too close to the V symbol, making it look almost like triangle. If I zoom in, then I can see that it is not so, but at 100% zoom it looks too close. How to move the overline a bit higher? Or do You think that this is not a problem?

It is not necessary to use exactly the same code I wrote, I just used what I already had, but not successfully :)

• As for #1, your \preclosure macro has \displaystyle in it. That is how it ends up bigger. – Matthew Leingang Dec 17 '14 at 13:51
• Hm, I tried to remove the \displaystyle{#1} and replace it with #1, which resulted in the symbol \bigvee being small inline AND in math mode, which is not desirable. – Rauni Dec 17 '14 at 14:01
• Well now you have the opposite problem. The dollar signs put it into inline mode! So you could use \mathchoice or find a way to not use a specific math mode. – Matthew Leingang Dec 17 '14 at 16:30

I'd avoid \overline:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\dashover}[2][\mathop]{#1{\mathpalette\df@over{{\dashfill}{#2}}}}
\newcommand{\fillover}[2][\mathop]{#1{\mathpalette\df@over{{\solidfill}{#2}}}}
\newcommand{\df@over}[2]{\df@@over#1#2}
\newcommand\df@@over[3]{%
\vbox{
\offinterlineskip
\ialign{##\cr
#2{#1}\cr
\noalign{\kern1pt}
$\m@th#1#3$\cr
}
}%
}
\newcommand{\dashfill}[1]{%
\kern-.5pt
\xleaders\hbox{\kern.5pt\vrule height.4pt width \dash@width{#1}\kern.5pt}\hfill
\kern-.5pt
}
\newcommand{\dash@width}[1]{%
\ifx#1\displaystyle
2pt
\else
\ifx#1\textstyle
1.5pt
\else
\ifx#1\scriptstyle
1.25pt
\else
\ifx#1\scriptscriptstyle
1pt
\fi
\fi
\fi
\fi
}
\makeatother

\begin{document}

Text:
$\bigvee_{\alpha\in I}$,
$\fillover{\bigvee}_{\alpha \in I}$,
$\dashover{\bigvee}_{\alpha \in I}$.

Subscript:
$\scriptstyle\bigvee_{\alpha\in I}$,
$\scriptstyle\fillover{\bigvee}_{\alpha \in I}$,
$\scriptstyle\dashover{\bigvee}_{\alpha \in I}$.

Display:
$\bigvee_{\alpha \in I} \fillover{\bigvee}_{\alpha \in I} \dashover{\bigvee}_{\alpha \in I}.$
\end{document}


You probably want to define

\newcommand{\fbigvee}{\fillover{\bigvee}}


\newcommand{\dbigvee}{\dashover{\bigvee}}

The commands \fillover and \dashover have an optional argument that sets the type of the object. Default is \mathop, but it can be \mathrel or \mathbin, so you could use

\newcommand{\dvee}{\dashover[\mathbin]{\vee}}


and $x\dvee y$ would produce

You may want to adjust the separation space, the argument to \noalign in the code for \df@@over. However, the macro is not optimized for usages other than \mathop, something more should be done in the case of other types.

• Thank You for Your detailed reply. I currently only need the \mathop variant, but thank You for including the possibility for \mathrel and \mathbin variants. I adjusted the separataion space to 2pt and it looks very good. Plus, I like how the dashed and solid lines come from the same code, so I can be sure that they behave similarly. Super! – Rauni Dec 18 '14 at 10:12

This may have the drawback of slightly affecting line spacing, but...

I substitute \Overline which does an \overline with a little extra stack gap added.

And for \preclosure, I modified it so that it preserves the math style of the argument, using the \ThisStyle{...\SavedStyle...} construct of the scalerel package.

I did not really address the issue of not enough gap between the \preclosure and the line above it. I would suggest either using smaller wedges (if that is permitted), or going to larger line spacing.

\documentclass[11pt,a4paper,draft]{amsart}
\pagestyle{plain}
\usepackage[a4paper]{geometry}
\usepackage{scalerel,stackengine}
\stackMath
\usepackage[utf8]{inputenc}
\usepackage{tikz} %for dash

\makeatletter

\newcommand{\preclosure}[1]{%
\ThisStyle{%
\vbox {\m@th\ialign{##\crcr
\preclosurefill \crcr
\noalign{\kern-\p@\nointerlineskip}
$\hfil\SavedStyle{#1}\hfil$\crcr}}}}

%% fill with (short) minus signs
\def\preclosurefill{%
$\m@th% \xleaders\hbox{$\mkern0mu\shortbar\mkern0mu$}\hfill% \shortbar%$}

%% make the minus shorter to fit \dashedleftarrow
\def\shortbar{%
\smash{\scalebox{0.4}[1.0]{$-$}}}
\makeatother

\begin{document}

In order to distinguish between lattice operations $\bigvee, \bigwedge$ in structure A, we use the following symbols: $\Overline{\bigvee}, \Overline{\bigwedge}$. Similarly, to distinguish between operations $\bigvee, \bigwedge$ in structure B, we use the following symbols: $\preclosure{\bigvee}, \preclosure{\bigwedge}$.

Inline: $\Overline{\bigvee}_{\alpha \in I}$, $\preclosure{\bigvee}_{\alpha \in I}$.

In separate line:
$\Overline{\bigvee_{\alpha \in I}}, \preclosure{\bigvee_{\alpha \in I}}.$
\end{document}


• Thank You both for Your effort. Both suggestions are very good; however, egreg's answer has a bit better spacing, so I chose that at the moment. – Rauni Dec 18 '14 at 9:48