summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mwcls/mwbk.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/mwcls/mwbk.cls')
-rw-r--r--Master/texmf-dist/tex/latex/mwcls/mwbk.cls74
1 files changed, 63 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/mwcls/mwbk.cls b/Master/texmf-dist/tex/latex/mwcls/mwbk.cls
index 2bb0db32ed6..302819d5056 100644
--- a/Master/texmf-dist/tex/latex/mwcls/mwbk.cls
+++ b/Master/texmf-dist/tex/latex/mwcls/mwbk.cls
@@ -8,7 +8,8 @@
%%
%% This is a generated file.
%%
-%% Copyright 2000-2009 by Marcin Woli\'nski <wolinski@gust.org.pl>
+%% Copyright 2000-2003, 2008-2009, 2017 by Woli\'nski
+%% <wolinski@gust.org.pl>
%%
%%
%% This work may be distributed and/or modified under the
@@ -21,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{mwbk}
- [2009/09/27 v0.74
+ [2017/05/13 v0.75
A LaTeX document class (MW)]
\typeout{*** Beta version. Formatting may change}
\typeout{*** in future versions of this class.}
@@ -569,6 +570,16 @@
\@ifstar
{\HeadingNumberedfalse\@dblarg{\mw@sectionx{#1}}}%
{\HeadingNumberedtrue\@dblarg{\mw@sectionx{#1}}}}
+\def\mw@step@sectioning@counter{%
+ \ifHeadingNumbered
+ \refstepcounter{\mw@HeadingType}%
+ \protected@edef\HeadingNumber{\expandafter\noexpand
+\csname the\mw@HeadingType\endcsname\relax}%
+ \else
+ \mw@hyperref@phantom{\mw@HeadingType}%
+ \let\HeadingNumber\@empty
+ \fi
+}
\def\mw@sectionx#1[#2]{%
\@dblarg{\mw@sectionxx{#1}{#2}}}
\def\mw@sectionxx#1#2[#3]#4{%
@@ -588,14 +599,6 @@
\ifnum \mw@HeadingLevel>\c@secnumdepth \HeadingNumberedfalse \fi
\if@mainmatter\else \HeadingNumberedfalse \fi
\fi
- \ifHeadingNumbered
- \refstepcounter{#1}%
- \protected@edef\HeadingNumber{\expandafter\noexpand
-\csname the#1\endcsname\relax}%
- \else
- \mw@hyperref@phantom{#1}%
- \let\HeadingNumber\@empty
- \fi
\def\HeadingRHeadText{#2}%
\def\HeadingTOCText{#3}%
\def\HeadingText{#4}%
@@ -647,6 +650,7 @@
\if\mw@HeadingBreakBefore \hrule\@height\z@\nobreak
\else \addpenalty\@secpenalty \fi
\addvspace{\csname \mw@HeadingType @preskip\endcsname}%
+ \mw@step@sectioning@counter
\bgroup\language\l@nohyphenation
\raggedright
\interlinepenalty\@M
@@ -672,6 +676,7 @@
\global\@noskipsecfalse
{\setbox\z@\lastbox}%
\clubpenalty\@M
+ \mw@step@sectioning@counter
\bgroup\language\l@nohyphenation
\normalfont\sectsettings
\csname \mw@HeadingType @head\endcsname
@@ -1010,6 +1015,49 @@
\captionsettings
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
\endgroup}
+\long\def\mw@caption@hyperref#1[#2]#3{%
+ \expandafter\ifx\csname if@capstart\expandafter\endcsname
+ \csname iftrue\endcsname
+ \global\let\@currentHref\hc@currentHref
+ \else
+ \hyper@makecurrent{\@captype}%
+ \fi
+ \@ifundefined{NR@gettitle}{%
+ \def\@currentlabelname{#2}%
+ }{%
+ \NR@gettitle{#2}%
+ }%
+ \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}%
+ }%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \captionsettings
+ \expandafter\ifx\csname if@capstart\expandafter\endcsname
+ \csname iftrue\endcsname
+ \global\@capstartfalse
+ \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
+ \else
+ \@makecaption{\csname fnum@#1\endcsname}{%
+ \ignorespaces
+ \ifHy@nesting
+ \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
+ \else
+ \Hy@raisedlink{%
+ \expandafter\hyper@@anchor\expandafter{%
+ \@currentHref
+ }{\relax}%
+ }%
+ #3%
+ \fi
+ }%
+ \fi
+ \par
+ \endgroup
+}
\long\def\@makecaption#1#2{%
\addvspace\abovecaptionskip
\bgroup\centeredlast
@@ -1226,7 +1274,11 @@
\xdef\@currentHref{#1*.\the\Hy@linkcounter}%
\Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
}%
-}{}}
+ \let\@caption\mw@caption@hyperref
+ }{%
+ \let\mw@caption@hyperref\@undefined
+ }%
+}
\def\@doendpe{\@endpetrue
\clubpenalty\@clubpenalty
\def\par{\@restorepar\everypar{}\par\@endpefalse}%