Goddess of Justice DB, the database used for storage on IzaroDFS
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

519 рядки
21 KiB

5 роки тому
4 роки тому
5 роки тому
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % The Legrand Orange Book
  3. % Structural Definitions File
  4. % Version 2.1 (26/09/2018)
  5. %
  6. % Original author:
  7. % Mathias Legrand (legrand.mathias@gmail.com) with modifications by:
  8. % Vel (vel@latextemplates.com)
  9. %
  10. % This file was downloaded from:
  11. % http://www.LaTeXTemplates.com
  12. %
  13. % License:
  14. % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
  15. %
  16. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  17. %----------------------------------------------------------------------------------------
  18. % VARIOUS REQUIRED PACKAGES AND CONFIGURATIONS
  19. %----------------------------------------------------------------------------------------
  20. \usepackage{graphicx} % Required for including pictures
  21. \graphicspath{{Pictures/}} % Specifies the directory where pictures are stored
  22. \usepackage{lipsum} % Inserts dummy text
  23. \usepackage{tikz} % Required for drawing custom shapes
  24. \usepackage[english]{babel} % English language/hyphenation
  25. \usepackage{makeidx}
  26. \usepackage{enumitem} % Customize lists
  27. \setlist{nolistsep} % Reduce spacing between bullet points and numbered lists
  28. \usepackage{booktabs} % Required for nicer horizontal rules in tables
  29. \usepackage{xcolor} % Required for specifying colors by name
  30. \definecolor{ocre}{RGB}{0,102,233} % Define the orange color used for highlighting throughout the book
  31. \makeindex
  32. %----------------------------------------------------------------------------------------
  33. % MARGINS
  34. %----------------------------------------------------------------------------------------
  35. \usepackage{geometry} % Required for adjusting page dimensions and margins
  36. \geometry{
  37. paper=a4paper, % Paper size, change to letterpaper for US letter size
  38. top=3cm, % Top margin
  39. bottom=3cm, % Bottom margin
  40. left=3cm, % Left margin
  41. right=3cm, % Right margin
  42. headheight=14pt, % Header height
  43. footskip=1.4cm, % Space from the bottom margin to the baseline of the footer
  44. headsep=10pt, % Space from the top margin to the baseline of the header
  45. %showframe, % Uncomment to show how the type block is set on the page
  46. }
  47. %----------------------------------------------------------------------------------------
  48. % FONTS
  49. %----------------------------------------------------------------------------------------
  50. \usepackage{avant} % Use the Avantgarde font for headings
  51. %\usepackage{times} % Use the Times font for headings
  52. \usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts
  53. \usepackage{microtype} % Slightly tweak font spacing for aesthetics
  54. \usepackage[utf8]{inputenc} % Required for including letters with accents
  55. \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
  56. %----------------------------------------------------------------------------------------
  57. % BIBLIOGRAPHY AND INDEX
  58. %----------------------------------------------------------------------------------------
  59. \usepackage[style=numeric,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
  60. \addbibresource{bibliography.bib} % BibTeX bibliography file
  61. \defbibheading{bibempty}{}
  62. \usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly
  63. \usepackage{makeidx} % Required to make an index
  64. \makeindex % Tells LaTeX to create the files required for indexing
  65. %----------------------------------------------------------------------------------------
  66. % MAIN TABLE OF CONTENTS
  67. %----------------------------------------------------------------------------------------
  68. \usepackage{titletoc} % Required for manipulating the table of contents
  69. \contentsmargin{0cm} % Removes the default margin
  70. % Part text styling (this is mostly taken care of in the PART HEADINGS section of this file)
  71. \titlecontents{part}
  72. [0cm] % Left indentation
  73. {\addvspace{20pt}\bfseries} % Spacing and font options for parts
  74. {}
  75. {}
  76. {}
  77. % Chapter text styling
  78. \titlecontents{chapter}
  79. [1.25cm] % Left indentation
  80. {\addvspace{12pt}\large\sffamily\bfseries} % Spacing and font options for chapters
  81. {\color{ocre!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{ocre}} % Formatting of numbered sections of this type
  82. {\color{ocre}} % Formatting of numberless sections of this type
  83. {\color{ocre!60}\normalsize\;\titlerule*[.5pc]{.}\;\thecontentspage} % Formatting of the filler to the right of the heading and the page number
  84. % Section text styling
  85. \titlecontents{section}
  86. [1.25cm] % Left indentation
  87. {\addvspace{3pt}\sffamily\bfseries} % Spacing and font options for sections
  88. {\contentslabel[\thecontentslabel]{1.25cm}} % Formatting of numbered sections of this type
  89. {} % Formatting of numberless sections of this type
  90. {\hfill\color{black}\thecontentspage} % Formatting of the filler to the right of the heading and the page number
  91. % Subsection text styling
  92. \titlecontents{subsection}
  93. [1.25cm] % Left indentation
  94. {\addvspace{1pt}\sffamily\small} % Spacing and font options for subsections
  95. {\contentslabel[\thecontentslabel]{1.25cm}} % Formatting of numbered sections of this type
  96. {} % Formatting of numberless sections of this type
  97. {\ \titlerule*[.5pc]{.}\;\thecontentspage} % Formatting of the filler to the right of the heading and the page number
  98. % Figure text styling
  99. \titlecontents{figure}
  100. [1.25cm] % Left indentation
  101. {\addvspace{1pt}\sffamily\small} % Spacing and font options for figures
  102. {\thecontentslabel\hspace*{1em}} % Formatting of numbered sections of this type
  103. {} % Formatting of numberless sections of this type
  104. {\ \titlerule*[.5pc]{.}\;\thecontentspage} % Formatting of the filler to the right of the heading and the page number
  105. % Table text styling
  106. \titlecontents{table}
  107. [1.25cm] % Left indentation
  108. {\addvspace{1pt}\sffamily\small} % Spacing and font options for tables
  109. {\thecontentslabel\hspace*{1em}} % Formatting of numbered sections of this type
  110. {} % Formatting of numberless sections of this type
  111. {\ \titlerule*[.5pc]{.}\;\thecontentspage} % Formatting of the filler to the right of the heading and the page number
  112. %----------------------------------------------------------------------------------------
  113. % MINI TABLE OF CONTENTS IN PART HEADS
  114. %----------------------------------------------------------------------------------------
  115. % Chapter text styling
  116. \titlecontents{lchapter}
  117. [0em] % Left indentation
  118. {\addvspace{15pt}\large\sffamily\bfseries} % Spacing and font options for chapters
  119. {\color{ocre}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{ocre}} % Chapter number
  120. {}
  121. {\color{ocre}\normalsize\sffamily\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number
  122. % Section text styling
  123. \titlecontents{lsection}
  124. [0em] % Left indentation
  125. {\sffamily\small} % Spacing and font options for sections
  126. {\contentslabel[\thecontentslabel]{1.25cm}} % Section number
  127. {}
  128. {}
  129. % Subsection text styling (note these aren't shown by default, display them by searchings this file for tocdepth and reading the commented text)
  130. \titlecontents{lsubsection}
  131. [.5em] % Left indentation
  132. {\sffamily\footnotesize} % Spacing and font options for subsections
  133. {\contentslabel[\thecontentslabel]{1.25cm}}
  134. {}
  135. {}
  136. %----------------------------------------------------------------------------------------
  137. % HEADERS AND FOOTERS
  138. %----------------------------------------------------------------------------------------
  139. \usepackage{fancyhdr} % Required for header and footer configuration
  140. \pagestyle{fancy} % Enable the custom headers and footers
  141. \renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}} % Styling for the current chapter in the header
  142. \renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize\thesection\hspace{5pt}#1}{}} % Styling for the current section in the header
  143. \fancyhf{} % Clear default headers and footers
  144. \fancyhead[LE,RO]{\sffamily\normalsize\thepage} % Styling for the page number in the header
  145. \fancyhead[LO]{\rightmark} % Print the nearest section name on the left side of odd pages
  146. \fancyhead[RE]{\leftmark} % Print the current chapter name on the right side of even pages
  147. %\fancyfoot[C]{\thepage} % Uncomment to include a footer
  148. \renewcommand{\headrulewidth}{0.5pt} % Thickness of the rule under the header
  149. \fancypagestyle{plain}{% Style for when a plain pagestyle is specified
  150. \fancyhead{}\renewcommand{\headrulewidth}{0pt}%
  151. }
  152. % Removes the header from odd empty pages at the end of chapters
  153. \makeatletter
  154. \renewcommand{\cleardoublepage}{
  155. \clearpage\ifodd\c@page\else
  156. \hbox{}
  157. \vspace*{\fill}
  158. \thispagestyle{empty}
  159. \newpage
  160. \fi}
  161. %----------------------------------------------------------------------------------------
  162. % THEOREM STYLES
  163. %----------------------------------------------------------------------------------------
  164. \usepackage{amsmath,amsfonts,amssymb,amsthm} % For math equations, theorems, symbols, etc
  165. \newcommand{\intoo}[2]{\mathopen{]}#1\,;#2\mathclose{[}}
  166. \newcommand{\ud}{\mathop{\mathrm{{}d}}\mathopen{}}
  167. \newcommand{\intff}[2]{\mathopen{[}#1\,;#2\mathclose{]}}
  168. \renewcommand{\qedsymbol}{$\blacksquare$}
  169. \newtheorem{notation}{Notation}[chapter]
  170. % Boxed/framed environments
  171. \newtheoremstyle{ocrenumbox}% Theorem style name
  172. {0pt}% Space above
  173. {0pt}% Space below
  174. {\normalfont}% Body font
  175. {}% Indent amount
  176. {\small\bf\sffamily\color{ocre}}% Theorem head font
  177. {\;}% Punctuation after theorem head
  178. {0.25em}% Space after theorem head
  179. {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  180. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note
  181. \newtheoremstyle{blacknumex}% Theorem style name
  182. {5pt}% Space above
  183. {5pt}% Space below
  184. {\normalfont}% Body font
  185. {} % Indent amount
  186. {\small\bf\sffamily}% Theorem head font
  187. {\;}% Punctuation after theorem head
  188. {0.25em}% Space after theorem head
  189. {\small\sffamily{\tiny\ensuremath{\blacksquare}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  190. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note
  191. \newtheoremstyle{blacknumbox} % Theorem style name
  192. {0pt}% Space above
  193. {0pt}% Space below
  194. {\normalfont}% Body font
  195. {}% Indent amount
  196. {\small\bf\sffamily}% Theorem head font
  197. {\;}% Punctuation after theorem head
  198. {0.25em}% Space after theorem head
  199. {\small\sffamily\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  200. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note
  201. % Non-boxed/non-framed environments
  202. \newtheoremstyle{ocrenum}% Theorem style name
  203. {5pt}% Space above
  204. {5pt}% Space below
  205. {\normalfont}% Body font
  206. {}% Indent amount
  207. {\small\bf\sffamily\color{ocre}}% Theorem head font
  208. {\;}% Punctuation after theorem head
  209. {0.25em}% Space after theorem head
  210. {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
  211. \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note
  212. \makeatother
  213. % Defines the theorem text style for each type of theorem to one of the three styles above
  214. \newcounter{dummy}
  215. \numberwithin{dummy}{section}
  216. \theoremstyle{ocrenumbox}
  217. \newtheorem{theoremeT}[dummy]{Theorem}
  218. \newtheorem{problem}{Problem}[chapter]
  219. \newtheorem{exerciseT}{Exercise}[chapter]
  220. \theoremstyle{blacknumex}
  221. \newtheorem{exampleT}{Example}[chapter]
  222. \theoremstyle{blacknumbox}
  223. \newtheorem{vocabulary}{Vocabulary}[chapter]
  224. \newtheorem{definitionT}{Definition}[section]
  225. \newtheorem{corollaryT}[dummy]{Corollary}
  226. \theoremstyle{ocrenum}
  227. \newtheorem{proposition}[dummy]{Proposition}
  228. %----------------------------------------------------------------------------------------
  229. % DEFINITION OF COLORED BOXES
  230. %----------------------------------------------------------------------------------------
  231. \RequirePackage[framemethod=default]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes
  232. % Theorem box
  233. \newmdenv[skipabove=7pt,
  234. skipbelow=7pt,
  235. backgroundcolor=black!5,
  236. linecolor=ocre,
  237. innerleftmargin=5pt,
  238. innerrightmargin=5pt,
  239. innertopmargin=5pt,
  240. leftmargin=0cm,
  241. rightmargin=0cm,
  242. innerbottommargin=5pt]{tBox}
  243. % Exercise box
  244. \newmdenv[skipabove=7pt,
  245. skipbelow=7pt,
  246. rightline=false,
  247. leftline=true,
  248. topline=false,
  249. bottomline=false,
  250. backgroundcolor=ocre!10,
  251. linecolor=ocre,
  252. innerleftmargin=5pt,
  253. innerrightmargin=5pt,
  254. innertopmargin=5pt,
  255. innerbottommargin=5pt,
  256. leftmargin=0cm,
  257. rightmargin=0cm,
  258. linewidth=4pt]{eBox}
  259. % Definition box
  260. \newmdenv[skipabove=7pt,
  261. skipbelow=7pt,
  262. rightline=false,
  263. leftline=true,
  264. topline=false,
  265. bottomline=false,
  266. linecolor=ocre,
  267. innerleftmargin=5pt,
  268. innerrightmargin=5pt,
  269. innertopmargin=0pt,
  270. leftmargin=0cm,
  271. rightmargin=0cm,
  272. linewidth=4pt,
  273. innerbottommargin=0pt]{dBox}
  274. % Corollary box
  275. \newmdenv[skipabove=7pt,
  276. skipbelow=7pt,
  277. rightline=false,
  278. leftline=true,
  279. topline=false,
  280. bottomline=false,
  281. linecolor=gray,
  282. backgroundcolor=black!5,
  283. innerleftmargin=5pt,
  284. innerrightmargin=5pt,
  285. innertopmargin=5pt,
  286. leftmargin=0cm,
  287. rightmargin=0cm,
  288. linewidth=4pt,
  289. innerbottommargin=5pt]{cBox}
  290. % Creates an environment for each type of theorem and assigns it a theorem text style from the "Theorem Styles" section above and a colored box from above
  291. \newenvironment{theorem}{\begin{tBox}\begin{theoremeT}}{\end{theoremeT}\end{tBox}}
  292. \newenvironment{exercise}{\begin{eBox}\begin{exerciseT}}{\hfill{\color{ocre}\tiny\ensuremath{\blacksquare}}\end{exerciseT}\end{eBox}}
  293. \newenvironment{definition}{\begin{dBox}\begin{definitionT}}{\end{definitionT}\end{dBox}}
  294. \newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}}
  295. \newenvironment{corollary}{\begin{cBox}\begin{corollaryT}}{\end{corollaryT}\end{cBox}}
  296. %----------------------------------------------------------------------------------------
  297. % REMARK ENVIRONMENT
  298. %----------------------------------------------------------------------------------------
  299. \newenvironment{remark}{\par\vspace{10pt}\small % Vertical white space above the remark and smaller font size
  300. \begin{list}{}{
  301. \leftmargin=35pt % Indentation on the left
  302. \rightmargin=25pt}\item\ignorespaces % Indentation on the right
  303. \makebox[-2.5pt]{\begin{tikzpicture}[overlay]
  304. \node[draw=ocre!60,line width=1pt,circle,fill=ocre!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-15pt,0pt){\textcolor{ocre}{R}};\end{tikzpicture}} % Orange R in a circle
  305. \advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark
  306. %----------------------------------------------------------------------------------------
  307. % SECTION NUMBERING IN THE MARGIN
  308. %----------------------------------------------------------------------------------------
  309. \makeatletter
  310. \renewcommand{\@seccntformat}[1]{\llap{\textcolor{ocre}{\csname the#1\endcsname}\hspace{1em}}}
  311. \renewcommand{\section}{\@startsection{section}{1}{\z@}
  312. {-4ex \@plus -1ex \@minus -.4ex}
  313. {1ex \@plus.2ex }
  314. {\normalfont\large\sffamily\bfseries}}
  315. \renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
  316. {-3ex \@plus -0.1ex \@minus -.4ex}
  317. {0.5ex \@plus.2ex }
  318. {\normalfont\sffamily\bfseries}}
  319. \renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
  320. {-2ex \@plus -0.1ex \@minus -.2ex}
  321. {.2ex \@plus.2ex }
  322. {\normalfont\small\sffamily\bfseries}}
  323. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
  324. {-2ex \@plus-.2ex \@minus .2ex}
  325. {.1ex}
  326. {\normalfont\small\sffamily\bfseries}}
  327. %----------------------------------------------------------------------------------------
  328. % PART HEADINGS
  329. %----------------------------------------------------------------------------------------
  330. % Numbered part in the table of contents
  331. \newcommand{\@mypartnumtocformat}[2]{%
  332. \setlength\fboxsep{0pt}%
  333. \noindent\colorbox{ocre!20}{\strut\parbox[c][.7cm]{\ecart}{\color{ocre!70}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}%
  334. }
  335. % Unnumbered part in the table of contents
  336. \newcommand{\@myparttocformat}[1]{%
  337. \setlength\fboxsep{0pt}%
  338. \noindent\colorbox{ocre!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}%
  339. }
  340. \newlength\esp
  341. \setlength\esp{4pt}
  342. \newlength\ecart
  343. \setlength\ecart{1.2cm-\esp}
  344. \newcommand{\thepartimage}{}%
  345. \newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
  346. \def\@part[#1]#2{%
  347. \ifnum \c@secnumdepth >-2\relax%
  348. \refstepcounter{part}%
  349. \addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ ---\ #1}}
  350. \else%
  351. \addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
  352. \fi%
  353. \startcontents%
  354. \markboth{}{}%
  355. {\thispagestyle{empty}%
  356. \begin{tikzpicture}[remember picture,overlay]%
  357. \node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
  358. \fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
  359. \node[anchor=north] at (4cm,-3.25cm){\color{ocre!40}\fontsize{220}{100}\sffamily\bfseries\thepart};
  360. \node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{
  361. \printcontents{l}{0}{\setcounter{tocdepth}{1}}% The depth to which the Part mini table of contents displays headings; 0 for chapters only, 1 for chapters and sections and 2 for chapters, sections and subsections
  362. }};
  363. \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#2}};
  364. \end{tikzpicture}};
  365. \end{tikzpicture}}%
  366. \@endpart}
  367. \def\@spart#1{%
  368. \startcontents%
  369. \phantomsection
  370. {\thispagestyle{empty}%
  371. \begin{tikzpicture}[remember picture,overlay]%
  372. \node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
  373. \fill[ocre!20](0cm,0cm) rectangle (\paperwidth,-\paperheight);
  374. \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries#1}};
  375. \end{tikzpicture}};
  376. \end{tikzpicture}}
  377. \addcontentsline{toc}{part}{\texorpdfstring{%
  378. \setlength\fboxsep{0pt}%
  379. \noindent\protect\colorbox{ocre!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
  380. \@endpart}
  381. \def\@endpart{\vfil\newpage
  382. \if@twoside
  383. \if@openright
  384. \null
  385. \thispagestyle{empty}%
  386. \newpage
  387. \fi
  388. \fi
  389. \if@tempswa
  390. \twocolumn
  391. \fi}
  392. %----------------------------------------------------------------------------------------
  393. % CHAPTER HEADINGS
  394. %----------------------------------------------------------------------------------------
  395. % A switch to conditionally include a picture, implemented by Christian Hupfer
  396. \newif\ifusechapterimage
  397. \usechapterimagetrue
  398. \newcommand{\thechapterimage}{}%
  399. \newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
  400. \newcommand{\autodot}{.}
  401. \def\@makechapterhead#1{%
  402. {\parindent \z@ \raggedright \normalfont
  403. \ifnum \c@secnumdepth >\m@ne
  404. \if@mainmatter
  405. \begin{tikzpicture}[remember picture,overlay]
  406. \node at (current page.north west)
  407. {\begin{tikzpicture}[remember picture,overlay]
  408. \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
  409. \draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
  410. \draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut};
  411. \end{tikzpicture}};
  412. \end{tikzpicture}
  413. \else
  414. \begin{tikzpicture}[remember picture,overlay]
  415. \node at (current page.north west)
  416. {\begin{tikzpicture}[remember picture,overlay]
  417. \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
  418. \draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
  419. \draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
  420. \end{tikzpicture}};
  421. \end{tikzpicture}
  422. \fi\fi\par\vspace*{270\p@}}}
  423. %-------------------------------------------
  424. \def\@makeschapterhead#1{%
  425. \begin{tikzpicture}[remember picture,overlay]
  426. \node at (current page.north west)
  427. {\begin{tikzpicture}[remember picture,overlay]
  428. \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
  429. \draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
  430. \draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
  431. \end{tikzpicture}};
  432. \end{tikzpicture}
  433. \par\vspace*{270\p@}}
  434. \makeatother
  435. %----------------------------------------------------------------------------------------
  436. % LINKS
  437. %----------------------------------------------------------------------------------------
  438. \usepackage[hidelinks]{hyperref}
  439. %\hypersetup{hidelinks,backref=true,pagebackref=true,colorlinks=false,breaklinks=true,urlcolor=ocre,bookmarks=true,bookmarksopen=false}
  440. \usepackage{bookmark}
  441. \bookmarksetup{
  442. open,
  443. numbered,
  444. addtohook={%
  445. \ifnum\bookmarkget{level}=0 % chapter
  446. \bookmarksetup{bold}%
  447. \fi
  448. \ifnum\bookmarkget{level}=-1 % part
  449. \bookmarksetup{color=ocre,bold}%
  450. \fi
  451. }
  452. }