Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm quite new to Latex and I'd like to achieve the following thing.

I want my document to have the following numbering structure:

1. chapter 
1.1 section
1.1.1 subsection 
A. subsubsection.

(In the TOC I only want the chapters, sections and subsections to be listed.)

I achieved this by adding the following extra lines in the beginning of my LaTex document:

% set section numbering depth
\setcounter{secnumdepth}{3} % 3 => section, subsection, subsubsection
\setcounter{tocdepth}{2}    % 2 => section, subsection
% replace subsubsection numbering by single letter
\renewcommand{\thesubsubsection}{\Alph{subsubsection}} 

Problem: when I make a reference to this subsubsection, I get something like this:

A 

I want this to be formatted like this:

1.1.1.A 
share|improve this question
    
Maybe you will do like this: \renewcommand{\thesubsubsection}{\thesubsection.\Alph{subsubsection}} \def\subsubsection#1{\par\vskip10pt\noindent\refstepcounter{subsubsection}\textb‌​f{\Alph{subsubsection}\quad #1}\par\noindent} ? –  Eddy_Em Jan 13 '13 at 8:19
    
Welcome to TeX.SE. I removed 'thanks' from your post since we omit this. Instead, you should up-vote and accept the answers, giving the answerer the site reputation. –  tohecz Jan 13 '13 at 8:40

2 Answers 2

Without using additioal packages, you can simply redefine \p@subsubsection which controls the prefix used for cross-referencing subsubsection:

\documentclass{book}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
\renewcommand\thesubsubsection{\Alph{subsubsection}} 
\makeatletter
\renewcommand\p@subsubsection{\thesubsection.} 
\makeatother

\begin{document}

\tableofcontents

\chapter{Test Chapter}
\section{Test Section}
A cross-reference to some subsubsections: \ref{a}, \ref{b} and \ref{c}.
\subsection{Test Subsection}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}\label{a}
\subsubsection{Test Subsubsection}\label{b}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}\label{c}

\end{document}

Am image of the obtained ToC:

enter image description here

And an image of the document body, showing the desired formatting for the headings and the cross-references:

enter image description here

On a side (personal) note, as tohecz has already mentioned, I think this might be confusing since it introduces some level of inconsistency (the string used for the cross-references doesn't really belong to the object that is being referenced).

share|improve this answer

Using titlesec package, you can control what gets displayed as the subsection number, and it can be different from \thesubsection. The example is on article (without chapters), but that makes no difference.

enter image description here

\documentclass{article}

\usepackage{titlesec}

\renewcommand{\thesubsubsection}{\thesubsection.\Alph{subsubsection}}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries}{\Alph{subsubsection}}{1em}{}

\begin{document}

\tableofcontents

\section{SSSSS}
\subsection{TTTTT}
\subsection{TTTTT II}
\subsubsection{UUUUU}
\subsubsection{UUUUU II}
\subsection{TTTTT III}
\subsubsection{UUUUU III}

\end{document}

However, I do not consider it a good style, it is a bit confusing IMO, but it depends on how you use it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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