Skip to content

Commit b144dec

Browse files
committed
Adding template for Kaldi poster
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@642 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
1 parent 4239273 commit b144dec

36 files changed

Lines changed: 936 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
kaldi-poster.pdf: kaldi-poster.tex beamerthemekaldi1.sty
4+
pdflatex kaldi-poster
5+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
This currently just contains a template I modified from one of Aachen Universitys.
3+
[dan]
Lines changed: 301 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,301 @@
1+
% Copyright 2007 by
2+
% Philippe Dreuw <[email protected]> and
3+
% Thomas Deselaers <[email protected]>
4+
%
5+
% This file may be distributed and/or modified
6+
%
7+
% 1. under the LaTeX Project Public License and/or
8+
% 2. under the GNU Public License.
9+
%
10+
%
11+
% ChangeLog:
12+
%
13+
% 1.10 - imrpoved PackageWarning and PackageInfo outputs
14+
% 1.09 - bugfixed the list indention problem, can be overwritten by user with the \setdefaultleftmargin command.
15+
% - added 'printer' option for external printer definition files
16+
% 1.08 - supports external printer definition files
17+
% - added grid mode option
18+
% - renamed beamer specific variables
19+
% - added font size normalization, so that scale=1.0 is the default font size for all DIN-A(n) sizes
20+
% 1.07 - bugfixed custom size handling, portrait or landscape settings are ignored now
21+
% 1.06 - added the type1cm package for scalable math fonts
22+
% 1.05 - added version check for xkeyval package
23+
% 1.04 - added custom size handling
24+
% 1.03 - improved predefined size handling
25+
% 1.02 - minor bugfixes
26+
% 1.01 - bugfixed size handling
27+
% 1.00 - first beamerposter release
28+
%
29+
\def\beamerposter@name{beamerposter}
30+
\def\beamerposter@version{1.10}
31+
\def\beamerposter@date{2009/09/02}
32+
\def\beamerposter@msg{latex-beamer poster extension}
33+
\def\beamerposter@releaseinfo{\beamerposter@date \space v.\beamerposter@version \space \beamerposter@msg}
34+
\def\beamerposter@Error#1#2{\PackageError{\beamerposter@name}{#1}{#2}}
35+
\def\beamerposter@Warning#1{\PackageWarning{\beamerposter@name}{#1}}
36+
\def\beamerposter@Info#1{\PackageInfo{\beamerposter@name}{#1}}
37+
38+
\NeedsTeXFormat{LaTeX2e}
39+
\ProvidesPackage{\beamerposter@name}[\beamerposter@releaseinfo]
40+
\RequirePackage{xkeyval}[2006/11/18]
41+
\RequirePackage{type1cm} %% get it from ftp://cam.ctan.org/tex-archive/macros/latex/contrib/type1cm.zip
42+
\RequirePackage{fp}
43+
\RequirePackage{paralist}
44+
45+
\newif\if@beamerposter@portrait
46+
\newif\if@beamerposter@customsize
47+
\newif\if@beamerposter@extern
48+
\newif\if@beamerposter@debug
49+
50+
51+
\DeclareOptionX{size}[a0]{
52+
\beamerposter@Info{checking size input, please wait.}
53+
\XKV@cc*+[\val\nr]{#1}{a0b,a0,a1,a2,a3,a4,custom}{%
54+
\beamerposter@Info{the input \val\ \nr\ was correct, we proceed.}
55+
\ifcase\nr\relax
56+
%a0b
57+
\edef\paperwidthValue{119}
58+
\edef\paperheightValue{88}
59+
\edef\textwidthValue{116}
60+
\edef\textheightValue{88}
61+
\edef\fontscale{1.0}
62+
\or
63+
%a0
64+
\edef\paperwidthValue{118.82}
65+
\edef\paperheightValue{83.96}
66+
\edef\textwidthValue{117.82}
67+
\edef\textheightValue{82.96}
68+
\edef\fontscale{1.0}
69+
\or
70+
%a1
71+
\edef\paperwidthValue{83.96}
72+
\edef\paperheightValue{59.4}
73+
\edef\textwidthValue{82.96}
74+
\edef\textheightValue{58.4}
75+
\edef\fontscale{0.70710678} % fontscale=(1/sqrt(2))^1
76+
\or
77+
%a2
78+
\edef\paperwidthValue{59.4}
79+
\edef\paperheightValue{41.98}
80+
\edef\textwidthValue{58.4}
81+
\edef\textheightValue{40.98}
82+
\edef\fontscale{0.5} % fontscale=(1/sqrt(2))^2
83+
\or
84+
%a3
85+
\edef\paperwidthValue{41.98}
86+
\edef\paperheightValue{29.7}
87+
\edef\textwidthValue{40.98}
88+
\edef\textheightValue{28.7}
89+
\edef\fontscale{0.35355339} % fontscale=(1/sqrt(2))^3
90+
\or
91+
%a4
92+
\edef\paperwidthValue{29.7}
93+
\edef\paperheightValue{21.0}
94+
\edef\textwidthValue{28.7}
95+
\edef\textheightValue{20.0}
96+
\edef\fontscale{0.25} % fontscale=(1/sqrt(2))^4
97+
\or
98+
\@beamerposter@customsizetrue
99+
\fi
100+
}{%
101+
\beamerposter@Warning{the input \val\ was incorrect and was ignored.}
102+
}%
103+
\beamerposter@Info{finished size input check.}
104+
}
105+
\DeclareOptionX{orientation}[portrait]{
106+
\beamerposter@Info{checking orientation input, please wait.}
107+
\XKV@cc*+[\val\nr]{#1}{portrait,landscape}{%
108+
\beamerposter@Info{the input \val\ \nr\ was correct, we proceed.}
109+
\ifcase\nr\relax
110+
\@beamerposter@portraittrue
111+
\or
112+
\@beamerposter@portraitfalse
113+
\fi
114+
}{%
115+
\beamerposter@Warning{the input \val\ was incorrect and was ignored.}
116+
}%
117+
\beamerposter@Info{finished orientation check.}
118+
}
119+
\DeclareOptionX{scale}[1.0]{\edef\myfontscale{#1}\beamerposter@Info{myfontscale=\myfontscale}}
120+
\DeclareOptionX{width}{\edef\customwidth{#1}\beamerposter@Info{custom poster width=\customwidth}}
121+
\DeclareOptionX{height}{\edef\customheight{#1}\beamerposter@Info{custom poster height=\customheight}}
122+
\DeclareOptionX{debug}{\beamerposter@Info{enabled debug mode}\@beamerposter@debugtrue}
123+
\DeclareOptionX{grid}{\beamerposter@Info{enabling grid}\beamertemplategridbackground[1cm]}% Display a grid to help align images
124+
\DeclareOptionX{printer}{\edef\printerToUse{#1}\@beamerposter@externtrue}
125+
\DeclareOptionX*{\beamerposter@Warning{Unknown option ignored: \CurrentOption}}
126+
%\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{beamer}}
127+
\ExecuteOptionsX{size=a0,scale=1.0}
128+
\ProcessOptionsX\relax
129+
130+
%% enable debug mode for fp package (mainly for upn functions)
131+
\if@beamerposter@debug
132+
\FPdebugtrue
133+
\fi
134+
135+
%% normalize scale depending on poster size
136+
\FPupn{\myfontscale}{myfontscale fontscale * 2 round}
137+
138+
%% swap sizes for portrait orientation
139+
\if@beamerposter@portrait
140+
\newdimen\tmp
141+
\setlength{\tmp}{\paperwidthValue cm}
142+
\setlength{\paperwidth}{\paperheightValue cm}
143+
\setlength{\paperheight}{\tmp}
144+
\setlength{\tmp}{\textwidthValue cm}
145+
\setlength{\textwidth}{\textheightValue cm}
146+
\setlength{\textheight}{\tmp}
147+
\else
148+
\setlength{\paperwidth}{\paperwidthValue cm}
149+
\setlength{\paperheight}{\paperheightValue cm}
150+
\setlength{\textwidth}{\textwidthValue cm}
151+
\setlength{\textheight}{\textheightValue cm}
152+
\fi
153+
154+
%% overwrite dimensions if custom size
155+
\if@beamerposter@customsize
156+
\setlength{\paperwidth}{\customwidth cm}
157+
\setlength{\paperheight}{\customheight cm}
158+
\FPupn{\resulttextwidth}{1 customwidth -}
159+
\FPupn{\resulttextheight}{1 customheight -}
160+
\setlength{\textwidth}{\resulttextwidth cm}
161+
\setlength{\textheight}{\resulttextheight cm}
162+
\fi
163+
164+
%% Setting proper dimensions for a DIN A0 printer
165+
\setlength{\headheight}{0 cm}
166+
\setlength{\headsep}{0 cm}
167+
\setlength{\topmargin}{-12.7 mm} % -1in +1.47cm
168+
\setlength{\oddsidemargin}{-25.4 mm} % -1in +0.4cm
169+
170+
%% For the page layout
171+
\beamerposter@Info{paperwidth=\the\paperwidth, paperheight=\the\paperheight}
172+
\beamerposter@Info{textwidth=\the\textwidth, textwidth=\the\textheight}
173+
\beamerposter@Info{fontscale=\fontscale, myfontscale=\myfontscale}
174+
\geometry{
175+
paperwidth=\the\paperwidth,
176+
paperheight=\the\paperheight,
177+
hmargin=1cm,%
178+
vmargin=0cm,%
179+
head=0.5cm, %
180+
headsep=0pt,%
181+
foot=0.5cm %
182+
}
183+
184+
%%
185+
%% printer definition file example 'rwth-glossy-uv.df':
186+
%% ----
187+
%% \typeout{beamerposter: RWTH RZ printer, glossy paper, UV resistant, maximum settings}
188+
%% \edef\printermaxwidthValue{108} %unit should be cm
189+
%% \newlength{\printermaxwidth}
190+
%% \setlength{\printermaxwidth}{\printermaxwidthValue cm}
191+
%% ----
192+
%%
193+
%% now load printer definitions from file (e.g. \usepackage[printer=rwth-glossy-uv.df]{beamerposter}")
194+
\if@beamerposter@extern
195+
\InputIfFileExists{\printerToUse}{\typeout{load \printerToUse}}{\beamerposter@Error{\printerToUse\space not found!}{Please use another printer definition file}}
196+
\ifx\printermaxwidthValue\@empty%
197+
\relax%
198+
\else%
199+
%% @todo: calc poster ratios, scale to maximum printer size, and check if they still fit
200+
%% this here is still very basic ...
201+
\FPsub{\resultmaxwidth}{\printermaxwidthValue}{\paperwidthValue}
202+
\FPifneg{\resultmaxwidth}
203+
\beamerposter@Error{%
204+
resultmaxwidth=\resultmaxwidth \MessageBreak
205+
printermaxwidthValue=\printermaxwidthValue \MessageBreak
206+
paperwidthValue=\paperwidthValue \MessageBreak
207+
The specified poster dimensions might not be printable using
208+
'\printerToUse'.
209+
}{%
210+
Try to reduce your poster dimension and have a look at the aspect ratio.
211+
}
212+
\else
213+
\relax
214+
\fi
215+
\fi
216+
%\fi
217+
218+
%% scalable vector fonts
219+
\edef\fontSizeX{12}\edef\fontSizeY{14}
220+
\FPupn{\resulttinyX}{myfontscale fontSizeX * 2 round}
221+
\FPupn{\resulttinyY}{myfontscale fontSizeY * 2 round}
222+
\renewcommand*{\tiny}{\fontsize{\resulttinyX}{\resulttinyY}\selectfont}
223+
224+
\edef\fontSizeX{14.4}\edef\fontSizeY{18}
225+
\FPupn{\resultscriptsizeX}{myfontscale fontSizeX * 2 round}
226+
\FPupn{\resultscriptsizeY}{myfontscale fontSizeY * 2 round}
227+
\renewcommand*{\scriptsize}{\fontsize{\resultscriptsizeX}{\resultscriptsizeY}\selectfont}
228+
229+
\edef\fontSizeX{17.28}\edef\fontSizeY{22}
230+
\FPupn{\resultfootnotesizeX}{myfontscale fontSizeX * 2 round}
231+
\FPupn{\resultfootnotesizeY}{myfontscale fontSizeY * 2 round}
232+
\renewcommand*{\footnotesize}{\fontsize{\resultfootnotesizeX}{\resultfootnotesizeY}\selectfont}
233+
234+
\edef\fontSizeX{20.74}\edef\fontSizeY{25}
235+
\FPupn{\resultsmallX}{myfontscale fontSizeX * 2 round}
236+
\FPupn{\resultsmallY}{myfontscale fontSizeY * 2 round}
237+
\renewcommand*{\small}{\fontsize{\resultsmallX}{\resultsmallY}\selectfont}
238+
239+
\edef\fontSizeX{24.88}\edef\fontSizeY{30}
240+
\FPupn{\resultnormalsizeX}{myfontscale fontSizeX * 2 round}
241+
\FPupn{\resultnormalsizeY}{myfontscale fontSizeY * 2 round}
242+
\renewcommand*{\normalsize}{\fontsize{\resultnormalsizeX}{\resultnormalsizeY}\selectfont}
243+
244+
\edef\fontSizeX{29.86}\edef\fontSizeY{37}
245+
\FPupn{\resultlargeX}{myfontscale fontSizeX * 2 round}
246+
\FPupn{\resultlargeY}{myfontscale fontSizeY * 2 round}
247+
\renewcommand*{\large}{\fontsize{\resultlargeX}{\resultlargeY}\selectfont}
248+
249+
\edef\fontSizeX{35.83}\edef\fontSizeY{45}
250+
\FPupn{\resultLargeX}{myfontscale fontSizeX * 2 round}
251+
\FPupn{\resultLargeY}{myfontscale fontSizeY * 2 round}
252+
\renewcommand*{\Large}{\fontsize{\resultLargeX}{\resultLargeY}\selectfont}
253+
254+
\edef\fontSizeX{43}\edef\fontSizeY{54}
255+
\FPupn{\resultLARGEX}{myfontscale fontSizeX * 2 round}
256+
\FPupn{\resultLARGEY}{myfontscale fontSizeY * 2 round}
257+
\renewcommand*{\LARGE}{\fontsize{\resultLARGEX}{\resultLARGEY}\selectfont}
258+
259+
\edef\fontSizeX{51.6}\edef\fontSizeY{64}
260+
\FPupn{\resulthugeX}{myfontscale fontSizeX * 2 round}
261+
\FPupn{\resulthugeY}{myfontscale fontSizeY * 2 round}
262+
\renewcommand*{\huge}{\fontsize{\resulthugeX}{\resulthugeY}\selectfont}
263+
264+
\edef\fontSizeX{61.92}\edef\fontSizeY{77}
265+
\FPupn{\resultHugeX}{myfontscale fontSizeX * 2 round}
266+
\FPupn{\resultHugeY}{myfontscale fontSizeY * 2 round}
267+
\renewcommand*{\Huge}{\fontsize{\resultHugeX}{\resultHugeY}\selectfont}
268+
269+
\edef\fontSizeX{74.3}\edef\fontSizeY{93}
270+
\FPupn{\resultveryHugeX}{myfontscale fontSizeX * 2 round}
271+
\FPupn{\resultveryHugeY}{myfontscale fontSizeY * 2 round}
272+
\newcommand*{\veryHuge}{\fontsize{\resultveryHugeX}{\resultveryHugeY}\selectfont}
273+
274+
\edef\fontSizeX{89.16}\edef\fontSizeY{112}
275+
\FPupn{\resultVeryHugeX}{myfontscale fontSizeX * 2 round}
276+
\FPupn{\resultVeryHugeY}{myfontscale fontSizeY * 2 round}
277+
\newcommand*{\VeryHuge}{\fontsize{\resultVeryHugeX}{\resultVeryHugeY}\selectfont}
278+
279+
\edef\fontSizeX{107}\edef\fontSizeY{134}
280+
\FPupn{\resultVERYHugeX}{myfontscale fontSizeX * 2 round}
281+
\FPupn{\resultVERYHugeY}{myfontscale fontSizeY * 2 round}
282+
\newcommand*{\VERYHuge}{\fontsize{\resultVERYHugeX}{\resultVERYHugeY}\selectfont}
283+
284+
% set the normalfont (default)
285+
\renewcommand*{\normalfont}{\normalsize}
286+
287+
% adapt list indention (e.g. itemize/enumeration/... see paralist docu)
288+
\edef\indentionLevelValuei{4} % 4em indention for first level for an A0 poster
289+
\edef\indentionLevelValueii{2.2} % etc. ...
290+
\edef\indentionLevelValueiii{1.87}
291+
\edef\indentionLevelValueiiii{1.7}
292+
\edef\indentionLevelValueiiiii{1}
293+
\edef\indentionLevelValueiiiiii{1}
294+
\FPupn{\indentionLevelValuei}{indentionLevelValuei fontscale * 2 round}
295+
\FPupn{\indentionLevelValueii}{indentionLevelValueii fontscale * 2 round}
296+
\FPupn{\indentionLevelValueiii}{indentionLevelValueiii fontscale * 2 round}
297+
\FPupn{\indentionLevelValueiiii}{indentionLevelValueiiii fontscale * 2 round}
298+
\FPupn{\indentionLevelValueiiiii}{indentionLevelValueiiiii fontscale * 2 round}
299+
\FPupn{\indentionLevelValueiiiiii}{indentionLevelValueiiiiii fontscale * 2 round}
300+
\setdefaultleftmargin{\indentionLevelValuei em}{\indentionLevelValueii em}{\indentionLevelValueiii em}{\indentionLevelValueiiii em}{\indentionLevelValueiiiii em}{\indentionLevelValueiiiiii em}
301+
\setbeamersize{description width=\indentionLevelValuei em} % the description environment needs special treatment

0 commit comments

Comments
 (0)