paragraph *p;
FILE *fp;
manconfig conf;
- int done_copyright;
IGNORE(keywords); /* we don't happen to need this */
IGNORE(idx); /* or this */
fprintf(fp, ".UC\n");
- done_copyright = FALSE;
-
for (p = sourceform; p; p = p->next) switch (p->type) {
/*
* Things we ignore because we've already processed them or
case para_BR:
case para_Biblio: /* only touch BiblioCited */
case para_VersionID:
- case para_Copyright:
case para_NoCite:
case para_Title:
break;
case para_Heading:
case para_Subsect:
- if (!done_copyright) {
- paragraph *p;
-
- /*
- * The copyright comes just before the first chapter
- * title.
- */
- for (p = sourceform; p; p = p->next)
- if (p->type == para_Copyright) {
- fprintf(fp, ".PP\n");
- man_text(fp, p->words, TRUE, 0);
- }
- done_copyright = TRUE;
- }
-
{
int depth;
if (p->type == para_Subsect)
* Normal paragraphs.
*/
case para_Normal:
+ case para_Copyright:
fprintf(fp, ".PP\n");
man_text(fp, p->words, TRUE, 0);
break;
char *prefixextra;
int nesting, nestindent;
int indentb, indenta;
- int done_copyright;
IGNORE(keywords); /* we don't happen to need this */
IGNORE(idx); /* or this */
nestindent = conf.listindentbefore + conf.listindentafter;
nesting = (conf.indent_preambles ? 0 : -conf.indent);
- done_copyright = FALSE;
/* Do the main document */
for (p = sourceform; p; p = p->next) switch (p->type) {
case para_BR:
case para_Biblio: /* only touch BiblioCited */
case para_VersionID:
- case para_Copyright:
case para_NoCite:
case para_Title:
break;
case para_Chapter:
case para_Appendix:
case para_UnnumberedChapter:
- /*
- * The copyright should come after the preamble but before
- * the first chapter title.
- */
- if (!done_copyright) {
- paragraph *p;
-
- for (p = sourceform; p; p = p->next)
- if (p->type == para_Copyright)
- text_para(fp, NULL, NULL, p->words,
- conf.indent + nesting, 0, conf.width - nesting);
- done_copyright = TRUE;
- }
text_heading(fp, p->kwtext, p->kwtext2, p->words,
conf.achapter, conf.indent, conf.width);
nesting = 0;
break;
case para_Normal:
+ case para_Copyright:
case para_DescribedThing:
case para_Description:
case para_BiblioCited:
/* FIXME: configurability in that string */
}
+ /*
+ * Put the copyright into the system section.
+ */
+ {
+ rdstringc rs = {0, 0, NULL};
+ for (p = sourceform; p; p = p->next) {
+ if (p->type == para_Copyright)
+ whlp_rdaddwc(&rs, p->words);
+ }
+ if (rs.text) {
+ whlp_copyright(h, rs.text);
+ sfree(rs.text);
+ }
+ }
+
lastsect = NULL;
/* ------------------------------------------------------------------
case para_BR:
case para_Biblio: /* only touch BiblioCited */
case para_VersionID:
- case para_Copyright:
case para_NoCite:
case para_Title:
break;
* If this is the first section title we've seen, then
* we're currently still in the contents topic. We
* should therefore finish up the contents page by
- * writing the copyright notice and a nav menu.
- */
-
- /*
- * The copyright goes to two places, again: into the
- * contents page and also into the system section.
- */
- {
- rdstringc rs = {0, 0, NULL};
- for (p = sourceform; p; p = p->next) {
- if (p->type == para_Copyright) {
- whlp_para_attr(h, WHLP_PARA_SPACEBELOW, 12);
- whlp_begin_para(h, WHLP_PARA_SCROLL);
- whlp_mkparagraph(&state, FONT_NORMAL, p->words, FALSE);
- whlp_end_para(h);
- whlp_rdaddwc(&rs, p->words);
- }
- }
- if (rs.text) {
- whlp_copyright(h, rs.text);
- sfree(rs.text);
- }
- }
-
- /*
- * Now do the primary navigation menu.
+ * writing a nav menu.
*/
for (p = sourceform; p; p = p->next) {
if (p->type == para_Chapter ||
break;
case para_Normal:
+ case para_Copyright:
case para_DescribedThing:
case para_Description:
case para_BiblioCited:
}
}
- /* Do the preamble and copyright */
+ /* Do the preamble */
for (p = sourceform; p; p = p->next)
{
if (p->type == para_Chapter || p->type == para_Heading ||
break;
}
}
- for (p = sourceform; p; p = p->next)
- {
- if (p->type == para_Copyright)
- {
- fprintf(fp, "<p>");
- xhtml_para(fp, p->words, FALSE);
- fprintf(fp, "</p>\n");
- }
- }
xhtml_do_contents(fp, file);
xhtml_do_sections(fp, file->sections);
case para_BR:
case para_Biblio: /* only touch BiblioCited */
case para_VersionID:
- case para_Copyright:
case para_NoCite:
case para_Title:
break;
break;
case para_Normal:
+ case para_Copyright:
fprintf(fp, "\n<p>");
xhtml_para(fp, p->words, indexable);
fprintf(fp, "</p>\n");
\dd This command indicates that the paragraph attached to it
contains a \i{copyright statement} for the document. This text is
-usually displayed inline, just before the first chapter title but
-after any preamble text before that; but in some output formats it
-is given additional special treatment. For example, Windows Help
-files have a standard slot in which to store a copyright notice, so
-that other software can display it prominently.
+displayed inline where it appears, exactly like a normal paragraph;
+but in some output formats it is given additional special treatment.
+For example, Windows Help files have a standard slot in which to
+store a copyright notice, so that other software can display it
+prominently.
\dt \i\cw{\\versionid}
\copyright Copyright 1999 Simon \#{second comment}Tatham. All rights
reserved.
+Here's another paragraph, which goes after the copyright.
+
\define{metacoopt} [this is a nested,
multi-line macro, talking about \coopt
a bit]
\define{eur} \u20AC{EUR }
-\versionid $Id: test.but,v 1.23 2004/03/25 19:27:12 simon Exp $
+\versionid $Id: test.but,v 1.24 2004/03/30 19:40:56 simon Exp $
\C{ch\\ap} First chapter title; for similar wrapping reasons this
chapter title will be ludicrously long. I wonder how much more