.sty's et cie.

This commit is contained in:
Frank Villaro-Dixon 2014-01-09 23:47:40 +01:00
parent df2ec0ff48
commit 3a586a8dcd
6 changed files with 1065 additions and 22 deletions

View file

@ -1,5 +1,4 @@
#!/bin/bash
set -x
#ftpfct : Fucking ThinkPad FanConTrol
# Yep, fancontrol works shit on my machine (kernel fault I think), so let's use
# ACPI and "kernel controls" (from TP_smapi).

View file

@ -1,19 +0,0 @@
#!/bin/bash
while (! sudo netctl start wlan0-eduroam); do true; done
sudo killall dhcpcd
while (! sudo dhcpcd wlan0); do true; done
#sudo killall wpa_supplicant
#sudo wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &
#sleep 10
#Ugly
#sudo ifconfig wlan0 10.9.3.208 netmask 255.255.252.0
#sudo ip route add 10.9.0.0/22 dev wlan0
#sudo ip route add default via 10.9.0.1 dev wlan0

2
bashrc
View file

@ -16,8 +16,6 @@ PROMPT_COMMAND='history -a'
complete -cf sudo
complete -cf man
bind '"\t":menu-complete'
#####ON DEFINIT LES COULEURS
red='\033[31m'

View file

@ -0,0 +1,255 @@
% framed.sty v 0.8a 21-Jul-2003
% Copyright (C) 1992-2003 by Donald Arseneau
% These macros may be freely transmitted, reproduced, or modified
% provided that this notice is left intact.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create framed or shaded regions that can break across pages using
% \begin{framed} ... \end{framed} -- ordinary frame box (box at margin)
% \begin{shaded} ... \end{shaded} -- shaded background (into margin)
% ... leftbar ... -- line on left side
% \begin{MakeFramed}{settings} ... \end{MakeFramed}
% -- generic frame (for new environments)
%
% The "framed" environment puts the text into "\fbox" with the
% settings "\fboxrule=\FrameRule" and "\fboxsep=\FrameSep".
% You can change these lengths (using "\setlength") and you
% can even change the definition of "\FrameCommand" to use
% much fancier boxes.
%
% In fact, the "shaded" environment just redefines "\FrameCommand"
% to use "\colorbox{shadecolor}" (and you have to define the
% color "shadecolor": \newcolor{shadecolor}...).
%
% A page break is allowed, and even encouraged, before the framed
% environment. If you want to attach some text (a box title) to the
% frame, then the text should be inserted by \FrameCommand
%
% The contents of the framed regions are restricted:
% Floats, footnotes, marginpars and head-line entries will be lost.
% (Some of these may be handled in a later version.)
% This package will not work with the page breaking of multicol.sty,
% or other systems that perform column-balancing.
%
% The MakeFramed environment does the work. Its "settings" argument
% should contain any adjustments to the text width (applied to \hsize,
% and using the "\width" of the frame itself) as well as a `restore'
% command -- \@parboxrestore or \FrameRestore or something similar.
%
% Expert commands:
% \MakeFramed, \endMakeFramed: the "MakeFramed" environment
% \FrameCommand: command to draw the frame around its argument
% \FrameRestore: restore some text settings, but fewer than \@parboxrestore
% \FrameRule: length register; \fboxrule for default "framed".
% \FrameSep: length register; \fboxsep for default "framed".
% \FrameHeightAdjust: macro; height of frame above baseline at top of page
%
% This is still a `pre-production' version because I can think of many
% features/improvements that should be made. Nevertheless, starting
% with version 0.5 it should be bug-free.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesPackage{framed}[2003/07/21 v 0.8a:
framed or shaded text with page breaks]
\newenvironment{framed}% using default \FrameCommand
{\MakeFramed {\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}
\newenvironment{shaded}{%
\def\FrameCommand{\colorbox{shadecolor}}%
\MakeFramed {\FrameRestore}}%
{\endMakeFramed}
\newenvironment{leftbar}{%
\def\FrameCommand{\vrule width 3pt \hspace{10pt}}%
\MakeFramed {\advance\hsize-\width \FrameRestore}}%
{\endMakeFramed}
\chardef\FrameRestore=\catcode`\| % for debug
\catcode`\|=\catcode`\% % (debug: insert space after backslash)
\def\MakeFramed#1{\par
% measure added width and height; call result \width and \height
\setbox\z@\vbox{\vskip-1in \hbox{\hskip-1in
\FrameCommand{\hbox{\vrule \@height .7in \@depth.3in \@width 1in}}}%
\vskip\z@skip}%
\def\width{\wd\z@}\def\height{\ht\z@}%
\edef\fb@frw{\the\width}\edef\fb@frh{\the\height}%
% insert pre-penalties and skips
\begingroup
\skip@\lastskip
\if@nobreak\else
\penalty9999 % updates \page parameters
\ifdim\pagefilstretch=\z@ \ifdim\pagefillstretch=\z@
\edef\@tempa{\the\skip@}%
\ifx\@tempa\zero@glue \penalty-30
\else \vskip-\skip@ \penalty-30 \vskip\skip@
\fi\fi\fi
\penalty\z@
% Give a stretchy breakpoint that will always be taken in preference
% to the \penalty 9999 used to update page parameters. The cube root
% of 10000/100 indicates a multiplier of 0.21545, but the maximum
% calculated badness is really 8192, not 10000, so the multiplier
% is 0.2301.
\advance\skip@ \z@ plus-.5\baselineskip
\advance\skip@ \z@ plus-.231\height
\advance\skip@ \z@ plus-.231\skip@
\advance\skip@ \z@ plus-.231\topsep
\vskip-\skip@ \penalty 1800 \vskip\skip@
\fi
\addvspace{\topsep}%
\endgroup
% clear out pending page break
\penalty\@M \vskip 2\baselineskip \vskip\height
\penalty9999 \vskip -2\baselineskip \vskip-\height
\penalty9999 % updates \pagetotal
|\message{After clearout, \pagetotal=\the\pagetotal, \pagegoal=\the\pagegoal. }%
\fb@adjheight
\setbox\@tempboxa\vbox\bgroup
#1% Modifications to \hsize (can use \width and \height)
\textwidth\hsize \columnwidth\hsize
}
\def\endMakeFramed{\par
\kern\z@ \penalty-100 % put depth into height
\egroup
\begingroup \put@frame \endgroup
}
% \put@frame takes the contents of \@tempboxa and puts all, or a piece,
% of it on the page with a frame (\FrameCommand). It recurses until
% all of \@tempboxa has been used up. (\@tempboxa must have zero depth.)
\def\put@frame{\relax
\ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi
| \message{=============== Entering putframe ====================^^J
| \pagegoal=\the\pagegoal, \pagetotal=\the\pagetotal. }%
\ifinner \else
\dimen@\pagegoal \advance\dimen@-\pagetotal % natural space left on page
\ifdim\dimen@<2\baselineskip
| \message{Page has only \the\dimen@\space room left; eject. }%
\eject \fb@adjheight \put@frame
\else % there's appreciable room left on the page
| \message{\string\pagetotal=\the\pagetotal,
| \string\pagegoal=\the\pagegoal,
| \string\pagestretch=\the\pagestretch,
| \string\pageshrink=\the\pageshrink,
| \string\fb@frh=\fb@frh. \space}
| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}%
\begingroup % temporarily set \dimen@ to be...
\advance\dimen@.8\pageshrink % maximum space available on page
\advance\dimen@-\fb@frh\relax % space available for frame's contents
\expandafter\endgroup
% restore \dimen@ to real room left on page
\ifdim\dimen@>\ht\@tempboxa % whole box does fit
| \message{fits in \the\dimen@. }%
\else % box must be split
| \message{must be split to fit in \the\dimen@. }%
\setbox\@tempboxa\vbox{% simulate frame and flexiblity of the page:
\vskip \fb@frh \@plus\pagestretch \@minus.8\pageshrink
\kern137sp\kern-137sp\penalty-30
\unvbox\@tempboxa}%
\edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth \splittopskip\the\splittopskip}%
\boxmaxdepth\z@ \splittopskip\z@
\setbox\tw@\vsplit\@tempboxa to\dimen@
\setbox\tw@\vbox{\unvbox\tw@}% natural-sized
| \message{Box of size \the\ht\@tempboxa\space split to \the\dimen@.
| Natural height of split box is \the\ht\tw@. }%
% If the split-to size > (\vsize-\topskip), then set box to full size
\begingroup
\advance\dimen@\topskip
\expandafter\endgroup
\ifdim\dimen@>\pagegoal
| \message{Frame is big -- Use up the full column. }%
\dimen@ii\pagegoal
\advance\dimen@ii -\topskip
\advance\dimen@ii \FrameHeightAdjust\relax
\else % suspect this is wrong:
% If the split-to size > feasible room_on_page, rebox it smaller.
\advance\dimen@.8\pageshrink
\ifdim\ht\tw@>\dimen@
| \message{Box too tall; rebox it to \the\dimen@. }%
\dimen@ii\dimen@
\else % use natural size
\dimen@ii\ht\tw@
\fi
\fi
% Re-box contents to desired size \dimen@ii
\advance\dimen@ii -\fb@frh
\setbox\tw@\vbox to\dimen@ii \bgroup
% remove simulated frame and page flexibility:
\vskip -\fb@frh \@plus-\pagestretch \@minus-.8\pageshrink
\unvbox\tw@ \unpenalty\unpenalty
\ifdim\lastkern=-137sp % whole box went to next page
| \message{box split at beginning! }%
\egroup \fb@resto@set \eject % (\vskip for frame size was discarded)
\fb@adjheight
\else %
\egroup \fb@resto@set
\ifvoid\@tempboxa % it all fit after all
| \message{box split at end! }%
\setbox\@tempboxa\box\tw@
\else % it really did split
| \message{box split as expected. Its reboxed height is \the\ht\tw@. }%
\ifdim\wd\tw@>\z@
\centerline{\FrameCommand{\box\tw@}}% ??? \centerline bad idea
\else
| \message{Zero width means likely blank. Don't frame it (guess)}%
\box\tw@
\fi
\hrule \@height\z@
\eject
\fb@adjheight
\put@frame
\fi\fi\fi\fi\fi
\ifvoid\@tempboxa\else
\centerline{\FrameCommand{\box\@tempboxa}}%
\nointerlineskip \null %{\showoutput \showlists}
\penalty-30 \vskip\topsep
\fi}
\def\fb@adjheight{%
\vbox to\FrameHeightAdjust{}% get proper baseline skip from above.
\penalty\@M \nointerlineskip
\vskip-\FrameHeightAdjust
\penalty\@M} % useful for tops of pages
\edef\zero@glue{\the\z@skip}
\catcode`\|=\FrameRestore
% Provide configuration commands:
\providecommand\FrameCommand{\fboxrule=\FrameRule \fboxsep=\FrameSep \fbox}
\@ifundefined{FrameRule}{\newdimen\FrameRule \FrameRule=\fboxrule}{}
\@ifundefined{FrameSep} {\newdimen\FrameSep \FrameSep =3\fboxsep}{}
% Height of frame above first baseline when frame starts a page:
\providecommand\FrameHeightAdjust{6pt}
% \FrameRestore has parts of \@parboxrestore. See how it is used in the
% "settings" argument of \MakeFrame. Previous behavior can be restored by
% using \@parboxrestore there, or redefining:
% \makeatletter \renewcommand\FrameRestore{\@parboxrestore} \makeatother
\def\FrameRestore{%
\let\if@nobreak\iffalse
\let\if@noskipsec\iffalse
% \let\par\@@par ??
\let\-\@dischyph
\let\'\@acci\let\`\@accii\let\=\@acciii
% \parindent\z@ \parskip\z@skip Definitely omit!
% \everypar{}% ??
\linewidth\hsize
% \@totalleftmargin\z@
% \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
% \parfillskip\@flushglue \lineskip\normallineskip
% \baselineskip\normalbaselineskip
\sloppy
% \let\\\@normalcr
}
% Compatibility with previous versions (temporary!):
\let\fram@d=\MakeFramed \let\endfram@d=\endMakeFramed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -0,0 +1,74 @@
%%
%% This is file `stdclsdv.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% stdclsdv.dtx (with options: `usc')
%%
%% Copyright 1999 Peter R. Wilson
%%
%% This program is provided under the terms of the
%% LaTeX Project Public License distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
%% Author: Peter Wilson (CUA and NIST)
%% now at: peter.r.wilson@boeing.com
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{stdclsdv}[1999/01/18 v1.0 Sectional divisions]
\newif\ifSCDknownclass\SCDknownclassfalse
\newif\ifSCDpart\SCDparttrue
\newif\ifSCDchapter\SCDchapterfalse
\newif\ifSCDsection\SCDsectiontrue
\newif\ifSCDnodivs\SCDnodivsfalse
\@ifclassloaded{book}{\SCDknownclasstrue\SCDchaptertrue}{}
\@ifclassloaded{report}{\SCDknownclasstrue\SCDchaptertrue}{}
\@ifclassloaded{article}{\SCDknownclasstrue}{}
\@ifclassloaded{proc}{\SCDknownclasstrue}{}
\@ifclassloaded{ltxdoc}{\SCDknownclasstrue}{}
\@ifclassloaded{slides}{\SCDknownclasstrue
\SCDnodivstrue\SCDpartfalse\SCDsectionfalse}{}
\@ifclassloaded{letter}{\SCDknownclasstrue
\SCDnodivstrue\SCDpartfalse\SCDsectionfalse}{}
\ifSCDknownclass\else
\SCDnodivstrue
\ifx\part\undefined
\SCDpartfalse
\else
\SCDnodivsfalse
\fi
\ifx\chapter\undefined\else
\SCDchaptertrue \SCDnodivsfalse
\fi
\ifx\section\undefined
\SCDsectionfalse
\else
\SCDnodivsfalse
\fi
\fi
\newcommand{\SCDquit}{}
\newif\ifSCDSameDefinition
\def\SCDCheckCommand{\@star@or@long%
\SCDSameDefinitiontrue% changed from CheckCommand
\@SCD@check@command}
\@onlypreamble\SCDCheckCommand
\def\@SCD@check@command#1#2#{\@SCD@check@c#1{#2}}
\@onlypreamble\@SCD@check@command
\long\def\@SCD@check@c#1#2#3{%
\expandafter\let\csname\string\reserved@a\endcsname\relax
\renew@command\reserved@a#2{#3}%
\@ifundefined{\string\reserved@a}%
{\@SCD@check@eq#1\reserved@a}%
{\expandafter\@SCD@check@eq
\csname\string#1\expandafter\endcsname
\csname\string\reserved@a\endcsname}}
\@onlypreamble\@SCD@check@c
\def\@SCD@check@eq#1#2{%
\ifx#1#2\else
\SCDSameDefinitionfalse % changed from CheckCommand
\fi}
\@onlypreamble\@SCD@check@eq
\endinput
%%
%% End of file `stdclsdv.sty'.

View file

@ -0,0 +1,736 @@
%%
%% This is file `tocloft.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tocloft.dtx (with options: `usc')
%%
%% Copyright 1998, 1999 Peter R. Wilson
%%
%% This program is provided under the terms of the
%% LaTeX Project Public License distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
%% Author: Peter Wilson (CUA and NIST)
%% now at: peter.r.wilson@boeing.com
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tocloft}[2000/02/11 v1.1 parameterised ToC, etc., typesetting]
\RequirePackage{stdclsdv}
\providecommand{\PRWPackageNote}[2]{%
\GenericWarning{%
(#1)\@spaces\@spaces\@spaces\@spaces
}{%
Package #1 Note: #2%
}%
}
\providecommand{\PRWPackageNoteNoLine}[2]{%
\PRWPackageNote{#1}{#2\@gobble}%
}
\ifSCDnodivs
\PackageWarning{tocloft}%
{I don't recognize any sectional divisions so I'll do nothing}
\renewcommand{\SCDquit}{\endinput}
\fi
\SCDquit
\ifSCDknownclass\else
\PackageWarning{tocloft}%
{I don't recognize the class but I'll do my best}
\ifSCDnodivs
\PackageWarning{tocloft}%
{I don't recognize any sectional divisions so I'll do nothing}
\renewcommand{\SCDquit}{\endinput}
\else
\ifSCDchapter
\PRWPackageNoteNoLine{tocloft}{The document class has chapter divisions}
\else
\ifSCDsection
\PRWPackageNoteNoLine{tocloft}{The document class has section divisions}
\else
\PackageWarning{tocloft}%
{The class has neither chapters nor sections, so I'll do nothing}
\renewcommand{\SCDquit}{\endinput}
\fi
\fi
\fi
\fi
\SCDquit
\newif\if@cfttocbibind
\AtBeginDocument{%
\@ifpackageloaded{tocbibind}{\@cfttocbibindtrue}{\@cfttocbibindfalse}
\if@cfttocbibind
\@ifpackagelater{tocbibind}{1998/11/16}{}{%
\PackageWarning{tocloft}{%
You are using a version of the tocbibind package\MessageBreak
that is not compatible with tocloft.\MessageBreak
The results may be surprising.\MessageBreak
Consider installing the current version of tocbibind.}}
\fi
}
\newif\if@cftnctoc\@cftnctocfalse
\DeclareOption{titles}{\@cftnctoctrue}
%% \ProcessOptions\relax
\newcommand{\cftmarktoc}{%
\@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
\newcommand{\cftmarklof}{%
\@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}}
\newcommand{\cftmarklot}{%
\@mkboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
\newcommand{\@cfttocstart}{%
\ifSCDchapter
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\fi}
\newcommand{\@cfttocfinish}{%
\ifSCDchapter
\if@restonecol\twocolumn\fi
\fi}
\newcommand{\@cftdobibtoc}{%
\if@dotoctoc
\if@bibchapter
\addcontentsline{toc}{chapter}{\contentsname}
\else
\addcontentsline{toc}{\@tocextra}{\contentsname}
\fi
\fi}
\AtBeginDocument{%
\if@cftnctoc\else
\renewcommand{\tableofcontents}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\z@
\@cftmaketoctitle
\if@cfttocbibind
\@cftdobibtoc
\fi
\@starttoc{toc}%
\endgroup
\@cfttocfinish}
\fi
}
\newcommand{\@cftmaketoctitle}{%
\vspace*{\cftbeforetoctitleskip}
\interlinepenalty\@M
{\cfttoctitlefont\contentsname}{\cftaftertoctitle}
\cftmarktoc
\par\nobreak
\vskip \cftaftertoctitleskip
\@afterheading}
\newlength{\cftbeforetoctitleskip}
\newlength{\cftaftertoctitleskip}
\ifSCDchapter
\setlength{\cftbeforetoctitleskip}{50pt}
\setlength{\cftaftertoctitleskip}{40pt}
\else
\setlength{\cftbeforetoctitleskip}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\cftaftertoctitleskip}{2.3ex \@plus.2ex}
\fi
\ifSCDchapter
\newcommand{\cfttoctitlefont}{\normalfont\Huge\bfseries}
\else
\newcommand{\cfttoctitlefont}{\normalfont\Large\bfseries}
\fi
\newcommand{\cftaftertoctitle}{}
\newcommand{\cftsetpnumwidth}[1]{\renewcommand{\@pnumwidth}{#1}}
\newcommand{\cftsetrmarg}[1]{\renewcommand{\@tocrmarg}{#1}}
\newcommand{\cftdot}{.}
\newcommand{\cftdotfill}[1]{%
\leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill}
\newcommand{\cftdotsep}{4.5}
\newcommand{\cftnodots}{10000}
\newcommand{\cftparfillskip}{\parfillskip=0pt plus1fil}
\renewcommand{\numberline}[1]{%
\hb@xt@\@tempdima{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
\newcommand{\@cftbsnum}{}
\newcommand{\@cftasnum}{}
\newcommand{\@cftasnumb}{}
\newif\if@cftdopart
\ifSCDpart
\renewcommand*{\l@part}[2]{%
\@cftdopartfalse
\ifnum \c@tocdepth >-2\relax
\ifSCDchapter
\@cftdoparttrue
\fi
\ifnum \c@tocdepth >\m@ne
\ifSCDchapter\else
\@cftdoparttrue
\fi
\fi
\fi
\if@cftdopart
\ifSCDchapter
\addpenalty{-\@highpenalty}%
\else
\addpenalty\@secpenalty
\fi
\addvspace{\cftbeforepartskip}%
\@tempdima \cftpartnumwidth\relax
\let\@cftbsnum \cftpartpresnum
\let\@cftasnum \cftpartaftersnum
\let\@cftasnumb \cftpartaftersnumb
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
{\leavevmode
{\cftpartfont #1}{\cftpartleader}
{\hb@xt@\@pnumwidth{\hss {\cftpartpagefont #2}}}\cftpartafterpnum}\par
\nobreak
\ifSCDchapter
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\else
\if@compatibility
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\fi
\fi
\endgroup
\fi}
\fi
\newlength{\cftbeforepartskip}
\setlength{\cftbeforepartskip}{2.25em \@plus\p@}
\newlength{\cftpartnumwidth}
\setlength{\cftpartnumwidth}{3em}
\newcommand{\cftpartfont}{\large\bfseries}
\newcommand{\cftpartpresnum}{}
\newcommand{\cftpartaftersnum}{}
\newcommand{\cftpartaftersnumb}{}
\newcommand{\cftpartleader}{\large\bfseries\cftdotfill{\cftpartdotsep}}
\newcommand{\cftpartdotsep}{\cftnodots}
\newcommand{\cftpartpagefont}{\large\bfseries}
\newcommand{\cftpartafterpnum}{}
\ifSCDchapter
\renewcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip \cftbeforechapskip
{\leftskip \cftchapindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftchapindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftchapnumwidth\relax
\let\@cftbsnum \cftchappresnum
\let\@cftasnum \cftchapaftersnum
\let\@cftasnumb \cftchapaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftchapfont #1}\nobreak
{\cftchapleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftchappagefont #2}\cftchapafterpnum\par}%
\fi}
\fi
\newlength{\cftbeforechapskip}
\setlength{\cftbeforechapskip}{1.0em \@plus\p@}
\newlength{\cftchapindent}
\setlength{\cftchapindent}{0em}
\newlength{\cftchapnumwidth}
\setlength{\cftchapnumwidth}{1.5em}
\newcommand{\cftchapfont}{\bfseries}
\newcommand{\cftchappresnum}{}
\newcommand{\cftchapaftersnum}{}
\newcommand{\cftchapaftersnumb}{}
\newcommand{\cftchapleader}{\bfseries\cftdotfill{\cftchapdotsep}}
\newcommand{\cftchapdotsep}{\cftnodots}
\newcommand{\cftchappagefont}{\bfseries}
\newcommand{\cftchapafterpnum}{}
\renewcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\ifSCDchapter
\vskip \cftbeforesecskip
\else
\addpenalty\@secpenalty
\addvspace{\cftbeforesecskip}
\fi
{\leftskip \cftsecindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsecindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsecnumwidth\relax
\let\@cftbsnum \cftsecpresnum
\let\@cftasnum \cftsecaftersnum
\let\@cftasnumb \cftsecaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsecfont #1}\nobreak
{\cftsecleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsecpagefont #2}\cftsecafterpnum\par}%
\fi}
\newlength{\cftbeforesecskip}
\ifSCDchapter
\setlength{\cftbeforesecskip}{\z@ \@plus.2\p@}
\else
\setlength{\cftbeforesecskip}{1.0em \@plus\p@}
\fi
\newlength{\cftsecindent}
\ifSCDchapter
\setlength{\cftsecindent}{1.5em}
\else
\setlength{\cftsecindent}{0em}
\fi
\newlength{\cftsecnumwidth}
\ifSCDchapter
\setlength{\cftsecnumwidth}{2.3em}
\else
\setlength{\cftsecnumwidth}{1.5em}
\fi
\ifSCDchapter
\newcommand{\cftsecfont}{\normalfont}
\else
\newcommand{\cftsecfont}{\bfseries}
\fi
\newcommand{\cftsecpresnum}{}
\newcommand{\cftsecaftersnum}{}
\newcommand{\cftsecaftersnumb}{}
\ifSCDchapter
\newcommand{\cftsecleader}{\normalfont\cftdotfill{\cftsecdotsep}}
\else
\newcommand{\cftsecleader}{\bfseries\cftdotfill{\cftsecdotsep}}
\fi
\ifSCDchapter
\newcommand{\cftsecdotsep}{\cftdotsep}
\else
\newcommand{\cftsecdotsep}{\cftnodots}
\fi
\ifSCDchapter
\newcommand{\cftsecpagefont}{\normalfont}
\else
\newcommand{\cftsecpagefont}{\bfseries}
\fi
\newcommand{\cftsecafterpnum}{}
\renewcommand*{\l@subsection}[2]{%
\ifnum \c@tocdepth >\@ne
\vskip \cftbeforesubsecskip
{\leftskip \cftsubsecindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubsecindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubsecnumwidth\relax
\let\@cftbsnum \cftsubsecpresnum
\let\@cftasnum \cftsubsecaftersnum
\let\@cftasnumb \cftsubsecaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubsecfont #1}\nobreak
{\cftsubsecleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubsecpagefont #2}\cftsubsecafterpnum\par}%
\fi}
\newlength{\cftbeforesubsecskip}
\setlength{\cftbeforesubsecskip}{\z@ \@plus.2\p@}
\newlength{\cftsubsecindent}
\ifSCDchapter
\setlength{\cftsubsecindent}{3.8em}
\else
\setlength{\cftsubsecindent}{1.5em}
\fi
\newlength{\cftsubsecnumwidth}
\ifSCDchapter
\setlength{\cftsubsecnumwidth}{3.2em}
\else
\setlength{\cftsubsecnumwidth}{2.3em}
\fi
\newcommand{\cftsubsecfont}{\normalfont}
\newcommand{\cftsubsecpresnum}{}
\newcommand{\cftsubsecaftersnum}{}
\newcommand{\cftsubsecaftersnumb}{}
\newcommand{\cftsubsecleader}{\normalfont\cftdotfill{\cftsubsecdotsep}}
\newcommand{\cftsubsecdotsep}{\cftdotsep}
\newcommand{\cftsubsecpagefont}{\normalfont}
\newcommand{\cftsubsecafterpnum}{}
\renewcommand*{\l@subsubsection}[2]{%
\ifnum \c@tocdepth >\tw@
\vskip \cftbeforesubsubsecskip
{\leftskip \cftsubsubsecindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubsubsecindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubsubsecnumwidth\relax
\let\@cftbsnum \cftsubsubsecpresnum
\let\@cftasnum \cftsubsubsecaftersnum
\let\@cftasnumb \cftsubsubsecaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubsubsecfont #1}\nobreak
{\cftsubsubsecleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubsubsecpagefont #2}\cftsubsubsecafterpnum\par}%
\fi}
\newlength{\cftbeforesubsubsecskip}
\setlength{\cftbeforesubsubsecskip}{\z@ \@plus.2\p@}
\newlength{\cftsubsubsecindent}
\ifSCDchapter
\setlength{\cftsubsubsecindent}{7.0em}
\else
\setlength{\cftsubsubsecindent}{3.8em}
\fi
\newlength{\cftsubsubsecnumwidth}
\ifSCDchapter
\setlength{\cftsubsubsecnumwidth}{4.1em}
\else
\setlength{\cftsubsubsecnumwidth}{3.2em}
\fi
\newcommand{\cftsubsubsecfont}{\normalfont}
\newcommand{\cftsubsubsecpresnum}{}
\newcommand{\cftsubsubsecaftersnum}{}
\newcommand{\cftsubsubsecaftersnumb}{}
\newcommand{\cftsubsubsecleader}{\normalfont\cftdotfill{\cftsubsubsecdotsep}}
\newcommand{\cftsubsubsecdotsep}{\cftdotsep}
\newcommand{\cftsubsubsecpagefont}{\normalfont}
\newcommand{\cftsubsubsecafterpnum}{}
\renewcommand*{\l@paragraph}[2]{%
\ifnum \c@tocdepth >3\relax
\vskip \cftbeforeparaskip
{\leftskip \cftparaindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftparaindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftparanumwidth\relax
\let\@cftbsnum \cftparapresnum
\let\@cftasnum \cftparaaftersnum
\let\@cftasnumb \cftparaaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftparafont #1}\nobreak
{\cftparaleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftparapagefont #2}\cftparaafterpnum\par}%
\fi}
\newlength{\cftbeforeparaskip}
\setlength{\cftbeforeparaskip}{\z@ \@plus.2\p@}
\newlength{\cftparaindent}
\ifSCDchapter
\setlength{\cftparaindent}{10em}
\else
\setlength{\cftparaindent}{7.0em}
\fi
\newlength{\cftparanumwidth}
\ifSCDchapter
\setlength{\cftparanumwidth}{5em}
\else
\setlength{\cftparanumwidth}{4.1em}
\fi
\newcommand{\cftparafont}{\normalfont}
\newcommand{\cftparapresnum}{}
\newcommand{\cftparaaftersnum}{}
\newcommand{\cftparaaftersnumb}{}
\newcommand{\cftparaleader}{\normalfont\cftdotfill{\cftparadotsep}}
\newcommand{\cftparadotsep}{\cftdotsep}
\newcommand{\cftparapagefont}{\normalfont}
\newcommand{\cftparaafterpnum}{}
\renewcommand*{\l@subparagraph}[2]{%
\ifnum \c@tocdepth >4\relax
\vskip \cftbeforesubparaskip
{\leftskip \cftsubparaindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubparaindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubparanumwidth\relax
\let\@cftbsnum \cftsubparapresnum
\let\@cftasnum \cftsubparaaftersnum
\let\@cftasnumb \cftsubparaaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubparafont #1}\nobreak
{\cftsubparaleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubparapagefont #2}\cftsubparaafterpnum\par}%
\fi}
\newlength{\cftbeforesubparaskip}
\setlength{\cftbeforesubparaskip}{\z@ \@plus.2\p@}
\newlength{\cftsubparaindent}
\ifSCDchapter
\setlength{\cftsubparaindent}{12em}
\else
\setlength{\cftsubparaindent}{10em}
\fi
\newlength{\cftsubparanumwidth}
\ifSCDchapter
\setlength{\cftsubparanumwidth}{6em}
\else
\setlength{\cftsubparanumwidth}{5em}
\fi
\newcommand{\cftsubparafont}{\normalfont}
\newcommand{\cftsubparapresnum}{}
\newcommand{\cftsubparaaftersnum}{}
\newcommand{\cftsubparaaftersnumb}{}
\newcommand{\cftsubparaleader}{\normalfont\cftdotfill{\cftsubparadotsep}}
\newcommand{\cftsubparadotsep}{\cftdotsep}
\newcommand{\cftsubparapagefont}{\normalfont}
\newcommand{\cftsubparaafterpnum}{}
\newcommand{\@cftdobiblof}{%
\if@dotoclof
\if@bibchapter
\addcontentsline{toc}{chapter}{\listfigurename}
\else
\addcontentsline{toc}{\@tocextra}{\listfigurename}
\fi
\fi}
\AtBeginDocument{
\if@cftnctoc\else
\renewcommand{\listoffigures}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\z@
\@cftmakeloftitle
\if@cfttocbibind
\@cftdobiblof
\fi
\@starttoc{lof}%
\endgroup
\@cfttocfinish}
\fi
}
\newcommand{\@cftmakeloftitle}{%
\vspace*{\cftbeforeloftitleskip}
\interlinepenalty\@M
{\cftloftitlefont\listfigurename}{\cftafterloftitle}
\cftmarklof
\par\nobreak
\vskip \cftafterloftitleskip
\@afterheading}
\newlength{\cftbeforeloftitleskip}
\newlength{\cftafterloftitleskip}
\ifSCDchapter
\setlength{\cftbeforeloftitleskip}{50pt}
\setlength{\cftafterloftitleskip}{40pt}
\else
\setlength{\cftbeforeloftitleskip}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\cftafterloftitleskip}{2.3ex \@plus.2ex}
\fi
\ifSCDchapter
\newcommand{\cftloftitlefont}{\normalfont\Huge\bfseries}
\else
\newcommand{\cftloftitlefont}{\normalfont\Large\bfseries}
\fi
\newcommand{\cftafterloftitle}{}
\renewcommand*{\l@figure}[2]{%
\vskip \cftbeforefigskip
{\leftskip \cftfigindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftfigindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftfignumwidth\relax
\let\@cftbsnum \cftfigpresnum
\let\@cftasnum \cftfigaftersnum
\let\@cftasnumb \cftfigaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftfigfont #1}\nobreak
{\cftfigleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftfigpagefont #2}\cftfigafterpnum\par}%
}
\newlength{\cftbeforefigskip}
\setlength{\cftbeforefigskip}{\z@ \@plus.2\p@}
\newlength{\cftfigindent}
\setlength{\cftfigindent}{1.5em}
\newlength{\cftfignumwidth}
\setlength{\cftfignumwidth}{2.3em}
\newcommand{\cftfigfont}{\normalfont}
\newcommand{\cftfigpresnum}{}
\newcommand{\cftfigaftersnum}{}
\newcommand{\cftfigaftersnumb}{}
\newcommand{\cftfigleader}{\normalfont\cftdotfill{\cftfigdotsep}}
\newcommand{\cftfigdotsep}{\cftdotsep}
\newcommand{\cftfigpagefont}{\normalfont}
\newcommand{\cftfigafterpnum}{}
\newcommand{\@cftdobiblot}{%
\if@dotoclot
\if@bibchapter
\addcontentsline{toc}{chapter}{\listtablename}
\else
\addcontentsline{toc}{\@tocextra}{\listtablename}
\fi
\fi}
\AtBeginDocument{
\if@cftnctoc\else
\renewcommand{\listoftables}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\z@
\@cftmakelottitle
\if@cfttocbibind
\@cftdobiblot
\fi
\@starttoc{lot}%
\endgroup
\@cfttocfinish}
\fi
}
\newcommand{\@cftmakelottitle}{%
\vspace*{\cftbeforelottitleskip}
\interlinepenalty\@M
{\cftlottitlefont\listtablename}{\cftafterlottitle}
\cftmarklot
\par\nobreak
\vskip \cftafterlottitleskip
\@afterheading}
\newlength{\cftbeforelottitleskip}
\newlength{\cftafterlottitleskip}
\ifSCDchapter
\setlength{\cftbeforelottitleskip}{50pt}
\setlength{\cftafterlottitleskip}{40pt}
\else
\setlength{\cftbeforelottitleskip}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\cftafterlottitleskip}{2.3ex \@plus.2ex}
\fi
\ifSCDchapter
\newcommand{\cftlottitlefont}{\normalfont\Huge\bfseries}
\else
\newcommand{\cftlottitlefont}{\normalfont\Large\bfseries}
\fi
\newcommand{\cftafterlottitle}{}
\renewcommand*{\l@table}[2]{%
\vskip \cftbeforetabskip
{\leftskip \cfttabindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cfttabindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cfttabnumwidth\relax
\let\@cftbsnum \cfttabpresnum
\let\@cftasnum \cfttabaftersnum
\let\@cftasnumb \cfttabaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cfttabfont #1}\nobreak
{\cfttableader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cfttabpagefont #2}\cfttabafterpnum\par}%
}
\newlength{\cftbeforetabskip}
\setlength{\cftbeforetabskip}{\z@ \@plus.2\p@}
\newlength{\cfttabindent}
\setlength{\cfttabindent}{1.5em}
\newlength{\cfttabnumwidth}
\setlength{\cfttabnumwidth}{2.3em}
\newcommand{\cfttabfont}{\normalfont}
\newcommand{\cfttabpresnum}{}
\newcommand{\cfttabaftersnum}{}
\newcommand{\cfttabaftersnumb}{}
\newcommand{\cfttableader}{\normalfont\cftdotfill{\cfttabdotsep}}
\newcommand{\cfttabdotsep}{\cftdotsep}
\newcommand{\cfttabpagefont}{\normalfont}
\newcommand{\cfttabafterpnum}{}
\newcommand{\@cftl@subfig}{
\renewcommand*{\l@subfigure}[2]{%
\ifnum \c@lofdepth > 1\relax
\vskip \cftbeforesubfigskip
{\leftskip \cftsubfigindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubfigindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubfignumwidth\relax
\let\@cftbsnum \cftsubfigpresnum
\let\@cftasnum \cftsubfigaftersnum
\let\@cftasnumb \cftsubfigaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubfigfont ##1}\nobreak
{\cftsubfigleader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubfigpagefont ##2}\cftsubfigafterpnum\par}%
\fi
}
}
\newcommand{\@cftsetsubfig}{
\newlength{\cftbeforesubfigskip}
\setlength{\cftbeforesubfigskip}{\z@ \@plus.2\p@}
\newlength{\cftsubfigindent}
\setlength{\cftsubfigindent}{3.8em}
\newlength{\cftsubfignumwidth}
\setlength{\cftsubfignumwidth}{2.5em}
\newcommand{\cftsubfigfont}{\normalfont}
\newcommand{\cftsubfigpresnum}{}
\newcommand{\cftsubfigaftersnum}{}
\newcommand{\cftsubfigaftersnumb}{}
\newcommand{\cftsubfigleader}{\normalfont\cftdotfill{\cftsubfigdotsep}}
\newcommand{\cftsubfigdotsep}{\cftdotsep}
\newcommand{\cftsubfigpagefont}{\normalfont}
\newcommand{\cftsubfigafterpnum}{}
}
\newcommand{\@cftl@subtab}{
\renewcommand*{\l@subtable}[2]{%
\ifnum \c@lotdepth > 1\relax
\vskip \cftbeforesubtabskip
{\leftskip \cftsubtabindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubtabindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubtabnumwidth\relax
\let\@cftbsnum \cftsubtabpresnum
\let\@cftasnum \cftsubtabaftersnum
\let\@cftasnumb \cftsubtabaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubtabfont ##1}\nobreak
{\cftsubtableader}
\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubtabpagefont ##2}\cftsubtabafterpnum\par}%
\fi
}
}
\newcommand{\@cftsetsubtab}{
\newlength{\cftbeforesubtabskip}
\setlength{\cftbeforesubtabskip}{\z@ \@plus.2\p@}
\newlength{\cftsubtabindent}
\setlength{\cftsubtabindent}{3.8em}
\newlength{\cftsubtabnumwidth}
\setlength{\cftsubtabnumwidth}{2.5em}
\newcommand{\cftsubtabfont}{\normalfont}
\newcommand{\cftsubtabpresnum}{}
\newcommand{\cftsubtabaftersnum}{}
\newcommand{\cftsubtabaftersnumb}{}
\newcommand{\cftsubtableader}{\normalfont\cftdotfill{\cftsubtabdotsep}}
\newcommand{\cftsubtabdotsep}{\cftdotsep}
\newcommand{\cftsubtabpagefont}{\normalfont}
\newcommand{\cftsubtabafterpnum}{}
}
\DeclareOption{subfigure}{%
\@cftsetsubfig\@cftsetsubtab
\AtBeginDocument{\@cftl@subfig\@cftl@subtab}
}
\ProcessOptions\relax
\newcommand{\cftchapterprecis}[1]{%
\cftchapterprecishere{#1}
\cftchapterprecistoc{#1}}
\newcommand{\cftchapterprecishere}[1]{%
\vspace*{-2\baselineskip}
\begin{quote}\textit{#1}\end{quote}}
\newcommand{\cftchapterprecistoc}[1]{\addtocontents{toc}{%
{\leftskip \cftchapindent\relax
\advance\leftskip \cftchapnumwidth\relax
\rightskip \@tocrmarg\relax
\textit{#1}\protect\par}}}
\newcommand{\cftlocalchange}[3]{%
\addtocontents{#1}{\protect\cftsetpnumwidth{#2} \protect\cftsetrmarg{#3}}}
\newcommand{\cftaddtitleline}[4]{%
\addtocontents{#1}{\protect\contentsline{#2}{#3}{#4}}}
\newcommand{\cftaddnumtitleline}[5]{%
\addtocontents{#1}%
{\protect\contentsline{#2}{\protect\numberline{#3}{\protect\ignorespaces #4}}{#5}}}
\endinput
%%
%% End of file `tocloft.sty'.