Debian Codegraph @

texmf-dist/doc/latex/engtlc/engtlc.tex

raw
1 \documentclass[11pt,a4paper,openany]{book}
2 \usepackage[T1]{fontenc}
3 \usepackage[utf8]{inputenc}
4 \usepackage{lmodern}
5 \usepackage[english]{babel}
6 \usepackage{amsmath, amssymb}
7 \usepackage{tabularx}
8 \usepackage{fancyhdr}
9 \usepackage{graphicx}
10 \usepackage{listings}
11 \usepackage{booktabs}
12 \usepackage{colortbl}
13 \usepackage{xcolor}
14 \usepackage{textcomp}
15 \lstset{language=[LaTeX]TeX,%
16 basicstyle=\footnotesize\ttfamily}
17 \usepackage{engtlc}
18 \usepackage[pdfpagelabels,plainpages=false,colorlinks=true,hyperindex=true]{hyperref}
19
20 % Commands for the documentation
21 \newcommand*{\meta}[1]{{\normalfont\textlangle\textit{#1}\textrangle}}
22 \newcommand*{\marg}[1]{\texttt{\{\meta{#1}\}}}
23 \newcommand*{\cs}[1]{\texttt{\char92#1}}
24
25 \setlength{\headheight}{14pt}
26 \begin{document}
27 \frontmatter
28 \begin{titlepage}
29 \title{\begin{huge}\textbf{The \textsf{Engtlc} package}\end{huge}\\[.5cm]
30 \begin{large}Version 3.2\end{large}}
31 \author{\begin{LARGE}Claudio Fiandrino \end{LARGE}}
32 \maketitle
33 \end{titlepage}
34 \hypersetup{urlcolor=blue}
35 \hypersetup{linkcolor=blue}
36 \pagestyle{fancy}
37 \renewcommand{\chaptermark}[1]{%
38 \markboth{\MakeUppercase{%
39 \chaptername}\ \thechapter.%
40 \ #1}{}}
41 \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
42 \fancyhead[RO,LE]{\thepage}
43 \fancyhead[RE]{\leftmark}
44 \fancyhead[LO]{\rightmark}
45 \fancyfoot{}
46 \tableofcontents
47
48 \mainmatter
49 \chapter{Introduction}
50 This package has been realized in four different periods: in the first one I wrote the macros for measurement units and general symbols; in the second one I extended the units part and I added some other symbols such as the impedance and admittance ones.
51 In the third version, in which Alessio Sanna gave me precious suggestions, I inserted byte and chip units and the symbols for electrical and magnetic fields. I finished it on 18/12/2009 and on 13/01/2010 it had been published on CTAN.
52
53 In that third version there were some mistakes due of my inexperience in \LaTeX\ programming. Thanks to Enrico Gregorio, who send me a list of them, I decided to correct them in a new version and added some new symbol commands.
54
55 This fourth version, thanks to Claudio Beccari for the precious help, complies to ISO regulations and introduces \emph{alias} commands in english, as explained in section~\ref{sec:simboli}. Moreover some new commands have been added: probability symbols, commands to define signals in temporal, frequency, discrete and z-transform domain are the major novelties.
56
57 The purpose to create \textsf{engtlc} is very simple: it can be used by all those who work in electrical engineering or telecommunication area; indeed, \textsf{engtlc} is the acronym of \emph{Engineering Telecommunications}.
58
59 Where does it help?
60 It helps in writing a document with \LaTeX, of course; in my personal experience I observed that \LaTeX\ code isn't very user friendly when you have to repeat over and over again some words where the code is a little bit different every time.
61
62 If you have to write the probability of $x$ you can write the \LaTeX\ code like:
63 \begin{tabbing}
64 \hspace{7cm}\=\kill
65 \begin{lstlisting}
66 $\mathcal{P}(x)$
67 \end{lstlisting} \> $\mathcal{P}(x)$
68 \end{tabbing}
69 If, after some time, you have to write the probability of the event A:
70 \begin{tabbing}
71 \hspace{7cm}\=\kill
72 \begin{lstlisting}
73 $\mathcal{P}(\text{A})$
74 \end{lstlisting} \> $\mathcal{P}(\text{A})$
75 \end{tabbing}
76 or you can copy the previous code and change the argument.
77
78 With \textsf{engtlc} it is easier; you simply write:
79 \begin{flushleft}
80 \texttt{\$\cs{prob}\marg{argument}\$}
81 \end{flushleft}
82 where \meta{argument} is the argument you have to put like $x$ or A.
83
84 The following chapters are structured in this way:
85 \begin{itemize}
86 \item[$\star$] the procedures to install the package and its dependencies are explained in chapter~\ref{chap:installazione};
87 \item[$\star$] the specific new commands introduced by \textsf{engtlc} are shown in chapter~\ref{chap:comandi}.
88 \end{itemize}
89
90
91 \chapter{How to install \textsf{engtlc}}
92 \label{chap:installazione}
93 If it is not already intalled in your \TeX\ distribution, you can find the package in my website \url{http://claudiofiandrino.altervista.org} within the ``latex projects'' section; alternatively you can download it from the official \LaTeX\ packages website \url{http://tug.ctan.org/tex-archive/macros/latex/contrib/engtlc}.
94
95 After downloading the \emph{.zip} file, decompress it and move all the files into the \texttt{~/texmf/tex/latex/engtlc/} in your home directory (if you don't have a personal \texttt{texmf} tree in your home directory, create one). After moving the unzipped files in the aforementioned folder, rembeber to refresh the filename database if your \TeX\ distribution and operating system require it.
96
97 The home folder, shown with \texttt{\textasciitilde}, is a normal way of indicating it on Linux platforms. On Macs the \texttt{texmf} personal tree should be rooted in \texttt{\textasciitilde/Library}; on Windows platforms, from Vista and newer releases, the concept of ``home'' is now well known; for previous version you should root your personal \texttt{texmf} tree somewhere such as \texttt{C:\char92Documents and Settings\char92\meta{your username}}.
98
99 Remember: This package is dependent on some external packages such as \textsf{textcomp}, \textsf{amsmath}, \textsf{amssymb}. The package does not expressly load them in order to avoid conflicts among different sets of options the user might want to specify. Therefore the user is responsable for loading them with the options s/he likes best. Since these packages are generally loaded by the user for other purposes, this should not be an inconvenience. Anyway, if you do not load
100 \textsf{amsmath} and \textsf{amssymb}, you will receive an error: this because some commands need this packages. On the contrary, if you do not load \textsf{textcomp}, you will see a warning.
101
102
103 \chapter{Commands introduced by \textsf{engtlc}}\label{chap:comandi}
104 Let's start to examine \textsf{engtlc} commands.
105
106 In the first section several commands for writing units of measurement are shown, while in the second section several new symbol commands are listed.
107
108 \section{Units of measurement}
109 I believe that the possibility of introducing units of measurement in a short and consistent way might be very useful. Of course there are other packages that allow to do the same, but possibly with longer constructs. For example with siunuitx if you have to use ``kbit/s'' you have to type in:
110 \begin{tabbing}
111 \hspace{7cm}\= \kill
112 Code \> Visualization \\
113 \begin{lstlisting}
114 \si{\kibi\bit\per\second}
115 \end{lstlisting} \> \kbits
116 \end{tabbing}
117 So I decided to create shorter codes that can replace the longer ones shown above.
118
119 \textsf{Engtlc} units of measurement must used only within math environments \texttt{\$ \$}, \texttt{[ ]} or within any kind \emph{equation like} ones.
120
121
122 Be careful: if in your text you use a unit command and forget that the space after a control sequence is absorbed by the control sequence itself, you observe this mistake:
123 \begin{tabbing}
124 \hspace{4cm}\= \kill
125 Code \> Visualization\\
126 \begin{lstlisting}
127 8 \cm and
128 \end{lstlisting} \> 8 \cm and
129 \end{tabbing}
130
131 \subsubsection{Time units}
132 \begin{center}
133 \begin{tabular}{lll}
134 \toprule
135 Unit & Equivalent code & Visualization\\
136 \midrule
137 hours & \cs{ho} & \ho \\
138 seconds & \cs{s} & \s \\
139 milliseconds & \cs{ms} & $\ms$ \\
140 microseconds & \cs{us} & $\us$ \\
141 nanoseconds & \cs{ns} & $\ns$\\
142 picoseconds & \cs{ps} & $\ps$\\
143 \bottomrule
144 \end{tabular}
145 \end{center}
146
147
148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149 \subsubsection{Length units}
150 \begin{center}
151 \begin{tabular}{lll}
152 \toprule
153 Unit & Equivalent code & Visualization\\
154 \midrule
155 micrometres & \cs{um} & $\um$ \\
156 millimetres & \cs{mm} & $\mm$ \\
157 centimetres & \cs{cm} & $\cm$ \\
158 decimetres & \cs{dm} & $\dm$\\
159 metres & \cs{m} & $\m$\\
160 kilometres & \cs{km} & $\km$\\
161 \bottomrule
162 \end{tabular}
163 \end{center}
164
165
166
167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
168 \subsubsection{Current units}
169 \begin{center}
170 \begin{tabular}{lll}
171 \toprule
172 Unit & Equivalent code & Visualization\\
173 \midrule
174 microampere & \cs{uA} & $\uA$ \\
175 milliampere & \cs{mA} & $\mA$ \\
176 ampere & \cs{A} & $\A$ \\
177 \bottomrule
178 \end{tabular}
179 \end{center}
180 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 \subsubsection{Voltage units}
182 \begin{center}
183 \begin{tabular}{lll}
184 \toprule
185 Unit & Equivalent code & Visualization\\
186 \midrule
187 microvolt & \cs{uV} & $\uV$ \\
188 millivolt & \cs{mV} & $\mV$ \\
189 volt & \cs{V} & $\V$\\
190 megavolt & \cs{MV} & $\MV$\\
191 \bottomrule
192 \end{tabular}
193 \end{center}
194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 \subsubsection{Resistance units}
196 \begin{center}
197 \begin{tabular}{lll}
198 \toprule
199 Unit & Equivalent code & Visualization\\
200 \midrule
201 milliohm & \cs{mohm} & $\mohm$ \\
202 ohm & \cs{ohm} & $\ohm$\\
203 kilohm & \cs{kohm} & $\kohm$\\
204 megaohm & \cs{Mohm} & $\Mohm$\\
205 \bottomrule
206 \end{tabular}
207 \end{center}
208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
209 \subsubsection{Conductance units}
210 \begin{center}
211 \begin{tabular}{lll}
212 \toprule
213 Unit & Equivalent code & Visualization\\
214 \midrule
215 picosiemens & \cs{pSi} & $\pSi$\\
216 nanosiemens & \cs{nSi} & $\nSi$ \\
217 microsiemens &\cs{uSi} & $\uSi$ \\
218 millisiemens & \cs{mSi} & $\mSi$ \\
219 siemens & \cs{Si} & $\Si$\\
220 kilosiemens & \cs{kSi} & $\kSi$\\
221 megasiemens & \cs{MSi} & $\MSi$\\
222 \bottomrule
223 \end{tabular}
224 \end{center}
225 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
226 \subsubsection{Capacity units}
227 \begin{center}
228 \begin{tabular}{lll}
229 \toprule
230 Unit & Equivalent code & Visualization\\
231 \midrule
232 femtofarad & \cs{fFa} & $\fFa$ \\
233 picofarad & \cs{pFa} & $\pFa$\\
234 nanofarad & \cs{nFa} & $\nFa$ \\
235 microfarad & \cs{uFa} & $\uFa$\\
236 millifarad & \cs{mFa} & $\mFa$ \\
237 farad & \cs{Fa} & $\Fa$\\
238 \bottomrule
239 \end{tabular}
240 \end{center}
241 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
242 \subsubsection{Inductance units}
243 \begin{center}
244 \begin{tabular}{lll}
245 \toprule
246 Unit & Equivalent code & Visualization\\
247 \midrule
248 femtohenry & \cs{fHe} & $\fHe$ \\
249 picohenry & \cs{pHe} & $\pHe$\\
250 nanohenry & \cs{nHe} & $\nHe$ \\
251 microhenry & \cs{uHe} & $\uHe$\\
252 millihenry & \cs{mHe} & $\mHe$ \\
253 henry & \cs{He} & $\He$\\
254 \bottomrule
255 \end{tabular}
256 \end{center}
257 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
258 \subsubsection{Level units}
259 \begin{center}
260 \begin{tabular}{lll}
261 \toprule
262 Unit & Equivalent code & Visualization\\
263 \midrule
264 dB & \cs{dB} & $\dB$ \\
265 dBm & \cs{dBm} & $\dBm$\\
266 \bottomrule
267 \end{tabular}
268 \end{center}
269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 \subsubsection{Power units}
271 \begin{center}
272 \begin{tabular}{lll}
273 \toprule
274 Unit & Equivalent code & Visualization\\
275 \midrule
276 microwatt & \cs{uW} & $\uW$\\
277 milliwatt & \cs{mW} & $\mW$ \\
278 watt & \cs{W} & $\W$\\
279 kilowatt & \cs{kW} & $\kW$\\
280 megawatt & \cs{MW} & $\MW$\\
281 \bottomrule
282 \end{tabular}
283 \end{center}
284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
285 \subsubsection{Frequency units}
286 \begin{center}
287 \begin{tabular}{lll}
288 \toprule
289 Unit & Equivalent code & Visualization\\
290 \midrule
291 hertz & \cs{Hz} & $\Hz$\\
292 kilohertz & \cs{kHz} & $\kHz$ \\
293 megahertz & \cs{MHz} & $\MHz$\\
294 gigaahertz& \cs{GHz} & $\GHz$\\
295 terahertz & \cs{THz} & $\THz$\\
296 \bottomrule
297 \end{tabular}
298 \end{center}
299 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300 \subsubsection{Bit, byte, and chip units according to the ISO regulations}
301 \begin{center}
302 \begin{tabular}{lll}
303 \toprule
304 Unit & Equivalent code & Visualization\\
305 \midrule
306 bit & \cs{bit} & $\bit$\\
307 kibibit & \cs{kbit} & $\kbit$ \\
308 mebibit & \cs{Mbit} & $\Mbit$\\
309 byte & \cs{Byte} & $\Byte$\\
310 kibibyte & \cs{kByte} & $\kByte$ \\
311 mebibyte & \cs{MByte} & $\MByte$\\
312 gibibyte & \cs{GByte} & $\GByte$ \\
313 tebibyte & \cs{TByte} & $\TByte$ \\
314 bit per second & \cs{bits} & $\bits$\\
315 kibibit per second & \cs{kbits} & $\kbits$ \\
316 mebibit per second & \cs{Mbits} & $\Mbits$\\
317 byte per second & \cs{Bytes} & $\Bytes$\\
318 kibibyte per second & \cs{kBytes} & $\kBytes$ \\
319 mebibyte per second & \cs{MBytes} & $\MBytes$\\
320 gibibyte per second & \cs{GBytes} & $\GBytes$\\
321 tebibyte per second & \cs{TBytes} & $\TBytes$\\
322 chip per second & \cs{chips} & $\chips$\\
323 kibichip per second & \cs{kchips} & $\kchips$ \\
324 mebichip per second & \cs{Mchips} & $\Mchips$\\
325 chip su bit per second & \cs{chipsubit} & $\chipsubit$\\
326 \bottomrule
327 \end{tabular}
328 \end{center}
329 \section{Symbols}\label{sec:simboli}
330 Several symbol macros are listed in this section.
331 All these macros are supposed to be used only in math mode. Each macro has an English and an Italian contracted name and the examples will show both of them: in the first line there will be the English version and in the second line the Italian one; if only one line is shown, there is no difference between the English and the Italian names.
332
333 \subsection{General symbols}
334
335 \subsubsection{End of exercise}
336 The command of end exercise puts a black square flush to the right side of the text block.
337 \begin{center}
338 \begin{tabular}{cc}
339 \toprule
340 Code & Visualization\\
341 \midrule
342 \cs{exerend} & $\blacksquare$\\
343 \cs{finees} & $\blacksquare$\\
344 \bottomrule
345 \end{tabular}
346 \end{center}
347
348 \subsubsection{Spaced ``implies'' command}
349 This command is very similar to \cs{implies}, but it puts before and after the symbol a space that can be chosen by the user by means of an optional argument; by default this space is 0.5\,cm; you can change the unit of measure for the spacing by assigning a value to the length register \cs{Implspace}, for example:
350 \begin{verbatim}
351 \setlength{\Implspace}{3mm}
352 \end{verbatim}
353 The syntax is therefore:
354 \begin{flushleft}
355 \cs{Spimplies}\texttt{[\meta{optional space in units of \normalfont\cs{Implspace}}]}\\
356 \cs{frecciadex}\texttt{[\meta{optional space in units of \normalfont\cs{Implspace}}]}
357 \end{flushleft}
358 In the following table, keeping in mind that \cs{Spimpiles} and \cs{frecciadex} are synonymous, in the first line the optional argument has been used, while in the second line the default spacing has been used, so as to evaluate the difference; in both cases the length register \cs{Implspace} was not reset and contains the value of 0.5\,cm.
359 \begin{center}
360 \begin{tabular}{cc}
361 \toprule
362 Code & Visualization\\
363 \midrule
364 \texttt{A\cs{Spimplies[0.3]} B} & $A\Spimplies[0.3]B$ \\
365 \texttt{A\cs{frecciadex} B} & $A\Spimplies B$ \\
366 \bottomrule
367 \end{tabular}
368 \end{center}
369 Notice that, by inserting in the optional argument the default length, you will obtain the same result:
370 \begin{center}
371 \begin{tabular}{cc}
372 \toprule
373 Codice & Visualizzazione\\
374 \midrule
375 \texttt{A\cs{Spimplies} B} & $A\Spimplies B$ \\
376 \texttt{A\cs{frecciadex[0.5]} B} & $A\frecciadex[0.5] B$ \\
377 \bottomrule
378 \end{tabular}
379 \end{center}
380
381 \subsubsection{Vertical ``implies'' command}
382 \begin{center}
383 \begin{tabular}{cc}
384 \toprule
385 Code & Visualization\\
386 \midrule
387 \cs{Downimplies} & $\Downarrow$\\
388 \cs{frecciadown} & $\Downarrow$\\
389 \bottomrule
390 \end{tabular}
391 \end{center}
392
393 \subsubsection{White noise command}
394 \begin{center}
395 \begin{tabular}{cc}
396 \toprule
397 Code & Visualization\\
398 \midrule
399 \cs{noisevar} & \noisevar\\[1ex]
400 \cs{varianzarumore} & \varianzarumore\\
401 \bottomrule
402 \end{tabular}
403 \end{center}
404
405 \subsubsection{Fourier Transform}
406 Command for the Fourier transform of $x$.
407 \begin{center}
408 \begin{tabular}{cc}
409 \toprule
410 Code & Visualization\\
411 \midrule
412 \cs{fourier\{x\}} & \fourier{x}\\
413 \bottomrule
414 \end{tabular}
415 \end{center}
416
417 \subsubsection{Inverse Fourier Transform}
418 This command is very similar to the previous one.
419 \begin{center}
420 \begin{tabular}{cc}
421 \toprule
422 Code & Visualization\\
423 \midrule
424 \cs{invfourier\{x\}} & \invfourier{x}\\
425 \bottomrule
426 \end{tabular}
427 \end{center}
428
429 \subsubsection{Real part}
430 \begin{center}
431 \begin{tabular}{cc}
432 \toprule
433 Code & Visualization\\
434 \midrule
435 \cs{bfRe\{x\}} & \partereale{x}\\
436 \cs{partereale\{x\}} & \partereale{x}\\
437 \bottomrule
438 \end{tabular}
439 \end{center}
440
441 \subsubsection{Imaginary part}
442 \begin{center}
443 \begin{tabular}{cc}
444 \toprule
445 Code & Visualization\\
446 \midrule
447 \cs{bfIm\{x\}} & \parteimm{x}\\
448 \cs{parteimm\{x\}} & \parteimm{x}\\
449 \bottomrule
450 \end{tabular}
451 \end{center}
452
453 \subsubsection{Information element}
454 \begin{center}
455 \begin{tabular}{cc}
456 \toprule
457 Code & Visualization\\
458 \midrule
459 \cs{Info\{x\}} & \Info{x}\\
460 \bottomrule
461 \end{tabular}
462 \end{center}
463
464 \subsubsection{Signals in different domains}
465
466 The following four macros define signal functions, by using as a convention lower case letters for signals in the time domain and for discrete sequences while signals in frequency and $z$-transform domains have automatically the upper case letter.
467 \begin{center}
468 \begin{tabular}{cc}
469 \toprule
470 Code & Visualization\\
471 \midrule
472 \cs{signt\{f\}} & \signt{f}\\
473 \cs{signf\{g\}} & \signf{g}\\
474 \cs{signn\{h\}} & \signn{h}\\
475 \cs{signz\{k\}} & \signz{k}\\
476 \bottomrule
477 \end{tabular}
478 \end{center}
479
480 \subsubsection{Analytic signal}
481 \begin{center}
482 \begin{tabular}{cc}
483 \toprule
484 Code & Visualization\\
485 \midrule
486 \cs{analytic\{x\}} & \analytic{x}\\
487 \cs{analitic\{x\}} & \analitic{x}\\
488 \bottomrule
489 \end{tabular}
490 \end{center}
491
492
493 \subsubsection{Unit vector}
494 \begin{center}
495 \begin{tabular}{cc}
496 \toprule
497 Code & Visualization\\
498 \midrule
499 \cs{unitvec\{x\}} & \versore{x}\\
500 \cs{versore\{x\}} & \versore{x}\\
501 \bottomrule
502 \end{tabular}
503 \end{center}
504
505 \subsubsection{Vector}
506 \begin{center}
507 \begin{tabular}{cc}
508 \toprule
509 Code & Visualization\\
510 \midrule
511 \cs{vector\{x\}} & \vettore{x}\\
512 \cs{vettore\{x\}} & \vettore{x}\\
513 \bottomrule
514 \end{tabular}
515 \end{center}
516
517 \subsubsection{Cosine wave of a given frequency}
518 \begin{center}
519 \begin{tabular}{cc}
520 \toprule
521 Code & Visualization\\
522 \midrule
523 \cs{cosine\{f\_0\}} & \coseno{f_0}\\
524 \cs{coseno\{f\_0\}} & \coseno{f_0}\\
525 \bottomrule
526 \end{tabular}
527 \end{center}
528
529 \subsubsection{Sine wave of a given frequency}
530 \begin{center}
531 \begin{tabular}{cc}
532 \toprule
533 Code & Visualization\\
534 \midrule
535 \cs{sine\{f\_0\}} & \seno{f_0}\\
536 \cs{seno\{f\_0\}} & \seno{f_0}\\
537 \bottomrule
538 \end{tabular}
539 \end{center}
540
541 \subsubsection{Energy}
542 \begin{center}
543 \begin{tabular}{cc}
544 \toprule
545 Code & Visualization\\
546 \midrule
547 \cs{energy\{m\}} & \energia{m}\\
548 \cs{energia\{m\}} & \energia{m}\\
549 \bottomrule
550 \end{tabular}
551 \end{center}
552
553 \subsubsection{Module}
554 \begin{center}
555 \begin{tabular}{cc}
556 \toprule
557 Code & Visualization\\
558 \midrule
559 \cs{Abs\{x\}} & \modulo{x}\\
560 \cs{modulo\{x\}} & \modulo{x}\\
561 \bottomrule
562 \end{tabular}
563 \end{center}
564
565 \subsubsection{Exponential with ISO compliant natural base}
566 The ISO regulations require that the base of natural logarithms and of the exponential function be set in roman type.
567 \begin{center}
568 \begin{tabular}{cc}
569 \toprule
570 Code & Visualization\\
571 \midrule
572 \cs{rmexp\{x\}} & \rmexp{x}\\
573 \cs{ex\{x\}} & \ex{x}\\
574 \bottomrule
575 \end{tabular}
576 \end{center}
577
578 \subsubsection{ISO compliant imaginary unit, engineering style}
579 Similarly the ISO regulations require the imaginary unit to be typeset in roman type; electrical and telecommunications engineers use the letter ``j'' in order to avoid any possible confusion with the standard current symbol $i$; the roman type avoids also any possible confusion with the standard symbols for the current density~$j$.
580 \begin{center}
581 \begin{tabular}{cc}
582 \toprule
583 Code & Visualization\\
584 \midrule
585 \cs{iu\cs{omega}} & $\iu\omega$\\
586 \bottomrule
587 \end{tabular}
588 \end{center}
589
590 \subsubsection{Module with exponent}
591 \begin{center}
592 \begin{tabular}{cc}
593 \toprule
594 Code & Visualization\\
595 \midrule
596 \cs{AbsPow\{x\}\{2\}} & \moduloexp{x}{2}\\
597 \cs{moduloexp\{x\}\{2\}} & \moduloexp{x}{2}\\
598 \bottomrule
599 \end{tabular}
600 \end{center}
601
602 \subsubsection{Function value for a certain value of the independent variable}
603 \begin{center}
604 \begin{tabular}{cc}
605 \toprule
606 Code & Visualization\\
607 \midrule
608 \cs{for\{f(x)\}\{x\_0\}} & \for{f(x)}{x_0}\\
609 \bottomrule
610 \end{tabular}
611 \end{center}
612
613
614 \subsubsection{A ratio in dB}
615 A special application of the previous command \cs{for}.
616 \begin{center}
617 \begin{tabular}{cc}
618 \toprule
619 Code & Visualization\\
620 \midrule
621 \cs{indB\{\cs{dfrac}\{C\}\{I\}\}} & $\indB{\dfrac{C}{I}}$\\
622 \bottomrule
623 \end{tabular}
624 \end{center}
625
626 \subsubsection{Maximum}
627 \begin{center}
628 \begin{tabular}{cc}
629 \toprule
630 Code & Visualization\\
631 \midrule
632 \cs{Max\{x\}} & \massimo{x}\\
633 \cs{massimo\{x\}} & \massimo{x}\\
634 \bottomrule
635 \end{tabular}
636 \end{center}
637
638 \subsubsection{Minimum}
639 \begin{center}
640 \begin{tabular}{cc}
641 \toprule
642 Code & Visualization\\
643 \midrule
644 \cs{Min\{x\}} & \minimo{x}\\
645 \cs{minimo\{x\}} & \minimo{x}\\
646 \bottomrule
647 \end{tabular}
648 \end{center}
649
650 \subsubsection{Speed of light}
651 \begin{center}
652 \begin{tabular}{cc}
653 \toprule
654 Code & Visualization\\
655 \midrule
656 \cs{clight} & $\valc$\\
657 \cs{valc} & $\valc$\\
658 \bottomrule
659 \end{tabular}
660 \end{center}
661 \subsubsection{Logarithm with specified base}
662 \begin{center}
663 \begin{tabular}{cc}
664 \toprule
665 Code & Visualization\\
666 \midrule
667 \cs{Log\{2\}\{x\}} & \loga{2}{x}\\
668 \cs{loga\{2\}\{x\}} & \loga{2}{x}\\
669 \bottomrule
670 \end{tabular}
671 \end{center}
672
673 \subsubsection{Integral}
674 An integral on the whole real domain, from $-\infty$ to $+\infty$:
675 \begin{center}
676 \begin{tabular}{cc}
677 \toprule
678 Code & Visualization\\
679 \midrule
680 \cs{infint\{x\cs{diff} x\}} & \intinf{x\diff x}\\[1ex]
681 \cs{intinf\{x\cs{diff} x\}} & \intinf{x\diff x}\\
682 \bottomrule
683 \end{tabular}
684 \end{center}
685 Notice the use of the differential sign \cs{diff} that complies with the ISO regulations that require the differential sign be set in roman type with the proper spacings on the left and on the right.
686
687 \subsubsection{Dirac's Delta with independent variable}
688 \begin{center}
689 \begin{tabular}{cc}
690 \toprule
691 Code & Visualization\\
692 \midrule
693 \cs{deltain\{x\}} & \deltain{x}\\
694 \bottomrule
695 \end{tabular}
696 \end{center}
697
698 \subsection{Reflectances}
699 The reflectance symbols used in electrical and magnetic field theory courses are described; you have two kind of commands, the generic ones, and the specific ones where you can specify the point of measure.
700
701 \subsubsection{Generic reflectances}
702 \begin{center}
703 \begin{tabular}{cc}
704 \toprule
705 Code & Visualization\\
706 \midrule
707 \cs{Vgamma} & \gammatens\\
708 \cs{gammatens} & \gammatens\\
709 \cs{Cgamma} & \gammacorr\\
710 \cs{gammacorr} & \gammacorr\\
711 \bottomrule
712 \end{tabular}
713 \end{center}
714
715 \subsubsection{Specific reflectances}
716 \begin{center}
717 \begin{tabular}{cc}
718 \toprule
719 Code & Visualization\\
720 \midrule
721 \cs{Vgammain\{A\}} & \gammatensin{A}\\
722 \cs{gammatensin\{A\}} & \gammatensin{A}\\
723 \cs{Cgammain\{A\}} & \gammacorrin{A}\\
724 \cs{gammacorrin\{A\}} & \gammacorrin{A}\\
725 \bottomrule
726 \end{tabular}
727 \end{center}
728 Since the voltage reflectance (gamma) is used more often than the current one, it may be input with a shorter command:
729 \begin{center}
730 \begin{tabular}{cc}
731 \toprule
732 Code & Visualization\\
733 \midrule
734 \cs{gammain\{A\}} & \gammain{A}\\
735 \bottomrule
736 \end{tabular}
737 \end{center}
738 \subsubsection{The Kurokawa reflectance}
739 \begin{center}
740 \begin{tabular}{cc}
741 \toprule
742 Code & Visualization\\
743 \midrule
744 \cs{gammak} & \gammak\\
745 \bottomrule
746 \end{tabular}
747 \end{center}
748
749 \subsection{Usage examples}
750 Here are some examples that clearly show the usefulness of \textsf{engtlc}:
751 \begin{enumerate}
752 \item \begin{tabbing}
753 \hspace{7cm}\=\kill
754 Code \> Visualization\\
755 \cs{AbsPow\{\cs{gammak}\}\{2\}} \> \AbsPow{\gammak}{2}
756 \end{tabbing}
757 \item \begin{tabbing}
758 \hspace{9cm}\=\kill
759 Code \> Visualization \\
760 \cs{bfRe\{\cs{fourier}\{\cs{AbsPow}\{x\}\{2\}\}\}} \> $\bfRe{\fourier{\AbsPow{x}{2}}}$
761 \end{tabbing}
762 The standard code to write the above expression is:
763 \begin{lstlisting}
764 $\textbf{Re}\left\lbrace \mathcal{F}\left\lbrace
765 \left\vert x \right\vert^{2} \right\rbrace \right\rbrace$
766 \end{lstlisting}
767
768 \end{enumerate}
769
770 \subsection{Wave length symbols}
771 There are three different types of symbols:
772
773 \subsubsection{In the open space}
774 \begin{center}
775 \begin{tabular}{cc}
776 \toprule
777 Code & Visualization\\
778 \midrule
779 \cs{lbvt} & $\lbvt$\\
780 \bottomrule
781 \end{tabular}
782 \end{center}
783
784 \subsubsection{In a guide filled with generic dielectric}
785 \begin{center}
786 \begin{tabular}{cc}
787 \toprule
788 Code & Visualization\\
789 \midrule
790 \cs{lbg} & $\lbg$\\
791 \bottomrule
792 \end{tabular}
793 \end{center}
794
795 \subsubsection{In an empty guide }
796 \begin{center}
797 \begin{tabular}{cc}
798 \toprule
799 Code & Visualization\\
800 \midrule
801 \cs{lbgvt} & $\lbgvt$\\
802 \bottomrule
803 \end{tabular}
804 \end{center}
805
806 \subsection{Impedance and admittance symbols}
807 With \textsf{engtlc} you can also write any kind of impedance and admittance.
808
809 \subsubsection{Generic impedance and admittance}
810 To input an impedance or admittance at a specific port or line section~A use:
811 \begin{center}
812 \begin{tabular}{cc}
813 \toprule
814 Code & Visualization\\
815 \midrule
816 \cs{z\{A\}} & \z{A}\\
817 \cs{y\{A\}} & \y{A}\\
818 \bottomrule
819 \end{tabular}
820 \end{center}
821 To input a normalized impedance or admittance at a specific port or line section~A use:
822 \begin{center}
823 \begin{tabular}{cc}
824 \toprule
825 Code & Visualization\\
826 \midrule
827 \cs{znorm\{A\}} & \znorm{A}\\
828 \cs{ynorm\{A\}} & \ynorm{A}\\
829 \bottomrule
830 \end{tabular}
831 \end{center}
832
833 \subsubsection{Characteristic impedance and admittance}
834 To input the symbol for characteristic impedance or admittance use:
835 \begin{center}
836 \begin{tabular}{cc}
837 \toprule
838 Code & Visualization\\
839 \midrule
840 \cs{zinf} & \zinf\\
841 \cs{yinf} & \yinf\\
842 \bottomrule
843 \end{tabular}
844 \end{center}
845 In a guide there are several mode dependent characteristic impendances: you may use another command in order to distinguish them; for example if you want to label with~2 a second impedance you may use:
846 \begin{center}
847 \begin{tabular}{cc}
848 \toprule
849 Code & Visualization\\
850 \midrule
851 \cs{zinf[2]} & \zinf[2]\\
852 \cs{zinfn\{2\}} & \zinfn{2}\\
853 \cs{yinf[2]} & \yinf[2]\\
854 \cs{yinfn\{2\}} & \yinfn{2}\\
855 \bottomrule
856 \end{tabular}
857 \end{center}
858 To avoid confusion pay attention when you input a numbered impedance and you use the \cs{zinf} or \cs{yinf} commands: you must use either the optional argument command or the n-extended command:
859 \begin{tabbing}
860 \hspace{7cm}\=\kill
861 Impedance with optional argument \> Visualization \\
862 \cs{zinf[2]} \> \zinf[2] \\
863 n-extended impedance Code \> Visualization \\
864 \cs{zinfn\{2\}} \> \zinfn{2} \\
865 Generic impedance Code \> Visualization \\
866 \cs{zinf\{2\}} \> \zinf{2}
867 \end{tabbing}
868 The last code is not wrong under the \LaTeX\ point of view, but probably the output is not the expected one\dots
869
870 The open space impedance and admittance is input by means of:
871 \begin{center}
872 \begin{tabular}{cc}
873 \toprule
874 Code & Visualization\\
875 \midrule
876 \cs{zvt} & \zvt\\
877 \cs{yvt} & \yvt\\
878 \bottomrule
879 \end{tabular}
880 \end{center}
881
882 \subsection{Some more usage examples}
883
884 \noindent With \textsf{engtlc} commands the available power can be written with the code:
885 \begin{verbatim}
886 \[\availpow=\frac{\AbsPow{V}{2}}{\bfRe{4\cdot\z{G}}}\]
887 \end{verbatim}
888 that yields:
889 \[ \availpow=\frac{\AbsPow{V}{2}}{4\cdot \bfRe{\z{G}}} \]
890 Without the \textsf{engtlc} commands the code would be:
891 \begin{verbatim}
892 \[P_{\mathrm{disp}}=\frac{\left| V \right|^2}%
893 { 4\cdot\textbf{Re}\left\{ Z_\mathrm{G}\right\}}\]
894 \end{verbatim}
895
896 \subsection{Power symbols}
897 Here we have the commands to input power symbols; the following commands may be used in both text and math modes.
898
899 \subsubsection{Power into a port}
900 To write the power entering into a specific port or line\slash guide section~A use:
901 \begin{center}
902 \begin{tabular}{cc}
903 \toprule
904 Code & Visualization\\
905 \midrule
906 \cs{powerin\{A\}} & \powerin{A}\\
907 \cs{potin\{A\}} & \potin{A}\\
908 \bottomrule
909 \end{tabular}
910 \end{center}
911
912 \subsubsection{Available Power}
913 \begin{center}
914 \begin{tabular}{cc}
915 \toprule
916 Code & Visualization\\
917 \midrule
918 \cs{availpow} & \potdisp\\
919 \cs{potdisp} & \potdisp\\
920 \bottomrule
921 \end{tabular}
922 \end{center}
923
924 \subsubsection{Power supply}
925 \begin{center}
926 \begin{tabular}{cc}
927 \toprule
928 Code & Visualization\\
929 \midrule
930 \cs{potDC} & \potDC\\
931 \cs{potCC} & \potCC\\
932 \bottomrule
933 \end{tabular}
934 \end{center}
935 For compatibility reasons, there is also the possibility of exploit \cs{potalim} the old name for the symbol.
936
937 \subsubsection{Radiation Power}
938 \begin{center}
939 \begin{tabular}{cc}
940 \toprule
941 Code & Visualization\\
942 \midrule
943 \cs{irrpow} & \potirr\\
944 \cs{potirr} & \potirr\\
945 \bottomrule
946 \end{tabular}
947 \end{center}
948
949 \subsubsection{Dissipated Power}
950 \begin{center}
951 \begin{tabular}{cc}
952 \toprule
953 Code & Visualization\\
954 \midrule
955 \cs{disspow} & \potdiss\\
956 \cs{potdiss} & \potdiss\\
957 \bottomrule
958 \end{tabular}
959 \end{center}
960
961 \subsubsection{Incident power}
962 \begin{center}
963 \begin{tabular}{cc}
964 \toprule
965 Code & Visualization\\
966 \midrule
967 \cs{incpow} & \potinc\\
968 \cs{potinc} & \potinc\\
969 \bottomrule
970 \end{tabular}
971 \end{center}
972
973 Pay attention that, in this version, all shortcuts describing power symbols, a part from the first one \cs{powerin\{A\}}, have an optional argument: it is used to indicate explicitly the point in which you can measure the power. To describe, for example, the dissipated power for a general transmitting device, you should use \cs{disspow[tx]} which give as a result $\disspow[tx]$. Be careful: if you put \{ \} instead of [ ] you obtain a different, undesired result. Indeed, \cs{irrpow\{rx\}} becomes $\irrpow{rx}$.
974
975 \subsection{Electrical and magnetic field symbols}
976 With regards to electrical and magnetic fields, \textsf{engtlc} commands are not so well established, as they depend on every particular school, whether they are typeset or handwritten, etcetera. For informal handouts the underlined vector convention is often used. We distinguish:
977 \begin{itemize}
978 \item[$\star$] electric and magnetic field as a function of a vector position \vector{r} and time;
979 \item[$\star$] electric and magnetic field phasors as a function of a vector position~\vector{r}.
980 \end{itemize}
981 In several electric and magnetic fields courses in order to denote $A$ as a vector, instead of using arrows ``accents'' or bold symbols, the convention $\underline{A}$ is used:
982 \begin{center}
983 \begin{tabular}{lc@{\qquad}lr}
984 \toprule
985 \multicolumn2{c@{\qquad}}{Time dependent fields}&
986 \multicolumn2c{Field phasors} \\
987 %\midrule
988 Code & Visualization & Code & \makebox[3em][r]{Visualization} \\
989 \midrule
990 \cs{Efield} & \campoe & \cs{phasorEfield} & \campoefas \\
991 \cs{campoe} & \campoe & \cs{campoefas} & \campoefas \\
992 \cs{Hfield} & \campoh & \cs{phasorHfield} & \campohfas \\
993 \cs{campoh} & \campoh & \cs{campohfas} & \campohfas \\
994 \bottomrule
995 \end{tabular}
996 \end{center}
997
998 Pay attention: we distinguish the symbols of energy \cs{energy\marg{argument}} and electric field \cs{campoe} because the second one is a vector and it does not have subscript symbols.
999 \subsection{Probability symbols}
1000
1001 \subsubsection{Probability}
1002 The probability of event A, or of variable $x$, is input as:
1003 \begin{center}
1004 \begin{tabular}{cc}
1005 \toprule
1006 Code & Visualization\\
1007 \midrule
1008 \cs{prob\{\cs{text}\{A\}\}} & \prob{\text{A}}\\
1009 \cs{prob\{x\}} & \prob{x}\\
1010 \bottomrule
1011 \end{tabular}
1012 \end{center}
1013
1014 \subsubsection{Expected value}
1015 \begin{center}
1016 \begin{tabular}{cc}
1017 \toprule
1018 Code & Visualization\\
1019 \midrule
1020 \cs{expval\{x\}} & \expval{x}\\
1021 \cs{valatt\{x\}} & \valatt{x}\\
1022 \bottomrule
1023 \end{tabular}
1024 \end{center}
1025
1026 \subsubsection{Variance}
1027 \begin{center}
1028 \begin{tabular}{cc}
1029 \toprule
1030 Code & Visualization\\
1031 \midrule
1032 \cs{var\{x\}} & \var{x}\\
1033 \bottomrule
1034 \end{tabular}
1035 \end{center}
1036
1037 \subsubsection{Joint probability}
1038 This macro inserts a well separated comma between two stochastic variables:
1039 \begin{center}
1040 \begin{tabular}{cc}
1041 \toprule
1042 Code & Visualization\\
1043 \midrule
1044 \cs{comma} & \prob{x\comma y}\\
1045 \bottomrule
1046 \end{tabular}
1047 \end{center}
1048
1049 \subsubsection{Conditional probability}
1050 These macros insert a vertical bar separator between two stochastic variables:
1051 \begin{center}
1052 \begin{tabular}{cc}
1053 \toprule
1054 Code & Visualization\\
1055 \midrule
1056 \cs{given} & \prob{x\given y}\\
1057 \cs{dato} & \prob{x\dato y}\\
1058 \bottomrule
1059 \end{tabular}
1060 \end{center}
1061
1062 \section*{Aknowledgements}
1063 I wish to thank prof.~Enrico Gregorio, who very kindly sent me a complete list of errors in my third package edition and documentation.
1064
1065 I wish to thank also prof.~Claudio Beccari for many useful suggestions and the adaptation of several commands to the ISO regulations.
1066
1067
1068 \chapter{LPPL Licence}
1069 \textsf{engtlc} is distributed under LPPL Licence: \LaTeX\, Project Public Licence.
1070 \begin{footnotesize}
1071 \begin{verbatim}
1072 %% engtlc.sty
1073 %% Copyright 2010-2012 Claudio Fiandrino
1074 %
1075 % This work may be distributed and/or modified under the
1076 % conditions of the LaTeX Project Public License, either version 1.3
1077 % of this license or (at your option) any later version.
1078 % The latest version of this license is in
1079 % http://www.latex-project.org/lppl.txt
1080 % and version 1.3 or later is part of all distributions of LaTeX
1081 % version 2005/12/01 or later.
1082 %
1083 % This work has the LPPL maintenance status `maintained'.
1084 %
1085 % The Current Maintainer of this work is Fiandrino Claudio.
1086 %
1087 % This work consists of the file engtlc.sty.
1088 \end{verbatim}
1089 \end{footnotesize}
1090 \end{document}