summaryrefslogtreecommitdiff
path: root/support/ochem/echem.sty
blob: e610f66befb66412f46a87dc95eeec64b8999775 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
%%%%%%%%%%%%%%%%%% echem.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 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{calc}

\newsavebox{\cbox}

% Symbol fuer einzelnes Elektron
\newcommand{\echdot}
{{\unitlength=.08\baselineskip%
  \begin{picture}(0,0)
    \put(0,0){\circle*{2}}
  \end{picture}}}
% liegender Balken fuer Elektronenpaar
\newcommand{\echhbar}
{{\unitlength=.08\baselineskip%
  \linethickness{0.8\unitlength}%
  \begin{picture}(0,0)
    \put(-3,0){\line(1,0){6}}
  \end{picture}}}
% aufrechter Balken fuer Elektronenpaar
\newcommand{\echvbar}
{{\unitlength=.08\baselineskip%
  \linethickness{0.8\unitlength}%
  \begin{picture}(2,0)(-1,0)
    \put(0,-3){\line(0,1){6}}
  \end{picture}}}

% die horizontalen Symbole (upper und lower)
\newcommand{\hdu}[2][\echdot]
{\sbox{\cbox}{#2}%
 \makebox[0pt][l]{\raisebox{1.3\ht\cbox}
   {\makebox[\wd\cbox]{#1}}}%
}
\newcommand{\hddu}[1]
{\sbox{\cbox}{#1}%
 \makebox[0pt][l]{\raisebox{1.3\ht\cbox}
   {\makebox[\wd\cbox]
     {\echdot\hspace*{0.6\ht\cbox}\echdot}}}%
}
\newcommand{\hdl}[2][\echdot]
{\sbox{\cbox}{#2}%
 \makebox[0pt][l]{\raisebox{-\dp\cbox-0.3\ht\cbox}
   {\makebox[\wd\cbox]{#1}}}%
}
\newcommand{\hddl}[1]
{\sbox{\cbox}{#1}%
 \makebox[0pt][l]{\raisebox{-\dp\cbox-0.3\ht\cbox}
   {\makebox[\wd\cbox]
     {\echdot\hspace*{0.6\ht\cbox}\echdot}}}%
}

% die vertikalen Symbole
\newcommand{\vd}[2][\echdot]
{\sbox{\cbox}{#2}\hspace*{0.1\ht\cbox}%
 \raisebox{0.5\ht\cbox}{#1}%
 \hspace*{0.1\ht\cbox}%
}
\newcommand{\vdd}[1]
{\sbox{\cbox}{#1}\hspace*{0.1\ht\cbox}%
 \makebox[0pt][l]{\raisebox{0.2\ht\cbox}{\echdot}}%
 \raisebox{0.8\ht\cbox}{\echdot}%
 \hspace*{0.1\ht\cbox}%
}

% liegende eckige Klammer unten
\newcommand{\atomconnect}[3]
{\sbox{\cbox}{#1#2#3}%
 \makebox[0pt][l]%
 {\raisebox{-\dp\cbox-.5em}[0pt][1em]%
  {\makebox[\wd\cbox][l]{%
   \sbox{\cbox}{#1}\hspace{.5\wd\cbox}%
   \rule{0.5pt}{0.5em}\hrulefill\rule{0.5pt}{0.5em}%
   \sbox{\cbox}{#3}\hspace{.5\wd\cbox}}%
  }}%
 #1#2#3}

% einige hilfreiche Abk"urzungen
\newcommand{\2}{\ensuremath{_2}}
\renewcommand{\3}{\ensuremath{_3}}
\newcommand{\sbond}{\,\ensuremath{\cdot}\,}
\newcommand{\dbond}{\,=\,}


%%%%%%%%%%%%%%%%%% end of echem.sty %%%%%%%%%%%%%%%%%%%%%%%