[texhax] Book format with article-style headings

Lars Madsen daleif at imf.au.dk
Thu Jun 3 12:39:31 CEST 2010


Lars Madsen wrote:
> De Presbytero wrote:
>> Dear good people of Texhax,
>>
>> I am trying to typeset a 'documentclass{book}' document that will have
>> article-style headings. In other words, no 'chapter' option, just 
>> section,
>> subsection, and subsubsection.
>>
>> But I am afraid matters aren't all that simple. What I am working on is a
>> critical edition of a text. For convenience I will call this text AA. 
>> Text
>> AA is preceded by a few chapters in which I explain what text AA is. I 
>> want
>> these opening chapters to appear in standard 'book' format, with the 
>> usual
>> book-style headings. But I want the second element in my work, namely 
>> text
>> AA, to appear in 'book' format with article-style headings. And I want 
>> to do
>> all this without using package 'fancyhdr'.
>>
>> Does anyone have any ideas?
>>
>> Thanks,
>>
>> Roy
>>
> 
> might be a lot easier to do this with the memoir class which can be seen 
> as a dropin replacement for book. It has a much better page style 
> support, and the styles are very easy make. In your case something like
> 
> \copypagestyle{mystyle}{headings}
> 
> \addtopsmarks{mystyle}{
>    \clearmark{chapter} % we do not want chapter data
>    \createmark{section}{both}{shownumber}{}{. \ } % write to both
>    \createmark{subsection}{both}{shownumber}{}{. \ }
>    \createmark{subsubsection}{both}{shownumber}{}{. \ }
> }
> 

oops, \addtopsmarks takes 3 arguments

\addtopsmarks{mystyle}{}{
    \clearmark{chapter} % we do not want chapter data
    \createmark{section}{both}{shownumber}{}{. \ } % write to both
    \createmark{subsection}{both}{shownumber}{}{. \ }
    \createmark{subsubsection}{both}{shownumber}{}{. \ }
}


> \setsecnumdepth{subsubsection}
> \maxsecnumdepth{subsubsection}
> 
> then activate mystyle at the point where you need the change.
> 
> 


-- 

/daleif


More information about the texhax mailing list