嵌套列表自定义

嵌套列表自定义

我想重现图像中的框,但是在嵌套列表方面遇到了问题(我想要缩进,而不是对齐条目)。

示例框 这是我的代码:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[inline]{enumitem}
\usepackage{tcolorbox}%%%This is to make cool boxes

\begin{document}

Reusability 
\begin{enumerate}[label = R\arabic*.]
            \item meta(data) are richly described with a plurality of accurate and relevant attributes
                \begin{enumerate}[label = \arabic*]
                    \item meta(data) are released with a clear and accessible data usage license
                    \item meta(data) are associated with detailed provenance
                \end{enumerate}
    \item meta(data) meet domain-relevant community standards
\end{enumerate}
\end{document}

我需要第一个顺序列表的字母也显示在嵌套列表中。

答案1

wide和的组合label*将会有所帮助:

在此处输入图片描述

\documentclass{article}

\usepackage[hmargin=0.5in,showframe]{geometry}% Just for this example
\usepackage{enumitem}

\begin{document}

\noindent
To be \textbf{Findable}:
\begin{enumerate}[label=F\arabic*.,wide]
  \item (meta)data are assigned a globally unique and persistent identifier
  \item data are described with rich metadata (defined by \ref{R1} below)
  \item metadata clearly and explicitly include the identifier of the data it describes
  \item (meta)data are registered or indexed in a searchable resource
\end{enumerate}

\noindent
To be \textbf{Accessible}:
\begin{enumerate}[label=A\arabic*.,wide]
  \item (meta)data are retrievable by their identifier using a standardized communications protocol
  \begin{enumerate}[label*=\arabic*.,wide]
    \item the protocol is open, free, and universally implementable
    \item the protocol allows for an authentication and authorization procedure, where necessary
  \end{enumerate}
  \item metadata are accessible, even when the data are no longer available
\end{enumerate}

\noindent
To be \textbf{Interoperable}:
\begin{enumerate}[label=I\arabic*.,wide]
  \item (meta)data use a formal, accessible, shared, and broadly applicable language for knowledge representation
  \item (meta)data use covabularies that follow FAIR principles
  \item (meta)data include qualified references to other (meta)data
\end{enumerate}

\noindent
To be \textbf{Reusable}:
\begin{enumerate}[label=R\arabic*.,wide,ref=R\arabic*]
  \item meta(data) are richly described with a plurality of accurate and relevant attributes \label{R1}
  \begin{enumerate}[label*=\arabic*.,wide]
    \item meta(data) are released with a clear and accessible data usage license
    \item meta(data) are associated with detailed provenance
  \end{enumerate}
  \item meta(data) meet domain-relevant community standards
\end{enumerate}

\end{document}

答案2

省略主电平周围的彩色框,我建议对您的代码进行修改:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[inline]{enumitem}
\usepackage{tcolorbox}%%%This is to make cool boxes

\begin{document}
    
\noindent   Reusability 
    \begin{enumerate}[label = R\arabic*]
        \item meta(data) are richly described with a plurality of accurate and relevant attributes
        \begin{enumerate}[label = \arabic*,wide=\dimexpr\parindent-2em+\labelsep\relax, leftmargin=* ]
            \item meta(data) are released with a clear and accessible data usage license
            \item meta(data) are associated with detailed provenance
        \end{enumerate}
        \item meta(data) meet domain-relevant community standards
    \end{enumerate}
    
\noindent   Future 
\begin{enumerate}[label = R\arabic*]
    \item meta(data) are richly described with a plurality of accurate and relevant attributes
    \begin{enumerate}[label = \arabic*,wide=\dimexpr\parindent-2em+\labelsep\relax, leftmargin=* ]
        \item meta(data) are released with a clear and accessible data usage license
        \begin{enumerate}[label = \roman*,wide=\dimexpr\parindent-2em+\labelsep\relax, leftmargin=* ]
            \item Text 1
            \item Text 2
        \end{enumerate}
        \item meta(data) are associated with detailed provenance
    \end{enumerate}
    \item meta(data) meet domain-relevant community standards
\end{enumerate}
\end{document}

输出:

在此处输入图片描述

相关内容