From ef2daad7570cb7c9cbc5cd78a02103faff163363 Mon Sep 17 00:00:00 2001 From: "taha@asks2" Date: Sun, 24 Sep 2023 18:49:47 +0200 Subject: [PATCH] Moved caption package to document (what was it doing here in the first place?). + simply removed the \@makecaption low-level definitions as they were interfering with our ability to use \captionsetup{...} inside the mdframed environment (the low-level definitions always ended up overriding any local captionsetup). I don't see much point to these low-level definitions, they can be fairly well replicated with captionsetup anyway. --- LuaUUThesis.cls | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/LuaUUThesis.cls b/LuaUUThesis.cls index a3b84b9..951134f 100644 --- a/LuaUUThesis.cls +++ b/LuaUUThesis.cls @@ -161,9 +161,6 @@ \DeclareOption{openright}{ \@UU@openrighttrue } \PassOptionsToPackage{figuresright}{rotating} -% added compatibility=false to make it work together with subcaption -% https://tex.stackexchange.com/questions/31906/subcaption-package-compatibility-issue#31927 -\PassOptionsToPackage{font=small,labelfont=bf,nooneline,textfont=it,compatibility=false}{caption} \ProcessOptions @@ -614,48 +611,6 @@ \setlength{\abovecaptionskip}{3pt plus 2pt} \setlength{\belowcaptionskip}{0pt plus 42pt} -\AtBeginDocument{ - \def\@caption#1[#2]#3{% - \par % - \addcontentsline {\csname ext@#1\endcsname }{#1}{\protect \numberline {\csname the#1\endcsname }{\ignorespaces #2}}% - \begingroup % - \@parboxrestore % - \if@minipage % - \@setminipage % - \fi % - \normalsize % - \@makecaption{\csname fnum@#1\endcsname }{\ignorespaces #3}% - \par % - \endgroup - } - - \def\@makecaption@table#1#2{% - \addvspace{\belowcaptionskip}% - %\sbox\@tempboxa{{\bf #1.} #2}% - \small{\bf #1.} {\it #2}\par% - \addvspace{\abovecaptionskip}% - } - - \def\@makecaption@default#1#2{% - \addvspace{\abovecaptionskip}% - \sbox\@tempboxa{{\it #1.} #2}% - \ifdim \wd\@tempboxa>\hsize% - \small{\it #1.} #2\par% - \else % - \global \@minipagefalse \hb@xt@ \hsize {\hfil \box \@tempboxa \hfil }% - \fi % - \addvspace{\belowcaptionskip}% - } - - \renewcommand{\@makecaption}[2]{% - \expandafter\let\expandafter\hej\csname @makecaption@\@captype\endcsname% - \expandafter\ifx\hej\relax% - \let\hej\@makecaption@default% - \fi% - \hej{#1}{#2}% - } -} - % ============================================ % Package fixes @@ -751,6 +706,7 @@ }{\providecommand{\phantomsection}{}} } + % ============================================ % Table of contents % ============================================