Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 60.62 KB | None | 0 0
  1. \ProvidesClass{studentlitteratur}[2014/10/05 v1.6]
  2. \NeedsTeXFormat{LaTeX2e}[2001/01/01]
  3. %
  4. \newif\if@stdl@colorcmyk \@stdl@colorcmykfalse
  5. \newif\if@stdl@hasparts \@stdl@haspartstrue
  6. \newif\if@stdl@english \@stdl@englishfalse
  7. \newif\if@stdl@fleqn \@stdl@fleqntrue
  8. \newif\if@stdl@normalis \@stdl@normalistrue
  9. %
  10. % Options
  11. %
  12. \DeclareOption{cmyk}{\@stdl@colorcmyktrue}
  13. \DeclareOption{gray}{\@stdl@colorcmykfalse}
  14. \DeclareOption{grey}{\@stdl@colorcmykfalse}
  15. \DeclareOption{draft}{\PassOptionsToClass{draft}{memoir}}
  16. \DeclareOption{noparts}{\@stdl@haspartsfalse}
  17. \DeclareOption{english}{\@stdl@englishtrue}
  18. \DeclareOption{centerequations}{\@stdl@fleqnfalse}
  19. \DeclareOption{170x245}{\@stdl@normalisfalse}
  20. \DeclareOption{155x223}{\@stdl@normalistrue}
  21. \DeclareOption*{\PackageWarning{studentlitteratur}{Unknown
  22.    `\CurrentOption'}}
  23. \ProcessOptions\relax
  24. %
  25. %
  26. \if@stdl@fleqn
  27. \LoadClass[a4paper,11pt,twoside,fleqn,showtrims]{memoir}
  28. \else
  29. \LoadClass[a4paper,11pt,twoside,showtrims]{memoir}
  30. \fi
  31. \RequirePackage{url}
  32. \urlstyle{same}
  33. \RequirePackage{textcomp}
  34. % Load babel with swedish or english as the default language
  35. \if@stdl@english
  36. %\RequirePackage[swedish,english]{babel}
  37. \else
  38. \RequirePackage[english,latin,swedish]{babel}
  39. \fi
  40. %
  41. % Load xcolor with the appropriate color model (cmyk/gray)
  42. % Define a (dummy) spotcolor for twotone printing
  43. \if@stdl@colorcmyk
  44. \RequirePackage[cmyk]{xcolor}
  45. \definecolor{spotcolor}{cmyk}{1,0,0,0}
  46. \else
  47. \RequirePackage[gray]{xcolor}
  48. \definecolor{spotcolor}{gray}{0}
  49. \fi
  50. % Load the rest of the required packages
  51. \RequirePackage{graphicx}
  52. \if@stdl@fleqn
  53. \RequirePackage[fleqn]{amsmath}
  54. \else
  55. \RequirePackage{amsmath}
  56. \fi
  57. \RequirePackage{amssymb}
  58. \RequirePackage[babel]{microtype}
  59. \RequirePackage[medfamily,textosf,mathlf,mnsy,amsbb,mixedgreek,minionint,openg,footnotefigures]{MinionPro}
  60. \RequirePackage{MnSymbol,pifont}
  61. \RequirePackage[onlytext,medfamily,osf]{MyriadPro}
  62. \RequirePackage{tikz}
  63. \RequirePackage[overload]{textcase}
  64. \RequirePackage{fix-cm}
  65. \RequirePackage{t1enc}
  66. \RequirePackage{pdftexcmds}
  67. \RequirePackage{xstring}
  68. \RequirePackage{wrapfig}
  69. %\RequirePackage[thmmarks,amsmath]{ntheorem}
  70. \RequirePackage[framemethod=TikZ]{mdframed}
  71. \RequirePackage{icomma}
  72. \RequirePackage{varwidth}
  73. \RequirePackage{etoolbox}
  74. \RequirePackage{tabu}
  75. \RequirePackage{colortbl}
  76. \RequirePackage{ragged2e}
  77. %
  78. % Setup siunitx
  79. %
  80. \RequirePackage{siunitx}
  81. \if@stdl@english
  82. \sisetup{%
  83.   detect-family = true,
  84.   detect-inline-family = text,
  85.   detect-display-math = true,
  86.   output-decimal-marker = {.},
  87.  group-digits = integer,
  88.  group-separator = {\;},
  89.  group-four-digits = false,
  90.  range-phrase = --,
  91.  list-separator = {; },
  92.  list-final-separator = { and },
  93.  separate-uncertainty
  94. }
  95. \else
  96. \sisetup{%
  97.   detect-family = true,
  98.   detect-inline-family = text,
  99.   detect-display-math = true,
  100.   output-decimal-marker = {,},
  101.  group-digits = integer,
  102.  group-separator = {\;},
  103.  group-four-digits = true,
  104.  range-phrase = --,
  105.  list-separator = {; },
  106.  list-final-separator = { och },
  107.  separate-uncertainty
  108. }
  109. \fi
  110. %
  111. % Setup the fixed width font
  112. %
  113. \renewcommand{\ttdefault}{pcr}
  114. %
  115. % Define colors for background and headers
  116. %
  117. \newcommand{\colpartbg}{spotcolor!10}   % Also used in TOC
  118. \newcommand{\colchapbg}{spotcolor!10}
  119. \newcommand{\colfancyhead}{spotcolor!25}
  120. \newcommand{\colfancybox}{spotcolor!5}
  121. \newcommand{\colplainbox}{spotcolor!10}
  122. \newcommand{\colsideline}{black!50}
  123. \newcommand{\colpart}{black}
  124. \newcommand{\colchapter}{black}
  125. \newcommand{\colsection}{black}
  126. \newcommand{\colsubsection}{spotcolor}
  127. \newcommand{\colsubsubsection}{black}
  128. \newcommand{\colsubsubsubsection}{black}
  129. \newcommand{\colparagraph}{black}
  130. \newcommand{\coltablehead}{spotcolor!10}
  131. % Courier is not available in light, substitute
  132. % medium weight silently
  133. %
  134. \DeclareFontFamily{T1}{pcr}{\hyphenchar \font\m@ne}
  135.  
  136. \DeclareFontShape{T1}{pcr}{m}{n}{<-> pcrr8t}{}
  137. \DeclareFontShape{T1}{pcr}{m}{sc}{<-> pcrrc8t}{}
  138. \DeclareFontShape{T1}{pcr}{m}{sl}{<-> pcrro8t}{}
  139. \DeclareFontShape{T1}{pcr}{b}{n}{<-> pcrb8t}{}
  140. \DeclareFontShape{T1}{pcr}{b}{sc}{<-> pcrbc8t}{}
  141. \DeclareFontShape{T1}{pcr}{b}{sl}{<-> pcrbo8t}{}
  142.  
  143. \DeclareFontShape{T1}{pcr}{m}{it}{<->ssub * pcr/m/sl}{}
  144. \DeclareFontShape{T1}{pcr}{bx}{n}{<->ssub * pcr/b/n}{}
  145. \DeclareFontShape{T1}{pcr}{bx}{sc}{<->ssub * pcr/b/sc}{}
  146. \DeclareFontShape{T1}{pcr}{bx}{sl}{<->ssub * pcr/b/sl}{}
  147. \DeclareFontShape{T1}{pcr}{b}{it}{<->ssub * pcr/b/sl}{}
  148. \DeclareFontShape{T1}{pcr}{bx}{it}{<->ssub * pcr/b/it}{}
  149. \DeclareFontShape{T1}{pcr}{l}{n}{ <->ssub * pcr/m/n}{}
  150. \DeclareFontShape{T1}{pcr}{l}{it}{ <->ssub * pcr/m/sl}{}
  151. \DeclareFontShape{T1}{pcr}{l}{sl}{ <->ssub * pcr/m/sl}{}
  152. \DeclareFontShape{T1}{pcr}{l}{sc}{ <->ssub * pcr/m/sc}{}
  153. %
  154. % Add extra spacing before :;!?
  155. % (as recommended by Hellmark, typografisk handbok)
  156. %
  157. \DeclareMicrotypeSet{standard}{%
  158.   encoding = {OT1,T1,LY1},
  159.  family = {rm*, sf*}
  160. }
  161. \if@stdl@english
  162. \else
  163. \SetExtraKerning
  164.   [ name     = swedish-default,
  165.     context  = swedish,
  166.     unit     = space   ]
  167.   { encoding = {T1,LY1} }
  168.   {
  169.     :  = {200, },
  170.     ;  = {200, },
  171.     !  = {200, },
  172.     ?  = {200, }
  173.   }
  174. \DeclareMicrotypeBabelHook{swedish}{kerning=swedish, spacing=}
  175. \fi
  176. \UseMicrotypeSet[protrusion,kerning,expansion]{standard}
  177. %
  178. % Font sizes et al
  179. %
  180. \def\@listI{\leftmargin\leftmargini
  181.            \topsep \topsepi
  182.            \parsep \parsepi
  183.            \itemsep \itemsepi
  184.            \itemindent \z@
  185.            \setlength{\parfillskip}{0pt plus 1fill}
  186.           }%
  187. \if@stdl@fleqn
  188. \setlength{\mathindent}{28pt}
  189. \renewcommand{\normalsize}{%
  190.    \@setfontsize\normalsize{10.4}{14}%
  191.    \abovedisplayskip 14\p@ \@plus2\p@ \@minus6\p@%
  192.    \belowdisplayskip \abovedisplayskip%
  193.    \abovedisplayshortskip \abovedisplayskip%
  194.    \belowdisplayshortskip \abovedisplayskip%
  195.    \let\@listi\@listI}
  196. \normalsize
  197. \renewcommand{\small}{%
  198.    \@setfontsize\small{9.5}{13}%
  199.    \abovedisplayskip 13\p@ \@plus2\p@ \@minus5\p@%
  200.    \belowdisplayskip \abovedisplayskip%
  201.    \abovedisplayshortskip \abovedisplayskip%
  202.    \belowdisplayshortskip \abovedisplayskip%
  203.    \def\@listi{\leftmargin\leftmargini%
  204.                \topsep 13pt%
  205.                \parsep \z@%
  206.                \itemsep \parsep%
  207.                \itemindent \z@%
  208.                \setlength{\parfillskip}{0pt plus 1fill}%
  209.               }%
  210. }
  211. \renewcommand{\footnotesize}{%
  212.    \@setfontsize\footnotesize{8.5}{12}%
  213.    \abovedisplayskip 6\p@ \@plus2\p@ \@minus2\p@%
  214.    \abovedisplayshortskip \z@ \@plus\p@%
  215.    \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@%
  216.    \def\@listi{\leftmargin\leftmargini%
  217.                \topsep 12pt%
  218.                \parsep \z@%
  219.                \itemsep \parsep%
  220.                \itemindent \z@%
  221.                \setlength{\parfillskip}{0pt plus 1fill}%
  222.              }%
  223.    \belowdisplayskip \abovedisplayskip%
  224. }
  225. \else
  226. \renewcommand{\normalsize}{%
  227.    \@setfontsize\normalsize{10.4}{14}%
  228.    \abovedisplayskip 7\p@ \@plus2\p@ \@minus2\p@%
  229.    \belowdisplayskip \abovedisplayskip%
  230.    \abovedisplayshortskip \z@ \@plus2\p@%
  231.    \belowdisplayshortskip 6\p@ \@plus2\p@ \@minus2\p@%
  232.    \let\@listi\@listI}
  233. \normalsize
  234. \renewcommand{\small}{%
  235.    \@setfontsize\small{9.5}{13}%
  236.    \abovedisplayskip 6.5\p@ \@plus2\p@ \@minus2\p@%
  237.    \belowdisplayskip \abovedisplayskip%
  238.    \abovedisplayshortskip \z@ \@plus2\p@%
  239.    \belowdisplayshortskip 5\p@ \@plus2\p@ \@minus2\p@%
  240.    \def\@listi{\leftmargin\leftmargini%
  241.                \topsep 13pt%
  242.                \parsep \z@%
  243.                \itemsep \parsep%
  244.                \itemindent \z@%
  245.                \setlength{\parfillskip}{0pt plus 1fill}%
  246.               }%
  247. }
  248. \renewcommand{\footnotesize}{%
  249.    \@setfontsize\footnotesize{8.5}{12}%
  250.    \abovedisplayskip 6\p@ \@plus2\p@ \@minus2\p@%
  251.    \abovedisplayshortskip \z@ \@plus\p@%
  252.    \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@%
  253.    \def\@listi{\leftmargin\leftmargini%
  254.                \topsep 12pt%
  255.                \parsep \z@%
  256.                \itemsep \parsep%
  257.                \itemindent \z@%
  258.                \setlength{\parfillskip}{0pt plus 1fill}%
  259.              }%
  260.    \belowdisplayskip \abovedisplayskip%
  261. }
  262. \fi
  263. \renewcommand{\miniscule}{\@setfontsize\miniscule{7.5}{9}}
  264. \renewcommand{\tiny}{\@setfontsize\tiny{6.9}{8}}
  265. \renewcommand{\scriptsize}{\@setfontsize\scriptsize{7.5}{9}}
  266. \renewcommand{\large}{\@setfontsize\large{12}{16}}
  267. \renewcommand{\Large}{\@setfontsize\Large{14}{20}}
  268. \renewcommand{\LARGE}{\@setfontsize\LARGE{17}{23}}
  269. \renewcommand{\huge}{\@setfontsize\huge{20}{24}}
  270. \renewcommand{\Huge}{\@setfontsize\Huge{24}{30}}
  271. \renewcommand{\HUGE}{\@setfontsize\Huge{28}{33}}
  272. \setlength{\onelineskip}{14pt}
  273. \setlength{\parindent}{14pt}
  274. \setlength{\parskip}{0pt}
  275. \setlength{\leftmargini}{14pt}
  276. \setlength{\leftmarginii}{14pt}
  277. \setlength{\leftmarginiii}{14pt}
  278. \setlength{\leftmarginiv}{14pt}
  279. \setlength{\leftmarginv}{14pt}
  280. \setlength{\leftmarginvi}{14pt}
  281. \newlength{\enummargini}
  282. \newlength{\enummarginii}
  283. \newlength{\enummarginiii}
  284. \newlength{\enummarginiv}
  285. \setlength{\enummargini}{0pt}
  286. \setlength{\enummarginii}{3pt}
  287. \setlength{\enummarginiii}{6pt}
  288. \setlength{\enummarginiv}{6pt}
  289. \setlength{\topsepi}{\onelineskip}
  290. \setlength{\topsepii}{0pt}
  291. \setlength{\topsepiii}{0pt}
  292. \setlength{\parsepi}{0pt}
  293. \setlength{\parsepii}{0pt}
  294. \setlength{\itemsepi}{0pt}
  295. \setlength{\labelwidth}{\leftmargini}
  296. \addtolength{\labelwidth}{-\labelsep}
  297. %
  298. % Set paper size and type area
  299. %
  300. \if@stdl@normalis
  301. \settrimmedsize{223mm}{155mm}{*}
  302. \setlength{\trimtop}{\stockheight}
  303. \addtolength{\trimtop}{-\paperheight}
  304. \setlength{\trimedge}{\stockwidth}
  305. \addtolength{\trimedge}{-\paperwidth}
  306. \settrims{0.5\trimtop}{0.5\trimedge}
  307. \setbinding{0mm}
  308. \setulmarginsandblock{20.5mm}{26.9mm}{*}
  309. \setlrmarginsandblock{26mm}{19mm}{*}
  310. \setheadfoot{5mm}{10.9mm}
  311. \setheaderspaces{*}{5.8mm}{*}
  312. \checkandfixthelayout
  313. \else
  314. \settrimmedsize{245mm}{170mm}{*}
  315. \setlength{\trimtop}{\stockheight}
  316. \addtolength{\trimtop}{-\paperheight}
  317. \setlength{\trimedge}{\stockwidth}
  318. \addtolength{\trimedge}{-\paperwidth}
  319. \settrims{0.5\trimtop}{0.5\trimedge}
  320. \setbinding{0mm}
  321. \setulmarginsandblock{20mm}{31mm}{*}
  322. \setlrmarginsandblock{19mm}{48mm}{*}
  323. \setheadfoot{13mm}{13mm}
  324. \setheaderspaces{*}{7mm}{*}
  325. \setmarginnotes{5mm}{31mm}{28pt}
  326. \renewcommand{\sideparfont}{\sffamily\fontseries{l}\fontsize{8.5}{11.5}\selectfont}
  327. \renewcommand{\sideparform}{\RaggedRight}
  328. \renewcommand{\sidebarfont}{\sffamily\fontseries{l}\fontsize{8.5}{11.5}\selectfont}
  329. \sideparmargin{outer}
  330. \sidebarmargin{outer}
  331. \setsidecaps{5mm}{31mm}
  332. \sidecapmargin{outer}
  333. \strictpagecheck
  334. \setsidecappos{t}
  335. \renewcommand{\sidecapstyle}{\RaggedRight}
  336. \checkandfixthelayout
  337. \marginparmargin{outer}
  338. \let\@stdl@marginpar\marginpar
  339. \renewcommand\marginpar[1]{\@stdl@marginpar{\sideparfont\sideparform#1}}
  340. \fi
  341. %
  342. % Define trim marks
  343. %
  344. \renewcommand*{\tmarktm}{%
  345.   \color{black}
  346.  \begin{picture}(0,0)
  347.    \unitlength 1mm
  348.    \thinlines
  349.    \put(0,10){\makebox[0pt]{\normalfont\small
  350.        \today{} -- sida~\thepage{} -- \#~\thesheetsequence}}
  351.  \end{picture}}
  352. \renewcommand*{\Ltrimpictl}{%
  353.   \begin{picture}(0,0)
  354.    \unitlength 1mm
  355.    \thinlines
  356.    \put(-2,0){\line(-1,0){9}}
  357.    \put(0,2){\line(0,1){9}}
  358.  \end{picture}}
  359. \renewcommand*{\Ltrimpictr}{%
  360.   \begin{picture}(0,0)
  361.    \unitlength 1mm
  362.    \thinlines
  363.    \put(2,0){\line(1,0){9}}
  364.    \put(0,2){\line(0,1){9}}
  365.  \end{picture}}
  366. \renewcommand*{\Ltrimpicbl}{%
  367.   \begin{picture}(0,0)
  368.    \unitlength 1mm
  369.    \thinlines
  370.    \put(-2,0){\line(-1,0){9}}
  371.    \put(0,-2){\line(0,-1){9}}
  372.  \end{picture}}
  373. \renewcommand*{\Ltrimpicbr}{%
  374.   \begin{picture}(0,0)
  375.    \unitlength 1mm
  376.    \thinlines
  377.    \put(2,0){\line(1,0){9}}
  378.    \put(0,-2){\line(0,-1){9}}
  379.  \end{picture}}
  380. \trimLmarks
  381. %
  382. % Headers and footers
  383. %
  384. \if@stdl@hasparts
  385. \makepsmarks{headings}{%
  386. \def\chaptermark##1{%
  387.   \markright{%
  388.     \ifnum \c@secnumdepth >\m@ne
  389.     \if@mainmatter
  390.     \thechapter\space
  391.     \fi
  392.     \fi
  393.     ##1}}%
  394. \def\partmark##1{\markboth{%
  395.     \partname~\thepart\hspace{0.5em} ##1}{}}%
  396. \createplainmark{toc}{both}{\contentsname}
  397. \createplainmark{lof}{both}{\listfigurename}
  398. \createplainmark{lot}{both}{\listtablename}
  399. \createplainmark{bib}{both}{\bibname}
  400. \createplainmark{index}{both}{\indexname}
  401. \createplainmark{glossary}{both}{\glossaryname}}
  402. \else
  403. \makepsmarks{headings}{%
  404.   \let\@mkboth\markboth
  405.   \def\chaptermark##1{%
  406.     \markboth{%
  407.         \ifnum \c@secnumdepth >\m@ne
  408.         \if@mainmatter
  409.         \thechapter\space
  410.         \fi
  411.         \fi
  412.         ##1}{%
  413.         \ifnum \c@secnumdepth >\m@ne
  414.         \if@mainmatter
  415.         \thechapter\space
  416.         \fi
  417.         \fi
  418.         ##1}}%
  419.   \def\tocmark{\markboth{\contentsname}{\contentsname}}%
  420.   \def\lofmark{\markboth{\listfigurename}{\listfigurename}}%
  421.   \def\lotmark{\markboth{\listtablename}{\listtablename}}%
  422.   \def\bibmark{\markboth{\bibname}{\bibname}}%
  423.   \def\indexmark{\markboth{\indexname}{\indexname}}%
  424. }
  425. \fi
  426. \newlength{\@stdl@headrulelength}
  427. \if@stdl@normalis
  428. \setlength{\@stdl@headrulelength}{\textwidth}
  429. \else
  430. \setlength{\@stdl@headrulelength}{139mm}
  431. \fi
  432. \makeheadposition{headings}{flushright}{flushleft}{flushright}{flushleft}
  433. %\makeheadfootstrut{headings}{}
  434. \makerunningwidth{headings}{\@stdl@headrulelength}
  435. \makeevenhead{headings}{\normalfont\fontsize{8.5}{11}\selectfont
  436.  \scshape\textls*[70]{\MakeLowercase{\leftmark}}}{}{}
  437. \makeoddhead{headings}{}{}{\normalfont\fontsize{8.5}{11}\selectfont
  438.  \scshape\textls*[70]{\MakeLowercase{\rightmark}}}
  439. \makeheadrule{headings}{\@stdl@headrulelength}{0.3pt}
  440. \makeoddfoot{headings}{\normalfont\fontsize{5.5}{6.5}\selectfont
  441.  \textls*[120]{\stdl@copyrightmsg}}{}{\normalsize\textls*[-18]{\thepage}}
  442. \makeevenfoot{headings}{\normalsize\textls*[-18]{\thepage}}{}{\normalfont\fontsize{5.5}{6.5}\selectfont\textls*[120]{\stdl@copyrightmsg}}
  443. \pagestyle{headings}
  444. \copypagestyle{frontheadings}{headings}
  445. \makepsmarks{frontheadings}{%
  446.   \let\@mkboth\markboth
  447.   \def\chaptermark##1{%
  448.     \markboth{##1}{##1}}%
  449.   \def\sectionmark##1{}%
  450.   \def\tocmark{\markboth{\contentsname}{\contentsname}}%
  451.   \def\lofmark{\markboth{\listfigurename}{\listfigurename}}%
  452.   \def\lotmark{\markboth{\listtablename}{\listtablename}}%
  453.   \def\bibmark{\markboth{\bibname}{\bibname}}%
  454.   \def\indexmark{\markboth{\indexname}{\indexname}}%
  455. }
  456. %
  457. % Updated header in appendices, 2013/11/20
  458. %
  459. \copypagestyle{appendixheadings}{headings}
  460. \makeevenhead{appendixheadings}{\normalfont\fontsize{8.5}{11}\selectfont
  461.  \scshape\textls*[70]{\MakeLowercase{\stdl@appendixname~\leftmark}}}{}{}
  462. \makeoddhead{appendixheadings}{}{}{\normalfont\fontsize{8.5}{11}\selectfont
  463.  \scshape\textls*[70]{\MakeLowercase{\stdl@appendixname~\rightmark}}}
  464. \makepsmarks{appendixheadings}{%
  465.   \let\@mkboth\markboth
  466.   \def\chaptermark##1{%
  467.     \markboth{%
  468.         \ifnum \c@secnumdepth >\m@ne
  469.         \if@mainmatter
  470.         \thechapter\space
  471.         \fi
  472.         \fi
  473.         ##1}{%
  474.         \ifnum \c@secnumdepth >\m@ne
  475.         \if@mainmatter
  476.         \thechapter\space
  477.         \fi
  478.         \fi
  479.         ##1}}%
  480.   \def\tocmark{\markboth{\contentsname}{\contentsname}}%
  481.   \def\lofmark{\markboth{\listfigurename}{\listfigurename}}%
  482.   \def\lotmark{\markboth{\listtablename}{\listtablename}}%
  483.   \def\bibmark{\markboth{\bibname}{\bibname}}%
  484.   \def\indexmark{\markboth{\indexname}{\indexname}}%
  485. }
  486. % Bug fix 2013/02/25. Headers in frontmatter and endmatter
  487. % were justified to the wrong side of the page
  488. \makeevenhead{frontheadings}{\normalfont\fontsize{8.5}{11}\selectfont
  489.  \scshape\textls*[70]{\MakeLowercase{\leftmark}}}{}{}
  490. \makeoddhead{frontheadings}{}{}{\normalfont\fontsize{8.5}{11}\selectfont
  491.  \scshape\textls*[70]{\MakeLowercase{\rightmark}}}
  492. %
  493. \copypagestyle{frontchapter}{frontheadings}
  494. \makeoddhead{frontchapter}{}{}{}
  495. \makeevenhead{frontchapter}{}{}{}
  496. \aliaspagestyle{part}{empty}
  497. \copypagestyle{chapter}{headings}
  498. \makeevenhead{chapter}{}{}{}
  499. \makeoddhead{chapter}{}{}{}
  500. \makeheadrule{chapter}{0pt}{0pt}
  501. \maxsecnumdepth{subsubsection}
  502. \setsecnumdepth{section}
  503. \settocdepth{subsection}
  504. %
  505. % List markers
  506. %
  507. \renewcommand{\theenumi}{\@Alph\c@enumi}
  508. \renewcommand{\theenumii}{\@arabic\c@enumii}
  509. \renewcommand{\theenumiii}{\@alph\c@enumiii}
  510. \renewcommand{\theenumiv}{\@roman\c@enumiv}
  511. \renewcommand{\labelenumi}{\theenumi}
  512. \renewcommand{\labelenumii}{\theenumii}
  513. \renewcommand{\labelenumiii}{\theenumiii)}
  514. \renewcommand{\labelenumiv}{\theenumiv}
  515. %
  516. \renewcommand{\labelitemi}{\textbullet}
  517. \renewcommand{\labelitemii}{\normalfont\bfseries \textendash}
  518. \renewcommand{\labelitemiii}{\textperiodcentered}
  519. \renewcommand{\labelitemiv}{\textasteriskcentered}
  520. %
  521. \newcommand{\ornament}[1]{\Pisymbol{MinionPro-Extra}{#1}}
  522. \newcommand{\fancypar}{\par\nopagebreak\vspace{6pt plus 1pt minus 1pt}{\centering\ornament{121}\par}\vspace{8pt plus 1pt minus 1pt}\@doendeq}
  523. %
  524. % Bibliography
  525. %
  526. \renewcommand{\prebibhook}{\pagestyle{frontheadings}\thispagestyle{frontchapter}}
  527. \renewcommand{\biblistextra}{\itemsep=\bibitemsep\raggedright}
  528. %
  529. % Fix the current page node, taking stock size into account
  530. %
  531. \usetikzlibrary{decorations.pathmorphing, calc}
  532. \newcommand\setpagenode{
  533.     % The original current page node code can be found in the file
  534.     % generic/pgf/modules/pgfmoduleshapes.code.tex
  535.     \expandafter\def\csname pgf@sh@ns@current page\endcsname{rectangle}
  536.     % Use a few low level Memoir macros to check if we are on an even or odd page.
  537.     \strictpagecheck
  538.     \checkoddpage
  539.     \ifoddpage%
  540.         \expandafter\def\csname pgf@sh@np@current page\endcsname{%
  541.           % Set the current page.south west coordinate
  542.           \def\southwest{\pgfpoint{\stockwidth-\paperwidth-\trimedge}%
  543.                                   {\stockheight-\trimtop-\paperheight}}%
  544.           % Set the current page.north east coordinate
  545.           \def\northeast{\pgfpoint{\stockwidth-\trimedge}{\stockheight-\trimtop}}%
  546.         }
  547.     \else
  548.         \expandafter\def\csname pgf@sh@np@current page\endcsname{%
  549.           \def\southwest{\pgfpoint{\trimedge}{\stockheight-\trimtop-\paperheight}}%
  550.           \def\northeast{\pgfpoint{\trimedge+\paperwidth}{\stockheight-\trimtop}}%
  551.         }
  552.     \fi
  553.     \expandafter\def\csname pgf@sh@nt@current page\endcsname{{1}{0}{0}{1}{0pt}{0pt}}
  554.    \expandafter\def\csname pgf@sh@pi@current page\endcsname{pgfpageorigin}
  555. }
  556. \AtBeginDocument{\pgfkeys{/tikz/overlay/.add code={}{\setpagenode}}}
  557. %
  558. % Title page
  559. %
  560. \if@stdl@english
  561. \newcommand{\stdl@ordinal}[1]{%
  562.   \ifnum\pdf@strcmp{#1}{1}=0 first%
  563.   \else\ifnum\pdf@strcmp{#1}{2}=0 second%
  564.   \else\ifnum\pdf@strcmp{#1}{3}=0 third%
  565.   \else\ifnum\pdf@strcmp{#1}{4}=0 fourth%
  566.   \else\ifnum\pdf@strcmp{#1}{5}=0 fifth%
  567.   \else\ifnum\pdf@strcmp{#1}{6}=0 sixth%
  568.   \else\ifnum\pdf@strcmp{#1}{7}=0 seventh%
  569.   \else\ifnum\pdf@strcmp{#1}{8}=0 eighth%
  570.   \else\ifnum\pdf@strcmp{#1}{9}=0 ninth%
  571.   \else #1%
  572.   \fi\fi\fi\fi\fi\fi\fi\fi\fi
  573. }
  574. \newcommand{\stdl@Ordinal}[1]{%
  575.   \ifnum\pdf@strcmp{#1}{1}=0 First%
  576.   \else\ifnum\pdf@strcmp{#1}{2}=0 Second%
  577.   \else\ifnum\pdf@strcmp{#1}{3}=0 Thrird%
  578.   \else\ifnum\pdf@strcmp{#1}{4}=0 Fourth%
  579.   \else\ifnum\pdf@strcmp{#1}{5}=0 Fifth%
  580.   \else\ifnum\pdf@strcmp{#1}{6}=0 Sixth%
  581.   \else\ifnum\pdf@strcmp{#1}{7}=0 Seventh%
  582.   \else\ifnum\pdf@strcmp{#1}{8}=0 Eighth%
  583.   \else\ifnum\pdf@strcmp{#1}{9}=0 Ninth%
  584.   \else #1%
  585.   \fi\fi\fi\fi\fi\fi\fi\fi\fi
  586. }
  587. \else
  588. \newcommand{\stdl@ordinal}[1]{%
  589.   \ifnum\pdf@strcmp{#1}{1}=0 f\"orsta%
  590.   \else\ifnum\pdf@strcmp{#1}{2}=0 andra%
  591.   \else\ifnum\pdf@strcmp{#1}{3}=0 tredje%
  592.   \else\ifnum\pdf@strcmp{#1}{4}=0 fj\"rde%
  593.   \else\ifnum\pdf@strcmp{#1}{5}=0 femte%
  594.   \else\ifnum\pdf@strcmp{#1}{6}=0 sj\"tte%
  595.   \else\ifnum\pdf@strcmp{#1}{7}=0 sjunde%
  596.   \else\ifnum\pdf@strcmp{#1}{8}=0 \aa{}ttonde%
  597.   \else\ifnum\pdf@strcmp{#1}{9}=0 nionde%
  598.   \else #1%
  599.   \fi\fi\fi\fi\fi\fi\fi\fi\fi
  600. }
  601. \newcommand{\stdl@Ordinal}[1]{%
  602.   \ifnum\pdf@strcmp{#1}{1}=0 F\"orsta%
  603.   \else\ifnum\pdf@strcmp{#1}{2}=0 Andra%
  604.   \else\ifnum\pdf@strcmp{#1}{3}=0 Tredje%
  605.   \else\ifnum\pdf@strcmp{#1}{4}=0 Fj\"rde%
  606.   \else\ifnum\pdf@strcmp{#1}{5}=0 Femte%
  607.   \else\ifnum\pdf@strcmp{#1}{6}=0 Sj\"tte%
  608.   \else\ifnum\pdf@strcmp{#1}{7}=0 Sjunde%
  609.   \else\ifnum\pdf@strcmp{#1}{8}=0 \AA{}ttonde%
  610.   \else\ifnum\pdf@strcmp{#1}{9}=0 Nionde%
  611.   \else #1%
  612.   \fi\fi\fi\fi\fi\fi\fi\fi\fi
  613. }
  614. \fi
  615. \newcommand*{\stdl@formatfirst}[1]{\MakeUppercase{#1}}
  616. \newcommand*{\stdl@capitalize}[1]{%
  617.   \expandafter\stdl@formatfirst\expandafter{\@car #1\@empty\@nil}%
  618.   \@cdr #1\@empty\@nil}
  619. \newcommand{\thesubtitle}{\relax}
  620. \newcommand{\subtitle}[1]{\renewcommand{\thesubtitle}{\vspace*{6mm}#1}}
  621. \newcommand{\thetranslator}{\relax}
  622. \if@stdl@english
  623. \newcommand{\stdl@translatorname}{Translator}
  624. \newcommand{\stdl@translationname}{Translation}
  625. \newcommand{\stdl@theartno}{Art.~No}
  626. \newcommand{\stdl@techreview}{Technical review}
  627. \newcommand{\stdl@coverdesign}{Cover design by}
  628. \newcommand{\stdl@coverimage}{Cover image by}
  629. \newcommand{\stdl@editionname}{Edition}
  630. \newcommand{\stdl@editionnamex}{edition}
  631. \newcommand{\stdl@and}{and}
  632. \else
  633. \newcommand{\stdl@translatorname}{\"Overs\"attare}
  634. \newcommand{\stdl@translationname}{\"Overs\"attning}
  635. \newcommand{\stdl@theartno}{Art.nr}
  636. \newcommand{\stdl@techreview}{Fackgranskning}
  637. \newcommand{\stdl@coverdesign}{Omslagslayout:}
  638. \newcommand{\stdl@coverimage}{Omslagsbild:}
  639. \newcommand{\stdl@editionname}{Upplaga}
  640. \newcommand{\stdl@editionnamex}{upplagan}
  641. \newcommand{\stdl@and}{och}
  642. \fi
  643. \newcommand{\stdl@thetranslator}{\relax}
  644. \newcommand{\translator}[1]{\renewcommand{\thetranslator}{\stdl@translatorname: #1\par}\renewcommand{\stdl@thetranslator}{\stdl@translationname:~#1\\}}
  645. \newcommand{\theedition}{\ClassError{studentlitteratur}{Command \protect\edition\space must be defined before \protect\maketitle}{Command \protect\edition\space must be defined before \protect\maketitle}}
  646. \newcommand{\edition}[1]{\renewcommand{\theedition}{#1}}
  647. %\newcommand{\theartnr}{\ClassError{studentlitteratur}{Command
  648. %\protect\artnr\space must be defined before
  649. %\protect\maketitle}{Command \protect\artnr\space must be defined
  650. %before \protect\maketitle}}
  651. \newcommand{\theartnr}{\relax}
  652. \newcommand{\artnr}[1]{\renewcommand{\theartnr}{\stdl@theartno~#1\\}}
  653. \newcommand{\theisbn}{\ClassError{studentlitteratur}{Command \protect\isbn\space must be defined before \protect\maketitle}{Command \protect\space must be defined before \protect\maketitle}}
  654. \newcommand{\isbn}[1]{\renewcommand{\theisbn}{\textls[60]{\textsc{isbn}}~#1\\}}
  655. \newcommand{\thetechnicalreview}{\relax}
  656. \newcommand{\technicalreview}[1]{\renewcommand{\thetechnicalreview}{\stdl@techreview:~#1\\}}
  657. \newcommand{\thecoverlayout}{\relax}
  658. \newcommand{\coverlayout}[1]{\renewcommand{\thecoverlayout}{\stdl@coverdesign~#1\\}}
  659. \newcommand{\thecoverimage}{\relax}
  660. \newcommand{\coverimage}[1]{\renewcommand{\thecoverimage}{\stdl@coverimage~#1\\}}
  661. \newcommand{\theprinter}{\ClassError{studentlitteratur}{Command \protect\printer\space must be defined before \protect\maketitle}{Command \protect\printer\space must be defined before \protect\maketitle}}
  662. %\newcommand{\coverlayout}[1]{\renewcommand{\theprinter}{Printed by~#1}}
  663. \newcommand{\printer}[1]{\renewcommand{\theprinter}{Printed by~#1}}
  664. \newcommand{\thecovertext}{\relax}
  665. \newcommand{\covertext}[1]{\renewcommand{\thecovertext}{#1}}
  666. \newcommand{\thecopyrightyear}{\the\year}
  667. \newcommand{\copyrightyear}[1]{\renewcommand{\thecopyrightyear}{#1}}
  668. \newcommand{\theprintyear}{\the\year}
  669. \newcommand{\printyear}[1]{\renewcommand{\theprintyear}{#1}}
  670. \newcommand{\signature}[2]{\par\vspace{\baselineskip}%
  671. \noindent\begin{minipage}{0.9\textwidth}%
  672.   \noindent#1\\[\baselineskip]\textit{#2}
  673. \end{minipage}}
  674. %
  675. \protected@xdef\stdl@authorlist{\relax}
  676. \if@stdl@english
  677. \newcommand*{\stdl@authors}[1]{\IfSubStr{#1}{ xxx }{The Authors}{The Author}}%
  678. \newcommand{\stdl@copyrightmsg}{\textcopyright~%
  679. \IfSubStr{\stdl@authorlist}{ xxx }{THE AUTHORS}{THE AUTHOR} AND STUDENTLITTERATUR}
  680. \newcommand{\overrideauthors}[1]{%
  681. \renewcommand*{\stdl@authors}[1]{#1}
  682. \renewcommand*{\stdl@copyrightmsg}{\textcopyright~%
  683. \MakeUppercase{#1} AND STUDENTLITTERATUR}}
  684. \else
  685. \newcommand*{\stdl@authors}[1]{\IfSubStr{#1}{ xxx }{F\"orfattarna}{Montathar Faraon}}%
  686. \newcommand{\stdl@copyrightmsg}{\textcopyright~%
  687. \IfSubStr{\stdl@authorlist}{ xxx }{F\"ORFATTARNA}{F\"ORFATTAREN} OCH STUDENTLITTERATUR}
  688. \newcommand{\overrideauthors}[1]{%
  689. \renewcommand*{\stdl@authors}[1]{#1}
  690. \renewcommand*{\stdl@copyrightmsg}{\textcopyright~%
  691. \MakeUppercase{#1} OCH STUDENTLITTERATUR}}
  692. \fi
  693. \renewcommand{\author}[1]{
  694.   \begingroup%
  695.   \renewcommand{\and}{ xxx }%
  696.   \protected@xdef\stdl@authorlist{#1}%
  697.   \endgroup%
  698.   \begingroup%
  699.   \renewcommand{\and}{\unskip\\}%
  700.   \protected@xdef\theauthor{#1}%
  701.   \endgroup%
  702. }
  703. %
  704. \usetikzlibrary{fit,positioning}
  705. \newsavebox{\@stdl@chapbox}
  706. \newlength{\@stdl@rulew}
  707. \if@stdl@normalis
  708. \renewcommand{\maketitle}{%
  709. \thispagestyle{empty}
  710. \noindent\hspace*{34.5mm}\begin{minipage}[t]{70mm}%
  711.   \vspace*{36pt}%
  712.   \begin{tikzpicture}[node distance=0mm,
  713.    tbox/.style={inner sep=0pt,align=left}]
  714.     \node[tbox,anchor=south west] (title) at (0,0) {%
  715.       \begin{varwidth}{70mm}
  716.        \raggedright\normalfont\fontsize{20}{24}\selectfont\thetitle
  717.      \end{varwidth}
  718.    };
  719.     \node[tbox,below=of title.south west,anchor=north west,minimum height=14pt] (subtitle) {%
  720.       \begin{varwidth}{70mm}
  721.        \raggedright\normalsize\itshape\thesubtitle
  722.      \end{varwidth}
  723.    };
  724.    \node[tbox, below=of subtitle.south west,anchor=north west, minimum height=4mm] (spacing) {};
  725.    \node[tbox,fit={(title) (subtitle) (spacing)}] (A) {};
  726.    \draw[line width=0.3pt,below=2mm] (A.south west) -- (A.south east);
  727.  \end{tikzpicture}
  728.  \par\vspace*{2mm}
  729.    \normalfont\fontsize{11}{15}\scshape\textls[100]{\MakeLowercase\theauthor}\par
  730.  \vspace*{7.5mm}
  731.  \normalfont\fontsize{10}{15}\thetranslator
  732.  \if\theedition1\relax\else
  733.  \vspace{7.5mm}
  734.  \stdl@Ordinal{\theedition}~\stdl@editionnamex\par\fi
  735.  \end{minipage}
  736.  \vfill
  737.  \noindent\hspace*{34.5mm}\begin{minipage}[t]{70mm}
  738.    \includegraphics{Studlit_inlaga_svart_08}
  739.  \end{minipage}
  740.  \newpage
  741.  \thispagestyle{empty}
  742.  \enlargethispage{10mm}
  743.  \noindent\begin{minipage}[t]{79.2mm}
  744.    \normalfont\fontsize{8.5}{13}\selectfont\RaggedRight%
  745.     \thecovertext
  746.   \end{minipage}
  747.  \vfill
  748.  \noindent\begin{minipage}[t]{79.2mm}
  749.    \setlength{\parindent}{0pt}\setlength{\parskip}{2.5mm}
  750.     \raggedright
  751.     \if@stdl@english
  752.     \tikz[baseline] {%
  753.       \draw[thick,rounded corners=2pt] (0,0) -- (3ex,0) -- (60:3ex) -- cycle;
  754.       \draw[very thick,line cap=round] (1.5ex, 0.55ex) -- (1.5ex, 1.45ex);
  755.     }
  756.     \sffamily\fontsize{8.5}{13}\selectfont\textbf{Copying prohibited}\par
  757.    \normalfont\fontsize{8.5}{13}\selectfont
  758.    All rights reserved. No part of this publication may be\\
  759.    reproduced or transmitted in any form or by any means,\\
  760.    electronic or mechanical, including photocopying, recording,\\
  761.    or any information storage and retrieval system, without\\
  762.    permission in writing from the publisher.
  763.  
  764.    The papers and inks used in this product are eco-friendly.
  765.    \else
  766.    \begin{minipage}[c]{10mm}
  767.      \includegraphics[width=8mm]{KopieringsK}
  768.    \end{minipage}
  769.    \sffamily\fontsize{8.5}{13}\selectfont\textbf{Kopieringsf\"orbud}\par
  770.    \normalfont\fontsize{8.5}{13}\selectfont
  771.    Detta verk \"ar skyddat av upphovsr\"attslagen. Kopiering,\\
  772.    ut\"over l\"arares begr\"ansade r\"att att kopiera f\"or undervisningsbruk\\
  773.    enligt Bonus Presskopias skolkopieringsavtal, \"ar f\"orbjuden. F\"or\\
  774.    information om avtalet h\"anvisas till utbildningsanordnarens\\
  775.    huvudman eller Bonus Presskopia. Testar
  776.  
  777.    Den som bryter mot lagen om upphovsr\"att kan \aa{}talas av\\
  778.    allm\"an \aa{}klagare och d\"omas till b\"oter eller f\"angelse i upp\\
  779.    till tv\aa{}\ \aa{}r samt bli skyldig att erl\"agga ers\"attning till\\
  780.    upphovsman eller r\"attsinnehavare.
  781.  
  782.    Denna trycksak \"ar milj\"oanpassad, b\aa{}de n\"ar det g\"aller\\
  783.    papper och tryckprocess. Testar.
  784.    \fi
  785.    \par
  786.    \vspace*{2.5mm}
  787.    \theartnr
  788.    \theisbn
  789.    \stdl@editionname~\theedition:1
  790.  
  791.    \textcopyright~\stdl@authors{\stdl@authorlist} \stdl@and~%
  792.     Studentlitteratur~\thecopyrightyear \\
  793.     www.studentlitteratur.se\\
  794.     Studentlitteratur AB, Lund
  795.  
  796.     \stdl@thetranslator
  797.     \thetechnicalreview
  798.     \thecoverlayout
  799.     \thecoverimage
  800.     \vspace{2.5mm}\theprinter~\theprintyear
  801.  \end{minipage}
  802.  \newpage
  803. }
  804. \else
  805. \renewcommand{\maketitle}{%
  806. \thispagestyle{empty}
  807. \begin{adjustwidth}{42mm}{-58mm}%
  808.   \noindent\hspace*{14pt}%
  809.   \begin{minipage}[t]{92mm}%
  810.   \vspace*{46pt}%
  811.   \begin{tikzpicture}[node distance=0mm,
  812.    tbox/.style={inner sep=0pt,align=left}]
  813.     \node[tbox,anchor=south west] (title) at (0,0) {%
  814.       \begin{varwidth}{86mm}
  815.        \raggedright\normalfont\fontsize{20}{24}\selectfont\thetitle
  816.      \end{varwidth}
  817.    };
  818.     \node[tbox,below=of title.south west,anchor=north west,minimum height=14pt] (subtitle) {%
  819.       \begin{varwidth}{86mm}
  820.        \raggedright\normalsize\itshape\thesubtitle
  821.      \end{varwidth}
  822.    };
  823.    \node[tbox, below=of subtitle.south west,anchor=north west, minimum height=4mm] (spacing) {};
  824.    \node[tbox,fit={(title) (subtitle) (spacing)}] (A) {};
  825.    \draw[line width=0.3pt,below=2mm] (A.south west) -- (A.south east);
  826.  \end{tikzpicture}
  827.  \par\vspace*{2mm}
  828.    \normalfont\fontsize{11}{15}\scshape\textls[100]{\MakeLowercase\theauthor}\par
  829.  \vspace*{7.5mm}
  830.  \normalfont\fontsize{10}{15}\thetranslator
  831.  \if\theedition1\relax\else
  832.  \vspace{7.5mm}
  833.  \stdl@Ordinal{\theedition}~\stdl@editionnamex\par\fi
  834.  \end{minipage}
  835.  \end{adjustwidth}
  836.  \enlargethispage{2mm}
  837.  \vfill
  838.  \noindent\hspace*{47mm}\begin{minipage}[t]{50mm}%
  839.     \includegraphics{Studlit_inlaga_svart_08}
  840.  \end{minipage}
  841.  \newpage
  842.  \thispagestyle{empty}
  843.  \enlargethispage{2mm}
  844.  \noindent\hspace*{-36mm}\begin{minipage}[t]{86mm}
  845.    \normalfont\fontsize{8.5}{13}\selectfont\RaggedRight%
  846.     \noindent\thecovertext
  847.   \end{minipage}
  848.  \vfill
  849.  \noindent\hspace*{-29mm}\begin{minipage}[t]{86mm}
  850.    \setlength{\parindent}{0pt}\setlength{\parskip}{2.5mm}
  851.     \raggedright
  852.     \if@stdl@english
  853.     \tikz[baseline] {%
  854.       \draw[thick,rounded corners=2pt] (0,0) -- (3ex,0) -- (60:3ex) -- cycle;
  855.       \draw[very thick,line cap=round] (1.5ex, 0.55ex) -- (1.5ex, 1.45ex);
  856.     }
  857.     \sffamily\fontsize{8.5}{13}\selectfont\textbf{Copying prohibited}\par
  858.    \normalfont\fontsize{8.5}{13}\selectfont
  859.    All rights reserved. No part of this publication may be\\
  860.    reproduced or transmitted in any form or by any means,\\
  861.    electronic or mechanical, including photocopying, recording,\\
  862.    or any information storage and retrieval system, without\\
  863.    permission in writing from the publisher.
  864.  
  865.    The papers and inks used in this product are eco-friendly.
  866.    \else
  867.    \begin{minipage}[c]{10mm}
  868.      \includegraphics[width=8mm]{KopieringsK}
  869.    \end{minipage}
  870.    \sffamily\fontsize{8.5}{13}\selectfont\textbf{Kopieringsf\"orbud}\par
  871.    \normalfont\fontsize{8.5}{13}\selectfont
  872.    Detta verk \"ar skyddat av upphovsr\"attslagen. Kopiering,\\
  873.    ut\"over l\"arares r\"att att kopiera f\"or undervisningsbruk enligt\\
  874.    BONUS-Presskopias avtal, \"ar f\"orbjuden. S\aa{}dant avtal tecknas\\
  875.    mellan upphovsr\"attsorganisationer  och huvudman f\"or\\
  876.    utbildningssamordnare t.ex. kommuner/universitet. F\"or\\
  877.    information om avtalet h\"anvisas till utbildningsanordnarens\\
  878.    huvudman eller BONUS-Presskopia.
  879.  
  880.    Den som bryter mot lagen om upphovsr\"att kan \aa{}talas av\\
  881.    allm\"an \aa{}klagare och d\"omas till b\"oter eller f\"angelse i upp\\
  882.    till tv\aa{}\ \aa{}r samt bli skyldig att erl\"agga ers\"attning till\\
  883.    upphovsman eller r\"attsinnehavare.
  884.  
  885.    Denna trycksak \"ar milj\"oanpassad, b\aa{}de n\"ar det g\"aller\\
  886.    papper och tryckprocess.
  887.    \fi
  888.    \par
  889.    \vspace*{2.5mm}
  890.    \theartnr
  891.    \theisbn
  892.    \stdl@editionname~\theedition:1
  893.  
  894.    \textcopyright~\stdl@authors{\stdl@authorlist} \stdl@and~%
  895.     Studentlitteratur~\thecopyrightyear \\
  896.     www.studentlitteratur.se\\
  897.     Studentlitteratur AB, Lund
  898.  
  899.     \stdl@thetranslator
  900.     \thetechnicalreview
  901.     \thecoverlayout
  902.     \thecoverimage
  903.     \vspace{2.5mm}\theprinter~\theprintyear
  904.  \end{minipage}
  905.  \newpage
  906. }
  907. \fi
  908. %
  909. % Chapter headings
  910. %
  911. \newlength{\@stdl@rulelength}
  912. \if@stdl@normalis
  913. \renewcommand{\beforepartskip}{%
  914.    \begin{tikzpicture}[remember picture, overlay]
  915.     \node at (current page.north west) {
  916.       \begin{tikzpicture}[remember picture, overlay]
  917.         \fill[\colpartbg] (-4mm,4mm) rectangle (159mm,-227mm);
  918.       \end{tikzpicture}
  919.     };
  920.   \end{tikzpicture}%
  921. }
  922. \renewcommand{\afterpartskip}{\vfill\newpage
  923.  \begin{tikzpicture}[remember picture, overlay]
  924.    \node at (current page.north west) {
  925.      \begin{tikzpicture}[remember picture, overlay]
  926.        \fill[\colpartbg] (-4mm,4mm) rectangle (159mm,-227mm);
  927.      \end{tikzpicture}
  928.    };
  929.  \end{tikzpicture}
  930. }
  931. \else
  932. \renewcommand{\beforepartskip}{%
  933.    \begin{tikzpicture}[remember picture, overlay]
  934.     \node at (current page.north west) {
  935.       \begin{tikzpicture}[remember picture, overlay]
  936.         \fill[\colpartbg] (-4mm,4mm) rectangle (174mm,-249mm);
  937.       \end{tikzpicture}
  938.     };
  939.   \end{tikzpicture}%
  940. }
  941. \renewcommand{\afterpartskip}{\vfill\newpage
  942.  \begin{tikzpicture}[remember picture, overlay]
  943.    \node at (current page.north west) {
  944.      \begin{tikzpicture}[remember picture, overlay]
  945.        \fill[\colpartbg] (-4mm,4mm) rectangle (174mm,-249mm);
  946.      \end{tikzpicture}
  947.    };
  948.  \end{tikzpicture}
  949. }
  950. \fi
  951. \renewcommand{\midpartskip}{\vspace*{2mm}}
  952. \renewcommand*{\partnamefont}{\sffamily\fontseries{l}\fontsize{9}{14}\selectfont\color{\colpart}}
  953. \renewcommand*{\partnumfont}{\sffamily\fontseries{l}\fontsize{9}{14}\selectfont}
  954. \renewcommand*{\printpartname}{\noindent\ignorespaces\hspace*{32.2mm}\partnamefont\textls*[100]{\MakeUppercase\partname}}
  955. \renewcommand*{\printpartnum}{\partnumfont\textls*[100]{\thepart}\hfill}
  956. \renewcommand*{\printpartname}{\relax}
  957. \renewcommand*{\printpartnum}{\relax}
  958. \renewcommand*{\partnamenum}{\hspace*{4pt}}
  959. \renewcommand*{\parttitlefont}{\normalfont\fontsize{20}{24}\selectfont}
  960. \if@stdl@english
  961. \newcommand{\stdl@partname}{PART}
  962. \else
  963. \newcommand{\stdl@partname}{DEL}
  964. \fi
  965. \renewcommand*{\printparttitle}[1]{
  966.  \vspace*{10mm}\begin{adjustwidth}{42mm}{-58mm}%
  967.   \noindent\hspace*{14pt}\raggedright
  968.  \parttitlefont
  969.  \begin{tikzpicture}
  970.    [node distance=2.5mm,tbox/.style={inner sep=0pt,align=left}]
  971.    \node[tbox,anchor=north west] (header) { \partnumfont\textls*[100]{\stdl@partname}\hspace*{4pt}\textls*[100]{\thepart} };
  972.    \node[tbox,below=of header.south west,anchor=north west,inner ysep=2.5mm] (title) { #1 };
  973.    \draw (title.north west) -- (title.north east);
  974.    \node[tbox,fit={(header) (title)}] (A) {};
  975.  \end{tikzpicture}
  976.  \end{adjustwidth}
  977. }
  978. % Chapter style for frontmatter
  979. \makechapterstyle{frontmatterstyle}{%
  980.   \chapterstyle{default}
  981.  \renewcommand{\chapterheadstart}{\pagestyle{frontheadings}\thispagestyle{frontchapter}}
  982.  \renewcommand{\chaptitlefont}{\sffamily\fontsize{11}{14}\selectfont}
  983.  \renewcommand{\printchaptertitle}[1]{\chaptitlefont\MakeUppercase{\textls[60]{##1}}}
  984.  \setlength{\beforechapskip}{-14pt}
  985.  \setlength{\afterchapskip}{98pt}
  986.  \renewcommand*{\afterchaptertitle}{%
  987.     \par\nobreak \vskip\afterchapskip\noindent\par}
  988. }
  989. % Chapter style for mainmatter
  990. \if@stdl@normalis
  991. \makechapterstyle{studentlitteratur}{%
  992.   \chapterstyle{default}
  993.  \renewcommand*{\chapnumfont}{\sffamily\small}
  994.  \renewcommand*{\chapnamefont}{\sffamily\small}
  995.  \renewcommand*{\chaptitlefont}{\normalfont\Huge}
  996.  \setlength{\afterchapskip}{65pt}
  997.  \setlength{\beforechapskip}{0pt}
  998.  \setlength{\midchapskip}{0pt}
  999.  \renewcommand*{\printchapternum}{}
  1000.  \renewcommand*{\printchaptername}{%
  1001.     \begin{tikzpicture}[remember picture,overlay]
  1002.      \node[shift={(-19mm,-36mm)}] at (current page.north east)
  1003.       {%
  1004.         \begin{tikzpicture}[remember picture,overlay]
  1005.          \fill[\colchapbg] (0,0) rectangle (23mm,40mm);
  1006.          \node[rotate=90,anchor=north west,inner sep=0mm] at (3mm,1.3mm)
  1007.          {
  1008.            \chapnamefont\figureversion{lining}
  1009.           \MakeUppercase{\textls*[90]{\@chapapp}\hspace{0.5em}\thechapter}
  1010.          };
  1011.        \end{tikzpicture}
  1012.      };
  1013.    \end{tikzpicture}
  1014.  }
  1015.  \renewcommand*{\printchaptertitle}[1]{%
  1016.     \savebox{\@stdl@chapbox}{%
  1017.       \begin{minipage}[b]{0.90\textwidth}
  1018.      \leavevmode\chaptitlefont\color{\colchapter} ##1
  1019.      \end{minipage}
  1020.    }
  1021.    \vbox to 0pt{\vss\usebox{\@stdl@chapbox}}%
  1022.   }
  1023.   \renewcommand*{\chapterheadstart}{\vspace*{5pt}\par\noindent}
  1024.  \renewcommand*{\afterchaptertitle}{%
  1025.     \par\nobreak\vskip\afterchapskip\noindent\par}
  1026. }
  1027. \newcommand{\chaptersubtitle}[1]{%
  1028.   \begin{tikzpicture}[remember picture, overlay]
  1029.     \node[anchor=north west,inner sep=0pt] at ($(current page.north west)+(26mm,-42mm)$) {%
  1030.       \normalsize\itshape\color{\colchapter} #1
  1031.    };
  1032.  \end{tikzpicture}
  1033.  \addcontentsline{toc}{subh}{#1}
  1034. }
  1035. \newcommand{\chapterauthor}[1]{%
  1036.   \begin{tikzpicture}[remember picture, overlay]
  1037.    \node[anchor=north west,inner sep=0pt] at ($(current page.north west)+(26mm,-48mm)$) {
  1038.      \begin{tikzpicture}[remember picture, overlay]
  1039.         \node[anchor=north west]{
  1040.         \noindent%
  1041.         \begin{minipage}[b]{80mm}
  1042.          \leavevmode\fontsize{11}{15}\selectfont
  1043.          \color{\colchapter}
  1044.          \scshape\textls*[100]{\MakeLowercase{#1}}
  1045.        \end{minipage}};
  1046.      \end{tikzpicture}
  1047.      };
  1048. \end{tikzpicture}
  1049. \addcontentsline{toc}{chapauth}{\textls[100]{\MakeLowercase{#1}}}}
  1050. \newcommand{\chapterquote}[2]{%
  1051.   \noindent\begin{minipage}[b]{80mm}
  1052.    \itshape #1\\[1.5mm]
  1053.    \normalfont\fontsize{8.7}{10}\selectfont\scshape\textls[60]{#2}
  1054.  \end{minipage}\vspace*{2\baselineskip}\par\ignorespaces\@doendeq}
  1055. \else
  1056. \makechapterstyle{studentlitteratur}{%
  1057.   \chapterstyle{default}
  1058.  \renewcommand*{\chapnumfont}{\sffamily\small}
  1059.  \renewcommand*{\chapnamefont}{\sffamily\small}
  1060.  \renewcommand*{\chaptitlefont}{\normalfont\Huge}
  1061.  \setlength{\afterchapskip}{84pt}
  1062.  \setlength{\beforechapskip}{0pt}
  1063.  \setlength{\midchapskip}{0pt}
  1064.  \renewcommand*{\printchapternum}{}
  1065.  \renewcommand*{\printchaptername}{%
  1066.     \begin{tikzpicture}[remember picture,overlay]
  1067.      \node[shift={(-12mm,-36mm)}] at (current page.north east)
  1068.       {%
  1069.         \begin{tikzpicture}[remember picture,overlay]
  1070.          \fill[\colchapbg] (0,0) rectangle (16mm,40mm);
  1071.          \node[rotate=90,anchor=north west,inner sep=0mm] at (3mm,1.3mm)
  1072.          {
  1073.            \chapnamefont\figureversion{lining}
  1074.           \MakeUppercase{\textls*[90]{\@chapapp}\hspace{0.5em}\thechapter}
  1075.          };
  1076.        \end{tikzpicture}
  1077.      };
  1078.    \end{tikzpicture}
  1079.  }
  1080.  \renewcommand*{\printchaptertitle}[1]{%
  1081.     \savebox{\@stdl@chapbox}{%
  1082.       \begin{minipage}[b]{0.90\textwidth}
  1083.      \leavevmode\chaptitlefont\color{\colchapter} ##1
  1084.      \end{minipage}
  1085.    }
  1086.    \vbox to 0pt{\vss\usebox{\@stdl@chapbox}}%
  1087.   }
  1088.   \renewcommand*{\chapterheadstart}{\vspace*{5pt}\par\noindent}
  1089.  \renewcommand*{\afterchaptertitle}{%
  1090.     \par\nobreak\vskip\afterchapskip\noindent\par}
  1091. }
  1092. \newcommand{\chaptersubtitle}[1]{%
  1093.   \begin{tikzpicture}[remember picture, overlay]
  1094.     \node[anchor=north west,inner sep=0pt] at ($(current page.north west)+(19mm,-42mm)$) {%
  1095.       \normalsize\itshape\color{\colchapter} #1
  1096.    };
  1097.  \end{tikzpicture}
  1098.  \addcontentsline{toc}{subh}{#1}
  1099. }
  1100. \newcommand{\chapterauthor}[1]{%
  1101.   \begin{tikzpicture}[remember picture, overlay]
  1102.    \node[anchor=north west,inner sep=0pt] at ($(current page.north west)+(19mm,-48mm)$) {
  1103.      \begin{tikzpicture}[remember picture, overlay]
  1104.         \node[anchor=north west]{
  1105.         \noindent%
  1106.         \begin{minipage}[b]{92mm}
  1107.          \leavevmode\fontsize{11}{15}\selectfont
  1108.          \color{\colchapter}
  1109.          \scshape\textls*[100]{\MakeLowercase{#1}}
  1110.        \end{minipage}};
  1111.      \end{tikzpicture}
  1112.      };
  1113. \end{tikzpicture}
  1114. \addcontentsline{toc}{chapauth}{\textls[100]{\MakeLowercase{#1}}}}
  1115. \newcommand{\chapterquote}[2]{%
  1116.   \noindent\begin{minipage}[b]{80mm}
  1117.    \itshape #1\\[1.5mm]
  1118.    \normalfont\fontsize{8.7}{10}\selectfont\scshape\textls[60]{#2}
  1119.  \end{minipage}\vspace*{2\baselineskip}\par\ignorespaces\@doendeq}
  1120. \fi
  1121. \chapterstyle{studentlitteratur}
  1122. %
  1123. % Section headings
  1124. %
  1125. \raggedbottomsection
  1126. %
  1127. \setsecindent{0pt}
  1128. \setbeforesecskip{-8mm plus -1mm minus -1mm}
  1129. \setaftersecskip{1.411mm plus 0.2mm minus 0.2mm}
  1130. \setsecnumformat{\csname the#1\endcsname\hspace*{0.5em}}
  1131. \setsecheadstyle{\rmfamily\mdseries\fontsize{14}{14}\selectfont\raggedright\color{\colsection}}
  1132. %
  1133. \setsubsecindent{0pt}
  1134. \setbeforesubsecskip{-24pt plus -3pt minus -2pt}
  1135. \setaftersubsecskip{4pt plus 0pt}
  1136. %\setsubsecnumformat{\csname the#1\endcsname\hspace*{0.5em}}
  1137. \setsubsecheadstyle{\sffamily\bfseries\boldmath\fontsize{9.5}{14}\selectfont\raggedright\color{\colsubsection}\MakeUppercase}
  1138. %
  1139. \setsubsubsecindent{0pt}
  1140. \setbeforesubsubsecskip{-24pt plus -3pt minus -2pt}
  1141. \setaftersubsubsecskip{4pt}
  1142. \setsubsubsecheadstyle{\sffamily\bfseries\boldmath\fontsize{9.5}{14}\selectfont\raggedright\color{\colsubsubsection}}
  1143. %
  1144. \setparaindent{0pt}
  1145. \setbeforeparaskip{-24pt plus -2pt minus -1pt}
  1146. \setafterparaskip{4pt}
  1147. \setparaheadstyle{\sffamily\fontsize{9.5}{14}\selectfont\raggedright\color{\colparagraph}}
  1148. %
  1149. \setsubparaindent{0pt}
  1150. \setbeforesubparaskip{-24pt plus -2pt minus -1pt}
  1151. \setaftersubparaskip{4pt}
  1152. \setsubparaheadstyle{\normalfont\normalsize\itshape\raggedright\color{\colparagraph}}
  1153. \raggedbottomsectionfalse
  1154. %
  1155. % Table of contents
  1156. %
  1157. \DeclareRobustCommand{\LaTeX}{%
  1158.   {%
  1159.     L%
  1160.     \setbox\z@\hbox{\check@mathfonts
  1161.      \fontsize\sf@size\z@
  1162.      \math@fontsfalse\selectfont
  1163.      A}%
  1164.     \kern-.57\wd\z@
  1165.     \sbox\tw@ T%
  1166.     \vbox to\ht\tw@{\copy\z@ \vss}%
  1167.     \kern-.2\wd\z@}%
  1168.   {%
  1169.     \ifdim\fontdimen1\font=\z@
  1170.     \else
  1171.     \count\z@=\fontdimen5\font
  1172.     \multiply\count\z@ by 64\relax
  1173.     \divide\count\z@ by\p@
  1174.     \count\tw@=\fontdimen1\font
  1175.     \multiply\count\tw@ by\count\z@
  1176.     \divide\count\tw@ by 64\relax
  1177.     \divide\count\tw@ by\tw@
  1178.     \kern-\the\count\tw@ sp\relax
  1179.     \fi}%
  1180.   \TeX}
  1181. \renewcommand{\tocheadstart}{\vspace*{-10pt}}
  1182. \renewcommand{\printtoctitle}[1]{\sffamily\fontsize{11}{14}\selectfont\textls*[80]{\MakeUppercase #1}}
  1183. \renewcommand{\aftertoctitle}{\pagestyle{frontheadings}\thispagestyle{frontchapter}\par\nobreak\vspace*{86pt}}
  1184. %
  1185. \if@stdl@english
  1186. \newcommand{\stdl@chaptername}{CHAPTER}
  1187. \newcommand{\stdl@appendixname}{APPENDIX}
  1188. \else
  1189. \newcommand{\stdl@chaptername}{KAPITEL}
  1190. \newcommand{\stdl@appendixname}{BILAGA}
  1191. \fi
  1192. % Part entries
  1193. \setlength{\cftbeforepartskip}{2.5mm plus 2pt minus 2pt}
  1194. \renewcommand{\cftpartname}{\mdseries\textls[50]{\stdl@partname}~}
  1195. \renewcommand{\cftpartformatpnum}[1]{\strut}
  1196. \renewcommand{\cftpartaftersnumb}{}
  1197. \renewcommand{\cftpartafterpnum}{\cftparfillskip}
  1198. \newcommand*{\hnode}[1]{%
  1199.     \tikz[remember picture] \node[minimum size=0pt,inner sep=0pt,outer sep=3pt] (#1) {};}
  1200. \renewcommand{\cftpartfont}{\hnode{P1}\sffamily\fontsize{8.5}{11}\bfseries\selectfont
  1201.  \tikz[remember picture,overlay] \draw (P1.north west)  [line width={14pt}, \colpartbg] -- ++($(\textwidth,0) + (1ex,0)$);%----- 0 --
  1202. }
  1203. % Chapter entries
  1204. \setlength{\cftbeforechapterskip}{5.644mm plus 3pt minus 6pt}
  1205. \renewcommand{\cftchapterfont}{\sffamily\fontsize{10.4}{16}\bfseries\selectfont}
  1206. \renewcommand{\cftchaptername}{\fontsize{8.5}{16}\mdseries\selectfont\textls[50]{\stdl@chaptername}~\figureversion{lining}}
  1207. \renewcommand{\cftchapterpagefont}{\cftchapterfont}
  1208. \renewcommand{\cftchapterformatpnum}[1]{\cftchapterfont\hspace{0.5em}#1}
  1209. \renewcommand{\cftchapterleader}{}
  1210. \renewcommand{\cftchapterafterpnum}{\cftparfillskip\par\vspace{2mm}}
  1211. \renewcommand{\cftappendixname}{\fontsize{8.5}{16}\mdseries\selectfont\textls[50]{\stdl@appendixname}~\figureversion{lining}}
  1212. \newlistentry{subh}{toc}{0}
  1213. \renewcommand{\cftsubhleader}{}
  1214. \renewcommand{\cftsubhafterpnum}{\cftparfillskip}
  1215. \renewcommand{\cftsubhformatpnum}[1]{}
  1216. \renewcommand{\cftsubhfont}{\normalfont\itshape}
  1217. \setlength{\cftbeforesubhskip}{0.6mm}
  1218. \newlistentry{chapauth}{toc}{0}
  1219. \renewcommand{\cftchapauthleader}{}
  1220. \renewcommand{\cftchapauthafterpnum}{\cftparfillskip\par\vspace{2mm}}
  1221. \renewcommand{\cftchapauthformatpnum}[1]{}
  1222. \renewcommand{\cftchapauthfont}{\normalfont\fontsize{9.5}{10}\scshape}
  1223. \setlength{\cftbeforechapauthskip}{0.8mm}
  1224. \setlength{\cftchapauthindent}{0mm}
  1225. \setlength{\cftchapauthnumwidth}{0mm}
  1226. % Section entries
  1227. \setlength{\cftsectionindent}{0mm}
  1228. \setlength{\cftsectionnumwidth}{12mm}
  1229. \setlength{\cftbeforesectionskip}{0mm}
  1230. \renewcommand{\cftsectionpagefont}{\cftsectionfont}
  1231. \renewcommand{\cftsectionformatpnum}[1]{\cftsectionfont\hspace{0.5em}#1}
  1232. \renewcommand{\cftsectionleader}{}
  1233. \renewcommand{\cftsectionafterpnum}{\cftparfillskip\nobreak}
  1234. % Subsection entries
  1235. \setlength{\cftsubsectionnumwidth}{12mm}
  1236. \setlength{\cftsubsectionindent}{6mm}
  1237. \renewcommand{\cftsubsectionpagefont}{\cftsubsectionfont}
  1238. \renewcommand{\cftsubsectionleader}{}
  1239. \renewcommand{\cftsubsectionafterpnum}{\cftparfillskip}
  1240. \renewcommand{\cftsubsectionformatpnum}[1]{\cftsubsectionfont\hspace{0.5em}#1}
  1241. \renewcommand{\cftsubsectionpresnum}{\hspace*{-6mm}}
  1242. \renewcommand{\cftsubsectionaftersnumb}{\hspace*{-6mm}}
  1243. % Subsubsection entries
  1244. \setlength{\cftsubsubsectionnumwidth}{12mm}
  1245. \setlength{\cftsubsubsectionindent}{12mm}
  1246. \renewcommand{\cftsubsubsectionpagefont}{\cftsubsectionfont}
  1247. \renewcommand{\cftsubsubsectionleader}{}
  1248. \renewcommand{\cftsubsubsectionafterpnum}{\cftparfillskip}
  1249. \renewcommand{\cftsubsubsectionformatpnum}[1]{\cftsubsectionfont\hspace{0.5em}#1}
  1250. \renewcommand{\cftsubsubsectionpresnum}{\hspace*{-12mm}}
  1251. \renewcommand{\cftsubsubsectionaftersnumb}{\hspace*{-12mm}}
  1252. %
  1253. % Custom frontmatter
  1254. %
  1255. \renewcommand{\frontmatter}{%
  1256.   \@mainmatterfalse
  1257.   \setcounter{secnumdepth}{-10}
  1258.  \@memfront@floats
  1259.  \chapterstyle{frontmatterstyle}
  1260.  \pagestyle{frontheadings}
  1261. }
  1262. \renewcommand{\mainmatter}{%
  1263.   \cleardoublepage
  1264.   \@mainmattertrue
  1265.   \chapterstyle{studentlitteratur}
  1266.  \pagestyle{headings}
  1267.  \setcounter{secnumdepth}{\value{maxsecnumdepth}}
  1268.  \@memmain@floats}
  1269. \renewcommand{\backmatter}{%
  1270.   \cleardoublepage
  1271.   \chapterstyle{frontmatterstyle}
  1272.  \pagestyle{frontheadings}
  1273.  \@mainmatterfalse
  1274.  \setcounter{secnumdepth}{-10}
  1275.  \@memback@floats}
  1276. \renewcommand{\appendix}{%
  1277.   \cleardoublepage%
  1278.   \pagestyle{appendixheadings}%
  1279.   \setcounter{chapter}{0}%
  1280.   \setcounter{section}{0}%
  1281.   \gdef\@chapapp{\appendixname}%
  1282.   \gdef\thechapter{\@Alph\c@chapter}%
  1283.   \anappendixtrue}
  1284. %
  1285. % Lists and such
  1286. %
  1287. \newcommand*{\@doendeq}{\everypar{{\setbox\z@\lastbox}\everypar{}}}
  1288. \renewenvironment{quotation}%
  1289.                {\list{}{%
  1290.                    \setlength{\leftmargin}{20pt}
  1291.                   \setlength{\rightmargin}{14pt}
  1292.                   \setlength{\itemindent}{14pt}
  1293.                   \setlength{\listparindent}{14pt}
  1294.                   \setlength{\parsep}{7pt}}
  1295.                   \fontsize{9.5}{13}\selectfont\item[]\noindent\ignorespaces%
  1296.                  }%
  1297.                {\endlist}
  1298. \AfterEndEnvironment{quotation}{\par\ignorespaces\@doendeq}
  1299. \renewenvironment{quote}%
  1300.                {\list{}{\rightmargin\leftmargin}%
  1301.                 \item[]\noindent}%
  1302.                {\endlist}
  1303. \AfterEndEnvironment{quote}{\par\ignorespaces\@doendeq}
  1304. % Note: These _should_ be lower case (transformed to small caps when used)
  1305. \if@stdl@english
  1306. \newcommand{\stdl@sourcename}{source}
  1307. \else
  1308. \newcommand{\stdl@sourcename}{k\"alla}
  1309. \fi
  1310. \newcommand{\source}[1]{\par\nobreak\fontsize{8}{10}\selectfont\noindent\scshape\textls[60]{\stdl@sourcename: \MakeLowercase{#1}}\vspace*{1mm}}
  1311. \newcommand{\wrapquote}[2][5]{%
  1312. \begin{wrapfigure}[#1]{r}{50mm}
  1313.  \fontsize{13}{17}\selectfont\vspace*{-10pt}
  1314.  \hspace*{4pt}\begin{tikzpicture}
  1315.    \node[anchor=north east,inner xsep=1pt] at (0,12pt) {\fontsize{32}{32}\selectfont''};
  1316.    \node[anchor=north west,text width=40mm, align=left, inner sep=0pt] at (0,4pt) { #2 };
  1317.  \end{tikzpicture}
  1318. \end{wrapfigure}}
  1319. \newenvironment{ingress}{\sffamily\fontsize{9}{14}\fontseries{sb}\selectfont}{\vspace{\baselineskip}\normalfont}
  1320. \AfterEndEnvironment{ingress}{\par\ignorespaces\@doendeq}
  1321. %
  1322. % Captions and floats
  1323. %
  1324. \AtBeginDocument{%
  1325. \if@stdl@english
  1326. \renewcommand{\figurename}{FIGURE}
  1327. \renewcommand{\tablename}{TABLE}
  1328. \else
  1329. \renewcommand{\figurename}{FIGUR}
  1330. \renewcommand{\tablename}{TABELL}
  1331. \fi
  1332. }
  1333. \newsubfloat{figure}
  1334. \newsubfloat{table}
  1335. \captionnamefont{\sffamily\figureversion{lining}\fontsize{6.5}{11}\fontseries{sb}\selectfont}
  1336. \captiondelim{\hspace{0.5em}}
  1337. \captiontitlefont{\sffamily\fontsize{8}{11}\fontseries{l}\selectfont}
  1338. \captionstyle{\RaggedRight}
  1339. %\precaption{\MakeUppercase}
  1340. \subcaptionsize{\fontsize{6.5}{11}\selectfont}
  1341. \subcaptionlabelfont{\sffamily\bfseries}
  1342. \subcaptionfont{\sffamily\fontseries{l}\fontsize{8}{11}\selectfont}
  1343. \subcaptionstyle{\RaggedRight}
  1344. \hangsubcaption
  1345. \let\@stdl@caption=\caption
  1346. \newfixedcaption[\@stdl@caption]{\figcaption}{figure}
  1347. \newfixedcaption[\@stdl@caption]{\tabcaption}{table}
  1348. \newcommand{\wrapfig}[4][50mm]{%
  1349.   \begin{wrapfigure}[#3]{#2}[10mm]{#1}
  1350.    \vspace*{-10pt}
  1351.    \centering
  1352.    \let\caption=\figcaption
  1353.    \noindent\ignorespaces #4
  1354.  \end{wrapfigure}}
  1355. \newcommand{\wraptab}[4][50mm]{%
  1356.   \begin{wrapfigure}[#3]{#2}[10mm]{#1}
  1357.    \vspace*{-10pt}
  1358.    \centering
  1359.    \let\caption=\tabcaption
  1360.    \noindent\ignorespaces #4
  1361.  \end{wrapfigure}}
  1362. \newcommand{\wrapfigr}[2][5]{\wrapfig[50mm]{r}{#1}{#2}}
  1363. \newcommand{\wrapfigR}[2][5]{\wrapfig[50mm]{R}{#1}{#2}}
  1364. \newcommand{\wrapfigl}[2][5]{\wrapfig[50mm]{l}{#1}{#2}}
  1365. \newcommand{\wrapfigL}[2][5]{\wrapfig[50mm]{L}{#1}{#2}}
  1366. \newcommand{\wrapfigi}[2][5]{\wrapfig[50mm]{i}{#1}{#2}}
  1367. \newcommand{\wrapfigI}[2][5]{\wrapfig[50mm]{I}{#1}{#2}}
  1368. \newcommand{\wrapfigo}[2][5]{\wrapfig[50mm]{o}{#1}{#2}}
  1369. \newcommand{\wrapfigO}[2][5]{\wrapfig[50mm]{O}{#1}{#2}}
  1370. %
  1371. \newcommand{\wraptabr}[2][5]{\wraptab[50mm]{r}{#1}{#2}}
  1372. \newcommand{\wraptabR}[2][5]{\wraptab[50mm]{R}{#1}{#2}}
  1373. \newcommand{\wraptabl}[2][5]{\wraptab[50mm]{l}{#1}{#2}}
  1374. \newcommand{\wraptabL}[2][5]{\wraptab[50mm]{L}{#1}{#2}}
  1375. \newcommand{\wraptabi}[2][5]{\wraptab[50mm]{i}{#1}{#2}}
  1376. \newcommand{\wraptabI}[2][5]{\wraptab[50mm]{I}{#1}{#2}}
  1377. \newcommand{\wraptabo}[2][5]{\wraptab[50mm]{o}{#1}{#2}}
  1378. \newcommand{\wraptabO}[2][5]{\wraptab[50mm]{O}{#1}{#2}}
  1379. %
  1380. % Tables
  1381. %
  1382. \newcommand{\pretable}{%
  1383.   \sffamily\fontsize{8}{10.5}\fontseries{l}\selectfont
  1384.  \tabulinesep=1.5mm
  1385. }
  1386. \newcommand{\tablehead}{%
  1387.   \rowfont{\sffamily\mdseries\fontsize{8}{14}\selectfont}
  1388.  \rowcolor{\coltablehead}
  1389.   %\vphantom{\rule{4pt}{6pt}} %% FW:2013/02/03
  1390. }
  1391. \newcommand{\tablemain}{%
  1392.   \tabucline[0.3pt]{-}
  1393.  \everyrow{\tabucline[0.3pt on 0.3pt off 1pt]{-}}
  1394. }
  1395. \newcommand{\tablebottom}{%
  1396.   \everyrow{}
  1397.  \\ \tabucline[0.3pt]{-}
  1398. }
  1399. %
  1400. % Footnotes
  1401. %
  1402. \renewcommand{\footnoterule}{\noindent\rule{25mm}{0.4pt}\vspace*{0.5mm}}
  1403. \setlength{\footmarkwidth}{0pt}
  1404. \setlength{\footmarksep}{0pt}
  1405. \setlength{\footparindent}{0.5em}
  1406. \footmarkstyle{\normalfont #1\hspace*{0.5em}}
  1407. %
  1408. % Set up the theorem environments
  1409. %
  1410. \DeclareRobustCommand{\sbem}{%
  1411.   \@nomath\em \if b\expandafter\@car\f@series\@nil
  1412.   \normalfont \else \bfseries \fi}
  1413. %
  1414. %\newcommand{\thmqed}{}
  1415. % \declaretheoremstyle[
  1416. %     spaceabove=14pt plus 2pt minus 6pt,
  1417. %     spacebelow=14pt plus 2pt minus 6pt,
  1418. %     headpunct={},
  1419. %     postheadspace=0.5em,
  1420. %     headfont=\bfseries,
  1421. %     bodyfont=\itshape\let\em\sbem,
  1422. %     qed=\diamond
  1423. %   ]{stdtheorem}
  1424. % \declaretheoremstyle[
  1425. %     spaceabove=14pt plus 2pt minus 6pt,
  1426. %     spacebelow=14pt plus 2pt minus 6pt,
  1427. %     headpunct={},
  1428. %     postheadspace=0.5em,
  1429. %     headfont=\bfseries,
  1430. %     bodyfont=\normalfont
  1431. %   ]{stddefinition}
  1432. % \declaretheoremstyle[
  1433. %     spaceabove=14pt plus 2pt minus 6pt,
  1434. %     spacebelow=14pt plus 2pt minus 6pt,
  1435. %     headpunct={},
  1436. %     postheadspace=0.5em,
  1437. %     headfont=\itshape,
  1438. %     bodyfont=\normalfont
  1439. %   ]{stdremark}
  1440. % \declaretheoremstyle[
  1441. %     spaceabove=14pt plus 2pt minus 6pt,
  1442. %     spacebelow=14pt plus 2pt minus 6pt,
  1443. %     headpunct={},
  1444. %     postheadspace=0.5em,
  1445. %     headfont=\itshape,
  1446. %     bodyfont=\normalfont,
  1447. %     headformat={\NAME\ \NOTE}
  1448. %   ]{stdproof}
  1449. %
  1450. % Boxed theorems
  1451. %
  1452. %
  1453. \newcommand{\mdneedspace}{5\baselineskip}
  1454. \mdfdefinestyle{mdtheoremstyle}{%
  1455.   linewidth=1pt,%
  1456.   roundcorner=4pt,%
  1457.   frametitlerule=false,%
  1458.   apptotikzsetting={%
  1459.     \tikzset{mdfframetitlebackground/.append style={fill=\colfancyhead}}%
  1460.     \tikzset{mdfbackground/.append style={fill=\colfancybox}}%
  1461.   },
  1462.   frametitlefont={\sffamily\bfseries\small},%
  1463.   theoremtitlefont={\sffamily\small},%
  1464.   font=\itshape\let\em\sbem,%
  1465.   frametitleaboveskip=3pt plus 1pt,%
  1466.   frametitlebelowskip=2pt plus 1pt,%
  1467.   innertopmargin=7pt plus 1pt minus 1pt,%
  1468.   innerbottommargin=8pt plus 1pt minus 1pt,%
  1469.   usetwoside=false,%
  1470.   leftmargin=0pt,%
  1471.   rightmargin=0pt,%
  1472.   splitbottomskip=10pt,%
  1473.   splittopskip=14pt,%
  1474.   needspace=\mdneedspace,%
  1475.   skipabove=14pt plus 2pt minus 6pt,%
  1476.   skipbelow=14pt plus 2pt minus 6pt%
  1477.  }
  1478. \mdfdefinestyle{mddefinitionstyle}{%
  1479.   linewidth=1pt,%
  1480.   roundcorner=4pt,%
  1481.   frametitlerule=false,%
  1482.   apptotikzsetting={%
  1483.     \tikzset{mdfframetitlebackground/.append style={fill=\colfancyhead}}%
  1484.     \tikzset{mdfbackground/.append style={fill=\colfancybox}}%
  1485.   },%
  1486.   frametitlefont={\sffamily\bfseries\small\strut},%
  1487.   theoremtitlefont={\sffamily\small},%
  1488.   frametitleaboveskip=3pt plus 1pt,%
  1489.   frametitlebelowskip=2pt plus 1pt,%
  1490.   innertopmargin=7pt plus 1pt minus 1pt,%
  1491.   innerbottommargin=8pt plus 1pt minus 1pt,%
  1492.   outermargin = 0pt,%
  1493.   innermargin = 0pt,%
  1494.   splitbottomskip=10pt,%
  1495.   splittopskip=14pt,%
  1496.   needspace=\mdneedspace,%
  1497.   skipabove=14pt plus 2pt minus 6pt,%
  1498.   skipbelow=14pt plus 2pt minus 6pt%
  1499.  }
  1500. \mdfdefinestyle{mdremarkstyle}{%
  1501.   linewidth=1pt,%
  1502.   roundcorner=4pt,%
  1503.   frametitlerule=false,%
  1504.   apptotikzsetting={%
  1505.     \tikzset{mdfframetitlebackground/.append style={fill=\colfancyhead}}%
  1506.     \tikzset{mdfbackground/.append style={fill=\colfancybox}}%
  1507.   },%
  1508.   frametitlefont={\sffamily\small\bfseries\strut},% FW:2013/02/03
  1509.   theoremtitlefont={\sffamily\small},%
  1510.   frametitleaboveskip=3pt plus 1pt,%
  1511.   frametitlebelowskip=2pt plus 1pt,%
  1512.   innertopmargin=7pt plus 1pt minus 1pt,%
  1513.   innerbottommargin=8pt plus 1pt minus 1pt,%
  1514.   outermargin = 0pt,%
  1515.   innermargin = 0pt,%
  1516.   splitbottomskip=10pt,%
  1517.   splittopskip=14pt,%
  1518.   needspace=\mdneedspace,%
  1519.   skipabove=14pt plus 2pt minus 6pt,%
  1520.   skipbelow=14pt plut 2pt minus 6pt%
  1521.  }
  1522. \mdfdefinestyle{mdplainboxstyle}{%
  1523.   linewidth=1pt,%
  1524.   outermargin = 0pt,%
  1525.   innertopmargin = 7pt plus 3pt minus 1pt,%
  1526.   innerbottommargin = 7pt plus 4pt minus 2pt,%
  1527.   splittopskip = 14pt,%
  1528.   splitbottomskip = 10pt,%
  1529.   skipabove = 14pt plus 2pt minus 6pt,%
  1530.   skipbelow = 14pt plus 2pt minus 6pt%
  1531. }
  1532. \mdfdefinestyle{mdsidebarstyle}{%
  1533.   middlelinewidth = 2pt,%
  1534.   topline = false, rightline = false, bottomline = false,%
  1535.   linecolor=\colsideline,%
  1536.   usetwoside = false,%
  1537.   rightmargin = -0.1pt,%
  1538.   leftmargin = 0pt,%
  1539.   innertopmargin = 0pt,%
  1540.   innerbottommargin = 0pt,%
  1541.   innerleftmargin = 4mm,%
  1542.   innerrightmargin = 1pt,%
  1543.   splittopskip = 14pt,%
  1544.   splitbottomskip = 10pt,%
  1545.   skipabove = 14pt plus 2pt minus 6pt,%
  1546.   skipbelow = 14pt plus 2pt minus 6pt%
  1547. }
  1548. \mdfdefinestyle{mdthinsidebarstyle}{%
  1549.   middlelinewidth = 0.5pt,%
  1550.   topline = false, rightline = false, bottomline = false,%
  1551.   linecolor=black,%
  1552.   usetwoside = false,%
  1553.   rightmargin = -0.1pt,%
  1554.   leftmargin = 0pt,%
  1555.   innertopmargin = 0pt,%
  1556.   innerbottommargin = 0pt,%
  1557.   innerleftmargin = 4mm,%
  1558.   innerrightmargin = 1pt,%
  1559.   splittopskip = 14pt,%
  1560.   splitbottomskip = 10pt,%
  1561.   skipabove = 14pt plus 2pt minus 6pt,%
  1562.   skipbelow = 14pt plus 2pt minus 6pt%
  1563. }
  1564. \newmdenv[style=mddefinitionstyle]{fancybox}
  1565. \newmdenv[style=mdplainboxstyle,backgroundcolor=\colplainbox]{plainbox}
  1566. \newmdenv[style=mdplainboxstyle]{whitebox}
  1567. \surroundwithmdframed[style=mdplainboxstyle]{raggedbox}
  1568. \newmdenv[style=mdsidebarstyle]{sideline}
  1569. \newmdenv[style=mdthinsidebarstyle]{thinsideline}
  1570. \AfterEndEnvironment{fancybox}{\par\ignorespaces\@doendeq}
  1571. \AfterEndEnvironment{plainbox}{\par\ignorespaces\@doendeq}
  1572. \AfterEndEnvironment{whitebox}{\par\ignorespaces\@doendeq}
  1573. \AfterEndEnvironment{raggedbox}{\par\ignorespaces\@doendeq}
  1574. \AfterEndEnvironment{sideline}{\par\ignorespaces\@doendeq}
  1575. \AfterEndEnvironment{thinsideline}{\par\ignorespaces\@doendeq}
  1576. %
  1577. % Index
  1578. %
  1579. \renewcommand{\preindexhook}{\fontsize{9.5}{13}\selectfont}
  1580. \renewcommand{\l@index}{\@dottedtocline{1}{0em}{0pt}}
  1581. \renewcommand{\@idxitem}  {\par\hangindent 40\p@}
  1582. \renewcommand{\subitem}   {\par\hangindent 5mm \hspace*{3mm}--\ }
  1583. \renewcommand{\subsubitem}{\par\hangindent 8mm \hspace*{6mm}--\ }
  1584. \renewcommand{\indexspace}{\par\vskip 13\p@ \@plus2\p@
  1585.  \@minus2\p@\relax}
  1586. \aliaspagestyle{indextitlepagestyle}{frontchapter}
  1587. \xindyindex
  1588. \newcommand{\lettergroup}[1]{\relax}
  1589. %
  1590. % Smart comma, orphans and widows
  1591. %
  1592. \clubpenalty=150
  1593. \widowpenalty=10000
  1594. \tolerance=1414
  1595. \hbadness=1414
  1596. \relpenalty=300
  1597. % Make last line of each paragraph at least (approximately) 12 characters
  1598. \setlength{\parfillskip}{0pt plus\dimexpr\textwidth-3\parindent}
  1599. \emergencystretch.3\textwidth
  1600. %
  1601. \tightlists
  1602. %
  1603. % Prevent hyphenation of words beginning with an upper case letter.
  1604. % This makes sure that proper names are never hyphenated, but
  1605. % might cause slightly worse linebreaks, since it also prevents the
  1606. % first word of each sentence to be hyphenated.
  1607. %
  1608. \uchyph=0
  1609. %
  1610. % Forbid hyphenations with two-letter parts
  1611. %
  1612. \AtBeginDocument{\righthyphenmin=3\lefthyphenmin=3}
  1613. %
  1614. % Code for testing
  1615. %
  1616. \newcommand{\testlayout}{
  1617.  \begin{tikzpicture}[remember picture,overlay]
  1618.    \node[anchor=north west,inner sep=0pt] at (current page.north west) {
  1619.      \begin{tikzpicture}[overlay]
  1620.        \draw[help lines,step=4mm] (0,-223mm) grid (155mm, 0);
  1621.        \foreach \y in {0,2,4,6,8,10,12,14,16,18,20,22} {
  1622.          \node[anchor=east] at (-3mm,-\y) { $\y$ };
  1623.        }
  1624.        \draw[red,very thin] (26mm,0) -- (26mm,-223mm);
  1625.        \draw[red,very thin] (19mm,0) -- (19mm,-223mm);
  1626.        \draw[red,very thin] (136mm,0) -- (136mm,-223mm);
  1627.        \draw[red,very thin] (129mm,0) -- (129mm,-223mm);
  1628.        \draw[red,very thin] (0,-14.5mm) -- (155mm,-14.5mm);
  1629.        \draw[red,very thin] (0,-69.5mm) -- (155mm,-69.5mm);
  1630.        \draw[red,very thin] (0,-207mm) -- (155mm,-207mm);
  1631.      \end{tikzpicture}
  1632.    };
  1633.  \end{tikzpicture}
  1634. }
  1635. \if@stdl@normalis
  1636. \newcommand{\testgrid}{
  1637.  \begin{tikzpicture}[overlay,remember picture]
  1638.    \node[anchor=north west,inner sep=0pt] at (current page.north west) {
  1639.      \begin{tikzpicture}[overlay]
  1640.        \foreach \y in {-30,...,9} {
  1641.          \draw[blue, very thin] (0,-69.5mm+14pt*\y) -- (155mm,-69.5mm+14pt*\y);
  1642.          }
  1643.         \draw[red,very thin] (0,-69.5mm) -- (155mm,-69.5mm);
  1644.         \draw[red,very thin] (0,-36mm) -- (155mm,-36mm);
  1645.         \draw[red,very thin] (66mm,0) -- (66mm,-223mm);
  1646.         \draw[red,very thin] (0, -197mm) -- (155mm, -197mm);
  1647.         %\draw[red,very thin] (0, -31mm) -- (155mm, -31mm);
  1648.       \end{tikzpicture}
  1649.    };
  1650.  \end{tikzpicture}
  1651. }
  1652. \else
  1653. \newcommand{\testgrid}{
  1654.  \begin{tikzpicture}[overlay,remember picture]
  1655.    \node[anchor=north west,inner sep=0pt] at (current page.north west) {
  1656.      \begin{tikzpicture}[overlay]
  1657.        \foreach \y in {-30,...,9} {
  1658.          \draw[blue, very thin] (0,-69.5mm+14pt*\y) -- (170mm,-69.5mm+14pt*\y);
  1659.          }
  1660.         \draw[red,thick] (0,-36mm) -- (170mm,-36mm);
  1661.         \draw[red,thick] (0,-70mm) -- (170mm,-70mm);
  1662.         \draw[blue,thick] (0,-245mm) -- (170mm,-245mm);
  1663.         \draw[blue,thick] (0,-229mm) -- (170mm,-229mm);
  1664.         \draw[blue,thick] (0,-217mm) -- (170mm,-217mm);
  1665.         %\draw[blue,thick] (0,-13mm) -- (170mm,-13mm);
  1666.         \draw[blue,thick] (0,-24mm) -- (170mm,-24mm);
  1667.         \draw[blue,thick] (19mm,0) -- (19mm,-245mm);
  1668.         \draw[blue,thick] (122mm,0) -- (122mm,-245mm);
  1669.         \draw[green,thick] (12mm,0) -- (12mm,-245mm);
  1670.         \draw[green,thick] (48mm,0) -- (48mm,-245mm);
  1671.         \draw[green,thick] (151mm,0) -- (151mm,-245mm);
  1672.     \end{tikzpicture}
  1673.    };
  1674.  \end{tikzpicture}
  1675. }
  1676. \newcommand{\testtitlegrid}{
  1677.  \begin{tikzpicture}[overlay,remember picture]
  1678.    \node[anchor=north west,inner sep=0pt] at (current page.north west) {
  1679.      \begin{tikzpicture}[overlay]
  1680.        \draw[green,thick] (66mm,0) -- (66mm,-245mm);
  1681.        \draw[green,thick] (19mm,0) -- (19mm,-245mm);
  1682.        \draw[red,thick] (0,-60mm) -- (170mm,-60mm);
  1683.        \draw[red,thick] (0,-217mm) -- (170mm,-217mm);
  1684.    \end{tikzpicture}
  1685.    };
  1686.  \end{tikzpicture}
  1687. }\fi
  1688. \newcommand{\includegraphicscolormodel}[2][]{%
  1689.   \if@stdl@colorcmyk
  1690.   \includegraphics[#1]{#2-cmyk}
  1691.  \else
  1692.  \includegraphics[#1]{#2-grey}
  1693.  \fi
  1694. }
  1695. \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {};}%
  1696. %
  1697. % Fix bug in colortbl/amsmath hdotsfor not filling columns
  1698. %
  1699. \def\hdots@for#1#2{\multicolumn{#2}c%
  1700.   {\m@th\dotsspace@1.5mu\mkern-#1\dotsspace@
  1701.   \xleaders\hbox{$\m@th\mkern#1\dotsspace@.\mkern#1\dotsspace@$}%
  1702.            \hskip\z@\@plus 1filll
  1703.    \mkern-#1\dotsspace@}%
  1704.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement