Hexagon symbol[⬡,⬢,⬣]in LaTeX

The blog covers some packages to create hexagon symbols in LaTeX documents.

Let’s dig in

The wasysym package to create a Hexagon symbol in LaTeX

\usepackage{wasysym}
 \hexagon
\hexagon
 \varhexagon
\varhexagon

The stix package to create a Hexagon symbol in LaTeX

\usepackage{stix}
 \hexagon
\hexagon
\hexagonblack
\hexagonblack
 \varhexagon
\varhexagon
 \varhexagonblack
\varhexagonblack
\varhexagonlrbonds
\varhexagonlrbonds

The oplotsymbl package to create a Hexagon symbol in LaTeX

\usepackage{oplotsymbl}

Rendered by QuickLaTeX.com


\hexago

Rendered by QuickLaTeX.com


\hexagocross

Rendered by QuickLaTeX.com


\hexagodot

Rendered by QuickLaTeX.com


\hexagofill

Rendered by QuickLaTeX.com


\hexagofillha

Rendered by QuickLaTeX.com


\hexagofillhb

Rendered by QuickLaTeX.com


\hexagofillhl

Rendered by QuickLaTeX.com


\hexagofillhr

Rendered by QuickLaTeX.com


\hexagolineh

Rendered by QuickLaTeX.com


\hexagolinev

Rendered by QuickLaTeX.com


\hexagolinevh

Color the hexagon symbol with oplotsymbl package

Rendered by QuickLaTeX.com


\hexagofill[red]

Rendered by QuickLaTeX.com


\hexagofill[green]

Rendered by QuickLaTeX.com


\hexagofill[white]

Rendered by QuickLaTeX.com


\hexagofillhl [ored]

Rendered by QuickLaTeX.com


\hexagofillhr [ored]

Rendered by QuickLaTeX.com


\hexagofillhb [ored]

Rendered by QuickLaTeX.com


\hexagofillha [ored]

Rendered by QuickLaTeX.com


\hexagocross [oblue]

Rendered by QuickLaTeX.com


\hexagolinevh [oblue]

Rendered by QuickLaTeX.com


\hexagolineh [oyellow]

Rendered by QuickLaTeX.com


\hexago [ored]

furthermore, you can customize the hexagon symbol size by using a package called lmodern

\usepackage{lmodern}

Rendered by QuickLaTeX.com

{\fontsize{100}{10.5}{ \hexago [ored]}}

Now from here, we will build some custom hexagon symbols

But to do that we need a package called tikz

\usepackage{tikz}

Here are the \newcommand lines that you need to copy and paste into your LaTeX document.

But why should I copy-paste it?

Because we won’t be able to create custom commands without the \newcommand lines

\newcommand{\hexago}[1]{\begin{tikzpicture}
    \draw [line width=0.05em,{#1}] 
      (30:0.34em) -- (90:0.34em) -- (150:0.34em) -- (210:0.34em) 
      -- (270:0.34em) -- (330:0.34em) -- cycle; \end{tikzpicture}}
\newcommand{\hexagoH}[1]{\begin{tikzpicture}
\draw [scale=0.135,{#1}]
(0,0) -- ++(1,0) -- ++(60:1)
-- ++(120:1) -- ++(180:1) --
++(240:1) -- ++(300:1) -- cycle;
\end{tikzpicture}}

Thats it! We did our job.

Here are the custom commands that you can use anywhere in your LaTeX document

\hexago {}
\hexago {help lines}
\hexago {double}
\hexago {dashed}
\hexago {dotted}
\hexago {loosely dashed}
\hexago {loosely dotted}
\hexago {densely dotted}
\hexago {densely dashed}
\hexago {red}
\hexago {cyan}
\hexago {yellow}
\hexago {purple}
\hexago {green}
\hexago {blue}
\hexago {violet}
\hexago {ultra thin}
\hexago {very thin}
\hexago {thin}
\hexago {semithick}
\hexago {thick}
\hexago {very thick}
\hexago {ultra thick}
\hexago {dash pattern=on 1pt off 1pt}
\hexago {dash pattern=on 2pt off 2pt}
\hexago {dash pattern=on 0.3pt off 0.3pt}
\hexago {dash pattern=on 0.5pt off 0.5pt}
\hexago {dash pattern=on 0.8pt off 0.8pt}
\hexago {double distance=2pt}
\hexago {double distance=3pt}
\hexago {double distance=1pt}
\hexago {double distance=0.5pt}
\hexago{dash pattern=on 0.5mm off 0.1mm on 1mm off 0.2mm}
\hexago{dash pattern=on 0.5mm off 0.1mm on 0.11mm off 0.2mm}

Is it possible to increase the hexagon symbol size?

Yes! You can, here’s an example

Pro Tip:  increase the hexagon symbol size  by adjusting its scale size

Pretty effective right?

\hexago  {scale=2.135}  
\hexago  {scale=4.135}
\hexago  {scale=6.135}

Here are some more custom commands

\hexagoH  {}
\hexagoH {help lines}
\hexagoH {double}
\hexagoH {dashed}
\hexagoH {dotted}
\hexagoH {loosely dashed}
\hexagoH {loosely dotted}
\hexagoH {densely dotted}
\hexagoH {densely dashed}
\hexagoH {red}
\hexagoH {cyan}
\hexagoH {yellow}
\hexagoH {purple}
\hexagoH {green}
\hexagoH {blue}
\hexagoH {violet}
\hexagoH {ultra thin}
\hexagoH {very thin}
\hexagoH {thin}
\hexagoH {semithick}
\hexagoH {thick}
\hexagoH {very thick}
\hexagoH {ultra thick}
\hexagoH {dash pattern=on 1pt off 1pt}
\hexagoH {dash pattern=on 2pt off 2pt}
\hexagoH {dash pattern=on 0.3pt off 0.3pt}
\hexagoH {dash pattern=on 0.5pt off 0.5pt}
\hexagoH {dash pattern=on 0.8pt off 0.8pt}
\hexagoH {double distance=2pt}
\hexagoH {double distance=3pt}
\hexagoH {double distance=1pt}
\hexagoH {double distance=0.5pt}
\hexagoH{dash pattern=on 0.5mm off 0.1mm on 1mm off 0.2mm}
\hexagoH{dash pattern=on 0.5mm off 0.1mm on 0.11mm off 0.2mm}

Let’s adjust the size

\hexagoH  {scale=2.135}  
\hexagoH  {scale=4.135}
\hexagoH  {scale=6.135}

Mohammed Anees

Hey there, welcome to aneescraftsmanship I am Mohammed Anees an independent developer/blogger. I like to share and discuss the craft with others plus the things which I have learned because I believe that through discussion and sharing a new world opens up

Leave a Reply

Your email address will not be published.