summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nlctdoc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-23 21:55:36 +0000
committerKarl Berry <karl@freefriends.org>2012-07-23 21:55:36 +0000
commit39e4a2a8cc8101a8d081d6973afdb83591b06e58 (patch)
treed797c5549e97d2ff6a030f8351c27100e03af694 /Master/texmf-dist/tex/latex/nlctdoc
parentd5ef93ccfdd8ddb5ee3d5a41434e0aec04df8fa0 (diff)
nlctdoc 1.02 (23jul12)
git-svn-id: svn://tug.org/texlive/trunk@27116 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nlctdoc')
-rw-r--r--Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls47
1 files changed, 40 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls b/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
index c1c1f38b593..1972df74b27 100644
--- a/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
+++ b/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
@@ -2,17 +2,20 @@
% wants to compile the documentation that comes with my packages.
% Some of the code is taken from doc.sty
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{nlctdoc}[2012/05/21 v1.01 (NLCT)]
+\ProvidesClass{nlctdoc}[2012/07/18 v1.02 (NLCT)]
\def\@nlctdoc@class{scrartcl}%
\DeclareOption{article}{\def\@nlctdoc@class{scrartcl}}
\DeclareOption{book}{\def\@nlctdoc@class{scrbook}}
\DeclareOption{report}{\def\@nlctdoc@class{scrreprt}}
\DeclareOption{a5paper}{\@latexerr{Option not supported}%
{}}
+\newif\ifwidecs
+\widecsfalse
+\DeclareOption{widecs}{\widecstrue}
\DeclareOption*{%
\PassOptionsToClass {\CurrentOption}{\@nlctdoc@class}}
\ProcessOptions
-\LoadClass{\@nlctdoc@class}
+\LoadClass[captions=tableheading]{\@nlctdoc@class}
\RequirePackage{xcolor}
\RequirePackage{fourier}
\RequirePackage{ifpdf}
@@ -201,16 +204,23 @@
\catcode`\!=12
\def\DescribeMacro{\leavevmode\@bsphack
\begingroup\MakePrivateLetters\Describe@Macro}
-\def\Describe@Macro#1{\endgroup
+
+ \def\Describe@Macro#1{\endgroup
\marginpar{\raggedleft\PrintDescribeMacro{#1}}%
\SpecialUsageIndex{#1}\@esphack\ignorespaces}
+
+
\def\DescribeEnv{\leavevmode\@bsphack\begingroup\MakePrivateLetters
\Describe@Env}
\def\Describe@Env#1{\endgroup
\marginpar{\raggedleft\PrintDescribeEnv{#1}}%
\SpecialEnvIndex{#1}\@esphack\ignorespaces}
\reversemarginpar
-\setlength\marginparpush{0pt} \setlength\marginparwidth{8pc}
+\setlength\marginparpush{0pt}
+\ifwidecs
+\else
+ \setlength\marginparwidth{8pc}
+\fi
{\catcode`\|=\z@ \catcode`\\=12
|gdef|bslash{\}}
\def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim
@@ -495,7 +505,7 @@
\fi
\long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
\@ifundefined{index@prologue}
- {\def\index@prologue{\section*{Index}%
+ {\def\index@prologue{\@ifundefined{chapter}{\section*{Index}}{\chapter*{Index}}%
\markboth{Index}{Index}%
Numbers written in italic refer to the page
where the corresponding entry is described;
@@ -951,6 +961,15 @@
\newcommand{\importantsymbol}{\bfseries\Huge\danger}
+\newcommand\Describe@Wide@Macro[1]{%
+ \endgroup
+ \marginpar{\raggedright\hbox to\marginparwidth{\PrintDescribeMacro{#1}}\par}%
+ \SpecialUsageIndex{#1}\@esphack
+ \ignorespaces
+}
+
+\newlength\macrowidth
+
\ifpdf
\definecolor{defbackground}{rgb}{1,1,0.75}
\newsavebox\defsbox
@@ -968,7 +987,15 @@
\end{lrbox}%
\vskip10pt
\noindent
- \defarg\fcolorbox{black}{defbackground}{\usebox\defsbox}%
+ \ifwidecs
+ \let\Describe@Macro\Describe@Wide@Macro
+ \defarg
+ \nopagebreak\mbox{}\nopagebreak
+ \par\nopagebreak\vspace{0.5ex plus 0.25ex minus 0.1ex}\nopagebreak\noindent
+ \else
+ \defarg
+ \fi
+ \fcolorbox{black}{defbackground}{\usebox\defsbox}%
\vskip10pt
\noindent
\ignorespacesafterend
@@ -1216,7 +1243,13 @@ bibliography style|hyperpage}}
}
\newcommand*{\listofexamples}{%
- \section*{List of Examples}%
+ \@ifundefined{chapter}
+ {%
+ \section*{List of Examples}%
+ }%
+ {%
+ \chapter*{List of Examples}%
+ }
\@starttoc{loe}%
}