Support for a Manual chapter

This commit is contained in:
Graham Nelson 2020-03-22 11:24:10 +00:00
parent c0b2df5783
commit 513e341cc9
26 changed files with 247 additions and 990 deletions

View file

@ -417,6 +417,13 @@ we like a spoonful of syntactic sugar on our porridge, that's why.
WRITE_TO(RS->titling_line_to_insert, "%S.", line);
WRITE_TO(pdf_leafname, "Preliminaries.pdf");
RS->current_web->chaptered = TRUE;
} else if (Str::eq_wide_string(line, L"Manual")) {
WRITE_TO(new_chapter_range, "M");
WRITE_TO(RS->chapter_folder_name, "Manual");
Str::clear(RS->titling_line_to_insert);
WRITE_TO(RS->titling_line_to_insert, "%S.", line);
WRITE_TO(pdf_leafname, "Manual.pdf");
RS->current_web->chaptered = TRUE;
} else if (Regexp::match(&mr, line, L"Header: (%c+)")) {
pathname *P = RS->path_to;
if (P == NULL) P = RS->current_web->path_to_web;
@ -457,7 +464,7 @@ we like a spoonful of syntactic sugar on our porridge, that's why.
Errors::in_text_file_S(err, tfp);
WRITE_TO(STDERR, "(Must be 'Chapter <number>: Title', "
"'Appendix <letter A to O>: Title',\n");
WRITE_TO(STDERR, "'Preliminaries' or 'Sections')\n");
WRITE_TO(STDERR, "'Manual', 'Preliminaries' or 'Sections')\n");
DISCARD_TEXT(err);
}

View file

@ -9,9 +9,7 @@ Version Number: 7
Import: foundation
Preliminaries
"This chapter of preliminaries, from the Inweb web, makes up the User Guide
for the program."
Manual
Introduction to Inweb
Webs, Tangling and Weaving
How to Write a Web

View file

@ -195,3 +195,36 @@ weaves a report somewhat like this:
| Section Lexical Services: 3/lexs: 606 lines.|
| Section Vocabulary: 3/vocab: 338 lines.|
| Section Built-In Words: 3/words: 1207 lines.|
@h Navigation and breadcrumbs.
When assembling large numbers of woven websites together, as is needed for
example by the main Inform repository's GitHub pages, we need to navigate
externally as well as internally: that is, the page for one tool will need
a way to link to pages for other tools.
To that end, the special expansion |[[Navigation]]| in a pattern template
will expand by looking for a file which contains a fragment of HTML, usually
consisting only of an un-numbered list of links.
By default, Inweb looks for a file called |nav.html| in two directories: the
one above the destination, and the destination. If both exist, they are both
used. If neither exists, the expansion is empty, but no error is produced.
However, this can be overridden at the command line, with |-navigation N|,
where |N| is the filename for a suitable fragment of navigation HTML.
@ The row of breadcrumbs at the top of a woven website can also be
customised from the command line, in that the prefatory breadcrumbs can
be explicitly chosen. (If they are not chosen, there's just a star, which
links to the relevant GitHub repository home page.) Any number can be
supplied. For example:
|-breadcrumb 'Groceries:groc.html' -breadcrumb Produce|
produces the trail
|Groceries > Produce > ...|
with the links being to |groc.html| and |Produce.html| respectively. (The
colon is optional, and needed only if the link is not to the text with |.html|
appended.)

View file

