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 am using the document class article. Once I place a part in the document, all subsequent sections belong to the part automatically. How can I reset a section such that it does not belong to a part?

The following sample demonstrates what I want to achieve:

\section{Introduction}

\part{Part 1}
\section{Section 1 belonging to part 1}
\section{Section 2 belonging to part 1}

\part{Part 2}
\section{Section 1 belonging to part 2}
\section{Section 2 belonging to part 2}

% should not belong to Part 2
\section{Conclusion}
share|improve this question
1  
what do you mean by "belong"? editing your code to make it actually run (an mwe would have been better), i see exactly what i would expect -- what is it that you would expect (or like). –  wasteofspace Sep 25 '12 at 10:11
    
Are you perhaps referring to the PDF bookmarks? –  egreg Sep 25 '12 at 14:08
    
@egreg: Yes, I'm referring to PDF bookmarks as well as the layout of the TOC. In the default TOC formatting, the sections of a part are separated from other parts by greater spacing before and after. –  Oliver Hanappi Sep 27 '12 at 21:28
add comment

2 Answers

up vote 4 down vote accepted

The \bookmarksetup instruction will lift the final section one level up in the PDF bookmarks; the \addtocontents instruction will leave the same space in the TOC as before parts.

\documentclass{article}
\usepackage{hyperref}
\usepackage{bookmark}
\begin{document}

\tableofcontents

\section{Introduction}

\part{Part 1}
\section{Section 1 belonging to part 1}
\section{Section 2 belonging to part 1}

\part{Part 2}
\section{Section 1 belonging to part 2}
\section{Section 2 belonging to part 2}

\addtocontents{toc}{\protect\addvspace{2.25em plus 1pt}}
\bookmarksetup{startatroot}
\section{Conclusion}
\end{document}
share|improve this answer
add comment

I'm not sure, what you want exactly. You might want the starred form of \section and reset the section-counter:

\documentclass{report}

\begin{document}
\section*{Introduction}

\renewcommand{\thesection}{\arabic{part}.\arabic{section}}
\part{Part 1}
\section{Section 1 belonging to part 1}
\section{Section 2 belonging to part 1}

\setcounter{section}{0}
\part{Part 2}
\section{Section 1 belonging to part 2}
\section{Section 2 belonging to part 2}

% should not belong to Part 2
\section*{Conclusion}
\end{document}

You may want to add a clearpage before the Conclusion section as well.

share|improve this answer
add comment

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.