[FE training-materials-updates] kernel-agenda: misc formatting improvements

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Aug 2 15:22:21 CEST 2013


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=91a932d4eab69bd5cb887ed697541882dc52fc74

>---------------------------------------------------------------

commit 91a932d4eab69bd5cb887ed697541882dc52fc74
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Fri Aug 2 15:19:03 2013 +0200

    kernel-agenda: misc formatting improvements
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


>---------------------------------------------------------------

91a932d4eab69bd5cb887ed697541882dc52fc74
 agenda/kernel-agenda.tex |   30 ++++++++++++++++++------------
 common/agenda.sty        |   35 ++++++++---------------------------
 2 files changed, 26 insertions(+), 39 deletions(-)

diff --git a/agenda/kernel-agenda.tex b/agenda/kernel-agenda.tex
index b10de76..016426d 100644
--- a/agenda/kernel-agenda.tex
+++ b/agenda/kernel-agenda.tex
@@ -10,8 +10,6 @@
 \hypersetup{pdftitle={Embedded Linux kernel and driver development training},
   pdfauthor={Free Electrons}}
 
-\fedefinelengths
-
 \begin{document}
 
 \thispagestyle{fancy}
@@ -19,14 +17,20 @@
 \setlength{\arrayrulewidth}{0.8pt}
 
 \begin{center}
-\LARGE{Embedded Linux kernel and driver development training}
+\LARGE
+Embedded Linux kernel and driver development training\\
+\large
+5 days session
 \end{center}
 \vspace{1cm}
 
 \small
-\arrayrulecolor{lightgray} {\renewcommand{\arraystretch}{1.5}
-  \begin{tabularx}{\textwidth}{| >{\columncolor{fedarkblue}} m{4cm}|
-      >{\columncolor{felightblue}} X|}
+\newcolumntype{g}{>{\columncolor{fedarkblue}}m{4cm}}
+\newcolumntype{h}{>{\columncolor{felightblue}}X}
+
+\arrayrulecolor{lightgray} {
+  \setlist[1]{itemsep=-5pt}
+  \begin{tabularx}{\textwidth}{|g|h|}
     {\bf Title} & Embedded Linux kernel and driver development
     training \\
     \hline
@@ -65,19 +69,21 @@
     \hline
 
     {\bf Required equipment} &
-    Video projector
-    \newline PC computers with at least 2 GB of RAM, and Ubuntu Linux
+    \begin{itemize}
+    \item Video projector
+    \item PC computers with at least 2 GB of RAM, and Ubuntu Linux
     installed in a {\bf free partition of at least 20 GB. Using Linux
       in a virtual machine is not supported}, because of issues
     connecting to real hardware.
-    \newline We need Ubuntu Desktop 12.04 (32 or 64 bit, Xubuntu and
+    \item We need Ubuntu Desktop 12.04 (32 or 64 bit, Xubuntu and
     Kubuntu variants are fine). We don't support other
     distributions, because we can't test all possible package versions.
-    \newline {\bf Connection to the Internet} (direct or through the
+    \item {\bf Connection to the Internet} (direct or through the
     company proxy).
-    \newline {\bf PC computers with valuable data must be backed up}
+    \item {\bf PC computers with valuable data must be backed up}
     before being used in our sessions.  Some people have already made
-    mistakes during our sessions and damaged work data.\\
+    mistakes during our sessions and damaged work data.
+    \end{itemize} \\
     \hline
 
     {\bf Materials} & Print and electronic copies of presentations and
diff --git a/common/agenda.sty b/common/agenda.sty
index 202ab9d..cf5e1fa 100644
--- a/common/agenda.sty
+++ b/common/agenda.sty
@@ -14,6 +14,7 @@
 \usepackage{titling}
 \usepackage{eurosym}
 \usepackage{ifthen}
+\usepackage{enumitem}
 
 % A nicer font
 \usepackage{palatino}
@@ -37,7 +38,7 @@
 \renewcommand{\footrulewidth}{0.5pt}
 
 \setlength{\headheight}{60pt}
-\setlength{\textheight}{650px}
+\setlength{\textheight}{670px}
 
 \definecolor{textcolor}{HTML}{4B6FA9}
 
@@ -62,33 +63,17 @@
 \newcommand{\code}[1]
 {\path{#1}}
 
-%% With tabular environments, we cannot use the normal 'l', 'c' or 'r'
-%% column specifications because those do not create paragraphs, so it
-%% is not possible to insert an itemize environment in such
-%% columns. Therefore, we have to use the 'm' column specifier, which
-%% needs a column width specification. Below, we compute the width of
-%% the columns in the case of two columns, and we must take into
-%% account the inter-column spacing so that the final array is really
-%% \textwidth in width. This is needed so that the two column arrays
-%% have exactly the same width as the one column arrays/
-\newcommand\fedefinelengths{
-\newlength\fetwocolumnwidth
-\setlength\fetwocolumnwidth{(\textwidth - \tabcolsep - \tabcolsep)/2}
-}
-
 %% Define a one column array. Two arguments are needed:
 %%  first argument: the title of the section
 %%  second argument: the contents of the section
 \newcommand\feagendaonecolumn[2]{
-\begin{tabular*}{\textwidth}{m{\textwidth}}
+\begin{tabularx}{\textwidth}{X}
   \rowcolor{fedarkblue}
-  \vspace{.1cm}
   {\bf #1}
-  \vspace{.1cm}
-  \\
+  \\[14pt]
   \rowcolor{felightblue}
   #2 \\
-\end{tabular*}
+\end{tabularx}
 \vspace{0.5cm}
 }
 
@@ -98,18 +83,14 @@
 %%  third argument: The title of the section in the right column
 %%  fourth argument: The contents of the section in the right column
 \newcommand\feagendatwocolumn[4]{
-\begin{tabular*}{\textwidth}{m{\fetwocolumnwidth} m{\fetwocolumnwidth}}
+\begin{tabularx}{\textwidth}{X X}
   \rowcolor{fedarkblue}
-  \vspace{.1cm}
   {\bf #1}
-  \vspace{.1cm}
   &
-  \vspace{.1cm}
   {\bf #3}
-  \vspace{.1cm}
-  \\
+  \\[14pt]
   \rowcolor{felightblue}
   #2 & #4 \\
-\end{tabular*}
+\end{tabularx}
 \vspace{0.5cm}
 }



More information about the training-materials-updates mailing list