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: Thu May 9 04:40:29 CEST 2024 ; file is: 1776.54627314815 days old
contact webmaster _at_ TeXnik.de