# \paragraph & \label{}

I am working with about 4000 aphorisms and this is the way I structured my document. I created 4000 sections in one document and named it "aphorisms" i.e.

\section{aphorism - 1} \label{1.1.1}
\section{aphorism - 1} \label{1.1.2} and so on


I can not change the label name because thats how they are numbered and I don't want loose this reference.

Then I ran the file and it created aphorisms.aux file,

For my document Lessons_1 wherever I needed the aphorism quoted I used \nameref*{} and I included previously generated aux file and later excluded using \includeonly{} to stop the output to PDF. It created a beautiful document I wanted. Below is non working example, but to show the structure of my documents arrangement.

\documentclass[fleqn,12pt,a4paper]{article}
\RequirePackage{my_Custom_package}

\includeonly{Lessons_1}

\begin{document}
\doublespacing

\include{aphorisms}
\include{Lessons_1}

\end{document}


my question is can it be done like this using paragraphs in place of sections and label names as \label{a1.1.1} etc.

This way I can create explanation of each aphorism by various author, by creating something like \paragraph{ } \label{} for each author.

Then I can easily create as shown below, This would become template to many other projects I am planning to undertake in future.

\nameref*{1.1.1} % aphorism
\nameref*{a1.1.1} % Explanation of Author A
\nameref*{b1.1.1} % Explanation of Author B


This project is to revive some ancient texts. Your help is greatly appreciated.

• sorry could not come up with a suitable question title. Aug 10, 2013 at 16:40
• I guess that you have to increase the value of \secnumdepth to turn on numbering for paragraphs. Aug 10, 2013 at 16:43
• @Sigur - can you please tell me how can I do that? Aug 10, 2013 at 16:45
• On preamble \setcounter{secnumdepth}{3}. Test other values if necessary. Aug 10, 2013 at 16:46
• For paragraphs you need \setcounter{secnumdepth}{4}, cf. tex.stackexchange.com/a/126764/15925 Aug 10, 2013 at 18:31

To summarise the comments: to make paragraph labels visible one should write

\setcounter{secnumdepth}{4}


in the preamble.

\documentclass{article}

\usepackage{nameref}

\setcounter{secnumdepth}{4}

\begin{document}

\section{Aphorisms}

\paragraph{Aphorism - 1}\label{1.1.1}
Life is short, art long, opportunity fleeting, experience deceptive,
judgment difficult.

\section{Explanations}