summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bosisio/sobolev.dtx
blob: e7b524e4fee6baa383a3d45a9a6bdf97f11c9f14 (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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
%\iffalse % MetaComment
%%
%% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
%% |            Copyright(C) 1997-2010 by F. Bosisio             |
%% |                                                             |
%% | This program can be redistributed and/or modified under	 |
%% | the terms 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 LaTeX distributions |
%% | version 2005/12/01 or later.                                |
%% |                                                             |
%% | This work has the LPPL maintenance status `maintained'.     |
%% | The Current Maintainer of this work is F. Bosisio.          |
%% |                                                             |
%% | This work consists of files sobolev.dtx and sobolev.html    |
%% | and of the derived files sobolev.sty and sobolev.pdf.       |
%% |                                                             |
%% | E-mail:   fbosisio@bigfoot.com                              |
%% | CTAN location: macros/latex/contrib/bosisio/                |
%% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
%%
%%	If you make any improvment, find any bug or have
%%	any suggestion, please let me know about it.
%%
%<*package,driver>
%\fi
%
\def\FileName{sobolev}
%\iffalse % MetaComment
%</package,driver>
%<*package>
%\fi
\def\fileversion{2.2}
\def\filedate{1997/11/14}
\def\docdate{2005/04/09}
\def\filedescr{Commands to print the Sobolev spaces (FB)}
%
%\iffalse % MetaComment
%</package>
%<*dtx>
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%		This section is the installation driver
%
\def\batchfile{\FileName.dtx}
%
\input docstrip
%
\keepsilent
% \askforoverwritefalse
%
\generateFile{\FileName.sty}{f}{\from{\FileName.dtx}{package}}
%
\generateFile{\FileName.drv}{f}{\from{\FileName.dtx}{driver}}
%
\Msg{******************************************************}
\Msg{*}
\Msg{* To produce the documentation run the}
\Msg{* file `\FileName.drv' through LaTeX.}
\Msg{*}
\Msg{******************************************************}
%
\endbatchfile
%
%		End of the installation driver
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%</dtx>
%
%		This section is the documentation driver
%
%<+driver>\documentclass[12pt,a4paper]{ltxdoc}
%<+driver>  \EnableCrossrefs
%<+driver>  \CodelineIndex
%<+driver>  \RecordChanges
%<+driver>  %\OnlyDescription   % Uncomment not to see the implementation
%<+driver>\begin{document}
%<+driver>  \DocInput{\FileName.dtx}
%<+driver>  \PrintIndex
%<+driver>  \PrintChanges
%<+driver>\end{document}
%
%		End of the documentation driver
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%<*package>
%\fi
%
% \changes{v0.1}{28 March 1997}{First release (basic commands)}
% \changes{v0.2}{3 April 1997}{Added package options}
% \changes{v0.3}{7 July 1997}{Fixed a bug in the command ``Scalar''}
% \changes{v0.4}{4 August 1997}{Fixed a bug in the options}
% \changes{v1.0}{5 August 1997}{Documentation added}
% \changes{v1.1}{4 November 1997}{Fixed a bug in the ``Hdiv'' command}
% \changes{v1.2}{5 November 1997}{Superscripts for ``Norm'' and ``SemiNorm''}
% \changes{v2.0}{14 November 1997}{Changed ``Scalar'' sintax; added ``Crochet''}
% \changes{v2.1}{5 March 1999}{Added copyright notice and changed addresses}
% \changes{v2.2}{9 April 2005}{Usage of the double-quote character (") avoided}
%
% \MakeShortVerb{\|}
%
% \title{Package \texttt{\FileName}\thanks{This is version \fileversion,
% last revised \filedate; documentation date \docdate}}
% \author{F. Bosisio\\\normalsize E-mail: \texttt{fbosisio@bigfoot.com}}
% \date{\filedate}
% \maketitle
%
% \begin{abstract}
%	Documentation for the package \texttt{\FileName}.
% \end{abstract}
%
% \section{Introduction}
%	This package provides some commands which are useful when dealing
%	with Sobolev spaces and their relatives.
%
%	In particular some commands are redefined, so care should be
%	taken, expecially when including this package in an already
%	existent \LaTeX{} file.
%
%	\noindent
%	The redefined commands are |\H| and |\L|.
%	The effect of ``|\H|'' (which is a type of accent) can now be
%	achieved by the command ``|\HAccent|'', whilst the job of ``|\L|''
%	(i.e. print an ``L'' with a superimposed bar) is now done by the
%	command ``|\Lbar|''.
%
% \section{The options}
%	Two options are available at the moment: \texttt{DivInBrackets}
%	and \texttt{DivAsExponent}.
%	They only affect the output of the ``|\Hdiv|'' command.
%
%	\noindent
%	The firt options (\texttt{DivInBrackets}, which is the default)
%	makes |\Hdiv| behave like ``|H(div;|\dots|)|'', while the second
%	one (\texttt{DivAsExponent}) makes |\Hdiv| expand to
%	``|H^{div}(|\dots|)|''.
%
% \section{The commands}
%	Most of the subsequent space-generating commands have mandatory
%	arguments to indicate the type of the space.
%	Often this argument consists of a single digit: in this case it
%	is \emph{not} necessary to enclose it in brackets, since in \LaTeX{}
%	the names of commands consists of letters only, and so a digit
%	following it is certainly an argument.
%	This saves a lot of typing and is the only reason that makes these
%	commans useful (if you always had to type the brackets, then it
%	would have been simpler to type the expansion of the command than
%	the command itself !).
%	In other words, you can think as if several commands exist (like
%	|\H|, |\H1|, |\H10|, etc.), the ones with the digit beeing a sort of
%	abbreviation for the general one.
%
%	\subsection{The \texttt{H} command}
%		The |\H| command is used to generate the symbol of sobolev
%		spaces.
%		It takes a mandatory argument, which is used as a
%		superscript, and an optional argument, which is used as a
%		subscript.
%
%		\noindent
%		As explained above, if the mandatory argument is a digit,
%		it need not be enclosed in brackets.
%		Moreover, if the optional argument is the digit ``0'', it
%		can be typed without the square brackets.
%
%		\noindent
%		Here are some examples (whith the |\DefaultSet| set to its
%		default value |\Omega|):
%
%		\begin{tabular}{lll}
%			|\H2|		& $\Longrightarrow$ & $H^2(\Omega)$	       \\
%			|\H10|		& $\Longrightarrow$ & $H^1_0(\Omega)$	       \\
%			|\H1[\Gamma_D]|	& $\Longrightarrow$ & $H^1_{\Gamma_D}(\Omega)$ \\
%			|\H{-1/2}|	& $\Longrightarrow$ & $H^{-1/2}(\Omega)$
%		\end{tabular}
%
%	\subsection{The \texttt{Hdiv} command}
%		The |\Hdiv| command is used to generate the sobolev space
%		called ``H div''.
%		It takes only an optional argument, which is used as a
%		subscript and which need not to be surrounded by the square
%		brackets if it is the digit ``0''.
%
%		\noindent
%		If the (default) option \texttt{DivInBrackets} is in effect,
%		it differs from the command |\H| in that the word ``div'' is
%		printed (in roman type) inside brackets, before the set.
%		If, instead, the option \texttt{DivAsExponent} is active,
%		then it is simply an abbreviation for |\H{\mathrm{div}}|.
%
%		\noindent
%		Here are some examples:\\
%		\hfill \begin{tabular}{llcc}
%					   &		       & |DivInBrackets|		     & |DivAsExponent|	\\
%			|\Hdiv|		   & $\Longrightarrow$ & $H(\mathrm{div};\Omega)$	     & $H^{\mathrm{div}}(\Omega)$	\\
%			|\Hdiv0|	   & $\Longrightarrow$ & $H_0(\mathrm{div};\Omega)$	     & $H^{\mathrm{div}}_0(\Omega)$	\\
%			|\Hdiv[\Gamma_D]|  & $\Longrightarrow$ & $H_{\Gamma_D}(\mathrm{div};\Omega)$ & $H^{\mathrm{div}}_{\Gamma_D}(\Omega)$
%		\end{tabular} \hfill
%
%	\subsection{The \texttt{L} command}
%		The |\L| command is used to generate the symbol of
%		Lebesgue-measurable functions.
%		It has one argument which is the exponent of the L-space.
%		Again, if this argument is a digit (or a single symbol,
%		like ``|\infty|'') the surrounding braces are optional.
%		Like for the |\H| command, the output of |\DefaultSet| is
%		appended.
%
%		\noindent
%		Here are some examples: \hspace{2cm}
%		\begin{tabular}{lll}
%			|\L2|		& $\Longrightarrow$ & $L^2(\Omega)$	       \\
%			|\L{10}|	& $\Longrightarrow$ & $L^{10}(\Omega)$	       \\
%			|\L\infty|	& $\Longrightarrow$ & $L^\infty(\Omega)$
%		\end{tabular}
%
%	\subsection{The \texttt{W} command}
%		The |\W| command is completly analogous, except that it
%		prints a ``W'' insted af an ``L'' and that it has two
%		argument, both printed as a supercript, separated by a comma.
%		It is used for the generalized Sobolev spaces.
%
%		\noindent
%		Here is an example of how it is used: \hspace{1cm}
%		\begin{tabular}{lll}
%			|\W{k}{p}|	& $\Longrightarrow$ & $W^{k,p}(\Omega)$ \\
%			|\W1\infty|	& $\Longrightarrow$ & $W^{1,\infty}(\Omega)$
%		\end{tabular}
%
%	\subsection{The \texttt{D} command}
%		The |\D| command is used in the theory of distributions:
%		it prints the space of distributions over the |\DefaultSet|
%		if followed by a prime symbol, or its dual space, otherwise.
%		\hfill \begin{tabular}{lll}
%			|\D|	& $\Longrightarrow$ & $\mathcal{D}(\Omega)$ \\
%			|\D'|	& $\Longrightarrow$ & $\mathcal{D}'(\Omega)$
%		\end{tabular} \hfill
%
%	\subsection{The \texttt{Norm} command}
%		The |\Norm| command has a mandatory and an optional argument;
%		it generates the norm of the mandatory argument, with the
%		optional argument, if present, as a whole subscript, to
%		denote the space within which the norm is taken.
%
%		\noindent
%		Some examples: \hspace{3cm}
%		\begin{tabular}{lll}
%			|\Norm{f(x)}|	& $\Longrightarrow$ & $\left\|f(x)\right\|$ \\
%			|\Norm{g}[L^2]|	& $\Longrightarrow$ & $\left\|g\right\|_{L^2}$
%		\end{tabular}
%
%	\subsection{The \texttt{SemiNorm} command}
%		The |\SemiNorm| command is completly analoguos, but
%		generates the semi-norm instead of the norm.
%
%		\noindent
%		Some examples: \hspace{2cm}
%		\DeleteShortVerb{\|}
%		\MakeShortVerb{\!}
%		\begin{tabular}{lll}
%			!\SemiNorm{f(x)}!	& $\Longrightarrow$ & $\left|f(x)\right|$ \\
%			!\SemiNorm{g}[H^1]!	& $\Longrightarrow$ & $\left|g\right|_{H^1}$
%		\end{tabular}
%		\DeleteShortVerb{\!}
%		\MakeShortVerb{\|}
%
%	\subsection{The \texttt{Scalar} command}
%		The |\Scalar| command has two arguments; a third optional
%		argument (which is used as a whole subscript) may follow
%		inside square brackets.
%		The output consists of the two arguments separated by a
%		comma and enclosed in a pair of adjustable-size brackets,
%		with the optional argument placed as a subscript (to denote
%		the space inside which the scalr product is taken).
%
%		\noindent
%		Some examples:
%		\begin{tabular}{lll}
%			|\Scalar{f}{g}|	     &$\Longrightarrow$& $\left(f,g\right)$ \\
%			|\Scalar{u}{v}[L^2]| &$\Longrightarrow$& $\left(u,v\right)_{L^2}$\\
%		\end{tabular}
%
%	\subsection{The \texttt{Crochet} command}
%		The |\Crochet| command has two arguments; a third optional
%		argument (which is used as a whole subscript) may follow
%		inside square brackets.
%		The output consists of the two arguments separated by a
%		comma and enclosed in a pair of adjustable-size
%		angular-parenthesys, with the optional argument placed as
%		a subscript (to denote the space inside which the duality
%		is taken).
%
%		\noindent
%		Some examples:
%		\begin{tabular}{lll}
%			|\Crochet{f}{g}|    &$\Longrightarrow$& $\left\langle f,g\right\rangle$ \\
%			|\Crochet{u}{v}[D]| &$\Longrightarrow$& $\left\langle u,v\right\rangle_D$\\
%		\end{tabular}
%
% \StopEventually{}
% \newpage
% \section{Implementation}
%
%    \begin{macrocode}
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{\FileName}[\filedate\space v\fileversion\space\filedescr]
%    \end{macrocode}
%
%	The options set the flag for the |\Hdiv| command.
%    \begin{macrocode}
%%
\newif\if@DivAsExp
\DeclareOption{DivAsExponent}{\@DivAsExptrue}
\DeclareOption{DivInBrackets}{\@DivAsExpfalse}
%%
\ExecuteOptions{DivInBrackets}
%    \end{macrocode}
%
%    The ``|\ProcessOptions*|'' command was used here instead of
%    ``|\ProcessOptions*|'' in order to process the options in the
%    ``|\usepackage|'' order, rather than in the declaration order
%    \begin{macrocode}
%%
\ProcessOptions*
%    \end{macrocode}
%
% \begin{macro}{\DefaultSet}
%	The command |\DefaultSet| makes |\@DefaultSet| to print the
%	given argument enclosed in brackets.
%	It also let |\@DefaultSet@Div| to be the same, but with the
%	word ``div'' inside the brackets, before the argument.
%    \begin{macrocode}
%%
\newcommand{\DefaultSet}[1]{\def\@DefaultSet{(#1)}%
			    \def\@DefaultSet@Div{(\mathrm{div};#1)}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\NoDefaultSet}
%	The command |\NoDefaultSet| deletes the content of the two macros
%	|\@DefaultSet| and |\@DefaultSet@Div|, so that the first prints
%	nothing, whilst the second only prints ``(div)''.
%    \begin{macrocode}
\newcommand{\NoDefaultSet}{\let\@DefaultSet=\relax%
			   \def\@DefaultSet@Div{(\mathrm{div})}}
%    \end{macrocode}
%
%	\noindent
%	Set the default value for |\DefualtSet| to be $\Omega$.
%    \begin{macrocode}
%%
\DefaultSet{\Omega}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\DoNothing@zero}
%	This command does nothing, but strips the character ``0'' (which
%	\emph{must} immediately follow it, otherwise an error occour)
%	from the input, since it is defined with a ``0'' attached to its
%	name.
%    \begin{macrocode}
%%
\def\DoNothing@zero0{\relax}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\H}
%	The commands ``|\@HSobolev|< and``|\HSobolev@quadra|'' prints
%	an ``H'' in math-mode (via the |\ensuremath| command) with the
%	argument as a superscript, and, respectively, without subscripts
%	and wiht the second argument as a subscript.
%	Then they call |\@DefaultSet| in order to print the name of a set
%	inside brackets, or nothing depending on which of the commands
%	|\DefaultSet| and |\NoDefaultSet| has previously been invoked.
%    \begin{macrocode}
%%
\newcommand{\@HSobolev}[1]{\ensuremath{H^{#1}\@DefaultSet}}
\def\HSobolev@quadra#1[#2]{\ensuremath{H^{#1}_{#2}\@DefaultSet}}
%    \end{macrocode}
%	The original command ``|\H|'' (used to make a type of accent) is
%	saved in |\HAccent|; then |\H| is redefined so that it calls one
%	of the previous two commands, depending on which character
%	follows the command name.
%	If this character is a ``0'', then it also invokes the command
%	|\DoNothing@zero|, in order to strip that zero from the input.
%	All this is deferred at the ``|\begin{document}|'' in order to
%	avoid conflicts with other packages.
%    \begin{macrocode}
\AtBeginDocument{%
\let\HAccent=\H
\renewcommand{\H}[1]{%
\@ifnextchar0{\HSobolev@quadra{#1}[0]\DoNothing@zero}{%
\@ifnextchar[{\HSobolev@quadra{#1}}{\@HSobolev{#1}}}%
}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Hdiv}
%	The command |\@Hdiv@quadra| is used if the command |\Hdiv| is
%	followed by a square bracket: it simply types ``H'' (in math mode)
%	with a subscript.
%	It also prints ``div'' (in roman) as an exponent and calls
%	|\@DefaultSet| (with the ``DivAsExponent'' option) or calls
%	|\@DefaultSet@Div| (with the ``DivInBraces'' option).
%    \begin{macrocode}
%%
\def\@Hdiv@quadra[#1]{%
\if@DivAsExp \ensuremath{H^{\mathrm{div}}_{#1}\@DefaultSet}%
\else \ensuremath{H_{#1}\@DefaultSet@Div}\fi%
}
%    \end{macrocode}
%	The ``|\Hdiv|< command is defined so that it calls the previous command,
%	or typesets the output itself, similarly to the |\H| command above.
%    \begin{macrocode}
\newcommand{\Hdiv}{%
\@ifnextchar0{\@Hdiv@quadra[0]\DoNothing@zero}{\@ifnextchar[{\@Hdiv@quadra}{%
\if@DivAsExp \ensuremath{H^{\mathrm{div}}\@DefaultSet}%
\else \ensuremath{H\@DefaultSet@Div}\fi}}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\L}
%	First the old command |\L| (which prints an ``L'' whith a bar
%	superimposed) is saved in |\Lbar|.
%	Then |\L| is redefined to print an ``L'' in math-mode with its
%	argument as a superscript, followed by the output of |\@DefaultSet|.
%	All this is deferred at the ``|\begin{document}|'' in order to
%	avoid conflicts with other packages.
%    \begin{macrocode}
%%
\AtBeginDocument{%
\let\Lbar=\L
\renewcommand{\L}[1]{\ensuremath{L^{#1}\@DefaultSet}}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\W}
%	The command |\W| is defined to print a ``W'' in math-mode with its
%	two arguments as a superscript (separated by a comma) and followed
%	by the output of |\@DefaultSet|.
%	It is deferred at the ``|\begin{document}|'' in order to
%	avoid conflicts with other packages.
%    \begin{macrocode}
%%
\AtBeginDocument{%
\newcommand\W[2]{\ensuremath{W^{#1,#2}\@DefaultSet}}
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\D}
%	The command |\D| is defined to print a calligraphic ``D'' in
%	math-mode, followed by the output of |\@DefaultSet|.
%	In order to allow for the proper treatment of the \emph{prime}
%	symbol which can follow the command, the command |\InsiemeD@Primo|
%	is defined: it is authomatically invoked by the command |\D| when
%	followed by a prime. It differs only in that a prime is output
%	\emph{before} invoking |\@DefaultSet|.
%	This is deferred at the ``|\begin{document}|'' in order to
%	avoid conflicts with other packages.
%    \begin{macrocode}
%%
\def\InsiemeD@Primo'{\ensuremath{\mathcal{D}'\@DefaultSet}}
\AtBeginDocument{%
\newcommand{\D}{\@ifnextchar'{\InsiemeD@Primo}{%
\ensuremath{\mathcal{D}\@DefaultSet}}%
}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Norm}
%	The command |\Norm| prints its argument surrounded by a
%	double-pipe delimiter of adjustable size.
%	If an optional argument is present, it is used as a whole subscript.
%    \begin{macrocode}
%%
\def\@Norma@Exp#1#2^#3{\ensuremath{\left\|#1\right\|_{#2}^{#3}}}
\def\@Norma#1[#2]{%
\@ifnextchar^{\@Norma@Exp{#1}{#2}}{\ensuremath{\left\|#1\right\|_{#2}}}%
}
\newcommand{\Norm}[1]{%
\@ifnextchar[{\@Norma{#1}}{\ensuremath{\left\|#1\right\|}}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\SemiNorm}
%	The command |\SemiNorm| prints its argument surrounded by a
%	single-pipe delimiter of adjustable size.
%	If an optional argument is present, it is used as a whole subscript.
%    \begin{macrocode}
%%
\def\@SemiNorma@Exp#1#2^#3{\ensuremath{\left|#1\right|_{#2}^{#3}}}
\def\@SemiNorma#1[#2]{%
\@ifnextchar^{\@SemiNorma@Exp{#1}{#2}}{\ensuremath{\left|#1\right|_{#2}}}%
}
\newcommand{\SemiNorm}[1]{%
\@ifnextchar[{\@SemiNorma{#1}}{\ensuremath{\left|#1\right|}}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Scalar}
%	The command |\Scalar| requires two arguments; a third optional
%	argument (which is used as a whole subscript) may follow inside
%	square brackets.
%	The output consists of the two arguments separated by a comma and
%	enclosed in a pair of adjustable-size brackets, with the optional
%	argument placed as a subscript.
%    \begin{macrocode}
%%
\def\@ProdottoScalare#1#2[#3]{\ensuremath{\left(#1,#2\right)_{#3}}}
\newcommand\Scalar[2]{%
\@ifnextchar[{\@ProdottoScalare{#1}{#2}}{\ensuremath{\left(#1,#2\right)}}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Crochet}
%	The command |\Crochet| requires two arguments; a third optional
%	argument (which is used as a whole subscript) may follow inside
%	square brackets.
%	The output consists of the two arguments separated by a comma and
%	enclosed in a pair of adjustable-size angular-parenthesys, with
%	the optional argument placed as a subscript.
%    \begin{macrocode}
%%
\def\Inner@Crochet#1#2[#3]{\ensuremath{\left\langle#1,#2\right\rangle_{#3}}}
\newcommand\Crochet[2]{%
\@ifnextchar[{\Inner@Crochet{#1}{#2}}{%
\ensuremath{\left\langle#1,#2\right\rangle}}%
}
%    \end{macrocode}
% \end{macro}
%
%
% \CheckSum{179}
% \Finale
%
\endinput