How do I get a dashed or dotted checkmark in LaTeX (either math mode or text mode is fine). I'm looking for a symbol approximately like
[Tex/LaTex] How to make a dashed or dotted checkmark
symbols
Related Solutions
Nothing special is needed here; standard LaTeX provides \textvisiblespace
:
\documentclass{article}
\begin{document}
An explicit space: a\textvisiblespace b
\end{document}
A simple variation of the original definition:
\DeclareTextCommandDefault{\textvisiblespace}{%
\mbox{\kern.06em\vrule \@height.3ex}%
\vbox{\hrule \@width.3em}%
\hbox{\vrule \@height.3ex}}
allows to control the width using an optional argument:
\documentclass{article}
\newcommand\Vtextvisiblespace[1][.3em]{%
\mbox{\kern.06em\vrule height.3ex}%
\vbox{\hrule width#1}%
\hbox{\vrule height.3ex}}
\begin{document}
An explicit space: a\textvisiblespace b
An explicit space: a\Vtextvisiblespace b
An explicit 1em space: a\Vtextvisiblespace[1em]b
An explicit 1cm space: a\Vtextvisiblespace[1cm]b
\end{document}
Here is a pure LaTeX solution that uses \dashedleftarrow
from MnSymbol
, and makes it extendable with (shortened) minus signs, as usual for extendable accents. The new command to use is \odla{...}
, short for \overdashedleftarrow
.
\documentclass{article}
\usepackage{graphicx}
\usepackage{MnSymbol}
\makeatletter
\newcommand{\odla}[1]{%
\vbox {\m@th\ialign{##\crcr
\odlafill \crcr
\noalign{\kern-\p@\nointerlineskip}
$\hfil\displaystyle{#1}\hfil$\crcr}}}
%% fill with (short) minus signs
\def\odlafill{%
$\m@th\dashedleftarrowtip\mkern-5mu\cleaders\hbox{$\mkern4mu\shortbar\mkern-3mu$}\hfill\mkern-0.5mu$}
%% put 2pt space above and below the tip
\def\dashedleftarrowtip{%
\raisebox{\z@}[2pt][2pt]{$\mathord{\dashedleftarrow}$}}
%% make the minus shorter to fit \dashedleftarrow
\def\shortbar{%
\smash{\scalebox{0.4}[1.0]{$-$}}}
\makeatother
\begin{document}
\begin{equation*}
\odla{x} \quad \odla{ab} \quad \odla{abc} \quad \odla{abcd} \quad \odla{abcde} \quad \odla{a}^{\:\odla{b}} \quad \odla{abcdefghijklmnop}
\end{equation*}
\end{document}
In the likely case you don't want to use MnSymbol
as your math font just to have the \dashedleftarrow
we use as a the arrow tip here, we can use this symbol like this:
\documentclass{article}
\usepackage{graphicx}
\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareSymbolFont{MnSyA}{U}{MnSymbolA}{m}{n}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6> MnSymbolA5
<6-7> MnSymbolA6
<7-8> MnSymbolA7
<8-9> MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12-> MnSymbolA12}{}
\DeclareMathSymbol{\dashedleftarrow}{\mathrel}{MnSyA}{98}
\makeatletter
\newcommand{\odla}[1]{%
\vbox {\m@th\ialign{##\crcr
\odlafill \crcr
\noalign{\kern-\p@\nointerlineskip}
$\hfil\displaystyle{#1}\hfil$\crcr}}}
%% fill with (short) minus signs
\def\odlafill{%
$\m@th\dashedleftarrowtip\mkern-5mu\cleaders\hbox{$\mkern4mu\shortbar\mkern-3mu$}\hfill\mkern-0.5mu$}
%% put 2pt space above and below the tip
\def\dashedleftarrowtip{%
\raisebox{\z@}[2pt][2pt]{$\mathord{\dashedleftarrow}$}}
%% make the minus shorter to fit \dashedleftarrow
\def\shortbar{%
\smash{\scalebox{0.4}[1.0]{$-$}}}
\makeatother
\begin{document}
\begin{equation}
\odla{x} \quad \odla{ab} \quad \odla{abc} \quad \odla{abcd} \quad \odla{abcde} \quad \odla{a}^{\:\odla{b}} \quad \odla{abcdefghijklmnop}
\end{equation}
\end{document}
Best Answer
One possibility is to use TikZ for that.
Related: How to export svg to tikz