Text FormattingInclude Part Number into Reference Command

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
bensalah
Posts: 1
Joined: Mon Feb 13, 2012 11:40 pm

Include Part Number into Reference Command

Post by bensalah »

Hi,

I writing a report of my PhD with LaTeX. My report consists of three parts and each parts consists of three chapters and each chapter contains sections and subsections.
The chapter of each part are numerated automatically by latex from 1 to 3. For instance, the reference 2.3.2 refer to the subsection 2 of the section 3 of the chapter 2. The problem that there is no way to identify the part which the chapter 2 belongs to. To avoid a reader confusion, when referring to a chapter of a different part, I'm looking for a latex command which provides the reference I.2.3.2 instead of 2.3.2 where I refer to the part I.
I hope include also these references "I.2.3.2" into the table of contents, if possible.
Thank you very much

Recommended reading 2024:

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

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

svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Include Part Number into Reference Command

Post by svend_tveskaeg »

A MWE would have been nice (for instance, what document class do you use?), but I will give it a try.

If I have understood your question correct, you can put the following in your preamble:

Code: Select all

\renewcommand{\theschapter}{\thepart.\arabic{chapter}}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply