I want to have an extra sectioning level under \part{}, say \subpart. It has no difference as for the location on the page or the size of the font with \part{} command.  I tried titlesec but I couldn't get it to work. I've read the documentation but no luck. This is the example:  \documentclass{book}  \usepackage{titlesec}  \titleclass{\subpart}{page}[\part]  \titleformat{\subpart}[block]{\centering\huge\bfseries}{}{10pt}{}[] %\titlespacing*{\subpart}{}{}{}[] \newcounter{subpart} \renewcommand{\subpart}{\Alph{subpart}} \begin{document}         \part*{History}     \subpart*{Before}         \chapter*{1}         \chapter*{2}         \chapter*{3}     \subpart*{After} \part*{Evidence}     \subpart*{Archeology} \end{document}   Thanks.
122131
I need a section which isn’t really a part, nor a chapter. So I was trying to define a new command, \subpart, based on the \part command, but with its own numbering and which would look like this, in the middle of a new blank page:     SUBPART ONE      Name of the subpart   However, when I try to do so, there always are errors showing up…  My approach, based on the code from I-dont-remember-where on the web:  \makeatletter \def\@subpart[#1]{%     \ifnum \c@secnumdepth &gt;\m@ne       \refstepcounter{subpart}%       \addcontentsline{toc}{subpart}{\thepart\hspace{1em}#1}%     \else       \addcontentsline{toc}{subpart}{#1}%     \fi     {\parindent \z@ %\raggedright                    % Commented \raggedright      \interlinepenalty \@M      \normalfont      \ifnum \c@secnumdepth &gt;\m@ne        \Large\bfseries\hfil\partname~\thepart\hfil   %  added \hfil … \hfil for centering        \par\nobreak      \fi      \huge \bfseries %      \markboth{}{}\par}%     \nobreak     \vskip 3ex     \@afterheading} \makeatother   I really should learn to use LaTeX correctly…   Thank you for your help, Sebastian
78341
My intention is to create a letter with multiple appendixes, which are \included and their part-titles will be added to the \encl-list.  My letter looks like:  \documentclass{scrlttr2} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage{lmodern,textcomp,graphicx} \usepackage{booktabs} \usepackage{tabu}  \newcounter{part} \setcounter{secnumdepth}{-1} \makeatletter \newcommand{\part}{\@startsection{part}{-1}{\z@}% name, ebene, einzug                            {1ex}% vor-abst                            {1ex}% nach-abst                            {\normalfont\Large\bfseries}}\\% format \renewcommand{\thepart}{Anlage \Alph{part}} \makeatother  \begin{document} \begin{letter}{to somebody} \opening{Dear Sirs and Madams,} ... \closing{Farewell,}  \include{anlage-a}  \end{letter} \end{document}   The appendix starts as follows:  \part{test part}  My part-content...   Which gets rendered to:    Why does this happen, and how to avoid it?
59792
In several discussions about relatives merits of LaTeX v. xml, a xml supporter complained that in LaTeX sections, subsections etc are not properly closed, so it is hard to tell where a section ends.  Of course it is typically possible to recognize an end of a section, but there is actually a number of ways how a section can end: start of another section, start of the next chapter or part, start of \endmatter, bibliograpy, index, etc, or the end of document.  That makes it hard if you want to write a script that would in some way manipulate sections (change their order, write each of them into a separate file, ...).  The same is of course true for subsections, paragraphs etc.   One answer to that is that it is actually possible in LaTeX2e to use sectioning commands as environments, and write   \begin{section}{Blah blah}    ... \end{section}   and because of the way environments are handled in LaTeX2e, it will work.  I he recently seen several comments discouraging such use of regular commands as environments, and it seems that in LaTeX3 it will no longer be possible (on the other hand, it seems that you will be able to define a section environment without causing a conflict with the \section command).   I wanted to know what people think about using sectioning commands as environments.  Is it a good idea, is it OK, or should it not be done?
85191
I am writing a document using the report class in two column mode, but I need a \section to spread across both columns, but how can I set that?  Something like  \documentclass[10pt,danish,a4paper,twoside,twocolumn]{report} \input{preamble.tex} \begin{document}  % This section should spread over both columns \section{Name}  \lipsum[1-3] \end{document}
15383
I have defined the following command to typeset 'C++':  \newcommand{\Cpp}{C\raisebox{-.23ex}{\texttt{++}}}   Using the command in a paragraph works as expected. However, I can't use it in a section title. I seems like it has something to do with \raisebox.  Here an mwe:  \documentclass[11pt]{article}  \newcommand{\Cpp}{C\raisebox{-.23ex}{\texttt{++}}}  \begin{document}     \section{\Cpp} % doesn't work! because of \raisebox ? \Cpp-Compiler \end{document}   How can I redefine the \Cpp command to work in a section title?
86874
I wrote my diploma in LaTeX using Lyx, but now I have big problem to fit the output to universities' standards.  I need to remove Part/Section... title from header, I found that using:   \pagestyle{empty}   does the job, but it also removes page numbers, and I spent more than an hour trying to fit them together, especially that in some pages I need no page numbers, while in others has to start from some number, so I'm using:  \setcounter{page}{3}   which also conflicts with the first command.  Any help will be highly appreciated, because I need to print it today, thank you in advance.
85036
I'm interested in setting the titles of section and more in lowercase small caps. And I don't know how to automatically achieve this.   \documentclass{scrartcl} \setkomafont{sectioning}{\scshape} \usepackage{hyperref} \begin{document}     \section{Hello}     \section{hello}     \subsection{helloHello} \end{document}   But if I write everything in lowercase, then the \tableofcontents doesn't look good unless I use small caps there too. I know about \MakeLowercase{} but this needs an argument.  By the way, as I noted, I just want to show them in lowercase small caps in the document, not in the table of contents, ….  Any ideas?  PS: I don't know if this is necessary, but I'm using the MinionPro package.  EDIT: after some research, apart from what is answered here, in  you can look at other different (or semi-different) method.
30899
I'm trying to create a toc in a large Latex document which uses the KOMA script.  In the toc I would like to center the parts and remove all other components (pagenumber, partnumber). I use tocloft (a hard requirement for other reasons).  While I managed to remove the pagenumber, the partnumber is still there and the parts are very much on the right site instead of being centered.  A simplified example is:  \documentclass{scrbook} \usepackage[ngerman]{babel}  \usepackage{lipsum}  \usepackage{tocloft} \renewcommand{\cftpartfont}{\hfill\Large\bfseries} \renewcommand{\cftpartaftersnum}{\hfill} \addtocontents{toc}{\cftpagenumbersoff{part}}  \begin{document} \tableofcontents \part{A} \section{a} \lipsum \part{B} \section{b} \lipsum  \end{document}   I have adapted the commands for the centering from an example of the tocloft manual, where      \renewcommand{\cftZtitlefont}{\hfill\Large\bfseries} together with   \renewcommand{\cftafterZtitle}{\hfill} will give a centered Large   bold title.   was used to center the title (instead of the parts).   So my question, how can I center the parts and remove the partnumber?
16718
Possible Duplicate:          My LaTeX document is acting strangely. Here is a simplified version of it:  \documentclass{article}  \begin{document}  \tableofcontents \newpage  \addcontentsline{toc}{part}{A Part of My Document} \include{includedfile}  \end{document}   And in includedfile.tex:  \section{My Section Title} Quack.   Clearly, in the table of contents, the heading for the part should precede the one for the section, but it doesn't! What's wrong?
34520
I heavily use org-mode in Emacs to create TODO lists with timekeeping, which has a handy export to LaTeX feature. The problem is that in order to get my exported LaTeX document to look right, I want to indent entire sections, essentially treating sections like lists. It's very easy to create a template to copy and paste into every new file, but not feasible to edit the text directly as this would interfere with org-modes ease of use. Thus:  Is there a way to indent an entire section, using only the preamble?  MWE  \documentclass{article} \usepackage[explicit]{titlesec} \setcounter{secnumdepth}{0} \newcommand{\clock}{CLOCK: number number number \\}  \titleformat{\section}{\bfseries{}}{\roman{section}}{3pt}{#1} \titlespacing*{\section}{0pt}{0pt}{0pt} \titleformat{\subsection}{\bfseries{}}{\roman{subsection}}{3pt}{$\rightarrow$#1} \titlespacing*{\subsection}{2em}{0pt}{0pt} \begin{document}   \section{First section} \clock  \section{Second section} \clock \clock \clock  \subsection{First subsection} \clock \clock  \subsection{Second subsection} \clock  \subsection{Third subsection} \clock  \end{document}   I want the text with the red arrow to be indented to the same level as the section.
92825
I am embedding full pages from another PDF document (using the pdfpages package), but I would like to be able to declare my own section headings before each embedded document (for e.g. hyperlinking / TOC purposes). pdfpages has an experimental feature which lets me do this, but the problem is that I want to put all of these embedded documents inside a section, so I need to insert a section heading and a subsection heading on the first document I embed. Unfortunately pdfpages doesn't seem to be able to do this. Is there a way for me to do this?  Edit: Thank you for the suggestions. I am also in need of something similar for general labels — at the moment I am abusing the addtolist option of \includePDF but the objects I'm labelling aren't really figures or tables.
90082
I was using titletoc until I realized that it has some incompatibilities with hyperref. The thing is, that titletoc can do the same thing in a easier way, less one.  \titlecontents*{subsection}[5.4em] {\small} {\thecontentslabel~ } {} {} [.~\textbullet\ ] [.]   this part does the subsection as a paragraph (with section number and without page number). I have realized that the problem is the pseudo-code used by tocloft for the entries in the TOC  {\cftXfont {\cftXpresnum SNUM\cftXaftersnum\hfil} \cftXaftersnumb TITLE}% {\cftXleader}{\cftXpagefont PAGE}\cftXafterpnum\par   I mean, the last command \par make impossible to leave two subsection entries in the same textline. Any idea? Another interesting solution is with etoolbox, some examples with that package are awesome, but it's not on my hands.  This is a MWE:  \documentclass{book}  \usepackage{titletoc} \titlecontents*{subsection}[5.4em]{\small} {\thecontentslabel~ }{}{}[.~\textbullet\ ][.]  \begin{document}  \tableofcontents  \chapter{Test Chapter 1} \section{Test Section 1.1} \subsection{First Test Subsection} \subsection{Second Test Subsection} \subsection{Third Test Subsection} \subsection{Fourth Test Subsection} \section{Test Section 1.2} \subsection{First Test Subsection} \subsection{Second Test Subsection}  \chapter{Test Chapter 2} \section{Test Section 2.1} \subsection{First Test Subsection} \subsection{Second Test Subsection} \subsection{Third Test Subsection} \subsection{Fourth Test Subsection} \section{Test Section 2.2} \subsection{First Test Subsection} \subsection{Second Test Subsection}  \end{document}
101057
Hi I want to add the section of Signature, which is before \tableofcontents, to the Content. Don't know why my codes don't work. Is it even possible? Thanks a lot!  \documentclass[11pt,twoside]{book} \usepackage[top=1.25in, right=1.25in, bottom=1.5in, left=1.75in, headsep=0.5in]{geometry}  \usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} \usepackage{fancyhdr,indentfirst,setspace} \doublespacing \usepackage[round]{natbib} \usepackage[bookmarksnumbered,bookmarksopen]{hyperref}   \renewcommand{\bibname}{References}   \begin{document}  \frontmatter  \title{Test} \author{ABC} \date{\today} \maketitle    \clearpage \pagestyle{plain}  \addcontentsline{toc}{Chapter}{\protect\numberline{}Signature Page}   \begin{center} \vspace{.25in}  Signature  \end{center}      \pdfbookmark{\contentsname}{toc} \tableofcontents    \mainmatter \pagestyle{plain}  \chapter{Inference}  \section{Introduction}   \backmatter  \clearpage \pagestyle{plain} \bibliographystyle{ims} \addcontentsline{toc}{chapter}{References} \bibliography{mybibliography}   \end{document}
42313
I am having difficulty adding the section number after the section title. Normally the order is section number followed by section title. I want it to be the opposite. I am looking for what I should add to the following .tex file code:  \usepackage[compact]{titlesec} \titleformat{\section}[runin]{\large\bfseries}{\thesection}{}{}
84101
I could do \subsection{} and \subsubsection{} but not \subsubsubsection{}. This command does not seem to be available in LaTeX. Is there an alternative command?
61857
Basically, here's my MWE, and I need to include "Chapter" before every section title in the ToC (without changing anything else).      \documentclass[12pt]{article} \usepackage[utf8]{inputenc}  \usepackage[english]{babel} \usepackage[titles]{tocloft} \usepackage{titlesec} \usepackage{titletoc}  \addto\captionsenglish{ \renewcommand*\contentsname{\centerline{TABLE OF CONTENTS}}}  %\renewcommand{\thesection}{CHAPTER} %\renewcommand{\cftsecpresnum}{Chapter \thesection} \titleformat{\section}[display]% {\null\vskip1em\sffamily\bfseries\filcenter}{Chapter \thesection}{0em}{}[] \titlespacing*{\section}{0em}{1em}{1em}  \titlecontents{section} [1.5em] % ie, 1.5em (chapter) + 2.3em {} {\contentslabel{1em}} {\hspace*{-1.5em}} {\titlerule*[0.5pc]{.}\contentspage}  \begin{document} \newpage \tableofcontents \newpage  \section{Section One} \section{Section Two} Content \end{document}   The commented out code is what I've already tried. The first one just changes the number to "CHAPTER" and doesn't move the text in the ToC (so it just overlays on top of the name of the section), and if I include "\thesection" after "CHAPTER" it creates an infinite loop definition error. The second one causes no differences, and the code still compiles.  Thanks!
115208
I'm looking for advise about handling sections a a special way. What I want:   Sections should not be numbered, they should be listed in the TOC and be available in the page header, and they should have not left indention.   A very much abridged version of what I'm currently trying is this:  \documentclass{book}  % No section numbers. \renewcommand{\thesection}{}  \begin{document}  \tableofcontents  \chapter{Foo}  % This section should be in the TOC and the page header. \section{Bar}  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.   \end{document}   Unfortunately this does not produce the desired result. 1. and 2 work but 3. doesn't: the section titles have a left indention in the text.  How can I make all three requirenments work at the same time?