Page LayoutCall to type of sectioning

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
jeanjacques
Posts: 2
Joined: Sat Mar 27, 2010 2:47 pm

Call to type of sectioning

Post by jeanjacques »

Hi everyone,

I have a little question, whose answer I can't find surprisingly, altough it's quite natural when dealing with long works.
I know how to call for the number of a section, or a chapter, etc, by putting a label just after defining it, and then using the ref. When calling it, one uses something like : "as explained in section \ref{}".
One sometimes has to change the type of a "section"; you may want to change a section to a chapter, a subsection to a section, etc. If this happens, one has to be carefull, and start looking at every section (say) calls, and change in the example before, the word section by chapter manually.
Is there a command that will display the type of sectionning? For instance, in the example, the label is put after a section, so the command should display "section"; if I decide at a moment that the section should actually be a chapter, the command should automatically display "chapter" after I changed the type of the section.
I think one can ask for the same problem for propositions, theorems, etc, where I know that Latex can display the number, but one has to write manually the type before the \ref{}.

Thanks for any help,
JJ

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Call to type of sectioning

Post by localghost »

Using the cleveref package might do the trick.


Best regards and welcome to the board
Thorsten
jeanjacques
Posts: 2
Joined: Sat Mar 27, 2010 2:47 pm

Re: Call to type of sectioning

Post by jeanjacques »

Many many thanks, that's exactly it !

JJ
Post Reply