Bitcoin symbol in LaTeX

Three examples, from here:

\def\bitcoinA{%
  \leavevmode
  \vtop{\offinterlineskip %\bfseries
    \setbox0=\hbox{B}%
    \setbox2=\hbox to\wd0{\hfil\hskip-.03em
    \vrule height .3ex width .15ex\hskip .08em
    \vrule height .3ex width .15ex\hfil}
    \vbox{\copy2\box0}\box2}}

and

\def\bitcoinB{\leavevmode
  {\setbox0=\hbox{\textsf{B}}%
    \dimen0\ht0 \advance\dimen0 0.2ex
    \ooalign{\hfil \box0\hfil\cr
      \hfil\vrule height \dimen0 depth.2ex\hfil\cr
    }%
  }%
}

and

\def\bitcoinC{\leavevmode\rlap{\hskip.5pt-}B} 

enter image description here


A variant, more inline with the “official” rendering (see http://bitcoinsymbol.org)

\documentclass{article}

\DeclareRobustCommand{\bitcoin}{{%
  \normalfont\sffamily
   \raisebox{-.05ex}{\makebox[.1\width][l]{-\kern-.2em-}}B%
}}

\begin{document}

\bitcoin

\end{document}

enter image description here

Of course the adjustments depend on the document sans serif font.

From the site:

enter image description here


Thanks for the bitcoin symbol. Here is an attempt at drawing the Litecoin symbol in latex

\newcommand{\diaCo}{\mkern-\medmuskip\rotatebox[origin=c]{45}{\scalebox{0.9}{$-$}}\mkern-\medmuskip}%   
\def\litecoin{\leavevmode\rlap{\hskip-1.3pt \textbf{$\diaCo$}}L} 

enter image description here

Tags:

Symbols