The appearance of the care symbol depends on the used font. For example, Courier
or TeX Gyre Cursor
has a symbol that is something between the caret of the Computer Modern fonts and the \wedge
solution.
The following example uses \lstinline
instead of \verb
, because a symbol can more easily be replaced via option literate
:
\documentclass{article}
\usepackage{listings}
\newcommand*{\caret}{%
\begingroup
\fontencoding{T1}%
\fontfamily{qcr}% TeX Gyre Cursor
%\fontfamily{pcr}% Courier
\selectfont
\string^%
\endgroup
}
\lstdefinestyle{caret}{
basicstyle=\ttfamily,
literate={^}{\caret}{1},
}
\newcommand*{\lstverb}{\lstinline[style=caret]}
\begin{document}
\begin{tabular}{ll}
\verb|\verb|: &
\verb|x^3+x^2-1| \\
\verb|\wedge|: &
\texttt{x$^\wedge$3+x$^\wedge$2-1} \\
\verb|\lstinline| + \verb|\caret|: &
\lstverb|x^3+x^2-1| \\
\end{tabular}
\end{document}
![Result](https://i.stack.imgur.com/3eM0r.png)
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
}
\newcommand{\solidfill}[1]{\leaders\hrule\hfill}
\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}
![enter image description here](https://i.stack.imgur.com/YicW1.png)
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
![enter image description here](https://i.stack.imgur.com/UX7JW.png)
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.
Best Answer
If you don't like the default location in inline math, you can use
\raisebox{<length>}{}
to tweak the vertical position. To get the same behavior in display math use\nolimits
:Code: