diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/complexity/complexity.pdf | bin | 204317 -> 203822 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/complexity/complexity.tex | 64 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/complexity/complexity.sty | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/complexity/mycomplexity.sty | 4 |
4 files changed, 60 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/latex/complexity/complexity.pdf b/Master/texmf-dist/doc/latex/complexity/complexity.pdf Binary files differindex 8c680b12d32..951d83288e9 100644 --- a/Master/texmf-dist/doc/latex/complexity/complexity.pdf +++ b/Master/texmf-dist/doc/latex/complexity/complexity.pdf diff --git a/Master/texmf-dist/doc/latex/complexity/complexity.tex b/Master/texmf-dist/doc/latex/complexity/complexity.tex index ceca44f586e..4312c09308f 100644 --- a/Master/texmf-dist/doc/latex/complexity/complexity.tex +++ b/Master/texmf-dist/doc/latex/complexity/complexity.tex @@ -6,7 +6,7 @@ \documentclass{ltxdoc} -\def\complexityversion{0.76} +\def\complexityversion{0.80} %\usepackage{amsmath} \usepackage[pdftex,a4paper,colorlinks,pdfpagemode=None]{hyperref} @@ -22,7 +22,7 @@ \author{Chris Bourke\\ % \href{mailto:cbourke@cse.unl.edu}{\texttt{cbourke@cse.unl.edu}} } -\date{March 22nd, 2005} +\date{\today} \maketitle @@ -379,12 +379,14 @@ it is preferred that you not alter the base style file your commands in (|mycomplexity.sty|). \subsection{Class Commands} -To define a new complexity class, simply use the \LaTeX\ -command, |\newcommand| as follows. Say that we want to define the -new complexity class, ``VCCC'' (``very complex complexity class''). -We would use something like +To define a new complexity class, you can use the |\newclass| +command which is similar (in fact is a macro for) the \LaTeX\ +command, |\newcommand|. The command takes two arguments: the +command that you will use and how the class will be typeset. For +example, say that we want to define the new complexity class, +``VCCC'' (``very complex complexity class''). We would use -|\newcommand{\VCCC}{\ComplexityFont{VCCC}}| +|\newclass{\VCCC}{VCCC}| Then, anytime we wanted to typeset our new class, we simply use |$\VCCC$|. Internally, |complexity| typesets everything using the @@ -394,21 +396,22 @@ package. You also may have different preferences for typesetting the classes that |complexity| already defines. For instance, the class $\promiseBPP$ (typeset using the command |\promiseBPP|) is typeset -with ``promise'' explicitly written. Preferring brevity over -clarity, you wish to typeset the same class as -$\ComplexityFont{pBPP}$. To do this, we use the \LaTeX\ command, -|\renewcommand| as follows. +with ``promise'' explicitly written. Preferring brevity over +clarity, you may wish to typeset the same class as +``$\ComplexityFont{pBPP}$''. To do this, we use the |\renewclass| +as follows. -|\renewcommand{\promiseBPP}{\ComplexityFont{pBPP}}| +|\renewclass{\promiseBPP}{pBPP}| However, this only changes what the command does, not how we invoke it---we would still use |$\promiseBPP$|. -As another example, say we want to change how the class $\ModkL$ -(typeset using the command |\ModkL|) is typeset. By default, the -subscript $k$ is typeset in regular mathmode. Say we want to change -it so that it is typeset in the same font as the rest of the -classes. We may use something like the following. +Consider a more complex example. Say we want to change how the +class $\ModkL$ (typeset using the command |\ModkL|) is typeset. By +default, the subscript $k$ is typeset in regular mathmode. We can +change it so that it is typeset in the same font as the rest of the +classes. We will have to specify this using |\renewcommand| as +follows. \begin{verbatim} \renewcommand{\ModkL}{ % @@ -427,19 +430,19 @@ correctly. \subsection{Language Commands} You can define languages (to be typeset in the |langfont|) in a -similar manner. Instead of using |\ComplexityFont|, however, you -would use the command |\lang|. You can use |\lang| as a stand alone -command in your document (i.e. |$\lang{Matching} \in \P$|) or you -can define a command (using |\lang|) that can be reused throughout -your document. Again, we give an example. Say we wanted to typeset -the language ``Graph Non-Isomorphism'' using the abbreviation, -``GNI''. We could define something like the following. +similar manner. Instead of using |\newclass|, however, you would +use the command |\newlang|. You can also use |\lang| as a stand +alone command in your document (i.e. |$\lang{Matching} \in \P$|) or +you can define a command (using |\lang|) that can be reused +throughout your document. Again, we give an example. Say we wanted +to typeset the language ``Graph Non-Isomorphism'' using the +abbreviation, ``GNI''. We could define something like the following. -|\newcommand{\GNI}{\lang{GNI}}| +|\newlang{\GNI}{GNI}| In our document, we would would use something like |$\GNI \in \AM$|. We can also redefine any predefined language commands using the -|\renewcommand| command as before. +|\renewlang| command as before. \subsection{Function Commands} @@ -450,9 +453,10 @@ or you can define a command that can be reused. Say we wanted to typeset a class of subexponential functions, say ``subexp''. We could define something like the following. -|\newcommand{\subexp}{\func{subexp}}| +|\newfunc{\subexp}{subexp}| -In our document, we could then use |$\subexp(n) = 2^{o(n)}$|. +In our document, we could then use |$\subexp(n) = 2^{o(n)}$|. We can +redefine a function command using |\renewfunc|. \section{Extended Example} @@ -466,7 +470,7 @@ the following \TeX\ code. It follows immediately from the definitions of $\P$ and $\NP$ that $$\P \subseteq \NP$$ but the million dollar question is whether or not $\P -\stackrel{?}{=} \NP$. In an effort to resolve this question, +\stackrel{?}{=} \NP$. As a generalization to these classes, Stockmeyer (1976) defined a \emph{polynomial} hierarchy using oracles. @@ -499,7 +503,7 @@ Would produce something like the following: It follows immediately from the definitions of $\P$ and $\NP$ that $$\P \subseteq \NP$$ but the million dollar question is whether or not $\P -\stackrel{?}{=} \NP$. In an effort to resolve this question, +\stackrel{?}{=} \NP$. As a generalization to these classes, Stockmeyer (1976) defined a \emph{polynomial} hierarchy using oracles. diff --git a/Master/texmf-dist/tex/latex/complexity/complexity.sty b/Master/texmf-dist/tex/latex/complexity/complexity.sty index 9580b8d7ef6..6a57384e02b 100644 --- a/Master/texmf-dist/tex/latex/complexity/complexity.sty +++ b/Master/texmf-dist/tex/latex/complexity/complexity.sty @@ -15,6 +15,11 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% Changes made (.76 -> .80) +% -Added a cool message using \typeout! +% -Added \newclass, \newlang, \newfunc commands +% -Added \renewclass, \renewlang, \renewfunc +% -Added \class that acts like \lang and \func % Changes made (.75 -> .76) % -Fixed a spacing bug that may cause extra spaces when not in math % mode. Thanks to Nicolas Markey @@ -36,7 +41,13 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} % -\ProvidesPackage{complexity}[3/22/05 \space v0.75] +\ProvidesPackage{complexity}[11/24/06 \space v0.77] + +\typeout{\space\space +----------------------------------------------+^^J% + \space\space\space\space complexity LaTeX package ^^J% + \space\space\space\space version: ^^J% + \space\space\space\space author: Chris Bourke (cbourke@cse.unl.edu) ^^J% + \space\space +----------------------------------------------+} % Require Packages %\RequirePackage{keyval}[1997/11/10] @@ -51,6 +62,17 @@ \newcommand{\lang}[1]{{\ensuremath{\mathsf{#1}}}} \newcommand{\func}[1]{{\ensuremath{\mathsf{#1}}}} +\newcommand{\class}[1]{\ComplexityFont{#1}} + +% Experimental: +\newcommand{\newclass}[2]{\newcommand{#1}{\ComplexityFont{#2}}} +\newcommand{\newlang}[2]{\newcommand{#1}{\lang{#2}}} +\newcommand{\newfunc}[2]{\newcommand{#1}{\func{#2}}} + +\newcommand{\renewclass}[2]{\renewcommand{#1}{\ComplexityFont{#2}}} +\newcommand{\renewlang}[2]{\renewcommand{#1}{\lang{#2}}} +\newcommand{\renewfunc}[2]{\renewcommand{#1}{\func{#2}}} + \newboolean{complexity@fullmode} % \setboolean{complexity@fullmode}{true} diff --git a/Master/texmf-dist/tex/latex/complexity/mycomplexity.sty b/Master/texmf-dist/tex/latex/complexity/mycomplexity.sty index 4d4f1e67b0f..ab4297d10c2 100644 --- a/Master/texmf-dist/tex/latex/complexity/mycomplexity.sty +++ b/Master/texmf-dist/tex/latex/complexity/mycomplexity.sty @@ -6,8 +6,10 @@ % % Then, in my actual document, I would use something like % $\MCC \subseteq \NP \cap \coNP$ to typeset it. -% +% % In this file, you should also include any other standard inputs that you use. % For instance, I have a .tex file that defines a bunch of Math Mode shortcuts, % I would include it here as follows: + +\newcommand{\TIME}{\ComplexityFont{TIME}} |