On 2022-01-08 05:25, Daniel via lyx-users wrote:
On 2022-01-07 23:09, Anthony Macks via lyx-users wrote:
Dear LyX users,
I am nesting description lists and want to justify the text within the
nested list.
I have attached my MWE, output and a copy of what I want the output to
look like.
I am using the module "Customisable Lists (enumitem)." with the
article class. When I right click on the description label, an options
box is produced. However, the options to go in the box (I get the
options from the enumitem package) are not producing the desired effect.
Warm Regards,
Anthony
Dear Anthony,
I am not sure that it is possible to adjust the width of the label
automatically. Have you tried any of these instead?
https://tex.stackexchange.com/questions/67720/description-list-with-aligned-descriptions
Best regards,
Daniel
I should have read the thread more carefully to the end. Attached is a
tweaked version of your example.
Note:
1. The enumitem package is loaded by the enumitem module. (You don't
have to load the enumitem package manually.)
2. The Description Options you used only affected the leftmargin from
the second line of a description list onward. (It is not clear to me
what should happen in the second line from your MWE.)
3. In order to use LaTeX commands in LyX (those starting with \), you
need to put them into a TeX Code inset. (Insert > TeX Code or Ctrl+L /
Cmd+L.)
Daniel
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\begin_preamble
\usepackage{calc}
\end_preamble
\use_default_options true
\begin_modules
enumitem
\end_modules
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 12
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Description
\begin_inset Argument 1
status open
\begin_layout Plain Layout
\begin_inset ERT
status open
\begin_layout Plain Layout
leftmargin=!,labelwidth=
\backslash
widthof{
\backslash
bfseries NestedDescription1}
\end_layout
\end_inset
\end_layout
\end_inset
Description1 Here is the first description.
\end_layout
\begin_deeper
\begin_layout Description
\begin_inset Argument 1
status open
\begin_layout Plain Layout
\begin_inset ERT
status open
\begin_layout Plain Layout
leftmargin=!,labelwidth=
\backslash
widthof{
\backslash
bfseries NestedDescription1}
\end_layout
\end_inset
\end_layout
\end_inset
NestedDescription1 This is the first nested description.
\end_layout
\begin_layout Description
NestedD2 This is the second nested description.
\end_layout
\begin_layout Description
NDescription3 This is the third nested description.
\end_layout
\end_deeper
\begin_layout Description
Description2 This is the second description.
\end_layout
\end_body
\end_document
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users