custom.sty 6.93 KB
Newer Older
1
2
3
4
5
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{custom}[2018/11/23 Slide Customization]

\RequirePackage{twcolors}

Alija Sabic's avatar
Alija Sabic committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% --------------------------------------------------------------------------------------------------------------------------------
% Title Page Information
% --------------------------------------------------------------------------------------------------------------------------------
% \RequirePackage{datetime}
% \def\currentdate{\@date}
% \makeatletter \def\currentdate{\@date} \makeatother
% \def\title{Presentation Title}
% \def\subtitle{Presentation Subtitle}
% \def\shorttitle{\hspace{1.75em}\title}
% \def\authorname{Walter Subject}
% \def\authortext{\href{mailto:me@technikum-wien.at;other@technikum-wien.at?subject=\title}{Ausgef\"uhrt von: \authorname}}
% \def\studentid{Personenkennzeichen: 1234567890}
% \def\supervisortitle{Betreuer:}
% \def\supervisor{1\textsuperscript{st} Supervisor}
% \def\secondsupervisor{2\textsuperscript{nd} Supervisor}
% \def\place{Vienna}

% --------------------------------------------------------------------------------------------------------------------------------
% Colors
% --------------------------------------------------------------------------------------------------------------------------------
\def\primarycolor{tw-blue}
\def\secondarycolor{tw-green}
\def\accentcolor{tw-gray}

% ----------------------------------------------------------------------------------------------------------------------------
% Font Style
% ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{fontspec}
% \setmainfont{Ubuntu Thin}
\setsansfont{Ubuntu Light}[Scale=0.85]
36
\setmonofont{Ubuntu Mono}[Scale=0.85]
Alija Sabic's avatar
Alija Sabic committed
37
38
39

\RequirePackage{xeCJK}
\setCJKmainfont{Noto Sans SC Light}[Scale=0.85]
40

Alija Sabic's avatar
Alija Sabic committed
41
42
43
\setCJKsansfont{Noto Sans SC Light}[Scale=0.85]
\setCJKmonofont{Noto Sans SC Light}[Scale=0.85]
\setCJKsansfont{Noto Sans SC Light}[Scale=0.85]
44

Alija Sabic's avatar
Alija Sabic committed
45
46
47
48
49
50
51
52
53
54
55
% \setCJKmainfont{Noto Serif SC}
% \setCJKmainfont{Noto Sans TC Light}
% \setCJKmainfont{Noto Serif TC Light}
% \setCJKmainfont{Zhi Mang Xing Regular}
% \setCJKmainfont{ZCOOL KuaiLe Regular}
% \setCJKmainfont{Long Cang Regular}
% \setCJKmainfont{SentyWen}
% \setCJKmainfont{HanyiSentyTang}
% \setCJKmainfont{Hanyi Senty Candy}
% \setCJKmainfont{Liu Jian Mao Cao}
% \setCJKmainfont{Ma Shan Zheng}
56

Alija Sabic's avatar
Alija Sabic committed
57
58
59
60
61
62
63
% ----------------------------------------------------------------------------------------------------------------------------
% Listings
% ----------------------------------------------------------------------------------------------------------------------------
% \RequirePackage[outputdir={build},cache=false,kpsewhich=true,newfloat=true]{minted}
\RequirePackage[outputdir={build},kpsewhich=true,newfloat=true]{minted}
% \RequirePackage[finalizecache=true,outputdir={build},kpsewhich=true,newfloat=true]{minted}
% \RequirePackage[finalizecache=true,frozencache=true,outputdir={build},kpsewhich=true,newfloat=true]{minted}
64

Alija Sabic's avatar
Alija Sabic committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
\renewcommand{\theFancyVerbLine}{\ttfamily\textcolor{tw-gray}{\scriptsize\oldstylenums{\arabic{FancyVerbLine}}}}
\usemintedstyle{fhtw}
\NewDocumentCommand{\csource }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,#1]{c}{#2}}
\NewDocumentCommand{\bash    }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,rulecolor=black,fontsize=\fontsize{11}{11}\selectfont,#1]{bash}{#2}}
\NewDocumentCommand{\bat     }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,rulecolor=black,fontsize=\fontsize{11}{11}\selectfont,#1]{bat}{#2}}
\NewDocumentCommand{\html    }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,rulecolor=black,#1]{html}{#2}}
\NewDocumentCommand{\css     }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,rulecolor=black,#1]{css}{#2}}
\NewDocumentCommand{\js      }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,rulecolor=black,#1]{js}{#2}}
\NewDocumentCommand{\vue     }{ O{} m }{\inputminted[frame=single,linenos,rulecolor=black,resetmargins,numbersep=6pt,xleftmargin=0mm,xrightmargin=0mm,framesep=1mm,highlightcolor=\secondarycolor!35,rulecolor=black,fontsize=\fontsize{9}{9}\selectfont,#1]{vue}{#2}}


% ###############################################################################################################################
% ----------------------------------------------------------------------------------------------------------------------------
% Page Setup
% ----------------------------------------------------------------------------------------------------------------------------
\newcommand{\titlepagesetup}{
    \title[Web Development]{Full Stack Web Development}
    \subtitle{WS2019 - BSA5 Ausgewählte Kapitel}
    \author[Alija Sabic]{Alija Sabic}
    \mail{sabic@technikum-wien.at}
    \institute{Smart Homes and Assistive Technologies}
    \date{\today}
    \keywords{Web, WWW, HTML, CSS, JavaScript}
    \logo[3cm]{fhtw-logo.pdf}
}
90

Alija Sabic's avatar
Alija Sabic committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
\newcommand{\insertemptytitlepage}{
    \begin{frame}
    \end{frame}
}

% ----------------------------------------------------------------------------------------------------------------------------
% Bibliography/References / ToC for single standalones
% ----------------------------------------------------------------------------------------------------------------------------
\newcommand{\biblio}{
    \begin{frame}[allowframebreaks]{References}
        \label{references}
        \bibliography{references}
    \end{frame}
}

\newcommand{\bibliolist}{
% \appendix
    % Acronyms
    \begin{frame}[allowframebreaks]{Acronyms}
        \label{acronyms}
        \printacronyms
    \end{frame}

    % References
    \begin{frame}[allowframebreaks]{References}
        \label{references}
        \bibliography{references}
    \end{frame}
}
120

Alija Sabic's avatar
Alija Sabic committed
121
122
123
124
125
126
127
128
129
130
% ----------------------------------------------------------------------------------------------------------------------------
% Utlities
% ----------------------------------------------------------------------------------------------------------------------------
% \RequirePackage{menukeys}
\NewDocumentCommand{\circled}{ O{} O{} m }{%
\tikz[baseline=(char.base),#1]\node[draw,shape=circle,inner sep=0.075em,#2](char){#3};%
}%
\NewDocumentCommand{\key}{ O{} O{} m }{%
\tikz[baseline=(key.base),#1]\node[fill=tw-gray!20!white,draw,shape=rectangle,inner sep=0.25em,rounded corners=0.125em,drop shadow={shadow xshift=0.125em,shadow yshift=-0.125em,color=tw-gray},#2](key){#3};%
}%