General ⇒ Creating enums and references in the format 1.7(1)(a)
Creating enums and references in the format 1.7(1)(a)
In reference to the suggestion to http://www.latex-community.org/forum/vi ... =20#p85799, I'm starting a new thread.
I request the community's help because I've not succeeded in getting this right, and its very urgent for submitting some legal documents.
I have a document in which sections appear as:
Section 1. List of Documents
1.1 Subsection: Documents about Tax
1. Document 1
2. Document 2
3. Explanation of Document 3
a. Executed on date1
b. Submitted on date2
c. Updated and resubmitted on date 3
And I'd like to created references in the following form:
1.1(3)(a)
Have tried my best and due to the impeding deadline decided to ask here. If anyone can help, I'll appreciate it!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Creating enums and references in the format 1.7(1)(a)
This counting/labeling scheme is usual in legal documents, as you mentioned before (though i wonder who came up with this). Shall all your sectional headings have the same size?
Can you be more specific on the nesting. I wasn't able to detect a scheme in your example above. You can use the word section (with the riht amount of »sub« to mark lower levels) or just use the word level with a number.
Creating enums and references in the format 1.7(1)(a)

Code: Select all
\documentclass{article}
\usepackage{enumitem}%
\begin{document}
\section{List of Documents}
\subsection{Documents about Tax}
\begin{enumerate}
\item Document 1
\item Document 2
\item Explanations on Document 3
\begin{enumerate}[label={\alph*)},ref={\thesubsection(\arabic{enumi})(\alph*)}]
\item Executed on date1 \label{date::executed}%
\item Submitted on date2 \label{date::submitted}%
\item Updated and resubmitted on date3 \label{date::updated}%
\end{enumerate}
\end{enumerate}
Those are the three references:
\ref{date::executed}
\ref{date::submitted}
\ref{date::updated}
\end{document}
But I am not sure, if this what the OP really wants.
Creating enums and references in the format 1.7(1)(a)
Thank you for replying, here is my header:Johannes_B wrote:I'll have a look over this in my lunch break, i would appreciate a bit more information tough. What documentclass are you using? Are you open to using the KOMA-script alternative?
This counting/labeling scheme is usual in legal documents, as you mentioned before (though i wonder who came up with this). Shall all your sectional headings have the same size?
Can you be more specific on the nesting. I wasn't able to detect a scheme in your example above. You can use the word section (with the riht amount of »sub« to mark lower levels) or just use the word level with a number.
Code: Select all
documentclass[letterpaper,titlepage]{article}
\pagestyle{headings}
\usepackage{csquotes}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{etoolbox}
\usepackage{cleveref}
\section{Introduction}
\subsection{Explanation of Document1}
\begin{enum}
\item \label{explanation1}
\item \label{explanation2}
\begin{enum}
\item \label{process1}
\item \label{process2}
\end{enum}
\end{enum}
\subsection{Important Dates}
Thanks, looks very much like the format I was looking for. I'll try your technique. Many thanks to both of youBlackForestrian wrote:This kind of references to list items is best done with theenumitem package
But I am not sure, if this what the OP really wants.Code: Select all
\documentclass{article} \usepackage{enumitem}% \begin{document} \section{List of Documents} \subsection{Documents about Tax} \begin{enumerate} \item Document 1 \item Document 2 \item Explanations on Document 3 \begin{enumerate}[label={\alph*)},ref={\thesubsection(\arabic{enumi})(\alph*)}] \item Executed on date1 \label{date::executed}% \item Submitted on date2 \label{date::submitted}% \item Updated and resubmitted on date3 \label{date::updated}% \end{enumerate} \end{enumerate} Those are the three references: \ref{date::executed} \ref{date::submitted} \ref{date::updated} \end{document}