The wasy^{∗}symbol fonts for use with L^{A}TEX 2ε

Axel Kielhorn

94/05/28

1 Introduction

This file defines the package wasysym which makes some additional characters available that come from the wasy fonts (Waldis symbol fonts). These fonts are not automatically included in the NFSS2/L^{A}TEX 2ε since they take up important space and aren’t necessary if one makes use of the packages amsfonts or amssymb.

Warning: This style uses verion 2 of the wasy-fonts. It is not 100 % compatible to the old version 1 from 1989. We have provided no compatibility mode for the old fonts! If some characters come out wrong you have to upgrade.

The commands defined by the wasysym package are:

\Join ⨝ \Box □ \Diamond ◇ \leadsto ↝ \sqsubset ⊏
\sqsupset ⊐ \lhd ⊲ \unlhd ⊴ \LHD ◄ \rhd ⊳ \unrhd ⊵
\RHD ► \apprle ≲ \apprge ≳ \wasypropto ∝ \invneg ⌐
\ocircle ◯ \logof ⍟ \varint ∫ \iint ∬ \iiint ∭
\varoint ∮ \oiint ∯

The following commands are available in text-mode and scale according to the textfont size:

General symbol:

\male ♂ \female ♀ \currency ¤ \phone ☎ \recorder ⌕
\clock 🕒 \lightning ↯ \pointer ⇨ \RIGHTarrow ► \LEFTarrow ◄
\UParrow ▲ \DOWNarrow ▼ \diameter ⌀ \invdiameter ⍉
\varangle ∢ \wasylozenge ⌑ \kreuz ✠ \smiley ☺ \frownie ☹
\blacksmiley ☻ \sun ☼ \checked ✓ \bell 🔔 \ataribox
\cent ¢ \permil ‰ \brokenvert ¦ \wasytherefore ∴
\Bowtie ⨝ \agemO ℧

Electrical and physical symbols:

\AC ∼ \HF ∼ ∼ \VHF ≋ \photon ∼∼∼∼ \gluon

∗wasy-font by Roland Waldi, Universität Karlsruhe, Germany, Copyright 1989, Version 2 Copyright 1992

Polygons and Stars:

\Square □ \XBox ⊠ \CheckedBox □ ✓ \hexagon ⎔ \varhexagon ⬡
\pentagon ⬠ \octagon      \hexstar ✶ \varhexstar ✶
\davidsstar ✡

Music notes:

\eighthnote ♪ \quarternote ♩ \halfnote 𝅗𝅥 \fullnote 𝅝
\twonotes ♫

Various circles:

\Circle ◯ \CIRCLE ● \Leftcircle      \LEFTCIRCLE ◖
\Rightcircle    \RIGHTCIRCLE ◗ \LEFTcircle ◖ ◯ \RIGHTcircle ◗ ◯
\leftturn ↺ \rightturn ↻

Phonetic signs:

\thorn þ \Thorn Þ \dh ð \Dh D \openo ɔ \inve ə

Some symbols used in astonomy:

\vernal ♈ \ascnode ☊ \descnode ☋ \fullmoon ◯ \newmoon ●
\leftmoon ☾ \rightmoon ☽ \astrosun ⊙ \mercury ☿
\venus ♀ \earth ♁ \mars ♂ \jupiter ♃ \saturn ♄
\uranus ⛢ \neptune ♆ \pluto ♇

Astrological symbols and the zodiacal symbols:

\aries ♈ \taurus ♉ \gemini ♊ \cancer♋ \leo ☊
\virgo ♍ \libra ♎ \scorpio ♏ \sagittarius ♐ \capricornus ♑
\aquarius ♒ \pisces ♓ \conjunction ☌ \opposition ☍

And the APL-symbols, whoever needs them:

\APLstar ★ \APLlog ⍟ \APLbox ⎕ \APLup △ \APLdown ▽
\APLinput ⍞ \APLcomment ⍝ \APLinv ÷ ⎕ \APLuparrowbox ⍐
\APLdownarrowbox ⍗ \APLleftarrowbox ⍇ \APLrightarrowbox ⍈
\notbackslash \ − \notslash / − \APLnot ∼\APLcirc ∘ \APLvert | \APLminus −

2 The docstrip modules

The following modules are used in the implementation to direct docstrip in generating the external files:

driver  produce a documentation driver file
package produce a package file
fd  produce a font definition file

3 The Implementation

