| 1 | /* sectioning.h -- all related stuff @chapter, @section... @contents | 
|---|
| 2 | $Id: sectioning.h,v 1.5 2004/04/11 17:56:47 karl Exp $ | 
|---|
| 3 |  | 
|---|
| 4 | Copyright (C) 1999, 2003 Free Software Foundation, Inc. | 
|---|
| 5 |  | 
|---|
| 6 | This program is free software; you can redistribute it and/or modify | 
|---|
| 7 | it under the terms of the GNU General Public License as published by | 
|---|
| 8 | the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 9 | any later version. | 
|---|
| 10 |  | 
|---|
| 11 | This program is distributed in the hope that it will be useful, | 
|---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 14 | GNU General Public License for more details. | 
|---|
| 15 |  | 
|---|
| 16 | You should have received a copy of the GNU General Public License | 
|---|
| 17 | along with this program; if not, write to the Free Software | 
|---|
| 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 
|---|
| 19 |  | 
|---|
| 20 | Written by Karl Heinz Marbaise <kama@hippo.fido.de>.  */ | 
|---|
| 21 |  | 
|---|
| 22 | #ifndef SECTIONING_H | 
|---|
| 23 | #define SECTIONING_H | 
|---|
| 24 |  | 
|---|
| 25 | /* Sectioning.  */ | 
|---|
| 26 |  | 
|---|
| 27 | /* Level 4.  */ | 
|---|
| 28 | extern void cm_chapter (void), | 
|---|
| 29 | cm_unnumbered (void), | 
|---|
| 30 | cm_appendix (void), | 
|---|
| 31 | cm_top (void); | 
|---|
| 32 |  | 
|---|
| 33 | /* Level 3.  */ | 
|---|
| 34 | extern void cm_section (void), | 
|---|
| 35 | cm_unnumberedsec (void), | 
|---|
| 36 | cm_appendixsec (void); | 
|---|
| 37 |  | 
|---|
| 38 | /* Level 2.  */ | 
|---|
| 39 | extern void cm_subsection (void), | 
|---|
| 40 | cm_unnumberedsubsec (void), | 
|---|
| 41 | cm_appendixsubsec (void); | 
|---|
| 42 |  | 
|---|
| 43 | /* Level 1.  */ | 
|---|
| 44 | extern void cm_subsubsection (void), | 
|---|
| 45 | cm_unnumberedsubsubsec (void), | 
|---|
| 46 | cm_appendixsubsubsec (void); | 
|---|
| 47 |  | 
|---|
| 48 | /* Headings.  */ | 
|---|
| 49 | extern void cm_heading (void), | 
|---|
| 50 | cm_chapheading (void), | 
|---|
| 51 | cm_subheading (void), | 
|---|
| 52 | cm_subsubheading (void), | 
|---|
| 53 | cm_majorheading (void); | 
|---|
| 54 |  | 
|---|
| 55 | extern void cm_raisesections (void), | 
|---|
| 56 | cm_lowersections (void), | 
|---|
| 57 | cm_ideprecated (int arg, int start, int end); | 
|---|
| 58 |  | 
|---|
| 59 | extern void | 
|---|
| 60 | sectioning_underscore (char *cmd), | 
|---|
| 61 | insert_and_underscore (int level, char *cmd); | 
|---|
| 62 |  | 
|---|
| 63 | /* needed in node.c */ | 
|---|
| 64 | extern int set_top_section_level (int level); | 
|---|
| 65 |  | 
|---|
| 66 | extern void sectioning_html (int level, char *cmd); | 
|---|
| 67 | extern int what_section (char *text, char **secname); | 
|---|
| 68 | extern char *current_chapter_number (void), | 
|---|
| 69 | *current_sectioning_number (void), | 
|---|
| 70 | *current_sectioning_name (void); | 
|---|
| 71 |  | 
|---|
| 72 | /* The argument of @settitle, used for HTML. */ | 
|---|
| 73 | extern char *title; | 
|---|
| 74 |  | 
|---|
| 75 |  | 
|---|
| 76 | /* Here is a structure which associates sectioning commands with | 
|---|
| 77 | an integer that reflects the depth of the current section. */ | 
|---|
| 78 | typedef struct | 
|---|
| 79 | { | 
|---|
| 80 | char *name; | 
|---|
| 81 | int level; /* I can't replace the levels with defines | 
|---|
| 82 | because it is changed during run */ | 
|---|
| 83 | int num; /* ENUM_SECT_NO means no enumeration... | 
|---|
| 84 | ENUM_SECT_YES means enumerated version | 
|---|
| 85 | ENUM_SECT_APP appendix (Character enumerated | 
|---|
| 86 | at first position */ | 
|---|
| 87 | int toc; /* TOC_NO means do not enter in toc; | 
|---|
| 88 | TOC_YES means enter it in toc */ | 
|---|
| 89 | } section_alist_type; | 
|---|
| 90 |  | 
|---|
| 91 | extern section_alist_type section_alist[]; | 
|---|
| 92 |  | 
|---|
| 93 | /* enumerate sections */ | 
|---|
| 94 | #define ENUM_SECT_NO  0 | 
|---|
| 95 | #define ENUM_SECT_YES 1 | 
|---|
| 96 | #define ENUM_SECT_APP 2 | 
|---|
| 97 |  | 
|---|
| 98 | /* make entries into toc no/yes */ | 
|---|
| 99 | #define TOC_NO  0 | 
|---|
| 100 | #define TOC_YES 1 | 
|---|
| 101 |  | 
|---|
| 102 |  | 
|---|
| 103 | #endif /* not SECTIONING_H */ | 
|---|