Advertisement
Guest User

Untitled

a guest
Aug 17th, 2020
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.43 KB | None | 0 0
  1. % Bold symbols
  2. \usepackage{bold-extra}
  3. \usepackage{bm}
  4.  
  5. % Parskip to have paragraphs with the right spacing and keep indentation
  6. \edef\restoreparindent{\parindent=\the\parindent\relax}
  7. \usepackage{parskip}
  8. \restoreparindent
  9.  
  10.  
  11. % ROBOTO!
  12. \usepackage[sfdefault]{roboto}
  13.  
  14. % Italian language support
  15. \usepackage[T1]{fontenc}
  16. \usepackage[italian]{babel} % Italian support
  17. \usepackage[utf8]{inputenc} % Accented letters
  18.  
  19. % Misc
  20. %\usepackage[medium]{titlesec} % Smaller section's font
  21. \usepackage{indentfirst}
  22. \usepackage{textcomp} % To have \textcelsius and other symbols
  23.  
  24. % To have better rules in tables
  25. \usepackage{bookmark}
  26. \usepackage{multirow}
  27.  
  28. % To fix margins that overflow
  29. %\usepackage{marginfix}
  30.  
  31. %\usepackage[all]{hypcap} % To fix caption loading of hyperref
  32.  
  33. \usepackage{hyperref}
  34.  
  35. % Mathematsics and Physics
  36. \usepackage{amsmath,amsfonts,amssymb,mathtools,mathrsfs}
  37. \usepackage{physics}
  38.  
  39. % Theorems
  40. \usepackage[framed,amsthm,hyperref,thmmarks,amsmath]{ntheorem}
  41. \usepackage{framed,mdframed}
  42.  
  43. % After hyperref and amsmath
  44. \usepackage[capitalize,noabbrev,nameinlink,italian]{cleveref}
  45.  
  46. \usepackage{cancel}
  47.  
  48. \usepackage{booktabs,xtab,tabulary}
  49.  
  50.  
  51. %%%% MAIN COLORS %%%%%
  52. \definecolor{theorem1}{HTML}{ff8f00}
  53. \definecolor{theorem2}{HTML}{ffca28}
  54.  
  55. \definecolor{def1}{HTML}{2e7d32}
  56. \definecolor{def2}{HTML}{66bb6a}
  57.  
  58. \definecolor{ex1}{HTML}{1565c0}
  59. \definecolor{ex2}{HTML}{42a5f5}
  60. %%%%%%%
  61.  
  62.  
  63. %%%% Sections styles %%%%%
  64. \usepackage{titlesec,titletoc}
  65.  
  66. \setcounter{secnumdepth}{2}
  67.  
  68. % chapter format
  69. \titleformat{\chapter}%
  70. {\huge\rmfamily\itshape\color{def1}}% format applied to label+text
  71. {\llap{\colorbox{def1}{\parbox{1.5cm}{\hfill\itshape\huge\color{white}\thechapter}}}}% label
  72. {2pt}% horizontal separation between label and title body
  73. {}% before the title body
  74. %{\titlerule*[0.7em]{.}\rmfamily\upshape\thechapter} % filler + page (leaders and page num)
  75. []% after the title body
  76.  
  77. % section format
  78. \titleformat{\section}%
  79. {\normalfont\Large\itshape\color{theorem1}}% format applied to label+text
  80. {\llap{\colorbox{theorem1}{\parbox{1.5cm}{\hfill\color{white}\thesection}}}}% label
  81. {1em}% horizontal separation between label and title body
  82. {}% beforethe title body
  83. []% after the title body
  84.  
  85. % subsectionformat
  86. \titleformat{\subsection}%
  87. {\normalfont\large\itshape\color{ex1}}% format applied to label+text
  88. {\llap{\colorbox{ex1}{\parbox{1.5cm}{\hfill\color{white}\thesubsection}}}}% label
  89. {1em}% horizontal separation between label and title body
  90. {}% beforethe title body
  91. []% after the title body
  92.  
  93. %%%% TOC CHANGES %%%%
  94. \titlecontents{chapter}%
  95. [-4em] % distance from left margin
  96. {\fontsize{15}{25}\itshape\bfseries} % above (global formatting of entry)
  97. {\hspace*{2em}\textcolor{def1}{\contentslabel{2em}}} % before w/label (label = ``2.6'')
  98. {\hspace*{2em}} % before w/o label
  99. {\titlerule*[0.7em]{.}\rmfamily\upshape\contentspage} % filler + page (leaders and page num)
  100. [] % after
  101.  
  102. \titlecontents{section}%
  103. [0em] % distance from left margin
  104. {\fontsize{11}{15}\itshape} % above (global formatting of entry)
  105. {\hspace*{2em}\textcolor{theorem1}{\contentslabel{2em}}} % before w/label (label = ``2.6'')
  106. {\hspace*{2em}} % before w/o label
  107. {\titlerule*[0.7em]{.}\rmfamily\upshape\contentspage} % filler + page (leaders and page num)
  108. [] % after
  109.  
  110.  
  111. %%%% TIKZ %%%%
  112.  
  113. \usepackage{tikz}
  114. \usepackage{pgfplots}
  115. \pgfplotsset{compat=1.14}
  116. \usepgfplotslibrary{%
  117. fillbetween,
  118. external,
  119. polar
  120. }
  121. \tikzsetexternalprefix{tikz_figures/}
  122. %\tikzexternalize
  123. \usetikzlibrary{%
  124. arrows,
  125. decorations,
  126. decorations.pathmorphing,
  127. decorations.markings,
  128. calc,
  129. intersections,
  130. matrix,
  131. spy,
  132. shapes.geometric,
  133. shapes.misc,
  134. patterns,
  135. math,
  136. cd,
  137. }
  138.  
  139. \usepackage{tikz-3dplot}
  140.  
  141. % axis style, ticks, etc
  142. \pgfplotsset{every axis/.append style={%
  143. %axis lines=middle, % put the axis in the middle
  144. %axis line style={->}, % arrows on the axis
  145. xlabel={$x$}, % default put x on x-axis
  146. ylabel={$y$}, % default put y on y-axis
  147. zlabel={$z$}, % default put z on z-axis
  148. %axis equal, % 1:1 ratio
  149. %grid=both, % coordinate grid
  150. %grid style={line width=.1pt, draw=gray!10},
  151. %major grid style={line width=.2pt,draw=gray!50},
  152. ticks=both, % ticks for integers
  153. minor tick num=5, % number of subticks
  154. %ticklabel style={font=\small,fill=white},
  155. %xlabel style={at={(ticklabel* cs:1)},anchor=north west},
  156. %ylabel style={at={(ticklabel* cs:1)},anchor=south west},
  157. %zlabel style={at={(ticklabel* cs:1)},anchor= west},
  158. }
  159. }
  160.  
  161. \pgfplotsset{2dstyle/.style={
  162. axis lines=middle, % put the axis in the middle
  163. axis line style={->}, % arrows on the axis
  164. xlabel={$x$}, % default put x on x-axis
  165. ylabel={$y$}, % default put y on y-axis
  166. zlabel={$z$}, % default put z on z-axis
  167. axis equal, % 1:1 ratio
  168. grid=both, % coordinate grid
  169. grid style={line width=.1pt, draw=gray!10},
  170. major grid style={line width=.2pt,draw=gray!50},
  171. ticks=both, % ticks for integers
  172. minor tick num=5, % number of subticks
  173. ticklabel style={font=\small,fill=white},
  174. label style={at={(ticklabel* cs:1)},anchor=north west},
  175. ylabel style={at={(ticklabel* cs:1)},anchor=south west},
  176. zlabel style={at={(ticklabel* cs:1)},anchor= west},
  177. }
  178. }
  179.  
  180. \tikzset{>=stealth}
  181.  
  182. %% New tikzcd environment so that it can be used inside a picture %%
  183.  
  184. \usepackage{environ}
  185. % activate the following such that you can check the macro expansion in
  186. % *-figure0.md5 manually
  187. %\tikzset{external/up to date check=diff}
  188.  
  189. \def\temp{&} \catcode`&=\active \let&=\temp
  190. \newcommand{\mytikzcdcontext}[2]{
  191. \begin{tikzpicture}[baseline=(maintikzcdnode.base)]
  192. \node (maintikzcdnode) [inner sep=0, outer sep=0] {\begin{tikzcd}[#2]
  193. #1
  194. \end{tikzcd}};
  195. \end{tikzpicture}}
  196. \NewEnviron{tikz-cd}[1][]{%
  197. % In the following, we need \BODY to expanded before \mytikzcdcontext
  198. % such that the md5 function gets the tikzcd content with \BODY expanded.
  199. % Howerver, expand it only once, because the \tikz-macros aren't
  200. % defined at this point yet. The same thing holds for the arguments to
  201. % the tikzcd-environment.
  202. \def\myargs{#1}%
  203. \edef\mydiagram{\noexpand\mytikzcdcontext{\expandonce\BODY}{\expandonce\myargs}}%
  204. \mydiagram%
  205. }
  206.  
  207. \tikzset{%
  208. double line with arrow/.style args={#1,#2}{%
  209. decorate,decoration={%
  210. markings,
  211. mark=at position 0 with {%
  212. \coordinate (ta-base-1) at (0,1pt);
  213. \coordinate (ta-base-2) at (0,-1pt);
  214. },%
  215. mark=at position 1 with {%
  216. \draw[#1] (ta-base-1) -- (0,1pt);
  217. \draw[#2] (ta-base-2) -- (0,-1pt);
  218. }
  219. }
  220. },
  221. Equal/.style={-,double line with arrow={-,-}}
  222. }
  223.  
  224. %%%% GENERAL COMMANDS %%%%
  225.  
  226. % Disjoint union
  227. \newcommand{\cupdot}{\charfusion[\mathbin]{\cup}{\cdot}}
  228. \newcommand{\bigcupdot}{\charfusion[\mathop]{\bigcup}{\cdot}}
  229. % A rotated \in
  230. \newcommand{\vin}{\mathbin{\text{\rotatebox[origin=c]{90}{$\in$}}}}
  231. % Complex conjugate
  232. \newcommand{\conj}[1]{\overline{#1}}
  233. % cos # + i sin #1
  234. %\newcommand{\cis}[1]{\cos\left(#1\right)+i\sin\left(#1\right)}
  235. \makeatletter
  236. \def\cis{\@ifnextchar[{\@withcis}{\@withoutcis}}
  237. \def\@withcis[#1]#2{%
  238. \cos\left(#2\right)-i\sin\left(#2\right)
  239. }
  240. \def\@withoutcis#1{%
  241. \cos\left(#1\right)+i\sin\left(#1\right)
  242. }
  243. \makeatother
  244.  
  245. % Equivalence classes
  246. \newcommand{\class}[1]{\left[#1\right]}
  247. % Such that both in and outside sets
  248. \newcommand{\Setsuchthat}{\;\ifnum\currentgrouptype=16 \middle\fi|\;}
  249. \newcommand{\suchthat}{\,:}
  250. % New command for nested fractions
  251. \everymath{\displaystyle}
  252. \newcommand\ddfrac[2]{\frac{\displaystyle #1}{\displaystyle #2}}
  253. % Definition equivalnce
  254. \newcommand{\bydef}{\overset{\text{def}}{=}}
  255. % Successions
  256. \newcommand{\suc}[2]{{\{#1\}}_{#2}}
  257. % Replace the empty set symbol
  258. \let\oldemptyset\emptyset
  259. \let\emptyset\varnothing
  260. % Negation of the implication
  261. \newcommand{\notimplies}{%
  262. \mathrel{{\ooalign{\hidewidth$\not\phantom{=}$\hidewidth\cr$\implies$}}}}
  263. % Change vector appearance
  264. \renewcommand{\vec}[1]{\mathbf{#1}}
  265. % Directional derivative
  266. \newcommand{\ddv}[3][]{\ensuremath{\mathrm{D}^{#1}_{#2}#3}}
  267. % Linear combination
  268. \newcommand{\lin}[1]{\ensuremath{\mathscr{L}\!\left(#1\right)}}
  269. % Scalar product
  270. \newcommand{\scalar}[2]{\ensuremath{\left\langle #1,\,#2 \right\rangle}}
  271. % Matrix transpose
  272. \newcommand{\transp}{^\intercal}
  273. % GL/SL/O/SO/U/SU
  274. \newcommand{\GL}[2]{\ensuremath{\mathrm{GL}\left( #1,\,#2 \right)}}
  275. \newcommand{\SL}[2]{\ensuremath{\mathrm{SL}\left(#1,\,#2\right)}}
  276. \newcommand{\Om}[1]{\ensuremath{\mathrm{O}\left(#1\right)}}
  277. \newcommand{\SO}[1]{\ensuremath{\mathrm{SO}\left(#1\right)}}
  278. \newcommand{\Um}[1]{\ensuremath{\mathrm{U}\left(#1\right)}}
  279. \newcommand{\SU}[1]{\ensuremath{\mathrm{SU}\left(#1\right)}}
  280. % R, C, N, Z
  281. \newcommand\N{\ensuremath{\mathbb{N}}}
  282. \newcommand\R{\ensuremath{\mathbb{R}}}
  283. \newcommand\Z{\ensuremath{\mathbb{Z}}}
  284. \renewcommand\O{\ensuremath{\emptyset}}
  285. \newcommand\Q{\ensuremath{\mathbb{Q}}}
  286. \renewcommand\C{\ensuremath{\mathbb{C}}}
  287. \newcommand\K{\ensuremath{\mathbb{K}}}
  288. % Continuous functions
  289. \newcommand{\cont}[3][]{\ensuremath{\mathcal{C}^{#1}\!\left(#2;\,#3\right)}}
  290. % Ball
  291. \newcommand{\ball}[3][]{\ensuremath{\mathcal{B}_{#1}\!\left(#2,\,#3\right)}}
  292. % Closure
  293. \newcommand{\closure}[2][3]{{}\mkern#1mu\overline{\mkern-#1mu#2}}
  294. % Inside
  295. \newcommand{\inside}[1]{\ensuremath{{#1}^\circ}}
  296. % Quotient
  297. \newcommand{\quot}[2]{\ensuremath{\flatfrac{#1}{#2}}}
  298. % Function restriction
  299. \newcommand\restr[2]{{% we make the whole thing an ordinary symbol
  300. \left.\kern-\nulldelimiterspace % automatically resize the bar with \right
  301. #1 % the function
  302. \vphantom{\big|} % pretend it's a little taller at normal size
  303. \right|_{#2} % this is the delimiter
  304. }}
  305. % Divides
  306. \makeatletter
  307. \def\localbig#1#2{%
  308. \sbox\z@{$\m@th#1
  309. \sbox\tw@{$#1()$}%
  310. \dimen@=\ht\tw@\advance\dimen@\dp\tw@
  311. \nulldelimiterspace\z@\left#2\vcenter to1.2\dimen@{}\right.
  312. $}\box\z@}
  313.  
  314. \newcommand{\divides}{\mathrel{\mathpalette\dividesaux\relax}}
  315. \newcommand{\ndivides}{\mathrel{\mathpalette\ndividesaux\relax}}
  316.  
  317. \newcommand{\dividesaux}[2]{\mbox{$\m@th#1\localbig{#1}|$}}
  318. \newcommand{\ndividesaux}[2]{%
  319. \mkern.5mu
  320. \ooalign{%
  321. \hidewidth$\m@th#1\localbig{#1}|$\hidewidth\cr
  322. $\m@th#1\nmid$\cr%
  323. }%
  324. }
  325. \makeatother
  326. %%%% END GENERAL COMMANDS %%%%
  327.  
  328. %%%% MATH OPERATORS %%%%
  329.  
  330. % Set image
  331. \DeclareMathOperator{\im}{im}
  332. % Identity function
  333. \DeclareMathOperator{\id}{id}
  334. % lcm
  335. \DeclareMathOperator{\mcm}{mcm}
  336. % Complex argument
  337. \DeclareMathOperator{\Arg}{Arg}
  338. % Sign of a function
  339. \DeclareMathOperator{\sgn}{sgn}
  340. % Degree of a polynomial
  341. \DeclareMathOperator{\degr}{deg}
  342. % Symmetric group
  343. \DeclareMathOperator{\Sym}{Sym}
  344. % Adjoint
  345. \DeclareMathOperator{\adj}{adj}
  346.  
  347. \renewcommand\qedsymbol{$\blacksquare$}
  348.  
  349. % Theorems, Definitions and Examples
  350.  
  351. \usepackage[theorems,skins,breakable,listings]{tcolorbox}
  352.  
  353. \definecolor{theorem1}{HTML}{ff8f00}
  354. \definecolor{theorem2}{HTML}{ffca28}
  355.  
  356. \definecolor{def1}{HTML}{2e7d32}
  357. \definecolor{def2}{HTML}{66bb6a}
  358.  
  359. \definecolor{ex1}{HTML}{1565c0}
  360. \definecolor{ex2}{HTML}{42a5f5}
  361.  
  362. \tcbset{
  363. %defstyle/.style={
  364. % breakable,
  365. % theorem style=break,
  366. % enhanced,
  367. % colframe=green!50!black,
  368. % colback=OliveGreen!10!white,
  369. % coltitle=OliveGreen!90!black,
  370. % fonttitle=\bfseries,
  371. % fontupper=\upshape,
  372. % fuzzy shadow={0.5mm}{-0.5mm}{0mm}{0.1mm}{fill=green!50!black!50!white},
  373. % boxrule=0.4pt
  374. %},
  375. defstyle/.style={
  376. breakable,
  377. theorem style=plain apart,
  378. enhanced,
  379. sharp corners,
  380. frame hidden,
  381. colbacktitle=def1,
  382. colback=def2!50!white,
  383. coltitle=white,
  384. boxrule=0pt,
  385. titlerule=1mm,
  386. titlerule style=def1!50!black,
  387. fonttitle=\upshape\bfseries,
  388. fontupper=\upshape,
  389. boxrule=0.4pt,
  390. halign=left
  391. },
  392. %exstyle/.style={
  393. % breakable,
  394. % theorem style=break,
  395. % enhanced,
  396. % colframe=blue!50!black,
  397. % colback=NavyBlue!10!white,
  398. % coltitle=NavyBlue,
  399. % fonttitle=\upshape\bfseries,
  400. % fontupper=\upshape,
  401. % fuzzy shadow={0.5mm}{-0.5mm}{0mm}{0.1mm}{fill=blue!50!black!50!white},
  402. % boxrule=0.4pt
  403. % },
  404. exstyle/.style={
  405. breakable,
  406. theorem style=plain apart,
  407. enhanced,
  408. sharp corners,
  409. frame hidden,
  410. colbacktitle=ex1,
  411. colback=ex2!50!white,
  412. coltitle=white,
  413. boxrule=0pt,
  414. titlerule=1mm,
  415. titlerule style=ex1!50!black,
  416. fonttitle=\upshape\bfseries,
  417. fontupper=\upshape,
  418. boxrule=0.4pt,
  419. halign=left
  420. },
  421. %thmstyle/.style={
  422. % breakable,
  423. % theorem style=break,
  424. % enhanced,
  425. % colframe=red!50!black,
  426. % colback=BrickRed!10!white,
  427. % coltitle=BrickRed,
  428. % fonttitle=\upshape\bfseries,
  429. % fontupper=\itshape,
  430. % fuzzy shadow={0.5mm}{-0.5mm}{0mm}{0.1mm}{fill=red!50!black!50!white},
  431. % boxrule=0.4pt
  432. %},
  433. thmstyle/.style={
  434. breakable,
  435. theorem style=plain apart,
  436. enhanced,
  437. sharp corners,
  438. frame hidden,
  439. colbacktitle=theorem1,
  440. colback=theorem2!50!white,
  441. coltitle=white,
  442. boxrule=0pt,
  443. titlerule=1mm,
  444. titlerule style=theorem1!50!black,
  445. fonttitle=\upshape\bfseries,
  446. fontupper=\itshape,
  447. boxrule=0.4pt,
  448. halign=left
  449. },
  450. proofstyle/.style={
  451. breakable,
  452. enhanced,
  453. theorem style=plain,
  454. frame hidden,
  455. sharp corners,
  456. colback=gray!15!white,
  457. boxrule=0pt,
  458. before skip=10pt,
  459. after skip=10pt,
  460. borderline west={1mm}{0pt}{darkgray},
  461. fonttitle=\bfseries,
  462. coltitle=black,
  463. title=Dimostrazione,
  464. halign=left
  465. }
  466. }
  467.  
  468. % This allows for the skins library to not be externalized by Tikz, removing problems
  469. \tcbset{shield externalize}
  470. \makeatletter
  471. % add tcblistings to \jobname.lol (list of listings)
  472. \tcbset{
  473. addtolol/.style={list entry={\kvtcb@title},add to list={lol}{subsection}},
  474. }
  475. \makeatother
  476.  
  477. \newtcbtheorem[crefname={teorema}{teoremi},Crefname={Teorema}{Teoremi},list
  478. inside=thm,number within=chapter]{Thm}{Teorema}{thmstyle}{thm}
  479. \newtcbtheorem{Proof}{Dimostrazione}{proofstyle}{}
  480. \newtcbtheorem[crefname={esempio}{esempi},Crefname={Esempio}{Esempi},list
  481. inside=ex,number within=chapter]{Ex}{Esempio}{exstyle}{ex}
  482. \newtcbtheorem[crefname={definizione}{definizioni},Crefname={Definizione}{Definizioni},list
  483. inside=def,number within=chapter]{Def}{Definizione}{defstyle}{def}
  484.  
  485. \let\marginnote\someundefinedcommand
  486. \usepackage{marginnote}
  487. \renewcommand*{\marginfont}{\footnotesize}
  488. \usepackage{caption}
  489. \usepackage{float}
  490.  
  491. %%\theoremstyle{break}
  492. %%\theoremprework{%
  493. %% \def\FrameCommand{
  494. %% {\color{BrickRed}{\hspace{-8pt}\vrule width 2pt\hspace{0.5cm}}}
  495. %% }
  496. %% \medbreak%
  497. %%}
  498. %\theorempostwork{\medbreak}
  499. %\theorembodyfont{\slshape}
  500. %%\theoremheaderfont{\kern-5mm\normalfont\bfseries}
  501. %\theoremseparator{:}
  502. %\theoremsymbol{\ensuremath{\diamondsuit}}
  503. %\newtheorem{Thm}{Teorema}
  504. %\tcolorboxenvironment{Thm}{enhanced jigsaw,colframe=BrickRed,colback=BrickRed!7,breakable,
  505. %before skip=10pt,after skip=10pt }
  506. %
  507. %%\theoremstyle{break}
  508. %%\theoremprework{%
  509. %% \def\FrameCommand{
  510. %% {\color{OliveGreen}{\hspace{-8pt}\vrule width 2pt\hspace{0.5cm}}}
  511. %% }
  512. %% \medbreak%
  513. %%}
  514. %%\theorempostwork{\medbreak}
  515. %%\theorembodyfont{\rmfamily}
  516. %%\theoremheaderfont{\kern-5mm\normalfont\bfseries}
  517. %%\theoremseparator{.}
  518. %%\theoremsymbol{\ensuremath{\clubsuit}}
  519. %%\newframedtheorem{Def}{Definizione}
  520. %
  521. %\theoremstyle{plain}
  522. %\theoremsymbol{\ensuremath{\clubsuit}}
  523. %\theorembodyfont{\upshape}
  524. %\theoremprework{\bigskip\noindent\makebox[\linewidth]{\color{OliveGreen}
  525. %\rule{\textwidth}{1pt}}}
  526. %\theorempostwork{\noindent\makebox[\linewidth]{\color{OliveGreen}
  527. %\rule{\textwidth}{1pt}}\bigskip}
  528. %\newtheorem{Def}{Definizione}
  529. %
  530. %\theoremstyle{change}
  531. %\theorembodyfont{\upshape}
  532. %\theoremsymbol{\ensuremath{\ast}}
  533. %\theoremseparator{}
  534. %\newtheorem{Ex}{Esempio}
  535. %
  536. %\theoremheaderfont{\sc}
  537. %\theorembodyfont{\upshape}
  538. %\theoremstyle{nonumberplain}
  539. %\theoremseparator{}
  540. %\theoremsymbol{\rule{1ex}{1ex}}
  541. %\newtheorem{Proof}{Dimostrazione}
  542.  
  543.  
  544.  
  545. \newcommand{\monthyear}{%
  546. \ifcase\month\or Gennaio\or Febbraio\or Marzo\or Aprile\or Maggio\or Giugno\or
  547. Luglio\or Agosto\or Settembre\or Ottobre\or Novembre\or
  548. Dicembre\fi\space\number\year
  549. }
  550.  
  551. % Reset counter for footnotes
  552. \let\oldchapter\chapter
  553. \def\chapter{%
  554. \setcounter{footnote}{0}%
  555. \oldchapter
  556. }
  557.  
  558. % Matrix with column separators
  559. \makeatletter
  560. \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  561. \hskip -\arraycolsep
  562. \let\@ifnextchar\new@ifnextchar
  563. \array{#1}}
  564. \makeatother
  565.  
  566. % Reset counter for equations
  567. \numberwithin{equation}{section}
  568.  
  569. % For an older but clearer root. Still \oldsqrt is valid %%
  570. \usepackage{letltxmacro}
  571. \makeatletter
  572. \let\oldr@@t\r@@t
  573. \def\r@@t#1#2{%
  574. \setbox0=\hbox{$\oldr@@t#1{#2\,}$}\dimen0=\ht0
  575. \advance\dimen0-0.2\ht0
  576. \setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
  577. {\box0\lower0.4pt\box2}}
  578. \LetLtxMacro{\oldsqrt}{\sqrt}
  579. \renewcommand*{\sqrt}[2][\ ]{\oldsqrt[#1]{#2} }
  580. \makeatother
  581.  
  582. % To import figures generated by Inkscape
  583. \usepackage{import}
  584. \usepackage{xifthen}
  585. \usepackage{pdfpages}
  586. \usepackage{transparent}
  587.  
  588. % Note that you can use \incfig[width]{name} to specify a width for the image.
  589. % Defaults at \marginparwidth
  590. \makeatletter
  591. \def\incfig{\@ifnextchar[{\@with}{\@without}}
  592. \def\@with[#1]#2{%
  593. \def\svgwidth{#1}
  594. \import{./figures/}{#2.pdf_tex}
  595. }
  596. \def\@without#1{%
  597. \def\svgwidth{\marginparwidth}
  598. \import{./figures/}{#1.pdf_tex}
  599. }
  600. \makeatother
  601.  
  602. \setcounter{tocdepth}{1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement