156160Sru/* sectioning.h -- all related stuff @chapter, @section... @contents
2146515Sru   $Id: sectioning.h,v 1.5 2004/04/11 17:56:47 karl Exp $
356160Sru
4146515Sru   Copyright (C) 1999, 2003 Free Software Foundation, Inc.
556160Sru
656160Sru   This program is free software; you can redistribute it and/or modify
756160Sru   it under the terms of the GNU General Public License as published by
856160Sru   the Free Software Foundation; either version 2, or (at your option)
956160Sru   any later version.
1056160Sru
1156160Sru   This program is distributed in the hope that it will be useful,
1256160Sru   but WITHOUT ANY WARRANTY; without even the implied warranty of
1356160Sru   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1456160Sru   GNU General Public License for more details.
1556160Sru
1656160Sru   You should have received a copy of the GNU General Public License
1756160Sru   along with this program; if not, write to the Free Software
1856160Sru   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1956160Sru
2056160Sru   Written by Karl Heinz Marbaise <kama@hippo.fido.de>.  */
2156160Sru
2256160Sru#ifndef SECTIONING_H
2356160Sru#define SECTIONING_H
2456160Sru
2556160Sru/* Sectioning.  */
2656160Sru
27146515Sru/* Level 4.  */
28146515Sruextern void cm_chapter (void),
29146515Sru  cm_unnumbered (void),
30146515Sru  cm_appendix (void),
31146515Sru  cm_top (void);
3256160Sru
33146515Sru/* Level 3.  */
34146515Sruextern void cm_section (void),
35146515Sru  cm_unnumberedsec (void),
36146515Sru  cm_appendixsec (void);
3756160Sru
38146515Sru/* Level 2.  */
39146515Sruextern void cm_subsection (void),
40146515Sru  cm_unnumberedsubsec (void),
41146515Sru  cm_appendixsubsec (void);
4256160Sru
43146515Sru/* Level 1.  */
44146515Sruextern void cm_subsubsection (void),
45146515Sru  cm_unnumberedsubsubsec (void),
46146515Sru  cm_appendixsubsubsec (void);
4756160Sru
48146515Sru/* Headings.  */
49146515Sruextern void cm_heading (void),
50146515Sru  cm_chapheading (void),
51146515Sru  cm_subheading (void),
52146515Sru  cm_subsubheading (void),
53146515Sru  cm_majorheading (void);
5456160Sru
55146515Sruextern void cm_raisesections (void),
56146515Sru  cm_lowersections (void),
57146515Sru  cm_ideprecated (int arg, int start, int end);
5856160Sru
59146515Sruextern void
60146515Sru  sectioning_underscore (char *cmd),
61146515Sru  insert_and_underscore (int level, char *cmd);
6256160Sru
63146515Sru/* needed in node.c */
64146515Sruextern int set_top_section_level (int level);
65146515Sru
66146515Sruextern void sectioning_html (int level, char *cmd);
67146515Sruextern int what_section (char *text, char **secname);
68146515Sruextern char *current_chapter_number (void),
69146515Sru  *current_sectioning_number (void),
70146515Sru  *current_sectioning_name (void);
71146515Sru
7256160Sru/* The argument of @settitle, used for HTML. */
7356160Sruextern char *title;
7456160Sru
7556160Sru
7656160Sru/* Here is a structure which associates sectioning commands with
7756160Sru   an integer that reflects the depth of the current section. */
7856160Srutypedef struct
7956160Sru{
8056160Sru  char *name;
8156160Sru  int level; /* I can't replace the levels with defines
8256160Sru                because it is changed during run */
8356160Sru  int num; /* ENUM_SECT_NO means no enumeration...
8456160Sru              ENUM_SECT_YES means enumerated version
8556160Sru              ENUM_SECT_APP appendix (Character enumerated
8656160Sru                            at first position */
8756160Sru  int toc; /* TOC_NO means do not enter in toc;
8856160Sru              TOC_YES means enter it in toc */
8956160Sru} section_alist_type;
9056160Sru
9156160Sruextern section_alist_type section_alist[];
9256160Sru
9356160Sru/* enumerate sections */
9456160Sru#define ENUM_SECT_NO  0
9556160Sru#define ENUM_SECT_YES 1
9656160Sru#define ENUM_SECT_APP 2
9756160Sru
9856160Sru/* make entries into toc no/yes */
9956160Sru#define TOC_NO  0
10056160Sru#define TOC_YES 1
10156160Sru
10256160Sru
10356160Sru#endif /* not SECTIONING_H */
104