We start by writing to the VDU and the transcript file. 1 ⟨∗package⟩

 2 \NeedsTeXFormat{LaTeX2e}[1994/06/01]
 3 \ProvidesPackage{wasysym}[\filedate\space\fileversion\space
 4  Additional LaTeX2e package]
 5 \typeout{Package: `wasysym'
 6 \fileversion\space\space <\filedate> (ak)}
 7 \typeout{English Documentation
 8 \@spaces\space <\docdate> (ak)}

\symwasy It is possible to detect whether or not the wasy symbols are already defined by

checking for the math group number with the name \symwasy.

In that case we exit but write a message to the transcript file

 9 \ifx\symwasy\undefined \else
10 \wlog{Package wasysym: nothing to set up^^J}%
11 \endinput \fi

Otherwise we define the new symbol font

12 \DeclareSymbolFont{wasy}{U}{wasy}{m}{n}
13 \SetSymbolFont{wasy}{bold}{U}{wasy}{b}{n}

\wasyfamily \textwasy To access the wasy-symbols in text-mode we have defined them as a new fontfamily. Since we only take single characters but don’t want to write this is not an elegant approach. But it works and the symbols scale according to textsize, which is all we promised.

14 \def\wasyfamily{\fontencoding{U}\fontfamily{wasy}\selectfont}
15 \DeclareTextFontCommand{\textwasy}{\wasyfamily}

We declare some new commands to generate overlayed symbols and to switch to the new integral-signs:

16 \def\overstrike#1#2{{\setbox0\hbox{$#2$}\hbox to \wd0{\hss
17  $#1$\hss}\kern-\wd0\box0}}
18 \def\newpropto{\let\propto\wasyvarpropto}
19 \def\newint{\let\int\varint \let\oint\varoint} % default limits

Defining some special symbols:

20 \def\male{\hbox{\wasyfamily\char26}}
21 \def\female{\hbox{\wasyfamily\char25}}
22 \def\currency{{\wasyfamily\char27}}
23 \def\phone{{\wasyfamily\char7}}
24 \def\recorder{{\wasyfamily\char6}}
25 \def\clock{{\wasyfamily\char28}}
26 \def\lightning{{\wasyfamily\char18}}
27 \def\pointer{{\wasyfamily\char9}}
28 \def\RIGHTarrow{{\wasyfamily\char17}}
29 \def\LEFTarrow{{\wasyfamily\char16}}
30 \def\UParrow{{\wasyfamily\char75}}

31 \def\DOWNarrow{{\wasyfamily\char76}}
32 \def\AC{\hbox{\kern0.5pt\wasyfamily\char58\kern0.5pt}}
33 \def\HF{\lower0.9pt\hbox to 0pt{\kern0.5pt\wasyfamily\char58\hss}%
34  \raise0.9pt\hbox{\kern0.5pt\wasyfamily\char58\kern0.5pt}}
35 \def\VHF{\hbox{\wasyfamily\char64}}
36 \def\Box{\hbox{\wasyfamily\char50}}
37 \def\Square{\hbox{$\Box$}}
38 \def\CheckedBox{\hbox to 0pt{\wasyfamily\char50\hss}\hbox{\wasyfamily\char8}}
39 \def\XBox{\hbox{\wasyfamily\char52}}
40 \def\hexagon{\hbox{\wasyfamily\char55}}
41 \def\pentagon{\hbox{\wasyfamily\char68}}
42 \def\octagon{\hbox{\wasyfamily\char56}}
43 \def\varhexagon{\hbox{\wasyfamily\char57}}
44 \def\hexstar{\hbox{\wasyfamily\char65}}
45 \def\varhexstar{\hbox{\wasyfamily\char66}}
46 \def\davidsstar{\hbox{\wasyfamily\char67}}
47 \def\diameter{\hbox{\wasyfamily\char31}}
48 \def\invdiameter{\hbox{\wasyfamily\char21}}
49 \def\varangle{\hbox{\wasyfamily\char30}}
50 \def\wasylozenge{\hbox{\wasyfamily\char53}}
51 \def\kreuz{\hbox{\wasyfamily\char54}}
52 \def\smiley{\hbox{\wasyfamily\char44}}
53 \def\frownie{\hbox{\wasyfamily\char47}}
54 \def\blacksmiley{\hbox{\wasyfamily\char45}}
55 \def\sun{\hbox{\wasyfamily\char46}}
56 \def\checked{\hbox{\wasyfamily\char8}}
57 \def\bell{\hbox{\wasyfamily\char10}}
58 \def\eighthnote{\hbox{\wasyfamily\char11}}
59 \def\quarternote{\hbox{\wasyfamily\char12}}
60 \def\halfnote{\hbox{\wasyfamily\char13}}
61 \def\fullnote{\hbox{\wasyfamily\char14}}
62 \def\twonotes{\hbox{\wasyfamily\char15}}
63 \def\brokenvert{\hbox{\wasyfamily\char124}}
64 \def\ataribox{\hbox{\wasyfamily\char109}}
65 \def\wasytherefore{\hbox{\wasyfamily\char5}}
66 \def\Circle{\hbox{\wasyfamily\char35}}
67 \def\CIRCLE{\hbox{\wasyfamily\char32}}
68 \def\Leftcircle{\hbox{\wasyfamily\char73}}
69 \def\LEFTCIRCLE{\hbox{\wasyfamily\char71}}
70 \def\Rightcircle{\hbox{\wasyfamily\char74}}
71 \def\RIGHTCIRCLE{\hbox{\wasyfamily\char72}}
72 \def\LEFTcircle{\hbox to 0pt{\wasyfamily\char71\hss}\hbox{\wasyfamily\char35}}
73 \def\RIGHTcircle{\hbox to 0pt{\wasyfamily\char72\hss}\hbox{\wasyfamily\char35}}
74 %% astronomy
75 \def\vernal{\hbox{\wasyfamily\char23}}
76 \def\ascnode{\hbox{\wasyfamily\char19}}
77 \def\descnode{\hbox{\wasyfamily\char20}}
78 \def\fullmoon{\hbox{\wasyfamily\char35}}
79 \def\newmoon{\hbox{\wasyfamily\char32}}
80 \def\leftmoon{\hbox{\wasyfamily\char36}}

 81 \def\rightmoon{\hbox{\wasyfamily\char37}}
 82 %\def\astrosun{\hbox{\tensy\char12}}
 83 \def\astrosun{\hbox{$\odot$}}
 84 \def\mercury{\hbox{\wasyfamily\char39}}
 85 \def\venus{\raise0.2ex\hbox{\wasyfamily\char25}}
 86 \def\earth{\lower0.3ex\hbox{\wasyfamily\char38}}
 87 \def\mars{\lower0.2ex\hbox{\wasyfamily\char26}}
 88 \def\jupiter{\hbox{\wasyfamily\char88}}
 89 \def\saturn{\hbox{\wasyfamily\char89}}
 90 \def\uranus{\hbox{\wasyfamily\char90}}
 91 \def\neptune{\hbox{\wasyfamily\char91}}
 92 \def\pluto{\hbox{\wasyfamily\char92}}
 93 %%%%%% the zodiac
 94 \def\aries{\hbox{\wasyfamily\char23}}
 95 \def\taurus{\hbox{\wasyfamily\char93}}
 96 \def\gemini{\hbox{\wasyfamily\char94}}
 97 \def\cancer{\hbox{\wasyfamily\char95}}
 98 \def\leo{\hbox{\wasyfamily\char19}}
 99 \def\virgo{\hbox{\wasyfamily\char96}}
100 \def\libra{\hbox{\wasyfamily\char97}}
101 \def\scorpio{\hbox{\wasyfamily\char98}}
102 \def\sagittarius{\hbox{\wasyfamily\char99}}
103 \def\capricornus{\hbox{\wasyfamily\char100}}
104 \def\aquarius{\hbox{\wasyfamily\char101}}
105 \def\pisces{\hbox{\wasyfamily\char102}}
106 \def\conjunction{\hbox{\wasyfamily\char86}}
107 \def\opposition{\hbox{\wasyfamily\char87}}
108 %%%%%% APL characters
109 \def\APLstar{{\hbox{\wasyfamily\char69}}}
110 \def\APLlog{{\hbox{\wasyfamily\char22}}}
111 \def\APLbox{{\hbox{\wasyfamily\char126}}}
112 \def\APLup{{\hbox{\wasyfamily\char0}}}
113 \def\APLdown{{\hbox{\wasyfamily\char70}}}
114 \def\APLinput{{\hbox{\wasyfamily\char125}}}
115 \def\APLcomment{{\hbox{\wasyfamily\char127}}}
116 \def\APLinv{{\hbox to 0pt{$\div$\hss}\APLbox}}
117 \def\APLuparrowbox{{\hbox{\wasyfamily\char110}}}
118 \def\APLdownarrowbox{{\hbox{\wasyfamily\char111}}}
119 \def\APLleftarrowbox{{\hbox{\wasyfamily\char112}}}
120 \def\APLrightarrowbox{{\hbox{\wasyfamily\char113}}}
121 \def\notbackslash{\overstrike{\backslash}{-}}
122 \def\notslash{\overstrike{/}{-}}
123 \def\APLnot#1{\overstrike{\sim}{#1}}
124 \def\APLcirc#1{\overstrike{\circ}{#1}}
125 \def\APLvert#1{\overstrike{\vert}{#1}}
126 \def\APLminus{\raise0.7ex\hbox{$-$}}
127 %%%%%% math characters
128 \def\Bowtie{\hbox{\wasyfamily\char49}}
129 \def\leftturn{\hbox{\wasyfamily\char34}}
130 \def\rightturn{\hbox{\wasyfamily\char33}}

131 %%%%%% diagrams
132 \def\photon{\hbox{\wasyfamily\char58\char58\char58\char58}}
133 \def\gluon{\hbox{\wasyfamily\char81\char80\char80\char80%
134  \char80\char80\char80\char82}}
135 %%%%%% special characters
136 \def\cent{\hbox{\wasyfamily\char103}}
137 \def\permil{\hbox{\wasyfamily\char104}}
138 \def\agemO{{\wasyfamily\char48}}
139 \def\thorn{{\wasyfamily\char105}}
140 \def\Thorn{{\wasyfamily\char106}}
141 \def\dh{{\wasyfamily\char107}}
142 \def\Dh{\leavevmode{\rm\setbox0\hbox{D}%
143  \hbox to\wd0{\kern 0.04em\char32\hss D}}}
144 \def\openo{{\wasyfamily\char108}}
145 \def\inve{{\wasyfamily\char85}}

Because the lasy symbols are made an error in the format we have to undefine them before we can set them anew with \DeclareMathSymbol.

146 \let\mho\undefined
147 \let\sqsupset\undefined \let\Join\undefined
148 \let\lhd\undefined      \let\Box\undefined
149 \let\unlhd\undefined    \let\Diamond\undefined
150 \let\rhd\undefined      \let\leadsto\undefined
151 \let\unrhd\undefined    \let\sqsubset\undefined

152

153 \DeclareMathSymbol\mho     {0}{wasy}{"30}
154 \DeclareMathSymbol\Join    {3}{wasy}{"31}
155 \DeclareMathSymbol\Box     {0}{wasy}{"32}
156 \DeclareMathSymbol\Diamond {0}{wasy}{"33}
157 \DeclareMathSymbol\leadsto {3}{wasy}{"3B}
158 \DeclareMathSymbol\sqsubset{3}{wasy}{"3C}
159 \DeclareMathSymbol\sqsupset{3}{wasy}{"3D}
160 \DeclareMathSymbol\lhd     {3}{wasy}{"01}
161 \DeclareMathSymbol\unlhd   {3}{wasy}{"02}
162 \DeclareMathSymbol\LHD     {3}{wasy}{"10}
163 \DeclareMathSymbol\rhd     {3}{wasy}{"03}
164 \DeclareMathSymbol\unrhd   {3}{wasy}{"04}
165 \DeclareMathSymbol\RHD     {3}{wasy}{"11}
166 \DeclareMathSymbol\apprle  {3}{wasy}{"3E}
167 \DeclareMathSymbol\apprge  {3}{wasy}{"3F}
168 \DeclareMathSymbol\wasypropto   {3}{wasy}{"1D}
169 \DeclareMathSymbol\invneg  {3}{wasy}{"18}
170 \DeclareMathSymbol\ocircle {3}{wasy}{"23}
171 \DeclareMathSymbol\logof   {3}{wasy}{"16}
172 \DeclareMathSymbol\varint  {1}{wasy}{"72}
173 \DeclareMathSymbol\iint    {1}{wasy}{"73}
174 \DeclareMathSymbol\iiint   {1}{wasy}{"74}
175 \DeclareMathSymbol\varoint {1}{wasy}{"75}
176 \DeclareMathSymbol\oiint   {1}{wasy}{"76}

177 ⟨/package⟩

3.1 L^{A}TEX symbols fonts

The rest of this file defines the the font shape declarations that have to go into the corresponding .fd file.

We introduce the .fd file in the log file. The explicit spaces are necessary in an .fd file and the \string guards against situations where `, < or > is active.

178 ⟨∗fd⟩

179 \wlog{Fontdef\space file\space produced\space from:\space
180 \string`wasysym.dtx'\space \fileversion\space
181 \string<\filedate\string>\space (ak)}
182 \DeclareFontFamily{U}{wasy}{}
183 \DeclareFontShape{U}{wasy}{m}{n}{ <5> <6> <7> <8> <9> gen * wasy
184  <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>wasy10  }{}
185 \DeclareFontShape{U}{wasy}{b}{n}{ <-10> sub * wasy/m/n
186 <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88>wasyb10 }{}

187 ⟨/fd⟩

4 A driver for this document

The next bit of code contains the documentation driver file for TEX, i.e., the file that will produce the documentation you are currently reading. It will be extracted from this file by the docstrip program.

188 ⟨∗driver⟩

189 \documentclass{ltxdoc}
190 \usepackage{wasysym}
191 %\OnlyDescription  % comment out for implementation details
192 \begin{document}  \DocInput{wasysym.dtx}   \end{document}

193 ⟨/driver⟩

The next line goes into all files and in addition prevents docstrip from adding any further code from the main source file (such as a character table).

194 \endinput