TeXnik - Tips TeX and LaTeX


Welcome to the TeXnik website (under construction)

Hexagon Symbol
TUG logo

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: Sat Aug 24 02:28:48 CEST 2019 ; file is: 56.454837962963 days old
contact webmaster _at_ TeXnik.de