@ -158,9 +158,9 @@ are stored in subdirectories of the web directory:
stored in a single subdirectory called |Sections|.
(b) Alternatively (not additionally), a larger web can use chapter
subdirectories called |Preliminaries|, |Chapter 1|, |Chapter 2|, ...,
subdirectories called |Manual|, |Preliminaries|, |Chapter 1|, |Chapter 2|, ...,
|Appendix A|, |Appendix B|, ...; preliminaries and appendices being optional.
(There can't be a Chapter 0, though there can be Appendix A, B, C, ..., O.)
(There can't be a Chapter 0, though there can be Appendix A, B, C, ..., L.)
A multi-section web can contain a variety of other subdirectories as needed.
Two in particular, |Woven| and |Tangled|, are automatically created by Inweb
@ -245,9 +245,9 @@ much longer roster, such as:
| SR1 - Physical World Model|
... and so on. Here the sections appear in directories called Preliminaries,
Chapter 1, Chapter 2, ..., Appendix A. (These are the only possibilities:
Inweb doesn't allow other forms of name for blocks of sections. There can't be
a Chapter 0, though there can be Appendix B, C, ..., O.)
Chapter 1, Chapter 2, ..., Appendix A. (There can't be a Chapter 0, though
there can be Appendix B, C, ..., O; there can also be a Manual chapter, in
the sense of documentation.)
In case of any doubt we can use the following command-line switch to see
how Inweb is actually reading the sections of a web |W|:
@ -357,9 +357,9 @@ sense only for chaptered webs, and puts each chapter into its own file.
@ Ranges can also be used to weave only part of a web:
(a) In a chaptered web, chapters are abbreviated to just their numbers: for
example, the range |2| means "just Chapter 2". The Preliminaries alone is |P|.
Appendix A, B, C are |A|, |B|, |C| and so on. (This is why Appendices can
only run up to O.)
example, the range |2| means "just Chapter 2". The Preliminaries alone is |P|;
the Manual, |M|. Appendix A, B, C are |A|, |B|, |C| and so on. (This is why
Appendices can only run up to L.)
(b) In an unchaptered web, |S| means "all the sections". This is almost but not
quite the same as |all|: the cover sheet (a sort of title page) is omitted.

View file

@ -14,7 +14,7 @@ Literate programming is a methodology created by Donald Knuth in the late
be readable by humans as well as by other programs. The human-readable form
for Inweb (which is itself a web) is here: [&#9733;&nbsp;inweb](docs/inweb/index.html).
For the Inweb manual, see [&#9733;&nbsp;inweb/Preliminaries](docs/inweb/P-iti).
For the Inweb manual, see [&#9733;&nbsp;inweb/Preliminaries](docs/inweb/M-iti).
__Disclaimer__. Because this is a private repository (until the next public
release of Inform, when it will open), its GitHub pages server cannot be

View file

@ -1372,7 +1372,7 @@ typedef struct hash_table {
struct linked_list *analysis_hash[HASH_TAB_SIZE]; /* of |hash_table_entry| */
int analysis_hash_initialised; /* when we start up, array's contents are undefined */
} hash_table;
#line 762 "inweb/Chapter 2/The Reader.w"
#line 769 "inweb/Chapter 2/The Reader.w"
typedef struct tangle_target {
struct programming_language *tangle_language; /* common to the entire contents */
struct hash_table symbols; /* a table of identifiable names in this program */
@ -2715,21 +2715,21 @@ void Reader__read_contents_page(web *W, module_search *import_path, int verbose
void Reader__read_contents_page_from(web *W, module_search *import_path, int verbosely, pathname *path) ;
#line 255 "inweb/Chapter 2/The Reader.w"
void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void *X) ;
#line 619 "inweb/Chapter 2/The Reader.w"
#line 626 "inweb/Chapter 2/The Reader.w"
void Reader__read_file(web *W, filename *OUT, text_stream *titling_line, section *sect, int verbosely, int disregard_top) ;
#line 658 "inweb/Chapter 2/The Reader.w"
#line 665 "inweb/Chapter 2/The Reader.w"
void Reader__scan_source_line(text_stream *line, text_file_position *tfp, void *state) ;
#line 695 "inweb/Chapter 2/The Reader.w"
#line 702 "inweb/Chapter 2/The Reader.w"
chapter * Reader__get_chapter_for_range(web *W, text_stream *range) ;
#line 704 "inweb/Chapter 2/The Reader.w"
#line 711 "inweb/Chapter 2/The Reader.w"
section * Reader__get_section_for_range(web *W, text_stream *range) ;
#line 718 "inweb/Chapter 2/The Reader.w"
#line 725 "inweb/Chapter 2/The Reader.w"
section * Reader__section_by_filename(web *W, text_stream *filename) ;
#line 740 "inweb/Chapter 2/The Reader.w"
#line 747 "inweb/Chapter 2/The Reader.w"
int Reader__range_within(text_stream *range1, text_stream *range2) ;
#line 769 "inweb/Chapter 2/The Reader.w"
#line 776 "inweb/Chapter 2/The Reader.w"
tangle_target * Reader__add_tangle_target(web *W, programming_language *language) ;
#line 792 "inweb/Chapter 2/The Reader.w"
#line 799 "inweb/Chapter 2/The Reader.w"
void Reader__add_imported_header(web *W, filename *HF) ;
#line 27 "inweb/Chapter 2/Modules.w"
module * Modules__new(text_stream *name, pathname *at, int m) ;
@ -12289,7 +12289,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
line = TL_IS_83;
{
#line 483 "inweb/Chapter 2/The Reader.w"
#line 490 "inweb/Chapter 2/The Reader.w"
chapter *C = CREATE(chapter);
C->ch_range = Str__duplicate(new_chapter_range);
C->ch_title = Str__duplicate(line);
@ -12315,11 +12315,11 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
filename_of_single_file_web = tfp->text_file_filename;
{
#line 506 "inweb/Chapter 2/The Reader.w"
#line 513 "inweb/Chapter 2/The Reader.w"
section *sect = CREATE(section);
{
#line 519 "inweb/Chapter 2/The Reader.w"
#line 526 "inweb/Chapter 2/The Reader.w"
if (filename_of_single_file_web) {
sect->source_file_for_section = filename_of_single_file_web;
sect->paused_until_at = TRUE;
@ -12355,22 +12355,22 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
Regexp__dispose_of(&mr);
}
#line 507 "inweb/Chapter 2/The Reader.w"
#line 514 "inweb/Chapter 2/The Reader.w"
;
{
#line 554 "inweb/Chapter 2/The Reader.w"
#line 561 "inweb/Chapter 2/The Reader.w"
chapter *C = RS->chapter_being_scanned;
C->owning_web->no_sections++;
sect->owning_chapter = C;
ADD_TO_LINKED_LIST(sect, section, C->sections);
}
#line 508 "inweb/Chapter 2/The Reader.w"
#line 515 "inweb/Chapter 2/The Reader.w"
;
{
#line 566 "inweb/Chapter 2/The Reader.w"
#line 573 "inweb/Chapter 2/The Reader.w"
sect->sect_language = RS->chapter_being_scanned->ch_language; /* by default */
match_results mr = Regexp__create_mr();
if (Regexp__match(&mr, line, L"(%c*%C) %(Independent (%c*) *%)")) {
@ -12378,7 +12378,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
text_stream *language_name = mr.exp[1];
{
#line 579 "inweb/Chapter 2/The Reader.w"
#line 586 "inweb/Chapter 2/The Reader.w"
text_stream *p = language_name;
if (Str__len(p) == 0) p = Bibliographic__get_datum(RS->current_web, TL_IS_88);
programming_language *pl = Languages__find_by_name(p);
@ -12386,7 +12386,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
sect->sect_target = Reader__add_tangle_target(RS->current_web, pl);
}
#line 571 "inweb/Chapter 2/The Reader.w"
#line 578 "inweb/Chapter 2/The Reader.w"
;
Str__copy(sect->sect_title, title_alone);
} else {
@ -12395,13 +12395,13 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
Regexp__dispose_of(&mr);
}
#line 509 "inweb/Chapter 2/The Reader.w"
#line 516 "inweb/Chapter 2/The Reader.w"
;
if (sect->source_file_for_section == NULL)
{
#line 597 "inweb/Chapter 2/The Reader.w"
#line 604 "inweb/Chapter 2/The Reader.w"
TEMPORARY_TEXT(leafname_to_use);
WRITE_TO(leafname_to_use,
"%S%S", sect->sect_title, sect->sect_language->source_file_extension);
@ -12422,7 +12422,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
DISCARD_TEXT(leafname_to_use);
}
#line 512 "inweb/Chapter 2/The Reader.w"
#line 519 "inweb/Chapter 2/The Reader.w"
;
Reader__read_file(RS->current_web, sect->source_file_for_section,
@ -12537,7 +12537,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
text_stream *language_name = mr.exp[1];
{
#line 473 "inweb/Chapter 2/The Reader.w"
#line 480 "inweb/Chapter 2/The Reader.w"
match_results mr = Regexp__create_mr();
if (Regexp__match(&mr, language_name, L" *"))
language_name = Bibliographic__get_datum(RS->current_web, TL_IS_87);
@ -12567,6 +12567,13 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
WRITE_TO(RS->titling_line_to_insert, "%S.", line);
WRITE_TO(pdf_leafname, "Preliminaries.pdf");
RS->current_web->chaptered = TRUE;
} else if (Str__eq_wide_string(line, L"Manual")) {
WRITE_TO(new_chapter_range, "M");
WRITE_TO(RS->chapter_folder_name, "Manual");
Str__clear(RS->titling_line_to_insert);
WRITE_TO(RS->titling_line_to_insert, "%S.", line);
WRITE_TO(pdf_leafname, "Manual.pdf");
RS->current_web->chaptered = TRUE;
} else if (Regexp__match(&mr, line, L"Header: (%c+)")) {
pathname *P = RS->path_to;
if (P == NULL) P = RS->current_web->path_to_web;
@ -12607,13 +12614,13 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
Errors__in_text_file_S(err, tfp);
WRITE_TO(STDERR, "(Must be 'Chapter <number>: Title', "
"'Appendix <letter A to O>: Title',\n");
WRITE_TO(STDERR, "'Preliminaries' or 'Sections')\n");
WRITE_TO(STDERR, "'Manual', 'Preliminaries' or 'Sections')\n");
DISCARD_TEXT(err);
}
if (this_is_a_chapter)
{
#line 483 "inweb/Chapter 2/The Reader.w"
#line 490 "inweb/Chapter 2/The Reader.w"
chapter *C = CREATE(chapter);
C->ch_range = Str__duplicate(new_chapter_range);
C->ch_title = Str__duplicate(line);
@ -12633,7 +12640,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
RS->chapter_being_scanned = C;
}
#line 464 "inweb/Chapter 2/The Reader.w"
#line 471 "inweb/Chapter 2/The Reader.w"
;
DISCARD_TEXT(new_chapter_range);
DISCARD_TEXT(pdf_leafname);
@ -12644,11 +12651,11 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
;
} else
{
#line 506 "inweb/Chapter 2/The Reader.w"
#line 513 "inweb/Chapter 2/The Reader.w"
section *sect = CREATE(section);
{
#line 519 "inweb/Chapter 2/The Reader.w"
#line 526 "inweb/Chapter 2/The Reader.w"
if (filename_of_single_file_web) {
sect->source_file_for_section = filename_of_single_file_web;
sect->paused_until_at = TRUE;
@ -12684,22 +12691,22 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
Regexp__dispose_of(&mr);
}
#line 507 "inweb/Chapter 2/The Reader.w"
#line 514 "inweb/Chapter 2/The Reader.w"
;
{
#line 554 "inweb/Chapter 2/The Reader.w"
#line 561 "inweb/Chapter 2/The Reader.w"
chapter *C = RS->chapter_being_scanned;
C->owning_web->no_sections++;
sect->owning_chapter = C;
ADD_TO_LINKED_LIST(sect, section, C->sections);
}
#line 508 "inweb/Chapter 2/The Reader.w"
#line 515 "inweb/Chapter 2/The Reader.w"
;
{
#line 566 "inweb/Chapter 2/The Reader.w"
#line 573 "inweb/Chapter 2/The Reader.w"
sect->sect_language = RS->chapter_being_scanned->ch_language; /* by default */
match_results mr = Regexp__create_mr();
if (Regexp__match(&mr, line, L"(%c*%C) %(Independent (%c*) *%)")) {
@ -12707,7 +12714,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
text_stream *language_name = mr.exp[1];
{
#line 579 "inweb/Chapter 2/The Reader.w"
#line 586 "inweb/Chapter 2/The Reader.w"
text_stream *p = language_name;
if (Str__len(p) == 0) p = Bibliographic__get_datum(RS->current_web, TL_IS_88);
programming_language *pl = Languages__find_by_name(p);
@ -12715,7 +12722,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
sect->sect_target = Reader__add_tangle_target(RS->current_web, pl);
}
#line 571 "inweb/Chapter 2/The Reader.w"
#line 578 "inweb/Chapter 2/The Reader.w"
;
Str__copy(sect->sect_title, title_alone);
} else {
@ -12724,13 +12731,13 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
Regexp__dispose_of(&mr);
}
#line 509 "inweb/Chapter 2/The Reader.w"
#line 516 "inweb/Chapter 2/The Reader.w"
;
if (sect->source_file_for_section == NULL)
{
#line 597 "inweb/Chapter 2/The Reader.w"
#line 604 "inweb/Chapter 2/The Reader.w"
TEMPORARY_TEXT(leafname_to_use);
WRITE_TO(leafname_to_use,
"%S%S", sect->sect_title, sect->sect_language->source_file_extension);
@ -12751,7 +12758,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
DISCARD_TEXT(leafname_to_use);
}
#line 512 "inweb/Chapter 2/The Reader.w"
#line 519 "inweb/Chapter 2/The Reader.w"
;
Reader__read_file(RS->current_web, sect->source_file_for_section,
@ -12771,7 +12778,7 @@ void Reader__read_contents_line(text_stream *line, text_file_position *tfp, void
;
}
#line 619 "inweb/Chapter 2/The Reader.w"
#line 626 "inweb/Chapter 2/The Reader.w"
void Reader__read_file(web *W, filename *OUT, text_stream *titling_line, section *sect,
int verbosely, int disregard_top) {
section *current_section = sect;
@ -12780,49 +12787,14 @@ void Reader__read_file(web *W, filename *OUT, text_stream *titling_line, section
(sect->owning_chapter->titling_line_inserted == FALSE))
{
#line 637 "inweb/Chapter 2/The Reader.w"
#line 644 "inweb/Chapter 2/The Reader.w"
sect->owning_chapter->titling_line_inserted = TRUE;
TEMPORARY_TEXT(line);
text_file_position *tfp = NULL;
WRITE_TO(line, "Chapter Heading");
{
#line 671 "inweb/Chapter 2/The Reader.w"
source_line *sl = Lines__new_source_line(line, tfp);
/* enter this in its section's linked list of lines: */
sl->owning_section = current_section;
if (current_section->first_line == NULL) current_section->first_line = sl;
else current_section->last_line->next_line = sl;
current_section->last_line = sl;
/* we haven't detected paragraph boundaries yet, so: */
sl->owning_paragraph = NULL;
/* and keep count: */
sl->owning_section->sect_extent++;
sl->owning_section->owning_chapter->ch_extent++;
sl->owning_section->owning_chapter->owning_web->no_lines++;
}
#line 641 "inweb/Chapter 2/The Reader.w"
;
DISCARD_TEXT(line);
}
#line 625 "inweb/Chapter 2/The Reader.w"
;
if (disregard_top)
{
#line 645 "inweb/Chapter 2/The Reader.w"
TEMPORARY_TEXT(line);
text_file_position *tfp = NULL;
WRITE_TO(line, "Main.");
{
#line 671 "inweb/Chapter 2/The Reader.w"
#line 678 "inweb/Chapter 2/The Reader.w"
source_line *sl = Lines__new_source_line(line, tfp);
/* enter this in its section's linked list of lines: */
@ -12842,10 +12814,22 @@ void Reader__read_file(web *W, filename *OUT, text_stream *titling_line, section
}
#line 648 "inweb/Chapter 2/The Reader.w"
;
Str__clear(line);
DISCARD_TEXT(line);
}
#line 632 "inweb/Chapter 2/The Reader.w"
;
if (disregard_top)
{
#line 652 "inweb/Chapter 2/The Reader.w"
TEMPORARY_TEXT(line);
text_file_position *tfp = NULL;
WRITE_TO(line, "Main.");
{
#line 671 "inweb/Chapter 2/The Reader.w"
#line 678 "inweb/Chapter 2/The Reader.w"
source_line *sl = Lines__new_source_line(line, tfp);
/* enter this in its section's linked list of lines: */
@ -12863,12 +12847,35 @@ void Reader__read_file(web *W, filename *OUT, text_stream *titling_line, section
sl->owning_section->owning_chapter->owning_web->no_lines++;
}
#line 650 "inweb/Chapter 2/The Reader.w"
#line 655 "inweb/Chapter 2/The Reader.w"
;
Str__clear(line);
{
#line 678 "inweb/Chapter 2/The Reader.w"
source_line *sl = Lines__new_source_line(line, tfp);
/* enter this in its section's linked list of lines: */
sl->owning_section = current_section;
if (current_section->first_line == NULL) current_section->first_line = sl;
else current_section->last_line->next_line = sl;
current_section->last_line = sl;
/* we haven't detected paragraph boundaries yet, so: */
sl->owning_paragraph = NULL;
/* and keep count: */
sl->owning_section->sect_extent++;
sl->owning_section->owning_chapter->ch_extent++;
sl->owning_section->owning_chapter->owning_web->no_lines++;
}
#line 657 "inweb/Chapter 2/The Reader.w"
;
DISCARD_TEXT(line);
}
#line 628 "inweb/Chapter 2/The Reader.w"
#line 635 "inweb/Chapter 2/The Reader.w"
;
int cl = TextFiles__read(OUT, FALSE, "can't open section file", TRUE,
@ -12877,7 +12884,7 @@ void Reader__read_file(web *W, filename *OUT, text_stream *titling_line, section
PRINT("Read section: '%S' (%d lines)\n", sect->sect_title, cl);
}
#line 658 "inweb/Chapter 2/The Reader.w"
#line 665 "inweb/Chapter 2/The Reader.w"
void Reader__scan_source_line(text_stream *line, text_file_position *tfp, void *state) {
section *current_section = (section *) state;
int l = Str__len(line) - 1;
@ -12889,7 +12896,7 @@ void Reader__scan_source_line(text_stream *line, text_file_position *tfp, void *
}
{
#line 671 "inweb/Chapter 2/The Reader.w"
#line 678 "inweb/Chapter 2/The Reader.w"
source_line *sl = Lines__new_source_line(line, tfp);
/* enter this in its section's linked list of lines: */
@ -12907,11 +12914,11 @@ void Reader__scan_source_line(text_stream *line, text_file_position *tfp, void *
sl->owning_section->owning_chapter->owning_web->no_lines++;
}
#line 667 "inweb/Chapter 2/The Reader.w"
#line 674 "inweb/Chapter 2/The Reader.w"
;
}
#line 695 "inweb/Chapter 2/The Reader.w"
#line 702 "inweb/Chapter 2/The Reader.w"
chapter *Reader__get_chapter_for_range(web *W, text_stream *range) {
chapter *C;
if (W)
@ -12932,7 +12939,7 @@ section *Reader__get_section_for_range(web *W, text_stream *range) {
return NULL;
}
#line 718 "inweb/Chapter 2/The Reader.w"
#line 725 "inweb/Chapter 2/The Reader.w"
section *Reader__section_by_filename(web *W, text_stream *filename) {
chapter *C;
section *S;
@ -12948,7 +12955,7 @@ section *Reader__section_by_filename(web *W, text_stream *filename) {
return NULL;
}
#line 740 "inweb/Chapter 2/The Reader.w"
#line 747 "inweb/Chapter 2/The Reader.w"
int Reader__range_within(text_stream *range1, text_stream *range2) {
if (Str__eq_wide_string(range2, L"0")) return TRUE;
if (Str__eq(range1, range2)) return TRUE;
@ -12960,9 +12967,9 @@ int Reader__range_within(text_stream *range1, text_stream *range2) {
return FALSE;
}
#line 767 "inweb/Chapter 2/The Reader.w"
#line 774 "inweb/Chapter 2/The Reader.w"
#line 769 "inweb/Chapter 2/The Reader.w"
#line 776 "inweb/Chapter 2/The Reader.w"
tangle_target *Reader__add_tangle_target(web *W, programming_language *language) {
tangle_target *tt = CREATE(tangle_target);
tt->tangle_language = language;
@ -12970,7 +12977,7 @@ tangle_target *Reader__add_tangle_target(web *W, programming_language *language)
return tt;
}
#line 792 "inweb/Chapter 2/The Reader.w"
#line 799 "inweb/Chapter 2/The Reader.w"
void Reader__add_imported_header(web *W, filename *HF) {
ADD_TO_LINKED_LIST(HF, filename, W->headers);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -1,284 +0,0 @@
/* This is a CSS file for pages woven by the literate programming tool inweb */
/* We'll start with syntax colouring, since everyone likes to toy with this: */
.cwebmacrotext { color: #000000; font-weight: bold; } /* The name of a web macro */
.functiontext { color: #C00000; } /* When a C function is being defined */
.string { color: #408040; } /* A double-quoted C literal string */
.character { color: #204020; } /* A single-quoted C literal character */
.constant { color: #204020; } /* A named constant */
.element { color: #40407f; } /* A C structure element */
.identifier { color: #4040ff; } /* An identifier */
.reserved { color: #600000; } /* A reserved word */
/* Comments at the end of lines are rendered like so: */
.comment {
font: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
color: #404040;
font-style:italic;
}
/* The name of a web macro when being used: */
.cwebmacro {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
}
.cwebmacronumber {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 80%;
text-decoration: none;
color: #000000;
}
/* And when being defined: */
.cwebmacrodefn {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
font-weight:bold;
}
/* Now some generalities: */
body {
background-color: #ffffff;
margin: 8px;
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 16px;
line-height: 24px;
background-color: transparent;
-webkit-font-smoothing: antialiased;
}
/* Forms of paragraph: */
p {
margin: 0;
padding-top: 5px;
padding-bottom: 5px;
clear: both;
}
/* Where an inweb paragraph begins: */
p.inwebparagraph {
padding-top: 15px;
padding-bottom: 5px;
}
/* If a web macro definition begins in its own paragraph, this is it: */
p.macrodefinition {
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
}
/* The endnotes at the foot of code: "The function foo_bar is used in ..." */
p.endnote {
font-size: 0.8em;
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
text-decoration:none;
color: #000000;
}
/* The Purpose slug: */
p.purpose {
font-size: 1em;
font-style:italic;
margin-left: 15px;
}
/* Blocks of code appear in these */
pre {
font-family: Monaco, monospace;
}
pre.display {
padding: 3px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 30px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.displaydefn {
padding: 3px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.definitions {
padding-top: 0px;
margin-top: 0px;
margin-left: 0px;
margin-right: 10px;
word-wrap: break-word;
white-space: pre-wrap;
}
/* The following are for breadcrumbs of links: */
ul, li {
list-style-type:none;
padding:0;
margin:0;
}
.crumbs {
border:1px solid #dedede;
height:3.45em;
}
.crumbs li {
float:left;
line-height:2.3em;
padding-left:.75em;
color:#333;
font-size: 1.5em;
}
.crumbs li a {
display:block;
padding:0 15px 0 0;
background:url(crumbs.gif) no-repeat right center;
}
.crumbs li a:link, #crumbs li a:visited {
text-decoration:none;
color:#333;
}
.crumbs li a:hover, #crumbs li a:focus {
color:#dd2c0d;
}
/* This is for items in lists from inweb source: */
ul.items {
margin-top: 3px;
margin-bottom: 3px;
}
ul.items li {
margin-top: 1px;
margin-bottom: 1px;
margin-left: 15px;
}
/* And this is for each section's table of contents: */
ul.toc {
margin-top: 3px;
margin-bottom: 3px;
}
ul.toc li {
float:left;
margin-left: 15px;
color:#000;
}
ul.toc li a {
display:block;
}
ul.toc li a:link, ul.toc li a:visited {
text-decoration:none;
color:#000;
}
ul.toc li a:hover, ul.toc li a:focus {
color:#dd2c0d;
}
hr.tocbar {
clear: both;
margin-top:3px;
margin-bottom:3px;
color:#333;
border:0
background-color:#333;
}
/* This is for cross-reference links ("This code is used in ...") */
p.endnote:link, p.endnote:visited, p.endnote:hover, p.endnote:focus {
text-decoration:none;
color:#000;
}
p.endnote a:link, p.endnote a:visited {
text-decoration:none;
color:#000;
}
p.endnote a:hover, p.endnote a:focus {
text-decoration:none;
color:#dd2c0d;
}
/* Now for the index page */
p.heading {
margin-top: 2px;
margin-bottom: 2px;
font-size: 20
}
p.chapter {
font-size: 14
}
p.tight {
font-size: 12
}
p.tightin {
padding-left: 25px;
font-size: 12
}
.chapterlist li {
padding-top: 8px;
padding-left: 16px;
}
.chaptertitle {
font-weight: bold;
}
.chapterlist .sectionlist li {
padding-left: 48px;
}
span.definitionkeyword {
color:#801010;
font-weight:bold;
}
span.extract {
font-size: 15px;
border: 1px solid #e8e8e8;
border-radius: 3px;
background-color: #eef;
width: 100%;
padding: 3px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -1,284 +0,0 @@
/* This is a CSS file for pages woven by the literate programming tool inweb */
/* We'll start with syntax colouring, since everyone likes to toy with this: */
.cwebmacrotext { color: #000000; font-weight: bold; } /* The name of a web macro */
.functiontext { color: #C00000; } /* When a C function is being defined */
.string { color: #408040; } /* A double-quoted C literal string */
.character { color: #204020; } /* A single-quoted C literal character */
.constant { color: #204020; } /* A named constant */
.element { color: #40407f; } /* A C structure element */
.identifier { color: #4040ff; } /* An identifier */
.reserved { color: #600000; } /* A reserved word */
/* Comments at the end of lines are rendered like so: */
.comment {
font: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
color: #404040;
font-style:italic;
}
/* The name of a web macro when being used: */
.cwebmacro {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
}
.cwebmacronumber {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 80%;
text-decoration: none;
color: #000000;
}
/* And when being defined: */
.cwebmacrodefn {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
font-weight:bold;
}
/* Now some generalities: */
body {
background-color: #ffffff;
margin: 8px;
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 16px;
line-height: 24px;
background-color: transparent;
-webkit-font-smoothing: antialiased;
}
/* Forms of paragraph: */
p {
margin: 0;
padding-top: 5px;
padding-bottom: 5px;
clear: both;
}
/* Where an inweb paragraph begins: */
p.inwebparagraph {
padding-top: 15px;
padding-bottom: 5px;
}
/* If a web macro definition begins in its own paragraph, this is it: */
p.macrodefinition {
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
}
/* The endnotes at the foot of code: "The function foo_bar is used in ..." */
p.endnote {
font-size: 0.8em;
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
text-decoration:none;
color: #000000;
}
/* The Purpose slug: */
p.purpose {
font-size: 1em;
font-style:italic;
margin-left: 15px;
}
/* Blocks of code appear in these */
pre {
font-family: Monaco, monospace;
}
pre.display {
padding: 3px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 30px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.displaydefn {
padding: 3px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.definitions {
padding-top: 0px;
margin-top: 0px;
margin-left: 0px;
margin-right: 10px;
word-wrap: break-word;
white-space: pre-wrap;
}
/* The following are for breadcrumbs of links: */
ul, li {
list-style-type:none;
padding:0;
margin:0;
}
.crumbs {
border:1px solid #dedede;
height:3.45em;
}
.crumbs li {
float:left;
line-height:2.3em;
padding-left:.75em;
color:#333;
font-size: 1.5em;
}
.crumbs li a {
display:block;
padding:0 15px 0 0;
background:url(crumbs.gif) no-repeat right center;
}
.crumbs li a:link, #crumbs li a:visited {
text-decoration:none;
color:#333;
}
.crumbs li a:hover, #crumbs li a:focus {
color:#dd2c0d;
}
/* This is for items in lists from inweb source: */
ul.items {
margin-top: 3px;
margin-bottom: 3px;
}
ul.items li {
margin-top: 1px;
margin-bottom: 1px;
margin-left: 15px;
}
/* And this is for each section's table of contents: */
ul.toc {
margin-top: 3px;
margin-bottom: 3px;
}
ul.toc li {
float:left;
margin-left: 15px;
color:#000;
}
ul.toc li a {
display:block;
}
ul.toc li a:link, ul.toc li a:visited {
text-decoration:none;
color:#000;
}
ul.toc li a:hover, ul.toc li a:focus {
color:#dd2c0d;
}
hr.tocbar {
clear: both;
margin-top:3px;
margin-bottom:3px;
color:#333;
border:0
background-color:#333;
}
/* This is for cross-reference links ("This code is used in ...") */
p.endnote:link, p.endnote:visited, p.endnote:hover, p.endnote:focus {
text-decoration:none;
color:#000;
}
p.endnote a:link, p.endnote a:visited {
text-decoration:none;
color:#000;
}
p.endnote a:hover, p.endnote a:focus {
text-decoration:none;
color:#dd2c0d;
}
/* Now for the index page */
p.heading {
margin-top: 2px;
margin-bottom: 2px;
font-size: 20
}
p.chapter {
font-size: 14
}
p.tight {
font-size: 12
}
p.tightin {
padding-left: 25px;
font-size: 12
}
.chapterlist li {
padding-top: 8px;
padding-left: 16px;
}
.chaptertitle {
font-weight: bold;
}
.chapterlist .sectionlist li {
padding-left: 48px;
}
span.definitionkeyword {
color:#801010;
font-weight:bold;
}
span.extract {
font-size: 15px;
border: 1px solid #e8e8e8;
border-radius: 3px;
background-color: #eef;
width: 100%;
padding: 3px;
}

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>P/awwp</title>
<title>M/awwp</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">

View file

@ -622,6 +622,13 @@ we like a spoonful of syntactic sugar on our porridge, that's why.
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;titling_line_to_insert</span><span class="plain">, </span><span class="string">"%S."</span><span class="plain">, </span><span class="identifier">line</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">pdf_leafname</span><span class="plain">, </span><span class="string">"Preliminaries.pdf"</span><span class="plain">);</span>
<span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;current_web</span><span class="plain">-</span><span class="element">&gt;chaptered</span><span class="plain"> = </span><span class="constant">TRUE</span><span class="plain">;</span>
<span class="plain">} </span><span class="reserved">else</span><span class="plain"> </span><span class="reserved">if</span><span class="plain"> (</span><span class="functiontext">Str::eq_wide_string</span><span class="plain">(</span><span class="identifier">line</span><span class="plain">, </span><span class="identifier">L</span><span class="string">"Manual"</span><span class="plain">)) {</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">new_chapter_range</span><span class="plain">, </span><span class="string">"M"</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;chapter_folder_name</span><span class="plain">, </span><span class="string">"Manual"</span><span class="plain">);</span>
<span class="functiontext">Str::clear</span><span class="plain">(</span><span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;titling_line_to_insert</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;titling_line_to_insert</span><span class="plain">, </span><span class="string">"%S."</span><span class="plain">, </span><span class="identifier">line</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">pdf_leafname</span><span class="plain">, </span><span class="string">"Manual.pdf"</span><span class="plain">);</span>
<span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;current_web</span><span class="plain">-</span><span class="element">&gt;chaptered</span><span class="plain"> = </span><span class="constant">TRUE</span><span class="plain">;</span>
<span class="plain">} </span><span class="reserved">else</span><span class="plain"> </span><span class="reserved">if</span><span class="plain"> (</span><span class="functiontext">Regexp::match</span><span class="plain">(&amp;</span><span class="identifier">mr</span><span class="plain">, </span><span class="identifier">line</span><span class="plain">, </span><span class="identifier">L</span><span class="string">"Header: (%c+)"</span><span class="plain">)) {</span>
<span class="reserved">pathname</span><span class="plain"> *</span><span class="identifier">P</span><span class="plain"> = </span><span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;path_to</span><span class="plain">;</span>
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">P</span><span class="plain"> == </span><span class="identifier">NULL</span><span class="plain">) </span><span class="identifier">P</span><span class="plain"> = </span><span class="identifier">RS</span><span class="plain">-</span><span class="element">&gt;current_web</span><span class="plain">-</span><span class="element">&gt;path_to_web</span><span class="plain">;</span>
@ -662,7 +669,7 @@ we like a spoonful of syntactic sugar on our porridge, that's why.
<span class="functiontext">Errors::in_text_file_S</span><span class="plain">(</span><span class="identifier">err</span><span class="plain">, </span><span class="identifier">tfp</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="constant">STDERR</span><span class="plain">, </span><span class="string">"(Must be 'Chapter &lt;number&gt;: Title', "</span>
<span class="string">"'Appendix &lt;letter A to O&gt;: Title',\</span><span class="plain">n</span><span class="string">"</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="constant">STDERR</span><span class="plain">, </span><span class="string">"'Preliminaries' or 'Sections')\</span><span class="plain">n</span><span class="string">"</span><span class="plain">);</span>
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="constant">STDERR</span><span class="plain">, </span><span class="string">"'Manual', 'Preliminaries' or 'Sections')\</span><span class="plain">n</span><span class="string">"</span><span class="plain">);</span>
<span class="identifier">DISCARD_TEXT</span><span class="plain">(</span><span class="identifier">err</span><span class="plain">);</span>
<span class="plain">}</span>

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>P/tid</title>
<title>M/tid</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">
@ -23,10 +23,10 @@
</nav>
<main role="main">
<!--Weave of 'P/awwp' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>Advanced Weaving with Patterns</b></li></ul><p class="purpose">Customise the booklets woven from a web.</p>
<!--Weave of 'M/awwp' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#M">Manual</a></li><li><b>Advanced Weaving with Patterns</b></li></ul><p class="purpose">Customise the booklets woven from a web.</p>
<ul class="toc"><li><a href="#SP1">&#167;1. Weave patterns</a></li><li><a href="#SP4">&#167;4. Cover sheets</a></li><li><a href="#SP5">&#167;5. Indexing</a></li></ul><hr class="tocbar">
<ul class="toc"><li><a href="#SP1">&#167;1. Weave patterns</a></li><li><a href="#SP4">&#167;4. Cover sheets</a></li><li><a href="#SP5">&#167;5. Indexing</a></li><li><a href="#SP7">&#167;7. Navigation and breadcrumbs</a></li></ul><hr class="tocbar">
<p class="inwebparagraph"><a id="SP1"></a><b>&#167;1. Weave patterns. </b>As noted, the two most useful weave patterns are <code class="display"><span class="extract">-weave-as HTML</span></code> and
<code class="display"><span class="extract">-weave-as TeX</span></code>, and these are both supplied built in to Inweb. When you
@ -326,8 +326,57 @@ a repetition, but happens just once, for the named chapter or section.
<p class="inwebparagraph"></p>
<p class="inwebparagraph"><a id="SP7"></a><b>&#167;7. Navigation and breadcrumbs. </b>When assembling large numbers of woven websites together, as is needed for
example by the main Inform repository's GitHub pages, we need to navigate
externally as well as internally: that is, the page for one tool will need
a way to link to pages for other tools.
</p>
<p class="inwebparagraph">To that end, the special expansion <code class="display"><span class="extract">[[Navigation]]</span></code> in a pattern template
will expand by looking for a file which contains a fragment of HTML, usually
consisting only of an un-numbered list of links.
</p>
<p class="inwebparagraph">By default, Inweb looks for a file called <code class="display"><span class="extract">nav.html</span></code> in two directories: the
one above the destination, and the destination. If both exist, they are both
used. If neither exists, the expansion is empty, but no error is produced.
</p>
<p class="inwebparagraph">However, this can be overridden at the command line, with <code class="display"><span class="extract">-navigation N</span></code>,
where <code class="display"><span class="extract">N</span></code> is the filename for a suitable fragment of navigation HTML.
</p>
<p class="inwebparagraph"><a id="SP8"></a><b>&#167;8. </b>The row of breadcrumbs at the top of a woven website can also be
customised from the command line, in that the prefatory breadcrumbs can
be explicitly chosen. (If they are not chosen, there's just a star, which
links to the relevant GitHub repository home page.) Any number can be
supplied. For example:
</p>
<p class="inwebparagraph"></p>
<pre class="display">
<span class="plain">-breadcrumb 'Groceries:groc.html' -breadcrumb Produce</span>
</pre>
<p class="inwebparagraph">produces the trail
</p>
<p class="inwebparagraph"></p>
<pre class="display">
<span class="plain">Groceries &gt; Produce &gt; ...</span>
</pre>
<p class="inwebparagraph">with the links being to <code class="display"><span class="extract">groc.html</span></code> and <code class="display"><span class="extract">Produce.html</span></code> respectively. (The
colon is optional, and needed only if the link is not to the text with <code class="display"><span class="extract">.html</span></code>
appended.)
</p>
<hr class="tocbar">
<ul class="toc"><li><a href="P-tid.html">Back to 'The InC Dialect'</a></li><li><i>(This section ends Preliminaries.)</i></li></ul><hr class="tocbar">
<ul class="toc"><li><a href="M-tid.html">Back to 'The InC Dialect'</a></li><li><i>(This section ends Manual.)</i></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>P/wtaw</title>
<title>M/wtaw</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">
@ -23,8 +23,8 @@
</nav>
<main role="main">
<!--Weave of 'P/htwaw' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>How to Write a Web</b></li></ul><p class="purpose">How to mark up code for literate programming.</p>
<!--Weave of 'M/htwaw' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#M">Manual</a></li><li><b>How to Write a Web</b></li></ul><p class="purpose">How to mark up code for literate programming.</p>
<ul class="toc"><li><a href="#SP1">&#167;1. The title of a section</a></li><li><a href="#SP2">&#167;2. Paragraphing</a></li><li><a href="#SP6">&#167;6. Conditional compilation</a></li><li><a href="#SP7">&#167;7. Commentary</a></li></ul><hr class="tocbar">
@ -519,7 +519,7 @@ be rendered in HTML as <code class="display"><span class="extract">x &lt;= y</sp
<p class="inwebparagraph"></p>
<hr class="tocbar">
<ul class="toc"><li><a href="P-wtaw.html">Back to 'Webs, Tangling and Weaving'</a></li><li><a href="P-tid.html">Continue with 'The InC Dialect'</a></li></ul><hr class="tocbar">
<ul class="toc"><li><a href="M-wtaw.html">Back to 'Webs, Tangling and Weaving'</a></li><li><a href="M-tid.html">Continue with 'The InC Dialect'</a></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>

View file

@ -23,8 +23,8 @@
</nav>
<main role="main">
<!--Weave of 'P/iti' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>Introduction to Inweb</b></li></ul><p class="purpose">What Inweb is, and why it is not CWEB.</p>
<!--Weave of 'M/iti' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#M">Manual</a></li><li><b>Introduction to Inweb</b></li></ul><p class="purpose">What Inweb is, and why it is not CWEB.</p>
<ul class="toc"><li><a href="#SP1">&#167;1. Introduction</a></li><li><a href="#SP2">&#167;2. Installation</a></li><li><a href="#SP4">&#167;4. Historical note</a></li></ul><hr class="tocbar">
@ -269,7 +269,7 @@ with this breakpoint". We do not recommend this.
and, if desired, chapters.
</li></ul>
<hr class="tocbar">
<ul class="toc"><li><i>(This section begins Preliminaries.)</i></li><li><a href="P-wtaw.html">Continue with 'Webs, Tangling and Weaving'</a></li></ul><hr class="tocbar">
<ul class="toc"><li><i>(This section begins Manual.)</i></li><li><a href="M-wtaw.html">Continue with 'Webs, Tangling and Weaving'</a></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>P/htwaw</title>
<title>M/htwaw</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">
@ -23,8 +23,8 @@
</nav>
<main role="main">
<!--Weave of 'P/tid' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>The InC Dialect</b></li></ul><p class="purpose">A modest extension of C used by the Inform project.</p>
<!--Weave of 'M/tid' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#M">Manual</a></li><li><b>The InC Dialect</b></li></ul><p class="purpose">A modest extension of C used by the Inform project.</p>
<ul class="toc"><li><a href="#SP1">&#167;1. The InC language</a></li></ul><hr class="tocbar">
@ -136,7 +136,7 @@ notation means, but for example:
<p class="inwebparagraph"></p>
<hr class="tocbar">
<ul class="toc"><li><a href="P-htwaw.html">Back to 'How to Write a Web'</a></li><li><a href="P-awwp.html">Continue with 'Advanced Weaving with Patterns'</a></li></ul><hr class="tocbar">
<ul class="toc"><li><a href="M-htwaw.html">Back to 'How to Write a Web'</a></li><li><a href="M-awwp.html">Continue with 'Advanced Weaving with Patterns'</a></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>P/iti</title>
<title>M/iti</title>
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">
@ -23,8 +23,8 @@
</nav>
<main role="main">
<!--Weave of 'P/wtaw' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>Webs, Tangling and Weaving</b></li></ul><p class="purpose">How to use Inweb to weave or tangle a web already written.</p>
<!--Weave of 'M/wtaw' generated by 7-->
<ul class="crumbs"><li><a href="../webs.html">Source</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#M">Manual</a></li><li><b>Webs, Tangling and Weaving</b></li></ul><p class="purpose">How to use Inweb to weave or tangle a web already written.</p>
<ul class="toc"><li><a href="#SP1">&#167;1. All-in-one webs</a></li><li><a href="#SP4">&#167;4. Multi-section webs</a></li><li><a href="#SP7">&#167;7. Tangling</a></li><li><a href="#SP10">&#167;10. Weaving</a></li><li><a href="#SP13">&#167;13. Weave tags</a></li><li><a href="#SP14">&#167;14. Modules</a></li><li><a href="#SP17">&#167;17. The section catalogue</a></li><li><a href="#SP18">&#167;18. Makefile</a></li><li><a href="#SP19">&#167;19. Gitignore</a></li><li><a href="#SP20">&#167;20. GitHub Pages support</a></li></ul><hr class="tocbar">
@ -248,9 +248,9 @@ are stored in subdirectories of the web directory:
stored in a single subdirectory called <code class="display"><span class="extract">Sections</span></code>.
</li></ul>
<ul class="items"><li>(b) Alternatively (not additionally), a larger web can use chapter
subdirectories called <code class="display"><span class="extract">Preliminaries</span></code>, <code class="display"><span class="extract">Chapter 1</span></code>, <code class="display"><span class="extract">Chapter 2</span></code>, ...,
subdirectories called <code class="display"><span class="extract">Manual</span></code>, <code class="display"><span class="extract">Preliminaries</span></code>, <code class="display"><span class="extract">Chapter 1</span></code>, <code class="display"><span class="extract">Chapter 2</span></code>, ...,
<code class="display"><span class="extract">Appendix A</span></code>, <code class="display"><span class="extract">Appendix B</span></code>, ...; preliminaries and appendices being optional.
(There can't be a Chapter 0, though there can be Appendix A, B, C, ..., O.)
(There can't be a Chapter 0, though there can be Appendix A, B, C, ..., L.)
</li></ul>
<p class="inwebparagraph">A multi-section web can contain a variety of other subdirectories as needed.
Two in particular, <code class="display"><span class="extract">Woven</span></code> and <code class="display"><span class="extract">Tangled</span></code>, are automatically created by Inweb
@ -371,9 +371,9 @@ much longer roster, such as:
</pre>
<p class="inwebparagraph">... and so on. Here the sections appear in directories called Preliminaries,
Chapter 1, Chapter 2, ..., Appendix A. (These are the only possibilities:
Inweb doesn't allow other forms of name for blocks of sections. There can't be
a Chapter 0, though there can be Appendix B, C, ..., O.)
Chapter 1, Chapter 2, ..., Appendix A. (There can't be a Chapter 0, though
there can be Appendix B, C, ..., O; there can also be a Manual chapter, in
the sense of documentation.)
</p>
<p class="inwebparagraph">In case of any doubt we can use the following command-line switch to see
@ -579,9 +579,9 @@ sense only for chaptered webs, and puts each chapter into its own file.
<p class="inwebparagraph"></p>
<ul class="items"><li>(a) In a chaptered web, chapters are abbreviated to just their numbers: for
example, the range <code class="display"><span class="extract">2</span></code> means "just Chapter 2". The Preliminaries alone is <code class="display"><span class="extract">P</span></code>.
Appendix A, B, C are <code class="display"><span class="extract">A</span></code>, <code class="display"><span class="extract">B</span></code>, <code class="display"><span class="extract">C</span></code> and so on. (This is why Appendices can
only run up to O.)
example, the range <code class="display"><span class="extract">2</span></code> means "just Chapter 2". The Preliminaries alone is <code class="display"><span class="extract">P</span></code>;
the Manual, <code class="display"><span class="extract">M</span></code>. Appendix A, B, C are <code class="display"><span class="extract">A</span></code>, <code class="display"><span class="extract">B</span></code>, <code class="display"><span class="extract">C</span></code> and so on. (This is why
Appendices can only run up to L.)
</li></ul>
<ul class="items"><li>(b) In an unchaptered web, <code class="display"><span class="extract">S</span></code> means "all the sections". This is almost but not
quite the same as <code class="display"><span class="extract">all</span></code>: the cover sheet (a sort of title page) is omitted.
@ -875,7 +875,7 @@ above them.
</p>
<hr class="tocbar">
<ul class="toc"><li><a href="P-iti.html">Back to 'Introduction to Inweb'</a></li><li><a href="P-htwaw.html">Continue with 'How to Write a Web'</a></li></ul><hr class="tocbar">
<ul class="toc"><li><a href="M-iti.html">Back to 'Introduction to Inweb'</a></li><li><a href="M-htwaw.html">Continue with 'How to Write a Web'</a></li></ul><hr class="tocbar">
<!--End of weave-->
</main>
</body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -26,27 +26,27 @@
<hr>
<ul class="chapterlist">
<li>
<p><a name="P"></a><spon class="chaptertitle">Preliminaries</span></p>
<p><span class="purpose">This chapter of preliminaries, from the Inweb web, makes up the User Guide for the program.</span></p>
<p><a name="M"></a><spon class="chaptertitle">Manual</span></p>
<p><span class="purpose"></span></p>
<ul class="sectionlist">
<li>
<p><a href="P-iti.html"><spon class="sectiontitle">Introduction to Inweb</span></a> -
<p><a href="M-iti.html"><spon class="sectiontitle">Introduction to Inweb</span></a> -
<span class="purpose">What Inweb is, and why it is not CWEB.</span></p>
</li>
<li>
<p><a href="P-wtaw.html"><spon class="sectiontitle">Webs, Tangling and Weaving</span></a> -
<p><a href="M-wtaw.html"><spon class="sectiontitle">Webs, Tangling and Weaving</span></a> -
<span class="purpose">How to use Inweb to weave or tangle a web already written.</span></p>
</li>
<li>
<p><a href="P-htwaw.html"><spon class="sectiontitle">How to Write a Web</span></a> -
<p><a href="M-htwaw.html"><spon class="sectiontitle">How to Write a Web</span></a> -
<span class="purpose">How to mark up code for literate programming.</span></p>
</li>
<li>
<p><a href="P-tid.html"><spon class="sectiontitle">The InC Dialect</span></a> -
<p><a href="M-tid.html"><spon class="sectiontitle">The InC Dialect</span></a> -
<span class="purpose">A modest extension of C used by the Inform project.</span></p>
</li>
<li>
<p><a href="P-awwp.html"><spon class="sectiontitle">Advanced Weaving with Patterns</span></a> -
<p><a href="M-awwp.html"><spon class="sectiontitle">Advanced Weaving with Patterns</span></a> -
<span class="purpose">Customise the booklets woven from a web.</span></p>
</li>
</ul>

View file

@ -1,284 +0,0 @@
/* This is a CSS file for pages woven by the literate programming tool inweb */
/* We'll start with syntax colouring, since everyone likes to toy with this: */
.cwebmacrotext { color: #000000; font-weight: bold; } /* The name of a web macro */
.functiontext { color: #C00000; } /* When a C function is being defined */
.string { color: #408040; } /* A double-quoted C literal string */
.character { color: #204020; } /* A single-quoted C literal character */
.constant { color: #204020; } /* A named constant */
.element { color: #40407f; } /* A C structure element */
.identifier { color: #4040ff; } /* An identifier */
.reserved { color: #600000; } /* A reserved word */
/* Comments at the end of lines are rendered like so: */
.comment {
font: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
color: #404040;
font-style:italic;
}
/* The name of a web macro when being used: */
.cwebmacro {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
}
.cwebmacronumber {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 80%;
text-decoration: none;
color: #000000;
}
/* And when being defined: */
.cwebmacrodefn {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
font-weight:bold;
}
/* Now some generalities: */
body {
background-color: #ffffff;
margin: 8px;
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 16px;
line-height: 24px;
background-color: transparent;
-webkit-font-smoothing: antialiased;
}
/* Forms of paragraph: */
p {
margin: 0;
padding-top: 5px;
padding-bottom: 5px;
clear: both;
}
/* Where an inweb paragraph begins: */
p.inwebparagraph {
padding-top: 15px;
padding-bottom: 5px;
}
/* If a web macro definition begins in its own paragraph, this is it: */
p.macrodefinition {
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
}
/* The endnotes at the foot of code: "The function foo_bar is used in ..." */
p.endnote {
font-size: 0.8em;
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
text-decoration:none;
color: #000000;
}
/* The Purpose slug: */
p.purpose {
font-size: 1em;
font-style:italic;
margin-left: 15px;
}
/* Blocks of code appear in these */
pre {
font-family: Monaco, monospace;
}
pre.display {
padding: 3px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 30px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.displaydefn {
padding: 3px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.definitions {
padding-top: 0px;
margin-top: 0px;
margin-left: 0px;
margin-right: 10px;
word-wrap: break-word;
white-space: pre-wrap;
}
/* The following are for breadcrumbs of links: */
ul, li {
list-style-type:none;
padding:0;
margin:0;
}
.crumbs {
border:1px solid #dedede;
height:3.45em;
}
.crumbs li {
float:left;
line-height:2.3em;
padding-left:.75em;
color:#333;
font-size: 1.5em;
}
.crumbs li a {
display:block;
padding:0 15px 0 0;
background:url(crumbs.gif) no-repeat right center;
}
.crumbs li a:link, #crumbs li a:visited {
text-decoration:none;
color:#333;
}
.crumbs li a:hover, #crumbs li a:focus {
color:#dd2c0d;
}
/* This is for items in lists from inweb source: */
ul.items {
margin-top: 3px;
margin-bottom: 3px;
}
ul.items li {
margin-top: 1px;
margin-bottom: 1px;
margin-left: 15px;
}
/* And this is for each section's table of contents: */
ul.toc {
margin-top: 3px;
margin-bottom: 3px;
}
ul.toc li {
float:left;
margin-left: 15px;
color:#000;
}
ul.toc li a {
display:block;
}
ul.toc li a:link, ul.toc li a:visited {
text-decoration:none;
color:#000;
}
ul.toc li a:hover, ul.toc li a:focus {
color:#dd2c0d;
}
hr.tocbar {
clear: both;
margin-top:3px;
margin-bottom:3px;
color:#333;
border:0
background-color:#333;
}
/* This is for cross-reference links ("This code is used in ...") */
p.endnote:link, p.endnote:visited, p.endnote:hover, p.endnote:focus {
text-decoration:none;
color:#000;
}
p.endnote a:link, p.endnote a:visited {
text-decoration:none;
color:#000;
}
p.endnote a:hover, p.endnote a:focus {
text-decoration:none;
color:#dd2c0d;
}
/* Now for the index page */
p.heading {
margin-top: 2px;
margin-bottom: 2px;
font-size: 20
}
p.chapter {
font-size: 14
}
p.tight {
font-size: 12
}
p.tightin {
padding-left: 25px;
font-size: 12
}
.chapterlist li {
padding-top: 8px;
padding-left: 16px;
}
.chaptertitle {
font-weight: bold;
}
.chapterlist .sectionlist li {
padding-left: 48px;
}
span.definitionkeyword {
color:#801010;
font-weight:bold;
}
span.extract {
font-size: 15px;
border: 1px solid #e8e8e8;
border-radius: 3px;
background-color: #eef;
width: 100%;
padding: 3px;
}

View file

@ -77,10 +77,14 @@ test:
.PHONY: pages
pages:
mkdir -p $(ME)/docs
rm $(ME)/docs/*.html
inform/inpolicy/Tangled/inpolicy -write-me inweb/scripts/READMEscript.txt
mkdir -p $(ME)/docs/inweb
rm $(ME)/docs/inweb/*.html
mkdir -p $(ME)/docs/foundation-module
rm $(ME)/docs/foundation-module/*.html
mkdir -p $(ME)/docs/foundation-test
rm $(ME)/docs/foundation-test/*.html
$(INWEB) $(ME)/docs/docs-src/webs.inweb -weave-as GitHubCovers -weave-into $(ME)/docs -navigation $(ME)/docs/docs-src/nav-o.html
$(INWEB) $(ME) -weave-docs -weave-into $(ME)/docs/inweb -breadcrumb 'Source:../webs.html' -navigation $(ME)/docs/docs-src/nav.html
$(INWEB) $(ME)/foundation-module -weave-docs -weave-into $(ME)/docs/foundation-module -breadcrumb 'Source:../webs.html' -navigation $(ME)/docs/docs-src/nav.html

View file

@ -15,7 +15,7 @@ Literate programming is a methodology created by Donald Knuth in the late
be readable by humans as well as by other programs. The human-readable form
for Inweb (which is itself a web) is here: [&#9733;&nbsp;inweb](docs/inweb/index.html).
For the Inweb manual, see [&#9733;&nbsp;inweb/Preliminaries](docs/inweb/P-iti).
For the Inweb manual, see [&#9733;&nbsp;inweb/Preliminaries](docs/inweb/M-iti).
__Disclaimer__. Because this is a private repository (until the next public
release of Inform, when it will open), its GitHub pages server cannot be

View file

@ -97,10 +97,14 @@ test:
.PHONY: pages
pages:
mkdir -p $(ME)/docs
rm $(ME)/docs/*.html
inform/inpolicy/Tangled/inpolicy -write-me inweb/scripts/READMEscript.txt
mkdir -p $(ME)/docs/inweb
rm $(ME)/docs/inweb/*.html
mkdir -p $(ME)/docs/foundation-module
rm $(ME)/docs/foundation-module/*.html
mkdir -p $(ME)/docs/foundation-test
rm $(ME)/docs/foundation-test/*.html
$(INWEB) $(ME)/docs/docs-src/webs.inweb -weave-as GitHubCovers -weave-into $(ME)/docs -navigation $(ME)/docs/docs-src/nav-o.html
$(INWEB) $(ME) -weave-docs -weave-into $(ME)/docs/inweb -breadcrumb 'Source:../webs.html' -navigation $(ME)/docs/docs-src/nav.html
$(INWEB) $(ME)/foundation-module -weave-docs -weave-into $(ME)/docs/foundation-module -breadcrumb 'Source:../webs.html' -navigation $(ME)/docs/docs-src/nav.html