texlive[44353] Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls:

commits+karl at tug.org commits+karl at tug.org
Mon May 15 00:41:32 CEST 2017


Revision: 44353
          http://tug.org/svn/texlive?view=revision&revision=44353
Author:   karl
Date:     2017-05-15 00:41:32 +0200 (Mon, 15 May 2017)
Log Message:
-----------
nlctdoc (14may17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls

Modified: trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls	2017-05-14 22:41:11 UTC (rev 44352)
+++ trunk/Master/texmf-dist/tex/latex/nlctdoc/nlctdoc.cls	2017-05-14 22:41:32 UTC (rev 44353)
@@ -4,7 +4,7 @@
 % copy the code here to another file and modify it for your own purposes.
 % There's no guarantee that it will work with other packages.
 %
-%  Copyright 2013 Nicola Talbot
+%  Copyright 2017 Nicola Talbot
 % 
 %  This work may be distributed and/or modified under the
 %  conditions of the LaTeX Project Public License, either version 1.3
@@ -15,37 +15,56 @@
 %  version 2005/12/01 or later.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{nlctdoc}[2016/11/07 v1.05 (NLCT)]
+\ProvidesClass{nlctdoc}[2017/05/13 v1.06 (NLCT)]
 \RequirePackage{ifpdf}
+\RequirePackage{ifxetex}
 % tex4ht stopped working with koma during TL2013.
 % Use pdflatex with koma for the pdf version
 % and latex with one of the base classes for the html 
 % version to circumvent this.
 \ifpdf
-  \def\@nlctdoc at class{scrartcl}%
+  \newcommand{\@nlctdoc at if@usingtexht}[2]{#2}
 \else
+  \ifxetex
+   \newcommand{\@nlctdoc at if@usingtexht}[2]{#2}
+  \else
+   \newcommand{\@nlctdoc at if@usingtexht}[2]{#1}
+  \fi
+\fi
+
+\@nlctdoc at if@usingtexht
+{
   \def\@nlctdoc at class{article}%
-\fi
+}
+{
+  \def\@nlctdoc at class{scrartcl}%
+}
 \DeclareOption{article}{%
-  \ifpdf
+  \@nlctdoc at if@usingtexht
+  {%
+    \def\@nlctdoc at class{article}%
+  }%
+  {%
     \def\@nlctdoc at class{scrartcl}%
-  \else
-    \def\@nlctdoc at class{article}%
-  \fi
+  }%
 }
 \DeclareOption{book}{%
-  \ifpdf
+  \@nlctdoc at if@usingtexht
+  {%
+    \def\@nlctdoc at class{book}%
+  }%
+  {%
     \def\@nlctdoc at class{scrbook}%
-  \else
-    \def\@nlctdoc at class{book}%
-  \fi
+  }%
 }
 \DeclareOption{report}{%
-  \ifpdf
+  \@nlctdoc at if@usingtexht
+  {%
+    \def\@nlctdoc at class{report}%
+  }%
+  {%
     \def\@nlctdoc at class{scrreprt}%
-  \else
-    \def\@nlctdoc at class{report}%
-  \fi
+  }%
 }
 \DeclareOption{a5paper}{\@latexerr{Option not supported}%
    {}}
@@ -67,24 +86,34 @@
 \DeclareOption*{%
     \PassOptionsToClass  {\CurrentOption}{\@nlctdoc at class}}
 \ProcessOptions
-\ifpdf
+\@nlctdoc at if@usingtexht
+{%
+  \LoadClass{\@nlctdoc at class}
+}%
+{%
   \ifnlctdocinlinetitle
     \LoadClass[captions=tableheading,abstract=true,titlepage=false]{\@nlctdoc at class}
   \else
     \LoadClass[captions=tableheading,abstract=true]{\@nlctdoc at class}
   \fi
+}%
+\RequirePackage{xcolor}
+\ifxetex
 \else
-  \LoadClass{\@nlctdoc at class}
+ \RequirePackage[utf8]{inputenc}
 \fi
-\RequirePackage{xcolor}
-\RequirePackage[utf8]{inputenc}
-\ifpdf
-  \RequirePackage[T1]{fontenc}
-  \RequirePackage{cmap}
+\@nlctdoc at if@usingtexht
+{%
+  \RequirePackage[xhtml,fn-in,css-in,uni-html4,utf8]{tex4ht}
+}%
+{%
+  \ifxetex
+  \else
+    \RequirePackage[T1]{fontenc}
+    \RequirePackage{cmap}
+  \fi
   \RequirePackage{fourier}
-\else
-  \RequirePackage[xhtml,fn-in,css-in,uni-html4,utf8]{tex4ht}
-\fi
+}%
 \RequirePackage{etoolbox}
 \RequirePackage{doc,dox}
 \RequirePackage{upquote}
@@ -238,7 +267,41 @@
 
 \newlength\macrowidth
 
-\ifpdf
+\@nlctdoc at if@usingtexht
+{%
+  \newenvironment{definition}[1][]{%
+    \par\HCode{<hr><div title="Definition">}#1\ttfamily\noindent
+  }{%
+    \HCode{</div><hr>}\par\noindent
+  }
+
+  \newcommand{\importantpar}[1][-3]{\importantsymbol\space}
+
+  \newenvironment{important}{%
+    \par\HCode{<div class="important" title="Important Note">}\noindent
+  }{%
+    \HCode{</div>}\par\noindent
+  }
+
+  \newenvironment{prompt}{%
+    \HCode{<spacer type=vertical size=10>}\begin{ttfamily}\obeylines\ignorespaces
+  }{%
+    \end{ttfamily}\HCode{<spacer type=vertical size=10>}\noindent
+  }
+
+  \newenvironment{display}{%
+    \HCode{<spacer type=vertical size=10>}\obeylines\ignorespaces
+  }{%
+    \HCode{<spacer type=vertical size=10>}\noindent
+  }
+
+  \newenvironment{labelledbox}[1]{%
+    \par\HCode{<hr><div>}\marginpar{#1}\noindent
+  }{%
+    \HCode{</div><hr>}\par\noindent
+  }
+}%
+{%
   \definecolor{defbackground}{rgb}{1,1,0.75}
   \newsavebox\defsbox
   \newlength\defwidth
@@ -341,42 +404,8 @@
     \noindent
     \ignorespacesafterend
   }
+}%
 
-\else
-  \newenvironment{definition}[1][]{%
-    \par\HCode{<hr><div title="Definition">}#1\ttfamily\noindent
-  }{%
-    \HCode{</div><hr>}\par\noindent
-  }
-
-  \newcommand{\importantpar}[1][-3]{\importantsymbol\space}
-
-  \newenvironment{important}{%
-    \par\HCode{<div class="important" title="Important Note">}\noindent
-  }{%
-    \HCode{</div>}\par\noindent
-  }
-
-  \newenvironment{prompt}{%
-    \HCode{<spacer type=vertical size=10>}\begin{ttfamily}\obeylines\ignorespaces
-  }{%
-    \end{ttfamily}\HCode{<spacer type=vertical size=10>}\noindent
-  }
-
-  \newenvironment{display}{%
-    \HCode{<spacer type=vertical size=10>}\obeylines\ignorespaces
-  }{%
-    \HCode{<spacer type=vertical size=10>}\noindent
-  }
-
-  \newenvironment{labelledbox}[1]{%
-    \par\HCode{<hr><div>}\marginpar{#1}\noindent
-  }{%
-    \HCode{</div><hr>}\par\noindent
-  }
-
-\fi
-
 \newcommand*{\appfmt}[1]{\texttt{#1}}
 \DeclareRobustCommand*{\iapp}[1]{\index{#1=\appfmt{#1}\encapchar hyperpage}}
 \DeclareRobustCommand*{\app}[1]{\appfmt{#1}\iapp{#1}}
@@ -510,36 +539,8 @@
   \begin{center}\rule{2in}{1pt}\end{center}%
 }
 
-\ifpdf
-  \newcommand*{\toTop}{}
-  \newcommand*{\sectionref}[1]{Section~\ref{#1}}
-  \newcommand*{\qtdocref}[2]{\qt{#1} (\href{#2.pdf}{#2.pdf})}
-  \newcommand*{\docref}[2]{#1 (\href{#2.pdf}{#2.pdf})}
-  \newcommand*{\urlref}[2]{\url{#1}}
-  \newcommand*{\urlfootref}[2]{#2\footnote{\url{#1}}}
-  \newcommand*{\submenu}[1]{\,$\to$\,\menu{#1}}
-
-  % \altdocref{text}{pdf}{html}
-  \newcommand*{\altdocref}[3]{#1 (\href{#2.pdf}{#2.pdf})}
-
-  % \xrsectionref{label}{html file}{html title}
-  \newcommand*{\xrsectionref}[3]{Section~\ref{#1}}
-
-  \newcommand*{\listofexamples}{%
-    \@ifundefined{chapter}
-    {%
-      \section*{List of Examples}%
-    }%
-    {%
-      \chapter*{List of Examples}%
-    }
-    \@starttoc{loe}%
-  }
-
-  \newcommand{\aargh}{\grimace}
-
-\else
-
+\@nlctdoc at if@usingtexht
+{%
   \edef\aargh{\noexpand\HCode{\string&\string#x1F631;}}
 
   \newcommand*{\toTop}{\par\noindent\hyperlink{top}{Top}}
@@ -613,10 +614,37 @@
 
   \renewcommand*{\meta}[1]{%
    \nlcthlangle\emph{#1}\nlcthrangle}
+}%
+{%
+  \newcommand*{\toTop}{}
+  \newcommand*{\sectionref}[1]{Section~\ref{#1}}
+  \newcommand*{\qtdocref}[2]{\qt{#1} (\href{#2.pdf}{#2.pdf})}
+  \newcommand*{\docref}[2]{#1 (\href{#2.pdf}{#2.pdf})}
+  \newcommand*{\urlref}[2]{\url{#1}}
+  \newcommand*{\urlfootref}[2]{#2\footnote{\url{#1}}}
+  \newcommand*{\submenu}[1]{\,$\to$\,\menu{#1}}
 
+  % \altdocref{text}{pdf}{html}
+  \newcommand*{\altdocref}[3]{#1 (\href{#2.pdf}{#2.pdf})}
 
-\fi
+  % \xrsectionref{label}{html file}{html title}
+  \newcommand*{\xrsectionref}[3]{Section~\ref{#1}}
 
+  \newcommand*{\listofexamples}{%
+    \@ifundefined{chapter}
+    {%
+      \section*{List of Examples}%
+    }%
+    {%
+      \chapter*{List of Examples}%
+    }
+    \@starttoc{loe}%
+  }
+
+  \newcommand{\aargh}{\grimace}
+}%
+
+
 \AtBeginDocument{\MakeShortVerb{\|}}
 
 \endinput



More information about the tex-live-commits mailing list