你好,我在这里看到了这个问题:
五级深度列表
我的问题是:如何在 LyX 上做同样的事情?当我将代码放在序言中时,它对我来说不起作用...
% Preview source code
%% LyX 2.2.2 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew]{article}
\usepackage[T1]{fontenc}
\usepackage[cp1255]{inputenc}
\setlength{\parindent}{0cm}
\usepackage{enumitem}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}
% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
\toks@=\expandafter{#1}%
\edef\x{\endgroup
\def\noexpand#1{\noexpand\@number{\the\toks@}}}%
\x}}{\relax}
\newlength{\lyxlabelwidth} % auxiliary length
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\setlist[enumerate,1]{label=(\arabic*)}
\setlist[enumerate,2]{label=(\Roman*)}
\setlist[enumerate,3]{label=(\Alph*)}
\setlist[enumerate,4]{label=(\roman*)}
\setlist[enumerate,5]{label=(\alph*)}
\setlist[enumerate,6]{label=(\arabic*)}
\setlist[enumerate,7]{label=(\Roman*)}
\setlist[enumerate,8]{label=(\Alph*)}
\setlist[enumerate,9]{label=(\roman*)}
\makeatother
\usepackage{babel}
\begin{document}
\begin{enumerate}
\item {\beginL 32132\endL}
\begin{enumerate}
\item {\beginL 4332234\endL}
\begin{enumerate}
\item {\beginL 432\endL}
\begin{enumerate}
\item {\beginL 423423\endL}
\begin{enumerate}
\item {\beginL 432432\endL}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{document}
谢谢你!!
答案1
您需要“更新”enumerate
它的定义,请参阅马克的回答回答你提到的问题。如果我添加
\usepackage{enumitem}
\setlistdepth{9}
\renewlist{enumerate}{enumerate}{9}
\setlist[enumerate,1]{label=(\arabic*)}
\setlist[enumerate,2]{label=(\Roman*)}
\setlist[enumerate,3]{label=(\Alph*)}
\setlist[enumerate,4]{label=(\roman*)}
\setlist[enumerate,5]{label=(\alph*)}
\setlist[enumerate,6]{label=(\arabic*)}
\setlist[enumerate,7]{label=(\Roman*)}
\setlist[enumerate,8]{label=(\Alph*)}
\setlist[enumerate,9]{label=(\roman*)}
到序言部分(注意\renewlist
第二行),它在这里工作正常。LyX 中的预览不起作用,但 PDF 可以正常工作。
请注意,\usepackage{enumitem}
您可以添加可定制列表(enumitem)模块,因为它看起来就像您在所展示的代码中所做的那样。