%%%%%%%%%%%%%%%%%% ifsym.sty %%%%%%%%%%%%%%%%%%%%%%%
% (c) Ingo Kloeckl
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.

% History
% 20.12.1999 v1.0  IK 
% 18.04.2000 v1.1  IK merging of all packages for IF... fonts 
% 21.08.2001 v1.2  IK some commands added
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{ifsym}[2000/04/18 I.Kloeckl]
\RequirePackage{calc}

\newcommand{\ifsymfamily}
{\fontencoding{U}\fontfamily{ifsym}\selectfont}
\newcommand{\ifgeofamily}
{\fontencoding{U}\fontfamily{ifgeo}\selectfont}
\newcommand{\narrowshape}{\fontshape{na}\selectfont}
\newcommand{\wideshape}{\fontshape{w}\selectfont}

\DeclareTextFontCommand{\textifsym}{\ifsymfamily}
\DeclareTextFontCommand{\textifgeo}{\ifgeofamily}
\DeclareTextFontCommand{\textnarrow}{\ifgeofamily\fontshape{na}\selectfont}
\DeclareTextFontCommand{\textwide}{\ifgeofamily\fontshape{w}\selectfont}

\newcommand{\textifsymbol}[2][ifsym]
{{\fontencoding{U}\fontfamily{#1}\selectfont%
  \symbol{#2}}}

\newcounter{ifsymcnt}

% miscellaneous symbols
\DeclareOption{misc}{%
  \newcommand{\Letter}{\textifsymbol{0}}
  \newcommand{\Telephone}{\textifsymbol{40}}
  \newcommand{\SectioningDiamond}{\textifsymbol{1}}
  \newcommand{\FilledSectioningDiamond}{\textifsymbol{2}}
  \newcommand{\PaperPortrait}{\textifsymbol{3}}
  \newcommand{\PaperLandscape}{\textifsymbol{4}}
  \newcommand{\Cube}[1]{\setcounter{ifsymcnt}{#1+4}\textifsymbol{\value{ifsymcnt}}}
  \newcommand{\Irritant}{\textifsymbol{11}}
  \newcommand{\Fire}{\textifsymbol{12}}
  \newcommand{\Radiation}{\textifsymbol{14}}
  \newcommand{\StrokeOne}{\textifsymbol{58}}
  \newcommand{\StrokeTwo}{\textifsym{::}}
  \newcommand{\StrokeThree}{\textifsym{:::}}
  \newcommand{\StrokeFour}{\textifsym{::::}}
  \newcommand{\StrokeFive}{\textifsymbol{59}}
}

% symbols for electronics (pulse diagrams)
\DeclareOption{electronic}{%
  \newcommand{\RaisingEdge}{\textifsymbol{32}}
  \newcommand{\FallingEdge}{\textifsymbol{33}}
  \newcommand{\ShortPulseHigh}{\textifsymbol{34}}
  \newcommand{\ShortPulseLow}{\textifsymbol{35}}
  \newcommand{\PulseHigh}{\textifsymbol{36}}
  \newcommand{\PulseLow}{\textifsymbol{37}}
  \newcommand{\LongPulseHigh}{\textifsymbol{38}}
  \newcommand{\LongPulseLow}{\textifsymbol{39}}
  % arbitrary pulse diagrams: eg. LL|H|LLL|h|lL
  % l, h, d, m: short line low/high/double/middle
  % L, H, D, M: long line low/high/double/middle
  % |: edge
  % <, > : opening/closing (m to d etc.)
}

% mountaneering symbols (summits, points, huts)
\DeclareOption{alpine}{%
  \newcommand{\SummitSign}{\textifsymbol{16}}
  \newcommand{\StoneMan}{\textifsymbol{17}}
  \newcommand{\Hut}{\textifsymbol{18}}
  \newcommand{\FilledHut}{\textifsymbol{19}}
  \newcommand{\Village}{\textifsymbol{18}%
                        \raise-1ex\hbox{\textifsymbol{18}}%
                        \kern.2em\raise.5ex\hbox{\textifsymbol{18}}}
  \newcommand{\Summit}{\textifsymbol{20}}
  \newcommand{\Mountain}{\textifsymbol{21}}
  \newcommand{\IceMountain}{\textifsymbol{22}}
  \newcommand{\VarMountain}{\textifsymbol{23}}
  \newcommand{\VarIceMountain}{\textifsymbol{24}}
  \newcommand{\SurveySign}{\textifsymbol{25}}
  \newcommand{\Joch}{\textifsymbol{26}}
  \newcommand{\Flag}{\textifsymbol{27}}
  \newcommand{\VarFlag}{\textifsymbol{29}}
  \newcommand{\Tent}{\textifsymbol{28}}
  \newcommand{\HalfFilledHut}{\textifsymbol{31}}
  \newcommand{\VarSummit}{\textifsymbol{30}}
}

% geometric figures
\DeclareOption{geometry}{%
  \newcommand{\BigSquare}{\textifsymbol[ifgeo]{32}}
  \newcommand{\Square}{\textifsymbol[ifgeo]{48}}
  \newcommand{\SmallSquare}{\textifsymbol[ifgeo]{64}}
  \newcommand{\FilledBigSquare}{\textifsymbol[ifgeo]{80}}
  \newcommand{\FilledSquare}{\textifsymbol[ifgeo]{96}}
  \newcommand{\FilledSmallSquare}{\textifsymbol[ifgeo]{112}}
  \newcommand{\SquareShadowA}{\textifsymbol[ifgeo]{0}}
  \newcommand{\SquareShadowB}{\textifsymbol[ifgeo]{1}}
  \newcommand{\SquareShadowC}{\textifsymbol[ifgeo]{2}}
  \newcommand{\FilledSquareShadowA}{\textifsymbol[ifgeo]{3}}
  \newcommand{\FilledSquareShadowC}{\textifsymbol[ifgeo]{4}}
  \newcommand{\BigCross}{\textifsymbol[ifgeo]{13}}
  \newcommand{\Cross}{\textifsymbol[ifgeo]{14}}
  \newcommand{\SmallCross}{\textifsymbol[ifgeo]{15}}
  \newcommand{\SpinUp}{\rlap{\textifsymbol{41}}}
  \newcommand{\SpinDown}{\rlap{\textifsymbol{42}}}

  \newcommand{\BigTriangleUp}{\textifsymbol[ifgeo]{33}}
  \newcommand{\TriangleUp}{\textifsymbol[ifgeo]{49}}
  \newcommand{\SmallTriangleUp}{\textifsymbol[ifgeo]{65}}
  \newcommand{\FilledBigTriangleUp}{\textifsymbol[ifgeo]{81}}
  \newcommand{\FilledTriangleUp}{\textifsymbol[ifgeo]{97}}
  \newcommand{\FilledSmallTriangleUp}{\textifsymbol[ifgeo]{113}}
  \newcommand{\BigTriangleLeft}{\textifsymbol[ifgeo]{34}}
  \newcommand{\TriangleLeft}{\textifsymbol[ifgeo]{50}}
  \newcommand{\SmallTriangleLeft}{\textifsymbol[ifgeo]{66}}
  \newcommand{\FilledBigTriangleLeft}{\textifsymbol[ifgeo]{82}}
  \newcommand{\FilledTriangleLeft}{\textifsymbol[ifgeo]{98}}
  \newcommand{\FilledSmallTriangleLeft}{\textifsymbol[ifgeo]{114}}
  \newcommand{\BigTriangleDown}{\textifsymbol[ifgeo]{35}}
  \newcommand{\TriangleDown}{\textifsymbol[ifgeo]{51}}
  \newcommand{\SmallTriangleDown}{\textifsymbol[ifgeo]{67}}
  \newcommand{\FilledBigTriangleDown}{\textifsymbol[ifgeo]{83}}
  \newcommand{\FilledTriangleDown}{\textifsymbol[ifgeo]{99}}
  \newcommand{\FilledSmallTriangleDown}{\textifsymbol[ifgeo]{115}}
  \newcommand{\BigTriangleRight}{\textifsymbol[ifgeo]{36}}
  \newcommand{\TriangleRight}{\textifsymbol[ifgeo]{52}}
  \newcommand{\SmallTriangleRight}{\textifsymbol[ifgeo]{68}}
  \newcommand{\FilledBigTriangleRight}{\textifsymbol[ifgeo]{84}}
  \newcommand{\FilledTriangleRight}{\textifsymbol[ifgeo]{100}}
  \newcommand{\FilledSmallTriangleRight}{\textifsymbol[ifgeo]{116}}

  \newcommand{\BigCircle}{\textifsymbol[ifgeo]{37}}
  \newcommand{\Circle}{\textifsymbol[ifgeo]{53}}
  \newcommand{\SmallCircle}{\textifsymbol[ifgeo]{69}}
  \newcommand{\FilledBigCircle}{\textifsymbol[ifgeo]{85}}
  \newcommand{\FilledCircle}{\textifsymbol[ifgeo]{101}}
  \newcommand{\FilledSmallCircle}{\textifsymbol[ifgeo]{117}}

  \newcommand{\BigDiamondshape}{\textifsymbol[ifgeo]{38}}
  \newcommand{\Diamondshape}{\textifsymbol[ifgeo]{54}}
  \newcommand{\SmallDiamondshape}{\textifsymbol[ifgeo]{70}}
  \newcommand{\FilledBigDiamondshape}{\textifsymbol[ifgeo]{86}}
  \newcommand{\FilledDiamondshape}{\textifsymbol[ifgeo]{102}}
  \newcommand{\FilledSmallDiamondshape}{\textifsymbol[ifgeo]{118}}
  \newcommand{\DiamondShadowA}{\textifsymbol[ifgeo]{5}}
  \newcommand{\DiamondShadowB}{\textifsymbol[ifgeo]{6}}
  \newcommand{\DiamondShadowC}{\textifsymbol[ifgeo]{7}}
  \newcommand{\FilledDiamondShadowA}{\textifsymbol[ifgeo]{8}}
  \newcommand{\FilledDiamondShadowC}{\textifsymbol[ifgeo]{9}}

  \newcommand{\BigRightDiamond}{\textifsymbol[ifgeo]{47}}
  \newcommand{\RightDiamond}{\textifsymbol[ifgeo]{63}}
  \newcommand{\SmallRightDiamond}{\textifsymbol[ifgeo]{79}}
  \newcommand{\BigLowerDiamond}{\textifsymbol[ifgeo]{95}}
  \newcommand{\LowerDiamond}{\textifsymbol[ifgeo]{111}}
  \newcommand{\SmallLowerDiamond}{\textifsymbol[ifgeo]{127}}
  \newcommand{\BigHBar}{\textifsymbol[ifgeo]{26}}
  \newcommand{\HBar}{\textifsymbol[ifgeo]{27}}
  \newcommand{\SmallHBar}{\textifsymbol[ifgeo]{28}}
  \newcommand{\BigVBar}{\textifsymbol[ifgeo]{29}}
  \newcommand{\VBar}{\textifsymbol[ifgeo]{30}}
  \newcommand{\SmallVBar}{\textifsymbol[ifgeo]{31}}
}

\DeclareOption{clock}{%
  \newcommand{\ifclkfamily}
  {\fontencoding{U}\fontfamily{ifclk}\selectfont}

  \DeclareTextFontCommand{\textifclk}{\ifclkfamily}

  % example usage: it's 12:45 (\showclock{0}{45}).
  %                it's 17:30 (\showclock{5}{30}).
  %                it's  8:10 (\showclock{8}{10}).
  \newcommand{\showclock}[2]
  {\setcounter{ifsymcnt}{#1*12+#2/5}%
   \textifclk{\symbol{\value{ifsymcnt}}}}

  \newcommand{\Taschenuhr}{\textifclk{\symbol{150}}}
  \newcommand{\VarTaschenuhr}{\textifclk{\symbol{148}}}
  \newcommand{\StopWatchStart}{\textifclk{\symbol{151}}}
  \newcommand{\StopWatchEnd}{\textifclk{\symbol{152}}}
  \newcommand{\Interval}{\textifclk{\symbol{153}}}
  \newcommand{\Wecker}{\textifclk{\symbol{154}}}
  \newcommand{\VarClock}{\textifclk{\symbol{155}}}
}

\DeclareOption{weather}{%
  \newcommand{\textweathersymbol}[1]
  {{\fontencoding{U}\fontfamily{ifwea}\selectfont%
    \symbol{#1}}}

  \newcommand{\Sun}{\textweathersymbol{16}}
  \newcommand{\HalfSun}{\textweathersymbol{17}}
  \newcommand{\NoSun}{\textweathersymbol{18}}
  \newcommand{\Fog}{\textweathersymbol{19}}
  \newcommand{\ThinFog}{\textweathersymbol{20}}
  \newcommand{\Rain}{\textweathersymbol{21}}
  \newcommand{\WeakRain}{\textweathersymbol{22}}
  \newcommand{\Hail}{\textweathersymbol{23}}
  \newcommand{\Sleet}{\textweathersymbol{24}}
  \newcommand{\Snow}{\textweathersymbol{25}}
  \newcommand{\Lightning}{\textweathersymbol{26}}
  \newcommand{\Cloud}{\textweathersymbol{27}}
  \newcommand{\RainCloud}{\textweathersymbol{28}}
  \newcommand{\WeakRainCloud}{\textweathersymbol{29}}
  \newcommand{\SunCloud}{\textweathersymbol{30}}
  \newcommand{\SnowCloud}{\textweathersymbol{31}}
  \newcommand{\FilledCloud}{\textweathersymbol{32}}
  \newcommand{\FilledRainCloud}{\textweathersymbol{33}}
  \newcommand{\FilledWeakRainCloud}{\textweathersymbol{34}}
  \newcommand{\FilledSunCloud}{\textweathersymbol{35}}
  \newcommand{\FilledSnowCloud}{\textweathersymbol{36}}

  % \wind{bedeckung 0(sonne)-4}{richtung in grad}{staerke in km/h}
  \newcommand{\wind}[3]
  {\rotatebox{#2}{%
   \makebox[0pt][c]{\textweathersymbol{#1}}
   \setcounter{ifsymcnt}{48+#3/10}%
   \makebox[0pt][c]{\textweathersymbol{\value{ifsymcnt}}}
   }
  }

  % \thermo{0-6}
  \newcommand{\Thermo}[1]
  {\setcounter{ifsymcnt}{5+#1}\textweathersymbol{\value{ifsymcnt}}}
}

\ProcessOptions\relax

%%%%%%%%%%%%%%%%%% end of ifsym.sty %%%%%%%%%%%%%%%%%%%%%%%