From 75fc8c58c1c50bad4441d167fda8da1157f1d735 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 17 Jun 2009 21:56:44 +0000 Subject: new latex package steinmetz (15jun09) git-svn-id: svn://tug.org/texlive/trunk@13784 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/steinmetz/steinmetz.sty | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/steinmetz/steinmetz.sty (limited to 'Master/texmf-dist/tex/latex/steinmetz') diff --git a/Master/texmf-dist/tex/latex/steinmetz/steinmetz.sty b/Master/texmf-dist/tex/latex/steinmetz/steinmetz.sty new file mode 100644 index 00000000000..3ad76729306 --- /dev/null +++ b/Master/texmf-dist/tex/latex/steinmetz/steinmetz.sty @@ -0,0 +1,57 @@ +%% +%% This is file `steinmetz.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% steinmetz.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2009 by Enrico Gregorio +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{steinmetz} + [2009/06/14 v1.0 Steinmetz symbol for electrotechnics] +\RequirePackage{pict2e}[2004/07/06] +\newsavebox{\stm@phasebox} +\newlength{\stm@phasedp} +\newlength{\stm@phaseht} +\newlength{\stm@phasetot} +\newlength{\stm@phasewd} +\newcommand\phase[2][1]{% + \sbox\stm@phasebox{% + $\ifcase#1\relax + \displaystyle\or\textstyle\or\scriptstyle\or\scriptscriptstyle + \fi#2$} + \stm@phaseht=\ht\stm@phasebox + \stm@phasedp=\dp\stm@phasebox + \stm@phasetot=\stm@phasedp \advance\stm@phasetot .35ex + \advance\stm@phasetot\stm@phaseht + \stm@phasewd=\wd\stm@phasebox + \advance\stm@phasewd .5\stm@phasetot + \setbox\stm@phasebox=\vbox to\stm@phaseht{ + \hbox{\setlength{\unitlength}{1pt}\linethickness{.6pt}% + \edef\ph@x{\strip@pt\stm@phasewd}\edef\ph@y{\strip@pt\stm@phasetot}% + \dimen@ .5\stm@phasetot \edef\ph@dx{\strip@pt\dimen@}% + \begin{picture}(\ph@x,\ph@y) + \put(0,0){\circle*{.4}} + \put(0,0){\line(1,0){\ph@x}}\put(0,0){\line(1,2){\ph@dx}} + \put(\ph@dx,1.5){\raise\stm@phasedp\vbox{\box\stm@phasebox}} + \end{picture}% + }\vss}% + \advance\stm@phasedp .35ex \advance\stm@phasedp .6pt + \dp\z@=\stm@phasedp \box\stm@phasebox} +\endinput +%% +%% End of file `steinmetz.sty'. -- cgit v1.2.3