tugraz_defaults.sty 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. \ProvidesPackage{tugraz_defaults}
  2. %\usepackage[hyphens]{url}
  3. \PassOptionsToPackage{bookmarks,hidelinks}{hyperref}
  4. \usepackage{hyperref}
  5. \hypersetup{breaklinks=true}
  6. \usepackage[utf8]{inputenc}
  7. % \usepackage[table,dvipsnames]{xcolor}
  8. \usepackage{amsmath} % defined by ACM
  9. \usepackage{amssymb} % defined by ACM
  10. \usepackage{array} % defined by ACM
  11. \usepackage{arydshln}
  12. \usepackage{booktabs} % defined by ACM
  13. % \usepackage{cite} % to sort citations
  14. \usepackage{collcell}
  15. \usepackage{comment}
  16. \usepackage{float}
  17. \usepackage{ifthenx}
  18. \usepackage{lipsum}
  19. \usepackage{makecell}
  20. \usepackage{multirow}
  21. \usepackage{adjustbox}
  22. \usepackage{multicol}
  23. \usepackage{nicefrac}
  24. \usepackage{paralist}
  25. \usepackage{csquotes}
  26. %\usepackage{flushend}
  27. % \usepackage{upgreek}
  28. \usepackage{siunitx}
  29. \sisetup{detect-weight=true,binary-units=true,group-separator = \text{\,}}
  30. \usepackage{threeparttable}
  31. % \PassOptionsToPackage{table}{xcolor}\usepackage{xcolor}
  32. \usepackage{xspace}
  33. \usepackage{placeins}
  34. % \usepackage[numbers,sort&compress]{natbib}
  35. \def\subheading#1{\medskip\noindent{\boldmath\textbf{#1}}~\ignorespaces}
  36. \usepackage{tabularx}
  37. \newcolumntype{Y}{>{\centering\arraybackslash}X}
  38. \usepackage{xcolor}
  39. \usepackage{fdsymbol}
  40. % ------------------------------
  41. % Fancy plots
  42. \usepackage{tikz}
  43. \usetikzlibrary{external}
  44. %\tikzexternalize[prefix=tikz/,only named=true,mode=list and make] % TODO
  45. \usepackage{pgfplots}
  46. \usepackage{pgfplotstable}
  47. \usetikzlibrary{pgfplots.groupplots}
  48. \usetikzlibrary{arrows}
  49. \usetikzlibrary{patterns}
  50. \usetikzlibrary{positioning}
  51. \usetikzlibrary{decorations.pathreplacing}
  52. \usetikzlibrary{shapes.arrows}
  53. \usetikzlibrary{shapes.geometric,shapes.misc}
  54. \usetikzlibrary{pgfplots.groupplots}
  55. \pgfplotsset{compat=newest}
  56. % ------------------------------
  57. % ------------------------------
  58. % Fancy captions
  59. \usepackage{caption}
  60. \usepackage{subcaption}
  61. \captionsetup{compatibility=false}
  62. \captionsetup[figure]{aboveskip=0.5em, belowskip=0.5em,labelfont={small},font={small}}
  63. %\captionsetup[subfigure]{skip=10pt,labelfont={bf,normal},font={bf,normal}}
  64. \captionsetup[table]{aboveskip=0.5em, belowskip=0.5em,labelfont={small},font={small}}
  65. \captionsetup[lstlisting]{labelformat=simple,skip=5pt,labelfont={small},font={small}}
  66. \captionsetup[subfloat]{font={small}}
  67. % ------------------------------
  68. \definecolor{lukasred}{HTML}{950000}
  69. \definecolor{andreasgreen}{HTML}{e9f5db}
  70. \definecolor{vsblack}{cmyk}{0,0,0,1}
  71. \definecolor{vswhite}{HTML}{24292e}
  72. \definecolor{vsbackground}{HTML}{ffffff} %background in Visual Studio
  73. \definecolor{vscomment}{HTML}{047f04} %comments in Visual Studio
  74. \definecolor{vskeyword}{HTML}{0024fe} %keywords in Visual Studio
  75. \definecolor{vsstring}{cmyk}{0,0.26,0.38,0} %strings in Visual Studio
  76. \definecolor{vsctrlflow}{HTML}{ad1eda} %if/else,switch/case etc. in Visual Studio
  77. \definecolor{vslocalvar}{HTML}{001780} %local variables in Visual Studio
  78. \definecolor{vsclass}{HTML}{1d809d} %class types in Visual Studio
  79. \definecolor{vsfunctions}{HTML}{7a5d27} %enumerations and methods in Visual Studio
  80. % ------------------------------
  81. % Fancy notes
  82. \usepackage{letltxmacro}
  83. \setlength{\marginparwidth}{1.5cm}
  84. %\reversemarginpar
  85. \usepackage{todonotes}
  86. \usepackage{marginnote}
  87. \let\marginpar\marginnote
  88. \LetLtxMacro{\oldtodo}{\todo}
  89. \renewcommand{\todo}[2][]{\tikzexternaldisable\oldtodo[fancyline,size=\footnotesize,#1]{#2}\tikzexternalenable}
  90. \renewcommand{\todo}[1]{\tikzexternaldisable\oldtodo[fancyline,size=\footnotesize]{#1}\tikzexternalenable}
  91. \newcommand{\noted}[2][]{\tikzexternaldisable\oldtodo[color=red!40,fancyline,size=\footnotesize,#1]{\textbf{Da} #2}\tikzexternalenable}
  92. \renewcommand{\noted}[1]{\tikzexternaldisable\oldtodo[color=red!40,fancyline,size=\footnotesize]{\textbf{Da} #1}\tikzexternalenable}
  93. \newcommand{\notey}[2][]{\tikzexternaldisable\oldtodo[color=violet!40,fancyline,size=\footnotesize,#1]{\textbf{Y} #2}\tikzexternalenable}
  94. \renewcommand{\notey}[1]{\tikzexternaldisable\oldtodo[color=violet!40,fancyline,size=\footnotesize]{\textbf{Y} #1}\tikzexternalenable}
  95. \newcommand{\notema}[2][]{\tikzexternaldisable\oldtodo[color=blue!40,fancyline,size=\footnotesize,#1]{\textbf{Ma} #2}\tikzexternalenable}
  96. \renewcommand{\notema}[1]{\tikzexternaldisable\oldtodo[color=blue!40,fancyline,size=\footnotesize]{\textbf{Ma} #1}\tikzexternalenable}
  97. \newcommand{\notel}[2][]{\tikzexternaldisable\oldtodo[color=lukasred,fancyline,size=\footnotesize,#1]{\textbf{L} #2}\tikzexternalenable}
  98. \renewcommand{\notel}[1]{\tikzexternaldisable\oldtodo[color=lukasred,fancyline,size=\footnotesize]{\textbf{L} #1}\tikzexternalenable}
  99. \newcommand{\notea}[2][]{\tikzexternaldisable\oldtodo[color=andreasgreen,fancyline,size=\footnotesize,#1]{\textbf{A} #2}\tikzexternalenable}
  100. \renewcommand{\notea}[1]{\tikzexternaldisable\oldtodo[color=andreasgreen,fancyline,size=\footnotesize]{\textbf{A} #1}\tikzexternalenable}
  101. \newcommand{\notej}[2][]{\tikzexternaldisable\oldtodo[color=blue!40,fancyline,size=\footnotesize,#1]{\textbf{J} #2}\tikzexternalenable}
  102. \renewcommand{\notej}[1]{\tikzexternaldisable\oldtodo[color=blue!40,fancyline,size=\footnotesize]{\textbf{J} #1}\tikzexternalenable}
  103. \newcommand{\notef}[2][]{\tikzexternaldisable\oldtodo[color=yellow!40,fancyline,size=\footnotesize,#1]{\textbf{F} #2}\tikzexternalenable}
  104. \renewcommand{\notef}[1]{\tikzexternaldisable\oldtodo[color=yellow!40,fancyline,size=\footnotesize]{\textbf{F} #1}\tikzexternalenable}
  105. \newcommand{\notes}[2][]{\tikzexternaldisable\oldtodo[color=orange!40,fancyline,size=\footnotesize,#1]{\textbf{S} #2}\tikzexternalenable}
  106. \renewcommand{\notes}[1]{\tikzexternaldisable\oldtodo[color=orange!60,fancyline,size=\footnotesize]{\textbf{S} #1}\tikzexternalenable}
  107. \newcommand{\TODO}{\hl{TODO}\xspace }
  108. % ------------------------------
  109. % ------------------------------
  110. % Fancy figures
  111. \usepackage{xparse}
  112. \setdefaultleftmargin{1.5em}{}{}{}{.5em}{.5em}
  113. \NewDocumentEnvironment{figureA}{omo}{\begin{figure}[#1]\tikzsetnextfilename{#2}\centering}{\IfNoValueTF {#3}{}{\caption{#3}}\label{fig:#2}\end{figure}}
  114. \NewDocumentEnvironment{subfigureA}{ommo}{\begin{subfigure}[#1]{#2}\tikzsetnextfilename{#3}\centering}{\IfNoValueTF {#4}{}{\caption{#4}}\label{fig:#3}\end{subfigure}}
  115. \NewDocumentEnvironment{figureA*}{omo}{\begin{figure*}[#1]\tikzsetnextfilename{#2}\centering}{\IfNoValueTF {#3}{}{\caption{#3}}\label{fig:#2}\end{figure*}}
  116. \NewDocumentEnvironment{subfigureA*}{ommo}{\begin{subfigure*}[#1]{#2}\tikzsetnextfilename{#3}\centering}{\IfNoValueTF {#4}{}{\caption{#4}}\label{fig:#3}\end{subfigure*}}
  117. % ------------------------------
  118. % ------------------------------
  119. % Fancy algorithms and code
  120. \usepackage{algorithmic}
  121. \usepackage[ruled]{algorithm2e}
  122. \usepackage{listings}
  123. \newfloat{listing}{tbhp}{lst}%[section]
  124. \floatname{listing}{Listing}
  125. \lstset{ %
  126. backgroundcolor=\color{vsbackground},
  127. basicstyle=\scriptsize\bf\ttfamily\upshape\color{vswhite},
  128. belowcaptionskip=1\baselineskip,
  129. breakatwhitespace=true,
  130. breakautoindent=false,
  131. breakindent=0pt,
  132. breaklines=true, % sets automatic line breaking
  133. captionpos=b, % sets the caption-position to bottom
  134. columns=fixed,
  135. commentstyle=\color{vscomment},
  136. emphstyle={[2]\color{vslocalvar}},
  137. emphstyle={[3]\color{vsclass}},
  138. emphstyle={[4]\color{vsfunctions}},
  139. emphstyle=\color{vsctrlflow},
  140. escapeinside={(*@}{@*)},
  141. extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
  142. frame=single, % adds a frame around the code
  143. %framesep=5pt,
  144. framexleftmargin=13pt,
  145. framexrightmargin=-20.5pt,
  146. keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
  147. keywordstyle=\color{vskeyword},
  148. language=C, % the language of the code
  149. %linewidth=\listingwidth,
  150. morecomment=[s][\color{vscomment}]{/*-}{*/},
  151. morecomment=[s][\color{vscomment}]{/*+}{*/},
  152. numbers=left, % where to put the line-numbers; possible values are (none, left, right)
  153. numbersep=4pt, % how far the line-numbers are from the code
  154. numberstyle=\tiny\bf\color{vsblack},
  155. postbreak=\mbox{\textcolor{red}{->}\space},
  156. rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
  157. rulecolor=\color{vsbackground},
  158. rulesep=0pt,
  159. showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
  160. showstringspaces=false, % underline spaces within strings only
  161. showtabs=false, % show tabs within strings adding particular underscores
  162. stringstyle=\color{vsstring},
  163. tabsize=2, % sets default tabsize to 2 spaces
  164. xleftmargin=10pt,
  165. xrightmargin=10pt
  166. }
  167. \lstdefinelanguage
  168. [x64]{Assembler} % add a "x64" dialect of Assembler
  169. [x86masm]{Assembler} % based on the "x86masm" dialect
  170. % with these extra keywords:
  171. {morekeywords={CDQE,CQO,CMPSQ,CMPXCHG16B,JRCXZ,LODSQ,MOVSXD, %
  172. POPFQ,PUSHFQ,SCASQ,STOSQ,IRETQ,RDTSCP,SWAPGS, %
  173. rax,rdx,rcx,rbx,rsi,rdi,rsp,rbp, %
  174. r8,r8d,r8w,r8b,r9,r9d,r9w,r9b}} % etc.
  175. \lstdefinestyle{cpp}
  176. {
  177. language=c++,
  178. % syntax higlights
  179. morekeywords={partial, var, value, get, set, uint64\_t, func},
  180. % control flow
  181. emph={if, else, return, throw, switch, case, for, repeat},
  182. % local vars
  183. emph={[2]start, end, samples, N, L, cache\_line, victim_cache_line,KEY_FLAG_REVOKED,keyring,ns},
  184. % class and structs
  185. emph={[3]SomeOwnClassType, Measurement, Sample, key},
  186. % functions
  187. emph={[4]measure,fill,ioctl,measure_power,record_sample,diff,access,find\_keyring\_by\_name,list\_for\_each\_entry,test\_bit,kuid_has_mapping,keyctl_join_session_keyring,KEYCTL_JOIN_SESSION_KEYRING},
  188. }
  189. \usepackage{fancyvrb}
  190. \lstdefinestyle{asm}
  191. {
  192. language={[x64]Assembler},
  193. % syntax higlights
  194. morekeywords={ud2,syscall,movq,prefetcht0},
  195. % control flow
  196. emph={},
  197. % local vars
  198. emph={[2]victim\_cache\_line,MSR\_PKG\_POWER\_LIMIT},
  199. % class and structs
  200. emph={[3]rip,rax,rdx,eax,rsp},
  201. % functions
  202. emph={[4]module\_ioctl,misspeculation,retpoline,retpoline\_end},
  203. }
  204. \newcommand\Highlight[1]{\underline{\textcolor{red}{#1}}}
  205. \newcommand\HighlightB[1]{\textbf{\textcolor{blue}{#1}}}
  206. \newcommand\HighlightD[1]{{\textcolor{green!80!black}{#1}}}
  207. \newenvironment{Plain}[1][]
  208. { \VerbatimEnvironment%
  209. \begin{Verbatim}[#1]}
  210. { \end{Verbatim} }
  211. % ------------------------------
  212. % ------------------------------
  213. % New commands
  214. \newcommand{\gbr}[1]{\left\{#1\right\}}
  215. %\DeclareMathOperator{\KB}{KB}
  216. \newcommand{\SIx}[1]{\num{#1}\relax}
  217. %\DeclareMathOperator*{\argmax}{arg\,max}
  218. %\DeclareMathOperator*{\argmin}{arg\,min}
  219. \newcommand{\xor}{\oplus}
  220. \newcommand{\etal}{et~al.\ } % typography nerd
  221. \newcommand{\ie}{\textit{i.e.},\ } % typography nerd
  222. \newcommand{\eg}{e.g.,\ } % typography nerd
  223. \newcommand{\cf}{cf.\ } % typography nerd
  224. \newcommand{\KeyDrown}{\emph{KeyDrown}\xspace}
  225. \newcommand{\FlushOnly}{Flush+Flush\xspace}
  226. \newcommand{\clflush}{\texttt{clflush}\xspace}
  227. \newcommand{\FlushReload}{Flush+\allowbreak Reload\xspace}
  228. \newcommand{\EvictReload}{Evict+\allowbreak Reload\xspace}
  229. \newcommand{\EvictTime}{Evict+\allowbreak Time\xspace}
  230. \newcommand{\PrimeProbe}{Prime+\allowbreak Probe\xspace}
  231. \newcommand{\MultiPrimeProbe}{Multi-\allowbreak Prime+\allowbreak Probe\xspace}
  232. \newcommand{\FlushFlush}{Flush+\allowbreak Flush\xspace}
  233. \newcommand{\GTKplus}{\emph{GTK+}\xspace}
  234. \newcommand{\libgdk}{\emph{libgdk}\xspace}
  235. \newcommand{\OnePlus}{OnePlus 3t\xspace}
  236. \newcommand{\FScore}{F-score\xspace}
  237. \newcommand{\ReqOne}{\emph{R1}\xspace}
  238. \newcommand{\ReqTwo}{\emph{R2}\xspace}
  239. \newcommand{\ReqThree}{\emph{R3}\xspace}
  240. \usepackage{pifont}
  241. \newcommand{\xmark}{\leavevmode{\color{red}\ding{55}}}%
  242. \newcommand{\cmark}{\leavevmode{\color{TolDarkGreen}\ding{51}}}%
  243. \newcommand{\tmark}{\leavevmode{\color{orange!90!red}\large $\mathbf{\thicksim}$}}%
  244. \mathchardef\mhyphen="2D
  245. \newcommand*\circled[1]{\tikz[baseline=(char.base)]{
  246. \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
  247. \newcommand*\circledb[1]{\tikz[baseline=(char.base)]{
  248. \node[shape=circle,draw,inner sep=2pt,fill=black,text=white] (char) {#1};}}
  249. \newcommand*\circleds[1]{\tikz[baseline=(char.base)]{
  250. \node[shape=circle,draw,inner sep=1pt] (char) {\footnotesize #1};}}
  251. \newcommand*\circledsb[1]{\tikz[baseline=(char.base)]{
  252. \node[shape=circle,draw,inner sep=0.7pt,fill=black,text=white] (char) {\footnotesize #1};}}
  253. % ------------------------------
  254. \newcommand{\FakeMarker}{{\color{red}$\blacktriangle$}}
  255. \newcommand{\RealMarker}{{\color{green}$\bullet$}}
  256. \newfloat{lstfloat}{htbp}{lop}
  257. \floatname{lstfloat}{Listing}
  258. \usepackage{epsdice}
  259. \usepackage{soul}
  260. \usepackage[noabbrev,capitalize]{cleveref}
  261. % correct bad hyphenation here
  262. \hyphenation{op-tical net-works semi-conduc-tor row-ham-mer}
  263. \widowpenalty10000
  264. \clubpenalty10000
  265. % plot default colors
  266. \definecolor{TolDarkPurple}{HTML}{332288}
  267. \definecolor{TolDarkBlue}{HTML}{6699CC}
  268. \definecolor{TolLightBlue}{HTML}{88CCEE}
  269. \definecolor{TolLightGreen}{HTML}{44AA99}
  270. \definecolor{TolDarkGreen}{HTML}{117733}
  271. \definecolor{TolDarkBrown}{HTML}{999933}
  272. \definecolor{TolLightBrown}{HTML}{DDCC77}
  273. \definecolor{TolDarkRed}{HTML}{661100}
  274. \definecolor{TolLightRed}{HTML}{CC6677}
  275. \definecolor{TolLightPink}{HTML}{AA4466}
  276. \definecolor{TolDarkPink}{HTML}{882255}
  277. \definecolor{TolLightPurple}{HTML}{AA4499}
  278. % plot
  279. \definecolor{PlotColorBlue}{HTML}{2C7FB8}
  280. \definecolor{PlotColorRed}{HTML}{F03B20}
  281. \definecolor{PlotColorGreen}{HTML}{31A354}
  282. % colors
  283. \definecolor{red}{HTML}{F03B20}
  284. \definecolor{yellow}{HTML}{F5EE9A}
  285. \definecolor{green}{HTML}{BEDB39}
  286. \definecolor{blue}{HTML}{2C7FB8}
  287. \pgfplotscreateplotcyclelist{mbarplot cycle}{%
  288. {draw=TolDarkBlue, fill=TolDarkBlue!70},
  289. {draw=TolLightBrown, fill=TolLightBrown!70},
  290. {draw=TolLightGreen, fill=TolLightGreen!70},
  291. {draw=TolDarkPink, fill=TolDarkPink!70},
  292. {draw=TolDarkPurple, fill=TolDarkPurple!70},
  293. {draw=TolDarkRed, fill=TolDarkRed!70},
  294. {draw=TolDarkBrown, fill=TolDarkBrown!70},
  295. {draw=TolLightRed, fill=TolLightRed!70},
  296. {draw=TolLightPink, fill=TolLightPink!70},
  297. {draw=TolLightPurple, fill=TolLightPurple!70},
  298. {draw=TolLightBlue, fill=TolLightBlue!70},
  299. {draw=TolDarkGreen, fill=TolDarkGreen!70},
  300. }
  301. \pgfplotscreateplotcyclelist{mlineplot cycle}{%
  302. {TolDarkBlue, mark=*, mark size=1.5pt},
  303. {TolLightBrown, mark=square*, mark size=1.3pt},
  304. {TolLightGreen, mark=triangle*, mark size=1.5pt},
  305. {TolDarkBrown, mark=diamond*, mark size=1.5pt},
  306. }
  307. \pgfplotsset{
  308. compat=1.9
  309. }
  310. \pgfplotsset{
  311. mlineplot/.style={
  312. % mbaseplot,
  313. % xmajorgrids=true,
  314. % ymajorgrids=true,
  315. % major grid style={dotted},
  316. % axis x line=bottom,
  317. % axis y line=left,
  318. % legend style={
  319. % cells={anchor=west},
  320. % draw=none
  321. % },
  322. % cycle list name=mlineplot cycle,
  323. },
  324. }
  325. \pgfplotsset{
  326. mbarplot base/.style={
  327. mbaseplot,
  328. bar width=6pt,
  329. axis y line*=none,
  330. },
  331. }
  332. \pgfplotsset{
  333. mbarplot/.style={
  334. mbarplot base,
  335. ybar,
  336. xmajorgrids=false,
  337. ymajorgrids=true,
  338. area legend,
  339. legend image code/.code={%
  340. \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm);
  341. },
  342. cycle list name=mbarplot cycle,
  343. },
  344. }
  345. \pgfplotsset{
  346. horizontal mbarplot/.style={
  347. mbarplot base,
  348. xmajorgrids=true,
  349. ymajorgrids=false,
  350. xbar stacked,
  351. area legend,
  352. legend image code/.code={%
  353. \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm);
  354. },
  355. cycle list name=mbarplot cycle,
  356. },
  357. }
  358. \pgfplotsset{
  359. mbaseplot/.style={
  360. legend style={
  361. draw=none,
  362. fill=none,
  363. cells={anchor=west},
  364. },
  365. x tick label style={
  366. font=\footnotesize
  367. },
  368. y tick label style={
  369. font=\footnotesize
  370. },
  371. legend style={
  372. font=\footnotesize
  373. },
  374. major grid style={
  375. dotted,
  376. },
  377. axis x line*=bottom,
  378. },
  379. disable thousands separator/.style={
  380. /pgf/number format/.cd,
  381. 1000 sep={}
  382. },
  383. }
  384. \usepackage{diagbox}
  385. \usepackage{oplotsymbl}
  386. \LetLtxMacro{\oldcircletfill}{\circletfill}
  387. \LetLtxMacro{\oldcirclet}{\circlet}
  388. \LetLtxMacro{\oldcircletfillhl}{\circletfillhl}
  389. \renewcommand{\circletfill}{\raisebox{-0.9pt}{\tikzsetnextfilename{circletfill}\oldcircletfill}}
  390. \renewcommand{\circlet}{\raisebox{-0.9pt}{\tikzsetnextfilename{circlet}\oldcirclet}}
  391. \renewcommand{\circletfillhl}{\raisebox{-0.9pt}{\tikzsetnextfilename{circletfillhl}\oldcircletfillhl}}
  392. \newcommand{\cmarkfull}{\multicolumn{1}{c} {\circletfill \phantom{*}}}
  393. \newcommand{\cmarkempty}{\multicolumn{1}{c} {\circlet \phantom{*}}}
  394. \newcommand{\cmarkhalf}{\multicolumn{1}{c} {\circletfillhl \phantom{*}}}
  395. \newcommand{\cstarletfill}{\multicolumn{1}{c} {\starletfill \phantom{*}}}
  396. \newcommand{\cstarlet}{\multicolumn{1}{c} {\starlet \phantom{*}}}
  397. \newcommand{\cmarkfulls}{\multicolumn{1}{c} {\circletfill *}}
  398. \newcommand{\cmarkemptys}{\multicolumn{1}{c} {\circlet *}}
  399. \newcommand{\cmarkhalfs}{\multicolumn{1}{c} {\circletfillhl *}}
  400. \newcommand{\cmarkfulld}{\multicolumn{1}{c} {\circletfill $^\dagger$}}
  401. \newcommand{\cmarkemptyd}{\multicolumn{1}{c} {\circlet $^\dagger$}}
  402. \newcommand{\cmarkhalfd}{\multicolumn{1}{c} {\circletfillhl $^\dagger$}}
  403. % cite authors
  404. % \newcommand{\citeA}[1]{\citeauthor{#1}~\cite{#1}}
  405. % micro ops
  406. \newcommand{\muop}{$\mu$OP\xspace}
  407. \newcommand{\muops}{$\mu$OPs\xspace}
  408. \lstdefinestyle{python}{
  409. language=python,
  410. % syntax higlights
  411. morekeywords={False, True},
  412. % control flow
  413. emph={if, else, return, throw, switch, case, for, repeat, import},
  414. % local vars
  415. emph={[2]cpu, self, stable_periode, STABLE, PWRSAVE, POWERSAVE},
  416. % class and structs
  417. emph={[3]SUIT_DOWN_simple, PowerState},
  418. % functions
  419. emph={[4]__init__, disabled_instruction_ex_handler, timer_interrupt_handler},
  420. }
  421. \lstdefinestyle{cppinline}{
  422. style = cpp,
  423. basicstyle=\small\bf\ttfamily\upshape\color{vswhite},
  424. }
  425. \lstdefinestyle{asminline}{
  426. style = asm,
  427. basicstyle=\small\bf\ttfamily\upshape\color{vswhite},
  428. }
  429. \lstdefinestyle{pythoninline}{
  430. style = python,
  431. basicstyle=\small\bf\ttfamily\upshape\color{vswhite},
  432. }
  433. \newcommand{\asm}[1]{\lstinline[style=asm]{#1}\xspace}
  434. \newcommand{\cpp}[1]{\lstinline[style=cpp]{#1}\xspace}
  435. \newcommand{\py}[1]{\lstinline[style=python]{#1}\xspace}