summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/shadethm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-11-04 22:58:38 +0000
committerKarl Berry <karl@freefriends.org>2010-11-04 22:58:38 +0000
commitf66d07270708c060c136b46decbc48ff366d38b6 (patch)
tree59eb99d9b5b744084100c424b36ae102fac98706 /Master/texmf-dist/doc/latex/shadethm
parentd7657995bee70cf2feba1fe06e2b5c8f133a39b6 (diff)
shadethm (4nov10)
git-svn-id: svn://tug.org/texlive/trunk@20319 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/shadethm')
-rw-r--r--Master/texmf-dist/doc/latex/shadethm/shadetest.pdfbin0 -> 90404 bytes
-rw-r--r--Master/texmf-dist/doc/latex/shadethm/shadetest.tex177
-rw-r--r--Master/texmf-dist/doc/latex/shadethm/shadethm-doc.pdfbin0 -> 265142 bytes
-rw-r--r--Master/texmf-dist/doc/latex/shadethm/shadethm-doc.tex203
4 files changed, 380 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/shadethm/shadetest.pdf b/Master/texmf-dist/doc/latex/shadethm/shadetest.pdf
new file mode 100644
index 00000000000..9a8c902a77e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/shadethm/shadetest.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/shadethm/shadetest.tex b/Master/texmf-dist/doc/latex/shadethm/shadetest.tex
new file mode 100644
index 00000000000..3859c7df89f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/shadethm/shadetest.tex
@@ -0,0 +1,177 @@
+\documentclass{article} % test of LaTeX package shadethm.sty
+\usepackage{shadethm}
+\newshadetheorem{theorem}{Theorem}[section]
+\newshadetheorem{cor}[theorem]{Corollary}
+\newtheorem{remark}[theorem]{Remark}
+\newtheorem{unshadedtheorem}[theorem]{Theorem}
+\newtheorem{comment}{Comment}[section]
+
+\begin{document}
+Document begins with some initial text.
+
+\section{First Section}
+Here is some initial text before the shaded box.
+
+\begin{theorem}
+This is the text to be shaded.
+\end{theorem}
+
+This is some text after the first shade.
+It is separated from the environments by a blank line; that is
+all handled as usual in \LaTeX.
+\begin{cor}
+This is more text to be shaded.
+It is numbered with the same counter as the environment above.
+
+Multiple paragraphs will be handled with the usual paragraph indentation,
+unless of course the user asks for a different paragraph indentation inside
+the environment.
+\end{cor}
+This is not separated from the prior environment by a blank line and
+so I don't expect a new paragraph.
+This shows that the default is for the shaded areas have the usual text size
+so that shading sticks out into the margin.
+This is the shadethm option \emph{bodymargin}.
+The behavior of having the shading end at the margin
+(so the words do not take up the full text width)
+comes from the option \emph{shademargin}, invoked with
+\verb!\usepackage[shademargin]{shadethm}!.
+
+
+\begin{unshadedtheorem}
+More text.
+This time not set in shade, but it is still numbered in the same sequence.
+\end{unshadedtheorem}
+
+A bit more.
+
+\begin{comment}
+More text.
+This time neither set in shade, nor numbered in the same sequence.
+\end{comment}
+
+
+\section{A New Section}
+
+Section preamble.
+
+\begin{theorem}
+This theorem is shaded and the number has been reset by the section.
+\end{theorem}
+
+\begin{remark}
+ And a closing remark
+\end{remark}
+Finishing text.
+
+\clearpage
+\section{A Test of Colors}
+This section shows how you can fool around to see some of you own colors.
+% Set up some lengths so that you can see the border.
+\setlength{\shadeboxsep}{2pt}
+\setlength{\shadeboxrule}{.4pt}
+\setlength{\shadedtextwidth}{\textwidth}
+\addtolength{\shadedtextwidth}{-2\shadeboxsep}
+\addtolength{\shadedtextwidth}{-2\shadeboxrule}
+\setlength{\shadeleftshift}{0pt}
+\setlength{\shaderightshift}{0pt}
+% Macro to test colors
+\newcommand{\thmwithcmykcolor}[2]{%
+\par Material before the theorem.
+\definecolor{shadethmcolor}{cmyk}{#1}%
+\definecolor{shaderulecolor}{cmyk}{#2}%
+\begin{theorem}
+This is a theorem set in the cmyk color \textbf{#1}, surrounded with a
+borderline set in the cmyk color \textbf{#2}.
+Note, for instance, that shades darken on overheads, so test your colors
+where you will use them.
+\end{theorem}}
+% Some colors
+\thmwithcmykcolor{.10,.10,0,0}{.75,.75,0,.5}
+\thmwithcmykcolor{.04,.04,0,.10}{.99,0,0.52,0.70}
+\thmwithcmykcolor{0,.13,.11,0}{0,0.88,0.85,0.35}
+The prior theorem illustrates what happens if you use the option
+\emph{colored}, as supplied in the file \verb!colored.sth!,
+except that the supplied file has the color stick out into the margin.
+
+One more supplied option is \emph{shadein} where each shaded theorem
+is indented, like a \LaTeX\ quotation.
+% ---> Uncomment if you want to test dvips's named colors
+% \newcommand{\thmwithnamedcolor}[1]{%
+% \par Material before the theorem.
+% \definecolor{shadethmcolor}{named}{#1}%
+% \definecolor{shaderulecolor}{named}{Black}%
+% \begin{theorem}
+% This is a theorem set in the named color \textbf{#1}, surrounded with a blac
+% borderline.
+% Note, for instance, that colors darken on overheads, so test your colors
+% where you will use them.
+% \end{theorem}}
+%
+% These are all the DVIPS named colors from color.pro (as of 1999-Aug-11).
+% \thmwithnamedcolor{GreenYellow}
+% \thmwithnamedcolor{Yellow}
+% \thmwithnamedcolor{Goldenrod}
+% \thmwithnamedcolor{Dandelion}
+% \thmwithnamedcolor{Apricot}
+% \thmwithnamedcolor{Peach}
+% \thmwithnamedcolor{Melon}
+% \thmwithnamedcolor{YellowOrange}
+% \thmwithnamedcolor{Orange}
+% \thmwithnamedcolor{BurntOrange}
+% \thmwithnamedcolor{Bittersweet}
+% \thmwithnamedcolor{RedOrange}
+% \thmwithnamedcolor{Mahogany}
+% \thmwithnamedcolor{Maroon}
+% \thmwithnamedcolor{BrickRed}
+% \thmwithnamedcolor{Red}
+% \thmwithnamedcolor{OrangeRed}
+% \thmwithnamedcolor{RubineRed}
+% \thmwithnamedcolor{WildStrawberry}
+% \thmwithnamedcolor{Salmon}
+% \thmwithnamedcolor{CarnationPink}
+% \thmwithnamedcolor{Magenta}
+% \thmwithnamedcolor{RedViolet}
+% \thmwithnamedcolor{Fuchsia}
+% \thmwithnamedcolor{Lavender}
+% \thmwithnamedcolor{Thistle}
+% \thmwithnamedcolor{Orchid}
+% \thmwithnamedcolor{DarkOrchid}
+% \thmwithnamedcolor{Purple}
+% \thmwithnamedcolor{Plum}
+% \thmwithnamedcolor{Violet}
+% \thmwithnamedcolor{RoyalPurple}
+% \thmwithnamedcolor{BlueViolet}
+% \thmwithnamedcolor{Periwinkle}
+% \thmwithnamedcolor{CadetBlue}
+% \thmwithnamedcolor{CornflowerBlue}
+% \thmwithnamedcolor{MidnightBlue}
+% \thmwithnamedcolor{NavyBlue}
+% \thmwithnamedcolor{RoyalBlue}
+% \thmwithnamedcolor{Blue}
+% \thmwithnamedcolor{Cerulean}
+% \thmwithnamedcolor{Cyan}
+% \thmwithnamedcolor{ProcessBlue}
+% \thmwithnamedcolor{SkyBlue}
+% \thmwithnamedcolor{Turquoise}
+% \thmwithnamedcolor{TealBlue}
+% \thmwithnamedcolor{Aquamarine}
+% \thmwithnamedcolor{BlueGreen}
+% \thmwithnamedcolor{Emerald}
+% \thmwithnamedcolor{JungleGreen}
+% \thmwithnamedcolor{SeaGreen}
+% \thmwithnamedcolor{Green}
+% \thmwithnamedcolor{ForestGreen}
+% \thmwithnamedcolor{PineGreen}
+% \thmwithnamedcolor{LimeGreen}
+% \thmwithnamedcolor{YellowGreen}
+% \thmwithnamedcolor{SpringGreen}
+% \thmwithnamedcolor{OliveGreen}
+% \thmwithnamedcolor{RawSienna}
+% \thmwithnamedcolor{Sepia}
+% \thmwithnamedcolor{Brown}
+% \thmwithnamedcolor{Gray}
+
+Enjoy!
+\textit{--Jim Hefferon}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/shadethm/shadethm-doc.pdf b/Master/texmf-dist/doc/latex/shadethm/shadethm-doc.pdf
new file mode 100644
index 00000000000..a82e7776a39
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/shadethm/shadethm-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/shadethm/shadethm-doc.tex b/Master/texmf-dist/doc/latex/shadethm/shadethm-doc.tex
new file mode 100644
index 00000000000..26e1af15ad0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/shadethm/shadethm-doc.tex
@@ -0,0 +1,203 @@
+\documentclass[pagesize=auto, fontsize=12pt, DIV=10]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{etex}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{microtype}
+\usepackage{hyperref}
+
+\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
+\makeatletter
+\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
+\makeatother
+\newcommand*{\env}[1]{\texttt{#1}}
+\newcommand*{\opt}[1]{\texttt{#1}}
+\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
+
+\renewcommand*{\labelenumi}{(\theenumi)}
+
+\addtokomafont{title}{\rmfamily}
+
+\title{The \pkg{shadethm} package}
+\subtitle{ Shaded theorem environments in \LaTeX,\\with \cmd{\newshadetheorem} in addition to \cmd{\newtheorem}}
+\author{Jim Hefferon\thanks{\mail{hefferon@smcvax.smcvt.edu}}}
+\date{1999/11/23}
+
+
+\begin{document}
+
+\maketitle
+
+
+\section{Usage}
+
+Used as a \LaTeXe\ style, with \verb|\usepackage{shadethm}|, it allows declarations
+of the form \verb|\newshadetheorem{theorem}{Theorem}|, so that
+%
+\begin{verbatim}
+\begin{theorem} $e=mc^2$ \end{theorem}
+\end{verbatim}
+%
+will produce the usual theorem, only placed in a shaded box.
+
+
+\minisec{Options.}
+
+Two come in this file:
+%
+\begin{description}
+\item[\opt{bodymargin} (default)]
+ The body of the shaded text lines up with the
+ margins. Just as though you called \verb|newtheorem|, then colored later.
+ Shading falls outside the margin.
+
+\item[\opt{shademargin}]
+ The shading lines up with the margins, so the body of
+ shaded text comes out a little thinner.
+\end{description}
+%
+If you call it with an option not on that list then it will look for a
+file \texttt{\meta{Option\-Name}.sth} and take the parameters from there. See the included
+files \texttt{shadein.sth} and \texttt{colored.sth}, the first of which gives theorems that are
+(like \LaTeX\ quotations) indented left and right and the second of which
+gives color shading.
+
+
+\section{Remarks}
+
+\begin{enumerate}
+\item You can of course have non-shaded environments, also. The \cmd{\newtheorem}
+ command still works.
+
+\item Numbering within: An prior version of this style required that you
+ number within like this:
+ %
+\begin{verbatim}
+\newshadetheorem{thm}{Theorem}
+\newshadetheorem{note}[shadethm]{Note} % No longer needed!
+\end{verbatim}
+ %
+ but this one drops that requirement. If you didn't use the old version,
+ forget about it.
+
+\item Uses the \pkg{graphics} package. Look for it in the \href{http://ctan.org/}{CTAN} \TeX-archive nearest
+ you, for instance at \href{http://tug.ctan.org/}{\texttt{tug.ctan.org}}.
+
+\item Works with \pkg{amsthm.sty}.
+
+\item Notice that if you say
+ %
+\begin{verbatim}
+\newshadetheorem{theorem}{Theorem}
+\end{verbatim}
+ %
+ and then
+ %
+\begin{verbatim}
+\newtheorem{theorem}{Theorem}
+\end{verbatim}
+ %
+ then you will get an error message since
+ the first allows you to say\\\verb|\begin{theorem} ...|, as does the second.
+\end{enumerate}
+
+
+\section{Installation}
+
+Put this where your \TeX\ looks for \texttt{.sty} files.
+There are some parameters you could set the default for (try them as is,
+first).
+%
+\begingroup
+\newcommand*{\desc}[1]{{\usekomafont{descriptionlabel}#1}\quad}%
+\renewcommand*{\theenumi}{\roman{enumi}}%
+\leftmargini = 1.5 \leftmargini
+\begin{enumerate}
+\item \label{item:i}\desc{\texttt{shadethmcolor}}
+ The shading color of the background. See the
+ documentation for the \pkg{color} package, but with a `gray' model, I~find .97
+ looks good out of my printer, while a darker shade like~.92 is needed
+ to make it copy well. (Black is~0, white is~1.)
+
+\item[(\ref{item:i}*)] \desc{\texttt{shaderulecolor}}
+ The shading color of the border of the shaded box.
+ See (\ref{item:i}). If \cmd{\shadeboxrule} is set to 0\,pt then this won't print anyway.
+
+\item[(\ref{item:i}**)] \desc{\cmd{\shadeboxrule}}
+ The width of the border around the shading. Set it to
+ 0\,pt (not just 0) to make it disappear.
+
+\item[(\ref{item:i}***)] \desc{\cmd{\shadeboxsep}}
+ The length by which the shade box surrounds the text.
+
+\item \desc{\cmd{\shadesetinsideminipage}}
+ The theorems are set inside a \env{minipage} to
+ get line breaks, but some things, like paragraph indents, are messed
+ with there, so I~have a hook to reset them. Probably you can just
+ leave this alone.
+
+\item The default option. Change the \verb|\ExecuteOptions{...}| right before
+ the \cmd{\ProcessOptions}.
+\end{enumerate}
+\endgroup
+
+
+\minisec{Comment:}
+
+If you get an error about `undefined color model' then you need to create
+the file \texttt{color.cfg} in the same place as \texttt{color.sty}, and put in it the line
+%
+\begin{verbatim}
+\ExecuteOptions{dvips}
+\end{verbatim}
+%
+(or~whatever is the name of your driver). See the
+documentation for the \pkg{graphics} package. I~needed this in the distant past
+under N\TeX.
+
+
+\section{Bugs}
+
+\begin{enumerate}
+\item Page breaks are a problem since it sets the theorem before it is shaded.
+ The theorem is put into a \env{minipage} in order to have the right line breaks
+ put in, but then can't be broken across pages. I'd be interested in any
+ fixes for this. DA?
+\end{enumerate}
+
+
+\section{License}
+
+Copyright 1999 Jim Hefferon \mail{jim@joshua.smcvt.edu}\\
+This program can redistributed and/or modified under the terms
+of the \LaTeX\ Project Public License Distributed from CTAN
+archives in directory \href{http://ctan.org/macros/latex/base/lppl.txt}{\nolinkurl{macros/latex/base/lppl.txt}}; either
+version~1 of the License, or (at your option) any later version.
+
+\clearpage
+
+
+\section{History}
+
+\begin{description}
+\item[\texttt{99XI23} jh] Redid the parsing to stick to \cmd{\newcommand}-style calls. Needed
+ to put in some oppresive \cmd{\expandafter} strings.
+\item[\texttt{99VII09} jh \mail{tex@joshua.smcvt.edu}] Fixed the number within situation. LPPL
+ added.
+\item[\texttt{97I07} jh] Changed the interior of the \cmd{\DeclareOptions} to \cmd{\AtBeginDocument}
+ for cases where the \cmd{\textwidth} is changed.
+\item[\texttt{95VI19} jh] Adapted for \LaTeXe. Now uses the \pkg{graphics} package, and all
+ the neat \LaTeXe\ package stuff. Still haven't rewritten the parsing code to
+ use the new optional arguments to \cmd{\newcommand}, though. Ah well.
+\item[\texttt{94VII11} jim hefferon \mail{hefferon@smcvax.smcvt.edu}.] First written (after lots
+ of sporadic tries, over months; I couldn't get any of the extant shading
+ macros to work with theorems) from a hint in TvZ's \texttt{Fancybox} writeup.
+ It's all so easy once you know how.
+\end{description}
+
+
+\end{document}