-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtalktables.sty
124 lines (123 loc) · 2.71 KB
/
talktables.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
%
% Putting the talks (program) in tabu tables
%
% Tias Guns
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{talktables}[2014/12/08]
\usepackage{tabu}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{truncate}
\usepackage{hhline}
\usepackage{colortbl}
\newenvironment{talktable}[1]{%
\begin{tabu} to \linewidth {c *{#1}{X} }
}{
\end{tabu}
}%
\newcommand{\HeaderTitle}[1]{%
\multicolumn{1}{c}{\bf #1}%
}%
\newcommand{\HeaderSubtitle}[1]{%
\multicolumn{1}{c}{#1}%
}%
\newcommand{\TalkTitle}[1]{%
{#1}%
}%
\newcommand{\TalkSpeaker}[1]{%
\ifx\hfuzz#1\hfuzz\else{\small #1}\fi%
}%
\newcommand{\TalkSpeakerTrunc}[1]{%
{\truncate{\linewidth}{\TalkSpeaker{#1}}}%
}%
\newcommand{\CellBG}{%
\cellcolor{gray!20}%
}%
\newcommand{\CellTalk}[3]{%
%
% #1: nr rows
% #2: Title
% #3: Authors
%
\multirow{-#1}{\linewidth}{%
\CellBG%
\begin{minipage}{\linewidth}
\TalkTitle{#2}\\%
\ifx\hfuzz#3\hfuzz\else%
$ $\\
\TalkSpeaker{#3}%
\fi
\end{minipage}%
}%
}%
\newcommand{\CellTalkCompact}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\begin{minipage}{\linewidth}
\TalkTitle{#2}\vspace*{0.10em}\\
\TalkSpeaker{#3}%
\end{minipage}%
}%
}%
\newcommand{\CellTalkAuthorTrunk}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\begin{minipage}{\linewidth}
\TalkTitle{#2}\vspace*{0.10em}\\
\TalkSpeakerTrunc{#3}%
\end{minipage}%
}%
}%
\newcommand{\CellTalkMsgTrunk}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\begin{minipage}{\linewidth}
\TalkTitle{\truncate{\linewidth}{#2}}\vspace*{0.15em}\\
\TalkSpeaker{#3}%
\end{minipage}%
}%
}%
\newcommand{\CellTalkTrunkTrunk}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\begin{minipage}{\linewidth}
\TalkTitle{\truncate{\linewidth}{#2}}\vspace*{0.15em}\\
\TalkSpeakerTrunc{#3}%
\end{minipage}%
}%
}%
\newcommand{\CellTalkInline}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\begin{minipage}{\linewidth}
\TalkTitle{#2}\quad\TalkSpeaker{-- #3}%
\end{minipage}%
}%
}%
\newcommand{\CellTalkSingleSmall}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\TalkTitle{\truncate{\linewidth}{\small#2}}%
}%
}%
\newcommand{\CellTalkSingle}[3]{%
\multirow{-#1}{\linewidth}{%
\CellBG%
\TalkTitle{\truncate{\linewidth}{#2}}%
}%
}%
%
% Based on: http://tex.stackexchange.com/questions/41758/how-can-i-reproduce-this-table-with-thick-lines
\newcommand{\thickcline}[3]{%
\omit
\@multicnt#1%
\advance\@multispan\m@ne
\ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
\@multicnt#2%
\advance\@multicnt-#1%
\advance\@multispan\@ne
\leaders\hrule\@height#3\hfill
\cr
\noalign{\vskip-#3}%
}