diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/complexity')
-rw-r--r-- | Master/texmf-dist/doc/latex/complexity/README | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/complexity/complexity.pdf | bin | 203822 -> 257609 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/complexity/complexity.tex | 213 |
3 files changed, 92 insertions, 140 deletions
diff --git a/Master/texmf-dist/doc/latex/complexity/README b/Master/texmf-dist/doc/latex/complexity/README index 049509392cb..865ab971000 100644 --- a/Master/texmf-dist/doc/latex/complexity/README +++ b/Master/texmf-dist/doc/latex/complexity/README @@ -9,3 +9,22 @@ Written by Chris Bourke <cbourke@cse.unl.edu> No dependencies other than the standard ifthen package. See complexity.pdf for full documentation + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Copyright and license +% ===================== +% +% Copyright (C) 2017 Chris Bourke +% +% This file may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX +% version 2008/05/04 or later. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/doc/latex/complexity/complexity.pdf b/Master/texmf-dist/doc/latex/complexity/complexity.pdf Binary files differindex 951d83288e9..e83b01f00d3 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 4312c09308f..97e4102e8c6 100644 --- a/Master/texmf-dist/doc/latex/complexity/complexity.tex +++ b/Master/texmf-dist/doc/latex/complexity/complexity.tex @@ -1,12 +1,12 @@ % complexity latex package documentation -% Copyright 2005, by Chris Bourke <cbourke@cse.unl.edu>. -% http://www.cse.unl.edu/~cbourke +% Copyright 2017, by Chris Bourke <cbourke@cse.unl.edu> +% http://chrisbourke.unl.edu % % Please do not distribute altered versions of this document \documentclass{ltxdoc} -\def\complexityversion{0.80} +\def\complexityversion{0.81a} %\usepackage{amsmath} \usepackage[pdftex,a4paper,colorlinks,pdfpagemode=None]{hyperref} @@ -19,9 +19,7 @@ \begin{document} \title{User's Guide for \texttt{complexity}: a \LaTeX\ package, Version \complexityversion} -\author{Chris Bourke\\ -% \href{mailto:cbourke@cse.unl.edu}{\texttt{cbourke@cse.unl.edu}} -} +\author{Chris Bourke} \date{\today} \maketitle @@ -39,46 +37,6 @@ such as $\SAT$ (satisfiability). In all, over 350 commands are defined for helping you to typeset Computational Complexity constructs. -\subsection{Why a \texttt{complexity} package?} - -A better question is why not? Complexity theory is a more recent, -though mature area of Theoretical Computer Science. Each researcher -seems to have his or her own preferences as to how to typeset -Complexity Classes and has built up their own personal \LaTeX\ -commands file. This can be frustrating, to say the least, when it -comes to collaborations or when one has to go through an entire -series of files changing commands for compatibility or to get -exactly the look they want (or what may be required). I find it -amazing that a package hasn't been written \emph{already}! (Maybe -there has been, but I've not found it). - -I thought the best solution would be to develop a single \LaTeX\ -package to handle all of this for us. - -\section{Installation} - -You should place the |complexity| directory and its files -(|complexity.sty| and |mycomplexity.sty| as well the documentation -files if you like) in a place that your \TeX\ distribution will be -able to find them. - -If you use MiK\TeX\ then you should place it in your |localtexmf| -directory, making sure to refresh your \TeX\ tree (MiK\TeX\ options -wizard $\rightarrow$ General $\rightarrow$ File Names Database, -Refresh Now). - -In a unix \TeX\ distribution, you may find it useful to use a local -\LaTeX\ path (i.e. creating a directory -|/usr/local/username/mylatexfolder/| and tell your \TeX\ -distribution where to find it. Depending on your distribution, you -might declare an environmental variable (say -in your |.cshrc| file) like % - -|setenv $TEXINPUTS = /usr/local/texdistro//:/usr/local/username/mylatexfolder//|% - -(note that the double slash will recursively search all -subdirectories). - \section{Package Options} The |complexity| package provides two general options---a @@ -108,10 +66,7 @@ commands for complexity classes. By default, \emph{every} the number of commands the |complexity| package defines (and perhaps limit conflicts with other packages or your own commands) by using the |basic| option. This option defines only the most commonly used -complexity classes.\footnote{Deciding which classes were most -``common'' was purely based on my judgement, for better or worse. If -I've not considered your favorite complexity class as ``common,'' I -humbly apologize.} +complexity classes. \begin{description} @@ -128,20 +83,15 @@ humbly apologize.} \subsection{Font Options} -Different researchers and different publications have their own -preferences for how to typeset complexity classes. The beauty of -the |complexity| package is that it not only defines a whole sleigh -of complexity classes \emph{for you}, but it also allows you to -change the font they are typeset in with a simple option call. - -The |complexity| package defines three different font entities: a -font for complexity classes (|classfont|), a font for languages -(|langfont|), and a font for functions (|funcfont|). By default, -all of these fonts are typeset using the |mathsf| font. You can -change the font for all of them together or specify a font for each -individually. To apply a single font to all three entities, simply -pass the font (by itself) as an option. The supported font options -are as follows. +You can easily change the fonts for complexity classes using +a package option. The |complexity| package defines three different +font entities: a font for complexity classes (|classfont|), a font +for languages (|langfont|), and a font for functions (|funcfont|). +By default, all of these fonts are typeset using the |mathsf| font. +You can change the font for all of them together or specify a font +for each individually. To apply a single font to all three entities, +simply pass the font (by itself) as an option. The supported font +options are as follows. \begin{description} @@ -221,52 +171,46 @@ Font & |classfont| & |langfont| & |funcfont| \\ A special option is the |small| option and pertains only to how complexity classes (|classfont|) are typeset. Since classes are -typeset in uppercase letters, they tend to be more dominant. This -is not so important for classes such as $\P$ and $\NP$, but if you -are referencing classes such as $\PSPACE$ or $\DTIME$ it can +typeset in uppercase letters, they tend to be more dominant. If +you frequently typeset classes such as $\PSPACE$ or $\DTIME$ it can interrupt the normal flow of text layouts. One solution to this is to typeset classes 1pt smaller than the surrounding text. This is the approach taken in some texts (most notably, Papadimitriou's book -\emph{Computational Complexity}, 1994) and it works quite well. To -illustrate, consider the following: -\begin{quote} -There are deterministic classes such as $\PSPACE \hbox{\small -\PSPACE}$\kern-.3em, nondeterministic classes such as $\NP -\hbox{\small \NP}$\kern-.35em, and functional classes such as $\GapP -\hbox{\small \GapP}$\kern-.35em. But I like them all. -\end{quote} % Internal note: the negative kerning was added here - % for illustration only, the package typesets these classes - % with a correct amount of spacing when |small| is used! - -In the preceding pairs, the first was typeset in the document's -default font size while the second was typeset 1pt smaller -(internally, the |\small| command is used). The difference is +\emph{Computational Complexity}, 1994) and it works quite well. +The following samples illustrate the difference. The first sample +uses the default font size while the second uses a font that is 1pt +smaller (internally, the |\small| command is used). The difference is subtle but when used in a long text, flows more naturally. -To get the same effect using |complexity|, simply use the |small| -option (i.e. |\usepackage[small]{complexity}| with any combination -of the other options (it works for all fonts, but some do not look -as good as others; |typewriter| for example looks bad with this -option). Remember, however that this option only affects how classes -are typeset, not languages. +\begin{quote} +There are deterministic classes such as $\PSPACE$, nondeterministic +classes such as $\NP$, and functional classes such as $\GapP$. But +I like them all. +\end{quote} -It should be noted that this option only affects how classes are -typeset in the display and in-line mathmodes. It has no effect in, -say, a footnote or some special environment. Subscripts, -superscripts (as well as subsubscripts and supersuperscripts) are -not effected either---\TeX\ is allowed to automatically change font -sizes for these cases. +\begin{quote} +There are deterministic classes such as $\hbox{\small\PSPACE}$, +nondeterministic classes such as $\hbox{\small \NP}$, and functional +classes such as $\hbox{\small \GapP}$. But I like them all. +\end{quote} +To get the same effect using |complexity|, use the |small| +option: -\section{Using the Package} +|\usepackage[small]{complexity}| + +with any combination of the other options (it works for all +fonts, but some do not look as good as others; |typewriter| +for example looks bad with this option). Remember, however +that this option only affects how classes are typeset, not +languages. -Each of the commands is defined using |\ensuremath| so that you need -not be in \LaTeX's mathmode to use them. A word of warning, -however, if you use a command outside of mathmode, \TeX\ may not -properly insert surrounding whitespace. Thus, its best to always -use |complexity| commands inside mathmode. A complete list of -commands for classes can be found in Section -\ref{sec:CompleteListOfComplexityCommands}. +This option only affects how classes are +typeset in the display and in-line mathmodes. It has no effect in +a footnote or some special environment. Subscripts, +superscripts (as well as subsubscripts and supersuperscripts) are +not effected either. \TeX\ is allowed to automatically change font +sizes for these cases. \subsection{Overridden Commands} @@ -278,14 +222,26 @@ symbol \defaultS) are all redefined for use in the package. The use them. To use any of these symbols, use the commands |\defaultL|, |\defaultP|, and |\defaultS| instead. -Additionally, it may be the case that other \LaTeX\ packages are -loaded that already define (or redefine) some of the commands in the -|complexity| package. If this is the case, please email me so that -I can work something out for future updates. The quick solution is -to simply comment out the definition of the conflicting command in -|complexity.sty| and directly use |\ComplexityFont{}| to typeset -your complexity class (see also Section \ref{sec:Customization} - -Customization). +In some situations this redefinition is not desirable (if you need +these symbols but cannot use the |\default| versions). You can +disable the overriding of these three commands using the option +|disableredefinitions|; for example: + +|\usepackage[disableredefinitions]{complexity}| + +Three alternatives are defined if you disable the overrides: +|\cL|, |\cP| and |\cS| that typeset the classes $\cL$, $\cP$ +and $\cS$ respectively. + + +\section{Using the Package} + +Each of the commands is defined using |\ensuremath| so that you +need not be in \LaTeX's mathmode to use them. However, if you +use a command outside of mathmode, \TeX\ may not properly insert +surrounding whitespace. It is recommended to always use |complexity| +commands inside mathmode. A complete list of commands for classes +can be found in Section \ref{sec:CompleteListOfComplexityCommands}. \subsection{Special Commands} @@ -305,10 +261,10 @@ a complete list of these functions. \centering % \caption{\texttt{func} Commands} % \label{table:SpecialCommands} -\begin{tabular}{llp{7cm}} +\begin{tabular}{llp{8cm}} Command & Result & Comment \\ -\hline\hline\\ -|\llog| & $\llog$ & Denotes logarithmic functions. Note that the command % +\hline\hline +|\llog| & $\llog$ & Denotes logarithmic functions. The command % is invoked with \emph{two} l's so as to not interfere with the \LaTeX\ |\log| command.\\ |\poly| & $\poly$ & Denotes polynomial functions \\ @@ -324,9 +280,9 @@ Command & Result & Comment \\ \subsection{Language Commands} -|complexity| also defines commands to typeset languages (subsets of -$\{0,1\}^*$). A complete list of predefined language commands can -be found in Table \ref{table:LanguageCommands} below. The number of +|complexity| also defines commands to typeset languages. +A complete list of predefined language commands can +be found in Table \ref{table:LanguageCommands}. The number of commands is sparse; this was intentional. How one refers to languages is far less standard than how one refers to classes. Some people like to explicitly write \emph{every} word @@ -527,34 +483,11 @@ $$\PH \subseteq \P^{\#\P}$$ \hrule -For an even more complicated example, check out the \LaTeX ed (PDF) -version of the Complexity Zoo (\url{http://www.ComplexityZoo.com}) -available on my webpage (\url{http://www.cse.unl.edu/~cbourke}) - -\section{Feedback} - -I'd very much appreciate feedback that would improve this package. -Specifically, I'm looking for the following. - -\begin{itemize} - - \item Inconsistencies in (or suggestions for better) notation - - \item Errors, Typos, etc - - \item Incompatibilities with other packages - - \item Feature requests - -\end{itemize} - -You can email me at -\href{mailto:cbourke@cse.unl.edu}{cbourke@cse.unl.edu} - \subsection{Acknowledgements} I'd like to thank Till Tantau for several useful suggestions and feature requests as well as some clever code segments for the -|small| option. +|small| option. I'd also like to thank Enrico Gregorio for the +suggested fix to disable redefinitions. \end{document} |