When using "LatexType Environment" with "LabelType Enumerate" produces the following latex code, where "req2" is correctly identified in the GUI the same as "req1", but does not appear in the latex code: \usepackage{babel} \begin{document} \begin{rqmt}{req1} req1 desc \begin{rqmt}{req1.1} \end{rqmt} req1.1 desc req2 desc\end{rqmt} \end{document} req2 desc\end{rqmt}
I believe that it should generate the following latex: \begin{document} \begin{rqmt}{req1} req1 desc \begin{rqmt}{req1.1} \end{rqmt} req1.1 desc \end{rqmt} \begin{rqmt}{req2} req2 desc \end{rqmt} \end{document} LyX source: #LyX 2.0 created this file. For more info see http://www.lyx.org/ \lyxformat 413 \begin_document \begin_header \textclass book \begin_preamble \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{4} \newcounter{reqlevel} \setcounter{reqlevel}{1} \usepackage{tocloft} \usepackage{nameref} \usepackage{refstyle} %\usepackage{environ} \newcommand{\listrqmtname}{List of rqmts} \newref{req}{% refcmd={~\ref{#1},~`\nameref{#1}'}, name = {Requirement~}, names = {Requirement~}, Name = {Requirement~}, Names = {Requirement~} } \newlistof{rqmt}{req}{\listrqmtname} \newlistentry[rqmt]{subrqmt}{req}{1} \newlistentry[subrqmt]{subsubrqmt}{req}{1} \newlistentry[subsubrqmt]{subsubsubrqmt}{req}{1} \makeatletter \newcommand{\rqmtcmd}[1]{% arg:#1\par \def\@currentlabelname{#1} \refstepcounter{rqmt} \par\noindent\textbf{Requirement \therqmt: #1} \addcontentsline{req}{rqmt}{text\protect\numberline{\therqmt}#1} \par } \newcommand{\subrqmtcmd}[1]{% \def\@currentlabelname{#1} \refstepcounter{subrqmt} \par\noindent\textbf{rqmt \thesubrqmt: #1} \addcontentsline{req}{subrqmt}{\protect\numberline{\thesubrqmt}#1} \par } \newcommand{\subsubrqmtcmd}[1]{% \def\@currentlabelname{#1} \refstepcounter{subsubrqmt} \par\noindent\textbf{rqmt \thesubsubrqmt: #1} \addcontentsline{req}{subsubrqmt}{\protect\numberline{\thesubsubrqmt}#1} \par } \newcommand{\subsubsubrqmtcmd}[1]{% \def\@currentlabelname{#1} \refstepcounter{subsubsubrqmt} \par\noindent\textbf{rqmt \thesubsubsubrqmt: #1} \addcontentsline{req}{subsubsubrqmt}{\protect\numberline{\thesubsubsubrq mt}#1} \par } \cftsetindents{subsubsubrqmt}{1.5em}{3.0em} \setcounter{reqdepth}{4} \newcommand{\dorqmtcmd}[1]{\rqmtcmd{#1}} \newenvironment{rqmt}[1]{% \ifnum\thereqlevel=1\renewcommand{\dorqmtcmd}[1]{\rqmtcmd{#1}}\fi \ifnum\thereqlevel=2\renewcommand{\dorqmtcmd}[1]{\subrqmtcmd{#1}}\fi \ifnum\thereqlevel=3\renewcommand{\dorqmtcmd}[1]{\subsubrqmtcmd{#1}}\fi \ifnum\thereqlevel=4\renewcommand{\dorqmtcmd}[1]{\subsubsubrqmtcmd{#1}}\ fi \dorqmtcmd{#1} \addtocounter{reqlevel}{1} } { \par \addtocounter{reqlevel}{-1} } \end_preamble \use_default_options true \maintain_unincluded_children false \begin_local_layout Counter rqmtci LabelString "Requirement \arabic{rqmtci}:" End Counter rqmtcii Within rqmtci LabelString "Requirement \arabic{rqmtci}.\arabic{rqmtcii}:" End Counter rqmtciii Within rqmtcii LabelString "Requirement \arabic{rqmtci}.\arabic{rqmtcii}\arabic{rqmtciii}:" End Counter rqmtciv Within rqmtciii LabelString "Requirement \arabic{rqmtci}.\arabic{rqmtcii}.\arabic{rqmtciii}.\arabic{rqmtciv}:" End Style Requirement2a Category Requirement RequiredArgs 1 Margin Static LatexType Environment LatexName rqmt NextNoIndent 1 LeftMargin MMMMMMMMMN LabelSep xx ParSkip 0.0 ItemSep 0.2 TopSep 0.7 BottomSep 0.7 ParSep 0.3 Align Block AlignPossible Block, Left LabelType Enumerate LabelCounter "rqmtc" RefPrefix req End \end_local_layout \language english \language_package default \inputencoding auto \fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry false \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \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 Requirement2a \begin_inset Argument status open \begin_layout Plain Layout req1 \end_layout \end_inset \end_layout \begin_deeper \begin_layout Standard req1 desc \end_layout \begin_layout Requirement2a \begin_inset Argument status open \begin_layout Plain Layout req1.1 \end_layout \end_inset \end_layout \begin_layout Standard req1.1 desc \end_layout \end_deeper \begin_layout Requirement2a \begin_inset Argument status open \begin_layout Plain Layout req2 \end_layout \end_inset \end_layout \begin_deeper \begin_layout Standard req2 desc \end_layout \end_deeper \end_body \end_document