2

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.

lockstep
  • 250,273
Raama
  • 1,465

1 Answers1

3

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

\setcounter{secnumdepth}{4}

in the preamble.

Sample output

\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}

\nameref*{1.1.1} is take from the Wikipedia page on aphorisms and is
the first sentence of Hippocrates' \emph{Aphorisms}.

\end{document}
Andrew Swann
  • 95,762