/
langsci-tbls.sty
160 lines (130 loc) · 6.2 KB
/
langsci-tbls.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
\usepackage[framemethod=tikz]{mdframed}
\mdfsetup{skipabove=2\baselineskip,skipbelow=2\baselineskip,frametitlefont=\sffamily\bfseries\Large, needspace=4\baselineskip, splittopskip=1.5\baselineskip}
\mdfsetup{apptotikzsetting={\tikzset{mdfbackground/.append style={draw=none}}}}
\newcommand{\langscisymbol}{book}
\newlength{\trennlinie}
\setlength{\trennlinie}{.8mm}
\newcommand{\tblsboxcolor}{black}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mdfdefinestyle{yellowexercise}{%
linewidth=1.5pt, linecolor=lsYellow,
innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm,
frametitleaboveskip=15mm, frametitlebelowskip=10mm,frametitlerule=false, innertopmargin=0, repeatframetitle=false,
firstextra={\useasboundingbox (P) rectangle (P);\node[xshift=5mm,right,draw=lsYellow, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{blue}{\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.eps}}};}, % if environment is on multiple pages, print this on the first page.
singleextra={\useasboundingbox (P) rectangle (P);\node[xshift=5mm,right,draw=lsYellow, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {\color{blue}{\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.eps}}};} % if env. does not span multiple pages, print the same.
% singleextra={\node[xshift=5mm,right,draw=lsYellow, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {{\color{lsYellow}\input{langsci/graphics/book2.tex}}};} % if env. does not span multiple pages, print the same.
}
\mdfdefinestyle{greyexercise}{%
everyline=true,ignorelastdescenders=true,
linewidth=0pt,backgroundcolor=black!12,
innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=5mm,
frametitleaboveskip=15mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false,
firstextra={\useasboundingbox (P) rectangle (P);\node[xshift=5mm,right,draw=black!20, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {{\color{lsYellow}\includegraphics[width=10mm]{langsci/graphics/tbls-\langscisymbol.eps}}};}, % if environment is on multiple pages, print this on the first page.
singleextra={\useasboundingbox (P) rectangle (P);\node[xshift=5mm,right,draw=black!20, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {{\color{lsYellow}\includegraphics[width=10mm]{langsci/graphics/tbls-.\langscisymbol.eps}}};} % if env. does not span multiple pages, print the same.
% singleextra={\node[xshift=5mm,right,draw=lsYellow, line width=1.5pt,rectangle, minimum size=10mm, fill=white] at (P-|O) {{\color{lsYellow}\input{langsci/graphics/book2.tex}}};} % if env. does not span multiple pages, print the same.
}
\mdfdefinestyle{tblsbox}{%
leftline=false, rightline=false, frametitleaboveskip=5mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false, linewidth=\trennlinie, linecolor=\tblsboxcolor, innerbottommargin=5mm, innertopmargin=5mm,innerleftmargin=0mm,innerrightmargin=0
}
\mdfdefinestyle{tblsframedbox}{%
frametitleaboveskip=10mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false, linewidth=\trennlinie, linecolor=\tblsboxcolor, innerbottommargin=5mm, innertopmargin=5mm
}
\newcommand{\tblsfillcolour}{black!12}
\mdfdefinestyle{tblsfilledbox}{%
hidealllines=true, backgroundcolor=\tblsfillcolour, frametitleaboveskip=2\baselineskip, frametitlebelowskip=0mm,frametitlerule=false, repeatframetitle=false, innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=5mm
}
\mdfdefinestyle{tblsfilledcolumnbox}{% % Copy of tblsfilledbox with multicols
hidealllines=true, backgroundcolor=\tblsfillcolour, frametitleaboveskip=5mm, frametitlebelowskip=0mm,frametitlerule=false, repeatframetitle=false, innerleftmargin=5mm, innerrightmargin=5mm, innerbottommargin=5mm, innertopmargin=5mm,startinnercode={\begin{multicols}{2}},endinnercode={\end{multicols}}
}
\mdfdefinestyle{tblsframedcolumnbox}{%
frametitleaboveskip=10mm, frametitlebelowskip=5mm,frametitlerule=false, repeatframetitle=false, linewidth=\trennlinie, linecolor=\tblsboxcolor, innerbottommargin=5mm, innertopmargin=5mm, startinnercode={\begin{multicols}{2}},endinnercode={\end{multicols}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tblsbwbox}[4][]{%
\\
\noindent
\colorbox{#2}{
\parbox{.97\textwidth}{
\centering
\parbox{.9\textwidth}{
%add logo if requested
\ifthenelse{\equal{#1}{}}{\bigskip}{
\begin{flushleft}
\hspace*{3.5mm} \raisebox{0mm}[0mm][0mm]{\color{white}\includegraphics[width=10mm]{langsci/graphics/#1.eps}}
\end{flushleft}}
%add header
\boxheader{#3}
\begin{multicols*}{2}
#4
\end{multicols*}
\bigskip
}
}
}
\\[1em]
}
\newcommand{\tblsbwboxdark}[3][]{%
\noindent
\tblsbwbox[#1]{gray}{#2}{#3}
}
\newcommand{\tblsbwboxlight}[3][]{%
\noindent
\tblsbwbox[#1]{lightgray}{#2}{#3}
}
\newcommand{\tblscolboxdark}[3][]{%
\tblsbwboxdark[#1]{#2}{#3}
}
\newcommand{\tblscolboxlight}[3][]{%
\tblsbwboxlight[#1]{#2}{#3}
}
\newcommand{\tblsthinline}{\rule{\textwidth}{.8mm}}
\newcommand{\tblsthickline}{{\color{gray}\rule{\textwidth}{1.5mm}}}
\newcommand{\tblsthickcolorline}{{\color{lsYellow}\rule{\textwidth}{1.5mm}}}
\newcommand{\tblssandwich}[3]{
% \\
\medskip
\noindent
#1
\\[2em]
\boxheader{#2}
\\[1em]
\noindent%
#3
\smallskip
\noindent
#1
\\[1em]
}
\newcommand{\tblsbwthinsandwich}[2]{
\tblssandwich{\tblsthinline}{#1}{#2}
}
\newcommand{\tblsbwthicksandwich}[2]{
\tblssandwich{\tblsthickline}{#1}{#2}
}
\newcommand{\tblscolthicksandwich}[2]{
\tblssandwich{\tblsthickcolorline}{#1}{#2}
}
\newcommand{\tblscolthinsandwich}[2]{
\tblssandwich{\tblsthinline}{#1}{#2}
}
\newcommand{\tblscolframebox}[3][]{
\fboxrule.8mm
\noindent
\begin{figure}
\begin{flushleft}
\hspace*{3.5mm}
\raisebox{-10mm}[0mm][0mm]{\ifthenelse{\equal{#1}{}}{}{\includegraphics[width=10mm]{langsci/graphics/#1.eps}}} \\
\end{flushleft}
\color{lsYellow}\framebox[\textwidth]{%
\color{black}
\parbox{.92\textwidth}{%
\vspace*{.5cm}
\boxheader{#2}
\begin{multicols*}{2}
#3
\end{multicols*}
}
}
\end{figure}
}
\newcommand{\boxheader}[1]{\medskip{\Large\bfseries\sffamily #1}}