From 9acfce4f09b842a0706d40e7f87084d3d597531b Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 24 Jan 2005 12:37:04 +0000 Subject: [PATCH] Added a new config directive `html-local-head', which permits me to put an AppleTitle tag in only one of a set of output HTML files. git-svn-id: svn://svn.tartarus.org/sgt/halibut@5192 cda61777-01e9-0310-a592-d414129be87e --- bk_html.c | 19 +++++++++++++++++++ doc/index.but | 3 +++ doc/output.but | 23 +++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/bk_html.c b/bk_html.c index 1bd573a..96a8982 100644 --- a/bk_html.c +++ b/bk_html.c @@ -826,6 +826,25 @@ void html_backend(paragraph *sourceform, keywordlist *keywords, if (conf.head_end) html_raw(&ho, conf.head_end); + /* + * Add any data defined in specific sections + * that go in this file. (This is mostly to allow tags for Mac online help.) + */ + for (s = sects.head; s; s = s->next) { + if (s->file == f && s->text) { + for (p = s->text; + p && (p == s->text || !is_heading_type(p->type)); + p = p->next) { + if (p->type == para_Config) { + if (!ustricmp(p->keyword, L"html-local-head")) { + html_raw(&ho, adv(p->origkeyword)); + } + } + } + } + } + element_close(&ho, "head"); html_nl(&ho); diff --git a/doc/index.but b/doc/index.but index 097bf56..ccd2784 100644 --- a/doc/index.but +++ b/doc/index.but @@ -559,3 +559,6 @@ directive \IM{PDF} PDF \IM{PDF} Portable Document Format + +\IM{} \cw{} +\IM{} \cw{AppleTitle}, \cw{} tag diff --git a/doc/output.but b/doc/output.but index 88d4a85..d862e40 100644 --- a/doc/output.but +++ b/doc/output.but @@ -498,6 +498,29 @@ parts of the output files. the \i\cw{} section of each output HTML file. So this is a good place to put, for example, a link to a \i{CSS} \i{stylesheet}. +\dt \I{\cw{\\cfg\{xhtml-local-head\}}}\cw{\\cfg\{xhtml-local-head\}\{}\e{HTML text}\cw{\}} + +\dd This configuration directive is local: you specify it within a +document section, and it acts on that section only. + +\lcont{ + +The text you provide in this directive is placed at the end of the +\i\cw{} section of whichever output HTML file contains the +section in which the directive was placed. You can specify this +directive multiple times in multiple sections if you like. + +This directive is particularly useful for constructing \i{MacOS +on-line help}, which is mostly normal HTML but which requires a +special \i\cw{} tag in the topmost source +file. You can arrange this by placing this configuration directive +in the preamble or the introduction section, something like this: + +\c \cfg{html-local-head}{} + +} + \dt \I{\cw{\\cfg\{xhtml-body-tag\}}}\cw{\\cfg\{xhtml-body-tag\}\{}\e{HTML text}\cw{\}} \dd The text you provide in this directive is used in place of the -- 2.11.0