From e3830e1c8ab8c93b18f196cf2a0f78f92cf5d65b Mon Sep 17 00:00:00 2001 From: James Aylett Date: Tue, 29 Jan 2002 11:23:26 +0000 Subject: xhtml-navigation-attributes config option (try {align='center'} for instance. Contents entries are now, eg, "Chapter 1: Introduction" rather than just "Introduction". [originally from svn r1552] --- bk_xhtml.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/bk_xhtml.c b/bk_xhtml.c index 4f6de4e..77d3b0e 100644 --- a/bk_xhtml.c +++ b/bk_xhtml.c @@ -68,7 +68,7 @@ typedef struct { int leaf_smallest_contents; int include_version_id; wchar_t *author, *description; - wchar_t *head_end, *body, *body_start, *body_end, *address_start, *address_end; + wchar_t *head_end, *body, *body_start, *body_end, *address_start, *address_end, *nav_attrs; int suppress_address; } xhtmlconfig; @@ -132,6 +132,7 @@ static xhtmlconfig xhtml_configure(paragraph *source) ret.body_end = NULL; ret.address_start = NULL; ret.address_end = NULL; + ret.nav_attrs = NULL; ret.suppress_address = FALSE; for (; source; source = source->next) @@ -179,6 +180,8 @@ static xhtmlconfig xhtml_configure(paragraph *source) ret.address_start = uadv(source->keyword); } else if (!ustricmp(source->keyword, L"xhtml-address-end")) { ret.address_end = uadv(source->keyword); + } else if (!ustricmp(source->keyword, L"xhtml-navigation-attributes")) { + ret.nav_attrs = uadv(source->keyword); } } } @@ -649,10 +652,16 @@ static char* xhtml_index_filename = "Index.html"; static void xhtml_donavlinks(FILE *fp, xhtmlfile *file) { xhtmlfile *xhtml_next_file = NULL; + fprintf(fp, "", conf.nav_attrs); + } else { + fprintf(fp, ">"); + } if (xhtml_last_file==NULL) { - fprintf(fp, "

Previous | "); + fprintf(fp, "Previous | "); } else { - fprintf(fp, "

Previous | ", xhtml_last_file->filename); + fprintf(fp, "Previous | ", xhtml_last_file->filename); } fprintf(fp, "Contents | "); if (file != NULL) { /* otherwise we're doing nav links for the index */ @@ -941,9 +950,13 @@ static int xhtml_add_contents_entry(FILE *fp, xhtmlsection *section, int limit) fprintf(fp, "