summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/engtlc/engtlc.sty
blob: 94cc407f3da399c2a435a6cdbabeff15ace3bdea (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Questo pacchetto è stato realizzato per velocizzare la scrittura 
%  di documenti da parte di studenti della facoltà di Ingegneria dell'informazione.
%  E' in particolar modo indicato per gli studenti iscritti in facoltà di
%  Ingegneria delle Telecomunicazioni.
%
%  Si ringrazia per i suggerimenti sui simboli da usare Alessio Sanna,
%  per i preziosi consigli pratici di programmazione Enrico Gregorio e, 
%  in particolar modo, Claudio Beccari, per aver reso simboli ed unità 
%  di misura conformi agli standard ISO e ai numerosi suggerimenti.
%
%  Copyright 2009-2012 Claudio Fiandrino
%   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{engtlc}[2012/12/18 LaTeX package for telecommunications engineering version 3.2]

\@ifpackageloaded{amsmath}{}{\PackageError{engtlc}{Package amsmath is currently not loaded}{}}
\@ifpackageloaded{amssymb}{}{\PackageError{engtlc}{Package amssymb is currently not loaded}{}}
\@ifpackageloaded{textcomp}{}{\PackageWarning{engtlc}{Package texcomp should be loaded%
    \MessageBreak in advance; missing this package some commands may \MessageBreak behave poorly}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  
%  unità di misura
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\providecommand*{\unit}[1]{\ensuremath{\,\mathrm{#1}}}
\providecommand*{\micro}{\expandafter\ifx\csname muup\endcsname\relax
\text{\textmu}\else\muup\fi} % prefisso micro

%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  tempo
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ho}{\unit{h}}
\newcommand{\s}{\unit{s}}
\newcommand{\ms}{\unit{ms}}
\newcommand{\us}{\unit{\micro s}}
\newcommand{\ns}{\unit{ns}}
\newcommand{\ps}{\unit{ps}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  metri
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\um}{\unit{\micro m}}
\newcommand{\mm}{\unit{mm}}
\newcommand{\cm}{\unit{cm}}
\newcommand{\dm}{\unit{dm}}
\newcommand{\m}{\unit{m}}
\newcommand{\km}{\unit{km}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  corrente
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\MA}{\unit{MA}}
\newcommand{\kA}{\unit{kA}}
\newcommand{\A}{\unit{A}}
\newcommand{\mA}{\unit{mA}}
\newcommand{\uA}{\unit{\micro A}}
\newcommand{\nA}{\unit{nA}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  tensione
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\MV}{\unit{MV}}
\newcommand{\kV}{\unit{kV }}
\newcommand{\V}{\unit{V}}
\newcommand{\mV}{\unit{mV}}
\newcommand{\uV}{\unit{\micro V}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  resistenza
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\mohm}{\unit{m\Omega}}
\providecommand{\ohm}{\unit{\Omega}}
\newcommand{\kohm}{\unit{k\Omega}}
\newcommand{\Mohm}{\unit{M\Omega}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  conduttanza
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\pSi}{\unit{pS}}
\newcommand{\nSi}{\unit{nS}}
\newcommand{\uSi}{\unit{\micro S}}
\newcommand{\mSi}{\unit{mS}}
\newcommand{\Si}{\unit{S}}
\newcommand{\kSi}{\unit{kS}}
\newcommand{\MSi}{\unit{MS}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  capacità
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\fFa}{\unit{f\/F}}
\newcommand{\pFa}{\unit{pF}}
\newcommand{\nFa}{\unit{nF}}
\newcommand{\uFa}{\unit{\micro F}}
\newcommand{\mFa}{\unit{mF}}
\newcommand{\Fa}{\unit{F}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  induttanza
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\fHe}{\unit{fH}}
\newcommand{\pHe}{\unit{pH}}
\newcommand{\nHe}{\unit{nH}}
\newcommand{\uHe}{\unit{\micro H}}
\newcommand{\mHe}{\unit{mH}}
\newcommand{\He}{\unit{H}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  db
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\dB}{\unit{dB}}
\newcommand{\dBm}{\unit{dBm}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  potenza
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\uW}{\unit{\micro W}}
\newcommand{\mW}{\unit{mW}}
\newcommand{\W}{\unit{W}}
\newcommand{\kW}{\unit{kW}}
\newcommand{\MW}{\unit{MW}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  frequenza
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Hz}{\unit{Hz}}
\newcommand{\kHz}{\unit{kHz}}
\newcommand{\MHz}{\unit{MHz}}
\newcommand{\GHz}{\unit{GHz}}
\newcommand{\THz}{\unit{THz}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  bit e chip
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\bit}{\unit{bit}}
\newcommand{\kbit}{\unit{Kib}}
\newcommand{\Mbit}{\unit{Mib}}
\newcommand{\Byte}{\unit{B}}
\newcommand{\kByte}{\unit{KiB}}
\newcommand{\MByte}{\unit{Mib}}
\newcommand*{\GByte}{\unit{GiB}}
\newcommand*{\TByte}{\unit{TiB}}
\newcommand{\bits}{\unit{bit/s}}
\newcommand{\kbits}{\unit{Kib/s}}
\newcommand{\Mbits}{\unit{Mib/s}}
\newcommand{\Bytes}{\unit{B/s}}
\newcommand{\kBytes}{\unit{KiB/s}}
\newcommand{\MBytes}{\unit{MiB/s}}
\newcommand*{\GBytes}{\unit{GiB/s}}
\newcommand*{\TBytes}{\unit{TiB/s}}
\newcommand*{\chips}{\unit{chip/s}}
\newcommand*{\kchips}{\unit{Ki\mkern2mu chip/s}}
\newcommand*{\Mchips}{\unit{Mi\mkern2mu chip/s}}
\newcommand*{\chipsubit}{\unit{chip/bit}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  
% simboli generali
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\finees}{\par\nobreak\makebox[\linewidth][r]{$\blacksquare$}}		     % fine esercizio
\newlength{\Implspace} \Implspace=0.5cm
\newcommand{\frecciadex}[1][0.5]{\hspace{#1\Implspace}\Longrightarrow \hspace{#1\Implspace}} % freccia di implicazione verso destra
\newcommand{\frecciadown}{\begin{center}\LARGE\ensuremath{\Downarrow}\end{center}}	     % freccia di implicazione verso il basso
\newcommand{\varianzarumore}{\ensuremath{\frac{N_0}{2}}}				     % varianza del rumore bianco

\newcommand{\et@symbolbracearg}[2]{%
  \ensuremath{#1\mathopen{}\left\lbrace#2\right\rbrace\mathclose{}}}

\newcommand{\fourier}[1]{\et@symbolbracearg{\mathcal{F}}{#1}}				% traformata di Fourier di 1: \fourier[x(t)]
\newcommand{\invfourier}[1]{\et@symbolbracearg{\mathcal{F}^{-1}}{#1}}			% trasformata di Fourier inversa di 1: \invfourier[x(t)]
\newcommand{\partereale}[1]{\et@symbolbracearg{\textbf{Re}}{#1}}			% parte reale di 1: \partereale[\tilde{x}(t)]
\newcommand{\parteimm}[1]{\et@symbolbracearg{\textbf{Im}}{#1}}				% parte immaginaria di 1: \parteimm[\dot{x}(t)]
\newcommand{\Info}[1]{\ensuremath{I\left(#1\right)}}					% quantità di informazione dell'argomento 1
\newcommand{\versore}[1]{\ensuremath{\hat{#1}}}						% versore di 1
\newcommand{\vettore}[1]{\ensuremath{\overrightarrow{#1}}}				% vettore di 1
\newcommand{\coseno}[1]{\ensuremath{\cos\left(2\pi#1t\right)}}				% coseno di frequenza indicata in 1: \coseno[f_0] 
\newcommand{\seno}[1]{\ensuremath{\sin\left(2\pi#1t\right)}}				% seno di frequenza indicata in 1: \seno[f_0] 
\newcommand{\energia}[1]{\ensuremath{\mathcal{E}_{#1}}}					% energia con pedice indicato in 1: energia media \energia[m]
\newcommand{\moduloexp}[2]{\ensuremath{\left\vert#1\right\vert^{#2}}}			% modulo di 1 con esponente 2: \moduloexp{x_1}{3}
\newcommand{\modulo}[1]{\ensuremath{\left\vert#1\right\vert}}				% modulo di 1: \modulo[x_1]
\newcommand{\indB}[1]{%
  \ensuremath{\mathopen{}\left.#1\right\vert_{\mathrm{dB}}\mathclose{}}}		% 1 espresso in dB, da usare in scrittura matematica: $\indB$
\newcommand{\for}[2]{\ensuremath{\left. #1 \right\vert_{#2}}}				% 1 calcolato per 2 
\newcommand{\massimo}[1]{\et@symbolbracearg{\max}{#1}}					% massimo di 1: \massimo[\dot{x}(t)]
\newcommand{\minimo}[1]{\et@symbolbracearg{\min}{#1}}					% minimo di 1: \minimo[\dot{x}(t)]
\newcommand{\valc}{3\cdot 10^8}								% velocità della luce
\newcommand{\loga}[2]{\ensuremath{\log_{#1}#2}}						% logaritmo di base 1 e argomento 2
\newcommand{\analitic}[1]{\ensuremath{\mathring{#1}}}					% segnale analitico di 1 oppure sorgente di campo
\newcommand*{\diff}{\mathop{}\mathopen{\mathrm{d}}}                                     % simbolo differenziale
\newcommand{\intinf}[1]{\ensuremath{\int_{-\infty}^{+\infty}{#1}}}			% integrale definito su tutto l'asse di 1
\newcommand{\deltain}[1]{\ensuremath{\delta\left(#1\right)}}				% delta nel punto 1
\newcommand*{\iu}{\ensuremath{\mathrm{j}}}                                              % unità immaginaria j; esempio: $\iu 2 \pi f$
\newcommand{\ex}[1]{\ensuremath{\textrm{e}^{#1}}}						% esponenziale

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  gamma
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\gammatens}{\ensuremath{{}^{\mathrm{V}}\Gamma}}				% gamma in tensione generico
\newcommand{\gammacorr}{\ensuremath{{}^{\mathrm{I}}\Gamma}}				% gamma in corrente generico
\newcommand{\gammatensin}[1]{\ensuremath{{}^{\mathrm{V}}\Gamma_{\mathrm{#1}}}}		% gamma in tensione calcolato in 1
\newcommand{\gammacorrin}[1]{\ensuremath{{}^{\mathrm{I}}\Gamma_{\mathrm{#1}}}}		% gamma in corrente calcolato in 1
\newcommand{\gammain}[1]{\ensuremath{\Gamma_{\mathrm{#1}}}}				% gamma in tensione senza apice calcolato in 1
\newcommand{\gammak}{\ensuremath{{}^{\mathrm{k}}\Gamma}}				% gamma di kurokawa

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  lambda
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\lbvt}{\ensuremath{\lambda_0}}						% lambda nel vuoto
\newcommand{\lbg}{\ensuremath{\lambda_g}}						% lambda guidata
\newcommand{\lbgvt}{\ensuremath{\lambda_{g_0}}}						% lambda guidata 0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  potenza
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\potin}[1]{\ensuremath{P_{\mathrm{#1}}}}					% potenza nel punto 1
\newcommand{\potdisp}[1][]{\ensuremath{P_{\mathrm{disp}}^{#1}}}				% potenza disponibile
\newcommand{\potCC}[1][]{\ensuremath{P_{\mathrm{CC}}^{#1}}}				% potenza alimentazione (corrente continua)
\newcommand{\potirr}[1][]{\ensuremath{P_{\mathrm{irr}}^{#1}}}				% potenza irradiazione
\newcommand{\potdiss}[1][]{\ensuremath{P_{\mathrm{diss}}^{#1}}}				% potenza dissipata
\newcommand{\potinc}[1][]{\ensuremath{P_{\mathrm{inc}}^{#1}}}				% potenza incidente

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  impedenze e ammettenze
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\z}[1]{\ensuremath{Z_{\mathrm{#1}}}}					% impedenza nel punto 1
\newcommand{\znorm}[1]{\ensuremath{z_{\mathrm{#1}}}}					% impedenza normalizzata nel punto 1
\newcommand{\y}[1]{\ensuremath{Y_{\mathrm{#1}}}}					% ammettenza nel punto 1
\newcommand{\ynorm}[1]{\ensuremath{y_{\mathrm{#1}}}}					% ammettenza normalizzata nel punto 1
\newcommand{\zinf}[1][]{\ensuremath{Z_{\infty#1}}}					% impedenza caratteristica generica
\newcommand{\zinfn}[1]{\zinf[#1]}				                        % impedenza caratteristica numerata con 1
\newcommand{\yinf}[1][]{\ensuremath{Y_{\infty#1}}}					% ammettenza caratteristica generica
\newcommand{\yinfn}[1]{\yinf[#1]}			     			   	% ammettenza caratteristica numerata con 1
\newcommand{\zvt}{\ensuremath{Z_0}}							% impedenza carattereristica del vuoto	
\newcommand{\yvt}{\ensuremath{Y_0}}							% ammettenza carattereristica del vuoto	
	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  campo elettrico e magnetico
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\campoe}{\ensuremath{\underline{\mathcal{E}}(\underline{r},t)}}		% campo elettrico in funzione di r e t
\newcommand{\campoefas}{\ensuremath{\underline{E}(\underline{r})}}		        % fasore del campo elettrico in funzione di r
\newcommand{\campoh}{\ensuremath{\underline{\mathcal{H}}(\underline{r},t)}}		% campo magnetico in funzione di r e t
\newcommand{\campohfas}{\ensuremath{\underline{H}(\underline{r})}}		        % fasore del campo magnetico in funzione di r

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  segnali
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand*{\signt}[1]{\ensuremath{\MakeLowercase{#1}(t)}}				% dominio tempo
\newcommand*{\signf}[1]{\ensuremath{\MakeUppercase{#1}(f)}}				% dominio frequenze
\newcommand*{\signn}[1]{\ensuremath{\MakeLowercase{#1}(n)}}				% sequenze a tempo discreto
\newcommand*{\signz}[1]{\ensuremath{\MakeUppercase{#1}(z)}}				% dominio trasformata Z

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  probabilità
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand*{\prob}[1]{\ensuremath{\mathcal{P}\left(#1\right)}}				% probabilità dell'argomento 1
\newcommand*{\valatt}[1]{\ensuremath{\mathbb{E}\left[#1\right]}}                        % valore atteso dell'argomento 1
\newcommand*{\var}[1]{\ensuremath{\mathrm{Var}\left[#1\right]}}                         % varianza dell'argomento 1
\newcommand*{\comma}{\,,\,}             	                                        % simbolo probabilità congiunta; uso: \prob{X \virgola Y}
\newcommand*{\dato}{\ensuremath{\,|\,}}		                                        % simbolo probabilità condizionata; uso: \prob{X \dato Y}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% English Alias
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\let\bfRe\partereale
\let\bfIm\parteimm
\let\noisevar\varianzarumore
\let\exerend\finees
\let\Spimplies\frecciadex
\let\Downimplies\frecciadown
\let\unitvec\versore
\let\vector\vettore
\let\cosine\coseno
\let\sine\seno
\let\energy\energia
\let\Abs\modulo
\let\AbsPow\moduloexp
\let\Max\massimo
\let\Min\minimo
\let\clight\valc
\let\Log\loga
\let\analytic\analitic
\let\infint\intinf
\let\deltaimp\deltain
\let\Vgamma\gammatens
\let\Cgamma\gammacorr
\let\Vgammain\gammatensin
\let\Cgammain\gammacorrin
\let\Kgamma\gammak
\let\powerin\potin
\let\availpow\potdisp
\let\irrpow\potirr
\let\disspow\potdiss
\let\incpow\potinc
\let\potalim\potCC
\let\potDC\potCC
\renewcommand{\potDC}[1][]{\ensuremath{P_{\mathrm{DC}}^{#1}}}
\let\Efield\campoe
\let\Hfield\campoh
\let\phasorEfield\campoefas
\let\phasorHfiled\campohfas
\let\given\dato
\let\expval\valatt
\let\rmexp\ex

\endinput