2

I am writing a large text using Latex, where I use chapters, sections, subsections, subsubsections and paragraphs. My problem is that I would like to write, in my text, something like "this is described in the following subsubseciton", but for obvious reasons I am reluctant to use the word "subsection" in the text, so I was wondering if that is the right word to use (I cannot use words as section, subsection, paragraph and chapter because they are already used somewhere else).

  • 1
    I think using "subsection" in the text is perfectly OK. – Steven B. Segletes May 15 '16 at 16:23
  • I agree that subsection is ok, but i fail to see the TeXnical part of the question. – Johannes_B May 15 '16 at 16:26
  • One could use the sectioning symbol, \S, and say "in S\ref{<subsubseclabel>} – Steven B. Segletes May 15 '16 at 16:27
0

You can use the cleveref package and code \cref{<subsubsectionlabel>}, which will print as Section x.y.z. The difference between the various sectioning levels is reflected in the numbering.

You also can customise the string which will appear as the subsubsection name with

\crefname{subsubsection}{\S}{\S}
\Crefname{subsubsection}{\S}{\S}

These can go either in your preamble or in a cleveref.cfg file.

  • Thank you a lot, I think this is the solution that best suits my problem, I will try to do as you suggest me – Patapunfate May 16 '16 at 10:31
1

If you don't want to use any of the sectioning titles, I think it would be OK for you to just print the section number, including the other levels. It would not be immediate as seeing the word, but the numbering would still be unambiguous. However keep in mind that \paragraph doesn't carry a number by default, so referring to this will still show the \subsubsection number where it's located.

Latex supports this by default, by doing for example:

\subsubsection{My subsubsection}\label{subsubsec}

And then referring to it in the text normally, e.g. As showed in \ref{subsubsec}. If this is the first of all the document, for example, you'll see As showed in 1.1.1 in the resulting PDF.

  • Also As showed in section~\ref{subsubsec}, because the numbering immediately points to the level. – egreg May 15 '16 at 20:59
  • Thank you I think this suggestion may be very elegant, even if I am more tempted to use the crefname package proposed by Bernard this is also an excellent solution that I will keep in mind for the future. Thank you a lot. – Patapunfate May 16 '16 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.