From 39e4a2a8cc8101a8d081d6973afdb83591b06e58 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 23 Jul 2012 21:55:36 +0000
Subject: nlctdoc 1.02 (23jul12)

git-svn-id: svn://tug.org/texlive/trunk@27116 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls | 47 +++++++++++++++++++++----
 1 file changed, 40 insertions(+), 7 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls')

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}%
 }
 
-- 
cgit v1.2.3

