The code given here can be used to adjust the items and text in description environment. I wonder how to use these options [leftmargin=!,labelwidth=\widthof{\bfseries The longest label}] with beamer in LyX. Thanks
- 8,587
2 Answers
A workaround is to not use a list at all, but a table where the first column is an l column, and the second is a p column. Add a table with Insert --> Table, or the corresponding button on the toolbar, remove all horizontal and vertical lines, and make it two columns. Right click a cell in the second column, and choose More --> Settings. Set the width to a specific value, this will allow for line breaking in the second column. Make the first column left aligned.
Original answer -- doesn't work for beamer
Add the Customisable lists (enumitem) module, in Document --> Settings --> Modules.
To use
\widthofyou need to load thecalcpackage, so in Document --> Settings --> LaTeX preamble add\usepackage{calc}Right click the first entry in the list, choose Insert short title.
Add an ERT in the opt box, with Ctrl + L.
Write
leftmargin=!,labelwidth=\widthof{\bfseries The longest label}in the ERT.
You can also define global settings for all description lists, as I mention in my answer to Description-like environment with fixed labels width
- 206,688
Got it!!!
Add
\defbeamertemplate{description item}{align left}{\insertdescriptionitem\hfill}in preamble.Use
descriptionenvironment inLyX.Add
\setbeamertemplate{description item}[align left]in ERT before thedescriptionenvironment inLyX.Right click the first entry in the list, choose Insert Longest label.
Add an ERT in the opt box, with Ctrl + L.
Write
The longest labelin the ERT.
- 8,587
enumitemisn't compatible withbeamer, sorry. I don't have any alternative at the moment. – Torbjørn T. Mar 04 '14 at 16:21\usedescriptionitemofwidthas{The longest label}. This is partial solution which adjust the text but doesn't align theitems. – MYaseen208 Mar 04 '14 at 17:01