[OS X TeX] damn... how to surpress chapter titles?

Michel Bovani michel.bovani at wanadoo.fr
Mon Jul 1 11:20:52 EDT 2002



Le 1/07/02 16:21, « mahakk » <mahakk at das-dock.de> a écrit :

> "Michel Bovani" meinte doch tatsächlich:
>> Just :
>> 
>> \renewcommand{\chaptername}{} in the preamble of your document.
> 
> that doesn't work with babel, obviously. no change. :(

You can use the babel \addto mechanism

e.g.

\addto\captionsgerman{\renewcommand{\chaptername}{}}


> 
> without babel, the output is
> 
>   1
>   name of chapter
> 
> and not
> 
>   1 name of chapter
> 
> which i'd like to get.

In this case you have to modify \@makechapterhead itself

In report.cls :

\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c at secnumdepth >\m at ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}

So try in your document something like :

\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c at secnumdepth >\m at ne
       \def\@tempa{\thechapter\space}
\else\let\@tempa\relax
    \fi
    \interlinepenalty\@M
    \Huge \bfseries\@tempa #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother

Beware, if you have headings, you have also to redefine \chaptername (with
babel \addto mechanism), or to say \let\@chapapp\relax (not exactly the same
because \@chapapp may be \chaptername, or appendix name, or...)
> i got a hint using
> 
>   \chapter*{whatever}
> 
> which makes "chapter 1" disappear, but it doesn't give me
> 
>   1 whatever
> 
> instead, it just gives me
> 
>   whatever
> 
> and it lets the section numbering start at
> 
>   0.1
> 
> and not 1.1...
> 
> i also tried "\renewcommand{\chapter}{}" just for kicks, but that completely
> removes formatting and numbering of chapter titles.
> 
> another idea anybody?
> 
> m
> 
> 
> -----------------------------------------------------------------
> Threaded list archives can be found at:
> <http://www.masda.vxu.se/~pku/MacOSX_TeX/>
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <info at email.esm.psu.edu> with
> "help" (no quotes) in the body.
> -----------------------------------------------------------------

-- 
Michel Bovani



-----------------------------------------------------------------
Threaded list archives can be found at:
<http://www.masda.vxu.se/~pku/MacOSX_TeX/>
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------




More information about the MacOSX-TeX mailing list