-
Notifications
You must be signed in to change notification settings - Fork 0
/
knizka_with_bloom.sty
172 lines (124 loc) · 4.13 KB
/
knizka_with_bloom.sty
1
2
3
4
5
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
90
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{knizka}[2013/01/13 Knizka na PSI]
% this bunch of code adjusts line breaks and prevents overfull hboxes is from the web
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\vfuzz \hfuzz
\raggedbottom
% Times New Roman
%\usepackage{mathptmx}
% font (vhodny aj pre slovencinu)
\RequirePackage{tgpagella}
% potrebujeme na farebny text, konkretne sedu
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
%zabrani osamotenym riadkom
\RequirePackage[all]{nowidow}
% slovencina
\RequirePackage[slovak]{babel}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{graphicx}
%biblio per chapter: use refsection = chapter, otherwise use refsection = none
\RequirePackage[refsection=none,backend=bibtex]{biblatex}
% for grammar correction purposes
%\RequirePackage[doublespacing]{setspace}
%\RequirePackage{latexsym}
%\RequirePackage{sidenotes} % This package allows the typesetting of rich content in the margin. It includes text, but also figures, captions, tables and citations, which is common in science textbooks such as Feynman’s Lectures on Physics.
% Headery nebudu uppercasom
\RequirePackage[nouppercase]{scrpage2}
\pagestyle{scrheadings}
% umozni pouzivanie \cleartoevenpage
\RequirePackage{nextpage}
% Odstrani vsetko z prazdnych stran
\RequirePackage{emptypage}
% nejake znaky ako copyright
\RequirePackage{textcomp}
% tabulky cez viac stran a krajsie
\RequirePackage{longtable}
\RequirePackage{booktabs}
% dava nalepky obrazkov a tabuliek na italic
\RequirePackage[labelfont=it, font={footnotesize,it}]{caption}
% neindentuje odstavce, ale dava medzery
\RequirePackage{parskip}
%umoznuje nakreslit layoutovacie strany
\RequirePackage{layout}
% lepsie postranne texty
\RequirePackage{marginnote}
% Zalomi strany aj pri postrannych
\RequirePackage{marginfix}
% Umozni pouzivat ifthenelse prikaz
\RequirePackage{ifthen}
% Umozni pouzivat \nohyphens{(text block)}
\RequirePackage{hyphenat}
% Umozni pouzivat \needspace{2cm}, co zabezpeci ze ak sa pri volani prikazu nenachadza na strane dost miesta, zacne sa nova.
\RequirePackage{needspace}
% umozni pridavanie pdf stranok pomocou
%\includepdf[scale=0.9, pages={1}]{concept_maps_pages/1_0.pdf}
\RequirePackage[final]{pdfpages}
%Umozni centrovat sirsie figures (potrebujeme na konceptove mapy)
\RequirePackage[export]{adjustbox}[2011/08/13]
%\RequirePackage{showframe}
\RequirePackage[paper=b5paper, left=1cm, bottom=2cm, textwidth=12.5cm, marginparwidth=2.5cm, marginparsep=0.2cm]{geometry}
\renewcommand*{\raggedleftmarginnote}{}
\renewcommand*{\raggedrightmarginnote}{}
\setlength{\oddsidemargin}{10mm}
%\setlength{\evensidemargin}{5mm}
% Tento kus kodu zabezpeci, ze margin noty budu vzdy nalavo
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}
\patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}
\reversemarginpar
\makeatother
\newenvironment{helvetica}{\fontfamily{phv}\selectfont}{\par}
% INSERT METADATA ON SIDE (Arguments: question number, bloom level, concepts)
\newcommand{\metadata}[3]
{
\marginnote{
\begin{helvetica}
\\
\small
\textbf{#1}\\
\scriptsize
\textit{
\ifthenelse{#2=1}{[1 -- Zapam\"{a}ta\v{t} si]}{}
\ifthenelse{#2=2}{[2 -- Porozumie\v{t}]}{}
\ifthenelse{#2=3}{[3 -- Aplikova\v{t}]}{}
\ifthenelse{#2=4}{[4 -- Analyzova\v{t}]}{}
\ifthenelse{#2=5}{[5 -- Zhodnoti\v{t}]}{}
\ifthenelse{#2=6}{[6 -- Tvori\v{t}]}{}
}
\\
\raggedright \nohyphens{#3}
\normalsize
\end{helvetica}
}[-5pt]
}
% This four things are for setting up the list of questions
\RequirePackage{tocloft}
\RequirePackage{environ}
\newcommand{\listquestionname}{Zoznam ot\'{a}zok}
\newlistof{question}{que}{\listquestionname}
% INSERT QUESTION (Arguments: question number, bloom level, concepts)
\NewEnviron{question}[3]
{
\needspace{2cm}
\metadata{#1}{#2}{#3}
\addcontentsline{que}{question}{\bf #1 \rm \BODY}
\bf
\BODY % and make sure there is space after here to start new par
}
{
\rm
}
% INSERT ANSWER
\newenvironment{answer}
{}
{\vspace{20pt}}
% DEFINES how heading for bibliograhpy should look like
\defbibheading{section}[\bibname]{%
\section*{#1}}
\endinput