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

\varhexagon
The stix package to create a Hexagon symbol in LaTeX
\usepackage{stix}

\hexagon

\hexagonblack

\varhexagon

\varhexagonblack

\varhexagonlrbonds
The oplotsymbl package to create a Hexagon symbol in LaTeX
\usepackage{oplotsymbl}
\hexago
\hexagocross
\hexagodot
\hexagofill
\hexagofillha
\hexagofillhb
\hexagofillhl
\hexagofillhr
\hexagolineh
\hexagolinev
\hexagolinevh
Color the hexagon symbol with oplotsymbl package
\hexagofill[red]
\hexagofill[green]
\hexagofill[white]
\hexagofillhl [ored]
\hexagofillhr [ored]
\hexagofillhb [ored]
\hexagofillha [ored]
\hexagocross [oblue]
\hexagolinevh [oblue]
\hexagolineh [oyellow]
\hexago [ored]
furthermore, you can customize the hexagon symbol size by using a package called lmodern
\usepackage{lmodern}
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}

Leave a Reply