[FE training-materials-updates] Modify slightly the behaviour of the description environment to make it less glitchy when using long items

maxime.ripard at free-electrons.com maxime.ripard at free-electrons.com
Mon Apr 16 17:04:25 CEST 2012


- Log -----------------------------------------------------------------
http://git.free-electrons.com/training-materials/commit/?id=c417bb2020776c1ed20fb90cb49e420f86fcfe09

commit c417bb2020776c1ed20fb90cb49e420f86fcfe09
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date:   Mon Apr 16 17:04:29 2012 +0200

    Modify slightly the behaviour of the description environment to make it less glitchy when using long items
    
    Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>

diff --git a/common/beamerthemeFreeElectrons.sty b/common/beamerthemeFreeElectrons.sty
index 8b20146..0b8903f 100644
--- a/common/beamerthemeFreeElectrons.sty
+++ b/common/beamerthemeFreeElectrons.sty
@@ -44,8 +44,17 @@
  {\begin{block}{}}
  {\end{block}}
 
-
-
+% Rewrite the description environment so that it doesn't put the item
+% and the description on the same line, leading to weird behaviour
+% with long items
+\let\origdescription\description
+\renewenvironment{description}{
+  \setlength{\leftmargini}{0em}
+  \origdescription
+  \setlength{\itemindent}{0em}
+  \setlength{\labelsep}{\textwidth}
+}
+{\endlist}
 
 %% Mode presentation
 \mode<presentation>

-----------------------------------------------------------------------

Summary of changes:
 common/beamerthemeFreeElectrons.sty |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)


More information about the training-materials-updates mailing list