summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/skdoc/skdoc.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/skdoc/skdoc.cls')
-rw-r--r--Master/texmf-dist/tex/latex/skdoc/skdoc.cls61
1 files changed, 46 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/skdoc/skdoc.cls b/Master/texmf-dist/tex/latex/skdoc/skdoc.cls
index d65f36b624c..11a38ca6186 100644
--- a/Master/texmf-dist/tex/latex/skdoc/skdoc.cls
+++ b/Master/texmf-dist/tex/latex/skdoc/skdoc.cls
@@ -26,7 +26,7 @@
%% and the derived filebase skdoc.cls.
\RequirePackage{expl3}
\ProvidesExplClass{skdoc}
- {2013/05/24}{1.3b}{skdoc documentation class}
+ {2013/09/23}{1.4}{skdoc documentation class}
\PassOptionsToPackage{log-declarations=false}{xparse}
\LoadClass[ DIV7,
headings=big,
@@ -40,13 +40,15 @@
\RequirePackage[nomain,xindy,numberedsection,order=letter,
sanitize={description=false,sort=false}]{glossaries}
\RequirePackage{ydoc-code,ydoc-desc}
-\RequirePackage[british]{babel}
-\RequirePackage[english=british]{csquotes}
-\RequirePackage[font=small,labelfont=bf,textfont=it]{caption}
-\RequirePackage{scrpage2,PTSerif}
-\usepackage{sourcecodepro}
-\RequirePackage[defaultsans,osfigures,scale=0.95]{opensans}
-\RequirePackage[babel]{microtype}
+\RequirePackage{scrpage2}
+\AtEndOfClass{%
+ \RequirePackage[\skdoc@babel]{babel}
+ \RequirePackage[english=british]{csquotes}
+ \RequirePackage[font=small,labelfont=bf,textfont=it]{caption}
+ \RequirePackage{PTSerif,sourcecodepro}
+ \RequirePackage[defaultsans,osfigures,scale=0.95]{opensans}
+ \RequirePackage[babel]{microtype}
+}
\msg_new:nnn{skdoc}{key-exists}{File~key~"#1"~already~declared!}
\msg_new:nnn{skdoc}{key-nexists}{File~key~"#1"~hasn't~been~declared!}
\msg_new:nnn{skdoc}{wrote-file}{Writing~things~to~file~"#1".}
@@ -83,6 +85,7 @@
prefix=skdoc@
}
\DeclareStringOption{load}[\jobname]
+\DeclareStringOption[british]{babel}
\DeclareBoolOption[true]{highlight}
\ProcessKeyvalOptions*
\IfStrEq{\skdoc@load}{}{}{%
@@ -734,7 +737,7 @@
}%
}{
\let\skdoc@macroname@key\@empty
- \IfBooleanTF{#1}{}{\@esphack}
+ \IfBooleanTF{#1}{}{\par\@esphack}
}
\DeclareDocumentEnvironment{environment}{smo}{%
\IfBooleanTF{#1}{}{\@bsphack}
@@ -754,13 +757,14 @@
}%
}{
\let\skdoc@macroname@key\@empty
- \IfBooleanTF{#1}{}{\@esphack}
+ \IfBooleanTF{#1}{}{\par\@esphack}
}
\DeclareDocumentEnvironment{option}{smg}{%
\IfBooleanTF{#1}{}{\@bsphack}
\index@option!{#2}
\@optionname{#2}%
\IfBooleanTF{#1}{}{
+ \vspace{\baselineskip}
\PrintEnvImplName{#2}
\IfNoValueTF{#3}{
\macro@impl@argline@noarg{(option)}
@@ -772,31 +776,33 @@
}%
}{
\let\skdoc@macroname@key\@empty
- \IfBooleanTF{#1}{}{\@esphack}
+ \IfBooleanTF{#1}{}{\par\@esphack}
}
\DeclareDocumentEnvironment{bibentry}{sm}{%
\IfBooleanTF{#1}{}{\@bsphack}
\index@bibentry!{\expandafter\@gobble\string#2}
\@bibentryname{#2}%
\IfBooleanTF{#1}{}{
+ \vspace{\baselineskip}
\PrintEnvImplName{#2}
\macro@impl@argline@noarg{(\hologoRobust{BibTeX}~entry~type)}
}%
}{
\let\skdoc@macroname@key\@empty
- \IfBooleanTF{#1}{}{\@esphack}
+ \IfBooleanTF{#1}{}{\par\@esphack}
}
\DeclareDocumentEnvironment{theme}{sm}{%
\IfBooleanTF{#1}{}{\@bsphack}
\index@theme!{#2}
\@themename{#2}%
\IfBooleanTF{#1}{}{
+ \vspace{\baselineskip}
\PrintEnvImplName{#2}
\macro@impl@argline@noarg{(theme)}
}%
}{
\let\skdoc@macroname@key\@empty
- \IfBooleanTF{#1}{}{\@esphack}
+ \IfBooleanTF{#1}{}{\par\@esphack}
}
\DeclareDocumentEnvironment{macro*}{mo}%
{\begin{macro}*{#1}[#2]}{\end{macro}}
@@ -845,6 +851,29 @@
\expandafter\macro@impl@endargs
\fi
}
+\def\macro@impl@arg@noopt#1{%
+ \macro@impl@argline{\the\macro@impl@curarg}{#1}
+ \ifnum\macro@impl@curarg<\macro@impl@argcnt\relax
+ \expandafter\macro@impl@arg
+ \else
+ \expandafter\macro@impl@endargs
+ \fi
+}
+\def\macro@impl@arg@opt#1[#2]{%
+ \macro@impl@argline{\the\macro@impl@curarg}
+ {#1\hfill\AndDefault{#1}\vspace{-\baselineskip}}
+ \ifnum\macro@impl@curarg<\macro@impl@argcnt\relax
+ \expandafter\macro@impl@arg
+ \else
+ \expandafter\macro@impl@endargs
+ \fi
+}
+\def\macro@impl@arg#1{%
+ \advance\macro@impl@curarg by\@ne\relax
+ \@ifnextchar[%]
+ {\macro@impl@arg@opt{#1}}%
+ {\macro@impl@arg@noopt{#1}}%
+}
\def\macro@impl@endargs{
\endgroup
\peek_meaning_ignore_spaces:NTF\begin
@@ -1395,8 +1424,10 @@
\csname the#1\endcsname\enskip}%
}
\g@addto@macro\@verbatim{\microtypesetup{activate=false}}
-\microtypesetup{expansion,kerning,spacing,tracking}
-\DisableLigatures{family = tt*}
+\AtEndOfClass{%
+ \microtypesetup{expansion,kerning,spacing,tracking}%
+ \DisableLigatures{family = tt*}%
+}
\AtBeginDocument{
\ifdefined\defbibheading
\defbibheading{bibliography}[\bibname]{\section{#1}}