TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

Hexagon Symbol
 Main page Index UK FAQ Documentation Software CTAN Search CTAN: Statistics Google c.t.t. Google d.c.t.t.

The is part of the wasysym-package. This can be printed in different sizes, for example: \Huge\hexagon.

Especially for greater hexagons I wrote a new command \myHexagon{radian}, which draws with the package PSTricks hexagons in any size. The parameter is the radius of the surrounding circle. \myHexagon{2.5cm} gives a hexagon with diameter of 6cm of the surrounding circle: The hexagon is like a single character with the same baseline. The latex preamble looks like:

\usepackage{wasysym}
\usepackage{pstricks}
\newlength{\myL}
\newcommand\myHexagon[1]{%
\setlength{\myL}{#1}
\psset{unit=1.0}
\begin{pspicture}(-0.9511\myL,-0.8090\myL)(0.9511\myL,\myL)
\psline[linewidth=1pt](0.5\myL,-0.866\myL)(-0.5\myL,-0.866\myL)(-\myL,0)(-0.5\myL,0.866\myL)%
(0.5\myL,0.866\myL)(\myL,0)(0.5\myL,-0.866\myL)
\end{pspicture}%
}
It draws only one hexaagon as a polygon in any valid unit, like
1. 2cm
2. 3inch
3. 12pt

You can change the linewidth for example with \psline[linewidth=1pt](...)

local time: Fri Mar 24 13:50:26 CET 2023 ; file is: 1364.96986111111 days old
contact webmaster _at_ TeXnik.de