| 1 |
%\iffalse % MetaComment |
| 2 |
%% |
| 3 |
%% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + |
| 4 |
%% | Copyright(C) 1997-2010 by F. Bosisio | |
| 5 |
%% | | |
| 6 |
%% | This program can be redistributed and/or modified under | |
| 7 |
%% | the terms of the LaTeX Project Public License, either | |
| 8 |
%% | version 1.3 of this license or (at your option) any later | |
| 9 |
%% | version. The latest version of this license is in | |
| 10 |
%% | http://www.latex-project.org/lppl.txt | |
| 11 |
%% | and version 1.3 or later is part of all LaTeX distributions | |
| 12 |
%% | version 2005/12/01 or later. | |
| 13 |
%% | | |
| 14 |
%% | This work has the LPPL maintenance status `maintained'. | |
| 15 |
%% | The Current Maintainer of this work is F. Bosisio. | |
| 16 |
%% | | |
| 17 |
%% | This work consists of files sobolev.dtx and sobolev.html | |
| 18 |
%% | and of the derived files sobolev.sty and sobolev.pdf. | |
| 19 |
%% | | |
| 20 |
%% | E-mail: [email protected] | |
| 21 |
%% | CTAN location: macros/latex/contrib/bosisio/ | |
| 22 |
%% + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + |
| 23 |
%% |
| 24 |
%% If you make any improvment, find any bug or have |
| 25 |
%% any suggestion, please let me know about it. |
| 26 |
%% |
| 27 |
%<*package,driver> |
| 28 |
%\fi |
| 29 |
% |
| 30 |
\def\FileName{sobolev} |
| 31 |
%\iffalse % MetaComment |
| 32 |
%</package,driver> |
| 33 |
%<*package> |
| 34 |
%\fi |
| 35 |
\def\fileversion{2.2} |
| 36 |
\def\filedate{1997/11/14} |
| 37 |
\def\docdate{2005/04/09} |
| 38 |
\def\filedescr{Commands to print the Sobolev spaces (FB)} |
| 39 |
% |
| 40 |
%\iffalse % MetaComment |
| 41 |
%</package> |
| 42 |
%<*dtx> |
| 43 |
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 44 |
% This section is the installation driver |
| 45 |
% |
| 46 |
\def\batchfile{\FileName.dtx} |
| 47 |
% |
| 48 |
\input docstrip |
| 49 |
% |
| 50 |
\keepsilent |
| 51 |
% \askforoverwritefalse |
| 52 |
% |
| 53 |
\generateFile{\FileName.sty}{f}{\from{\FileName.dtx}{package}} |
| 54 |
% |
| 55 |
\generateFile{\FileName.drv}{f}{\from{\FileName.dtx}{driver}} |
| 56 |
% |
| 57 |
\Msg{******************************************************} |
| 58 |
\Msg{*} |
| 59 |
\Msg{* To produce the documentation run the} |
| 60 |
\Msg{* file `\FileName.drv' through LaTeX.} |
| 61 |
\Msg{*} |
| 62 |
\Msg{******************************************************} |
| 63 |
% |
| 64 |
\endbatchfile |
| 65 |
% |
| 66 |
% End of the installation driver |
| 67 |
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 68 |
%</dtx> |
| 69 |
% |
| 70 |
% This section is the documentation driver |
| 71 |
% |
| 72 |
%<+driver>\documentclass[12pt,a4paper]{ltxdoc} |
| 73 |
%<+driver> \EnableCrossrefs |
| 74 |
%<+driver> \CodelineIndex |
| 75 |
%<+driver> \RecordChanges |
| 76 |
%<+driver> %\OnlyDescription % Uncomment not to see the implementation |
| 77 |
%<+driver>\begin{document} |
| 78 |
%<+driver> \DocInput{\FileName.dtx} |
| 79 |
%<+driver> \PrintIndex |
| 80 |
%<+driver> \PrintChanges |
| 81 |
%<+driver>\end{document} |
| 82 |
% |
| 83 |
% End of the documentation driver |
| 84 |
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 85 |
%<*package> |
| 86 |
%\fi |
| 87 |
% |
| 88 |
% \changes{v0.1}{28 March 1997}{First release (basic commands)} |
| 89 |
% \changes{v0.2}{3 April 1997}{Added package options} |
| 90 |
% \changes{v0.3}{7 July 1997}{Fixed a bug in the command ``Scalar''} |
| 91 |
% \changes{v0.4}{4 August 1997}{Fixed a bug in the options} |
| 92 |
% \changes{v1.0}{5 August 1997}{Documentation added} |
| 93 |
% \changes{v1.1}{4 November 1997}{Fixed a bug in the ``Hdiv'' command} |
| 94 |
% \changes{v1.2}{5 November 1997}{Superscripts for ``Norm'' and ``SemiNorm''} |
| 95 |
% \changes{v2.0}{14 November 1997}{Changed ``Scalar'' sintax; added ``Crochet''} |
| 96 |
% \changes{v2.1}{5 March 1999}{Added copyright notice and changed addresses} |
| 97 |
% \changes{v2.2}{9 April 2005}{Usage of the double-quote character (") avoided} |
| 98 |
% |
| 99 |
% \MakeShortVerb{\|} |
| 100 |
% |
| 101 |
% \title{Package \texttt{\FileName}\thanks{This is version \fileversion, |
| 102 |
% last revised \filedate; documentation date \docdate}} |
| 103 |
% \author{F. Bosisio\\\normalsize E-mail: \texttt{[email protected]}} |
| 104 |
% \date{\filedate} |
| 105 |
% \maketitle |
| 106 |
% |
| 107 |
% \begin{abstract} |
| 108 |
% Documentation for the package \texttt{\FileName}. |
| 109 |
% \end{abstract} |
| 110 |
% |
| 111 |
% \section{Introduction} |
| 112 |
% This package provides some commands which are useful when dealing |
| 113 |
% with Sobolev spaces and their relatives. |
| 114 |
% |
| 115 |
% In particular some commands are redefined, so care should be |
| 116 |
% taken, expecially when including this package in an already |
| 117 |
% existent \LaTeX{} file. |
| 118 |
% |
| 119 |
% \noindent |
| 120 |
% The redefined commands are |\H| and |\L|. |
| 121 |
% The effect of ``|\H|'' (which is a type of accent) can now be |
| 122 |
% achieved by the command ``|\HAccent|'', whilst the job of ``|\L|'' |
| 123 |
% (i.e. print an ``L'' with a superimposed bar) is now done by the |
| 124 |
% command ``|\Lbar|''. |
| 125 |
% |
| 126 |
% \section{The options} |
| 127 |
% Two options are available at the moment: \texttt{DivInBrackets} |
| 128 |
% and \texttt{DivAsExponent}. |
| 129 |
% They only affect the output of the ``|\Hdiv|'' command. |
| 130 |
% |
| 131 |
% \noindent |
| 132 |
% The firt options (\texttt{DivInBrackets}, which is the default) |
| 133 |
% makes |\Hdiv| behave like ``|H(div;|\dots|)|'', while the second |
| 134 |
% one (\texttt{DivAsExponent}) makes |\Hdiv| expand to |
| 135 |
% ``|H^{div}(|\dots|)|''. |
| 136 |
% |
| 137 |
% \section{The commands} |
| 138 |
% Most of the subsequent space-generating commands have mandatory |
| 139 |
% arguments to indicate the type of the space. |
| 140 |
% Often this argument consists of a single digit: in this case it |
| 141 |
% is \emph{not} necessary to enclose it in brackets, since in \LaTeX{} |
| 142 |
% the names of commands consists of letters only, and so a digit |
| 143 |
% following it is certainly an argument. |
| 144 |
% This saves a lot of typing and is the only reason that makes these |
| 145 |
% commans useful (if you always had to type the brackets, then it |
| 146 |
% would have been simpler to type the expansion of the command than |
| 147 |
% the command itself !). |
| 148 |
% In other words, you can think as if several commands exist (like |
| 149 |
% |\H|, |\H1|, |\H10|, etc.), the ones with the digit beeing a sort of |
| 150 |
% abbreviation for the general one. |
| 151 |
% |
| 152 |
% \subsection{The \texttt{H} command} |
| 153 |
% The |\H| command is used to generate the symbol of sobolev |
| 154 |
% spaces. |
| 155 |
% It takes a mandatory argument, which is used as a |
| 156 |
% superscript, and an optional argument, which is used as a |
| 157 |
% subscript. |
| 158 |
% |
| 159 |
% \noindent |
| 160 |
% As explained above, if the mandatory argument is a digit, |
| 161 |
% it need not be enclosed in brackets. |
| 162 |
% Moreover, if the optional argument is the digit ``0'', it |
| 163 |
% can be typed without the square brackets. |
| 164 |
% |
| 165 |
% \noindent |
| 166 |
% Here are some examples (whith the |\DefaultSet| set to its |
| 167 |
% default value |\Omega|): |
| 168 |
% |
| 169 |
% \begin{tabular}{lll} |
| 170 |
% |\H2| & $\Longrightarrow$ & $H^2(\Omega)$ \\ |
| 171 |
% |\H10| & $\Longrightarrow$ & $H^1_0(\Omega)$ \\ |
| 172 |
% |\H1[\Gamma_D]| & $\Longrightarrow$ & $H^1_{\Gamma_D}(\Omega)$ \\ |
| 173 |
% |\H{-1/2}| & $\Longrightarrow$ & $H^{-1/2}(\Omega)$ |
| 174 |
% \end{tabular} |
| 175 |
% |
| 176 |
% \subsection{The \texttt{Hdiv} command} |
| 177 |
% The |\Hdiv| command is used to generate the sobolev space |
| 178 |
% called ``H div''. |
| 179 |
% It takes only an optional argument, which is used as a |
| 180 |
% subscript and which need not to be surrounded by the square |
| 181 |
% brackets if it is the digit ``0''. |
| 182 |
% |
| 183 |
% \noindent |
| 184 |
% If the (default) option \texttt{DivInBrackets} is in effect, |
| 185 |
% it differs from the command |\H| in that the word ``div'' is |
| 186 |
% printed (in roman type) inside brackets, before the set. |
| 187 |
% If, instead, the option \texttt{DivAsExponent} is active, |
| 188 |
% then it is simply an abbreviation for |\H{\mathrm{div}}|. |
| 189 |
% |
| 190 |
% \noindent |
| 191 |
% Here are some examples:\\ |
| 192 |
% \hfill \begin{tabular}{llcc} |
| 193 |
% & & |DivInBrackets| & |DivAsExponent| \\ |
| 194 |
% |\Hdiv| & $\Longrightarrow$ & $H(\mathrm{div};\Omega)$ & $H^{\mathrm{div}}(\Omega)$ \\ |
| 195 |
% |\Hdiv0| & $\Longrightarrow$ & $H_0(\mathrm{div};\Omega)$ & $H^{\mathrm{div}}_0(\Omega)$ \\ |
| 196 |
% |\Hdiv[\Gamma_D]| & $\Longrightarrow$ & $H_{\Gamma_D}(\mathrm{div};\Omega)$ & $H^{\mathrm{div}}_{\Gamma_D}(\Omega)$ |
| 197 |
% \end{tabular} \hfill |
| 198 |
% |
| 199 |
% \subsection{The \texttt{L} command} |
| 200 |
% The |\L| command is used to generate the symbol of |
| 201 |
% Lebesgue-measurable functions. |
| 202 |
% It has one argument which is the exponent of the L-space. |
| 203 |
% Again, if this argument is a digit (or a single symbol, |
| 204 |
% like ``|\infty|'') the surrounding braces are optional. |
| 205 |
% Like for the |\H| command, the output of |\DefaultSet| is |
| 206 |
% appended. |
| 207 |
% |
| 208 |
% \noindent |
| 209 |
% Here are some examples: \hspace{2cm} |
| 210 |
% \begin{tabular}{lll} |
| 211 |
% |\L2| & $\Longrightarrow$ & $L^2(\Omega)$ \\ |
| 212 |
% |\L{10}| & $\Longrightarrow$ & $L^{10}(\Omega)$ \\ |
| 213 |
% |\L\infty| & $\Longrightarrow$ & $L^\infty(\Omega)$ |
| 214 |
% \end{tabular} |
| 215 |
% |
| 216 |
% \subsection{The \texttt{W} command} |
| 217 |
% The |\W| command is completly analogous, except that it |
| 218 |
% prints a ``W'' insted af an ``L'' and that it has two |
| 219 |
% argument, both printed as a supercript, separated by a comma. |
| 220 |
% It is used for the generalized Sobolev spaces. |
| 221 |
% |
| 222 |
% \noindent |
| 223 |
% Here is an example of how it is used: \hspace{1cm} |
| 224 |
% \begin{tabular}{lll} |
| 225 |
% |\W{k}{p}| & $\Longrightarrow$ & $W^{k,p}(\Omega)$ \\ |
| 226 |
% |\W1\infty| & $\Longrightarrow$ & $W^{1,\infty}(\Omega)$ |
| 227 |
% \end{tabular} |
| 228 |
% |
| 229 |
% \subsection{The \texttt{D} command} |
| 230 |
% The |\D| command is used in the theory of distributions: |
| 231 |
% it prints the space of distributions over the |\DefaultSet| |
| 232 |
% if followed by a prime symbol, or its dual space, otherwise. |
| 233 |
% \hfill \begin{tabular}{lll} |
| 234 |
% |\D| & $\Longrightarrow$ & $\mathcal{D}(\Omega)$ \\ |
| 235 |
% |\D'| & $\Longrightarrow$ & $\mathcal{D}'(\Omega)$ |
| 236 |
% \end{tabular} \hfill |
| 237 |
% |
| 238 |
% \subsection{The \texttt{Norm} command} |
| 239 |
% The |\Norm| command has a mandatory and an optional argument; |
| 240 |
% it generates the norm of the mandatory argument, with the |
| 241 |
% optional argument, if present, as a whole subscript, to |
| 242 |
% denote the space within which the norm is taken. |
| 243 |
% |
| 244 |
% \noindent |
| 245 |
% Some examples: \hspace{3cm} |
| 246 |
% \begin{tabular}{lll} |
| 247 |
% |\Norm{f(x)}| & $\Longrightarrow$ & $\left\|f(x)\right\|$ \\ |
| 248 |
% |\Norm{g}[L^2]| & $\Longrightarrow$ & $\left\|g\right\|_{L^2}$ |
| 249 |
% \end{tabular} |
| 250 |
% |
| 251 |
% \subsection{The \texttt{SemiNorm} command} |
| 252 |
% The |\SemiNorm| command is completly analoguos, but |
| 253 |
% generates the semi-norm instead of the norm. |
| 254 |
% |
| 255 |
% \noindent |
| 256 |
% Some examples: \hspace{2cm} |
| 257 |
% \DeleteShortVerb{\|} |
| 258 |
% \MakeShortVerb{\!} |
| 259 |
% \begin{tabular}{lll} |
| 260 |
% !\SemiNorm{f(x)}! & $\Longrightarrow$ & $\left|f(x)\right|$ \\ |
| 261 |
% !\SemiNorm{g}[H^1]! & $\Longrightarrow$ & $\left|g\right|_{H^1}$ |
| 262 |
% \end{tabular} |
| 263 |
% \DeleteShortVerb{\!} |
| 264 |
% \MakeShortVerb{\|} |
| 265 |
% |
| 266 |
% \subsection{The \texttt{Scalar} command} |
| 267 |
% The |\Scalar| command has two arguments; a third optional |
| 268 |
% argument (which is used as a whole subscript) may follow |
| 269 |
% inside square brackets. |
| 270 |
% The output consists of the two arguments separated by a |
| 271 |
% comma and enclosed in a pair of adjustable-size brackets, |
| 272 |
% with the optional argument placed as a subscript (to denote |
| 273 |
% the space inside which the scalr product is taken). |
| 274 |
% |
| 275 |
% \noindent |
| 276 |
% Some examples: |
| 277 |
% \begin{tabular}{lll} |
| 278 |
% |\Scalar{f}{g}| &$\Longrightarrow$& $\left(f,g\right)$ \\ |
| 279 |
% |\Scalar{u}{v}[L^2]| &$\Longrightarrow$& $\left(u,v\right)_{L^2}$\\ |
| 280 |
% \end{tabular} |
| 281 |
% |
| 282 |
% \subsection{The \texttt{Crochet} command} |
| 283 |
% The |\Crochet| command has two arguments; a third optional |
| 284 |
% argument (which is used as a whole subscript) may follow |
| 285 |
% inside square brackets. |
| 286 |
% The output consists of the two arguments separated by a |
| 287 |
% comma and enclosed in a pair of adjustable-size |
| 288 |
% angular-parenthesys, with the optional argument placed as |
| 289 |
% a subscript (to denote the space inside which the duality |
| 290 |
% is taken). |
| 291 |
% |
| 292 |
% \noindent |
| 293 |
% Some examples: |
| 294 |
% \begin{tabular}{lll} |
| 295 |
% |\Crochet{f}{g}| &$\Longrightarrow$& $\left\langle f,g\right\rangle$ \\ |
| 296 |
% |\Crochet{u}{v}[D]| &$\Longrightarrow$& $\left\langle u,v\right\rangle_D$\\ |
| 297 |
% \end{tabular} |
| 298 |
% |
| 299 |
% \StopEventually{} |
| 300 |
% \newpage |
| 301 |
% \section{Implementation} |
| 302 |
% |
| 303 |
% \begin{macrocode} |
| 304 |
%% |
| 305 |
\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 306 |
\ProvidesPackage{\FileName}[\filedate\space v\fileversion\space\filedescr] |
| 307 |
% \end{macrocode} |
| 308 |
% |
| 309 |
% The options set the flag for the |\Hdiv| command. |
| 310 |
% \begin{macrocode} |
| 311 |
%% |
| 312 |
\newif\if@DivAsExp |
| 313 |
\DeclareOption{DivAsExponent}{\@DivAsExptrue} |
| 314 |
\DeclareOption{DivInBrackets}{\@DivAsExpfalse} |
| 315 |
%% |
| 316 |
\ExecuteOptions{DivInBrackets} |
| 317 |
% \end{macrocode} |
| 318 |
% |
| 319 |
% The ``|\ProcessOptions*|'' command was used here instead of |
| 320 |
% ``|\ProcessOptions*|'' in order to process the options in the |
| 321 |
% ``|\usepackage|'' order, rather than in the declaration order |
| 322 |
% \begin{macrocode} |
| 323 |
%% |
| 324 |
\ProcessOptions* |
| 325 |
% \end{macrocode} |
| 326 |
% |
| 327 |
% \begin{macro}{\DefaultSet} |
| 328 |
% The command |\DefaultSet| makes |\@DefaultSet| to print the |
| 329 |
% given argument enclosed in brackets. |
| 330 |
% It also let |\@DefaultSet@Div| to be the same, but with the |
| 331 |
% word ``div'' inside the brackets, before the argument. |
| 332 |
% \begin{macrocode} |
| 333 |
%% |
| 334 |
\newcommand{\DefaultSet}[1]{\def\@DefaultSet{(#1)}% |
| 335 |
\def\@DefaultSet@Div{(\mathrm{div};#1)}} |
| 336 |
% \end{macrocode} |
| 337 |
% \end{macro} |
| 338 |
% |
| 339 |
% \begin{macro}{\NoDefaultSet} |
| 340 |
% The command |\NoDefaultSet| deletes the content of the two macros |
| 341 |
% |\@DefaultSet| and |\@DefaultSet@Div|, so that the first prints |
| 342 |
% nothing, whilst the second only prints ``(div)''. |
| 343 |
% \begin{macrocode} |
| 344 |
\newcommand{\NoDefaultSet}{\let\@DefaultSet=\relax% |
| 345 |
\def\@DefaultSet@Div{(\mathrm{div})}} |
| 346 |
% \end{macrocode} |
| 347 |
% |
| 348 |
% \noindent |
| 349 |
% Set the default value for |\DefualtSet| to be $\Omega$. |
| 350 |
% \begin{macrocode} |
| 351 |
%% |
| 352 |
\DefaultSet{\Omega} |
| 353 |
% \end{macrocode} |
| 354 |
% \end{macro} |
| 355 |
% |
| 356 |
% \begin{macro}{\DoNothing@zero} |
| 357 |
% This command does nothing, but strips the character ``0'' (which |
| 358 |
% \emph{must} immediately follow it, otherwise an error occour) |
| 359 |
% from the input, since it is defined with a ``0'' attached to its |
| 360 |
% name. |
| 361 |
% \begin{macrocode} |
| 362 |
%% |
| 363 |
\def\DoNothing@zero0{\relax} |
| 364 |
% \end{macrocode} |
| 365 |
% \end{macro} |
| 366 |
% |
| 367 |
% \begin{macro}{\H} |
| 368 |
% The commands ``|\@HSobolev|< and``|\HSobolev@quadra|'' prints |
| 369 |
% an ``H'' in math-mode (via the |\ensuremath| command) with the |
| 370 |
% argument as a superscript, and, respectively, without subscripts |
| 371 |
% and wiht the second argument as a subscript. |
| 372 |
% Then they call |\@DefaultSet| in order to print the name of a set |
| 373 |
% inside brackets, or nothing depending on which of the commands |
| 374 |
% |\DefaultSet| and |\NoDefaultSet| has previously been invoked. |
| 375 |
% \begin{macrocode} |
| 376 |
%% |
| 377 |
\newcommand{\@HSobolev}[1]{\ensuremath{H^{#1}\@DefaultSet}} |
| 378 |
\def\HSobolev@quadra#1[#2]{\ensuremath{H^{#1}_{#2}\@DefaultSet}} |
| 379 |
% \end{macrocode} |
| 380 |
% The original command ``|\H|'' (used to make a type of accent) is |
| 381 |
% saved in |\HAccent|; then |\H| is redefined so that it calls one |
| 382 |
% of the previous two commands, depending on which character |
| 383 |
% follows the command name. |
| 384 |
% If this character is a ``0'', then it also invokes the command |
| 385 |
% |\DoNothing@zero|, in order to strip that zero from the input. |
| 386 |
% All this is deferred at the ``|\begin{document}|'' in order to |
| 387 |
% avoid conflicts with other packages. |
| 388 |
% \begin{macrocode} |
| 389 |
\AtBeginDocument{% |
| 390 |
\let\HAccent=\H |
| 391 |
\renewcommand{\H}[1]{% |
| 392 |
\@ifnextchar0{\HSobolev@quadra{#1}[0]\DoNothing@zero}{% |
| 393 |
\@ifnextchar[{\HSobolev@quadra{#1}}{\@HSobolev{#1}}}% |
| 394 |
}} |
| 395 |
% \end{macrocode} |
| 396 |
% \end{macro} |
| 397 |
% |
| 398 |
% \begin{macro}{\Hdiv} |
| 399 |
% The command |\@Hdiv@quadra| is used if the command |\Hdiv| is |
| 400 |
% followed by a square bracket: it simply types ``H'' (in math mode) |
| 401 |
% with a subscript. |
| 402 |
% It also prints ``div'' (in roman) as an exponent and calls |
| 403 |
% |\@DefaultSet| (with the ``DivAsExponent'' option) or calls |
| 404 |
% |\@DefaultSet@Div| (with the ``DivInBraces'' option). |
| 405 |
% \begin{macrocode} |
| 406 |
%% |
| 407 |
\def\@Hdiv@quadra[#1]{% |
| 408 |
\if@DivAsExp \ensuremath{H^{\mathrm{div}}_{#1}\@DefaultSet}% |
| 409 |
\else \ensuremath{H_{#1}\@DefaultSet@Div}\fi% |
| 410 |
} |
| 411 |
% \end{macrocode} |
| 412 |
% The ``|\Hdiv|< command is defined so that it calls the previous command, |
| 413 |
% or typesets the output itself, similarly to the |\H| command above. |
| 414 |
% \begin{macrocode} |
| 415 |
\newcommand{\Hdiv}{% |
| 416 |
\@ifnextchar0{\@Hdiv@quadra[0]\DoNothing@zero}{\@ifnextchar[{\@Hdiv@quadra}{% |
| 417 |
\if@DivAsExp \ensuremath{H^{\mathrm{div}}\@DefaultSet}% |
| 418 |
\else \ensuremath{H\@DefaultSet@Div}\fi}}% |
| 419 |
} |
| 420 |
% \end{macrocode} |
| 421 |
% \end{macro} |
| 422 |
% |
| 423 |
% \begin{macro}{\L} |
| 424 |
% First the old command |\L| (which prints an ``L'' whith a bar |
| 425 |
% superimposed) is saved in |\Lbar|. |
| 426 |
% Then |\L| is redefined to print an ``L'' in math-mode with its |
| 427 |
% argument as a superscript, followed by the output of |\@DefaultSet|. |
| 428 |
% All this is deferred at the ``|\begin{document}|'' in order to |
| 429 |
% avoid conflicts with other packages. |
| 430 |
% \begin{macrocode} |
| 431 |
%% |
| 432 |
\AtBeginDocument{% |
| 433 |
\let\Lbar=\L |
| 434 |
\renewcommand{\L}[1]{\ensuremath{L^{#1}\@DefaultSet}}% |
| 435 |
} |
| 436 |
% \end{macrocode} |
| 437 |
% \end{macro} |
| 438 |
% |
| 439 |
% \begin{macro}{\W} |
| 440 |
% The command |\W| is defined to print a ``W'' in math-mode with its |
| 441 |
% two arguments as a superscript (separated by a comma) and followed |
| 442 |
% by the output of |\@DefaultSet|. |
| 443 |
% It is deferred at the ``|\begin{document}|'' in order to |
| 444 |
% avoid conflicts with other packages. |
| 445 |
% \begin{macrocode} |
| 446 |
%% |
| 447 |
\AtBeginDocument{% |
| 448 |
\newcommand\W[2]{\ensuremath{W^{#1,#2}\@DefaultSet}} |
| 449 |
} |
| 450 |
% \end{macrocode} |
| 451 |
% \end{macro} |
| 452 |
% |
| 453 |
% \begin{macro}{\D} |
| 454 |
% The command |\D| is defined to print a calligraphic ``D'' in |
| 455 |
% math-mode, followed by the output of |\@DefaultSet|. |
| 456 |
% In order to allow for the proper treatment of the \emph{prime} |
| 457 |
% symbol which can follow the command, the command |\InsiemeD@Primo| |
| 458 |
% is defined: it is authomatically invoked by the command |\D| when |
| 459 |
% followed by a prime. It differs only in that a prime is output |
| 460 |
% \emph{before} invoking |\@DefaultSet|. |
| 461 |
% This is deferred at the ``|\begin{document}|'' in order to |
| 462 |
% avoid conflicts with other packages. |
| 463 |
% \begin{macrocode} |
| 464 |
%% |
| 465 |
\def\InsiemeD@Primo'{\ensuremath{\mathcal{D}'\@DefaultSet}} |
| 466 |
\AtBeginDocument{% |
| 467 |
\newcommand{\D}{\@ifnextchar'{\InsiemeD@Primo}{% |
| 468 |
\ensuremath{\mathcal{D}\@DefaultSet}}% |
| 469 |
}} |
| 470 |
% \end{macrocode} |
| 471 |
% \end{macro} |
| 472 |
% |
| 473 |
% \begin{macro}{\Norm} |
| 474 |
% The command |\Norm| prints its argument surrounded by a |
| 475 |
% double-pipe delimiter of adjustable size. |
| 476 |
% If an optional argument is present, it is used as a whole subscript. |
| 477 |
% \begin{macrocode} |
| 478 |
%% |
| 479 |
\def\@Norma@Exp#1#2^#3{\ensuremath{\left\|#1\right\|_{#2}^{#3}}} |
| 480 |
\def\@Norma#1[#2]{% |
| 481 |
\@ifnextchar^{\@Norma@Exp{#1}{#2}}{\ensuremath{\left\|#1\right\|_{#2}}}% |
| 482 |
} |
| 483 |
\newcommand{\Norm}[1]{% |
| 484 |
\@ifnextchar[{\@Norma{#1}}{\ensuremath{\left\|#1\right\|}}% |
| 485 |
} |
| 486 |
% \end{macrocode} |
| 487 |
% \end{macro} |
| 488 |
% |
| 489 |
% \begin{macro}{\SemiNorm} |
| 490 |
% The command |\SemiNorm| prints its argument surrounded by a |
| 491 |
% single-pipe delimiter of adjustable size. |
| 492 |
% If an optional argument is present, it is used as a whole subscript. |
| 493 |
% \begin{macrocode} |
| 494 |
%% |
| 495 |
\def\@SemiNorma@Exp#1#2^#3{\ensuremath{\left|#1\right|_{#2}^{#3}}} |
| 496 |
\def\@SemiNorma#1[#2]{% |
| 497 |
\@ifnextchar^{\@SemiNorma@Exp{#1}{#2}}{\ensuremath{\left|#1\right|_{#2}}}% |
| 498 |
} |
| 499 |
\newcommand{\SemiNorm}[1]{% |
| 500 |
\@ifnextchar[{\@SemiNorma{#1}}{\ensuremath{\left|#1\right|}}% |
| 501 |
} |
| 502 |
% \end{macrocode} |
| 503 |
% \end{macro} |
| 504 |
% |
| 505 |
% \begin{macro}{\Scalar} |
| 506 |
% The command |\Scalar| requires two arguments; a third optional |
| 507 |
% argument (which is used as a whole subscript) may follow inside |
| 508 |
% square brackets. |
| 509 |
% The output consists of the two arguments separated by a comma and |
| 510 |
% enclosed in a pair of adjustable-size brackets, with the optional |
| 511 |
% argument placed as a subscript. |
| 512 |
% \begin{macrocode} |
| 513 |
%% |
| 514 |
\def\@ProdottoScalare#1#2[#3]{\ensuremath{\left(#1,#2\right)_{#3}}} |
| 515 |
\newcommand\Scalar[2]{% |
| 516 |
\@ifnextchar[{\@ProdottoScalare{#1}{#2}}{\ensuremath{\left(#1,#2\right)}}% |
| 517 |
} |
| 518 |
% \end{macrocode} |
| 519 |
% \end{macro} |
| 520 |
% |
| 521 |
% \begin{macro}{\Crochet} |
| 522 |
% The command |\Crochet| requires two arguments; a third optional |
| 523 |
% argument (which is used as a whole subscript) may follow inside |
| 524 |
% square brackets. |
| 525 |
% The output consists of the two arguments separated by a comma and |
| 526 |
% enclosed in a pair of adjustable-size angular-parenthesys, with |
| 527 |
% the optional argument placed as a subscript. |
| 528 |
% \begin{macrocode} |
| 529 |
%% |
| 530 |
\def\Inner@Crochet#1#2[#3]{\ensuremath{\left\langle#1,#2\right\rangle_{#3}}} |
| 531 |
\newcommand\Crochet[2]{% |
| 532 |
\@ifnextchar[{\Inner@Crochet{#1}{#2}}{% |
| 533 |
\ensuremath{\left\langle#1,#2\right\rangle}}% |
| 534 |
} |
| 535 |
% \end{macrocode} |
| 536 |
% \end{macro} |
| 537 |
% |
| 538 |
% |
| 539 |
% \CheckSum{179} |
| 540 |
% \Finale |
| 541 |
% |
| 542 |
\endinput |
| 543 |
|