diff --git a/Chapter 2/Line Categories.w b/Chapter 2/Line Categories.w index 7381c49..1d777bd 100644 --- a/Chapter 2/Line Categories.w +++ b/Chapter 2/Line Categories.w @@ -155,6 +155,9 @@ some of these fell into disuse in version 2 syntax. @e GRAMMAR_INDEX_CMD @e FIGURE_CMD @e CAROUSEL_CMD +@e CAROUSEL_ABOVE_CMD +@e CAROUSEL_BELOW_CMD +@e CAROUSEL_UNCAPTIONED_CMD @e CAROUSEL_END_CMD @e EMBED_CMD @e TAG_CMD diff --git a/Chapter 2/The Parser.w b/Chapter 2/The Parser.w index f30309c..a8d9944 100644 --- a/Chapter 2/The Parser.w +++ b/Chapter 2/The Parser.w @@ -375,6 +375,30 @@ division in the current section. code_lcat_for_body = COMMENT_BODY_LCAT; L->text_operand = Str::duplicate(mr2.exp[0]); comment_mode = TRUE; + } else if ((current_paragraph) && + (Regexp::match(&mr2, mr.exp[0], L"%(carousel%)"))) { + Tags::add_by_name(L->owning_paragraph, I"Carousels"); + L->command_code = CAROUSEL_UNCAPTIONED_CMD; + L->category = COMMAND_LCAT; + code_lcat_for_body = COMMENT_BODY_LCAT; + L->text_operand = Str::new(); + comment_mode = TRUE; + } else if ((current_paragraph) && + (Regexp::match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\" below%)"))) { + Tags::add_by_name(L->owning_paragraph, I"Carousels"); + L->command_code = CAROUSEL_BELOW_CMD; + L->category = COMMAND_LCAT; + code_lcat_for_body = COMMENT_BODY_LCAT; + L->text_operand = Str::duplicate(mr2.exp[0]); + comment_mode = TRUE; + } else if ((current_paragraph) && + (Regexp::match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\" above%)"))) { + Tags::add_by_name(L->owning_paragraph, I"Carousels"); + L->command_code = CAROUSEL_ABOVE_CMD; + L->category = COMMAND_LCAT; + code_lcat_for_body = COMMENT_BODY_LCAT; + L->text_operand = Str::duplicate(mr2.exp[0]); + comment_mode = TRUE; } else if ((current_paragraph) && (Regexp::match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\"%)"))) { Tags::add_by_name(L->owning_paragraph, I"Carousels"); diff --git a/Chapter 3/The Weaver.w b/Chapter 3/The Weaver.w index 560ab3f..20c76d1 100644 --- a/Chapter 3/The Weaver.w +++ b/Chapter 3/The Weaver.w @@ -309,36 +309,28 @@ at us; but we don't weave them into the output, that's for sure. if (L->command_code == GRAMMAR_INDEX_CMD) Trees::make_child(WeaveTree::grammar_index(tree), state->ap); if (L->command_code == FIGURE_CMD) @; + if (L->command_code == EMBED_CMD) @; if (L->command_code == CAROUSEL_CMD) @; + if (L->command_code == CAROUSEL_ABOVE_CMD) @; + if (L->command_code == CAROUSEL_BELOW_CMD) @; + if (L->command_code == CAROUSEL_UNCAPTIONED_CMD) @; if (L->command_code == CAROUSEL_END_CMD) @; - if (L->command_code == EMBED_CMD) - Weaver::embed(tree, wv, state->ap, L->text_operand, L->text_operand2); /* Otherwise assume it was a tangler command, and ignore it here */ continue; } @ = - text_stream *figname = L->text_operand; - match_results mr = Regexp::create_mr(); - if (Regexp::match(&mr, figname, L"(%d+)cm: (%c+)")) { - if (S->md->using_syntax > V1_SYNTAX) - Parser::wrong_version(S->md->using_syntax, L, "Figure: Xcm:...", V1_SYNTAX); - Weaver::figure(tree, wv, state->ap, mr.exp[1], Str::atoi(mr.exp[0], 0), -1); - } else if (Regexp::match(&mr, figname, L"(%c+) width (%d+)cm")) { - if (S->md->using_syntax < V2_SYNTAX) - Parser::wrong_version(S->md->using_syntax, L, "F width Xcm", V2_SYNTAX); - Weaver::figure(tree, wv, state->ap, mr.exp[0], Str::atoi(mr.exp[1], 0), -1); - } else if (Regexp::match(&mr, figname, L"(%c+) height (%d+)cm")) { - if (S->md->using_syntax < V2_SYNTAX) - Parser::wrong_version(S->md->using_syntax, L, "F height Xcm", V2_SYNTAX); - Weaver::figure(tree, wv, state->ap, mr.exp[0], -1, Str::atoi(mr.exp[1], 0)); - } else { - Weaver::figure(tree, wv, state->ap, figname, -1, -1); - } - Regexp::dispose_of(&mr); + int w, h; + text_stream *figname = Weaver::dimensions(L->text_operand, &w, &h, L); + Trees::make_child(WeaveTree::figure(tree, figname, w, h), state->ap); + +@ = + int w, h; + text_stream *ID = Weaver::dimensions(L->text_operand2, &w, &h, L); + Trees::make_child(WeaveTree::embed(tree, L->text_operand, ID, w, h), state->ap); @ = - tree_node *C = WeaveTree::carousel_slide(tree, L->text_operand); + tree_node *C = WeaveTree::carousel_slide(tree, L->text_operand, L->command_code); Trees::make_child(C, state->para_node); state->ap = C; state->carousel_node = C; @@ -800,17 +792,58 @@ void Weaver::figure(heterogeneous_tree *tree, weave_order *wv, Trees::make_child(F, ap); } -void Weaver::embed(heterogeneous_tree *tree, weave_order *wv, - tree_node *ap, text_stream *service, text_stream *ID) { - tree_node *F = WeaveTree::embed(tree, service, ID); - Trees::make_child(F, ap); -} - void Weaver::commentary_text(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *matter) { TextWeaver::commentary_text(tree, ap, matter); } +@ + +@d POINTS_PER_CM 72 + += +text_stream *Weaver::dimensions(text_stream *item, int *w, int *h, source_line *L) { + int sv = L->owning_section->md->using_syntax; + *w = -1; *h = -1; + text_stream *use = item; + match_results mr = Regexp::create_mr(); + if (Regexp::match(&mr, item, L"(%c+) at (%d+) by (%d+)")) { + if (sv < V2_SYNTAX) + Parser::wrong_version(sv, L, "at X by Y", V2_SYNTAX); + *w = Str::atoi(mr.exp[1], 0); + *h = Str::atoi(mr.exp[2], 0); + use = Str::duplicate(mr.exp[0]); + } else if (Regexp::match(&mr, item, L"(%c+) at height (%d+)")) { + if (sv < V2_SYNTAX) + Parser::wrong_version(sv, L, "at height Y", V2_SYNTAX); + *h = Str::atoi(mr.exp[1], 0); + use = Str::duplicate(mr.exp[0]); + } else if (Regexp::match(&mr, item, L"(%c+) at width (%d+)")) { + if (sv < V2_SYNTAX) + Parser::wrong_version(sv, L, "at width Y", V2_SYNTAX); + *w = Str::atoi(mr.exp[1], 0); + use = Str::duplicate(mr.exp[0]); + } else if (Regexp::match(&mr, item, L"(%c+) at (%d+)cm by (%d+)cm")) { + if (sv < V2_SYNTAX) + Parser::wrong_version(sv, L, "at Xcm by Ycm", V2_SYNTAX); + *w = POINTS_PER_CM*Str::atoi(mr.exp[1], 0); + *h = POINTS_PER_CM*Str::atoi(mr.exp[2], 0); + use = Str::duplicate(mr.exp[0]); + } else if (Regexp::match(&mr, item, L"(%c+) at height (%d+)cm")) { + if (sv < V2_SYNTAX) + Parser::wrong_version(sv, L, "at height Ycm", V2_SYNTAX); + *h = POINTS_PER_CM*Str::atoi(mr.exp[1], 0); + use = Str::duplicate(mr.exp[0]); + } else if (Regexp::match(&mr, item, L"(%c+) at width (%d+)cm")) { + if (sv < V2_SYNTAX) + Parser::wrong_version(sv, L, "at width Ycm", V2_SYNTAX); + *w = POINTS_PER_CM*Str::atoi(mr.exp[1], 0); + use = Str::duplicate(mr.exp[0]); + } + Regexp::dispose_of(&mr); + return use; +} + @h Section tables of contents. These appear at the top of each woven section, and give links to the paragraphs marked as |@h| headings. diff --git a/Chapter 5/Debugging Format.w b/Chapter 5/Debugging Format.w index b104d80..8d89200 100644 --- a/Chapter 5/Debugging Format.w +++ b/Chapter 5/Debugging Format.w @@ -150,7 +150,7 @@ int Debugging::render_visit(tree_node *N, void *state, int L) { @ = weave_embed_node *C = RETRIEVE_POINTER_weave_embed_node(N->content); - WRITE(" service <%S> ID <%S>", C->service, C->ID); + WRITE(" service <%S> ID <%S> %d by %d", C->service, C->ID, C->w, C->h); @ = weave_pmac_node *C = RETRIEVE_POINTER_weave_pmac_node(N->content); diff --git a/Chapter 5/HTML Formats.w b/Chapter 5/HTML Formats.w index 6a06c0f..814066a 100644 --- a/Chapter 5/HTML Formats.w +++ b/Chapter 5/HTML Formats.w @@ -112,6 +112,7 @@ typedef struct HTML_render_state { int EPUB_flag; int popup_counter; int last_material_seen; + int carousel_number; int slide_number; int slide_of; } HTML_render_state; @@ -125,6 +126,7 @@ void HTMLFormat::render_inner(weave_format *self, text_stream *OUT, heterogeneou hrs.EPUB_flag = EPUB_mode; hrs.popup_counter = 1; hrs.last_material_seen = -1; + hrs.carousel_number = 1; hrs.slide_number = -1; hrs.slide_of = -1; Swarm::ensure_plugin(C->wv, I"Base"); @@ -270,7 +272,16 @@ int HTMLFormat::render_visit(tree_node *N, void *state, int L) { @ = weave_figure_node *C = RETRIEVE_POINTER_weave_figure_node(N->content); - HTMLFormat::figure(hrs->wv->format, OUT, hrs->wv, C->figname, C->w, C->h); + HTMLFormat::exit_current_paragraph(OUT); + filename *F = Filenames::in( + Pathnames::down(hrs->wv->weave_web->md->path_to_web, I"Figures"), + C->figname); + filename *RF = Filenames::from_text(C->figname); + HTML_OPEN("center"); + HTML::image_to_dimensions(OUT, RF, C->w, C->h); + Patterns::copy_file_into_weave(hrs->wv->weave_web, F, NULL, NULL); + HTML_CLOSE("center"); + WRITE("\n"); @ = if (N->child) { @@ -355,7 +366,7 @@ that service uses to identify the video/audio in question. @ = weave_embed_node *C = RETRIEVE_POINTER_weave_embed_node(N->content); - HTMLFormat::embed(hrs->wv->format, OUT, hrs->wv, C->service, C->ID); + HTMLFormat::embed(hrs->wv->format, OUT, hrs->wv, C->service, C->ID, C->w, C->h); @ = weave_pmac_node *C = RETRIEVE_POINTER_weave_pmac_node(N->content); @@ -397,6 +408,17 @@ that service uses to identify the video/audio in question. @ = weave_carousel_slide_node *C = RETRIEVE_POINTER_weave_carousel_slide_node(N->content); Swarm::ensure_plugin(hrs->wv, I"Carousel"); + TEMPORARY_TEXT(carousel_id) + TEMPORARY_TEXT(carousel_dots_id) + text_stream *caption_class = NULL; + text_stream *slide_count_class = I"carousel-number"; + switch (C->caption_command) { + case CAROUSEL_CMD: caption_class = I"carousel-caption"; break; + case CAROUSEL_ABOVE_CMD: caption_class = I"carousel-caption-above"; slide_count_class = I"carousel-number-above"; break; + case CAROUSEL_BELOW_CMD: caption_class = I"carousel-caption-below"; slide_count_class = I"carousel-number-below"; break; + } + WRITE_TO(carousel_id, "carousel-no-%d", hrs->carousel_number); + WRITE_TO(carousel_dots_id, "carousel-dots-no-%d", hrs->carousel_number); if (hrs->slide_number == -1) { hrs->slide_number = 1; hrs->slide_of = 0; @@ -406,31 +428,48 @@ that service uses to identify the video/audio in question. if (hrs->slide_number > hrs->slide_of) internal_error("miscounted slides"); } if (hrs->slide_number == 1) { - WRITE("
\n"); + WRITE("
\n", carousel_id); } - WRITE("
slide_number == 1) WRITE(" style=\"display: block;\""); + else WRITE(" style=\"display: none;\""); WRITE(">\n"); - WRITE("
%d / %d
\n", hrs->slide_number, hrs->slide_of); + if (C->caption_command == CAROUSEL_ABOVE_CMD) { + @; + WRITE("
%d / %d
\n", slide_count_class, hrs->slide_number, hrs->slide_of); + } else { + WRITE("
%d / %d
\n", slide_count_class, hrs->slide_number, hrs->slide_of); + } + WRITE("
"); for (tree_node *M = N->child; M; M = M->next) Trees::traverse_from(M, &HTMLFormat::render_visit, (void *) hrs, L+1); - WRITE("
%S
\n", C->caption); + WRITE("
\n"); + if (C->caption_command != CAROUSEL_ABOVE_CMD) @; WRITE("
\n"); if (hrs->slide_number == hrs->slide_of) { + WRITE("\n", carousel_id, carousel_dots_id); + WRITE("\n", carousel_id, carousel_dots_id); WRITE("
\n"); - WRITE("
\n"); + WRITE("
\n", carousel_dots_id); for (int i=1; i<=hrs->slide_of; i++) { if (i == 1) - WRITE("\n"); + WRITE("\n", carousel_id, carousel_dots_id); else - WRITE("\n", i); + WRITE("\n", carousel_id, carousel_dots_id, i-1); } WRITE("
\n"); hrs->slide_number = -1; hrs->slide_of = -1; + hrs->carousel_number++; } + DISCARD_TEXT(carousel_id) + DISCARD_TEXT(carousel_dots_id) return FALSE; +@ = + if (C->caption_command != CAROUSEL_UNCAPTIONED_CMD) + WRITE("
%S
\n", caption_class, C->caption); + @ = HTMLFormat::exit_current_paragraph(OUT); HTML_OPEN_WITH("ul", "class=\"toc\""); @@ -634,35 +673,13 @@ void HTMLFormat::source_code(weave_format *self, text_stream *OUT, weave_order * current_colour = colour_wanted; } -@ = -void HTMLFormat::figure(weave_format *self, text_stream *OUT, weave_order *wv, - text_stream *figname, int w, int h) { - HTMLFormat::exit_current_paragraph(OUT); - filename *F = Filenames::in( - Pathnames::down(wv->weave_web->md->path_to_web, I"Figures"), - figname); - filename *RF = Filenames::from_text(figname); - HTML_OPEN("center"); - HTML::image(OUT, RF); - Patterns::copy_file_into_weave(wv->weave_web, F, NULL, NULL); - HTML_CLOSE("center"); - WRITE("\n"); -} - @ = void HTMLFormat::embed(weave_format *self, text_stream *OUT, weave_order *wv, - text_stream *service, text_stream *ID) { + text_stream *service, text_stream *ID, int w, int h) { text_stream *CH = I"405"; text_stream *CW = I"720"; - match_results mr = Regexp::create_mr(); - if (Regexp::match(&mr, ID, L"(%c+) at (%c+) by (%c+)")) { - CW = Str::duplicate(mr.exp[1]); - CH = Str::duplicate(mr.exp[2]); - ID = mr.exp[0]; - } else if (Regexp::match(&mr, ID, L"(%c+) at (%c+)")) { - CH = Str::duplicate(mr.exp[1]); - ID = mr.exp[0]; - } + if (w > 0) { Str::clear(CW); WRITE_TO(CW, "%d", w); } + if (h > 0) { Str::clear(CH); WRITE_TO(CH, "%d", h); } HTMLFormat::exit_current_paragraph(OUT); TEMPORARY_TEXT(embed_leaf); @@ -673,7 +690,6 @@ void HTMLFormat::embed(weave_format *self, text_stream *OUT, weave_order *wv, Main::error_in_web(I"This is not a supported service", wv->current_weave_line); return; } - Bibliographic::set_datum(wv->weave_web->md, I"Content ID", ID); Bibliographic::set_datum(wv->weave_web->md, I"Content Width", CW); Bibliographic::set_datum(wv->weave_web->md, I"Content Height", CH); @@ -681,7 +697,6 @@ void HTMLFormat::embed(weave_format *self, text_stream *OUT, weave_order *wv, Indexer::incorporate_template_for_web_and_pattern(OUT, wv->weave_web, wv->pattern, F); HTML_CLOSE("center"); WRITE("\n"); - Regexp::dispose_of(&mr); } @ = diff --git a/Chapter 5/Weave Tree.w b/Chapter 5/Weave Tree.w index b426a79..e03c7bf 100644 --- a/Chapter 5/Weave Tree.w +++ b/Chapter 5/Weave Tree.w @@ -87,6 +87,8 @@ typedef struct weave_material_node { typedef struct weave_embed_node { struct text_stream *service; struct text_stream *ID; + int w; + int h; MEMORY_MANAGEMENT } weave_embed_node; @@ -133,6 +135,7 @@ typedef struct weave_commentary_node { typedef struct weave_carousel_slide_node { struct text_stream *caption; + int caption_command; MEMORY_MANAGEMENT } weave_carousel_slide_node; @@ -489,10 +492,12 @@ tree_node *WeaveTree::material(heterogeneous_tree *tree, int material_type, int } tree_node *WeaveTree::embed(heterogeneous_tree *tree, - text_stream *service, text_stream *ID) { + text_stream *service, text_stream *ID, int w, int h) { weave_embed_node *C = CREATE(weave_embed_node); C->service = Str::duplicate(service); C->ID = Str::duplicate(ID); + C->w = w; + C->h = h; return Trees::new_node(tree, weave_embed_node_type, STORE_POINTER_weave_embed_node(C)); } @@ -556,9 +561,10 @@ tree_node *WeaveTree::commentary(heterogeneous_tree *tree, text_stream *text, in return Trees::new_node(tree, weave_commentary_node_type, STORE_POINTER_weave_commentary_node(C)); } -tree_node *WeaveTree::carousel_slide(heterogeneous_tree *tree, text_stream *caption) { +tree_node *WeaveTree::carousel_slide(heterogeneous_tree *tree, text_stream *caption, int c) { weave_carousel_slide_node *C = CREATE(weave_carousel_slide_node); C->caption = Str::duplicate(caption); + C->caption_command = c; return Trees::new_node(tree, weave_carousel_slide_node_type, STORE_POINTER_weave_carousel_slide_node(C)); } diff --git a/Examples/goldbach/Figures/img1.jpg b/Examples/goldbach/Figures/img1.jpg index b08788c..b51eafb 100644 Binary files a/Examples/goldbach/Figures/img1.jpg and b/Examples/goldbach/Figures/img1.jpg differ diff --git a/Examples/goldbach/Figures/img2.jpg b/Examples/goldbach/Figures/img2.jpg index f93f45c..9f5d4da 100644 Binary files a/Examples/goldbach/Figures/img2.jpg and b/Examples/goldbach/Figures/img2.jpg differ diff --git a/Examples/goldbach/Sections/Summing Primes.w b/Examples/goldbach/Sections/Summing Primes.w index 657c867..4752090 100755 --- a/Examples/goldbach/Sections/Summing Primes.w +++ b/Examples/goldbach/Sections/Summing Primes.w @@ -12,7 +12,7 @@ number greater than 2 can be written this way. This remains open, though -- Besides which, |printf(k+1)|, to say the least: see http://www.google.com or for that matter see //The Sieve of Eratosthenes//. -= (figure Letter.jpg height 10cm) += (figure Letter.jpg at height 10cm) Computer verification has been made up to around $10^{18}$, but by rather better methods.[1] Which is awesome.[2] And $i DOCUMENT += += (carousel "Stage 2 - Developed tree" above) += (text as BoxArt) + ROOT ---> DOCUMENT + | + NODE 1 --- NODE 2 --- NODE 3 --- ... += += (carousel "Stage 3 - Completed tree" above) += (text as BoxArt) + ROOT ---> DOCUMENT + | + NODE 1 --- NODE 2 --- NODE 3 --- ... + | | | + text 1 text 2 text 3 ... += += (carousel end) +This carousel has differently placed captions, too: that's because the +slide lines were typed as: += (text as Inweb) + = (carousel "Stage 2 - Developed tree" above) += +and the like. By default, a caption overlaps slightly with the content; but +it can also be |above| or |below|. A slide can also have no caption at all: += (text as Inweb) + = (carousel) + = (figure anonymous.jpg) + = (carousel) + = (figure furtive.jpg) + = (carousel end) = -In these examples, we constrain the width or the height of the image -to be exactly that given: it is scaled accordingly. (They can't both be -constrained, so you can't change the aspect ratio.) @h Embedded video. This makes sense only for some HTML-like weave formats, but we can also @@ -503,7 +566,7 @@ With results like so: 720 by 405. = (text as Inweb) = (embedded Vimeo video 204519 at 400 by 300) - = (embedded SoundCloud audio 42803139 at 200) + = (embedded SoundCloud audio 42803139 at height 200) = The latter sets just the height (of the displayed waveform, that is -- arguably music has width and not height, but SoundCloud thinks otherwise). @@ -524,8 +587,7 @@ For example, it's known that the average running time of Euclid's GCD algorithm on $a$ and numbers coprime to $a$ is: $$ \tau (a)={\frac {12}{\pi ^{2}}}\ln 2\ln a+C+O(a^{-1/6-\varepsilon }) $$ where $C$ is Porter's constant, -$$ C=-{\frac {1}{2}}+{\frac {6\ln 2}{\pi ^{2}}} -\left(4\gamma - {\frac {24}{\pi ^{2}}}\zeta'(2)+3\ln 2-2\right)\approx 1.467 $$ +$$ C=-{\frac {1}{2}}+{\frac {6\ln 2}{\pi ^{2}}}\left(4\gamma - {\frac {24}{\pi ^{2}}}\zeta'(2)+3\ln 2-2\right)\approx 1.467 $$ which involves evaluating Euler's constant $\gamma$ and the first derivative of the Riemann zeta function $\zeta'(z)$ at $z=2$. @@ -535,8 +597,7 @@ That passage was achieved by typing this as the Inweb source: algorithm on $a$ and numbers coprime to $a$ is: $$ \tau (a)={\frac {12}{\pi ^{2}}}\ln 2\ln a+C+O(a^{-1/6-\varepsilon }) $$ where $C$ is Porter's constant, - $$ C=-{\frac {1}{2}}+{\frac {6\ln 2}{\pi ^{2}}} - \left(4\gamma - {\frac {24}{\pi^{2}}}\zeta'(2)+3\ln 2-2\right)\approx 1.467 $$ + $$ C=-{\frac {1}{2}}+{\frac {6\ln 2}{\pi ^{2}}} \left(4\gamma - {\frac {24}{\pi^{2}}}\zeta'(2)+3\ln 2-2\right)\approx 1.467 $$ which involves evaluating Euler's constant $\gamma$ and the first derivative of the Riemann zeta function $\zeta'(z)$ at $z=2$. = diff --git a/Patterns/HTML/Carousel/Carousel.css b/Patterns/HTML/Carousel/Carousel.css index c18b92b..4f27ef0 100644 --- a/Patterns/HTML/Carousel/Carousel.css +++ b/Patterns/HTML/Carousel/Carousel.css @@ -1,19 +1,15 @@ -* {box-sizing:border-box} - -/* Slideshow container */ -.slideshow-container { - max-width: 1000px; +.carousel-container { + width: 1000px; position: relative; margin: auto; } -/* Hide the images by default */ -.mySlides { - display: none; +.carousel-container img { + max-width: 1000px; } /* Next & previous buttons */ -.prev, .next { +.carousel-prev-button, .carousel-next-button { cursor: pointer; position: absolute; top: 50%; @@ -29,38 +25,62 @@ } /* Position the "next button" to the right */ -.next { +.carousel-next-button { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a black background color with a little bit see-through */ -.prev:hover, .next:hover { +.carousel-prev-button:hover, .carousel-next-button:hover { background-color: rgba(0,0,0,0.8); } /* Caption text */ -.text { +.carousel-caption { color: #f2f2f2; font-size: 15px; - padding: 8px 12px; + padding-top: 6px; + padding-bottom: 6px; position: absolute; - bottom: 8px; - width: 100%; + bottom: 0px; + width: 1000px; + text-align: center; + background-color: rgba(0,0,0,0.6); +} + +.carousel-caption-above, .carousel-caption-below { + color: #000000; + font-size: 15px; + padding-top: 6px; + padding-bottom: 6px; + width: 1000px; text-align: center; } /* Number text (1/3 etc) */ -.numbertext { +.carousel-number, .carousel-number-above, .carousel-number-below { + font-size: 12px; + padding: 8px 12px; + position: absolute; + top: 0; +} +.carousel-number, .carousel-number-below { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } +.carousel-number-above { + color: #000000; +} + +.carousel-dots-container { + text-align:center; +} /* The dots/bullets/indicators */ -.dot { +.carousel-dot { cursor: pointer; height: 15px; width: 15px; @@ -71,24 +91,24 @@ transition: background-color 0.6s ease; } -.active, .dot:hover { +.carousel-dot-active, .carousel-dot:hover { background-color: #717171; } /* Fading animation */ -.fade { +.fading-slide { -webkit-animation-name: fade; -webkit-animation-duration: 1.5s; animation-name: fade; animation-duration: 1.5s; } -@-webkit-keyframes fade { +@-webkit-keyframes fading-slide { from {opacity: .4} to {opacity: 1} } -@keyframes fade { +@keyframes fading-slide { from {opacity: .4} to {opacity: 1} } diff --git a/Patterns/HTML/Carousel/Carousel.js b/Patterns/HTML/Carousel/Carousel.js index 102c52f..dadd5e9 100644 --- a/Patterns/HTML/Carousel/Carousel.js +++ b/Patterns/HTML/Carousel/Carousel.js @@ -1,28 +1,35 @@ -var slideIndex = 1; -showSlides(slideIndex); - // Next/previous controls -function plusSlides(n) { - showSlides(slideIndex += n); +function carouselMoveSlide(id, did, n) { + carouselSetSlide(id, did, carouselGetSlide(id, did) + n); } -// Thumbnail image controls -function currentSlide(n) { - showSlides(slideIndex = n); +function carouselGetSlide(id, did) { + var carousel = document.getElementById(id); + var slides = carousel.getElementsByClassName("carousel-slide"); + var i; + for (i = 0; i < slides.length; i++) { + if (slides[i].style.display == "block") { + return i; + } + } + return 0; } -function showSlides(n) { - var i; - var slides = document.getElementsByClassName("mySlides"); - var dots = document.getElementsByClassName("dot"); - if (n > slides.length) {slideIndex = 1} - if (n < 1) {slideIndex = slides.length} - for (i = 0; i < slides.length; i++) { - slides[i].style.display = "none"; - } - for (i = 0; i < dots.length; i++) { - dots[i].className = dots[i].className.replace(" active", ""); - } - slides[slideIndex-1].style.display = "block"; - dots[slideIndex-1].className += " active"; +function carouselSetSlide(id, did, n) { + var carousel = document.getElementById(id); + var dotrow = document.getElementById(did); + var i; + var slides = carousel.getElementsByClassName("carousel-slide"); + var dots = dotrow.getElementsByClassName("carousel-dot"); + if (n >= slides.length) { n = 0 } + if (n < 0) { n = slides.length - 1 } + for (i = 0; i < slides.length; i++) { + if (i != n) { + slides[i].style.display = "none"; + dots[i].className = "carousel-dot"; + } else { + slides[i].style.display = "block"; + dots[i].className = "carousel-dot carousel-dot-active"; + } + } } diff --git a/Tangled/inweb.c b/Tangled/inweb.c index e0ec1e1..41c6e77 100644 --- a/Tangled/inweb.c +++ b/Tangled/inweb.c @@ -878,9 +878,12 @@ void __stdcall LeaveCriticalSection(struct Win32_Critical_Section* cs); #define GRAMMAR_INDEX_CMD 2 #define FIGURE_CMD 3 #define CAROUSEL_CMD 4 -#define CAROUSEL_END_CMD 5 -#define EMBED_CMD 6 -#define TAG_CMD 7 +#define CAROUSEL_ABOVE_CMD 5 +#define CAROUSEL_BELOW_CMD 6 +#define CAROUSEL_UNCAPTIONED_CMD 7 +#define CAROUSEL_END_CMD 8 +#define EMBED_CMD 9 +#define TAG_CMD 10 #define ORDINARY_WEIGHT 0 /* an ordinary paragraph has this "weight" */ #define SUBHEADING_WEIGHT 1 /* a heading paragraph */ #define BASIC_SECTIONCAT 1 @@ -908,6 +911,7 @@ void __stdcall LeaveCriticalSection(struct Win32_Critical_Section* cs); #define CODE_MATERIAL 4 #define ENDNOTES_MATERIAL 5 #define FOOTNOTES_MATERIAL 6 +#define POINTS_PER_CM 72 #define LOOP_OVER_PARAGRAPHS(C, S, T, P)\ LOOP_OVER_LINKED_LIST(C, chapter, W->chapters)\ LOOP_OVER_LINKED_LIST(S, section, C->sections)\ @@ -1015,7 +1019,7 @@ void __stdcall LeaveCriticalSection(struct Win32_Critical_Section* cs); #define NO_DEFINED_MODE_VALUES 5 #define NO_DEFINED_SWM_VALUES 4 #define NO_DEFINED_LCAT_VALUES 26 -#define NO_DEFINED_CMD_VALUES 8 +#define NO_DEFINED_CMD_VALUES 11 #define NO_DEFINED_SECTIONCAT_VALUES 3 #define NO_DEFINED_MATERIAL_VALUES 6 #line 41 "inweb/foundation-module/Chapter 2/Debugging Log.w" @@ -1254,7 +1258,7 @@ typedef struct HTML_tag { int tag_xref; MEMORY_MANAGEMENT } HTML_tag; -#line 583 "inweb/foundation-module/Chapter 5/HTML.w" +#line 595 "inweb/foundation-module/Chapter 5/HTML.w" typedef struct colour_translation { wchar_t *chip_name; wchar_t *html_colour; @@ -1640,7 +1644,7 @@ typedef struct source_line { struct source_line *next_line; /* within the owning section's linked list */ struct paragraph *owning_paragraph; /* for lines falling under paragraphs; |NULL| if not */ } source_line; -#line 674 "inweb/Chapter 2/The Parser.w" +#line 698 "inweb/Chapter 2/The Parser.w" typedef struct paragraph { int above_bar; /* placed above the dividing bar in its section (in Version 1 syntax) */ int placed_early; /* should appear early in the tangled code */ @@ -1663,7 +1667,7 @@ typedef struct paragraph { struct section *under_section; MEMORY_MANAGEMENT } paragraph; -#line 785 "inweb/Chapter 2/The Parser.w" +#line 809 "inweb/Chapter 2/The Parser.w" typedef struct footnote { int footnote_cue_number; /* used only for |FOOTNOTE_TEXT_LCAT| lines */ int footnote_text_number; /* used only for |FOOTNOTE_TEXT_LCAT| lines */ @@ -1996,135 +2000,138 @@ typedef struct weave_material_node { typedef struct weave_embed_node { struct text_stream *service; struct text_stream *ID; + int w; + int h; MEMORY_MANAGEMENT } weave_embed_node; -#line 93 "inweb/Chapter 5/Weave Tree.w" +#line 95 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_pmac_node { struct para_macro *pmac; int defn; MEMORY_MANAGEMENT } weave_pmac_node; -#line 99 "inweb/Chapter 5/Weave Tree.w" +#line 101 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_vskip_node { int in_comment; MEMORY_MANAGEMENT } weave_vskip_node; -#line 104 "inweb/Chapter 5/Weave Tree.w" +#line 106 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_apres_defn_node { MEMORY_MANAGEMENT } weave_apres_defn_node; -#line 108 "inweb/Chapter 5/Weave Tree.w" +#line 110 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_chapter_node { struct chapter *chap; MEMORY_MANAGEMENT } weave_chapter_node; -#line 113 "inweb/Chapter 5/Weave Tree.w" +#line 115 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_section_node { struct section *sect; MEMORY_MANAGEMENT } weave_section_node; -#line 118 "inweb/Chapter 5/Weave Tree.w" +#line 120 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_code_line_node { MEMORY_MANAGEMENT } weave_code_line_node; -#line 122 "inweb/Chapter 5/Weave Tree.w" +#line 124 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_function_usage_node { struct text_stream *url; struct language_function *fn; MEMORY_MANAGEMENT } weave_function_usage_node; -#line 128 "inweb/Chapter 5/Weave Tree.w" +#line 130 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_commentary_node { struct text_stream *text; int in_code; MEMORY_MANAGEMENT } weave_commentary_node; -#line 134 "inweb/Chapter 5/Weave Tree.w" +#line 136 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_carousel_slide_node { struct text_stream *caption; + int caption_command; MEMORY_MANAGEMENT } weave_carousel_slide_node; -#line 139 "inweb/Chapter 5/Weave Tree.w" +#line 142 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_toc_node { struct text_stream *text1; MEMORY_MANAGEMENT } weave_toc_node; -#line 144 "inweb/Chapter 5/Weave Tree.w" +#line 147 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_toc_line_node { struct text_stream *text1; struct text_stream *text2; struct paragraph *para; MEMORY_MANAGEMENT } weave_toc_line_node; -#line 151 "inweb/Chapter 5/Weave Tree.w" +#line 154 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_chapter_title_page_node { MEMORY_MANAGEMENT } weave_chapter_title_page_node; -#line 155 "inweb/Chapter 5/Weave Tree.w" +#line 158 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_defn_node { struct text_stream *keyword; MEMORY_MANAGEMENT } weave_defn_node; -#line 160 "inweb/Chapter 5/Weave Tree.w" +#line 163 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_inline_node { MEMORY_MANAGEMENT } weave_inline_node; -#line 164 "inweb/Chapter 5/Weave Tree.w" +#line 167 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_locale_node { struct paragraph *par1; struct paragraph *par2; MEMORY_MANAGEMENT } weave_locale_node; -#line 170 "inweb/Chapter 5/Weave Tree.w" +#line 173 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_source_code_node { struct text_stream *matter; struct text_stream *colouring; MEMORY_MANAGEMENT } weave_source_code_node; -#line 176 "inweb/Chapter 5/Weave Tree.w" +#line 179 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_url_node { struct text_stream *url; struct text_stream *content; int external; MEMORY_MANAGEMENT } weave_url_node; -#line 183 "inweb/Chapter 5/Weave Tree.w" +#line 186 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_footnote_cue_node { struct text_stream *cue_text; MEMORY_MANAGEMENT } weave_footnote_cue_node; -#line 188 "inweb/Chapter 5/Weave Tree.w" +#line 191 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_begin_footnote_text_node { struct text_stream *cue_text; MEMORY_MANAGEMENT } weave_begin_footnote_text_node; -#line 193 "inweb/Chapter 5/Weave Tree.w" +#line 196 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_display_line_node { struct text_stream *text; MEMORY_MANAGEMENT } weave_display_line_node; -#line 198 "inweb/Chapter 5/Weave Tree.w" +#line 201 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_function_defn_node { struct language_function *fn; MEMORY_MANAGEMENT } weave_function_defn_node; -#line 203 "inweb/Chapter 5/Weave Tree.w" +#line 206 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_item_node { int depth; struct text_stream *label; MEMORY_MANAGEMENT } weave_item_node; -#line 209 "inweb/Chapter 5/Weave Tree.w" +#line 212 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_grammar_index_node { MEMORY_MANAGEMENT } weave_grammar_index_node; -#line 213 "inweb/Chapter 5/Weave Tree.w" +#line 216 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_maths_node { struct text_stream *content; int displayed; MEMORY_MANAGEMENT } weave_maths_node; -#line 219 "inweb/Chapter 5/Weave Tree.w" +#line 222 "inweb/Chapter 5/Weave Tree.w" typedef struct weave_verbatim_node { struct text_stream *content; MEMORY_MANAGEMENT @@ -2156,6 +2163,7 @@ typedef struct HTML_render_state { int EPUB_flag; int popup_counter; int last_material_seen; + int carousel_number; int slide_number; int slide_of; } HTML_render_state; @@ -3224,73 +3232,75 @@ void HTML__begin_div_with_class_and_id_S(OUTPUT_STREAM, text_stream *cl, text_s void HTML__end_div(OUTPUT_STREAM) ; #line 339 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__image(OUTPUT_STREAM, filename *F) ; -#line 346 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__anchor(OUTPUT_STREAM, text_stream *id) ; -#line 350 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__begin_link(OUTPUT_STREAM, text_stream *to) ; -#line 354 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__begin_link_with_class(OUTPUT_STREAM, text_stream *cl, text_stream *to) ; +#line 343 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__image_to_dimensions(OUTPUT_STREAM, filename *F, int w, int h) ; #line 358 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__begin_link_with_class_title(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti) ; +void HTML__anchor(OUTPUT_STREAM, text_stream *id) ; #line 362 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__begin_link_with_class_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *on) ; +void HTML__begin_link(OUTPUT_STREAM, text_stream *to) ; #line 366 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__begin_link_with_class_title_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti, text_stream *on) ; +void HTML__begin_link_with_class(OUTPUT_STREAM, text_stream *cl, text_stream *to) ; +#line 370 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__begin_link_with_class_title(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti) ; #line 374 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__end_link(OUTPUT_STREAM) ; -#line 382 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__begin_plain_html_table(OUTPUT_STREAM) ; +void HTML__begin_link_with_class_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *on) ; +#line 378 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__begin_link_with_class_title_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti, text_stream *on) ; #line 386 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__end_link(OUTPUT_STREAM) ; +#line 394 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__begin_plain_html_table(OUTPUT_STREAM) ; +#line 398 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_wide_html_table(OUTPUT_STREAM) ; -#line 393 "inweb/foundation-module/Chapter 5/HTML.w" +#line 405 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_html_table(OUTPUT_STREAM, char *colour, int full_width, int border, int cellspacing, int cellpadding, int height, int width) ; -#line 410 "inweb/foundation-module/Chapter 5/HTML.w" +#line 422 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_html_table_bg(OUTPUT_STREAM, char *colour, int full_width, int border, int cellspacing, int cellpadding, int height, int width, char *bg) ; -#line 423 "inweb/foundation-module/Chapter 5/HTML.w" +#line 435 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__first_html_column(OUTPUT_STREAM, int width) ; -#line 428 "inweb/foundation-module/Chapter 5/HTML.w" +#line 440 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__first_html_column_nowrap(OUTPUT_STREAM, int width, char *colour) ; -#line 436 "inweb/foundation-module/Chapter 5/HTML.w" +#line 448 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__first_html_column_spaced(OUTPUT_STREAM, int width) ; -#line 444 "inweb/foundation-module/Chapter 5/HTML.w" +#line 456 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__first_html_column_coloured(OUTPUT_STREAM, int width, char *colour, int cs) ; -#line 453 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column(OUTPUT_STREAM, int width) ; -#line 459 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column_centred(OUTPUT_STREAM, int width) ; #line 465 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column_spanning(OUTPUT_STREAM, int width, int sp) ; +void HTML__next_html_column(OUTPUT_STREAM, int width) ; #line 471 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column_nowrap(OUTPUT_STREAM, int width) ; +void HTML__next_html_column_centred(OUTPUT_STREAM, int width) ; #line 477 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column_spaced(OUTPUT_STREAM, int width) ; +void HTML__next_html_column_spanning(OUTPUT_STREAM, int width, int sp) ; #line 483 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column_nw(OUTPUT_STREAM, int width) ; +void HTML__next_html_column_nowrap(OUTPUT_STREAM, int width) ; #line 489 "inweb/foundation-module/Chapter 5/HTML.w" -void HTML__next_html_column_w(OUTPUT_STREAM, int width) ; +void HTML__next_html_column_spaced(OUTPUT_STREAM, int width) ; #line 495 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__next_html_column_nw(OUTPUT_STREAM, int width) ; +#line 501 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__next_html_column_w(OUTPUT_STREAM, int width) ; +#line 507 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__next_html_column_right_justified(OUTPUT_STREAM, int width) ; -#line 500 "inweb/foundation-module/Chapter 5/HTML.w" +#line 512 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__end_html_row(OUTPUT_STREAM) ; -#line 504 "inweb/foundation-module/Chapter 5/HTML.w" +#line 516 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__end_html_table(OUTPUT_STREAM) ; -#line 515 "inweb/foundation-module/Chapter 5/HTML.w" +#line 527 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__open_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) ; -#line 535 "inweb/foundation-module/Chapter 5/HTML.w" +#line 547 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__close_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) ; -#line 553 "inweb/foundation-module/Chapter 5/HTML.w" +#line 565 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__box_corner(OUTPUT_STREAM, char *html_colour, char *corner) ; -#line 563 "inweb/foundation-module/Chapter 5/HTML.w" +#line 575 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__comment(OUTPUT_STREAM, text_stream *text) ; -#line 567 "inweb/foundation-module/Chapter 5/HTML.w" +#line 579 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__heading(OUTPUT_STREAM, char *tag, text_stream *text) ; -#line 574 "inweb/foundation-module/Chapter 5/HTML.w" +#line 586 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__hr(OUTPUT_STREAM, char *class) ; -#line 739 "inweb/foundation-module/Chapter 5/HTML.w" +#line 751 "inweb/foundation-module/Chapter 5/HTML.w" wchar_t * HTML__translate_colour_name(wchar_t *original) ; -#line 747 "inweb/foundation-module/Chapter 5/HTML.w" +#line 759 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_colour(OUTPUT_STREAM, text_stream *col) ; -#line 750 "inweb/foundation-module/Chapter 5/HTML.w" +#line 762 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__end_colour(OUTPUT_STREAM) ; #line 106 "inweb/foundation-module/Chapter 5/Epub Ebooks.w" ebook * Epub__new(text_stream *title, char *prefix) ; @@ -3564,13 +3574,13 @@ source_line * Lines__new_source_line_in(text_stream *line, text_file_position *t char * Lines__category_name(int cat) ; #line 17 "inweb/Chapter 2/The Parser.w" void Parser__parse_web(web *W, int inweb_mode) ; -#line 767 "inweb/Chapter 2/The Parser.w" +#line 791 "inweb/Chapter 2/The Parser.w" text_stream * Parser__extract_purpose(text_stream *prologue, source_line *XL, section *S, source_line **adjust) ; -#line 839 "inweb/Chapter 2/The Parser.w" +#line 863 "inweb/Chapter 2/The Parser.w" int Parser__detect_footnote(web *W, text_stream *matter, text_stream *before, text_stream *cue, text_stream *after) ; -#line 882 "inweb/Chapter 2/The Parser.w" +#line 906 "inweb/Chapter 2/The Parser.w" footnote * Parser__find_footnote_in_para(paragraph *P, text_stream *cue) ; -#line 898 "inweb/Chapter 2/The Parser.w" +#line 922 "inweb/Chapter 2/The Parser.w" void Parser__wrong_version(int using, source_line *L, char *feature, int need) ; #line 20 "inweb/Chapter 2/Paragraph Macros.w" para_macro * Macros__create(section *S, paragraph *P, source_line *L, text_stream *name) ; @@ -3672,23 +3682,23 @@ void Indexer__set_current_file(filename *F) ; int Weaver__weave(weave_order *wv) ; #line 69 "inweb/Chapter 3/The Weaver.w" int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *body) ; -#line 607 "inweb/Chapter 3/The Weaver.w" +#line 599 "inweb/Chapter 3/The Weaver.w" void Weaver__show_endnotes_on_previous_paragraph(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, paragraph *P) ; -#line 705 "inweb/Chapter 3/The Weaver.w" +#line 697 "inweb/Chapter 3/The Weaver.w" void Weaver__show_function_usage(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, paragraph *P, language_function *fn, int as_list) ; -#line 771 "inweb/Chapter 3/The Weaver.w" +#line 763 "inweb/Chapter 3/The Weaver.w" void Weaver__weave_subheading(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *text) ; -#line 777 "inweb/Chapter 3/The Weaver.w" +#line 769 "inweb/Chapter 3/The Weaver.w" void Weaver__change_material(heterogeneous_tree *tree, weaver_state *state, int new_material, int plainly, programming_language *pl) ; -#line 789 "inweb/Chapter 3/The Weaver.w" +#line 781 "inweb/Chapter 3/The Weaver.w" void Weaver__change_material_for_para(heterogeneous_tree *tree, weaver_state *state) ; -#line 797 "inweb/Chapter 3/The Weaver.w" +#line 789 "inweb/Chapter 3/The Weaver.w" void Weaver__figure(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *figname, int w, int h) ; -#line 803 "inweb/Chapter 3/The Weaver.w" -void Weaver__embed(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *service, text_stream *ID) ; -#line 809 "inweb/Chapter 3/The Weaver.w" +#line 795 "inweb/Chapter 3/The Weaver.w" void Weaver__commentary_text(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *matter) ; -#line 819 "inweb/Chapter 3/The Weaver.w" +#line 805 "inweb/Chapter 3/The Weaver.w" +text_stream * Weaver__dimensions(text_stream *item, int *w, int *h, source_line *L) ; +#line 852 "inweb/Chapter 3/The Weaver.w" int Weaver__weave_table_of_contents(heterogeneous_tree *tree, tree_node *ap, section *S) ; #line 12 "inweb/Chapter 3/The Weaver of Text.w" void TextWeaver__commentary_text(heterogeneous_tree *tree, tree_node *ap, text_stream *matter) ; @@ -3942,97 +3952,97 @@ void InCSupport__new_tag_declared(programming_language *self, theme_tag *tag) ; void InCSupport__analyse_code(programming_language *self, web *W) ; #line 968 "inweb/Chapter 4/InC Support.w" int InCSupport__share_element(programming_language *self, text_stream *elname) ; -#line 269 "inweb/Chapter 5/Weave Tree.w" +#line 272 "inweb/Chapter 5/Weave Tree.w" heterogeneous_tree * WeaveTree__new_tree(weave_order *wv) ; -#line 364 "inweb/Chapter 5/Weave Tree.w" +#line 367 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__document(heterogeneous_tree *tree, weave_order *wv) ; -#line 371 "inweb/Chapter 5/Weave Tree.w" +#line 374 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__head(heterogeneous_tree *tree, text_stream *banner) ; -#line 378 "inweb/Chapter 5/Weave Tree.w" +#line 381 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__body(heterogeneous_tree *tree) ; -#line 384 "inweb/Chapter 5/Weave Tree.w" +#line 387 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__tail(heterogeneous_tree *tree, text_stream *rennab) ; -#line 391 "inweb/Chapter 5/Weave Tree.w" +#line 394 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__verbatim(heterogeneous_tree *tree, text_stream *content) ; -#line 398 "inweb/Chapter 5/Weave Tree.w" +#line 401 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__section_header(heterogeneous_tree *tree, section *S) ; -#line 405 "inweb/Chapter 5/Weave Tree.w" +#line 408 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__section_footer(heterogeneous_tree *tree, section *S) ; -#line 412 "inweb/Chapter 5/Weave Tree.w" +#line 415 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__chapter(heterogeneous_tree *tree, chapter *Ch) ; -#line 418 "inweb/Chapter 5/Weave Tree.w" +#line 421 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__chapter_header(heterogeneous_tree *tree, chapter *Ch) ; -#line 425 "inweb/Chapter 5/Weave Tree.w" +#line 428 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__chapter_footer(heterogeneous_tree *tree, chapter *Ch) ; -#line 432 "inweb/Chapter 5/Weave Tree.w" +#line 435 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__purpose(heterogeneous_tree *tree, text_stream *P) ; -#line 439 "inweb/Chapter 5/Weave Tree.w" +#line 442 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__subheading(heterogeneous_tree *tree, text_stream *P) ; -#line 446 "inweb/Chapter 5/Weave Tree.w" +#line 449 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__pagebreak(heterogeneous_tree *tree) ; -#line 452 "inweb/Chapter 5/Weave Tree.w" +#line 455 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__bar(heterogeneous_tree *tree) ; -#line 458 "inweb/Chapter 5/Weave Tree.w" +#line 461 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__paragraph_heading(heterogeneous_tree *tree, paragraph *P, int no_skip) ; -#line 466 "inweb/Chapter 5/Weave Tree.w" +#line 469 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__endnote(heterogeneous_tree *tree) ; -#line 472 "inweb/Chapter 5/Weave Tree.w" +#line 475 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__figure(heterogeneous_tree *tree, text_stream *figname, int w, int h) ; -#line 482 "inweb/Chapter 5/Weave Tree.w" +#line 485 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__material(heterogeneous_tree *tree, int material_type, int plainly, programming_language *styling) ; -#line 491 "inweb/Chapter 5/Weave Tree.w" -tree_node * WeaveTree__embed(heterogeneous_tree *tree, text_stream *service, text_stream *ID) ; -#line 504 "inweb/Chapter 5/Weave Tree.w" +#line 494 "inweb/Chapter 5/Weave Tree.w" +tree_node * WeaveTree__embed(heterogeneous_tree *tree, text_stream *service, text_stream *ID, int w, int h) ; +#line 509 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__pmac(heterogeneous_tree *tree, para_macro *pmac, int defn) ; -#line 516 "inweb/Chapter 5/Weave Tree.w" +#line 521 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__vskip(heterogeneous_tree *tree, int in_comment) ; -#line 528 "inweb/Chapter 5/Weave Tree.w" -tree_node * WeaveTree__apres_defn(heterogeneous_tree *tree) ; #line 533 "inweb/Chapter 5/Weave Tree.w" +tree_node * WeaveTree__apres_defn(heterogeneous_tree *tree) ; +#line 538 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__section(heterogeneous_tree *tree, section *sect) ; -#line 539 "inweb/Chapter 5/Weave Tree.w" -tree_node * WeaveTree__code_line(heterogeneous_tree *tree) ; #line 544 "inweb/Chapter 5/Weave Tree.w" +tree_node * WeaveTree__code_line(heterogeneous_tree *tree) ; +#line 549 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__function_usage(heterogeneous_tree *tree, text_stream *url, language_function *fn) ; -#line 552 "inweb/Chapter 5/Weave Tree.w" +#line 557 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__commentary(heterogeneous_tree *tree, text_stream *text, int in_code) ; -#line 559 "inweb/Chapter 5/Weave Tree.w" -tree_node * WeaveTree__carousel_slide(heterogeneous_tree *tree, text_stream *caption) ; -#line 565 "inweb/Chapter 5/Weave Tree.w" -tree_node * WeaveTree__table_of_contents(heterogeneous_tree *tree, text_stream *text1) ; +#line 564 "inweb/Chapter 5/Weave Tree.w" +tree_node * WeaveTree__carousel_slide(heterogeneous_tree *tree, text_stream *caption, int c) ; #line 571 "inweb/Chapter 5/Weave Tree.w" +tree_node * WeaveTree__table_of_contents(heterogeneous_tree *tree, text_stream *text1) ; +#line 577 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__contents_line(heterogeneous_tree *tree, text_stream *text1, text_stream *text2, paragraph *P) ; -#line 580 "inweb/Chapter 5/Weave Tree.w" +#line 586 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__weave_chapter_title_page_node(heterogeneous_tree *tree) ; -#line 585 "inweb/Chapter 5/Weave Tree.w" +#line 591 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__weave_defn_node(heterogeneous_tree *tree, text_stream *keyword) ; -#line 595 "inweb/Chapter 5/Weave Tree.w" +#line 601 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__source_code(heterogeneous_tree *tree, text_stream *matter, text_stream *colouring) ; -#line 606 "inweb/Chapter 5/Weave Tree.w" +#line 612 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__url(heterogeneous_tree *tree, text_stream *url, text_stream *content, int external) ; -#line 615 "inweb/Chapter 5/Weave Tree.w" -tree_node * WeaveTree__footnote_cue(heterogeneous_tree *tree, text_stream *cue) ; #line 621 "inweb/Chapter 5/Weave Tree.w" +tree_node * WeaveTree__footnote_cue(heterogeneous_tree *tree, text_stream *cue) ; +#line 627 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__footnote(heterogeneous_tree *tree, text_stream *cue) ; -#line 631 "inweb/Chapter 5/Weave Tree.w" +#line 637 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__function_defn(heterogeneous_tree *tree, language_function *fn) ; -#line 641 "inweb/Chapter 5/Weave Tree.w" +#line 647 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__display_line(heterogeneous_tree *tree, text_stream *text) ; -#line 660 "inweb/Chapter 5/Weave Tree.w" +#line 666 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__weave_item_node(heterogeneous_tree *tree, int depth, text_stream *label) ; -#line 667 "inweb/Chapter 5/Weave Tree.w" +#line 673 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__grammar_index(heterogeneous_tree *tree) ; -#line 672 "inweb/Chapter 5/Weave Tree.w" +#line 678 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__inline(heterogeneous_tree *tree) ; -#line 677 "inweb/Chapter 5/Weave Tree.w" +#line 683 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__locale(heterogeneous_tree *tree, paragraph *par1, paragraph *par2) ; -#line 684 "inweb/Chapter 5/Weave Tree.w" +#line 690 "inweb/Chapter 5/Weave Tree.w" tree_node * WeaveTree__mathematics(heterogeneous_tree *tree, text_stream *content, int displayed) ; -#line 691 "inweb/Chapter 5/Weave Tree.w" +#line 697 "inweb/Chapter 5/Weave Tree.w" void WeaveTree__show(text_stream *OUT, heterogeneous_tree *T) ; -#line 698 "inweb/Chapter 5/Weave Tree.w" +#line 704 "inweb/Chapter 5/Weave Tree.w" void WeaveTree__prune(heterogeneous_tree *T) ; -#line 702 "inweb/Chapter 5/Weave Tree.w" +#line 708 "inweb/Chapter 5/Weave Tree.w" int WeaveTree__prune_visit(tree_node *N, void *state) ; #line 18 "inweb/Chapter 5/Format Methods.w" weave_format * Formats__create_weave_format(text_stream *name, text_stream *ext) ; @@ -4158,35 +4168,33 @@ void HTMLFormat__exit_current_paragraph(OUTPUT_STREAM) ; void HTMLFormat__render(weave_format *self, text_stream *OUT, heterogeneous_tree *tree) ; #line 104 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__render_EPUB(weave_format *self, text_stream *OUT, heterogeneous_tree *tree) ; -#line 119 "inweb/Chapter 5/HTML Formats.w" +#line 120 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__render_inner(weave_format *self, text_stream *OUT, heterogeneous_tree *tree, int EPUB_mode) ; -#line 146 "inweb/Chapter 5/HTML Formats.w" +#line 148 "inweb/Chapter 5/HTML Formats.w" int HTMLFormat__render_visit(tree_node *N, void *state, int L) ; -#line 578 "inweb/Chapter 5/HTML Formats.w" +#line 617 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__subheading(weave_format *self, text_stream *OUT, weave_order *wv, int level, text_stream *comment, text_stream *head) ; -#line 595 "inweb/Chapter 5/HTML Formats.w" +#line 634 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__paragraph_heading(weave_format *self, text_stream *OUT, weave_order *wv, section *S, paragraph *P, text_stream *heading_text, int weight, int no_skip) ; -#line 616 "inweb/Chapter 5/HTML Formats.w" +#line 655 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__source_code(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *matter, text_stream *colouring, colour_scheme *cs) ; -#line 638 "inweb/Chapter 5/HTML Formats.w" -void HTMLFormat__figure(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *figname, int w, int h) ; -#line 653 "inweb/Chapter 5/HTML Formats.w" -void HTMLFormat__embed(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *service, text_stream *ID) ; -#line 688 "inweb/Chapter 5/HTML Formats.w" -void HTMLFormat__para_macro(weave_format *self, text_stream *OUT, weave_order *wv, para_macro *pmac, int defn) ; +#line 677 "inweb/Chapter 5/HTML Formats.w" +void HTMLFormat__embed(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *service, text_stream *ID, int w, int h) ; #line 703 "inweb/Chapter 5/HTML Formats.w" +void HTMLFormat__para_macro(weave_format *self, text_stream *OUT, weave_order *wv, para_macro *pmac, int defn) ; +#line 718 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__change_colour(weave_format *self, text_stream *OUT, weave_order *wv, int col, int in_code, colour_scheme *cs) ; -#line 724 "inweb/Chapter 5/HTML Formats.w" +#line 739 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__commentary_text(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *id) ; -#line 743 "inweb/Chapter 5/HTML Formats.w" +#line 758 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__escape_text(text_stream *OUT, text_stream *id) ; -#line 753 "inweb/Chapter 5/HTML Formats.w" +#line 768 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__locale(weave_format *self, text_stream *OUT, weave_order *wv, paragraph *par1, paragraph *par2) ; -#line 767 "inweb/Chapter 5/HTML Formats.w" +#line 782 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__tail(weave_format *self, text_stream *OUT, weave_order *wv, section *this_S) ; -#line 809 "inweb/Chapter 5/HTML Formats.w" -int HTMLFormat__begin_weaving_EPUB(weave_format *wf, web *W, weave_pattern *pattern) ; #line 824 "inweb/Chapter 5/HTML Formats.w" +int HTMLFormat__begin_weaving_EPUB(weave_format *wf, web *W, weave_pattern *pattern) ; +#line 839 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__end_weaving_EPUB(weave_format *wf, web *W, weave_pattern *pattern) ; #line 9 "inweb/Chapter 5/Debugging Format.w" void Debugging__create(void) ; @@ -4891,6 +4899,15 @@ text_stream *TL_IS_592 = NULL; text_stream *TL_IS_593 = NULL; text_stream *TL_IS_594 = NULL; text_stream *TL_IS_595 = NULL; +text_stream *TL_IS_596 = NULL; +text_stream *TL_IS_597 = NULL; +text_stream *TL_IS_598 = NULL; +text_stream *TL_IS_599 = NULL; +text_stream *TL_IS_600 = NULL; +text_stream *TL_IS_601 = NULL; +text_stream *TL_IS_602 = NULL; +text_stream *TL_IS_603 = NULL; +text_stream *TL_IS_604 = NULL; void register_tangled_text_literals(void); #line 57 "inweb/foundation-module/Chapter 2/Streams.w" #define WRITE(args...) Writers__printf(OUT, args) @@ -11123,7 +11140,19 @@ void HTML__image(OUTPUT_STREAM, filename *F) { HTML_TAG_WITH("img", "src=\"%/f\"", F); } -#line 346 "inweb/foundation-module/Chapter 5/HTML.w" +void HTML__image_to_dimensions(OUTPUT_STREAM, filename *F, int w, int h) { + if ((w > 0) && (h > 0)) { + HTML_TAG_WITH("img", "src=\"%/f\" width=\"%d\" height=\"%d\"", F, w, h); + } else if (w > 0) { + HTML_TAG_WITH("img", "src=\"%/f\" width=\"%d\"", F, w); + } else if (h > 0) { + HTML_TAG_WITH("img", "src=\"%/f\" height=\"%d\"", F, h); + } else { + HTML_TAG_WITH("img", "src=\"%/f\"", F); + } +} + +#line 358 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__anchor(OUTPUT_STREAM, text_stream *id) { HTML_OPEN_WITH("a", "id=\"%S\"", id); HTML_CLOSE("a"); } @@ -11156,7 +11185,7 @@ void HTML__end_link(OUTPUT_STREAM) { HTML_CLOSE("a"); } -#line 382 "inweb/foundation-module/Chapter 5/HTML.w" +#line 394 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_plain_html_table(OUTPUT_STREAM) { HTML__begin_html_table(OUT, NULL, FALSE, 0, 0, 0, 0, 0); } @@ -11165,7 +11194,7 @@ void HTML__begin_wide_html_table(OUTPUT_STREAM) { HTML__begin_html_table(OUT, NULL, TRUE, 0, 0, 0, 0, 0); } -#line 393 "inweb/foundation-module/Chapter 5/HTML.w" +#line 405 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_html_table(OUTPUT_STREAM, char *colour, int full_width, int border, int cellspacing, int cellpadding, int height, int width) { TEMPORARY_TEXT(tab); @@ -11281,7 +11310,7 @@ void HTML__end_html_table(OUTPUT_STREAM) { HTML_CLOSE("table"); } -#line 515 "inweb/foundation-module/Chapter 5/HTML.w" +#line 527 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__open_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) { HTML_OPEN_WITH("table", "width=\"100%%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" " @@ -11327,7 +11356,7 @@ void HTML__box_corner(OUTPUT_STREAM, char *html_colour, char *corner) { corner, html_colour, CORNER_SIZE, CORNER_SIZE); } -#line 563 "inweb/foundation-module/Chapter 5/HTML.w" +#line 575 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__comment(OUTPUT_STREAM, text_stream *text) { WRITE("\n", text); } @@ -11344,7 +11373,7 @@ void HTML__hr(OUTPUT_STREAM, char *class) { else HTML_TAG("hr"); } -#line 587 "inweb/foundation-module/Chapter 5/HTML.w" +#line 599 "inweb/foundation-module/Chapter 5/HTML.w" colour_translation table_of_translations[] = { { L"Alice Blue", L"F0F8FF" }, @@ -11493,7 +11522,7 @@ colour_translation table_of_translations[] = { { L"", L"" } }; -#line 739 "inweb/foundation-module/Chapter 5/HTML.w" +#line 751 "inweb/foundation-module/Chapter 5/HTML.w" wchar_t *HTML__translate_colour_name(wchar_t *original) { for (int j=0; Wide__cmp(table_of_translations[j].chip_name, L""); j++) if (Wide__cmp(table_of_translations[j].chip_name, original) == 0) @@ -11501,7 +11530,7 @@ wchar_t *HTML__translate_colour_name(wchar_t *original) { return NULL; } -#line 747 "inweb/foundation-module/Chapter 5/HTML.w" +#line 759 "inweb/foundation-module/Chapter 5/HTML.w" void HTML__begin_colour(OUTPUT_STREAM, text_stream *col) { HTML_OPEN_WITH("span", "style=\"color:#%S\"", col); } @@ -16076,7 +16105,7 @@ char *Lines__category_name(int cat) { return "(?unknown)"; } -#line 161 "inweb/Chapter 2/Line Categories.w" +#line 164 "inweb/Chapter 2/Line Categories.w" #line 17 "inweb/Chapter 2/The Parser.w" void Parser__parse_web(web *W, int inweb_mode) { @@ -16344,15 +16373,15 @@ void Parser__parse_web(web *W, int inweb_mode) { (Regexp__match(&mr2, mr.exp[0], L"%((%c*?) *text%)"))) { { -#line 416 "inweb/Chapter 2/The Parser.w" +#line 440 "inweb/Chapter 2/The Parser.w" match_results mr3 = Regexp__create_mr(); while (TRUE) { if (Regexp__match(&mr3, mr2.exp[0], L" *(%C+) *(%c*?)")) { - if (Str__eq(mr3.exp[0], TL_IS_168)) L->plainer = TRUE; - else if (Str__eq(mr3.exp[0], TL_IS_169)) L->enable_hyperlinks = TRUE; + if (Str__eq(mr3.exp[0], TL_IS_171)) L->plainer = TRUE; + else if (Str__eq(mr3.exp[0], TL_IS_172)) L->enable_hyperlinks = TRUE; else { Main__error_in_web( - TL_IS_170, L); + TL_IS_173, L); } } else break; Str__clear(mr2.exp[0]); @@ -16370,15 +16399,15 @@ void Parser__parse_web(web *W, int inweb_mode) { (Regexp__match(&mr2, mr.exp[0], L"%((%c*?) *text as code%)"))) { { -#line 416 "inweb/Chapter 2/The Parser.w" +#line 440 "inweb/Chapter 2/The Parser.w" match_results mr3 = Regexp__create_mr(); while (TRUE) { if (Regexp__match(&mr3, mr2.exp[0], L" *(%C+) *(%c*?)")) { - if (Str__eq(mr3.exp[0], TL_IS_168)) L->plainer = TRUE; - else if (Str__eq(mr3.exp[0], TL_IS_169)) L->enable_hyperlinks = TRUE; + if (Str__eq(mr3.exp[0], TL_IS_171)) L->plainer = TRUE; + else if (Str__eq(mr3.exp[0], TL_IS_172)) L->enable_hyperlinks = TRUE; else { Main__error_in_web( - TL_IS_170, L); + TL_IS_173, L); } } else break; Str__clear(mr2.exp[0]); @@ -16396,15 +16425,15 @@ void Parser__parse_web(web *W, int inweb_mode) { (Regexp__match(&mr2, mr.exp[0], L"%((%c*?) *text as (%c+)%)"))) { { -#line 416 "inweb/Chapter 2/The Parser.w" +#line 440 "inweb/Chapter 2/The Parser.w" match_results mr3 = Regexp__create_mr(); while (TRUE) { if (Regexp__match(&mr3, mr2.exp[0], L" *(%C+) *(%c*?)")) { - if (Str__eq(mr3.exp[0], TL_IS_168)) L->plainer = TRUE; - else if (Str__eq(mr3.exp[0], TL_IS_169)) L->enable_hyperlinks = TRUE; + if (Str__eq(mr3.exp[0], TL_IS_171)) L->plainer = TRUE; + else if (Str__eq(mr3.exp[0], TL_IS_172)) L->enable_hyperlinks = TRUE; else { Main__error_in_web( - TL_IS_170, L); + TL_IS_173, L); } } else break; Str__clear(mr2.exp[0]); @@ -16422,15 +16451,15 @@ void Parser__parse_web(web *W, int inweb_mode) { (Regexp__match(&mr2, mr.exp[0], L"%((%c*?) *text from (%c+) as code%)"))) { { -#line 416 "inweb/Chapter 2/The Parser.w" +#line 440 "inweb/Chapter 2/The Parser.w" match_results mr3 = Regexp__create_mr(); while (TRUE) { if (Regexp__match(&mr3, mr2.exp[0], L" *(%C+) *(%c*?)")) { - if (Str__eq(mr3.exp[0], TL_IS_168)) L->plainer = TRUE; - else if (Str__eq(mr3.exp[0], TL_IS_169)) L->enable_hyperlinks = TRUE; + if (Str__eq(mr3.exp[0], TL_IS_171)) L->plainer = TRUE; + else if (Str__eq(mr3.exp[0], TL_IS_172)) L->enable_hyperlinks = TRUE; else { Main__error_in_web( - TL_IS_170, L); + TL_IS_173, L); } } else break; Str__clear(mr2.exp[0]); @@ -16444,7 +16473,7 @@ void Parser__parse_web(web *W, int inweb_mode) { code_pl_for_body = S->sect_language; { -#line 432 "inweb/Chapter 2/The Parser.w" +#line 456 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_CODE_LCAT; pathname *P = W->md->path_to_web; filename *F = Filenames__from_text_relative(P, mr2.exp[1]); @@ -16458,7 +16487,7 @@ void Parser__parse_web(web *W, int inweb_mode) { latest->next_line = TL; latest = TL; } - source_line *EEL = Lines__new_source_line_in(TL_IS_171, &(L->source), S); + source_line *EEL = Lines__new_source_line_in(TL_IS_174, &(L->source), S); EEL->next_line = latest->next_line; latest->next_line = EEL; code_lcat_for_body = TEXT_EXTRACT_LCAT; @@ -16471,15 +16500,15 @@ void Parser__parse_web(web *W, int inweb_mode) { (Regexp__match(&mr2, mr.exp[0], L"%((%c*?) *text from (%c+) as (%c+)%)"))) { { -#line 416 "inweb/Chapter 2/The Parser.w" +#line 440 "inweb/Chapter 2/The Parser.w" match_results mr3 = Regexp__create_mr(); while (TRUE) { if (Regexp__match(&mr3, mr2.exp[0], L" *(%C+) *(%c*?)")) { - if (Str__eq(mr3.exp[0], TL_IS_168)) L->plainer = TRUE; - else if (Str__eq(mr3.exp[0], TL_IS_169)) L->enable_hyperlinks = TRUE; + if (Str__eq(mr3.exp[0], TL_IS_171)) L->plainer = TRUE; + else if (Str__eq(mr3.exp[0], TL_IS_172)) L->enable_hyperlinks = TRUE; else { Main__error_in_web( - TL_IS_170, L); + TL_IS_173, L); } } else break; Str__clear(mr2.exp[0]); @@ -16493,7 +16522,7 @@ void Parser__parse_web(web *W, int inweb_mode) { code_pl_for_body = Languages__find_by_name(mr2.exp[2], W); { -#line 432 "inweb/Chapter 2/The Parser.w" +#line 456 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_CODE_LCAT; pathname *P = W->md->path_to_web; filename *F = Filenames__from_text_relative(P, mr2.exp[1]); @@ -16507,7 +16536,7 @@ void Parser__parse_web(web *W, int inweb_mode) { latest->next_line = TL; latest = TL; } - source_line *EEL = Lines__new_source_line_in(TL_IS_171, &(L->source), S); + source_line *EEL = Lines__new_source_line_in(TL_IS_174, &(L->source), S); EEL->next_line = latest->next_line; latest->next_line = EEL; code_lcat_for_body = TEXT_EXTRACT_LCAT; @@ -16520,15 +16549,15 @@ void Parser__parse_web(web *W, int inweb_mode) { (Regexp__match(&mr2, mr.exp[0], L"%((%c*?) *text from (%c+)%)"))) { { -#line 416 "inweb/Chapter 2/The Parser.w" +#line 440 "inweb/Chapter 2/The Parser.w" match_results mr3 = Regexp__create_mr(); while (TRUE) { if (Regexp__match(&mr3, mr2.exp[0], L" *(%C+) *(%c*?)")) { - if (Str__eq(mr3.exp[0], TL_IS_168)) L->plainer = TRUE; - else if (Str__eq(mr3.exp[0], TL_IS_169)) L->enable_hyperlinks = TRUE; + if (Str__eq(mr3.exp[0], TL_IS_171)) L->plainer = TRUE; + else if (Str__eq(mr3.exp[0], TL_IS_172)) L->enable_hyperlinks = TRUE; else { Main__error_in_web( - TL_IS_170, L); + TL_IS_173, L); } } else break; Str__clear(mr2.exp[0]); @@ -16542,7 +16571,7 @@ void Parser__parse_web(web *W, int inweb_mode) { code_pl_for_body = NULL; { -#line 432 "inweb/Chapter 2/The Parser.w" +#line 456 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_CODE_LCAT; pathname *P = W->md->path_to_web; filename *F = Filenames__from_text_relative(P, mr2.exp[1]); @@ -16556,7 +16585,7 @@ void Parser__parse_web(web *W, int inweb_mode) { latest->next_line = TL; latest = TL; } - source_line *EEL = Lines__new_source_line_in(TL_IS_171, &(L->source), S); + source_line *EEL = Lines__new_source_line_in(TL_IS_174, &(L->source), S); EEL->next_line = latest->next_line; latest->next_line = EEL; code_lcat_for_body = TEXT_EXTRACT_LCAT; @@ -16574,8 +16603,32 @@ void Parser__parse_web(web *W, int inweb_mode) { L->text_operand = Str__duplicate(mr2.exp[0]); comment_mode = TRUE; } else if ((current_paragraph) && - (Regexp__match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\"%)"))) { + (Regexp__match(&mr2, mr.exp[0], L"%(carousel%)"))) { Tags__add_by_name(L->owning_paragraph, TL_IS_163); + L->command_code = CAROUSEL_UNCAPTIONED_CMD; + L->category = COMMAND_LCAT; + code_lcat_for_body = COMMENT_BODY_LCAT; + L->text_operand = Str__new(); + comment_mode = TRUE; + } else if ((current_paragraph) && + (Regexp__match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\" below%)"))) { + Tags__add_by_name(L->owning_paragraph, TL_IS_164); + L->command_code = CAROUSEL_BELOW_CMD; + L->category = COMMAND_LCAT; + code_lcat_for_body = COMMENT_BODY_LCAT; + L->text_operand = Str__duplicate(mr2.exp[0]); + comment_mode = TRUE; + } else if ((current_paragraph) && + (Regexp__match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\" above%)"))) { + Tags__add_by_name(L->owning_paragraph, TL_IS_165); + L->command_code = CAROUSEL_ABOVE_CMD; + L->category = COMMAND_LCAT; + code_lcat_for_body = COMMENT_BODY_LCAT; + L->text_operand = Str__duplicate(mr2.exp[0]); + comment_mode = TRUE; + } else if ((current_paragraph) && + (Regexp__match(&mr2, mr.exp[0], L"%(carousel \"(%c+)\"%)"))) { + Tags__add_by_name(L->owning_paragraph, TL_IS_166); L->command_code = CAROUSEL_CMD; L->category = COMMAND_LCAT; code_lcat_for_body = COMMENT_BODY_LCAT; @@ -16583,7 +16636,7 @@ void Parser__parse_web(web *W, int inweb_mode) { comment_mode = TRUE; } else if ((current_paragraph) && (Regexp__match(&mr2, mr.exp[0], L"%(carousel end%)"))) { - Tags__add_by_name(L->owning_paragraph, TL_IS_164); + Tags__add_by_name(L->owning_paragraph, TL_IS_167); L->command_code = CAROUSEL_END_CMD; L->category = COMMAND_LCAT; code_lcat_for_body = COMMENT_BODY_LCAT; @@ -16591,7 +16644,7 @@ void Parser__parse_web(web *W, int inweb_mode) { } else if ((current_paragraph) && ((Regexp__match(&mr2, mr.exp[0], L"%(embedded (%C+) video (%c+)%)")) || (Regexp__match(&mr2, mr.exp[0], L"%(embedded (%C+) audio (%c+)%)")))) { - Tags__add_by_name(L->owning_paragraph, TL_IS_165); + Tags__add_by_name(L->owning_paragraph, TL_IS_168); L->command_code = EMBED_CMD; L->category = COMMAND_LCAT; code_lcat_for_body = COMMENT_BODY_LCAT; @@ -16599,10 +16652,10 @@ void Parser__parse_web(web *W, int inweb_mode) { L->text_operand2 = Str__duplicate(mr2.exp[1]); comment_mode = TRUE; } else { - Main__error_in_web(TL_IS_166, L); + Main__error_in_web(TL_IS_169, L); } } else if (Regexp__match(&mr, L->text, L"= *%C%c*")) { - Main__error_in_web(TL_IS_167, L); + Main__error_in_web(TL_IS_170, L); } code_plainness_for_body = L->plainer; hyperlink_body = L->enable_hyperlinks; @@ -16631,12 +16684,12 @@ void Parser__parse_web(web *W, int inweb_mode) { } { -#line 458 "inweb/Chapter 2/The Parser.w" +#line 482 "inweb/Chapter 2/The Parser.w" extract_mode = FALSE; if (Str__eq_wide_string(command_text, L"Purpose:")) { -#line 506 "inweb/Chapter 2/The Parser.w" - if (before_bar == FALSE) Main__error_in_web(TL_IS_173, L); +#line 530 "inweb/Chapter 2/The Parser.w" + if (before_bar == FALSE) Main__error_in_web(TL_IS_176, L); if (S->md->using_syntax >= V2_SYNTAX) Parser__wrong_version(S->md->using_syntax, L, "'@Purpose'", V1_SYNTAX); L->category = PURPOSE_LCAT; @@ -16645,14 +16698,14 @@ void Parser__parse_web(web *W, int inweb_mode) { S->sect_purpose = Parser__extract_purpose(remainder, L->next_line, L->owning_section, &L); } -#line 459 "inweb/Chapter 2/The Parser.w" +#line 483 "inweb/Chapter 2/The Parser.w" else if (Str__eq_wide_string(command_text, L"Interface:")) { -#line 515 "inweb/Chapter 2/The Parser.w" +#line 539 "inweb/Chapter 2/The Parser.w" if (S->md->using_syntax >= V2_SYNTAX) Parser__wrong_version(S->md->using_syntax, L, "'@Interface'", V1_SYNTAX); - if (before_bar == FALSE) Main__error_in_web(TL_IS_174, L); + if (before_bar == FALSE) Main__error_in_web(TL_IS_177, L); L->category = INTERFACE_LCAT; L->owning_paragraph = NULL; L->is_commentary = TRUE; @@ -16665,14 +16718,14 @@ void Parser__parse_web(web *W, int inweb_mode) { } } -#line 460 "inweb/Chapter 2/The Parser.w" +#line 484 "inweb/Chapter 2/The Parser.w" else if (Str__eq_wide_string(command_text, L"Definitions:")) { -#line 530 "inweb/Chapter 2/The Parser.w" +#line 554 "inweb/Chapter 2/The Parser.w" if (S->md->using_syntax >= V2_SYNTAX) Parser__wrong_version(S->md->using_syntax, L, "'@Definitions' headings", V1_SYNTAX); - if (before_bar == FALSE) Main__error_in_web(TL_IS_175, L); + if (before_bar == FALSE) Main__error_in_web(TL_IS_178, L); L->category = DEFINITIONS_LCAT; L->owning_paragraph = NULL; L->is_commentary = TRUE; @@ -16680,14 +16733,14 @@ void Parser__parse_web(web *W, int inweb_mode) { next_par_number = 1; } -#line 461 "inweb/Chapter 2/The Parser.w" +#line 485 "inweb/Chapter 2/The Parser.w" else if (Regexp__match(&mr, command_text, L"----+")) { -#line 543 "inweb/Chapter 2/The Parser.w" +#line 567 "inweb/Chapter 2/The Parser.w" if (S->md->using_syntax >= V2_SYNTAX) Parser__wrong_version(S->md->using_syntax, L, "the bar '----...'", V1_SYNTAX); - if (before_bar == FALSE) Main__error_in_web(TL_IS_176, L); + if (before_bar == FALSE) Main__error_in_web(TL_IS_179, L); L->category = BAR_LCAT; L->owning_paragraph = NULL; L->is_commentary = TRUE; @@ -16697,14 +16750,14 @@ void Parser__parse_web(web *W, int inweb_mode) { next_par_number = 1; } -#line 462 "inweb/Chapter 2/The Parser.w" +#line 486 "inweb/Chapter 2/The Parser.w" else if ((Str__eq_wide_string(command_text, L"c")) || (Str__eq_wide_string(command_text, L"x")) || ((S->md->using_syntax == V1_SYNTAX) && (Str__eq_wide_string(command_text, L"e")))) { -#line 561 "inweb/Chapter 2/The Parser.w" +#line 585 "inweb/Chapter 2/The Parser.w" if (S->md->using_syntax > V1_SYNTAX) Parser__wrong_version(S->md->using_syntax, L, "'@c' and '@x'", V1_SYNTAX); L->category = BEGIN_CODE_LCAT; @@ -16718,11 +16771,11 @@ void Parser__parse_web(web *W, int inweb_mode) { hyperlink_body = FALSE; } -#line 466 "inweb/Chapter 2/The Parser.w" +#line 490 "inweb/Chapter 2/The Parser.w" else if (Str__eq_wide_string(command_text, L"d")) { -#line 577 "inweb/Chapter 2/The Parser.w" +#line 601 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_DEFINITION_LCAT; code_lcat_for_body = CONT_DEFINITION_LCAT; code_pl_for_body = NULL; @@ -16740,14 +16793,14 @@ void Parser__parse_web(web *W, int inweb_mode) { Regexp__dispose_of(&mr); } -#line 467 "inweb/Chapter 2/The Parser.w" +#line 491 "inweb/Chapter 2/The Parser.w" else if (Str__eq_wide_string(command_text, L"define")) { if (S->md->using_syntax < V2_SYNTAX) Parser__wrong_version(S->md->using_syntax, L, "'@define' for definitions (use '@d' instead)", V2_SYNTAX); { -#line 577 "inweb/Chapter 2/The Parser.w" +#line 601 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_DEFINITION_LCAT; code_lcat_for_body = CONT_DEFINITION_LCAT; code_pl_for_body = NULL; @@ -16765,7 +16818,7 @@ void Parser__parse_web(web *W, int inweb_mode) { Regexp__dispose_of(&mr); } -#line 471 "inweb/Chapter 2/The Parser.w" +#line 495 "inweb/Chapter 2/The Parser.w" ; } else if (Str__eq_wide_string(command_text, L"default")) { if (S->md->using_syntax < V2_SYNTAX) @@ -16773,7 +16826,7 @@ void Parser__parse_web(web *W, int inweb_mode) { L->default_defn = TRUE; { -#line 577 "inweb/Chapter 2/The Parser.w" +#line 601 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_DEFINITION_LCAT; code_lcat_for_body = CONT_DEFINITION_LCAT; code_pl_for_body = NULL; @@ -16791,11 +16844,11 @@ void Parser__parse_web(web *W, int inweb_mode) { Regexp__dispose_of(&mr); } -#line 476 "inweb/Chapter 2/The Parser.w" +#line 500 "inweb/Chapter 2/The Parser.w" ; } else if (Str__eq_wide_string(command_text, L"enum")) { -#line 597 "inweb/Chapter 2/The Parser.w" +#line 621 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_DEFINITION_LCAT; text_stream *from = NULL; match_results mr = Regexp__create_mr(); @@ -16813,7 +16866,7 @@ void Parser__parse_web(web *W, int inweb_mode) { from = mr.exp[1]; Str__copy(L->text_operand, mr.exp[0]); } else if (Regexp__match(&mr, L->text_operand, L"(%C+) (%c+)")) { - Main__error_in_web(TL_IS_177, L); + Main__error_in_web(TL_IS_180, L); } L->text_operand2 = Str__new(); if (inweb_mode == TANGLE_MODE) @@ -16824,12 +16877,12 @@ void Parser__parse_web(web *W, int inweb_mode) { Regexp__dispose_of(&mr); } -#line 477 "inweb/Chapter 2/The Parser.w" +#line 501 "inweb/Chapter 2/The Parser.w" else if ((Str__eq_wide_string(command_text, L"e")) && (S->md->using_syntax >= V2_SYNTAX)) { -#line 597 "inweb/Chapter 2/The Parser.w" +#line 621 "inweb/Chapter 2/The Parser.w" L->category = BEGIN_DEFINITION_LCAT; text_stream *from = NULL; match_results mr = Regexp__create_mr(); @@ -16847,7 +16900,7 @@ void Parser__parse_web(web *W, int inweb_mode) { from = mr.exp[1]; Str__copy(L->text_operand, mr.exp[0]); } else if (Regexp__match(&mr, L->text_operand, L"(%C+) (%c+)")) { - Main__error_in_web(TL_IS_177, L); + Main__error_in_web(TL_IS_180, L); } L->text_operand2 = Str__new(); if (inweb_mode == TANGLE_MODE) @@ -16858,7 +16911,7 @@ void Parser__parse_web(web *W, int inweb_mode) { Regexp__dispose_of(&mr); } -#line 479 "inweb/Chapter 2/The Parser.w" +#line 503 "inweb/Chapter 2/The Parser.w" else { int weight = -1, new_page = FALSE; @@ -16880,7 +16933,7 @@ void Parser__parse_web(web *W, int inweb_mode) { } if (weight >= 0) { -#line 649 "inweb/Chapter 2/The Parser.w" +#line 673 "inweb/Chapter 2/The Parser.w" comment_mode = TRUE; L->is_commentary = TRUE; L->category = PARAGRAPH_START_LCAT; @@ -16899,7 +16952,7 @@ void Parser__parse_web(web *W, int inweb_mode) { } { -#line 698 "inweb/Chapter 2/The Parser.w" +#line 722 "inweb/Chapter 2/The Parser.w" paragraph *P = CREATE(paragraph); if (S->md->using_syntax > V1_SYNTAX) { P->above_bar = FALSE; @@ -16912,9 +16965,9 @@ void Parser__parse_web(web *W, int inweb_mode) { } P->heading_text = Str__duplicate(L->text_operand); if ((S->md->using_syntax == V1_SYNTAX) && (before_bar)) - P->ornament = Str__duplicate(TL_IS_178); + P->ornament = Str__duplicate(TL_IS_181); else - P->ornament = Str__duplicate(TL_IS_179); + P->ornament = Str__duplicate(TL_IS_182); WRITE_TO(P->paragraph_number, "%d", next_par_number++); P->parent_paragraph = NULL; P->next_child_number = 1; @@ -16934,7 +16987,7 @@ void Parser__parse_web(web *W, int inweb_mode) { current_paragraph = P; } -#line 665 "inweb/Chapter 2/The Parser.w" +#line 689 "inweb/Chapter 2/The Parser.w" ; L->owning_paragraph = current_paragraph; @@ -16942,9 +16995,9 @@ void Parser__parse_web(web *W, int inweb_mode) { Regexp__dispose_of(&mr); } -#line 498 "inweb/Chapter 2/The Parser.w" +#line 522 "inweb/Chapter 2/The Parser.w" - else Main__error_in_web(TL_IS_172, L); + else Main__error_in_web(TL_IS_175, L); } } @@ -16960,7 +17013,7 @@ void Parser__parse_web(web *W, int inweb_mode) { ; if (comment_mode) { -#line 734 "inweb/Chapter 2/The Parser.w" +#line 758 "inweb/Chapter 2/The Parser.w" match_results mr = Regexp__create_mr(); if (Regexp__match(&mr, L->text, L">> (%c+)")) { L->category = SOURCE_DISPLAY_LCAT; @@ -16973,7 +17026,7 @@ void Parser__parse_web(web *W, int inweb_mode) { ; if (comment_mode == FALSE) { -#line 746 "inweb/Chapter 2/The Parser.w" +#line 770 "inweb/Chapter 2/The Parser.w" if ((L->category != BEGIN_DEFINITION_LCAT) && (L->category != COMMAND_LCAT)) { L->category = code_lcat_for_body; L->plainer = code_plainness_for_body; @@ -17033,7 +17086,7 @@ void Parser__parse_web(web *W, int inweb_mode) { LOOP_OVER_LINKED_LIST(P, paragraph, S->paragraphs) { -#line 794 "inweb/Chapter 2/The Parser.w" +#line 818 "inweb/Chapter 2/The Parser.w" int next_footnote_in_para = 1; footnote *current_text = NULL; TEMPORARY_TEXT(before); @@ -17051,7 +17104,7 @@ void Parser__parse_web(web *W, int inweb_mode) { if (this_is_a_cue == FALSE) { -#line 818 "inweb/Chapter 2/The Parser.w" +#line 842 "inweb/Chapter 2/The Parser.w" L->category = FOOTNOTE_TEXT_LCAT; footnote *F = CREATE(footnote); F->footnote_cue_number = Str__atoi(cue, 0); @@ -17071,7 +17124,7 @@ void Parser__parse_web(web *W, int inweb_mode) { current_text = F; } -#line 809 "inweb/Chapter 2/The Parser.w" +#line 833 "inweb/Chapter 2/The Parser.w" ; } L->footnote_text = current_text; @@ -17096,9 +17149,9 @@ void Parser__parse_web(web *W, int inweb_mode) { LanguageMethods__further_parsing(W, W->main_language); } -#line 696 "inweb/Chapter 2/The Parser.w" +#line 720 "inweb/Chapter 2/The Parser.w" -#line 767 "inweb/Chapter 2/The Parser.w" +#line 791 "inweb/Chapter 2/The Parser.w" text_stream *Parser__extract_purpose(text_stream *prologue, source_line *XL, section *S, source_line **adjust) { text_stream *P = Str__duplicate(prologue); while ((XL) && (XL->next_line) && (XL->owning_section == S) && @@ -17114,16 +17167,16 @@ text_stream *Parser__extract_purpose(text_stream *prologue, source_line *XL, sec return P; } -#line 792 "inweb/Chapter 2/The Parser.w" +#line 816 "inweb/Chapter 2/The Parser.w" -#line 839 "inweb/Chapter 2/The Parser.w" +#line 863 "inweb/Chapter 2/The Parser.w" int Parser__detect_footnote(web *W, text_stream *matter, text_stream *before, text_stream *cue, text_stream *after) { text_stream *fn_on_notation = - Bibliographic__get_datum(W->md, TL_IS_180); + Bibliographic__get_datum(W->md, TL_IS_183); text_stream *fn_off_notation = - Bibliographic__get_datum(W->md, TL_IS_181); - if (Str__ne(fn_on_notation, TL_IS_182)) { + Bibliographic__get_datum(W->md, TL_IS_184); + if (Str__ne(fn_on_notation, TL_IS_185)) { int N1 = Str__len(fn_on_notation); int N2 = Str__len(fn_off_notation); if ((N1 > 0) && (N2 > 0)) @@ -17170,7 +17223,7 @@ footnote *Parser__find_footnote_in_para(paragraph *P, text_stream *cue) { return NULL; } -#line 898 "inweb/Chapter 2/The Parser.w" +#line 922 "inweb/Chapter 2/The Parser.w" void Parser__wrong_version(int using, source_line *L, char *feature, int need) { TEMPORARY_TEXT(warning); WRITE_TO(warning, "%s is a feature available only in version %d syntax (you're using version %d)", @@ -17215,10 +17268,10 @@ theme_tag *Tags__find_by_name(text_stream *name, int creating_if_necessary) { tag->tag_name = Str__duplicate(name); tag->ifdef_positive = NOT_APPLICABLE; tag->ifdef_symbol = Str__new(); - if (Str__prefix_eq(name, TL_IS_183, 6)) { + if (Str__prefix_eq(name, TL_IS_186, 6)) { Str__substr(tag->ifdef_symbol, Str__at(name, 6), Str__end(name)); tag->ifdef_positive = TRUE; - } else if (Str__prefix_eq(name, TL_IS_184, 7)) { + } else if (Str__prefix_eq(name, TL_IS_187, 7)) { Str__substr(tag->ifdef_symbol, Str__at(name, 7), Str__end(name)); tag->ifdef_positive = FALSE; } @@ -17313,20 +17366,20 @@ void Tags__show_endnote_on_ifdefs(heterogeneous_tree *tree, tree_node *ap, parag if (d++ == 0) { tree_node *E = WeaveTree__endnote(tree); Trees__make_child(E, ap); ap = E; - TextWeaver__commentary_text(tree, ap, TL_IS_186); + TextWeaver__commentary_text(tree, ap, TL_IS_189); } else { - TextWeaver__commentary_text(tree, ap, TL_IS_187); + TextWeaver__commentary_text(tree, ap, TL_IS_190); } } else { - TextWeaver__commentary_text(tree, ap, TL_IS_188); + TextWeaver__commentary_text(tree, ap, TL_IS_191); } TextWeaver__commentary_text(tree, ap, pt->the_tag->ifdef_symbol); } if (c > 0) { - if (c == 1) TextWeaver__commentary_text(tree, ap, TL_IS_189); - else TextWeaver__commentary_text(tree, ap, TL_IS_190); - if (sense) TextWeaver__commentary_text(tree, ap, TL_IS_191); - else TextWeaver__commentary_text(tree, ap, TL_IS_192); + if (c == 1) TextWeaver__commentary_text(tree, ap, TL_IS_192); + else TextWeaver__commentary_text(tree, ap, TL_IS_193); + if (sense) TextWeaver__commentary_text(tree, ap, TL_IS_194); + else TextWeaver__commentary_text(tree, ap, TL_IS_195); } } @@ -17345,26 +17398,26 @@ void Tags__show_endnote_on_ifdefs(heterogeneous_tree *tree, tree_node *ap, parag if (d++ == 0) { tree_node *E = WeaveTree__endnote(tree); Trees__make_child(E, ap); ap = E; - TextWeaver__commentary_text(tree, ap, TL_IS_186); + TextWeaver__commentary_text(tree, ap, TL_IS_189); } else { - TextWeaver__commentary_text(tree, ap, TL_IS_187); + TextWeaver__commentary_text(tree, ap, TL_IS_190); } } else { - TextWeaver__commentary_text(tree, ap, TL_IS_188); + TextWeaver__commentary_text(tree, ap, TL_IS_191); } TextWeaver__commentary_text(tree, ap, pt->the_tag->ifdef_symbol); } if (c > 0) { - if (c == 1) TextWeaver__commentary_text(tree, ap, TL_IS_189); - else TextWeaver__commentary_text(tree, ap, TL_IS_190); - if (sense) TextWeaver__commentary_text(tree, ap, TL_IS_191); - else TextWeaver__commentary_text(tree, ap, TL_IS_192); + if (c == 1) TextWeaver__commentary_text(tree, ap, TL_IS_192); + else TextWeaver__commentary_text(tree, ap, TL_IS_193); + if (sense) TextWeaver__commentary_text(tree, ap, TL_IS_194); + else TextWeaver__commentary_text(tree, ap, TL_IS_195); } } #line 139 "inweb/Chapter 2/Tags.w" ; - if (d > 0) TextWeaver__commentary_text(tree, ap, TL_IS_185); + if (d > 0) TextWeaver__commentary_text(tree, ap, TL_IS_188); } #line 22 "inweb/Chapter 2/Enumerated Constants.w" @@ -17388,7 +17441,7 @@ void Enumerations__define(OUTPUT_STREAM, text_stream *symbol, match_results mr = Regexp__create_mr(); if (Regexp__match(&mr, symbol, L"%c*_(%C+?)")) Str__copy(pf, mr.exp[0]); else { - Main__error_in_web(TL_IS_193, L); + Main__error_in_web(TL_IS_196, L); WRITE_TO(pf, "BOGUS"); } Regexp__dispose_of(&mr); @@ -17404,7 +17457,7 @@ void Enumerations__define(OUTPUT_STREAM, text_stream *symbol, if (es->stub) WRITE("(%S+", es->stub); WRITE("%d", es->next_free_value++); if (es->stub) WRITE(")"); - } else Main__error_in_web(TL_IS_194, L); + } else Main__error_in_web(TL_IS_197, L); } #line 45 "inweb/Chapter 2/Enumerated Constants.w" @@ -17412,7 +17465,7 @@ void Enumerations__define(OUTPUT_STREAM, text_stream *symbol, else { #line 70 "inweb/Chapter 2/Enumerated Constants.w" - if (es) Main__error_in_web(TL_IS_195, L); + if (es) Main__error_in_web(TL_IS_198, L); else { es = CREATE(enumeration_set); es->postfix = Str__duplicate(pf); @@ -17702,7 +17755,7 @@ void Analyser__analyse_code(web *W) { if ((L->category == INTERFACE_BODY_LCAT) && (L->interface_line_identified == FALSE) && (Regexp__string_is_white_space(L->text) == FALSE)) - Main__error_in_web(TL_IS_196, L); + Main__error_in_web(TL_IS_199, L); } #line 109 "inweb/Chapter 3/The Analyser.w" @@ -17906,16 +17959,16 @@ void Analyser__analyse_find(web *W, source_line *L, text_stream *identifier, int #line 385 "inweb/Chapter 3/The Analyser.w" void Analyser__write_makefile(web *W, filename *F, module_search *I) { - filename *prototype = Filenames__in(W->md->path_to_web, TL_IS_197); + filename *prototype = Filenames__in(W->md->path_to_web, TL_IS_200); if (!(TextFiles__exists(prototype))) - prototype = Filenames__in(path_to_inweb_materials, TL_IS_198); + prototype = Filenames__in(path_to_inweb_materials, TL_IS_201); Makefiles__write(W, prototype, F, I); } void Analyser__write_gitignore(web *W, filename *F) { - filename *prototype = Filenames__in(W->md->path_to_web, TL_IS_199); + filename *prototype = Filenames__in(W->md->path_to_web, TL_IS_202); if (!(TextFiles__exists(prototype))) - prototype = Filenames__in(path_to_inweb_materials, TL_IS_200); + prototype = Filenames__in(path_to_inweb_materials, TL_IS_203); Git__write_gitignore(W, prototype, F); } @@ -17991,7 +18044,7 @@ void Indexer__scan_cover_line(text_stream *line, text_file_position *tfp, void * weave_pattern *saved = state->target->pattern; state->target->pattern = state->target->pattern->based_on; Indexer__cover_sheet_maker(OUT, state->target->weave_web, - TL_IS_201, state->target, + TL_IS_204, state->target, (state->halves & (WEAVE_FIRST_HALF + WEAVE_SECOND_HALF))); state->target->pattern = saved; } else { @@ -18058,7 +18111,7 @@ void Indexer__scan_cover_line(text_stream *line, text_file_position *tfp, void * #line 150 "inweb/Chapter 3/The Indexer.w" void Indexer__incorporate_template_for_web_and_pattern(text_stream *OUT, web *W, weave_pattern *pattern, filename *F) { - Indexer__incorporate_template(OUT, W, TL_IS_202, F, pattern, NULL, NULL); + Indexer__incorporate_template(OUT, W, TL_IS_205, F, pattern, NULL, NULL); } void Indexer__incorporate_template_for_target(text_stream *OUT, weave_order *wv, @@ -18553,7 +18606,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { #line 680 "inweb/Chapter 3/The Indexer.w" ; WRITE_TO(substituted, ""); - } else if (Str__eq(url, TL_IS_203)) { + } else if (Str__eq(url, TL_IS_206)) { WRITE_TO(substituted, "", url); WRITE_TO(substituted, ""); @@ -18654,7 +18707,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { #line 680 "inweb/Chapter 3/The Indexer.w" ; WRITE_TO(substituted, ""); - } else if (Str__eq(url, TL_IS_203)) { + } else if (Str__eq(url, TL_IS_206)) { WRITE_TO(substituted, "", url); WRITE_TO(substituted, ""); @@ -18765,7 +18818,7 @@ void Indexer__list_module(OUTPUT_STREAM, module *M, int list_this) { WRITE("
  • %S - ", M->module_name); TEMPORARY_TEXT(url); WRITE_TO(url, "%p", M->module_location); - Readme__write_var(OUT, url, TL_IS_204); + Readme__write_var(OUT, url, TL_IS_207); DISCARD_TEXT(url); WRITE("

  • "); } @@ -18807,7 +18860,7 @@ int Weaver__weave(weave_order *wv) { tree_node *H = WeaveTree__head(tree, banner); DISCARD_TEXT(banner); tree_node *B = WeaveTree__body(tree); - tree_node *T = WeaveTree__tail(tree, TL_IS_205); + tree_node *T = WeaveTree__tail(tree, TL_IS_208); Trees__make_child(H, tree->root); Trees__make_child(B, tree->root); Trees__make_child(T, tree->root); @@ -18821,8 +18874,8 @@ int Weaver__weave(weave_order *wv) { { #line 53 "inweb/Chapter 3/The Weaver.w" TEMPORARY_TEXT(verbatim_content); - if (!(Bibliographic__data_exists(W->md, TL_IS_206))) - Bibliographic__set_datum(W->md, TL_IS_207, wv->booklet_title); + if (!(Bibliographic__data_exists(W->md, TL_IS_209))) + Bibliographic__set_datum(W->md, TL_IS_210, wv->booklet_title); Indexer__cover_sheet_maker(verbatim_content, W, cover_sheet, wv, WEAVE_FIRST_HALF); tree_node *V = WeaveTree__verbatim(tree, verbatim_content); Trees__make_child(V, B); @@ -18954,7 +19007,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo continue; } if (LLL->category == DEFINITIONS_LCAT) { - Weaver__weave_subheading(tree, wv, state->ap, TL_IS_208); + Weaver__weave_subheading(tree, wv, state->ap, TL_IS_211); state->next_heading_without_vertical_skip = TRUE; state->horizontal_rule_just_drawn = FALSE; continue; @@ -18994,7 +19047,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo source_line *L = LLL; if ((L->category != HEADING_START_LCAT) && (L->category != PARAGRAPH_START_LCAT)) - Main__error_in_web(TL_IS_209, L); /* should never happen */ + Main__error_in_web(TL_IS_212, L); /* should never happen */ { @@ -19057,51 +19110,77 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo Trees__make_child(WeaveTree__grammar_index(tree), state->ap); if (L->command_code == FIGURE_CMD) { -#line 321 "inweb/Chapter 3/The Weaver.w" - text_stream *figname = L->text_operand; - match_results mr = Regexp__create_mr(); - if (Regexp__match(&mr, figname, L"(%d+)cm: (%c+)")) { - if (S->md->using_syntax > V1_SYNTAX) - Parser__wrong_version(S->md->using_syntax, L, "Figure: Xcm:...", V1_SYNTAX); - Weaver__figure(tree, wv, state->ap, mr.exp[1], Str__atoi(mr.exp[0], 0), -1); - } else if (Regexp__match(&mr, figname, L"(%c+) width (%d+)cm")) { - if (S->md->using_syntax < V2_SYNTAX) - Parser__wrong_version(S->md->using_syntax, L, "F width Xcm", V2_SYNTAX); - Weaver__figure(tree, wv, state->ap, mr.exp[0], Str__atoi(mr.exp[1], 0), -1); - } else if (Regexp__match(&mr, figname, L"(%c+) height (%d+)cm")) { - if (S->md->using_syntax < V2_SYNTAX) - Parser__wrong_version(S->md->using_syntax, L, "F height Xcm", V2_SYNTAX); - Weaver__figure(tree, wv, state->ap, mr.exp[0], -1, Str__atoi(mr.exp[1], 0)); - } else { - Weaver__figure(tree, wv, state->ap, figname, -1, -1); - } - Regexp__dispose_of(&mr); +#line 323 "inweb/Chapter 3/The Weaver.w" + int w, h; + text_stream *figname = Weaver__dimensions(L->text_operand, &w, &h, L); + Trees__make_child(WeaveTree__figure(tree, figname, w, h), state->ap); } #line 311 "inweb/Chapter 3/The Weaver.w" +; + if (L->command_code == EMBED_CMD) +{ +#line 328 "inweb/Chapter 3/The Weaver.w" + int w, h; + text_stream *ID = Weaver__dimensions(L->text_operand2, &w, &h, L); + Trees__make_child(WeaveTree__embed(tree, L->text_operand, ID, w, h), state->ap); + +} +#line 312 "inweb/Chapter 3/The Weaver.w" ; if (L->command_code == CAROUSEL_CMD) { -#line 341 "inweb/Chapter 3/The Weaver.w" - tree_node *C = WeaveTree__carousel_slide(tree, L->text_operand); +#line 333 "inweb/Chapter 3/The Weaver.w" + tree_node *C = WeaveTree__carousel_slide(tree, L->text_operand, L->command_code); Trees__make_child(C, state->para_node); state->ap = C; state->carousel_node = C; } -#line 312 "inweb/Chapter 3/The Weaver.w" +#line 313 "inweb/Chapter 3/The Weaver.w" +; + if (L->command_code == CAROUSEL_ABOVE_CMD) +{ +#line 333 "inweb/Chapter 3/The Weaver.w" + tree_node *C = WeaveTree__carousel_slide(tree, L->text_operand, L->command_code); + Trees__make_child(C, state->para_node); + state->ap = C; + state->carousel_node = C; + +} +#line 314 "inweb/Chapter 3/The Weaver.w" +; + if (L->command_code == CAROUSEL_BELOW_CMD) +{ +#line 333 "inweb/Chapter 3/The Weaver.w" + tree_node *C = WeaveTree__carousel_slide(tree, L->text_operand, L->command_code); + Trees__make_child(C, state->para_node); + state->ap = C; + state->carousel_node = C; + +} +#line 315 "inweb/Chapter 3/The Weaver.w" +; + if (L->command_code == CAROUSEL_UNCAPTIONED_CMD) +{ +#line 333 "inweb/Chapter 3/The Weaver.w" + tree_node *C = WeaveTree__carousel_slide(tree, L->text_operand, L->command_code); + Trees__make_child(C, state->para_node); + state->ap = C; + state->carousel_node = C; + +} +#line 316 "inweb/Chapter 3/The Weaver.w" ; if (L->command_code == CAROUSEL_END_CMD) { -#line 347 "inweb/Chapter 3/The Weaver.w" +#line 339 "inweb/Chapter 3/The Weaver.w" state->ap = state->para_node; state->carousel_node = NULL; } -#line 313 "inweb/Chapter 3/The Weaver.w" +#line 317 "inweb/Chapter 3/The Weaver.w" ; - if (L->command_code == EMBED_CMD) - Weaver__embed(tree, wv, state->ap, L->text_operand, L->text_operand2); /* Otherwise assume it was a tangler command, and ignore it here */ continue; } @@ -19126,21 +19205,21 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo TEMPORARY_TEXT(matter); Str__copy(matter, L->text); if (L->is_commentary) { -#line 355 "inweb/Chapter 3/The Weaver.w" +#line 347 "inweb/Chapter 3/The Weaver.w" { -#line 367 "inweb/Chapter 3/The Weaver.w" +#line 359 "inweb/Chapter 3/The Weaver.w" if (L->category == SOURCE_DISPLAY_LCAT) { Trees__make_child(WeaveTree__display_line(tree, L->text_operand), state->ap); continue; } } -#line 355 "inweb/Chapter 3/The Weaver.w" +#line 347 "inweb/Chapter 3/The Weaver.w" ; { -#line 376 "inweb/Chapter 3/The Weaver.w" +#line 368 "inweb/Chapter 3/The Weaver.w" if (Regexp__string_is_white_space(matter)) { if ((L->next_line) && (L->next_line->category == COMMENT_BODY_LCAT)) { match_results mr = Regexp__create_mr(); @@ -19153,19 +19232,19 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo } } -#line 356 "inweb/Chapter 3/The Weaver.w" +#line 348 "inweb/Chapter 3/The Weaver.w" ; { -#line 391 "inweb/Chapter 3/The Weaver.w" +#line 383 "inweb/Chapter 3/The Weaver.w" match_results mr = Regexp__create_mr(); if (Regexp__match(&mr, matter, L"%(...%) (%c*)")) { /* continue single */ Weaver__change_material(tree, state, REGULAR_MATERIAL, FALSE, NULL); - Trees__make_child(WeaveTree__weave_item_node(tree, 1, TL_IS_210), state->ap); + Trees__make_child(WeaveTree__weave_item_node(tree, 1, TL_IS_213), state->ap); Str__copy(matter, mr.exp[0]); } else if (Regexp__match(&mr, matter, L"%(-...%) (%c*)")) { /* continue double */ Weaver__change_material(tree, state, REGULAR_MATERIAL, FALSE, NULL); - Trees__make_child(WeaveTree__weave_item_node(tree, 2, TL_IS_211), state->ap); + Trees__make_child(WeaveTree__weave_item_node(tree, 2, TL_IS_214), state->ap); Str__copy(matter, mr.exp[0]); } else if (Regexp__match(&mr, matter, L"%((%i+)%) (%c*)")) { /* begin single */ Weaver__change_material(tree, state, REGULAR_MATERIAL, FALSE, NULL); @@ -19179,11 +19258,11 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo Regexp__dispose_of(&mr); } -#line 357 "inweb/Chapter 3/The Weaver.w" +#line 349 "inweb/Chapter 3/The Weaver.w" ; { -#line 415 "inweb/Chapter 3/The Weaver.w" +#line 407 "inweb/Chapter 3/The Weaver.w" match_results mr = Regexp__create_mr(); if (Regexp__match(&mr, matter, L"\t|(%c*)|(%c*?)")) { TEMPORARY_TEXT(original); @@ -19204,22 +19283,22 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo Regexp__dispose_of(&mr); } -#line 358 "inweb/Chapter 3/The Weaver.w" +#line 350 "inweb/Chapter 3/The Weaver.w" ; { -#line 435 "inweb/Chapter 3/The Weaver.w" +#line 427 "inweb/Chapter 3/The Weaver.w" if (L->category == FOOTNOTE_TEXT_LCAT) { Weaver__change_material(tree, state, FOOTNOTES_MATERIAL, FALSE, NULL); footnote *F = L->footnote_text; tree_node *FN = WeaveTree__footnote(tree, F->cue_text); Trees__make_child(FN, state->material_node); - if (F->cued_already == FALSE) Main__error_in_web(TL_IS_212, L); + if (F->cued_already == FALSE) Main__error_in_web(TL_IS_215, L); state->ap = FN; } } -#line 359 "inweb/Chapter 3/The Weaver.w" +#line 351 "inweb/Chapter 3/The Weaver.w" ; WRITE_TO(matter, "\n"); Weaver__commentary_text(tree, wv, state->ap, matter); @@ -19230,10 +19309,10 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo else { -#line 450 "inweb/Chapter 3/The Weaver.w" +#line 442 "inweb/Chapter 3/The Weaver.w" { -#line 494 "inweb/Chapter 3/The Weaver.w" +#line 486 "inweb/Chapter 3/The Weaver.w" if (state->kind_of_material != CODE_MATERIAL) { int will_be = CODE_MATERIAL; if (L->category == MACRO_DEFINITION_LCAT) @@ -19253,11 +19332,11 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo } } -#line 450 "inweb/Chapter 3/The Weaver.w" +#line 442 "inweb/Chapter 3/The Weaver.w" ; { -#line 516 "inweb/Chapter 3/The Weaver.w" +#line 508 "inweb/Chapter 3/The Weaver.w" if (state->line_break_pending) { Trees__make_child(WeaveTree__vskip(tree, FALSE), state->ap); state->line_break_pending = FALSE; @@ -19268,7 +19347,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo } } -#line 451 "inweb/Chapter 3/The Weaver.w" +#line 443 "inweb/Chapter 3/The Weaver.w" ; Str__rectify_indentation(matter, 4); @@ -19277,7 +19356,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo TEMPORARY_TEXT(concluding_comment); { -#line 530 "inweb/Chapter 3/The Weaver.w" +#line 522 "inweb/Chapter 3/The Weaver.w" TEMPORARY_TEXT(part_before_comment); TEMPORARY_TEXT(part_within_comment); programming_language *pl = S->sect_language; @@ -19291,27 +19370,27 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo DISCARD_TEXT(part_within_comment); } -#line 457 "inweb/Chapter 3/The Weaver.w" +#line 449 "inweb/Chapter 3/The Weaver.w" ; { -#line 545 "inweb/Chapter 3/The Weaver.w" +#line 537 "inweb/Chapter 3/The Weaver.w" if (L->category == BEGIN_DEFINITION_LCAT) { match_results mr = Regexp__create_mr(); if ((Regexp__match(&mr, matter, L"@d (%c*)")) || (Regexp__match(&mr, matter, L"@define (%c*)"))) { - Str__copy(prefatory, TL_IS_213); + Str__copy(prefatory, TL_IS_216); Str__copy(matter, mr.exp[0]); } else if ((Regexp__match(&mr, matter, L"@e (%c*)")) || (Regexp__match(&mr, matter, L"@enum (%c*)"))) { - Str__copy(prefatory, TL_IS_214); + Str__copy(prefatory, TL_IS_217); Str__copy(matter, mr.exp[0]); } Regexp__dispose_of(&mr); } } -#line 458 "inweb/Chapter 3/The Weaver.w" +#line 450 "inweb/Chapter 3/The Weaver.w" ; tree_node *CL = WeaveTree__code_line(tree); @@ -19322,7 +19401,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo { -#line 560 "inweb/Chapter 3/The Weaver.w" +#line 552 "inweb/Chapter 3/The Weaver.w" TEMPORARY_TEXT(OUT); int taken = LanguageMethods__weave_code_line(OUT, S->sect_language, wv, W, C, S, L, matter, concluding_comment); @@ -19334,7 +19413,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo if (taken) goto ClumsyLabel; } -#line 466 "inweb/Chapter 3/The Weaver.w" +#line 458 "inweb/Chapter 3/The Weaver.w" ; TEMPORARY_TEXT(colouring); @@ -19342,7 +19421,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo { -#line 571 "inweb/Chapter 3/The Weaver.w" +#line 563 "inweb/Chapter 3/The Weaver.w" match_results mr = Regexp__create_mr(); while (Regexp__match(&mr, matter, L"(%c*?)%@%<(%c*?)%@%>(%c*)")) { para_macro *pmac = Macros__find_by_name(mr.exp[1], S); @@ -19375,7 +19454,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo } -#line 471 "inweb/Chapter 3/The Weaver.w" +#line 463 "inweb/Chapter 3/The Weaver.w" ; if (Str__len(prefatory) > 0) { state->in_run_of_definitions = TRUE; @@ -19451,7 +19530,7 @@ int Weaver__weave_inner(weave_order *wv, heterogeneous_tree *tree, tree_node *bo #line 155 "inweb/Chapter 3/The Weaver.w" -#line 607 "inweb/Chapter 3/The Weaver.w" +#line 599 "inweb/Chapter 3/The Weaver.w" void Weaver__show_endnotes_on_previous_paragraph(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, paragraph *P) { tree_node *body = ap; @@ -19459,33 +19538,33 @@ void Weaver__show_endnotes_on_previous_paragraph(heterogeneous_tree *tree, if (P->defines_macro) { -#line 622 "inweb/Chapter 3/The Weaver.w" +#line 614 "inweb/Chapter 3/The Weaver.w" tree_node *E = WeaveTree__endnote(tree); Trees__make_child(E, body); ap = E; - TextWeaver__commentary_text(tree, ap, TL_IS_215); + TextWeaver__commentary_text(tree, ap, TL_IS_218); int ct = 0; macro_usage *mu; LOOP_OVER_LINKED_LIST(mu, macro_usage, P->defines_macro->macro_usages) ct++; - if (ct == 1) TextWeaver__commentary_text(tree, ap, TL_IS_216); + if (ct == 1) TextWeaver__commentary_text(tree, ap, TL_IS_219); else { int k = 0, used_flag = FALSE; LOOP_OVER_LINKED_LIST(mu, macro_usage, P->defines_macro->macro_usages) if (P != mu->used_in_paragraph) { if (used_flag) { - if (k < ct-1) TextWeaver__commentary_text(tree, ap, TL_IS_217); - else TextWeaver__commentary_text(tree, ap, TL_IS_218); + if (k < ct-1) TextWeaver__commentary_text(tree, ap, TL_IS_220); + else TextWeaver__commentary_text(tree, ap, TL_IS_221); } else { - TextWeaver__commentary_text(tree, ap, TL_IS_219); + TextWeaver__commentary_text(tree, ap, TL_IS_222); } Trees__make_child(WeaveTree__locale(tree, mu->used_in_paragraph, NULL), ap); used_flag = TRUE; k++; switch (mu->multiplicity) { case 1: break; - case 2: TextWeaver__commentary_text(tree, ap, TL_IS_220); break; - case 3: TextWeaver__commentary_text(tree, ap, TL_IS_221); break; - case 4: TextWeaver__commentary_text(tree, ap, TL_IS_222); break; - case 5: TextWeaver__commentary_text(tree, ap, TL_IS_223); break; + case 2: TextWeaver__commentary_text(tree, ap, TL_IS_223); break; + case 3: TextWeaver__commentary_text(tree, ap, TL_IS_224); break; + case 4: TextWeaver__commentary_text(tree, ap, TL_IS_225); break; + case 5: TextWeaver__commentary_text(tree, ap, TL_IS_226); break; default: { TEMPORARY_TEXT(mt); WRITE_TO(mt, " (%d times)", mu->multiplicity); @@ -19496,30 +19575,30 @@ void Weaver__show_endnotes_on_previous_paragraph(heterogeneous_tree *tree, } } } - TextWeaver__commentary_text(tree, ap, TL_IS_224); + TextWeaver__commentary_text(tree, ap, TL_IS_227); } -#line 612 "inweb/Chapter 3/The Weaver.w" +#line 604 "inweb/Chapter 3/The Weaver.w" ; language_function *fn; LOOP_OVER_LINKED_LIST(fn, language_function, P->functions) { -#line 661 "inweb/Chapter 3/The Weaver.w" +#line 653 "inweb/Chapter 3/The Weaver.w" if (fn->usage_described == FALSE) Weaver__show_function_usage(tree, wv, ap, P, fn, FALSE); } -#line 615 "inweb/Chapter 3/The Weaver.w" +#line 607 "inweb/Chapter 3/The Weaver.w" ; language_type *st; LOOP_OVER_LINKED_LIST(st, language_type, P->structures) { -#line 665 "inweb/Chapter 3/The Weaver.w" +#line 657 "inweb/Chapter 3/The Weaver.w" tree_node *E = WeaveTree__endnote(tree); Trees__make_child(E, body); ap = E; - TextWeaver__commentary_text(tree, ap, TL_IS_225); + TextWeaver__commentary_text(tree, ap, TL_IS_228); TextWeaver__commentary_text(tree, ap, st->structure_name); section *S; @@ -19543,25 +19622,25 @@ void Weaver__show_endnotes_on_previous_paragraph(heterogeneous_tree *tree, usage_count++; if (S != P->under_section) external++; } - if (external == 0) TextWeaver__commentary_text(tree, ap, TL_IS_226); + if (external == 0) TextWeaver__commentary_text(tree, ap, TL_IS_229); else { - TextWeaver__commentary_text(tree, ap, TL_IS_227); + TextWeaver__commentary_text(tree, ap, TL_IS_230); int c = 0; LOOP_OVER(S, section) if ((S->scratch_flag) && (S != P->under_section)) { - if (c++ > 0) TextWeaver__commentary_text(tree, ap, TL_IS_228); + if (c++ > 0) TextWeaver__commentary_text(tree, ap, TL_IS_231); TextWeaver__commentary_text(tree, ap, S->md->sect_range); } - if (P->under_section->scratch_flag) TextWeaver__commentary_text(tree, ap, TL_IS_229); + if (P->under_section->scratch_flag) TextWeaver__commentary_text(tree, ap, TL_IS_232); } - TextWeaver__commentary_text(tree, ap, TL_IS_230); + TextWeaver__commentary_text(tree, ap, TL_IS_233); } -#line 618 "inweb/Chapter 3/The Weaver.w" +#line 610 "inweb/Chapter 3/The Weaver.w" ; } -#line 705 "inweb/Chapter 3/The Weaver.w" +#line 697 "inweb/Chapter 3/The Weaver.w" void Weaver__show_function_usage(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, paragraph *P, language_function *fn, int as_list) { tree_node *body = ap; @@ -19572,7 +19651,7 @@ void Weaver__show_function_usage(heterogeneous_tree *tree, weave_order *wv, if (as_list == FALSE) { tree_node *E = WeaveTree__endnote(tree); Trees__make_child(E, body); ap = E; - TextWeaver__commentary_text(tree, ap, TL_IS_231); + TextWeaver__commentary_text(tree, ap, TL_IS_234); TextWeaver__commentary_text(tree, ap, fn->function_name); } int used_flag = FALSE; @@ -19584,9 +19663,9 @@ void Weaver__show_function_usage(heterogeneous_tree *tree, weave_order *wv, (P->under_section == hteu->usage_recorded_at->under_section)) { -#line 744 "inweb/Chapter 3/The Weaver.w" +#line 736 "inweb/Chapter 3/The Weaver.w" if (as_list == FALSE) { - if (used_flag == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_236); + if (used_flag == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_239); } used_flag = TRUE; section *S = hteu->usage_recorded_at->under_section; @@ -19594,31 +19673,31 @@ void Weaver__show_function_usage(heterogeneous_tree *tree, weave_order *wv, count_under = 0; if (last_cited_in) { if (as_list == FALSE) { - if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_237); - else TextWeaver__commentary_text(tree, ap, TL_IS_238); + if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_240); + else TextWeaver__commentary_text(tree, ap, TL_IS_241); } else { - if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_239); - else TextWeaver__commentary_text(tree, ap, TL_IS_240); + if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_242); + else TextWeaver__commentary_text(tree, ap, TL_IS_243); } } TextWeaver__commentary_text(tree, ap, hteu->usage_recorded_at->under_section->md->sect_title); - if (as_list == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_241); - else TextWeaver__commentary_text(tree, ap, TL_IS_242); + if (as_list == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_244); + else TextWeaver__commentary_text(tree, ap, TL_IS_245); } - if (count_under++ > 0) TextWeaver__commentary_text(tree, ap, TL_IS_243); + if (count_under++ > 0) TextWeaver__commentary_text(tree, ap, TL_IS_246); Trees__make_child(WeaveTree__locale(tree, hteu->usage_recorded_at, NULL), ap); last_cited_in = hteu->usage_recorded_at->under_section; } -#line 725 "inweb/Chapter 3/The Weaver.w" +#line 717 "inweb/Chapter 3/The Weaver.w" ; LOOP_OVER_LINKED_LIST(hteu, hash_table_entry_usage, hte->usages) if (P->under_section != hteu->usage_recorded_at->under_section) { -#line 744 "inweb/Chapter 3/The Weaver.w" +#line 736 "inweb/Chapter 3/The Weaver.w" if (as_list == FALSE) { - if (used_flag == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_236); + if (used_flag == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_239); } used_flag = TRUE; section *S = hteu->usage_recorded_at->under_section; @@ -19626,39 +19705,39 @@ void Weaver__show_function_usage(heterogeneous_tree *tree, weave_order *wv, count_under = 0; if (last_cited_in) { if (as_list == FALSE) { - if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_237); - else TextWeaver__commentary_text(tree, ap, TL_IS_238); + if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_240); + else TextWeaver__commentary_text(tree, ap, TL_IS_241); } else { - if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_239); - else TextWeaver__commentary_text(tree, ap, TL_IS_240); + if (last_cited_in != P->under_section) TextWeaver__commentary_text(tree, ap, TL_IS_242); + else TextWeaver__commentary_text(tree, ap, TL_IS_243); } } TextWeaver__commentary_text(tree, ap, hteu->usage_recorded_at->under_section->md->sect_title); - if (as_list == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_241); - else TextWeaver__commentary_text(tree, ap, TL_IS_242); + if (as_list == FALSE) TextWeaver__commentary_text(tree, ap, TL_IS_244); + else TextWeaver__commentary_text(tree, ap, TL_IS_245); } - if (count_under++ > 0) TextWeaver__commentary_text(tree, ap, TL_IS_243); + if (count_under++ > 0) TextWeaver__commentary_text(tree, ap, TL_IS_246); Trees__make_child(WeaveTree__locale(tree, hteu->usage_recorded_at, NULL), ap); last_cited_in = hteu->usage_recorded_at->under_section; } -#line 728 "inweb/Chapter 3/The Weaver.w" +#line 720 "inweb/Chapter 3/The Weaver.w" ; if (used_flag == FALSE) { if (as_list == FALSE) { - TextWeaver__commentary_text(tree, ap, TL_IS_232); + TextWeaver__commentary_text(tree, ap, TL_IS_235); } else { - TextWeaver__commentary_text(tree, ap, TL_IS_233); + TextWeaver__commentary_text(tree, ap, TL_IS_236); } } if (as_list == FALSE) { if ((last_cited_in != P->under_section) && (last_cited_in)) - TextWeaver__commentary_text(tree, ap, TL_IS_234); - TextWeaver__commentary_text(tree, ap, TL_IS_235); + TextWeaver__commentary_text(tree, ap, TL_IS_237); + TextWeaver__commentary_text(tree, ap, TL_IS_238); } } -#line 771 "inweb/Chapter 3/The Weaver.w" +#line 763 "inweb/Chapter 3/The Weaver.w" void Weaver__weave_subheading(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *text) { tree_node *D = WeaveTree__subheading(tree, text); @@ -19691,18 +19770,55 @@ void Weaver__figure(heterogeneous_tree *tree, weave_order *wv, Trees__make_child(F, ap); } -void Weaver__embed(heterogeneous_tree *tree, weave_order *wv, - tree_node *ap, text_stream *service, text_stream *ID) { - tree_node *F = WeaveTree__embed(tree, service, ID); - Trees__make_child(F, ap); -} - void Weaver__commentary_text(heterogeneous_tree *tree, weave_order *wv, tree_node *ap, text_stream *matter) { TextWeaver__commentary_text(tree, ap, matter); } -#line 819 "inweb/Chapter 3/The Weaver.w" +#line 805 "inweb/Chapter 3/The Weaver.w" +text_stream *Weaver__dimensions(text_stream *item, int *w, int *h, source_line *L) { + int sv = L->owning_section->md->using_syntax; + *w = -1; *h = -1; + text_stream *use = item; + match_results mr = Regexp__create_mr(); + if (Regexp__match(&mr, item, L"(%c+) at (%d+) by (%d+)")) { + if (sv < V2_SYNTAX) + Parser__wrong_version(sv, L, "at X by Y", V2_SYNTAX); + *w = Str__atoi(mr.exp[1], 0); + *h = Str__atoi(mr.exp[2], 0); + use = Str__duplicate(mr.exp[0]); + } else if (Regexp__match(&mr, item, L"(%c+) at height (%d+)")) { + if (sv < V2_SYNTAX) + Parser__wrong_version(sv, L, "at height Y", V2_SYNTAX); + *h = Str__atoi(mr.exp[1], 0); + use = Str__duplicate(mr.exp[0]); + } else if (Regexp__match(&mr, item, L"(%c+) at width (%d+)")) { + if (sv < V2_SYNTAX) + Parser__wrong_version(sv, L, "at width Y", V2_SYNTAX); + *w = Str__atoi(mr.exp[1], 0); + use = Str__duplicate(mr.exp[0]); + } else if (Regexp__match(&mr, item, L"(%c+) at (%d+)cm by (%d+)cm")) { + if (sv < V2_SYNTAX) + Parser__wrong_version(sv, L, "at Xcm by Ycm", V2_SYNTAX); + *w = POINTS_PER_CM*Str__atoi(mr.exp[1], 0); + *h = POINTS_PER_CM*Str__atoi(mr.exp[2], 0); + use = Str__duplicate(mr.exp[0]); + } else if (Regexp__match(&mr, item, L"(%c+) at height (%d+)cm")) { + if (sv < V2_SYNTAX) + Parser__wrong_version(sv, L, "at height Ycm", V2_SYNTAX); + *h = POINTS_PER_CM*Str__atoi(mr.exp[1], 0); + use = Str__duplicate(mr.exp[0]); + } else if (Regexp__match(&mr, item, L"(%c+) at width (%d+)cm")) { + if (sv < V2_SYNTAX) + Parser__wrong_version(sv, L, "at width Ycm", V2_SYNTAX); + *w = POINTS_PER_CM*Str__atoi(mr.exp[1], 0); + use = Str__duplicate(mr.exp[0]); + } + Regexp__dispose_of(&mr); + return use; +} + +#line 852 "inweb/Chapter 3/The Weaver.w" int Weaver__weave_table_of_contents(heterogeneous_tree *tree, tree_node *ap, section *S) { int noteworthy = 0; @@ -19741,8 +19857,8 @@ void TextWeaver__commentary_r(heterogeneous_tree *tree, tree_node *ap, text_stre weave_order *wv = C->wv; text_stream *code_in_comments_notation = Bibliographic__get_datum(wv->weave_web->md, - (in_code)?(TL_IS_244):(TL_IS_245)); - if (Str__ne(code_in_comments_notation, TL_IS_246)) + (in_code)?(TL_IS_247):(TL_IS_248)); + if (Str__ne(code_in_comments_notation, TL_IS_249)) { #line 52 "inweb/Chapter 3/The Weaver of Text.w" for (int i=0; i < Str__len(matter); i++) { @@ -19769,8 +19885,8 @@ void TextWeaver__commentary_r(heterogeneous_tree *tree, tree_node *ap, text_stre { #line 69 "inweb/Chapter 3/The Weaver of Text.w" for (int i=0; i < Str__len(matter); i++) { - if ((Str__includes_at(matter, i, TL_IS_253)) || - (Str__includes_at(matter, i, TL_IS_254))) { + if ((Str__includes_at(matter, i, TL_IS_256)) || + (Str__includes_at(matter, i, TL_IS_257))) { TEMPORARY_TEXT(before); Str__copy(before, matter); Str__truncate(before, i); TEMPORARY_TEXT(after); @@ -19795,8 +19911,8 @@ void TextWeaver__commentary_r(heterogeneous_tree *tree, tree_node *ap, text_stre int display_flag = TRUE; text_stream *tex_notation = Bibliographic__get_datum(wv->weave_web->md, - TL_IS_247); - if (Str__ne(tex_notation, TL_IS_248)) + TL_IS_250); + if (Str__ne(tex_notation, TL_IS_251)) { #line 91 "inweb/Chapter 3/The Weaver of Text.w" int N = Str__len(tex_notation); @@ -19831,8 +19947,8 @@ void TextWeaver__commentary_r(heterogeneous_tree *tree, tree_node *ap, text_stre ; display_flag = FALSE; tex_notation = Bibliographic__get_datum(wv->weave_web->md, - TL_IS_249); - if (Str__ne(tex_notation, TL_IS_250)) + TL_IS_252); + if (Str__ne(tex_notation, TL_IS_253)) { #line 91 "inweb/Chapter 3/The Weaver of Text.w" int N = Str__len(tex_notation); @@ -19867,8 +19983,8 @@ void TextWeaver__commentary_r(heterogeneous_tree *tree, tree_node *ap, text_stre ; text_stream *xref_notation = Bibliographic__get_datum(wv->weave_web->md, - TL_IS_251); - if (Str__ne(xref_notation, TL_IS_252)) + TL_IS_254); + if (Str__ne(xref_notation, TL_IS_255)) { #line 142 "inweb/Chapter 3/The Weaver of Text.w" int N = Str__len(xref_notation); @@ -19936,7 +20052,7 @@ void TextWeaver__commentary_r(heterogeneous_tree *tree, tree_node *ap, text_stre Trees__make_child(WeaveTree__footnote_cue(tree, F->cue_text), ap); TextWeaver__commentary_r(tree, ap, after, within, in_code); } else { - Main__error_in_web(TL_IS_255, wv->current_weave_line); + Main__error_in_web(TL_IS_258, wv->current_weave_line); } } DISCARD_TEXT(before); @@ -19980,8 +20096,8 @@ void TextWeaver__source_code(heterogeneous_tree *tree, tree_node *ap, { #line 233 "inweb/Chapter 3/The Weaver of Text.w" - if ((Str__includes_at(matter, i, TL_IS_258)) || - (Str__includes_at(matter, i, TL_IS_259))) { + if ((Str__includes_at(matter, i, TL_IS_261)) || + (Str__includes_at(matter, i, TL_IS_262))) { TEMPORARY_TEXT(after); Str__substr(after, Str__at(matter, i), Str__end(matter)); match_results mr = Regexp__create_mr(); @@ -19999,8 +20115,8 @@ void TextWeaver__source_code(heterogeneous_tree *tree, tree_node *ap, #line 209 "inweb/Chapter 3/The Weaver of Text.w" ; text_stream *xref_notation = Bibliographic__get_datum(wv->weave_web->md, - TL_IS_256); - if (Str__ne(xref_notation, TL_IS_257)) + TL_IS_259); + if (Str__ne(xref_notation, TL_IS_260)) { #line 249 "inweb/Chapter 3/The Weaver of Text.w" @@ -20136,7 +20252,7 @@ void Tangler__tangle(web *W, tangle_target *target, filename *dest_file) { { #line 87 "inweb/Chapter 3/The Tangler.w" - if (L->owning_paragraph == NULL) Main__error_in_web(TL_IS_260, L); + if (L->owning_paragraph == NULL) Main__error_in_web(TL_IS_263, L); else Tags__open_ifdefs(OUT, L->owning_paragraph); LanguageMethods__start_definition(OUT, lang, L->text_operand, @@ -20158,7 +20274,7 @@ void Tangler__tangle(web *W, tangle_target *target, filename *dest_file) { { #line 87 "inweb/Chapter 3/The Tangler.w" - if (L->owning_paragraph == NULL) Main__error_in_web(TL_IS_260, L); + if (L->owning_paragraph == NULL) Main__error_in_web(TL_IS_263, L); else Tags__open_ifdefs(OUT, L->owning_paragraph); LanguageMethods__start_definition(OUT, lang, L->text_operand, @@ -20279,7 +20395,7 @@ void Tangler__tangle_line(OUTPUT_STREAM, text_stream *original, section *S, sour LanguageMethods__after_macro_expansion(OUT, lang, pmac); LanguageMethods__insert_line_marker(OUT, lang, L); } else { - Main__error_in_web(TL_IS_261, L); + Main__error_in_web(TL_IS_264, L); WRITE_TO(STDERR, "Macro is '%S'\n", temp); LanguageMethods__comment(OUT, lang, temp); /* recover by putting macro name in comment */ } @@ -20348,7 +20464,7 @@ programming_language *Languages__find_by_name(text_stream *lname, web *W) { #line 26 "inweb/Chapter 4/Programming Languages.w" filename *F = NULL; if (W) { - pathname *P = Pathnames__down(W->md->path_to_web, TL_IS_262); + pathname *P = Pathnames__down(W->md->path_to_web, TL_IS_265); { #line 39 "inweb/Chapter 4/Programming Languages.w" @@ -20395,7 +20511,7 @@ programming_language *Languages__find_by_name(text_stream *lname, web *W) { #line 50 "inweb/Chapter 4/Programming Languages.w" programming_language *Languages__default(web *W) { - return Languages__find_by_name(TL_IS_263, W); + return Languages__find_by_name(TL_IS_266, W); } void Languages__show(OUTPUT_STREAM) { @@ -20437,7 +20553,7 @@ void Languages__read_definitions(pathname *P) { } pathname *Languages__default_directory(void) { - return Pathnames__down(path_to_inweb, TL_IS_264); + return Pathnames__down(path_to_inweb, TL_IS_267); } #line 144 "inweb/Chapter 4/Programming Languages.w" @@ -20497,7 +20613,7 @@ programming_language *Languages__read_definition(filename *F) { { #line 215 "inweb/Chapter 4/Programming Languages.w" if (pl->C_like) CLike__make_c_like(pl); - if (Str__eq(pl->language_name, TL_IS_265)) InCSupport__add_features(pl); + if (Str__eq(pl->language_name, TL_IS_268)) InCSupport__add_features(pl); ACMESupport__add_fallbacks(pl); } @@ -20519,7 +20635,7 @@ void Languages__read_definition_line(text_stream *line, text_file_position *tfp, if (state->current_block) { #line 323 "inweb/Chapter 4/Programming Languages.w" - if (Str__eq(line, TL_IS_297)) { + if (Str__eq(line, TL_IS_300)) { state->current_block = state->current_block->parent; } else if (Regexp__match(&mr, line, L"characters {")) { colouring_rule *rule = Languages__new_rule(state->current_block); @@ -20535,7 +20651,7 @@ void Languages__read_definition_line(text_stream *line, text_file_position *tfp, } else if (Regexp__match(&mr, line, L"runs of (%c+) {")) { colouring_rule *rule = Languages__new_rule(state->current_block); int r = UNQUOTED_COLOUR; - if (Str__ne(mr.exp[0], TL_IS_298)) r = Languages__colour(mr.exp[0], tfp); + if (Str__ne(mr.exp[0], TL_IS_301)) r = Languages__colour(mr.exp[0], tfp); rule->execute_block = Languages__new_block(state->current_block, r); state->current_block = rule->execute_block; } else if (Regexp__match(&mr, line, L"instances of (%c+) {")) { @@ -20590,66 +20706,66 @@ void Languages__read_definition_line(text_stream *line, text_file_position *tfp, Languages__reserved(pl, Languages__text(mr.exp[0], tfp, FALSE), RESERVED_COLOUR, tfp); } else if (Regexp__match(&mr, line, L"(%c+) *: *(%c+?)")) { text_stream *key = mr.exp[0], *value = Str__duplicate(mr.exp[1]); - if (Str__eq(key, TL_IS_266)) pl->language_name = Languages__text(value, tfp, TRUE); - else if (Str__eq(key, TL_IS_267)) - pl->language_details = Languages__text(value, tfp, TRUE); - else if (Str__eq(key, TL_IS_268)) - pl->file_extension = Languages__text(value, tfp, TRUE); - else if (Str__eq(key, TL_IS_269)) - pl->line_comment = Languages__text(value, tfp, TRUE); + if (Str__eq(key, TL_IS_269)) pl->language_name = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_270)) - pl->whole_line_comment = Languages__text(value, tfp, TRUE); + pl->language_details = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_271)) - pl->multiline_comment_open = Languages__text(value, tfp, TRUE); + pl->file_extension = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_272)) - pl->multiline_comment_close = Languages__text(value, tfp, TRUE); + pl->line_comment = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_273)) - pl->string_literal = Languages__text(value, tfp, TRUE); + pl->whole_line_comment = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_274)) - pl->string_literal_escape = Languages__text(value, tfp, TRUE); + pl->multiline_comment_open = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_275)) - pl->character_literal = Languages__text(value, tfp, TRUE); + pl->multiline_comment_close = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_276)) - pl->character_literal_escape = Languages__text(value, tfp, TRUE); + pl->string_literal = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_277)) - pl->binary_literal_prefix = Languages__text(value, tfp, TRUE); + pl->string_literal_escape = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_278)) - pl->octal_literal_prefix = Languages__text(value, tfp, TRUE); + pl->character_literal = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_279)) - pl->hexadecimal_literal_prefix = Languages__text(value, tfp, TRUE); + pl->character_literal_escape = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_280)) - pl->negative_literal_prefix = Languages__text(value, tfp, TRUE); + pl->binary_literal_prefix = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_281)) - pl->shebang = Languages__text(value, tfp, TRUE); + pl->octal_literal_prefix = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_282)) - pl->line_marker = Languages__text(value, tfp, TRUE); + pl->hexadecimal_literal_prefix = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_283)) - pl->before_macro_expansion = Languages__text(value, tfp, TRUE); + pl->negative_literal_prefix = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_284)) - pl->after_macro_expansion = Languages__text(value, tfp, TRUE); + pl->shebang = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_285)) - pl->start_definition = Languages__text(value, tfp, TRUE); + pl->line_marker = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_286)) - pl->prolong_definition = Languages__text(value, tfp, TRUE); + pl->before_macro_expansion = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_287)) - pl->end_definition = Languages__text(value, tfp, TRUE); + pl->after_macro_expansion = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_288)) - pl->start_ifdef = Languages__text(value, tfp, TRUE); + pl->start_definition = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_289)) - pl->start_ifndef = Languages__text(value, tfp, TRUE); + pl->prolong_definition = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_290)) - pl->end_ifdef = Languages__text(value, tfp, TRUE); + pl->end_definition = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_291)) - pl->end_ifndef = Languages__text(value, tfp, TRUE); + pl->start_ifdef = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_292)) - pl->C_like = Languages__boolean(value, tfp); + pl->start_ifndef = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_293)) - pl->suppress_disclaimer = Languages__boolean(value, tfp); + pl->end_ifdef = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_294)) - pl->supports_namespaces = Languages__boolean(value, tfp); + pl->end_ifndef = Languages__text(value, tfp, TRUE); else if (Str__eq(key, TL_IS_295)) - Languages__regexp(pl->function_notation, value, tfp); + pl->C_like = Languages__boolean(value, tfp); else if (Str__eq(key, TL_IS_296)) + pl->suppress_disclaimer = Languages__boolean(value, tfp); + else if (Str__eq(key, TL_IS_297)) + pl->supports_namespaces = Languages__boolean(value, tfp); + else if (Str__eq(key, TL_IS_298)) + Languages__regexp(pl->function_notation, value, tfp); + else if (Str__eq(key, TL_IS_299)) Languages__regexp(pl->type_notation, value, tfp); else { Errors__in_text_file("unknown property name before ':'", tfp); @@ -20759,7 +20875,7 @@ void Languages__parse_rule(language_reader_state *state, text_stream *premiss, { #line 533 "inweb/Chapter 4/Programming Languages.w" - if (Str__eq(action, TL_IS_299)) { + if (Str__eq(action, TL_IS_302)) { rule->execute_block = Languages__new_block(state->current_block, WHOLE_LINE_CRULE_RUN); state->current_block = rule->execute_block; @@ -20772,7 +20888,7 @@ void Languages__parse_rule(language_reader_state *state, text_stream *premiss, rule->set_prefix_to_colour = rule->set_to_colour; } else if (Str__get_first_char(action) == '!') { rule->set_to_colour = Languages__colour(action, tfp); - } else if (Str__eq(action, TL_IS_300)) { + } else if (Str__eq(action, TL_IS_303)) { rule->debug = TRUE; } else { Errors__in_text_file("action after '=>' illegible", tfp); @@ -20807,17 +20923,17 @@ int Languages__colour(text_stream *T, text_file_position *tfp) { Errors__in_text_file("colour names must begin with !", tfp); return PLAIN_COLOUR; } - if (Str__eq(T, TL_IS_301)) return STRING_COLOUR; - else if (Str__eq(T, TL_IS_302)) return FUNCTION_COLOUR; - else if (Str__eq(T, TL_IS_303)) return DEFINITION_COLOUR; - else if (Str__eq(T, TL_IS_304)) return RESERVED_COLOUR; - else if (Str__eq(T, TL_IS_305)) return ELEMENT_COLOUR; - else if (Str__eq(T, TL_IS_306)) return IDENTIFIER_COLOUR; - else if (Str__eq(T, TL_IS_307)) return CHARACTER_COLOUR; - else if (Str__eq(T, TL_IS_308)) return CONSTANT_COLOUR; - else if (Str__eq(T, TL_IS_309)) return PLAIN_COLOUR; - else if (Str__eq(T, TL_IS_310)) return EXTRACT_COLOUR; - else if (Str__eq(T, TL_IS_311)) return COMMENT_COLOUR; + if (Str__eq(T, TL_IS_304)) return STRING_COLOUR; + else if (Str__eq(T, TL_IS_305)) return FUNCTION_COLOUR; + else if (Str__eq(T, TL_IS_306)) return DEFINITION_COLOUR; + else if (Str__eq(T, TL_IS_307)) return RESERVED_COLOUR; + else if (Str__eq(T, TL_IS_308)) return ELEMENT_COLOUR; + else if (Str__eq(T, TL_IS_309)) return IDENTIFIER_COLOUR; + else if (Str__eq(T, TL_IS_310)) return CHARACTER_COLOUR; + else if (Str__eq(T, TL_IS_311)) return CONSTANT_COLOUR; + else if (Str__eq(T, TL_IS_312)) return PLAIN_COLOUR; + else if (Str__eq(T, TL_IS_313)) return EXTRACT_COLOUR; + else if (Str__eq(T, TL_IS_314)) return COMMENT_COLOUR; else { Errors__in_text_file("no such !colour", tfp); return PLAIN_COLOUR; @@ -20826,8 +20942,8 @@ int Languages__colour(text_stream *T, text_file_position *tfp) { #line 624 "inweb/Chapter 4/Programming Languages.w" int Languages__boolean(text_stream *T, text_file_position *tfp) { - if (Str__eq(T, TL_IS_312)) return TRUE; - else if (Str__eq(T, TL_IS_313)) return FALSE; + if (Str__eq(T, TL_IS_315)) return TRUE; + else if (Str__eq(T, TL_IS_316)) return FALSE; else { Errors__in_text_file("must be true or false", tfp); return FALSE; @@ -20885,9 +21001,6 @@ text_stream *Languages__text(text_stream *T, text_file_position *tfp, int allow) } if (bareword) { int rw = FALSE; - if (Str__eq(V, TL_IS_314)) rw = TRUE; - if (Str__eq(V, TL_IS_315)) rw = TRUE; - if (Str__eq(V, TL_IS_316)) rw = TRUE; if (Str__eq(V, TL_IS_317)) rw = TRUE; if (Str__eq(V, TL_IS_318)) rw = TRUE; if (Str__eq(V, TL_IS_319)) rw = TRUE; @@ -20907,6 +21020,9 @@ text_stream *Languages__text(text_stream *T, text_file_position *tfp, int allow) if (Str__eq(V, TL_IS_333)) rw = TRUE; if (Str__eq(V, TL_IS_334)) rw = TRUE; if (Str__eq(V, TL_IS_335)) rw = TRUE; + if (Str__eq(V, TL_IS_336)) rw = TRUE; + if (Str__eq(V, TL_IS_337)) rw = TRUE; + if (Str__eq(V, TL_IS_338)) rw = TRUE; if (rw) { TEMPORARY_TEXT(err); @@ -21005,7 +21121,7 @@ language_type *Functions__new_struct(web *W, text_stream *name, source_line *L) { #line 40 "inweb/Chapter 4/Types and Functions.w" - Tags__add_by_name(L->owning_paragraph, TL_IS_336); + Tags__add_by_name(L->owning_paragraph, TL_IS_339); ADD_TO_LINKED_LIST(str, language_type, W->language_types); ADD_TO_LINKED_LIST(str, language_type, L->owning_paragraph->structures); @@ -21118,7 +21234,7 @@ language_function *Functions__new_function(text_stream *fname, source_line *L) { fn->within_namespace = TRUE; } else if ((Str__eq_wide_string(fname, L"main")) && (Str__eq_wide_string(ambient_namespace, L"Main::"))) - declared_namespace = TL_IS_337; + declared_namespace = TL_IS_340; if ((Str__ne(declared_namespace, ambient_namespace)) && (L->owning_paragraph->placed_very_early == FALSE)) { TEMPORARY_TEXT(err_mess); @@ -21214,7 +21330,7 @@ void LanguageMethods__disclaimer(text_stream *OUT, programming_language *pl, web int rv = FALSE; IMETHOD_CALLV(rv, pl, SUPPRESS_DISCLAIMER_TAN_MTID); if (rv == FALSE) - LanguageMethods__comment(OUT, pl, TL_IS_338); + LanguageMethods__comment(OUT, pl, TL_IS_341); } #line 127 "inweb/Chapter 4/Language Methods.w" @@ -21237,7 +21353,7 @@ void LanguageMethods__start_definition(OUTPUT_STREAM, programming_language *pl, int rv = FALSE; IMETHOD_CALL(rv, pl, START_DEFN_TAN_MTID, OUT, term, start, S, L); if (rv == FALSE) - Main__error_in_web(TL_IS_339, L); + Main__error_in_web(TL_IS_342, L); } void LanguageMethods__prolong_definition(OUTPUT_STREAM, programming_language *pl, @@ -21245,7 +21361,7 @@ void LanguageMethods__prolong_definition(OUTPUT_STREAM, programming_language *pl int rv = FALSE; IMETHOD_CALL(rv, pl, PROLONG_DEFN_TAN_MTID, OUT, more, S, L); if (rv == FALSE) - Main__error_in_web(TL_IS_340, L); + Main__error_in_web(TL_IS_343, L); } void LanguageMethods__end_definition(OUTPUT_STREAM, programming_language *pl, @@ -21697,7 +21813,7 @@ void ACMESupport__parse_functions(programming_language *self, web *W) { #line 267 "inweb/Chapter 4/ACME Support.w" void ACMESupport__post_analysis(programming_language *self, web *W) { int check_namespaces = FALSE; - if (Str__eq_wide_string(Bibliographic__get_datum(W->md, TL_IS_341), L"On")) + if (Str__eq_wide_string(Bibliographic__get_datum(W->md, TL_IS_344), L"On")) check_namespaces = TRUE; language_function *fn; LOOP_OVER(fn, language_function) { @@ -21717,11 +21833,11 @@ void ACMESupport__post_analysis(programming_language *self, web *W) { && (fn->call_freely == FALSE)) { if (fn->within_namespace) Main__error_in_web( - TL_IS_342, + TL_IS_345, fn->function_header_at); else Main__error_in_web( - TL_IS_343, + TL_IS_346, fn->function_header_at); } } @@ -22194,7 +22310,7 @@ void CLike__parse_types(programming_language *self, web *W) { if (Regexp__match(&mr, L->text, L"typedef struct (%i+) %c*{%c*")) { current_str = Functions__new_struct(W, mr.exp[0], L); - Tags__add_by_name(L->owning_paragraph, TL_IS_344); + Tags__add_by_name(L->owning_paragraph, TL_IS_347); } else if ((Str__get_first_char(L->text) == '}') && (current_str)) { current_str->typedef_ends = L; current_str = NULL; @@ -22329,14 +22445,14 @@ void CLike__parse_functions(programming_language *self, web *W) { if ((Regexp__match(&mr, L->text, L" *#ifn*def %c+")) || (Regexp__match(&mr, L->text, L" *#IFN*DEF %c+"))) { if (cc_sp >= MAX_CONDITIONAL_COMPILATION_STACK) - Main__error_in_web(TL_IS_346, L); + Main__error_in_web(TL_IS_349, L); else cc_stack[cc_sp++] = L; } if ((Regexp__match(&mr, L->text, L" *#endif *")) || (Regexp__match(&mr, L->text, L" *#ENDIF *"))) { if (cc_sp <= 0) - Main__error_in_web(TL_IS_347, L); + Main__error_in_web(TL_IS_350, L); else cc_sp--; } @@ -22430,7 +22546,7 @@ void CLike__parse_functions(programming_language *self, web *W) { ; } if (cc_sp > 0) - Main__error_in_web(TL_IS_345, NULL); + Main__error_in_web(TL_IS_348, NULL); } #line 314 "inweb/Chapter 4/C-Like Languages.w" @@ -23111,8 +23227,8 @@ preform_nonterminal *InCSupport__nonterminal_by_name(text_stream *name) { #line 764 "inweb/Chapter 4/InC Support.w" text_stream *InCSupport__nonterminal_variable_identifier(text_stream *name) { - if (Str__eq_wide_string(name, L"r")) return TL_IS_352; - if (Str__eq_wide_string(name, L"rp")) return TL_IS_353; + if (Str__eq_wide_string(name, L"r")) return TL_IS_355; + if (Str__eq_wide_string(name, L"rp")) return TL_IS_356; nonterminal_variable *ntv; LOOP_OVER(ntv, nonterminal_variable) if (Str__eq(ntv->ntv_name, name)) @@ -23124,7 +23240,7 @@ text_stream *InCSupport__nonterminal_variable_identifier(text_stream *name) { void InCSupport__additional_tangling(programming_language *self, web *W, tangle_target *target) { if (NUMBER_CREATED(preform_nonterminal) > 0) { pathname *P = Reader__tangled_folder(W); - filename *Syntax = Filenames__in(P, TL_IS_354); + filename *Syntax = Filenames__in(P, TL_IS_357); text_stream TO_struct; text_stream *OUT = &TO_struct; @@ -23135,8 +23251,8 @@ void InCSupport__additional_tangling(programming_language *self, web *W, tangle_ WRITE("[Preform syntax generated by inweb: do not edit.]\n\n"); - if (Bibliographic__data_exists(W->md, TL_IS_355)) - WRITE("language %S\n", Bibliographic__get_datum(W->md, TL_IS_356)); + if (Bibliographic__data_exists(W->md, TL_IS_358)) + WRITE("language %S\n", Bibliographic__get_datum(W->md, TL_IS_359)); { @@ -23329,59 +23445,59 @@ int InCSupport__share_element(programming_language *self, text_stream *elname) { #line 86 "inweb/Chapter 5/Weave Tree.w" -#line 92 "inweb/Chapter 5/Weave Tree.w" +#line 94 "inweb/Chapter 5/Weave Tree.w" -#line 98 "inweb/Chapter 5/Weave Tree.w" +#line 100 "inweb/Chapter 5/Weave Tree.w" -#line 103 "inweb/Chapter 5/Weave Tree.w" +#line 105 "inweb/Chapter 5/Weave Tree.w" -#line 107 "inweb/Chapter 5/Weave Tree.w" +#line 109 "inweb/Chapter 5/Weave Tree.w" -#line 112 "inweb/Chapter 5/Weave Tree.w" +#line 114 "inweb/Chapter 5/Weave Tree.w" -#line 117 "inweb/Chapter 5/Weave Tree.w" +#line 119 "inweb/Chapter 5/Weave Tree.w" -#line 121 "inweb/Chapter 5/Weave Tree.w" +#line 123 "inweb/Chapter 5/Weave Tree.w" -#line 127 "inweb/Chapter 5/Weave Tree.w" +#line 129 "inweb/Chapter 5/Weave Tree.w" -#line 133 "inweb/Chapter 5/Weave Tree.w" +#line 135 "inweb/Chapter 5/Weave Tree.w" -#line 138 "inweb/Chapter 5/Weave Tree.w" +#line 141 "inweb/Chapter 5/Weave Tree.w" -#line 143 "inweb/Chapter 5/Weave Tree.w" +#line 146 "inweb/Chapter 5/Weave Tree.w" -#line 150 "inweb/Chapter 5/Weave Tree.w" +#line 153 "inweb/Chapter 5/Weave Tree.w" -#line 154 "inweb/Chapter 5/Weave Tree.w" +#line 157 "inweb/Chapter 5/Weave Tree.w" -#line 159 "inweb/Chapter 5/Weave Tree.w" +#line 162 "inweb/Chapter 5/Weave Tree.w" -#line 163 "inweb/Chapter 5/Weave Tree.w" +#line 166 "inweb/Chapter 5/Weave Tree.w" -#line 169 "inweb/Chapter 5/Weave Tree.w" +#line 172 "inweb/Chapter 5/Weave Tree.w" -#line 175 "inweb/Chapter 5/Weave Tree.w" +#line 178 "inweb/Chapter 5/Weave Tree.w" -#line 182 "inweb/Chapter 5/Weave Tree.w" +#line 185 "inweb/Chapter 5/Weave Tree.w" -#line 187 "inweb/Chapter 5/Weave Tree.w" +#line 190 "inweb/Chapter 5/Weave Tree.w" -#line 192 "inweb/Chapter 5/Weave Tree.w" +#line 195 "inweb/Chapter 5/Weave Tree.w" -#line 197 "inweb/Chapter 5/Weave Tree.w" +#line 200 "inweb/Chapter 5/Weave Tree.w" -#line 202 "inweb/Chapter 5/Weave Tree.w" +#line 205 "inweb/Chapter 5/Weave Tree.w" -#line 208 "inweb/Chapter 5/Weave Tree.w" +#line 211 "inweb/Chapter 5/Weave Tree.w" -#line 212 "inweb/Chapter 5/Weave Tree.w" +#line 215 "inweb/Chapter 5/Weave Tree.w" -#line 218 "inweb/Chapter 5/Weave Tree.w" +#line 221 "inweb/Chapter 5/Weave Tree.w" -#line 223 "inweb/Chapter 5/Weave Tree.w" +#line 226 "inweb/Chapter 5/Weave Tree.w" -#line 225 "inweb/Chapter 5/Weave Tree.w" +#line 228 "inweb/Chapter 5/Weave Tree.w" tree_type *weave_tree_type = NULL; tree_node_type *weave_document_node_type = NULL; tree_node_type *weave_head_node_type = NULL; @@ -23428,93 +23544,93 @@ tree_node_type *weave_maths_node_type = NULL; heterogeneous_tree *WeaveTree__new_tree(weave_order *wv) { if (weave_tree_type == NULL) { - weave_tree_type = Trees__new_type(TL_IS_357, NULL); + weave_tree_type = Trees__new_type(TL_IS_360, NULL); weave_document_node_type = - Trees__new_node_type(TL_IS_358, weave_document_node_MT, NULL); + Trees__new_node_type(TL_IS_361, weave_document_node_MT, NULL); weave_head_node_type = - Trees__new_node_type(TL_IS_359, weave_head_node_MT, NULL); + Trees__new_node_type(TL_IS_362, weave_head_node_MT, NULL); weave_body_node_type = - Trees__new_node_type(TL_IS_360, weave_body_node_MT, NULL); + Trees__new_node_type(TL_IS_363, weave_body_node_MT, NULL); weave_tail_node_type = - Trees__new_node_type(TL_IS_361, weave_tail_node_MT, NULL); + Trees__new_node_type(TL_IS_364, weave_tail_node_MT, NULL); weave_chapter_footer_node_type = - Trees__new_node_type(TL_IS_362, weave_chapter_footer_node_MT, NULL); + Trees__new_node_type(TL_IS_365, weave_chapter_footer_node_MT, NULL); weave_chapter_header_node_type = - Trees__new_node_type(TL_IS_363, weave_chapter_header_node_MT, NULL); + Trees__new_node_type(TL_IS_366, weave_chapter_header_node_MT, NULL); weave_section_footer_node_type = - Trees__new_node_type(TL_IS_364, weave_section_footer_node_MT, NULL); + Trees__new_node_type(TL_IS_367, weave_section_footer_node_MT, NULL); weave_section_header_node_type = - Trees__new_node_type(TL_IS_365, weave_section_header_node_MT, NULL); + Trees__new_node_type(TL_IS_368, weave_section_header_node_MT, NULL); weave_section_purpose_node_type = - Trees__new_node_type(TL_IS_366, weave_section_purpose_node_MT, NULL); + Trees__new_node_type(TL_IS_369, weave_section_purpose_node_MT, NULL); weave_subheading_node_type = - Trees__new_node_type(TL_IS_367, weave_subheading_node_MT, NULL); + Trees__new_node_type(TL_IS_370, weave_subheading_node_MT, NULL); weave_bar_node_type = - Trees__new_node_type(TL_IS_368, weave_bar_node_MT, NULL); + Trees__new_node_type(TL_IS_371, weave_bar_node_MT, NULL); weave_pagebreak_node_type = - Trees__new_node_type(TL_IS_369, weave_pagebreak_node_MT, NULL); + Trees__new_node_type(TL_IS_372, weave_pagebreak_node_MT, NULL); weave_paragraph_heading_node_type = - Trees__new_node_type(TL_IS_370, weave_paragraph_heading_node_MT, NULL); + Trees__new_node_type(TL_IS_373, weave_paragraph_heading_node_MT, NULL); weave_endnote_node_type = - Trees__new_node_type(TL_IS_371, weave_endnote_node_MT, NULL); + Trees__new_node_type(TL_IS_374, weave_endnote_node_MT, NULL); weave_figure_node_type = - Trees__new_node_type(TL_IS_372, weave_figure_node_MT, NULL); + Trees__new_node_type(TL_IS_375, weave_figure_node_MT, NULL); weave_material_node_type = - Trees__new_node_type(TL_IS_373, weave_material_node_MT, NULL); + Trees__new_node_type(TL_IS_376, weave_material_node_MT, NULL); weave_embed_node_type = - Trees__new_node_type(TL_IS_374, weave_embed_node_MT, NULL); + Trees__new_node_type(TL_IS_377, weave_embed_node_MT, NULL); weave_pmac_node_type = - Trees__new_node_type(TL_IS_375, weave_pmac_node_MT, NULL); + Trees__new_node_type(TL_IS_378, weave_pmac_node_MT, NULL); weave_vskip_node_type = - Trees__new_node_type(TL_IS_376, weave_vskip_node_MT, NULL); + Trees__new_node_type(TL_IS_379, weave_vskip_node_MT, NULL); weave_apres_defn_node_type = - Trees__new_node_type(TL_IS_377, weave_apres_defn_node_MT, NULL); + Trees__new_node_type(TL_IS_380, weave_apres_defn_node_MT, NULL); weave_chapter_node_type = - Trees__new_node_type(TL_IS_378, weave_chapter_node_MT, NULL); + Trees__new_node_type(TL_IS_381, weave_chapter_node_MT, NULL); weave_section_node_type = - Trees__new_node_type(TL_IS_379, weave_section_node_MT, NULL); + Trees__new_node_type(TL_IS_382, weave_section_node_MT, NULL); weave_code_line_node_type = - Trees__new_node_type(TL_IS_380, weave_code_line_node_MT, NULL); + Trees__new_node_type(TL_IS_383, weave_code_line_node_MT, NULL); weave_function_usage_node_type = - Trees__new_node_type(TL_IS_381, weave_function_usage_node_MT, NULL); + Trees__new_node_type(TL_IS_384, weave_function_usage_node_MT, NULL); weave_commentary_node_type = - Trees__new_node_type(TL_IS_382, weave_commentary_node_MT, NULL); + Trees__new_node_type(TL_IS_385, weave_commentary_node_MT, NULL); weave_carousel_slide_node_type = - Trees__new_node_type(TL_IS_383, weave_carousel_slide_node_MT, NULL); + Trees__new_node_type(TL_IS_386, weave_carousel_slide_node_MT, NULL); weave_toc_node_type = - Trees__new_node_type(TL_IS_384, weave_toc_node_MT, NULL); + Trees__new_node_type(TL_IS_387, weave_toc_node_MT, NULL); weave_toc_line_node_type = - Trees__new_node_type(TL_IS_385, weave_toc_line_node_MT, NULL); + Trees__new_node_type(TL_IS_388, weave_toc_line_node_MT, NULL); weave_chapter_title_page_node_type = - Trees__new_node_type(TL_IS_386, weave_chapter_title_page_node_MT, NULL); + Trees__new_node_type(TL_IS_389, weave_chapter_title_page_node_MT, NULL); weave_defn_node_type = - Trees__new_node_type(TL_IS_387, weave_defn_node_MT, NULL); + Trees__new_node_type(TL_IS_390, weave_defn_node_MT, NULL); weave_source_code_node_type = - Trees__new_node_type(TL_IS_388, weave_source_code_node_MT, NULL); + Trees__new_node_type(TL_IS_391, weave_source_code_node_MT, NULL); weave_url_node_type = - Trees__new_node_type(TL_IS_389, weave_url_node_MT, NULL); + Trees__new_node_type(TL_IS_392, weave_url_node_MT, NULL); weave_footnote_cue_node_type = - Trees__new_node_type(TL_IS_390, weave_footnote_cue_node_MT, NULL); + Trees__new_node_type(TL_IS_393, weave_footnote_cue_node_MT, NULL); weave_begin_footnote_text_node_type = - Trees__new_node_type(TL_IS_391, weave_begin_footnote_text_node_MT, NULL); + Trees__new_node_type(TL_IS_394, weave_begin_footnote_text_node_MT, NULL); weave_display_line_node_type = - Trees__new_node_type(TL_IS_392, weave_display_line_node_MT, NULL); + Trees__new_node_type(TL_IS_395, weave_display_line_node_MT, NULL); weave_function_defn_node_type = - Trees__new_node_type(TL_IS_393, weave_function_defn_node_MT, NULL); + Trees__new_node_type(TL_IS_396, weave_function_defn_node_MT, NULL); weave_item_node_type = - Trees__new_node_type(TL_IS_394, weave_item_node_MT, NULL); + Trees__new_node_type(TL_IS_397, weave_item_node_MT, NULL); weave_grammar_index_node_type = - Trees__new_node_type(TL_IS_395, weave_grammar_index_node_MT, NULL); + Trees__new_node_type(TL_IS_398, weave_grammar_index_node_MT, NULL); weave_inline_node_type = - Trees__new_node_type(TL_IS_396, weave_inline_node_MT, NULL); + Trees__new_node_type(TL_IS_399, weave_inline_node_MT, NULL); weave_locale_node_type = - Trees__new_node_type(TL_IS_397, weave_locale_node_MT, NULL); + Trees__new_node_type(TL_IS_400, weave_locale_node_MT, NULL); weave_maths_node_type = - Trees__new_node_type(TL_IS_398, weave_maths_node_MT, NULL); + Trees__new_node_type(TL_IS_401, weave_maths_node_MT, NULL); weave_verbatim_node_type = - Trees__new_node_type(TL_IS_399, weave_verbatim_node_MT, NULL); + Trees__new_node_type(TL_IS_402, weave_verbatim_node_MT, NULL); } heterogeneous_tree *tree = Trees__new(weave_tree_type); Trees__make_root(tree, WeaveTree__document(tree, wv)); @@ -23649,14 +23765,16 @@ tree_node *WeaveTree__material(heterogeneous_tree *tree, int material_type, int } tree_node *WeaveTree__embed(heterogeneous_tree *tree, - text_stream *service, text_stream *ID) { + text_stream *service, text_stream *ID, int w, int h) { weave_embed_node *C = CREATE(weave_embed_node); C->service = Str__duplicate(service); C->ID = Str__duplicate(ID); + C->w = w; + C->h = h; return Trees__new_node(tree, weave_embed_node_type, STORE_POINTER_weave_embed_node(C)); } -#line 504 "inweb/Chapter 5/Weave Tree.w" +#line 509 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__pmac(heterogeneous_tree *tree, para_macro *pmac, int defn) { weave_pmac_node *C = CREATE(weave_pmac_node); C->pmac = pmac; @@ -23664,14 +23782,14 @@ tree_node *WeaveTree__pmac(heterogeneous_tree *tree, para_macro *pmac, int defn) return Trees__new_node(tree, weave_pmac_node_type, STORE_POINTER_weave_pmac_node(C)); } -#line 516 "inweb/Chapter 5/Weave Tree.w" +#line 521 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__vskip(heterogeneous_tree *tree, int in_comment) { weave_vskip_node *C = CREATE(weave_vskip_node); C->in_comment = in_comment; return Trees__new_node(tree, weave_vskip_node_type, STORE_POINTER_weave_vskip_node(C)); } -#line 528 "inweb/Chapter 5/Weave Tree.w" +#line 533 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__apres_defn(heterogeneous_tree *tree) { weave_apres_defn_node *C = CREATE(weave_apres_defn_node); return Trees__new_node(tree, weave_apres_defn_node_type, STORE_POINTER_weave_apres_defn_node(C)); @@ -23703,9 +23821,10 @@ tree_node *WeaveTree__commentary(heterogeneous_tree *tree, text_stream *text, in return Trees__new_node(tree, weave_commentary_node_type, STORE_POINTER_weave_commentary_node(C)); } -tree_node *WeaveTree__carousel_slide(heterogeneous_tree *tree, text_stream *caption) { +tree_node *WeaveTree__carousel_slide(heterogeneous_tree *tree, text_stream *caption, int c) { weave_carousel_slide_node *C = CREATE(weave_carousel_slide_node); C->caption = Str__duplicate(caption); + C->caption_command = c; return Trees__new_node(tree, weave_carousel_slide_node_type, STORE_POINTER_weave_carousel_slide_node(C)); } @@ -23735,7 +23854,7 @@ tree_node *WeaveTree__weave_defn_node(heterogeneous_tree *tree, text_stream *key return Trees__new_node(tree, weave_defn_node_type, STORE_POINTER_weave_defn_node(C)); } -#line 595 "inweb/Chapter 5/Weave Tree.w" +#line 601 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__source_code(heterogeneous_tree *tree, text_stream *matter, text_stream *colouring) { if (Str__len(colouring) != Str__len(matter)) internal_error("bad source segment"); @@ -23768,21 +23887,21 @@ tree_node *WeaveTree__footnote(heterogeneous_tree *tree, text_stream *cue) { return Trees__new_node(tree, weave_begin_footnote_text_node_type, STORE_POINTER_weave_begin_footnote_text_node(C)); } -#line 631 "inweb/Chapter 5/Weave Tree.w" +#line 637 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__function_defn(heterogeneous_tree *tree, language_function *fn) { weave_function_defn_node *C = CREATE(weave_function_defn_node); C->fn = fn; return Trees__new_node(tree, weave_function_defn_node_type, STORE_POINTER_weave_function_defn_node(C)); } -#line 641 "inweb/Chapter 5/Weave Tree.w" +#line 647 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__display_line(heterogeneous_tree *tree, text_stream *text) { weave_display_line_node *C = CREATE(weave_display_line_node); C->text = Str__duplicate(text); return Trees__new_node(tree, weave_display_line_node_type, STORE_POINTER_weave_display_line_node(C)); } -#line 660 "inweb/Chapter 5/Weave Tree.w" +#line 666 "inweb/Chapter 5/Weave Tree.w" tree_node *WeaveTree__weave_item_node(heterogeneous_tree *tree, int depth, text_stream *label) { weave_item_node *C = CREATE(weave_item_node); C->depth = depth; @@ -23960,7 +24079,7 @@ int Formats__substitute_post_processing_data(OUTPUT_STREAM, weave_order *wv, #line 9 "inweb/Chapter 5/Plain Text Format.w" void PlainText__create(void) { - weave_format *wf = Formats__create_weave_format(TL_IS_400, TL_IS_401); + weave_format *wf = Formats__create_weave_format(TL_IS_403, TL_IS_404); METHOD_ADD(wf, RENDER_FOR_MTID, PlainText__render); METHOD_ADD(wf, CHAPTER_TP_FOR_MTID, PlainText__chapter_title_page); } @@ -24428,7 +24547,7 @@ void TeX__create(void) { { #line 16 "inweb/Chapter 5/TeX Format.w" - weave_format *wf = Formats__create_weave_format(TL_IS_402, TL_IS_403); + weave_format *wf = Formats__create_weave_format(TL_IS_405, TL_IS_406); METHOD_ADD(wf, RENDER_FOR_MTID, TeX__render_TeX); { @@ -24447,7 +24566,7 @@ void TeX__create(void) { { #line 21 "inweb/Chapter 5/TeX Format.w" - weave_format *wf = Formats__create_weave_format(TL_IS_404, TL_IS_405); + weave_format *wf = Formats__create_weave_format(TL_IS_407, TL_IS_408); METHOD_ADD(wf, RENDER_FOR_MTID, TeX__render_DVI); { @@ -24469,7 +24588,7 @@ void TeX__create(void) { { #line 29 "inweb/Chapter 5/TeX Format.w" - weave_format *wf = Formats__create_weave_format(TL_IS_406, TL_IS_407); + weave_format *wf = Formats__create_weave_format(TL_IS_409, TL_IS_410); METHOD_ADD(wf, RENDER_FOR_MTID, TeX__render_PDF); { @@ -24531,7 +24650,7 @@ int TeX__render_visit(tree_node *N, void *state, int L) { { #line 339 "inweb/Chapter 5/TeX Format.w" - filename *Macros = Patterns__obtain_filename(trs->wv->pattern, TL_IS_409); + filename *Macros = Patterns__obtain_filename(trs->wv->pattern, TL_IS_412); FILE *MACROS = Filenames__fopen(Macros, "r"); if (MACROS == NULL) Errors__fatal_with_file("can't open file of TeX macros", Macros); while (TRUE) { @@ -24647,7 +24766,7 @@ int TeX__render_visit(tree_node *N, void *state, int L) { { #line 154 "inweb/Chapter 5/TeX Format.w" weave_paragraph_heading_node *C = RETRIEVE_POINTER_weave_paragraph_heading_node(N->content); - TeX__paragraph_heading(trs->wv->format, OUT, trs->wv, C->para->under_section, C->para, TL_IS_408, 0, FALSE); + TeX__paragraph_heading(trs->wv->format, OUT, trs->wv, C->para->under_section, C->para, TL_IS_411, 0, FALSE); } #line 88 "inweb/Chapter 5/TeX Format.w" @@ -25032,23 +25151,23 @@ void TeX__paragraph_heading(weave_format *self, text_stream *OUT, weave_order *w { #line 456 "inweb/Chapter 5/TeX Format.w" switch (weight) { - case 0: TeX_macro = TL_IS_410; break; - case 1: TeX_macro = TL_IS_411; break; - case 2: TeX_macro = TL_IS_412; break; - default: TeX_macro = TL_IS_413; break; + case 0: TeX_macro = TL_IS_413; break; + case 1: TeX_macro = TL_IS_414; break; + case 2: TeX_macro = TL_IS_415; break; + default: TeX_macro = TL_IS_416; break; } if (wv->theme_match) { switch (weight) { - case 0: TeX_macro = TL_IS_414; break; - case 1: TeX_macro = TL_IS_415; break; - case 2: TeX_macro = TL_IS_416; break; - default: TeX_macro = TL_IS_417; break; + case 0: TeX_macro = TL_IS_417; break; + case 1: TeX_macro = TL_IS_418; break; + case 2: TeX_macro = TL_IS_419; break; + default: TeX_macro = TL_IS_420; break; } } if (no_skip) { switch (weight) { - case 0: TeX_macro = TL_IS_418; break; - case 1: TeX_macro = TL_IS_419; break; + case 0: TeX_macro = TL_IS_421; break; + case 1: TeX_macro = TL_IS_422; break; } } @@ -25465,7 +25584,7 @@ void TeX__remove_math_mode_range(OUTPUT_STREAM, text_stream *text, int from, int i++; while ((i < Str__len(text)) && (Characters__isalpha(Str__get_at(text, i)))) PUT_TO(macro, Str__get_at(text, i++)); - if (Str__eq(macro, TL_IS_420)) + if (Str__eq(macro, TL_IS_423)) { #line 987 "inweb/Chapter 5/TeX Format.w" if (Str__get_at(text, i) == '\\') { @@ -25473,8 +25592,8 @@ void TeX__remove_math_mode_range(OUTPUT_STREAM, text_stream *text, int from, int i++; while ((i < Str__len(text)) && (Characters__isalpha(Str__get_at(text, i)))) PUT_TO(macro, Str__get_at(text, i++)); - if (Str__eq(macro, TL_IS_516)) PUT((wchar_t) 0x2204); - else if (Str__eq(macro, TL_IS_517)) { PUT((wchar_t) 0x00AC); PUT((wchar_t) 0x2200); } + if (Str__eq(macro, TL_IS_519)) PUT((wchar_t) 0x2204); + else if (Str__eq(macro, TL_IS_520)) { PUT((wchar_t) 0x00AC); PUT((wchar_t) 0x2200); } else { PRINT("Don't know how to apply '\\not' to '\\%S'\n", macro); } @@ -25488,99 +25607,99 @@ void TeX__remove_math_mode_range(OUTPUT_STREAM, text_stream *text, int from, int else { #line 874 "inweb/Chapter 5/TeX Format.w" - if (Str__eq(macro, TL_IS_421)) WRITE("<="); - else if (Str__eq(macro, TL_IS_422)) WRITE(">="); - else if (Str__eq(macro, TL_IS_423)) WRITE("~"); - else if (Str__eq(macro, TL_IS_424)) WRITE(""); - else if (Str__eq(macro, TL_IS_425)) WRITE(""); - else if (Str__eq(macro, TL_IS_426)) WRITE(""); - else if (Str__eq(macro, TL_IS_427)) WRITE("=>"); - else if (Str__eq(macro, TL_IS_428)) WRITE("<=>"); - else if (Str__eq(macro, TL_IS_429)) WRITE("-->"); - else if (Str__eq(macro, TL_IS_430)) WRITE("-->"); - else if (Str__eq(macro, TL_IS_431)) WRITE("-->"); - else if (Str__eq(macro, TL_IS_432)) WRITE("<--"); - else if (Str__eq(macro, TL_IS_433)) WRITE("<--"); - else if (Str__eq(macro, TL_IS_434)) WRITE("{"); - else if (Str__eq(macro, TL_IS_435)) WRITE("|"); - else if (Str__eq(macro, TL_IS_436)) WRITE("}"); - else if (Str__eq(macro, TL_IS_437)) WRITE("."); - else if (Str__eq(macro, TL_IS_438)) WRITE("..."); - else if (Str__eq(macro, TL_IS_439)) WRITE("..."); - else if (Str__eq(macro, TL_IS_440)) WRITE("*"); - else if (Str__eq(macro, TL_IS_441)) WRITE(" "); - else if (Str__eq(macro, TL_IS_442)) WRITE(" "); - else if (Str__eq(macro, TL_IS_443)) WRITE("TeX"); - else if (Str__eq(macro, TL_IS_444)) WRITE("!="); - else if (Str__eq(macro, TL_IS_445)) WRITE("!="); - else if (Str__eq(macro, TL_IS_446)) WRITE("l"); - else if (Str__eq(macro, TL_IS_447)) WRITE("log"); - else if (Str__eq(macro, TL_IS_448)) WRITE("exp"); - else if (Str__eq(macro, TL_IS_449)) WRITE("sin"); - else if (Str__eq(macro, TL_IS_450)) WRITE("cos"); - else if (Str__eq(macro, TL_IS_451)) WRITE("tan"); - else if (Str__eq(macro, TL_IS_452)) WRITE("T"); - else if (Str__eq(macro, TL_IS_453)) PUT((wchar_t) 0x0391); - else if (Str__eq(macro, TL_IS_454)) PUT((wchar_t) 0x0392); - else if (Str__eq(macro, TL_IS_455)) PUT((wchar_t) 0x0393); - else if (Str__eq(macro, TL_IS_456)) PUT((wchar_t) 0x0394); - else if (Str__eq(macro, TL_IS_457)) PUT((wchar_t) 0x0395); - else if (Str__eq(macro, TL_IS_458)) PUT((wchar_t) 0x0396); - else if (Str__eq(macro, TL_IS_459)) PUT((wchar_t) 0x0397); - else if (Str__eq(macro, TL_IS_460)) PUT((wchar_t) 0x0398); - else if (Str__eq(macro, TL_IS_461)) PUT((wchar_t) 0x0399); - else if (Str__eq(macro, TL_IS_462)) PUT((wchar_t) 0x039A); - else if (Str__eq(macro, TL_IS_463)) PUT((wchar_t) 0x039B); - else if (Str__eq(macro, TL_IS_464)) PUT((wchar_t) 0x039C); - else if (Str__eq(macro, TL_IS_465)) PUT((wchar_t) 0x039D); - else if (Str__eq(macro, TL_IS_466)) PUT((wchar_t) 0x039E); - else if (Str__eq(macro, TL_IS_467)) PUT((wchar_t) 0x039F); - else if (Str__eq(macro, TL_IS_468)) PUT((wchar_t) 0x03A0); - else if (Str__eq(macro, TL_IS_469)) PUT((wchar_t) 0x03A1); - else if (Str__eq(macro, TL_IS_470)) PUT((wchar_t) 0x03A2); - else if (Str__eq(macro, TL_IS_471)) PUT((wchar_t) 0x03A3); - else if (Str__eq(macro, TL_IS_472)) PUT((wchar_t) 0x03A4); - else if (Str__eq(macro, TL_IS_473)) PUT((wchar_t) 0x03A5); - else if (Str__eq(macro, TL_IS_474)) PUT((wchar_t) 0x03A6); - else if (Str__eq(macro, TL_IS_475)) PUT((wchar_t) 0x03A7); - else if (Str__eq(macro, TL_IS_476)) PUT((wchar_t) 0x03A8); - else if (Str__eq(macro, TL_IS_477)) PUT((wchar_t) 0x03A9); - else if (Str__eq(macro, TL_IS_478)) PUT((wchar_t) 0x03B1); - else if (Str__eq(macro, TL_IS_479)) PUT((wchar_t) 0x03B2); - else if (Str__eq(macro, TL_IS_480)) PUT((wchar_t) 0x03B3); - else if (Str__eq(macro, TL_IS_481)) PUT((wchar_t) 0x03B4); - else if (Str__eq(macro, TL_IS_482)) PUT((wchar_t) 0x03B5); - else if (Str__eq(macro, TL_IS_483)) PUT((wchar_t) 0x03B6); - else if (Str__eq(macro, TL_IS_484)) PUT((wchar_t) 0x03B7); - else if (Str__eq(macro, TL_IS_485)) PUT((wchar_t) 0x03B8); - else if (Str__eq(macro, TL_IS_486)) PUT((wchar_t) 0x03B9); - else if (Str__eq(macro, TL_IS_487)) PUT((wchar_t) 0x03BA); - else if (Str__eq(macro, TL_IS_488)) PUT((wchar_t) 0x03BB); - else if (Str__eq(macro, TL_IS_489)) PUT((wchar_t) 0x03BC); - else if (Str__eq(macro, TL_IS_490)) PUT((wchar_t) 0x03BD); - else if (Str__eq(macro, TL_IS_491)) PUT((wchar_t) 0x03BE); - else if (Str__eq(macro, TL_IS_492)) PUT((wchar_t) 0x03BF); - else if (Str__eq(macro, TL_IS_493)) PUT((wchar_t) 0x03C0); - else if (Str__eq(macro, TL_IS_494)) PUT((wchar_t) 0x03C1); - else if (Str__eq(macro, TL_IS_495)) PUT((wchar_t) 0x03C2); - else if (Str__eq(macro, TL_IS_496)) PUT((wchar_t) 0x03C3); - else if (Str__eq(macro, TL_IS_497)) PUT((wchar_t) 0x03C4); - else if (Str__eq(macro, TL_IS_498)) PUT((wchar_t) 0x03C5); - else if (Str__eq(macro, TL_IS_499)) PUT((wchar_t) 0x03C6); - else if (Str__eq(macro, TL_IS_500)) PUT((wchar_t) 0x03C7); - else if (Str__eq(macro, TL_IS_501)) PUT((wchar_t) 0x03C8); - else if (Str__eq(macro, TL_IS_502)) PUT((wchar_t) 0x03C9); - else if (Str__eq(macro, TL_IS_503)) PUT((wchar_t) 0x2203); - else if (Str__eq(macro, TL_IS_504)) PUT((wchar_t) 0x2208); - else if (Str__eq(macro, TL_IS_505)) PUT((wchar_t) 0x2200); - else if (Str__eq(macro, TL_IS_506)) PUT((wchar_t) 0x2229); - else if (Str__eq(macro, TL_IS_507)) PUT((wchar_t) 0x2205); - else if (Str__eq(macro, TL_IS_508)) PUT((wchar_t) 0x2286); - else if (Str__eq(macro, TL_IS_509)) PUT((wchar_t) 0x2227); - else if (Str__eq(macro, TL_IS_510)) PUT((wchar_t) 0x2228); - else if (Str__eq(macro, TL_IS_511)) PUT((wchar_t) 0x00AC); - else if (Str__eq(macro, TL_IS_512)) PUT((wchar_t) 0x03A3); - else if (Str__eq(macro, TL_IS_513)) PUT((wchar_t) 0x03A0); + if (Str__eq(macro, TL_IS_424)) WRITE("<="); + else if (Str__eq(macro, TL_IS_425)) WRITE(">="); + else if (Str__eq(macro, TL_IS_426)) WRITE("~"); + else if (Str__eq(macro, TL_IS_427)) WRITE(""); + else if (Str__eq(macro, TL_IS_428)) WRITE(""); + else if (Str__eq(macro, TL_IS_429)) WRITE(""); + else if (Str__eq(macro, TL_IS_430)) WRITE("=>"); + else if (Str__eq(macro, TL_IS_431)) WRITE("<=>"); + else if (Str__eq(macro, TL_IS_432)) WRITE("-->"); + else if (Str__eq(macro, TL_IS_433)) WRITE("-->"); + else if (Str__eq(macro, TL_IS_434)) WRITE("-->"); + else if (Str__eq(macro, TL_IS_435)) WRITE("<--"); + else if (Str__eq(macro, TL_IS_436)) WRITE("<--"); + else if (Str__eq(macro, TL_IS_437)) WRITE("{"); + else if (Str__eq(macro, TL_IS_438)) WRITE("|"); + else if (Str__eq(macro, TL_IS_439)) WRITE("}"); + else if (Str__eq(macro, TL_IS_440)) WRITE("."); + else if (Str__eq(macro, TL_IS_441)) WRITE("..."); + else if (Str__eq(macro, TL_IS_442)) WRITE("..."); + else if (Str__eq(macro, TL_IS_443)) WRITE("*"); + else if (Str__eq(macro, TL_IS_444)) WRITE(" "); + else if (Str__eq(macro, TL_IS_445)) WRITE(" "); + else if (Str__eq(macro, TL_IS_446)) WRITE("TeX"); + else if (Str__eq(macro, TL_IS_447)) WRITE("!="); + else if (Str__eq(macro, TL_IS_448)) WRITE("!="); + else if (Str__eq(macro, TL_IS_449)) WRITE("l"); + else if (Str__eq(macro, TL_IS_450)) WRITE("log"); + else if (Str__eq(macro, TL_IS_451)) WRITE("exp"); + else if (Str__eq(macro, TL_IS_452)) WRITE("sin"); + else if (Str__eq(macro, TL_IS_453)) WRITE("cos"); + else if (Str__eq(macro, TL_IS_454)) WRITE("tan"); + else if (Str__eq(macro, TL_IS_455)) WRITE("T"); + else if (Str__eq(macro, TL_IS_456)) PUT((wchar_t) 0x0391); + else if (Str__eq(macro, TL_IS_457)) PUT((wchar_t) 0x0392); + else if (Str__eq(macro, TL_IS_458)) PUT((wchar_t) 0x0393); + else if (Str__eq(macro, TL_IS_459)) PUT((wchar_t) 0x0394); + else if (Str__eq(macro, TL_IS_460)) PUT((wchar_t) 0x0395); + else if (Str__eq(macro, TL_IS_461)) PUT((wchar_t) 0x0396); + else if (Str__eq(macro, TL_IS_462)) PUT((wchar_t) 0x0397); + else if (Str__eq(macro, TL_IS_463)) PUT((wchar_t) 0x0398); + else if (Str__eq(macro, TL_IS_464)) PUT((wchar_t) 0x0399); + else if (Str__eq(macro, TL_IS_465)) PUT((wchar_t) 0x039A); + else if (Str__eq(macro, TL_IS_466)) PUT((wchar_t) 0x039B); + else if (Str__eq(macro, TL_IS_467)) PUT((wchar_t) 0x039C); + else if (Str__eq(macro, TL_IS_468)) PUT((wchar_t) 0x039D); + else if (Str__eq(macro, TL_IS_469)) PUT((wchar_t) 0x039E); + else if (Str__eq(macro, TL_IS_470)) PUT((wchar_t) 0x039F); + else if (Str__eq(macro, TL_IS_471)) PUT((wchar_t) 0x03A0); + else if (Str__eq(macro, TL_IS_472)) PUT((wchar_t) 0x03A1); + else if (Str__eq(macro, TL_IS_473)) PUT((wchar_t) 0x03A2); + else if (Str__eq(macro, TL_IS_474)) PUT((wchar_t) 0x03A3); + else if (Str__eq(macro, TL_IS_475)) PUT((wchar_t) 0x03A4); + else if (Str__eq(macro, TL_IS_476)) PUT((wchar_t) 0x03A5); + else if (Str__eq(macro, TL_IS_477)) PUT((wchar_t) 0x03A6); + else if (Str__eq(macro, TL_IS_478)) PUT((wchar_t) 0x03A7); + else if (Str__eq(macro, TL_IS_479)) PUT((wchar_t) 0x03A8); + else if (Str__eq(macro, TL_IS_480)) PUT((wchar_t) 0x03A9); + else if (Str__eq(macro, TL_IS_481)) PUT((wchar_t) 0x03B1); + else if (Str__eq(macro, TL_IS_482)) PUT((wchar_t) 0x03B2); + else if (Str__eq(macro, TL_IS_483)) PUT((wchar_t) 0x03B3); + else if (Str__eq(macro, TL_IS_484)) PUT((wchar_t) 0x03B4); + else if (Str__eq(macro, TL_IS_485)) PUT((wchar_t) 0x03B5); + else if (Str__eq(macro, TL_IS_486)) PUT((wchar_t) 0x03B6); + else if (Str__eq(macro, TL_IS_487)) PUT((wchar_t) 0x03B7); + else if (Str__eq(macro, TL_IS_488)) PUT((wchar_t) 0x03B8); + else if (Str__eq(macro, TL_IS_489)) PUT((wchar_t) 0x03B9); + else if (Str__eq(macro, TL_IS_490)) PUT((wchar_t) 0x03BA); + else if (Str__eq(macro, TL_IS_491)) PUT((wchar_t) 0x03BB); + else if (Str__eq(macro, TL_IS_492)) PUT((wchar_t) 0x03BC); + else if (Str__eq(macro, TL_IS_493)) PUT((wchar_t) 0x03BD); + else if (Str__eq(macro, TL_IS_494)) PUT((wchar_t) 0x03BE); + else if (Str__eq(macro, TL_IS_495)) PUT((wchar_t) 0x03BF); + else if (Str__eq(macro, TL_IS_496)) PUT((wchar_t) 0x03C0); + else if (Str__eq(macro, TL_IS_497)) PUT((wchar_t) 0x03C1); + else if (Str__eq(macro, TL_IS_498)) PUT((wchar_t) 0x03C2); + else if (Str__eq(macro, TL_IS_499)) PUT((wchar_t) 0x03C3); + else if (Str__eq(macro, TL_IS_500)) PUT((wchar_t) 0x03C4); + else if (Str__eq(macro, TL_IS_501)) PUT((wchar_t) 0x03C5); + else if (Str__eq(macro, TL_IS_502)) PUT((wchar_t) 0x03C6); + else if (Str__eq(macro, TL_IS_503)) PUT((wchar_t) 0x03C7); + else if (Str__eq(macro, TL_IS_504)) PUT((wchar_t) 0x03C8); + else if (Str__eq(macro, TL_IS_505)) PUT((wchar_t) 0x03C9); + else if (Str__eq(macro, TL_IS_506)) PUT((wchar_t) 0x2203); + else if (Str__eq(macro, TL_IS_507)) PUT((wchar_t) 0x2208); + else if (Str__eq(macro, TL_IS_508)) PUT((wchar_t) 0x2200); + else if (Str__eq(macro, TL_IS_509)) PUT((wchar_t) 0x2229); + else if (Str__eq(macro, TL_IS_510)) PUT((wchar_t) 0x2205); + else if (Str__eq(macro, TL_IS_511)) PUT((wchar_t) 0x2286); + else if (Str__eq(macro, TL_IS_512)) PUT((wchar_t) 0x2227); + else if (Str__eq(macro, TL_IS_513)) PUT((wchar_t) 0x2228); + else if (Str__eq(macro, TL_IS_514)) PUT((wchar_t) 0x00AC); + else if (Str__eq(macro, TL_IS_515)) PUT((wchar_t) 0x03A3); + else if (Str__eq(macro, TL_IS_516)) PUT((wchar_t) 0x03A0); else { if (Str__len(macro) > 0) { int suspect = TRUE; @@ -25590,8 +25709,8 @@ void TeX__remove_math_mode_range(OUTPUT_STREAM, text_stream *text, int from, int if ((c >= 'a') && (c <= 'z')) continue; suspect = FALSE; } - if (Str__eq(macro, TL_IS_514)) suspect = FALSE; - if (Str__eq(macro, TL_IS_515)) suspect = FALSE; + if (Str__eq(macro, TL_IS_517)) suspect = FALSE; + if (Str__eq(macro, TL_IS_518)) suspect = FALSE; if (suspect) PRINT("[Passing through unknown TeX macro \\%S:\n %S\n", macro, text); } @@ -25617,7 +25736,7 @@ void HTMLFormat__create(void) { { #line 12 "inweb/Chapter 5/HTML Formats.w" - weave_format *wf = Formats__create_weave_format(TL_IS_518, TL_IS_519); + weave_format *wf = Formats__create_weave_format(TL_IS_521, TL_IS_522); METHOD_ADD(wf, RENDER_FOR_MTID, HTMLFormat__render); } @@ -25626,7 +25745,7 @@ void HTMLFormat__create(void) { { #line 16 "inweb/Chapter 5/HTML Formats.w" - weave_format *wf = Formats__create_weave_format(TL_IS_520, TL_IS_521); + weave_format *wf = Formats__create_weave_format(TL_IS_523, TL_IS_524); METHOD_ADD(wf, RENDER_FOR_MTID, HTMLFormat__render_EPUB); METHOD_ADD(wf, BEGIN_WEAVING_FOR_MTID, HTMLFormat__begin_weaving_EPUB); METHOD_ADD(wf, END_WEAVING_FOR_MTID, HTMLFormat__end_weaving_EPUB); @@ -25704,7 +25823,7 @@ void HTMLFormat__render_EPUB(weave_format *self, text_stream *OUT, heterogeneous HTMLFormat__render_inner(self, OUT, tree, TRUE); } -#line 118 "inweb/Chapter 5/HTML Formats.w" +#line 119 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__render_inner(weave_format *self, text_stream *OUT, heterogeneous_tree *tree, int EPUB_mode) { TEMPORARY_TEXT(interior); @@ -25715,20 +25834,21 @@ void HTMLFormat__render_inner(weave_format *self, text_stream *OUT, heterogeneou hrs.EPUB_flag = EPUB_mode; hrs.popup_counter = 1; hrs.last_material_seen = -1; + hrs.carousel_number = 1; hrs.slide_number = -1; hrs.slide_of = -1; - Swarm__ensure_plugin(C->wv, TL_IS_522); - hrs.colours = Swarm__ensure_colour_scheme(C->wv, TL_IS_523, TL_IS_524); + Swarm__ensure_plugin(C->wv, TL_IS_525); + hrs.colours = Swarm__ensure_colour_scheme(C->wv, TL_IS_526, TL_IS_527); Trees__traverse_from(tree->root, &HTMLFormat__render_visit, (void *) &hrs, 0); HTML__declare_as_HTML(OUT, EPUB_mode); if (EPUB_mode) - Epub__note_page(C->wv->weave_web->as_ebook, C->wv->weave_to, C->wv->booklet_title, TL_IS_525); - Indexer__cover_sheet_maker(OUT, C->wv->weave_web, TL_IS_526, C->wv, WEAVE_FIRST_HALF); + Epub__note_page(C->wv->weave_web->as_ebook, C->wv->weave_to, C->wv->booklet_title, TL_IS_528); + Indexer__cover_sheet_maker(OUT, C->wv->weave_web, TL_IS_529, C->wv, WEAVE_FIRST_HALF); WRITE("%S", interior); HTML__completed(OUT); - Bibliographic__set_datum(C->wv->weave_web->md, TL_IS_527, C->wv->booklet_title); - Indexer__cover_sheet_maker(OUT, C->wv->weave_web, TL_IS_528, C->wv, WEAVE_SECOND_HALF); + Bibliographic__set_datum(C->wv->weave_web->md, TL_IS_530, C->wv->booklet_title); + Indexer__cover_sheet_maker(OUT, C->wv->weave_web, TL_IS_531, C->wv, WEAVE_SECOND_HALF); DISCARD_TEXT(interior); } @@ -25738,78 +25858,78 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { text_stream *OUT = hrs->OUT; if (N->type == weave_document_node_type) { -#line 575 "inweb/Chapter 5/HTML Formats.w" - ; - -} -#line 149 "inweb/Chapter 5/HTML Formats.w" - - else if (N->type == weave_head_node_type) -{ -#line 196 "inweb/Chapter 5/HTML Formats.w" - weave_head_node *C = RETRIEVE_POINTER_weave_head_node(N->content); - HTML__comment(OUT, C->banner); - html_in_para = HTML_OUT; - -} -#line 150 "inweb/Chapter 5/HTML Formats.w" - - else if (N->type == weave_body_node_type) -{ -#line 575 "inweb/Chapter 5/HTML Formats.w" +#line 614 "inweb/Chapter 5/HTML Formats.w" ; } #line 151 "inweb/Chapter 5/HTML Formats.w" - else if (N->type == weave_tail_node_type) + else if (N->type == weave_head_node_type) { -#line 230 "inweb/Chapter 5/HTML Formats.w" - weave_tail_node *C = RETRIEVE_POINTER_weave_tail_node(N->content); - HTML__comment(OUT, C->rennab); +#line 198 "inweb/Chapter 5/HTML Formats.w" + weave_head_node *C = RETRIEVE_POINTER_weave_head_node(N->content); + HTML__comment(OUT, C->banner); + html_in_para = HTML_OUT; } #line 152 "inweb/Chapter 5/HTML Formats.w" - else if (N->type == weave_verbatim_node_type) + else if (N->type == weave_body_node_type) { -#line 536 "inweb/Chapter 5/HTML Formats.w" - weave_verbatim_node *C = RETRIEVE_POINTER_weave_verbatim_node(N->content); - WRITE("%S", C->content); +#line 614 "inweb/Chapter 5/HTML Formats.w" + ; } #line 153 "inweb/Chapter 5/HTML Formats.w" - else if (N->type == weave_chapter_header_node_type) + else if (N->type == weave_tail_node_type) { -#line 575 "inweb/Chapter 5/HTML Formats.w" - ; +#line 232 "inweb/Chapter 5/HTML Formats.w" + weave_tail_node *C = RETRIEVE_POINTER_weave_tail_node(N->content); + HTML__comment(OUT, C->rennab); } #line 154 "inweb/Chapter 5/HTML Formats.w" - else if (N->type == weave_chapter_footer_node_type) + else if (N->type == weave_verbatim_node_type) { #line 575 "inweb/Chapter 5/HTML Formats.w" - ; + weave_verbatim_node *C = RETRIEVE_POINTER_weave_verbatim_node(N->content); + WRITE("%S", C->content); } #line 155 "inweb/Chapter 5/HTML Formats.w" + else if (N->type == weave_chapter_header_node_type) +{ +#line 614 "inweb/Chapter 5/HTML Formats.w" + ; + +} +#line 156 "inweb/Chapter 5/HTML Formats.w" + + else if (N->type == weave_chapter_footer_node_type) +{ +#line 614 "inweb/Chapter 5/HTML Formats.w" + ; + +} +#line 157 "inweb/Chapter 5/HTML Formats.w" + else if (N->type == weave_section_header_node_type) { -#line 201 "inweb/Chapter 5/HTML Formats.w" +#line 203 "inweb/Chapter 5/HTML Formats.w" weave_section_header_node *C = RETRIEVE_POINTER_weave_section_header_node(N->content); - Swarm__ensure_plugin(hrs->wv, TL_IS_529); + Swarm__ensure_plugin(hrs->wv, TL_IS_532); HTML_OPEN_WITH("ul", "class=\"crumbs\""); Colonies__drop_initial_breadcrumbs(OUT, hrs->wv->weave_to, hrs->wv->breadcrumbs); - text_stream *bct = Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_530); - if (Str__len(Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_531)) > 0) { - bct = Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_532); + text_stream *bct = Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_533); + if (Str__len(Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_534)) > 0) { + bct = Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_535); } if (hrs->wv->self_contained == FALSE) { - Colonies__write_breadcrumb(OUT, bct, TL_IS_533); + Colonies__write_breadcrumb(OUT, bct, TL_IS_536); if (hrs->wv->weave_web->md->chaptered) { TEMPORARY_TEXT(chapter_link); WRITE_TO(chapter_link, "index.html#%s%S", (hrs->wv->weave_web->as_ebook)?"C":"", @@ -25824,55 +25944,55 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { HTML_CLOSE("ul"); } -#line 156 "inweb/Chapter 5/HTML Formats.w" +#line 158 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_section_footer_node_type) { -#line 226 "inweb/Chapter 5/HTML Formats.w" +#line 228 "inweb/Chapter 5/HTML Formats.w" weave_section_footer_node *C = RETRIEVE_POINTER_weave_section_footer_node(N->content); HTMLFormat__tail(hrs->wv->format, OUT, hrs->wv, C->sect); } -#line 157 "inweb/Chapter 5/HTML Formats.w" +#line 159 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_section_purpose_node_type) { -#line 234 "inweb/Chapter 5/HTML Formats.w" +#line 236 "inweb/Chapter 5/HTML Formats.w" weave_section_purpose_node *C = RETRIEVE_POINTER_weave_section_purpose_node(N->content); HTMLFormat__subheading(hrs->wv->format, OUT, hrs->wv, 2, C->purpose, NULL); } -#line 158 "inweb/Chapter 5/HTML Formats.w" +#line 160 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_subheading_node_type) { -#line 238 "inweb/Chapter 5/HTML Formats.w" +#line 240 "inweb/Chapter 5/HTML Formats.w" weave_subheading_node *C = RETRIEVE_POINTER_weave_subheading_node(N->content); HTMLFormat__subheading(hrs->wv->format, OUT, hrs->wv, 1, C->text, NULL); } -#line 159 "inweb/Chapter 5/HTML Formats.w" +#line 161 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_bar_node_type) { -#line 242 "inweb/Chapter 5/HTML Formats.w" +#line 244 "inweb/Chapter 5/HTML Formats.w" HTMLFormat__exit_current_paragraph(OUT); HTML__hr(OUT, NULL); } -#line 160 "inweb/Chapter 5/HTML Formats.w" +#line 162 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_pagebreak_node_type) { -#line 246 "inweb/Chapter 5/HTML Formats.w" +#line 248 "inweb/Chapter 5/HTML Formats.w" ; } -#line 161 "inweb/Chapter 5/HTML Formats.w" +#line 163 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_paragraph_heading_node_type) { -#line 249 "inweb/Chapter 5/HTML Formats.w" +#line 251 "inweb/Chapter 5/HTML Formats.w" weave_paragraph_heading_node *C = RETRIEVE_POINTER_weave_paragraph_heading_node(N->content); paragraph *P = C->para; HTMLFormat__exit_current_paragraph(OUT); @@ -25889,11 +26009,11 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { HTML_CLOSE("b"); } -#line 162 "inweb/Chapter 5/HTML Formats.w" +#line 164 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_endnote_node_type) { -#line 265 "inweb/Chapter 5/HTML Formats.w" +#line 267 "inweb/Chapter 5/HTML Formats.w" HTML_OPEN("li"); for (tree_node *M = N->child; M; M = M->next) Trees__traverse_from(M, &HTMLFormat__render_visit, (void *) hrs, L+1); @@ -25901,20 +26021,29 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { return FALSE; } -#line 163 "inweb/Chapter 5/HTML Formats.w" +#line 165 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_figure_node_type) { -#line 272 "inweb/Chapter 5/HTML Formats.w" +#line 274 "inweb/Chapter 5/HTML Formats.w" weave_figure_node *C = RETRIEVE_POINTER_weave_figure_node(N->content); - HTMLFormat__figure(hrs->wv->format, OUT, hrs->wv, C->figname, C->w, C->h); + HTMLFormat__exit_current_paragraph(OUT); + filename *F = Filenames__in( + Pathnames__down(hrs->wv->weave_web->md->path_to_web, TL_IS_537), + C->figname); + filename *RF = Filenames__from_text(C->figname); + HTML_OPEN("center"); + HTML__image_to_dimensions(OUT, RF, C->w, C->h); + Patterns__copy_file_into_weave(hrs->wv->weave_web, F, NULL, NULL); + HTML_CLOSE("center"); + WRITE("\n"); } -#line 164 "inweb/Chapter 5/HTML Formats.w" +#line 166 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_material_node_type) { -#line 276 "inweb/Chapter 5/HTML Formats.w" +#line 287 "inweb/Chapter 5/HTML Formats.w" if (N->child) { int first_in_para = FALSE; if (N == N->parent->child) first_in_para = TRUE; @@ -25992,29 +26121,29 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { return FALSE; } -#line 165 "inweb/Chapter 5/HTML Formats.w" +#line 167 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_embed_node_type) { -#line 357 "inweb/Chapter 5/HTML Formats.w" +#line 368 "inweb/Chapter 5/HTML Formats.w" weave_embed_node *C = RETRIEVE_POINTER_weave_embed_node(N->content); - HTMLFormat__embed(hrs->wv->format, OUT, hrs->wv, C->service, C->ID); + HTMLFormat__embed(hrs->wv->format, OUT, hrs->wv, C->service, C->ID, C->w, C->h); } -#line 166 "inweb/Chapter 5/HTML Formats.w" +#line 168 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_pmac_node_type) { -#line 361 "inweb/Chapter 5/HTML Formats.w" +#line 372 "inweb/Chapter 5/HTML Formats.w" weave_pmac_node *C = RETRIEVE_POINTER_weave_pmac_node(N->content); HTMLFormat__para_macro(hrs->wv->format, OUT, hrs->wv, C->pmac, C->defn); } -#line 167 "inweb/Chapter 5/HTML Formats.w" +#line 169 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_vskip_node_type) { -#line 365 "inweb/Chapter 5/HTML Formats.w" +#line 376 "inweb/Chapter 5/HTML Formats.w" weave_vskip_node *C = RETRIEVE_POINTER_weave_vskip_node(N->content); if (C->in_comment) { HTMLFormat__exit_current_paragraph(OUT); @@ -26024,73 +26153,84 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { } } -#line 168 "inweb/Chapter 5/HTML Formats.w" +#line 170 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_apres_defn_node_type) { -#line 575 "inweb/Chapter 5/HTML Formats.w" +#line 614 "inweb/Chapter 5/HTML Formats.w" ; -} -#line 169 "inweb/Chapter 5/HTML Formats.w" - - else if (N->type == weave_chapter_node_type) -{ -#line 575 "inweb/Chapter 5/HTML Formats.w" - ; - -} -#line 170 "inweb/Chapter 5/HTML Formats.w" - - else if (N->type == weave_section_node_type) -{ -#line 374 "inweb/Chapter 5/HTML Formats.w" - weave_section_node *C = RETRIEVE_POINTER_weave_section_node(N->content); - LOG("It was %d\n", C->allocation_id); - } #line 171 "inweb/Chapter 5/HTML Formats.w" + else if (N->type == weave_chapter_node_type) +{ +#line 614 "inweb/Chapter 5/HTML Formats.w" + ; + +} +#line 172 "inweb/Chapter 5/HTML Formats.w" + + else if (N->type == weave_section_node_type) +{ +#line 385 "inweb/Chapter 5/HTML Formats.w" + weave_section_node *C = RETRIEVE_POINTER_weave_section_node(N->content); + LOG("It was %d\n", C->allocation_id); + +} +#line 173 "inweb/Chapter 5/HTML Formats.w" + else if (N->type == weave_code_line_node_type) { -#line 378 "inweb/Chapter 5/HTML Formats.w" +#line 389 "inweb/Chapter 5/HTML Formats.w" for (tree_node *M = N->child; M; M = M->next) Trees__traverse_from(M, &HTMLFormat__render_visit, (void *) hrs, L+1); WRITE("\n"); return FALSE; } -#line 172 "inweb/Chapter 5/HTML Formats.w" +#line 174 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_function_usage_node_type) { -#line 384 "inweb/Chapter 5/HTML Formats.w" +#line 395 "inweb/Chapter 5/HTML Formats.w" weave_function_usage_node *C = RETRIEVE_POINTER_weave_function_usage_node(N->content); - HTML__begin_link_with_class(OUT, TL_IS_534, C->url); + HTML__begin_link_with_class(OUT, TL_IS_538, C->url); HTMLFormat__change_colour(NULL, OUT, hrs->wv, FUNCTION_COLOUR, FALSE, hrs->colours); WRITE("%S", C->fn->function_name); WRITE("
    "); HTML__end_link(OUT); } -#line 173 "inweb/Chapter 5/HTML Formats.w" +#line 175 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_commentary_node_type) { -#line 392 "inweb/Chapter 5/HTML Formats.w" +#line 403 "inweb/Chapter 5/HTML Formats.w" weave_commentary_node *C = RETRIEVE_POINTER_weave_commentary_node(N->content); if (C->in_code) HTML_OPEN_WITH("span", "class=\"comment\""); HTMLFormat__commentary_text(hrs->wv->format, OUT, hrs->wv, C->text); if (C->in_code) HTML_CLOSE("span"); } -#line 174 "inweb/Chapter 5/HTML Formats.w" +#line 176 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_carousel_slide_node_type) { -#line 398 "inweb/Chapter 5/HTML Formats.w" +#line 409 "inweb/Chapter 5/HTML Formats.w" weave_carousel_slide_node *C = RETRIEVE_POINTER_weave_carousel_slide_node(N->content); - Swarm__ensure_plugin(hrs->wv, TL_IS_535); + Swarm__ensure_plugin(hrs->wv, TL_IS_539); + TEMPORARY_TEXT(carousel_id) + TEMPORARY_TEXT(carousel_dots_id) + text_stream *caption_class = NULL; + text_stream *slide_count_class = TL_IS_540; + switch (C->caption_command) { + case CAROUSEL_CMD: caption_class = TL_IS_541; break; + case CAROUSEL_ABOVE_CMD: caption_class = TL_IS_542; slide_count_class = TL_IS_543; break; + case CAROUSEL_BELOW_CMD: caption_class = TL_IS_544; slide_count_class = TL_IS_545; break; + } + WRITE_TO(carousel_id, "carousel-no-%d", hrs->carousel_number); + WRITE_TO(carousel_dots_id, "carousel-dots-no-%d", hrs->carousel_number); if (hrs->slide_number == -1) { hrs->slide_number = 1; hrs->slide_of = 0; @@ -26100,37 +26240,66 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { if (hrs->slide_number > hrs->slide_of) internal_error("miscounted slides"); } if (hrs->slide_number == 1) { - WRITE("
    \n"); + WRITE("\n"); - WRITE("
    \n"); + WRITE("
    \n", carousel_dots_id); for (int i=1; i<=hrs->slide_of; i++) { if (i == 1) - WRITE("\n"); + WRITE("\n", carousel_id, carousel_dots_id); else - WRITE("\n", i); + WRITE("\n", carousel_id, carousel_dots_id, i-1); } WRITE("
    \n"); hrs->slide_number = -1; hrs->slide_of = -1; + hrs->carousel_number++; } + DISCARD_TEXT(carousel_id) + DISCARD_TEXT(carousel_dots_id) return FALSE; } -#line 175 "inweb/Chapter 5/HTML Formats.w" +#line 177 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_toc_node_type) { -#line 435 "inweb/Chapter 5/HTML Formats.w" +#line 474 "inweb/Chapter 5/HTML Formats.w" HTMLFormat__exit_current_paragraph(OUT); HTML_OPEN_WITH("ul", "class=\"toc\""); for (tree_node *M = N->child; M; M = M->next) { @@ -26144,11 +26313,11 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { return FALSE; } -#line 176 "inweb/Chapter 5/HTML Formats.w" +#line 178 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_toc_line_node_type) { -#line 448 "inweb/Chapter 5/HTML Formats.w" +#line 487 "inweb/Chapter 5/HTML Formats.w" weave_toc_line_node *C = RETRIEVE_POINTER_weave_toc_line_node(N->content); TEMPORARY_TEXT(TEMP) Colonies__paragraph_URL(TEMP, C->para, hrs->wv->weave_to); @@ -26160,20 +26329,20 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { HTML__end_link(OUT); } -#line 177 "inweb/Chapter 5/HTML Formats.w" +#line 179 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_chapter_title_page_node_type) { -#line 459 "inweb/Chapter 5/HTML Formats.w" +#line 498 "inweb/Chapter 5/HTML Formats.w" weave_chapter_title_page_node *C = RETRIEVE_POINTER_weave_chapter_title_page_node(N->content); LOG("It was %d\n", C->allocation_id); } -#line 178 "inweb/Chapter 5/HTML Formats.w" +#line 180 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_defn_node_type) { -#line 463 "inweb/Chapter 5/HTML Formats.w" +#line 502 "inweb/Chapter 5/HTML Formats.w" weave_defn_node *C = RETRIEVE_POINTER_weave_defn_node(N->content); HTML_OPEN_WITH("span", "class=\"definition-keyword\""); WRITE("%S", C->keyword); @@ -26181,11 +26350,11 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { WRITE(" "); } -#line 179 "inweb/Chapter 5/HTML Formats.w" +#line 181 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_source_code_node_type) { -#line 470 "inweb/Chapter 5/HTML Formats.w" +#line 509 "inweb/Chapter 5/HTML Formats.w" weave_source_code_node *C = RETRIEVE_POINTER_weave_source_code_node(N->content); int starts = FALSE; if (N == N->parent->child) starts = TRUE; @@ -26193,40 +26362,40 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { C->matter, C->colouring, hrs->colours); } -#line 180 "inweb/Chapter 5/HTML Formats.w" +#line 182 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_url_node_type) { -#line 477 "inweb/Chapter 5/HTML Formats.w" +#line 516 "inweb/Chapter 5/HTML Formats.w" weave_url_node *C = RETRIEVE_POINTER_weave_url_node(N->content); - HTML__begin_link_with_class(OUT, (C->external)?TL_IS_536:TL_IS_537, C->url); + HTML__begin_link_with_class(OUT, (C->external)?TL_IS_546:TL_IS_547, C->url); WRITE("%S", C->content); HTML__end_link(OUT); } -#line 181 "inweb/Chapter 5/HTML Formats.w" +#line 183 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_footnote_cue_node_type) { -#line 483 "inweb/Chapter 5/HTML Formats.w" +#line 522 "inweb/Chapter 5/HTML Formats.w" weave_footnote_cue_node *C = RETRIEVE_POINTER_weave_footnote_cue_node(N->content); text_stream *fn_plugin_name = - Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_538); - if (Str__ne_insensitive(fn_plugin_name, TL_IS_539)) + Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_548); + if (Str__ne_insensitive(fn_plugin_name, TL_IS_549)) Swarm__ensure_plugin(hrs->wv, fn_plugin_name); WRITE("%S", C->cue_text, C->cue_text, C->cue_text); } -#line 182 "inweb/Chapter 5/HTML Formats.w" +#line 184 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_begin_footnote_text_node_type) { -#line 492 "inweb/Chapter 5/HTML Formats.w" +#line 531 "inweb/Chapter 5/HTML Formats.w" weave_begin_footnote_text_node *C = RETRIEVE_POINTER_weave_begin_footnote_text_node(N->content); text_stream *fn_plugin_name = - Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_540); - if (Str__ne_insensitive(fn_plugin_name, TL_IS_541)) + Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_550); + if (Str__ne_insensitive(fn_plugin_name, TL_IS_551)) Swarm__ensure_plugin(hrs->wv, fn_plugin_name); WRITE("
  • ", C->cue_text); for (tree_node *M = N->child; M; M = M->next) @@ -26235,11 +26404,11 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { return FALSE; } -#line 183 "inweb/Chapter 5/HTML Formats.w" +#line 185 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_display_line_node_type) { -#line 504 "inweb/Chapter 5/HTML Formats.w" +#line 543 "inweb/Chapter 5/HTML Formats.w" weave_display_line_node *C = RETRIEVE_POINTER_weave_display_line_node(N->content); HTMLFormat__exit_current_paragraph(OUT); HTML_OPEN("blockquote"); WRITE("\n"); INDENT; @@ -26249,13 +26418,13 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { OUTDENT; HTML_CLOSE("blockquote"); WRITE("\n"); } -#line 184 "inweb/Chapter 5/HTML Formats.w" +#line 186 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_function_defn_node_type) { -#line 513 "inweb/Chapter 5/HTML Formats.w" +#line 552 "inweb/Chapter 5/HTML Formats.w" weave_function_defn_node *C = RETRIEVE_POINTER_weave_function_defn_node(N->content); - Swarm__ensure_plugin(hrs->wv, TL_IS_542); + Swarm__ensure_plugin(hrs->wv, TL_IS_552); HTMLFormat__change_colour(NULL, OUT, hrs->wv, FUNCTION_COLOUR, FALSE, hrs->colours); WRITE("%S", C->fn->function_name); WRITE(""); @@ -26271,30 +26440,30 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { return FALSE; } -#line 185 "inweb/Chapter 5/HTML Formats.w" +#line 187 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_item_node_type) { -#line 530 "inweb/Chapter 5/HTML Formats.w" +#line 569 "inweb/Chapter 5/HTML Formats.w" weave_item_node *C = RETRIEVE_POINTER_weave_item_node(N->content); HTMLFormat__go_to_depth(OUT, C->depth); if (Str__len(C->label) > 0) WRITE("(%S) ", C->label); else WRITE(" "); } -#line 186 "inweb/Chapter 5/HTML Formats.w" +#line 188 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_grammar_index_node_type) { -#line 575 "inweb/Chapter 5/HTML Formats.w" +#line 614 "inweb/Chapter 5/HTML Formats.w" ; } -#line 187 "inweb/Chapter 5/HTML Formats.w" +#line 189 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_inline_node_type) { -#line 540 "inweb/Chapter 5/HTML Formats.w" +#line 579 "inweb/Chapter 5/HTML Formats.w" HTML_OPEN_WITH("code", "class=\"display\""); for (tree_node *M = N->child; M; M = M->next) Trees__traverse_from(M, &HTMLFormat__render_visit, (void *) hrs, L+1); @@ -26302,11 +26471,11 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { return FALSE; } -#line 188 "inweb/Chapter 5/HTML Formats.w" +#line 190 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_locale_node_type) { -#line 547 "inweb/Chapter 5/HTML Formats.w" +#line 586 "inweb/Chapter 5/HTML Formats.w" weave_locale_node *C = RETRIEVE_POINTER_weave_locale_node(N->content); TEMPORARY_TEXT(TEMP) Colonies__paragraph_URL(TEMP, C->par1, hrs->wv->weave_to); @@ -26319,15 +26488,15 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { HTML__end_link(OUT); } -#line 189 "inweb/Chapter 5/HTML Formats.w" +#line 191 "inweb/Chapter 5/HTML Formats.w" else if (N->type == weave_maths_node_type) { -#line 559 "inweb/Chapter 5/HTML Formats.w" +#line 598 "inweb/Chapter 5/HTML Formats.w" weave_maths_node *C = RETRIEVE_POINTER_weave_maths_node(N->content); text_stream *plugin_name = - Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_543); - if (Str__eq_insensitive(plugin_name, TL_IS_544)) { + Bibliographic__get_datum(hrs->wv->weave_web->md, TL_IS_553); + if (Str__eq_insensitive(plugin_name, TL_IS_554)) { TEMPORARY_TEXT(R); TeX__remove_math_mode(R, C->content); HTMLFormat__escape_text(OUT, R); @@ -26340,13 +26509,13 @@ int HTMLFormat__render_visit(tree_node *N, void *state, int L) { } } -#line 190 "inweb/Chapter 5/HTML Formats.w" +#line 192 "inweb/Chapter 5/HTML Formats.w" else internal_error("unable to render unknown node"); return TRUE; } -#line 578 "inweb/Chapter 5/HTML Formats.w" +#line 617 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__subheading(weave_format *self, text_stream *OUT, weave_order *wv, int level, text_stream *comment, text_stream *head) { HTMLFormat__exit_current_paragraph(OUT); @@ -26361,7 +26530,7 @@ void HTMLFormat__subheading(weave_format *self, text_stream *OUT, weave_order *w } } -#line 593 "inweb/Chapter 5/HTML Formats.w" +#line 632 "inweb/Chapter 5/HTML Formats.w" section *page_section = NULL; void HTMLFormat__paragraph_heading(weave_format *self, text_stream *OUT, @@ -26384,14 +26553,14 @@ void HTMLFormat__paragraph_heading(weave_format *self, text_stream *OUT, HTML_CLOSE("b"); } -#line 616 "inweb/Chapter 5/HTML Formats.w" +#line 655 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__source_code(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *matter, text_stream *colouring, colour_scheme *cs) { int current_colour = -1, colour_wanted = PLAIN_COLOUR; for (int i=0; i < Str__len(matter); i++) { colour_wanted = Str__get_at(colouring, i); { -#line 631 "inweb/Chapter 5/HTML Formats.w" +#line 670 "inweb/Chapter 5/HTML Formats.w" if (colour_wanted != current_colour) { if (current_colour >= 0) HTML_CLOSE("span"); HTMLFormat__change_colour(NULL, OUT, wv, colour_wanted, TRUE, cs); @@ -26399,7 +26568,7 @@ void HTMLFormat__source_code(weave_format *self, text_stream *OUT, weave_order * } } -#line 620 "inweb/Chapter 5/HTML Formats.w" +#line 659 "inweb/Chapter 5/HTML Formats.w" ; if (Str__get_at(matter, i) == '<') WRITE("<"); else if (Str__get_at(matter, i) == '>') WRITE(">"); @@ -26410,57 +26579,33 @@ void HTMLFormat__source_code(weave_format *self, text_stream *OUT, weave_order * current_colour = -1; } -#line 638 "inweb/Chapter 5/HTML Formats.w" -void HTMLFormat__figure(weave_format *self, text_stream *OUT, weave_order *wv, - text_stream *figname, int w, int h) { - HTMLFormat__exit_current_paragraph(OUT); - filename *F = Filenames__in( - Pathnames__down(wv->weave_web->md->path_to_web, TL_IS_545), - figname); - filename *RF = Filenames__from_text(figname); - HTML_OPEN("center"); - HTML__image(OUT, RF); - Patterns__copy_file_into_weave(wv->weave_web, F, NULL, NULL); - HTML_CLOSE("center"); - WRITE("\n"); -} - -#line 653 "inweb/Chapter 5/HTML Formats.w" +#line 677 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__embed(weave_format *self, text_stream *OUT, weave_order *wv, - text_stream *service, text_stream *ID) { - text_stream *CH = TL_IS_546; - text_stream *CW = TL_IS_547; - match_results mr = Regexp__create_mr(); - if (Regexp__match(&mr, ID, L"(%c+) at (%c+) by (%c+)")) { - CW = Str__duplicate(mr.exp[1]); - CH = Str__duplicate(mr.exp[2]); - ID = mr.exp[0]; - } else if (Regexp__match(&mr, ID, L"(%c+) at (%c+)")) { - CH = Str__duplicate(mr.exp[1]); - ID = mr.exp[0]; - } + text_stream *service, text_stream *ID, int w, int h) { + text_stream *CH = TL_IS_555; + text_stream *CW = TL_IS_556; + if (w > 0) { Str__clear(CW); WRITE_TO(CW, "%d", w); } + if (h > 0) { Str__clear(CH); WRITE_TO(CH, "%d", h); } HTMLFormat__exit_current_paragraph(OUT); TEMPORARY_TEXT(embed_leaf); WRITE_TO(embed_leaf, "%S.html", service); - filename *F = Patterns__find_asset(wv->pattern, TL_IS_548, embed_leaf); + filename *F = Patterns__find_asset(wv->pattern, TL_IS_557, embed_leaf); DISCARD_TEXT(embed_leaf); if (F == NULL) { - Main__error_in_web(TL_IS_549, wv->current_weave_line); + Main__error_in_web(TL_IS_558, wv->current_weave_line); return; } - - Bibliographic__set_datum(wv->weave_web->md, TL_IS_550, ID); - Bibliographic__set_datum(wv->weave_web->md, TL_IS_551, CW); - Bibliographic__set_datum(wv->weave_web->md, TL_IS_552, CH); + Bibliographic__set_datum(wv->weave_web->md, TL_IS_559, ID); + Bibliographic__set_datum(wv->weave_web->md, TL_IS_560, CW); + Bibliographic__set_datum(wv->weave_web->md, TL_IS_561, CH); HTML_OPEN("center"); Indexer__incorporate_template_for_web_and_pattern(OUT, wv->weave_web, wv->pattern, F); HTML_CLOSE("center"); WRITE("\n"); - Regexp__dispose_of(&mr); } -#line 688 "inweb/Chapter 5/HTML Formats.w" +#line 703 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__para_macro(weave_format *self, text_stream *OUT, weave_order *wv, para_macro *pmac, int defn) { paragraph *P = pmac->defining_paragraph; @@ -26475,7 +26620,7 @@ void HTMLFormat__para_macro(weave_format *self, text_stream *OUT, weave_order *w WRITE(">%s", (defn)?" =":""); } -#line 703 "inweb/Chapter 5/HTML Formats.w" +#line 718 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__change_colour(weave_format *self, text_stream *OUT, weave_order *wv, int col, int in_code, colour_scheme *cs) { char *cl = "plain"; @@ -26496,7 +26641,7 @@ void HTMLFormat__change_colour(weave_format *self, text_stream *OUT, weave_order HTML_OPEN_WITH("span", "class=\"%S%s\"", cs->prefix, cl); } -#line 724 "inweb/Chapter 5/HTML Formats.w" +#line 739 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__commentary_text(weave_format *self, text_stream *OUT, weave_order *wv, text_stream *id) { for (int i=0; i < Str__len(id); i++) { @@ -26525,7 +26670,7 @@ void HTMLFormat__escape_text(text_stream *OUT, text_stream *id) { } } -#line 753 "inweb/Chapter 5/HTML Formats.w" +#line 768 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__locale(weave_format *self, text_stream *OUT, weave_order *wv, paragraph *par1, paragraph *par2) { TEMPORARY_TEXT(TEMP) @@ -26539,7 +26684,7 @@ void HTMLFormat__locale(weave_format *self, text_stream *OUT, weave_order *wv, HTML__end_link(OUT); } -#line 767 "inweb/Chapter 5/HTML Formats.w" +#line 782 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__tail(weave_format *self, text_stream *OUT, weave_order *wv, section *this_S) { HTMLFormat__exit_current_paragraph(OUT); chapter *C = this_S->owning_chapter; @@ -26579,12 +26724,12 @@ void HTMLFormat__tail(weave_format *self, text_stream *OUT, weave_order *wv, sec } } -#line 809 "inweb/Chapter 5/HTML Formats.w" +#line 824 "inweb/Chapter 5/HTML Formats.w" int HTMLFormat__begin_weaving_EPUB(weave_format *wf, web *W, weave_pattern *pattern) { TEMPORARY_TEXT(T) - WRITE_TO(T, "%S", Bibliographic__get_datum(W->md, TL_IS_553)); + WRITE_TO(T, "%S", Bibliographic__get_datum(W->md, TL_IS_562)); W->as_ebook = Epub__new(T, "P"); - filename *CSS = Patterns__find_asset(pattern, TL_IS_554, TL_IS_555); + filename *CSS = Patterns__find_asset(pattern, TL_IS_563, TL_IS_564); Epub__use_CSS_throughout(W->as_ebook, CSS); Epub__attach_metadata(W->as_ebook, L"identifier", T); DISCARD_TEXT(T) @@ -26601,7 +26746,7 @@ void HTMLFormat__end_weaving_EPUB(weave_format *wf, web *W, weave_pattern *patte #line 9 "inweb/Chapter 5/Debugging Format.w" void Debugging__create(void) { - weave_format *wf = Formats__create_weave_format(TL_IS_556, TL_IS_557); + weave_format *wf = Formats__create_weave_format(TL_IS_565, TL_IS_566); METHOD_ADD(wf, RENDER_FOR_MTID, Debugging__render); } @@ -26777,7 +26922,7 @@ int Debugging__render_visit(tree_node *N, void *state, int L) { { #line 152 "inweb/Chapter 5/Debugging Format.w" weave_embed_node *C = RETRIEVE_POINTER_weave_embed_node(N->content); - WRITE(" service <%S> ID <%S>", C->service, C->ID); + WRITE(" service <%S> ID <%S> %d by %d", C->service, C->ID, C->w, C->h); } #line 53 "inweb/Chapter 5/Debugging Format.w" @@ -27064,8 +27209,8 @@ colour_scheme *WeavePlugins__find_colour_scheme(weave_pattern *pattern, return cs; TEMPORARY_TEXT(css); WRITE_TO(css, "%S.css", name); - filename *F = Patterns__find_asset(pattern, TL_IS_558, css); - if (F == NULL) F = Patterns__find_asset(pattern, TL_IS_559, css); + filename *F = Patterns__find_asset(pattern, TL_IS_567, css); + if (F == NULL) F = Patterns__find_asset(pattern, TL_IS_568, css); DISCARD_TEXT(css); if (F == NULL) return NULL; cs = CREATE(colour_scheme); @@ -27089,7 +27234,7 @@ void WeavePlugins__include_plugin(OUTPUT_STREAM, web *W, weave_plugin *wp, wp->last_included_in_round = current_inclusion_round; pathname *AP = Colonies__assets_path(); int html_mode = FALSE; - if (Str__eq(pattern->pattern_format->format_name, TL_IS_560)) html_mode = TRUE; + if (Str__eq(pattern->pattern_format->format_name, TL_IS_569)) html_mode = TRUE; int finds = 0; TEMPORARY_TEXT(required); WRITE_TO(required, "%S.html", wp->plugin_name); @@ -27116,14 +27261,14 @@ void WeavePlugins__include_plugin(OUTPUT_STREAM, web *W, weave_plugin *wp, if (html_mode) { TEMPORARY_TEXT(ext); Filenames__write_extension(ext, F); - if (Str__eq_insensitive(ext, TL_IS_561)) { + if (Str__eq_insensitive(ext, TL_IS_570)) { TEMPORARY_TEXT(url); if (AP) Pathnames__relative_URL(url, Filenames__up(from), AP); WRITE_TO(url, "%S", leafname); WRITE("\n", url); DISCARD_TEXT(url); } - if (Str__eq_insensitive(ext, TL_IS_562)) { + if (Str__eq_insensitive(ext, TL_IS_571)) { TEMPORARY_TEXT(url); if (AP) Pathnames__relative_URL(url, Filenames__up(from), AP); WRITE_TO(url, "%S", leafname); @@ -27154,12 +27299,12 @@ void WeavePlugins__include_colour_scheme(OUTPUT_STREAM, web *W, colour_scheme *c weave_pattern *pattern, filename *from) { if (cs->last_included_in_round == current_inclusion_round) return; cs->last_included_in_round = current_inclusion_round; - if (Str__eq(pattern->pattern_format->format_name, TL_IS_563)) { + if (Str__eq(pattern->pattern_format->format_name, TL_IS_572)) { pathname *AP = Colonies__assets_path(); TEMPORARY_TEXT(css); WRITE_TO(css, "%S.css", cs->scheme_name); - filename *F = Patterns__find_asset(pattern, TL_IS_564, css); - if (F == NULL) F = Patterns__find_asset(pattern, TL_IS_565, css); + filename *F = Patterns__find_asset(pattern, TL_IS_573, css); + if (F == NULL) F = Patterns__find_asset(pattern, TL_IS_574, css); if (F == NULL) { TEMPORARY_TEXT(err); WRITE_TO(err, "No CSS file for the colour scheme '%S' can be found", @@ -27460,7 +27605,7 @@ void Makefiles__scan_makefile_line(text_stream *line, text_file_position *tfp, v { #line 139 "inweb/Chapter 6/Makefiles.w" WRITE("%S", mr.exp[0]); - Makefiles__repeat(OUT, TL_IS_566, FALSE, mr.exp[1], FALSE, NULL, tfp, MS, marker, TL_IS_567); + Makefiles__repeat(OUT, TL_IS_575, FALSE, mr.exp[1], FALSE, NULL, tfp, MS, marker, TL_IS_576); WRITE("%S\n", mr.exp[2]); MS->last_line_was_blank = FALSE; Regexp__dispose_of(&mr); @@ -27482,7 +27627,7 @@ void Makefiles__scan_makefile_line(text_stream *line, text_file_position *tfp, v { #line 139 "inweb/Chapter 6/Makefiles.w" WRITE("%S", mr.exp[0]); - Makefiles__repeat(OUT, TL_IS_566, FALSE, mr.exp[1], FALSE, NULL, tfp, MS, marker, TL_IS_567); + Makefiles__repeat(OUT, TL_IS_575, FALSE, mr.exp[1], FALSE, NULL, tfp, MS, marker, TL_IS_576); WRITE("%S\n", mr.exp[2]); MS->last_line_was_blank = FALSE; Regexp__dispose_of(&mr); @@ -27504,7 +27649,7 @@ void Makefiles__scan_makefile_line(text_stream *line, text_file_position *tfp, v { #line 139 "inweb/Chapter 6/Makefiles.w" WRITE("%S", mr.exp[0]); - Makefiles__repeat(OUT, TL_IS_566, FALSE, mr.exp[1], FALSE, NULL, tfp, MS, marker, TL_IS_567); + Makefiles__repeat(OUT, TL_IS_575, FALSE, mr.exp[1], FALSE, NULL, tfp, MS, marker, TL_IS_576); WRITE("%S\n", mr.exp[2]); MS->last_line_was_blank = FALSE; Regexp__dispose_of(&mr); @@ -27522,7 +27667,7 @@ void Makefiles__scan_makefile_line(text_stream *line, text_file_position *tfp, v { #line 156 "inweb/Chapter 6/Makefiles.w" WRITE("INWEB = "); Makefiles__pathname_slashed(OUT, path_to_inweb); WRITE("/Tangled/inweb\n"); - pathname *path_to_intest = Pathnames__down(Pathnames__up(path_to_inweb), TL_IS_569); + pathname *path_to_intest = Pathnames__down(Pathnames__up(path_to_inweb), TL_IS_578); WRITE("INTEST = "); Makefiles__pathname_slashed(OUT, path_to_intest); WRITE("/Tangled/intest\n"); if (MS->for_web) { WRITE("MYNAME = %S\n", Pathnames__directory_name(MS->for_web->md->path_to_web)); @@ -27539,7 +27684,7 @@ void Makefiles__scan_makefile_line(text_stream *line, text_file_position *tfp, v if (Regexp__match(&mr, line, L" *{platform-settings} *")) { #line 147 "inweb/Chapter 6/Makefiles.w" - filename *prototype = Filenames__in(path_to_inweb, TL_IS_568); + filename *prototype = Filenames__in(path_to_inweb, TL_IS_577); MS->allow_commands = FALSE; TextFiles__read(prototype, FALSE, "can't open make settings file", TRUE, Makefiles__scan_makefile_line, NULL, MS); @@ -27826,7 +27971,7 @@ void Makefiles__repeat(OUTPUT_STREAM, text_stream *prefix, int every_time, text_ int c = 0; LOOP_OVER(M, module) { if ((M->origin_marker == over) && - ((Str__eq(tag, TL_IS_570)) || (Str__eq(tag, M->module_tag)))) { + ((Str__eq(tag, TL_IS_579)) || (Str__eq(tag, M->module_tag)))) { if ((prefix) && ((c++ > 0) || (every_time))) WRITE("%S", prefix); if (matter) { TEMPORARY_TEXT(line); @@ -27880,7 +28025,7 @@ void Git__copy_gitignore_line(text_stream *line, text_file_position *tfp, void * { #line 44 "inweb/Chapter 6/Git Support.w" filename *prototype = - Filenames__in(path_to_inweb_materials, TL_IS_571); + Filenames__in(path_to_inweb_materials, TL_IS_580); TextFiles__read(prototype, FALSE, "can't open make settings file", TRUE, Git__copy_gitignore_line, NULL, MS); Regexp__dispose_of(&mr); @@ -27914,11 +28059,11 @@ void Readme__write(filename *from, filename *to) { write_state ws; ws.current_definition = NULL; ws.known_macros = NEW_LINKED_LIST(macro); - macro *V = Readme__new_macro(TL_IS_572, NULL, NULL); + macro *V = Readme__new_macro(TL_IS_581, NULL, NULL); ADD_TO_LINKED_LIST(V, macro, ws.known_macros); - macro *P = Readme__new_macro(TL_IS_573, NULL, NULL); + macro *P = Readme__new_macro(TL_IS_582, NULL, NULL); ADD_TO_LINKED_LIST(P, macro, ws.known_macros); - macro *A = Readme__new_macro(TL_IS_574, NULL, NULL); + macro *A = Readme__new_macro(TL_IS_583, NULL, NULL); ADD_TO_LINKED_LIST(A, macro, ws.known_macros); ws.stack_frame = NULL; text_stream file_to; @@ -27954,7 +28099,7 @@ void Readme__write_helper(text_stream *text, text_file_position *tfp, void *stat } } else { Readme__expand_material(ws, OUT, text, tfp); - Readme__expand_material(ws, OUT, TL_IS_575, tfp); + Readme__expand_material(ws, OUT, TL_IS_584, tfp); } Regexp__dispose_of(&mr); } @@ -28085,7 +28230,7 @@ void Readme__expand_at(write_state *ws, text_stream *OUT, text_stream *macro_nam #line 204 "inweb/Chapter 6/Readme Writeme.w" void Readme__expand_macro(write_state *ws, text_stream *OUT, macro *M, text_file_position *tfp) { - if (Str__eq(M->name, TL_IS_576)) + if (Str__eq(M->name, TL_IS_585)) { #line 215 "inweb/Chapter 6/Readme Writeme.w" if (ws->stack_frame->no_pars != 1) @@ -28093,14 +28238,14 @@ void Readme__expand_macro(write_state *ws, text_stream *OUT, macro *M, text_file else { TEMPORARY_TEXT(program); Readme__expand_material(ws, program, ws->stack_frame->pars[0], tfp); - Readme__write_var(OUT, program, TL_IS_579); + Readme__write_var(OUT, program, TL_IS_588); DISCARD_TEXT(program); } } #line 205 "inweb/Chapter 6/Readme Writeme.w" - else if (Str__eq(M->name, TL_IS_577)) + else if (Str__eq(M->name, TL_IS_586)) { #line 225 "inweb/Chapter 6/Readme Writeme.w" if (ws->stack_frame->no_pars != 1) @@ -28108,14 +28253,14 @@ void Readme__expand_macro(write_state *ws, text_stream *OUT, macro *M, text_file else { TEMPORARY_TEXT(program); Readme__expand_material(ws, program, ws->stack_frame->pars[0], tfp); - Readme__write_var(OUT, program, TL_IS_580); + Readme__write_var(OUT, program, TL_IS_589); DISCARD_TEXT(program); } } #line 206 "inweb/Chapter 6/Readme Writeme.w" - else if (Str__eq(M->name, TL_IS_578)) + else if (Str__eq(M->name, TL_IS_587)) { #line 235 "inweb/Chapter 6/Readme Writeme.w" if (ws->stack_frame->no_pars != 2) @@ -28144,8 +28289,8 @@ void Readme__expand_macro(write_state *ws, text_stream *OUT, macro *M, text_file void Readme__write_var(text_stream *OUT, text_stream *program, text_stream *datum) { writeme_asset *A = Readme__find_asset(program); if (A->if_web) WRITE("%S", Bibliographic__get_datum(A->if_web, datum)); - else if (Str__eq(datum, TL_IS_581)) WRITE("%S", A->date); - else if (Str__eq(datum, TL_IS_582)) WRITE("%S", A->version); + else if (Str__eq(datum, TL_IS_590)) WRITE("%S", A->date); + else if (Str__eq(datum, TL_IS_591)) WRITE("%S", A->version); } #line 273 "inweb/Chapter 6/Readme Writeme.w" @@ -28176,7 +28321,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { A->if_web = WebMetadata__get_without_modules(Pathnames__from_text(program), NULL); } else { filename *I6_vn = Filenames__in( - Pathnames__down(Pathnames__from_text(program), TL_IS_583), TL_IS_584); + Pathnames__down(Pathnames__from_text(program), TL_IS_592), TL_IS_593); if (TextFiles__exists(I6_vn)) { #line 310 "inweb/Chapter 6/Readme Writeme.w" @@ -28186,7 +28331,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { } #line 295 "inweb/Chapter 6/Readme Writeme.w" ; - filename *template_vn = Filenames__in(Pathnames__from_text(program), TL_IS_585); + filename *template_vn = Filenames__in(Pathnames__from_text(program), TL_IS_594); if (TextFiles__exists(template_vn)) { #line 314 "inweb/Chapter 6/Readme Writeme.w" @@ -28196,7 +28341,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { } #line 297 "inweb/Chapter 6/Readme Writeme.w" ; - filename *rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_586); + filename *rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_595); if (TextFiles__exists(rmt_vn)) { #line 318 "inweb/Chapter 6/Readme Writeme.w" @@ -28206,7 +28351,7 @@ writeme_asset *Readme__find_asset(text_stream *program) { } #line 299 "inweb/Chapter 6/Readme Writeme.w" ; - rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_587); + rmt_vn = Filenames__in(Pathnames__from_text(program), TL_IS_596); if (TextFiles__exists(rmt_vn)) { #line 318 "inweb/Chapter 6/Readme Writeme.w" @@ -28281,7 +28426,7 @@ void Readme__readme_harvester(text_stream *text, text_file_position *tfp, void * void Colonies__load(filename *F) { colony *C = CREATE(colony); C->members = NEW_LINKED_LIST(colony_member); - C->home = TL_IS_588; + C->home = TL_IS_597; C->assets_path = NULL; C->patterns_path = NULL; colony_reader_state crs; @@ -28305,8 +28450,8 @@ void Colonies__read_line(text_stream *line, text_file_position *tfp, void *v_crs match_results mr = Regexp__create_mr(); if (Regexp__match(&mr, line, L"(%c*?): \"*(%C+)\" at \"(%c*)\" in \"(%c*)\"")) { colony_member *CM = CREATE(colony_member); - if (Str__eq(mr.exp[0], TL_IS_589)) CM->web_rather_than_module = TRUE; - else if (Str__eq(mr.exp[0], TL_IS_590)) CM->web_rather_than_module = FALSE; + if (Str__eq(mr.exp[0], TL_IS_598)) CM->web_rather_than_module = TRUE; + else if (Str__eq(mr.exp[0], TL_IS_599)) CM->web_rather_than_module = FALSE; else { CM->web_rather_than_module = FALSE; Errors__in_text_file("text before ':' must be 'web' or 'module'", tfp); @@ -28314,7 +28459,7 @@ void Colonies__read_line(text_stream *line, text_file_position *tfp, void *v_crs CM->name = Str__duplicate(mr.exp[1]); CM->path = Str__duplicate(mr.exp[2]); CM->home_leaf = Str__new(); - if (Str__suffix_eq(CM->path, TL_IS_591, 6)) { + if (Str__suffix_eq(CM->path, TL_IS_600, 6)) { filename *F = Filenames__from_text(CM->path); Filenames__write_unextended_leafname(CM->home_leaf, F); WRITE_TO(CM->home_leaf, ".html"); @@ -28454,7 +28599,7 @@ module *Colonies__as_module(colony_member *CM, source_line *L, web_md *Wm) { #line 254 "inweb/Chapter 6/Colonies.w" filename *F = NULL; pathname *P = NULL; - if (Str__suffix_eq(CM->path, TL_IS_592, 6)) + if (Str__suffix_eq(CM->path, TL_IS_601, 6)) F = Filenames__from_text(CM->path); else P = Pathnames__from_text(CM->path); @@ -28481,7 +28626,7 @@ text_stream *Colonies__home(void) { colony *C; LOOP_OVER(C, colony) return C->home; - return TL_IS_593; + return TL_IS_602; } pathname *Colonies__assets_path(void) { @@ -28640,7 +28785,7 @@ int Colonies__resolve_reference_in_weave_inner(text_stream *url, text_stream *ti DISCARD_TEXT(err); return FALSE; } else if (N > 1) { - Main__error_in_web(TL_IS_594, L); + Main__error_in_web(TL_IS_603, L); WebModules__named_reference(&found_M, &found_Sm, &bare_module_name, title, search_M, text, TRUE); return FALSE; @@ -28723,7 +28868,7 @@ void Colonies__paragraph_URL(OUTPUT_STREAM, paragraph *P, filename *from) { if (P == NULL) internal_error("no para"); section *to_S = P->under_section; module *to_M = to_S->md->owning_module; - if (Str__ne(to_M->module_name, TL_IS_595)) { + if (Str__ne(to_M->module_name, TL_IS_604)) { colony_member *to_C = Colonies__find(to_M->module_name); if (to_C) { pathname *from_path = Filenames__up(from); @@ -28917,435 +29062,444 @@ void register_tangled_text_literals(void) { TL_IS_162 = Str__literal(L"Figures"); TL_IS_163 = Str__literal(L"Carousels"); TL_IS_164 = Str__literal(L"Carousels"); - TL_IS_165 = Str__literal(L"Videos"); - TL_IS_166 = Str__literal(L"unknown bracketed annotation"); - TL_IS_167 = Str__literal(L"unknown material after '='"); - TL_IS_168 = Str__literal(L"undisplayed"); - TL_IS_169 = Str__literal(L"hyperlinked"); - TL_IS_170 = Str__literal(L"only 'undisplayed' and/or 'hyperlinked' can precede 'text' here"); - TL_IS_171 = Str__literal(L"="); - TL_IS_172 = Str__literal(L"don't understand @command"); - TL_IS_173 = Str__literal(L"Purpose used after bar"); - TL_IS_174 = Str__literal(L"Interface used after bar"); - TL_IS_175 = Str__literal(L"Definitions used after bar"); - TL_IS_176 = Str__literal(L"second bar in the same section"); - TL_IS_177 = Str__literal(L"enumeration constants can't supply a value"); - TL_IS_178 = Str__literal(L"P"); - TL_IS_179 = Str__literal(L"S"); - TL_IS_180 = Str__literal(L"Footnote Begins Notation"); - TL_IS_181 = Str__literal(L"Footnote Ends Notation"); - TL_IS_182 = Str__literal(L"Off"); - TL_IS_183 = Str__literal(L"ifdef-"); - TL_IS_184 = Str__literal(L"ifndef-"); - TL_IS_185 = Str__literal(L"."); - TL_IS_186 = Str__literal(L"This paragraph is used only if "); - TL_IS_187 = Str__literal(L" and if "); - TL_IS_188 = Str__literal(L" and "); - TL_IS_189 = Str__literal(L" is"); - TL_IS_190 = Str__literal(L" are"); - TL_IS_191 = Str__literal(L" defined"); - TL_IS_192 = Str__literal(L" undefined"); - TL_IS_193 = Str__literal(L"enumeration constants must belong to a _FAMILY"); - TL_IS_194 = Str__literal(L"this enumeration _FAMILY is unknown"); - TL_IS_195 = Str__literal(L"this enumeration _FAMILY already exists"); - TL_IS_196 = Str__literal(L"unrecognised interface line"); - TL_IS_197 = Str__literal(L"makescript.txt"); - TL_IS_198 = Str__literal(L"makescript.txt"); - TL_IS_199 = Str__literal(L"gitignorescript.txt"); - TL_IS_200 = Str__literal(L"gitignorescript.txt"); - TL_IS_201 = Str__literal(L"cover-sheet"); - TL_IS_202 = Str__literal(L""); - TL_IS_203 = Str__literal(L"index.html"); - TL_IS_204 = Str__literal(L"Purpose"); - TL_IS_205 = Str__literal(L"End of weave"); - TL_IS_206 = Str__literal(L"Booklet Title"); - TL_IS_207 = Str__literal(L"Booklet Title"); - TL_IS_208 = Str__literal(L"Definitions"); - TL_IS_209 = Str__literal(L"bad start to paragraph"); - TL_IS_210 = Str__literal(L""); - TL_IS_211 = Str__literal(L""); - TL_IS_212 = Str__literal(L"footnote never cued"); - TL_IS_213 = Str__literal(L"define"); - TL_IS_214 = Str__literal(L"enum"); - TL_IS_215 = Str__literal(L"This code is "); - TL_IS_216 = Str__literal(L"never used"); - TL_IS_217 = Str__literal(L", "); - TL_IS_218 = Str__literal(L" and "); - TL_IS_219 = Str__literal(L"used in "); - TL_IS_220 = Str__literal(L" (twice)"); - TL_IS_221 = Str__literal(L" (three times)"); - TL_IS_222 = Str__literal(L" (four times)"); - TL_IS_223 = Str__literal(L" (five times)"); - TL_IS_224 = Str__literal(L"."); - TL_IS_225 = Str__literal(L"The structure "); - TL_IS_226 = Str__literal(L" is private to this section"); - TL_IS_227 = Str__literal(L" is accessed in "); - TL_IS_228 = Str__literal(L", "); - TL_IS_229 = Str__literal(L" and here"); - TL_IS_230 = Str__literal(L"."); - TL_IS_231 = Str__literal(L"The function "); - TL_IS_232 = Str__literal(L" appears nowhere else"); - TL_IS_233 = Str__literal(L"none"); - TL_IS_234 = Str__literal(L")"); - TL_IS_235 = Str__literal(L"."); - TL_IS_236 = Str__literal(L" is used in "); - TL_IS_237 = Str__literal(L"), "); - TL_IS_238 = Str__literal(L", "); - TL_IS_239 = Str__literal(L"
    "); - TL_IS_240 = Str__literal(L", "); - TL_IS_241 = Str__literal(L" ("); - TL_IS_242 = Str__literal(L" - "); + TL_IS_165 = Str__literal(L"Carousels"); + TL_IS_166 = Str__literal(L"Carousels"); + TL_IS_167 = Str__literal(L"Carousels"); + TL_IS_168 = Str__literal(L"Videos"); + TL_IS_169 = Str__literal(L"unknown bracketed annotation"); + TL_IS_170 = Str__literal(L"unknown material after '='"); + TL_IS_171 = Str__literal(L"undisplayed"); + TL_IS_172 = Str__literal(L"hyperlinked"); + TL_IS_173 = Str__literal(L"only 'undisplayed' and/or 'hyperlinked' can precede 'text' here"); + TL_IS_174 = Str__literal(L"="); + TL_IS_175 = Str__literal(L"don't understand @command"); + TL_IS_176 = Str__literal(L"Purpose used after bar"); + TL_IS_177 = Str__literal(L"Interface used after bar"); + TL_IS_178 = Str__literal(L"Definitions used after bar"); + TL_IS_179 = Str__literal(L"second bar in the same section"); + TL_IS_180 = Str__literal(L"enumeration constants can't supply a value"); + TL_IS_181 = Str__literal(L"P"); + TL_IS_182 = Str__literal(L"S"); + TL_IS_183 = Str__literal(L"Footnote Begins Notation"); + TL_IS_184 = Str__literal(L"Footnote Ends Notation"); + TL_IS_185 = Str__literal(L"Off"); + TL_IS_186 = Str__literal(L"ifdef-"); + TL_IS_187 = Str__literal(L"ifndef-"); + TL_IS_188 = Str__literal(L"."); + TL_IS_189 = Str__literal(L"This paragraph is used only if "); + TL_IS_190 = Str__literal(L" and if "); + TL_IS_191 = Str__literal(L" and "); + TL_IS_192 = Str__literal(L" is"); + TL_IS_193 = Str__literal(L" are"); + TL_IS_194 = Str__literal(L" defined"); + TL_IS_195 = Str__literal(L" undefined"); + TL_IS_196 = Str__literal(L"enumeration constants must belong to a _FAMILY"); + TL_IS_197 = Str__literal(L"this enumeration _FAMILY is unknown"); + TL_IS_198 = Str__literal(L"this enumeration _FAMILY already exists"); + TL_IS_199 = Str__literal(L"unrecognised interface line"); + TL_IS_200 = Str__literal(L"makescript.txt"); + TL_IS_201 = Str__literal(L"makescript.txt"); + TL_IS_202 = Str__literal(L"gitignorescript.txt"); + TL_IS_203 = Str__literal(L"gitignorescript.txt"); + TL_IS_204 = Str__literal(L"cover-sheet"); + TL_IS_205 = Str__literal(L""); + TL_IS_206 = Str__literal(L"index.html"); + TL_IS_207 = Str__literal(L"Purpose"); + TL_IS_208 = Str__literal(L"End of weave"); + TL_IS_209 = Str__literal(L"Booklet Title"); + TL_IS_210 = Str__literal(L"Booklet Title"); + TL_IS_211 = Str__literal(L"Definitions"); + TL_IS_212 = Str__literal(L"bad start to paragraph"); + TL_IS_213 = Str__literal(L""); + TL_IS_214 = Str__literal(L""); + TL_IS_215 = Str__literal(L"footnote never cued"); + TL_IS_216 = Str__literal(L"define"); + TL_IS_217 = Str__literal(L"enum"); + TL_IS_218 = Str__literal(L"This code is "); + TL_IS_219 = Str__literal(L"never used"); + TL_IS_220 = Str__literal(L", "); + TL_IS_221 = Str__literal(L" and "); + TL_IS_222 = Str__literal(L"used in "); + TL_IS_223 = Str__literal(L" (twice)"); + TL_IS_224 = Str__literal(L" (three times)"); + TL_IS_225 = Str__literal(L" (four times)"); + TL_IS_226 = Str__literal(L" (five times)"); + TL_IS_227 = Str__literal(L"."); + TL_IS_228 = Str__literal(L"The structure "); + TL_IS_229 = Str__literal(L" is private to this section"); + TL_IS_230 = Str__literal(L" is accessed in "); + TL_IS_231 = Str__literal(L", "); + TL_IS_232 = Str__literal(L" and here"); + TL_IS_233 = Str__literal(L"."); + TL_IS_234 = Str__literal(L"The function "); + TL_IS_235 = Str__literal(L" appears nowhere else"); + TL_IS_236 = Str__literal(L"none"); + TL_IS_237 = Str__literal(L")"); + TL_IS_238 = Str__literal(L"."); + TL_IS_239 = Str__literal(L" is used in "); + TL_IS_240 = Str__literal(L"), "); + TL_IS_241 = Str__literal(L", "); + TL_IS_242 = Str__literal(L"
    "); TL_IS_243 = Str__literal(L", "); - TL_IS_244 = Str__literal(L"Code In Code Comments Notation"); - TL_IS_245 = Str__literal(L"Code In Commentary Notation"); - TL_IS_246 = Str__literal(L"Off"); - TL_IS_247 = Str__literal(L"TeX Mathematics Displayed Notation"); - TL_IS_248 = Str__literal(L"Off"); - TL_IS_249 = Str__literal(L"TeX Mathematics Notation"); - TL_IS_250 = Str__literal(L"Off"); - TL_IS_251 = Str__literal(L"Cross-References Notation"); - TL_IS_252 = Str__literal(L"Off"); - TL_IS_253 = Str__literal(L"http://"); - TL_IS_254 = Str__literal(L"https://"); - TL_IS_255 = Str__literal(L"this is a cue for a missing note"); - TL_IS_256 = Str__literal(L"Cross-References Notation"); - TL_IS_257 = Str__literal(L"Off"); - TL_IS_258 = Str__literal(L"http://"); - TL_IS_259 = Str__literal(L"https://"); - TL_IS_260 = Str__literal(L"misplaced definition"); - TL_IS_261 = Str__literal(L"unknown macro"); - TL_IS_262 = Str__literal(L"Dialects"); - TL_IS_263 = Str__literal(L"C"); - TL_IS_264 = Str__literal(L"Languages"); - TL_IS_265 = Str__literal(L"InC"); - TL_IS_266 = Str__literal(L"Name"); - TL_IS_267 = Str__literal(L"Details"); - TL_IS_268 = Str__literal(L"Extension"); - TL_IS_269 = Str__literal(L"Line Comment"); - TL_IS_270 = Str__literal(L"Whole Line Comment"); - TL_IS_271 = Str__literal(L"Multiline Comment Open"); - TL_IS_272 = Str__literal(L"Multiline Comment Close"); - TL_IS_273 = Str__literal(L"String Literal"); - TL_IS_274 = Str__literal(L"String Literal Escape"); - TL_IS_275 = Str__literal(L"Character Literal"); - TL_IS_276 = Str__literal(L"Character Literal Escape"); - TL_IS_277 = Str__literal(L"Binary Literal Prefix"); - TL_IS_278 = Str__literal(L"Octal Literal Prefix"); - TL_IS_279 = Str__literal(L"Hexadecimal Literal Prefix"); - TL_IS_280 = Str__literal(L"Negative Literal Prefix"); - TL_IS_281 = Str__literal(L"Shebang"); - TL_IS_282 = Str__literal(L"Line Marker"); - TL_IS_283 = Str__literal(L"Before Named Paragraph Expansion"); - TL_IS_284 = Str__literal(L"After Named Paragraph Expansion"); - TL_IS_285 = Str__literal(L"Start Definition"); - TL_IS_286 = Str__literal(L"Prolong Definition"); - TL_IS_287 = Str__literal(L"End Definition"); - TL_IS_288 = Str__literal(L"Start Ifdef"); - TL_IS_289 = Str__literal(L"Start Ifndef"); - TL_IS_290 = Str__literal(L"End Ifdef"); - TL_IS_291 = Str__literal(L"End Ifndef"); - TL_IS_292 = Str__literal(L"C-Like"); - TL_IS_293 = Str__literal(L"Suppress Disclaimer"); - TL_IS_294 = Str__literal(L"Supports Namespaces"); - TL_IS_295 = Str__literal(L"Function Declaration Notation"); - TL_IS_296 = Str__literal(L"Type Declaration Notation"); - TL_IS_297 = Str__literal(L"}"); - TL_IS_298 = Str__literal(L"unquoted"); - TL_IS_299 = Str__literal(L"{"); - TL_IS_300 = Str__literal(L"debug"); - TL_IS_301 = Str__literal(L"!string"); - TL_IS_302 = Str__literal(L"!function"); - TL_IS_303 = Str__literal(L"!definition"); - TL_IS_304 = Str__literal(L"!reserved"); - TL_IS_305 = Str__literal(L"!element"); - TL_IS_306 = Str__literal(L"!identifier"); - TL_IS_307 = Str__literal(L"!character"); - TL_IS_308 = Str__literal(L"!constant"); - TL_IS_309 = Str__literal(L"!plain"); - TL_IS_310 = Str__literal(L"!extract"); - TL_IS_311 = Str__literal(L"!comment"); - TL_IS_312 = Str__literal(L"true"); - TL_IS_313 = Str__literal(L"false"); - TL_IS_314 = Str__literal(L"both"); - TL_IS_315 = Str__literal(L"brackets"); - TL_IS_316 = Str__literal(L"characters"); - TL_IS_317 = Str__literal(L"coloured"); - TL_IS_318 = Str__literal(L"colouring"); - TL_IS_319 = Str__literal(L"debug"); - TL_IS_320 = Str__literal(L"false"); - TL_IS_321 = Str__literal(L"in"); - TL_IS_322 = Str__literal(L"instances"); - TL_IS_323 = Str__literal(L"keyword"); - TL_IS_324 = Str__literal(L"matches"); - TL_IS_325 = Str__literal(L"matching"); - TL_IS_326 = Str__literal(L"not"); - TL_IS_327 = Str__literal(L"of"); - TL_IS_328 = Str__literal(L"on"); - TL_IS_329 = Str__literal(L"optionally"); - TL_IS_330 = Str__literal(L"prefix"); - TL_IS_331 = Str__literal(L"runs"); - TL_IS_332 = Str__literal(L"spaced"); - TL_IS_333 = Str__literal(L"suffix"); - TL_IS_334 = Str__literal(L"true"); - TL_IS_335 = Str__literal(L"unquoted"); - TL_IS_336 = Str__literal(L"Structures"); - TL_IS_337 = Str__literal(L"Main::"); - TL_IS_338 = Str__literal(L"Tangled output generated by inweb: do not edit"); - TL_IS_339 = Str__literal(L"this programming language does not support @d"); - TL_IS_340 = Str__literal(L"this programming language does not support multiline @d"); - TL_IS_341 = Str__literal(L"Namespaces"); - TL_IS_342 = Str__literal(L"Being internally called, this function mustn't belong to a :: namespace"); - TL_IS_343 = Str__literal(L"Being externally called, this function must belong to a :: namespace"); - TL_IS_344 = Str__literal(L"Structures"); - TL_IS_345 = Str__literal(L"program ended with conditional compilation open"); - TL_IS_346 = Str__literal(L"conditional compilation too deeply nested"); - TL_IS_347 = Str__literal(L"found #endif without #ifdef or #ifndef"); - TL_IS_348 = Str__literal(L"quartz"); - TL_IS_349 = Str__literal(L"quartz"); - TL_IS_350 = Str__literal(L"quartz"); - TL_IS_351 = Str__literal(L"like this"); - TL_IS_352 = Str__literal(L"most_recent_result"); - TL_IS_353 = Str__literal(L"most_recent_result_p"); - TL_IS_354 = Str__literal(L"Syntax.preform"); - TL_IS_355 = Str__literal(L"Preform Language"); - TL_IS_356 = Str__literal(L"Preform Language"); - TL_IS_357 = Str__literal(L"weave tree"); - TL_IS_358 = Str__literal(L"document"); - TL_IS_359 = Str__literal(L"head"); - TL_IS_360 = Str__literal(L"body"); - TL_IS_361 = Str__literal(L"tail"); - TL_IS_362 = Str__literal(L"chapter footer"); - TL_IS_363 = Str__literal(L"chapter header"); - TL_IS_364 = Str__literal(L"section footer"); - TL_IS_365 = Str__literal(L"section header"); - TL_IS_366 = Str__literal(L"section purpose"); - TL_IS_367 = Str__literal(L"subheading"); - TL_IS_368 = Str__literal(L"bar"); - TL_IS_369 = Str__literal(L"pagebreak"); - TL_IS_370 = Str__literal(L"paragraph"); - TL_IS_371 = Str__literal(L"endnote"); - TL_IS_372 = Str__literal(L"figure"); - TL_IS_373 = Str__literal(L"material"); - TL_IS_374 = Str__literal(L"embed"); - TL_IS_375 = Str__literal(L"pmac"); - TL_IS_376 = Str__literal(L"vskip"); - TL_IS_377 = Str__literal(L"apres_defn"); - TL_IS_378 = Str__literal(L"chapter"); - TL_IS_379 = Str__literal(L"section"); - TL_IS_380 = Str__literal(L"code line"); - TL_IS_381 = Str__literal(L"function usage"); - TL_IS_382 = Str__literal(L"commentary"); - TL_IS_383 = Str__literal(L"carousel slide"); - TL_IS_384 = Str__literal(L"toc"); - TL_IS_385 = Str__literal(L"toc line"); - TL_IS_386 = Str__literal(L"chapter_title_page"); - TL_IS_387 = Str__literal(L"defn"); - TL_IS_388 = Str__literal(L"source_code"); - TL_IS_389 = Str__literal(L"url"); - TL_IS_390 = Str__literal(L"footnote_cue"); - TL_IS_391 = Str__literal(L"footnote"); - TL_IS_392 = Str__literal(L"display line"); - TL_IS_393 = Str__literal(L"function defn"); - TL_IS_394 = Str__literal(L"item"); - TL_IS_395 = Str__literal(L"grammar index"); - TL_IS_396 = Str__literal(L"inline"); - TL_IS_397 = Str__literal(L"locale"); - TL_IS_398 = Str__literal(L"mathematics"); - TL_IS_399 = Str__literal(L"verbatim"); - TL_IS_400 = Str__literal(L"plain"); - TL_IS_401 = Str__literal(L".txt"); - TL_IS_402 = Str__literal(L"TeX"); - TL_IS_403 = Str__literal(L".tex"); - TL_IS_404 = Str__literal(L"DVI"); - TL_IS_405 = Str__literal(L".tex"); - TL_IS_406 = Str__literal(L"PDF"); - TL_IS_407 = Str__literal(L".tex"); - TL_IS_408 = Str__literal(L"Dunno"); - TL_IS_409 = Str__literal(L"inweb-macros.tex"); - TL_IS_410 = Str__literal(L"weavesection"); - TL_IS_411 = Str__literal(L"weavesections"); - TL_IS_412 = Str__literal(L"weavesectionss"); - TL_IS_413 = Str__literal(L"weavesectionsss"); - TL_IS_414 = Str__literal(L"tweavesection"); - TL_IS_415 = Str__literal(L"tweavesections"); - TL_IS_416 = Str__literal(L"tweavesectionss"); - TL_IS_417 = Str__literal(L"tweavesectionsss"); - TL_IS_418 = Str__literal(L"nsweavesection"); - TL_IS_419 = Str__literal(L"nsweavesections"); - TL_IS_420 = Str__literal(L"not"); - TL_IS_421 = Str__literal(L"leq"); - TL_IS_422 = Str__literal(L"geq"); - TL_IS_423 = Str__literal(L"sim"); - TL_IS_424 = Str__literal(L"hbox"); - TL_IS_425 = Str__literal(L"left"); - TL_IS_426 = Str__literal(L"right"); - TL_IS_427 = Str__literal(L"Rightarrow"); - TL_IS_428 = Str__literal(L"Leftrightarrow"); - TL_IS_429 = Str__literal(L"to"); - TL_IS_430 = Str__literal(L"rightarrow"); - TL_IS_431 = Str__literal(L"longrightarrow"); - TL_IS_432 = Str__literal(L"leftarrow"); - TL_IS_433 = Str__literal(L"longleftarrow"); - TL_IS_434 = Str__literal(L"lbrace"); - TL_IS_435 = Str__literal(L"mid"); - TL_IS_436 = Str__literal(L"rbrace"); - TL_IS_437 = Str__literal(L"cdot"); - TL_IS_438 = Str__literal(L"cdots"); - TL_IS_439 = Str__literal(L"dots"); - TL_IS_440 = Str__literal(L"times"); - TL_IS_441 = Str__literal(L"quad"); - TL_IS_442 = Str__literal(L"qquad"); - TL_IS_443 = Str__literal(L"TeX"); - TL_IS_444 = Str__literal(L"neq"); - TL_IS_445 = Str__literal(L"noteq"); - TL_IS_446 = Str__literal(L"ell"); - TL_IS_447 = Str__literal(L"log"); - TL_IS_448 = Str__literal(L"exp"); - TL_IS_449 = Str__literal(L"sin"); - TL_IS_450 = Str__literal(L"cos"); - TL_IS_451 = Str__literal(L"tan"); - TL_IS_452 = Str__literal(L"top"); - TL_IS_453 = Str__literal(L"Alpha"); - TL_IS_454 = Str__literal(L"Beta"); - TL_IS_455 = Str__literal(L"Gamma"); - TL_IS_456 = Str__literal(L"Delta"); - TL_IS_457 = Str__literal(L"Epsilon"); - TL_IS_458 = Str__literal(L"Zeta"); - TL_IS_459 = Str__literal(L"Eta"); - TL_IS_460 = Str__literal(L"Theta"); - TL_IS_461 = Str__literal(L"Iota"); - TL_IS_462 = Str__literal(L"Kappa"); - TL_IS_463 = Str__literal(L"Lambda"); - TL_IS_464 = Str__literal(L"Mu"); - TL_IS_465 = Str__literal(L"Nu"); - TL_IS_466 = Str__literal(L"Xi"); - TL_IS_467 = Str__literal(L"Omicron"); - TL_IS_468 = Str__literal(L"Pi"); - TL_IS_469 = Str__literal(L"Rho"); - TL_IS_470 = Str__literal(L"Varsigma"); - TL_IS_471 = Str__literal(L"Sigma"); - TL_IS_472 = Str__literal(L"Tau"); - TL_IS_473 = Str__literal(L"Upsilon"); - TL_IS_474 = Str__literal(L"Phi"); - TL_IS_475 = Str__literal(L"Chi"); - TL_IS_476 = Str__literal(L"Psi"); - TL_IS_477 = Str__literal(L"Omega"); - TL_IS_478 = Str__literal(L"alpha"); - TL_IS_479 = Str__literal(L"beta"); - TL_IS_480 = Str__literal(L"gamma"); - TL_IS_481 = Str__literal(L"delta"); - TL_IS_482 = Str__literal(L"epsilon"); - TL_IS_483 = Str__literal(L"zeta"); - TL_IS_484 = Str__literal(L"eta"); - TL_IS_485 = Str__literal(L"theta"); - TL_IS_486 = Str__literal(L"iota"); - TL_IS_487 = Str__literal(L"kappa"); - TL_IS_488 = Str__literal(L"lambda"); - TL_IS_489 = Str__literal(L"mu"); - TL_IS_490 = Str__literal(L"nu"); - TL_IS_491 = Str__literal(L"xi"); - TL_IS_492 = Str__literal(L"omicron"); - TL_IS_493 = Str__literal(L"pi"); - TL_IS_494 = Str__literal(L"rho"); - TL_IS_495 = Str__literal(L"varsigma"); - TL_IS_496 = Str__literal(L"sigma"); - TL_IS_497 = Str__literal(L"tau"); - TL_IS_498 = Str__literal(L"upsilon"); - TL_IS_499 = Str__literal(L"phi"); - TL_IS_500 = Str__literal(L"chi"); - TL_IS_501 = Str__literal(L"psi"); - TL_IS_502 = Str__literal(L"omega"); - TL_IS_503 = Str__literal(L"exists"); - TL_IS_504 = Str__literal(L"in"); - TL_IS_505 = Str__literal(L"forall"); - TL_IS_506 = Str__literal(L"cap"); - TL_IS_507 = Str__literal(L"emptyset"); - TL_IS_508 = Str__literal(L"subseteq"); - TL_IS_509 = Str__literal(L"land"); - TL_IS_510 = Str__literal(L"lor"); - TL_IS_511 = Str__literal(L"lnot"); - TL_IS_512 = Str__literal(L"sum"); - TL_IS_513 = Str__literal(L"prod"); - TL_IS_514 = Str__literal(L"n"); - TL_IS_515 = Str__literal(L"t"); - TL_IS_516 = Str__literal(L"exists"); - TL_IS_517 = Str__literal(L"forall"); - TL_IS_518 = Str__literal(L"HTML"); - TL_IS_519 = Str__literal(L".html"); - TL_IS_520 = Str__literal(L"ePub"); - TL_IS_521 = Str__literal(L".html"); - TL_IS_522 = Str__literal(L"Base"); - TL_IS_523 = Str__literal(L"Colours"); - TL_IS_524 = Str__literal(L""); - TL_IS_525 = Str__literal(L""); - TL_IS_526 = Str__literal(L"template"); - TL_IS_527 = Str__literal(L"Booklet Title"); - TL_IS_528 = Str__literal(L"template"); - TL_IS_529 = Str__literal(L"Breadcrumbs"); - TL_IS_530 = Str__literal(L"Title"); - TL_IS_531 = Str__literal(L"Short Title"); - TL_IS_532 = Str__literal(L"Short Title"); - TL_IS_533 = Str__literal(L"index.html"); - TL_IS_534 = Str__literal(L"function-link"); - TL_IS_535 = Str__literal(L"Carousel"); - TL_IS_536 = Str__literal(L"external"); - TL_IS_537 = Str__literal(L"internal"); - TL_IS_538 = Str__literal(L"Footnotes Plugin"); - TL_IS_539 = Str__literal(L"None"); - TL_IS_540 = Str__literal(L"Footnotes Plugin"); - TL_IS_541 = Str__literal(L"None"); - TL_IS_542 = Str__literal(L"Popups"); - TL_IS_543 = Str__literal(L"TeX Mathematics Plugin"); - TL_IS_544 = Str__literal(L"None"); - TL_IS_545 = Str__literal(L"Figures"); - TL_IS_546 = Str__literal(L"405"); - TL_IS_547 = Str__literal(L"720"); - TL_IS_548 = Str__literal(L"Embedding"); - TL_IS_549 = Str__literal(L"This is not a supported service"); - TL_IS_550 = Str__literal(L"Content ID"); - TL_IS_551 = Str__literal(L"Content Width"); - TL_IS_552 = Str__literal(L"Content Height"); - TL_IS_553 = Str__literal(L"Title"); - TL_IS_554 = Str__literal(L"Base"); - TL_IS_555 = Str__literal(L"Base.css"); - TL_IS_556 = Str__literal(L"debugging"); - TL_IS_557 = Str__literal(L".txt"); - TL_IS_558 = Str__literal(L"Colouring"); - TL_IS_559 = Str__literal(L"Coloring"); - TL_IS_560 = Str__literal(L"HTML"); - TL_IS_561 = Str__literal(L".css"); - TL_IS_562 = Str__literal(L".js"); - TL_IS_563 = Str__literal(L"HTML"); - TL_IS_564 = Str__literal(L"Colouring"); - TL_IS_565 = Str__literal(L"Coloring"); - TL_IS_566 = Str__literal(L" "); - TL_IS_567 = Str__literal(L"all"); - TL_IS_568 = Str__literal(L"platform-settings.mk"); - TL_IS_569 = Str__literal(L"intest"); - TL_IS_570 = Str__literal(L"all"); - TL_IS_571 = Str__literal(L"gitignorescript.txt"); - TL_IS_572 = Str__literal(L"version"); - TL_IS_573 = Str__literal(L"purpose"); - TL_IS_574 = Str__literal(L"var"); - TL_IS_575 = Str__literal(L"\n"); - TL_IS_576 = Str__literal(L"version"); - TL_IS_577 = Str__literal(L"purpose"); - TL_IS_578 = Str__literal(L"var"); - TL_IS_579 = Str__literal(L"Version Number"); - TL_IS_580 = Str__literal(L"Purpose"); - TL_IS_581 = Str__literal(L"Build Date"); - TL_IS_582 = Str__literal(L"Version Number"); - TL_IS_583 = Str__literal(L"inform6"); - TL_IS_584 = Str__literal(L"header.h"); - TL_IS_585 = Str__literal(L"(manifest).txt"); - TL_IS_586 = Str__literal(L"README.txt"); - TL_IS_587 = Str__literal(L"README.md"); - TL_IS_588 = Str__literal(L"docs"); - TL_IS_589 = Str__literal(L"web"); - TL_IS_590 = Str__literal(L"module"); - TL_IS_591 = Str__literal(L".inweb"); - TL_IS_592 = Str__literal(L".inweb"); - TL_IS_593 = Str__literal(L"docs"); - TL_IS_594 = Str__literal(L"Multiple cross-references might be meant here"); - TL_IS_595 = Str__literal(L"(main)"); + TL_IS_244 = Str__literal(L" ("); + TL_IS_245 = Str__literal(L" - "); + TL_IS_246 = Str__literal(L", "); + TL_IS_247 = Str__literal(L"Code In Code Comments Notation"); + TL_IS_248 = Str__literal(L"Code In Commentary Notation"); + TL_IS_249 = Str__literal(L"Off"); + TL_IS_250 = Str__literal(L"TeX Mathematics Displayed Notation"); + TL_IS_251 = Str__literal(L"Off"); + TL_IS_252 = Str__literal(L"TeX Mathematics Notation"); + TL_IS_253 = Str__literal(L"Off"); + TL_IS_254 = Str__literal(L"Cross-References Notation"); + TL_IS_255 = Str__literal(L"Off"); + TL_IS_256 = Str__literal(L"http://"); + TL_IS_257 = Str__literal(L"https://"); + TL_IS_258 = Str__literal(L"this is a cue for a missing note"); + TL_IS_259 = Str__literal(L"Cross-References Notation"); + TL_IS_260 = Str__literal(L"Off"); + TL_IS_261 = Str__literal(L"http://"); + TL_IS_262 = Str__literal(L"https://"); + TL_IS_263 = Str__literal(L"misplaced definition"); + TL_IS_264 = Str__literal(L"unknown macro"); + TL_IS_265 = Str__literal(L"Dialects"); + TL_IS_266 = Str__literal(L"C"); + TL_IS_267 = Str__literal(L"Languages"); + TL_IS_268 = Str__literal(L"InC"); + TL_IS_269 = Str__literal(L"Name"); + TL_IS_270 = Str__literal(L"Details"); + TL_IS_271 = Str__literal(L"Extension"); + TL_IS_272 = Str__literal(L"Line Comment"); + TL_IS_273 = Str__literal(L"Whole Line Comment"); + TL_IS_274 = Str__literal(L"Multiline Comment Open"); + TL_IS_275 = Str__literal(L"Multiline Comment Close"); + TL_IS_276 = Str__literal(L"String Literal"); + TL_IS_277 = Str__literal(L"String Literal Escape"); + TL_IS_278 = Str__literal(L"Character Literal"); + TL_IS_279 = Str__literal(L"Character Literal Escape"); + TL_IS_280 = Str__literal(L"Binary Literal Prefix"); + TL_IS_281 = Str__literal(L"Octal Literal Prefix"); + TL_IS_282 = Str__literal(L"Hexadecimal Literal Prefix"); + TL_IS_283 = Str__literal(L"Negative Literal Prefix"); + TL_IS_284 = Str__literal(L"Shebang"); + TL_IS_285 = Str__literal(L"Line Marker"); + TL_IS_286 = Str__literal(L"Before Named Paragraph Expansion"); + TL_IS_287 = Str__literal(L"After Named Paragraph Expansion"); + TL_IS_288 = Str__literal(L"Start Definition"); + TL_IS_289 = Str__literal(L"Prolong Definition"); + TL_IS_290 = Str__literal(L"End Definition"); + TL_IS_291 = Str__literal(L"Start Ifdef"); + TL_IS_292 = Str__literal(L"Start Ifndef"); + TL_IS_293 = Str__literal(L"End Ifdef"); + TL_IS_294 = Str__literal(L"End Ifndef"); + TL_IS_295 = Str__literal(L"C-Like"); + TL_IS_296 = Str__literal(L"Suppress Disclaimer"); + TL_IS_297 = Str__literal(L"Supports Namespaces"); + TL_IS_298 = Str__literal(L"Function Declaration Notation"); + TL_IS_299 = Str__literal(L"Type Declaration Notation"); + TL_IS_300 = Str__literal(L"}"); + TL_IS_301 = Str__literal(L"unquoted"); + TL_IS_302 = Str__literal(L"{"); + TL_IS_303 = Str__literal(L"debug"); + TL_IS_304 = Str__literal(L"!string"); + TL_IS_305 = Str__literal(L"!function"); + TL_IS_306 = Str__literal(L"!definition"); + TL_IS_307 = Str__literal(L"!reserved"); + TL_IS_308 = Str__literal(L"!element"); + TL_IS_309 = Str__literal(L"!identifier"); + TL_IS_310 = Str__literal(L"!character"); + TL_IS_311 = Str__literal(L"!constant"); + TL_IS_312 = Str__literal(L"!plain"); + TL_IS_313 = Str__literal(L"!extract"); + TL_IS_314 = Str__literal(L"!comment"); + TL_IS_315 = Str__literal(L"true"); + TL_IS_316 = Str__literal(L"false"); + TL_IS_317 = Str__literal(L"both"); + TL_IS_318 = Str__literal(L"brackets"); + TL_IS_319 = Str__literal(L"characters"); + TL_IS_320 = Str__literal(L"coloured"); + TL_IS_321 = Str__literal(L"colouring"); + TL_IS_322 = Str__literal(L"debug"); + TL_IS_323 = Str__literal(L"false"); + TL_IS_324 = Str__literal(L"in"); + TL_IS_325 = Str__literal(L"instances"); + TL_IS_326 = Str__literal(L"keyword"); + TL_IS_327 = Str__literal(L"matches"); + TL_IS_328 = Str__literal(L"matching"); + TL_IS_329 = Str__literal(L"not"); + TL_IS_330 = Str__literal(L"of"); + TL_IS_331 = Str__literal(L"on"); + TL_IS_332 = Str__literal(L"optionally"); + TL_IS_333 = Str__literal(L"prefix"); + TL_IS_334 = Str__literal(L"runs"); + TL_IS_335 = Str__literal(L"spaced"); + TL_IS_336 = Str__literal(L"suffix"); + TL_IS_337 = Str__literal(L"true"); + TL_IS_338 = Str__literal(L"unquoted"); + TL_IS_339 = Str__literal(L"Structures"); + TL_IS_340 = Str__literal(L"Main::"); + TL_IS_341 = Str__literal(L"Tangled output generated by inweb: do not edit"); + TL_IS_342 = Str__literal(L"this programming language does not support @d"); + TL_IS_343 = Str__literal(L"this programming language does not support multiline @d"); + TL_IS_344 = Str__literal(L"Namespaces"); + TL_IS_345 = Str__literal(L"Being internally called, this function mustn't belong to a :: namespace"); + TL_IS_346 = Str__literal(L"Being externally called, this function must belong to a :: namespace"); + TL_IS_347 = Str__literal(L"Structures"); + TL_IS_348 = Str__literal(L"program ended with conditional compilation open"); + TL_IS_349 = Str__literal(L"conditional compilation too deeply nested"); + TL_IS_350 = Str__literal(L"found #endif without #ifdef or #ifndef"); + TL_IS_351 = Str__literal(L"quartz"); + TL_IS_352 = Str__literal(L"quartz"); + TL_IS_353 = Str__literal(L"quartz"); + TL_IS_354 = Str__literal(L"like this"); + TL_IS_355 = Str__literal(L"most_recent_result"); + TL_IS_356 = Str__literal(L"most_recent_result_p"); + TL_IS_357 = Str__literal(L"Syntax.preform"); + TL_IS_358 = Str__literal(L"Preform Language"); + TL_IS_359 = Str__literal(L"Preform Language"); + TL_IS_360 = Str__literal(L"weave tree"); + TL_IS_361 = Str__literal(L"document"); + TL_IS_362 = Str__literal(L"head"); + TL_IS_363 = Str__literal(L"body"); + TL_IS_364 = Str__literal(L"tail"); + TL_IS_365 = Str__literal(L"chapter footer"); + TL_IS_366 = Str__literal(L"chapter header"); + TL_IS_367 = Str__literal(L"section footer"); + TL_IS_368 = Str__literal(L"section header"); + TL_IS_369 = Str__literal(L"section purpose"); + TL_IS_370 = Str__literal(L"subheading"); + TL_IS_371 = Str__literal(L"bar"); + TL_IS_372 = Str__literal(L"pagebreak"); + TL_IS_373 = Str__literal(L"paragraph"); + TL_IS_374 = Str__literal(L"endnote"); + TL_IS_375 = Str__literal(L"figure"); + TL_IS_376 = Str__literal(L"material"); + TL_IS_377 = Str__literal(L"embed"); + TL_IS_378 = Str__literal(L"pmac"); + TL_IS_379 = Str__literal(L"vskip"); + TL_IS_380 = Str__literal(L"apres_defn"); + TL_IS_381 = Str__literal(L"chapter"); + TL_IS_382 = Str__literal(L"section"); + TL_IS_383 = Str__literal(L"code line"); + TL_IS_384 = Str__literal(L"function usage"); + TL_IS_385 = Str__literal(L"commentary"); + TL_IS_386 = Str__literal(L"carousel slide"); + TL_IS_387 = Str__literal(L"toc"); + TL_IS_388 = Str__literal(L"toc line"); + TL_IS_389 = Str__literal(L"chapter_title_page"); + TL_IS_390 = Str__literal(L"defn"); + TL_IS_391 = Str__literal(L"source_code"); + TL_IS_392 = Str__literal(L"url"); + TL_IS_393 = Str__literal(L"footnote_cue"); + TL_IS_394 = Str__literal(L"footnote"); + TL_IS_395 = Str__literal(L"display line"); + TL_IS_396 = Str__literal(L"function defn"); + TL_IS_397 = Str__literal(L"item"); + TL_IS_398 = Str__literal(L"grammar index"); + TL_IS_399 = Str__literal(L"inline"); + TL_IS_400 = Str__literal(L"locale"); + TL_IS_401 = Str__literal(L"mathematics"); + TL_IS_402 = Str__literal(L"verbatim"); + TL_IS_403 = Str__literal(L"plain"); + TL_IS_404 = Str__literal(L".txt"); + TL_IS_405 = Str__literal(L"TeX"); + TL_IS_406 = Str__literal(L".tex"); + TL_IS_407 = Str__literal(L"DVI"); + TL_IS_408 = Str__literal(L".tex"); + TL_IS_409 = Str__literal(L"PDF"); + TL_IS_410 = Str__literal(L".tex"); + TL_IS_411 = Str__literal(L"Dunno"); + TL_IS_412 = Str__literal(L"inweb-macros.tex"); + TL_IS_413 = Str__literal(L"weavesection"); + TL_IS_414 = Str__literal(L"weavesections"); + TL_IS_415 = Str__literal(L"weavesectionss"); + TL_IS_416 = Str__literal(L"weavesectionsss"); + TL_IS_417 = Str__literal(L"tweavesection"); + TL_IS_418 = Str__literal(L"tweavesections"); + TL_IS_419 = Str__literal(L"tweavesectionss"); + TL_IS_420 = Str__literal(L"tweavesectionsss"); + TL_IS_421 = Str__literal(L"nsweavesection"); + TL_IS_422 = Str__literal(L"nsweavesections"); + TL_IS_423 = Str__literal(L"not"); + TL_IS_424 = Str__literal(L"leq"); + TL_IS_425 = Str__literal(L"geq"); + TL_IS_426 = Str__literal(L"sim"); + TL_IS_427 = Str__literal(L"hbox"); + TL_IS_428 = Str__literal(L"left"); + TL_IS_429 = Str__literal(L"right"); + TL_IS_430 = Str__literal(L"Rightarrow"); + TL_IS_431 = Str__literal(L"Leftrightarrow"); + TL_IS_432 = Str__literal(L"to"); + TL_IS_433 = Str__literal(L"rightarrow"); + TL_IS_434 = Str__literal(L"longrightarrow"); + TL_IS_435 = Str__literal(L"leftarrow"); + TL_IS_436 = Str__literal(L"longleftarrow"); + TL_IS_437 = Str__literal(L"lbrace"); + TL_IS_438 = Str__literal(L"mid"); + TL_IS_439 = Str__literal(L"rbrace"); + TL_IS_440 = Str__literal(L"cdot"); + TL_IS_441 = Str__literal(L"cdots"); + TL_IS_442 = Str__literal(L"dots"); + TL_IS_443 = Str__literal(L"times"); + TL_IS_444 = Str__literal(L"quad"); + TL_IS_445 = Str__literal(L"qquad"); + TL_IS_446 = Str__literal(L"TeX"); + TL_IS_447 = Str__literal(L"neq"); + TL_IS_448 = Str__literal(L"noteq"); + TL_IS_449 = Str__literal(L"ell"); + TL_IS_450 = Str__literal(L"log"); + TL_IS_451 = Str__literal(L"exp"); + TL_IS_452 = Str__literal(L"sin"); + TL_IS_453 = Str__literal(L"cos"); + TL_IS_454 = Str__literal(L"tan"); + TL_IS_455 = Str__literal(L"top"); + TL_IS_456 = Str__literal(L"Alpha"); + TL_IS_457 = Str__literal(L"Beta"); + TL_IS_458 = Str__literal(L"Gamma"); + TL_IS_459 = Str__literal(L"Delta"); + TL_IS_460 = Str__literal(L"Epsilon"); + TL_IS_461 = Str__literal(L"Zeta"); + TL_IS_462 = Str__literal(L"Eta"); + TL_IS_463 = Str__literal(L"Theta"); + TL_IS_464 = Str__literal(L"Iota"); + TL_IS_465 = Str__literal(L"Kappa"); + TL_IS_466 = Str__literal(L"Lambda"); + TL_IS_467 = Str__literal(L"Mu"); + TL_IS_468 = Str__literal(L"Nu"); + TL_IS_469 = Str__literal(L"Xi"); + TL_IS_470 = Str__literal(L"Omicron"); + TL_IS_471 = Str__literal(L"Pi"); + TL_IS_472 = Str__literal(L"Rho"); + TL_IS_473 = Str__literal(L"Varsigma"); + TL_IS_474 = Str__literal(L"Sigma"); + TL_IS_475 = Str__literal(L"Tau"); + TL_IS_476 = Str__literal(L"Upsilon"); + TL_IS_477 = Str__literal(L"Phi"); + TL_IS_478 = Str__literal(L"Chi"); + TL_IS_479 = Str__literal(L"Psi"); + TL_IS_480 = Str__literal(L"Omega"); + TL_IS_481 = Str__literal(L"alpha"); + TL_IS_482 = Str__literal(L"beta"); + TL_IS_483 = Str__literal(L"gamma"); + TL_IS_484 = Str__literal(L"delta"); + TL_IS_485 = Str__literal(L"epsilon"); + TL_IS_486 = Str__literal(L"zeta"); + TL_IS_487 = Str__literal(L"eta"); + TL_IS_488 = Str__literal(L"theta"); + TL_IS_489 = Str__literal(L"iota"); + TL_IS_490 = Str__literal(L"kappa"); + TL_IS_491 = Str__literal(L"lambda"); + TL_IS_492 = Str__literal(L"mu"); + TL_IS_493 = Str__literal(L"nu"); + TL_IS_494 = Str__literal(L"xi"); + TL_IS_495 = Str__literal(L"omicron"); + TL_IS_496 = Str__literal(L"pi"); + TL_IS_497 = Str__literal(L"rho"); + TL_IS_498 = Str__literal(L"varsigma"); + TL_IS_499 = Str__literal(L"sigma"); + TL_IS_500 = Str__literal(L"tau"); + TL_IS_501 = Str__literal(L"upsilon"); + TL_IS_502 = Str__literal(L"phi"); + TL_IS_503 = Str__literal(L"chi"); + TL_IS_504 = Str__literal(L"psi"); + TL_IS_505 = Str__literal(L"omega"); + TL_IS_506 = Str__literal(L"exists"); + TL_IS_507 = Str__literal(L"in"); + TL_IS_508 = Str__literal(L"forall"); + TL_IS_509 = Str__literal(L"cap"); + TL_IS_510 = Str__literal(L"emptyset"); + TL_IS_511 = Str__literal(L"subseteq"); + TL_IS_512 = Str__literal(L"land"); + TL_IS_513 = Str__literal(L"lor"); + TL_IS_514 = Str__literal(L"lnot"); + TL_IS_515 = Str__literal(L"sum"); + TL_IS_516 = Str__literal(L"prod"); + TL_IS_517 = Str__literal(L"n"); + TL_IS_518 = Str__literal(L"t"); + TL_IS_519 = Str__literal(L"exists"); + TL_IS_520 = Str__literal(L"forall"); + TL_IS_521 = Str__literal(L"HTML"); + TL_IS_522 = Str__literal(L".html"); + TL_IS_523 = Str__literal(L"ePub"); + TL_IS_524 = Str__literal(L".html"); + TL_IS_525 = Str__literal(L"Base"); + TL_IS_526 = Str__literal(L"Colours"); + TL_IS_527 = Str__literal(L""); + TL_IS_528 = Str__literal(L""); + TL_IS_529 = Str__literal(L"template"); + TL_IS_530 = Str__literal(L"Booklet Title"); + TL_IS_531 = Str__literal(L"template"); + TL_IS_532 = Str__literal(L"Breadcrumbs"); + TL_IS_533 = Str__literal(L"Title"); + TL_IS_534 = Str__literal(L"Short Title"); + TL_IS_535 = Str__literal(L"Short Title"); + TL_IS_536 = Str__literal(L"index.html"); + TL_IS_537 = Str__literal(L"Figures"); + TL_IS_538 = Str__literal(L"function-link"); + TL_IS_539 = Str__literal(L"Carousel"); + TL_IS_540 = Str__literal(L"carousel-number"); + TL_IS_541 = Str__literal(L"carousel-caption"); + TL_IS_542 = Str__literal(L"carousel-caption-above"); + TL_IS_543 = Str__literal(L"carousel-number-above"); + TL_IS_544 = Str__literal(L"carousel-caption-below"); + TL_IS_545 = Str__literal(L"carousel-number-below"); + TL_IS_546 = Str__literal(L"external"); + TL_IS_547 = Str__literal(L"internal"); + TL_IS_548 = Str__literal(L"Footnotes Plugin"); + TL_IS_549 = Str__literal(L"None"); + TL_IS_550 = Str__literal(L"Footnotes Plugin"); + TL_IS_551 = Str__literal(L"None"); + TL_IS_552 = Str__literal(L"Popups"); + TL_IS_553 = Str__literal(L"TeX Mathematics Plugin"); + TL_IS_554 = Str__literal(L"None"); + TL_IS_555 = Str__literal(L"405"); + TL_IS_556 = Str__literal(L"720"); + TL_IS_557 = Str__literal(L"Embedding"); + TL_IS_558 = Str__literal(L"This is not a supported service"); + TL_IS_559 = Str__literal(L"Content ID"); + TL_IS_560 = Str__literal(L"Content Width"); + TL_IS_561 = Str__literal(L"Content Height"); + TL_IS_562 = Str__literal(L"Title"); + TL_IS_563 = Str__literal(L"Base"); + TL_IS_564 = Str__literal(L"Base.css"); + TL_IS_565 = Str__literal(L"debugging"); + TL_IS_566 = Str__literal(L".txt"); + TL_IS_567 = Str__literal(L"Colouring"); + TL_IS_568 = Str__literal(L"Coloring"); + TL_IS_569 = Str__literal(L"HTML"); + TL_IS_570 = Str__literal(L".css"); + TL_IS_571 = Str__literal(L".js"); + TL_IS_572 = Str__literal(L"HTML"); + TL_IS_573 = Str__literal(L"Colouring"); + TL_IS_574 = Str__literal(L"Coloring"); + TL_IS_575 = Str__literal(L" "); + TL_IS_576 = Str__literal(L"all"); + TL_IS_577 = Str__literal(L"platform-settings.mk"); + TL_IS_578 = Str__literal(L"intest"); + TL_IS_579 = Str__literal(L"all"); + TL_IS_580 = Str__literal(L"gitignorescript.txt"); + TL_IS_581 = Str__literal(L"version"); + TL_IS_582 = Str__literal(L"purpose"); + TL_IS_583 = Str__literal(L"var"); + TL_IS_584 = Str__literal(L"\n"); + TL_IS_585 = Str__literal(L"version"); + TL_IS_586 = Str__literal(L"purpose"); + TL_IS_587 = Str__literal(L"var"); + TL_IS_588 = Str__literal(L"Version Number"); + TL_IS_589 = Str__literal(L"Purpose"); + TL_IS_590 = Str__literal(L"Build Date"); + TL_IS_591 = Str__literal(L"Version Number"); + TL_IS_592 = Str__literal(L"inform6"); + TL_IS_593 = Str__literal(L"header.h"); + TL_IS_594 = Str__literal(L"(manifest).txt"); + TL_IS_595 = Str__literal(L"README.txt"); + TL_IS_596 = Str__literal(L"README.md"); + TL_IS_597 = Str__literal(L"docs"); + TL_IS_598 = Str__literal(L"web"); + TL_IS_599 = Str__literal(L"module"); + TL_IS_600 = Str__literal(L".inweb"); + TL_IS_601 = Str__literal(L".inweb"); + TL_IS_602 = Str__literal(L"docs"); + TL_IS_603 = Str__literal(L"Multiple cross-references might be meant here"); + TL_IS_604 = Str__literal(L"(main)"); } diff --git a/docs/docs-assets/Carousel.css b/docs/docs-assets/Carousel.css index c18b92b..4f27ef0 100644 --- a/docs/docs-assets/Carousel.css +++ b/docs/docs-assets/Carousel.css @@ -1,19 +1,15 @@ -* {box-sizing:border-box} - -/* Slideshow container */ -.slideshow-container { - max-width: 1000px; +.carousel-container { + width: 1000px; position: relative; margin: auto; } -/* Hide the images by default */ -.mySlides { - display: none; +.carousel-container img { + max-width: 1000px; } /* Next & previous buttons */ -.prev, .next { +.carousel-prev-button, .carousel-next-button { cursor: pointer; position: absolute; top: 50%; @@ -29,38 +25,62 @@ } /* Position the "next button" to the right */ -.next { +.carousel-next-button { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a black background color with a little bit see-through */ -.prev:hover, .next:hover { +.carousel-prev-button:hover, .carousel-next-button:hover { background-color: rgba(0,0,0,0.8); } /* Caption text */ -.text { +.carousel-caption { color: #f2f2f2; font-size: 15px; - padding: 8px 12px; + padding-top: 6px; + padding-bottom: 6px; position: absolute; - bottom: 8px; - width: 100%; + bottom: 0px; + width: 1000px; + text-align: center; + background-color: rgba(0,0,0,0.6); +} + +.carousel-caption-above, .carousel-caption-below { + color: #000000; + font-size: 15px; + padding-top: 6px; + padding-bottom: 6px; + width: 1000px; text-align: center; } /* Number text (1/3 etc) */ -.numbertext { +.carousel-number, .carousel-number-above, .carousel-number-below { + font-size: 12px; + padding: 8px 12px; + position: absolute; + top: 0; +} +.carousel-number, .carousel-number-below { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } +.carousel-number-above { + color: #000000; +} + +.carousel-dots-container { + text-align:center; +} /* The dots/bullets/indicators */ -.dot { +.carousel-dot { cursor: pointer; height: 15px; width: 15px; @@ -71,24 +91,24 @@ transition: background-color 0.6s ease; } -.active, .dot:hover { +.carousel-dot-active, .carousel-dot:hover { background-color: #717171; } /* Fading animation */ -.fade { +.fading-slide { -webkit-animation-name: fade; -webkit-animation-duration: 1.5s; animation-name: fade; animation-duration: 1.5s; } -@-webkit-keyframes fade { +@-webkit-keyframes fading-slide { from {opacity: .4} to {opacity: 1} } -@keyframes fade { +@keyframes fading-slide { from {opacity: .4} to {opacity: 1} } diff --git a/docs/docs-assets/Carousel.js b/docs/docs-assets/Carousel.js index 102c52f..dadd5e9 100644 --- a/docs/docs-assets/Carousel.js +++ b/docs/docs-assets/Carousel.js @@ -1,28 +1,35 @@ -var slideIndex = 1; -showSlides(slideIndex); - // Next/previous controls -function plusSlides(n) { - showSlides(slideIndex += n); +function carouselMoveSlide(id, did, n) { + carouselSetSlide(id, did, carouselGetSlide(id, did) + n); } -// Thumbnail image controls -function currentSlide(n) { - showSlides(slideIndex = n); +function carouselGetSlide(id, did) { + var carousel = document.getElementById(id); + var slides = carousel.getElementsByClassName("carousel-slide"); + var i; + for (i = 0; i < slides.length; i++) { + if (slides[i].style.display == "block") { + return i; + } + } + return 0; } -function showSlides(n) { - var i; - var slides = document.getElementsByClassName("mySlides"); - var dots = document.getElementsByClassName("dot"); - if (n > slides.length) {slideIndex = 1} - if (n < 1) {slideIndex = slides.length} - for (i = 0; i < slides.length; i++) { - slides[i].style.display = "none"; - } - for (i = 0; i < dots.length; i++) { - dots[i].className = dots[i].className.replace(" active", ""); - } - slides[slideIndex-1].style.display = "block"; - dots[slideIndex-1].className += " active"; +function carouselSetSlide(id, did, n) { + var carousel = document.getElementById(id); + var dotrow = document.getElementById(did); + var i; + var slides = carousel.getElementsByClassName("carousel-slide"); + var dots = dotrow.getElementsByClassName("carousel-dot"); + if (n >= slides.length) { n = 0 } + if (n < 0) { n = slides.length - 1 } + for (i = 0; i < slides.length; i++) { + if (i != n) { + slides[i].style.display = "none"; + dots[i].className = "carousel-dot"; + } else { + slides[i].style.display = "block"; + dots[i].className = "carousel-dot carousel-dot-active"; + } + } } diff --git a/docs/foundation-module/5-htm.html b/docs/foundation-module/5-htm.html index f0c512f..31bff2c 100644 --- a/docs/foundation-module/5-htm.html +++ b/docs/foundation-module/5-htm.html @@ -386,30 +386,42 @@ of which are variadic and have to be written out the old-fashioned way: void HTML::image(OUTPUT_STREAM, filename *F) { HTML_TAG_WITH("img", "src=\"%/f\"", F); } + +void HTML::image_to_dimensions(OUTPUT_STREAM, filename *F, int w, int h) { + if ((w > 0) && (h > 0)) { + HTML_TAG_WITH("img", "src=\"%/f\" width=\"%d\" height=\"%d\"", F, w, h); + } else if (w > 0) { + HTML_TAG_WITH("img", "src=\"%/f\" width=\"%d\"", F, w); + } else if (h > 0) { + HTML_TAG_WITH("img", "src=\"%/f\" height=\"%d\"", F, h); + } else { + HTML_TAG_WITH("img", "src=\"%/f\"", F); + } +}

    §15. Links.

    -void HTML::anchor(OUTPUT_STREAM, text_stream *id) {
    +void HTML::anchor(OUTPUT_STREAM, text_stream *id) {
         HTML_OPEN_WITH("a", "id=\"%S\"", id); HTML_CLOSE("a");
     }
     
    -void HTML::begin_link(OUTPUT_STREAM, text_stream *to) {
    +void HTML::begin_link(OUTPUT_STREAM, text_stream *to) {
         HTML_OPEN_WITH("a", "href=\"%S\"", to);
     }
     
    -void HTML::begin_link_with_class(OUTPUT_STREAM, text_stream *cl, text_stream *to) {
    +void HTML::begin_link_with_class(OUTPUT_STREAM, text_stream *cl, text_stream *to) {
         HTML::begin_link_with_class_onclick(OUT, cl, to, NULL);
     }
     
    -void HTML::begin_link_with_class_title(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti) {
    +void HTML::begin_link_with_class_title(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti) {
         HTML::begin_link_with_class_title_onclick(OUT, cl, to, ti, NULL);
     }
     
    -void HTML::begin_link_with_class_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *on) {
    +void HTML::begin_link_with_class_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *on) {
         HTML::begin_link_with_class_title_onclick(OUT, cl, to, NULL, on);
     }
     
    -void HTML::begin_link_with_class_title_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti, text_stream *on) {
    +void HTML::begin_link_with_class_title_onclick(OUTPUT_STREAM, text_stream *cl, text_stream *to, text_stream *ti, text_stream *on) {
         WRITE("<a href=\"%S\" class=\"%S\"", to, cl);
         if (Str::len(ti) > 0) WRITE(" title=\"%S\"", ti);
         if (Str::len(on) > 0) WRITE(" onclick=\"%S\"", on);
    @@ -417,25 +429,25 @@ of which are variadic and have to be written out the old-fashioned way:
     }
     
     
    -void HTML::end_link(OUTPUT_STREAM) {
    +void HTML::end_link(OUTPUT_STREAM) {
         HTML_CLOSE("a");
     }
     

    §16. Tables. Opening a generic bland table with reasonable column spacing:

    -void HTML::begin_plain_html_table(OUTPUT_STREAM) {
    +void HTML::begin_plain_html_table(OUTPUT_STREAM) {
         HTML::begin_html_table(OUT, NULL, FALSE, 0, 0, 0, 0, 0);
     }
     
    -void HTML::begin_wide_html_table(OUTPUT_STREAM) {
    +void HTML::begin_wide_html_table(OUTPUT_STREAM) {
         HTML::begin_html_table(OUT, NULL, TRUE, 0, 0, 0, 0, 0);
     }
     

    §17. And some more general code:

    -void HTML::begin_html_table(OUTPUT_STREAM, char *colour, int full_width,
    +void HTML::begin_html_table(OUTPUT_STREAM, char *colour, int full_width,
         int border, int cellspacing, int cellpadding, int height, int width) {
         TEMPORARY_TEXT(tab);
         WRITE_TO(tab, "border=\"%d\" cellspacing=\"%d\" cellpadding=\"%d\"",
    @@ -452,7 +464,7 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML_OPEN_WITH("table", "%S", tab);
         DISCARD_TEXT(tab);
     }
    -void HTML::begin_html_table_bg(OUTPUT_STREAM, char *colour, int full_width,
    +void HTML::begin_html_table_bg(OUTPUT_STREAM, char *colour, int full_width,
         int border, int cellspacing, int cellpadding, int height, int width, char *bg) {
         TEMPORARY_TEXT(tab);
         WRITE_TO(tab, "border=\"%d\" cellspacing=\"%d\" cellpadding=\"%d\"",
    @@ -465,12 +477,12 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML_OPEN_WITH("table", "%S", tab);
         DISCARD_TEXT(tab);
     }
    -void HTML::first_html_column(OUTPUT_STREAM, int width) {
    +void HTML::first_html_column(OUTPUT_STREAM, int width) {
         HTML_OPEN("tr");
         if (width > 0) HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\"");
     }
    -void HTML::first_html_column_nowrap(OUTPUT_STREAM, int width, char *colour) {
    +void HTML::first_html_column_nowrap(OUTPUT_STREAM, int width, char *colour) {
         if (colour) HTML_OPEN_WITH("tr", "bgcolor=\"%s\"", colour) else HTML_OPEN("tr");
         TEMPORARY_TEXT(col);
         WRITE_TO(col, "style=\"white-space:nowrap;\" align=\"left\" valign=\"top\" height=\"20\"");
    @@ -478,7 +490,7 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML_OPEN_WITH("td", "%S", col);
         DISCARD_TEXT(col);
     }
    -void HTML::first_html_column_spaced(OUTPUT_STREAM, int width) {
    +void HTML::first_html_column_spaced(OUTPUT_STREAM, int width) {
         HTML_OPEN("tr");
         TEMPORARY_TEXT(col);
         WRITE_TO(col, "style=\"padding-top: 3px;\" align=\"left\" valign=\"top\"");
    @@ -486,7 +498,7 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML_OPEN_WITH("td", "%S", col);
         DISCARD_TEXT(col);
     }
    -void HTML::first_html_column_coloured(OUTPUT_STREAM, int width, char *colour, int cs) {
    +void HTML::first_html_column_coloured(OUTPUT_STREAM, int width, char *colour, int cs) {
         if (colour) HTML_OPEN_WITH("tr", "bgcolor=\"%s\"", colour) else HTML_OPEN("tr");
         TEMPORARY_TEXT(col);
         WRITE_TO(col, "nowrap=\"nowrap\" align=\"left\" valign=\"top\"");
    @@ -495,58 +507,58 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML_OPEN_WITH("td", "%S", col);
         DISCARD_TEXT(col);
     }
    -void HTML::next_html_column(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column(OUTPUT_STREAM, int width) {
         WRITE("&nbsp;&nbsp;&nbsp;&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\"");
     }
    -void HTML::next_html_column_centred(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column_centred(OUTPUT_STREAM, int width) {
         WRITE("&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "align=\"center\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "align=\"center\" valign=\"top\"");
     }
    -void HTML::next_html_column_spanning(OUTPUT_STREAM, int width, int sp) {
    +void HTML::next_html_column_spanning(OUTPUT_STREAM, int width, int sp) {
         WRITE("&nbsp;&nbsp;&nbsp;&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\" colspan=\"%d\" width=\"%d\"", sp, width)
         else HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\" colspan=\"%d\"", sp);
     }
    -void HTML::next_html_column_nowrap(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column_nowrap(OUTPUT_STREAM, int width) {
         WRITE("&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "style=\"white-space:nowrap;\" align=\"left\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "style=\"white-space:nowrap;\" align=\"left\" valign=\"top\"");
     }
    -void HTML::next_html_column_spaced(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column_spaced(OUTPUT_STREAM, int width) {
         WRITE("&nbsp;&nbsp;&nbsp;&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "style=\"padding-top: 3px;\" align=\"left\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "style=\"padding-top: 3px;\" align=\"left\" valign=\"top\"");
     }
    -void HTML::next_html_column_nw(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column_nw(OUTPUT_STREAM, int width) {
         WRITE("&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "nowrap=\"nowrap\" align=\"left\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "nowrap=\"nowrap\" align=\"left\" valign=\"top\"");
     }
    -void HTML::next_html_column_w(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column_w(OUTPUT_STREAM, int width) {
         WRITE("&nbsp;");
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "align=\"left\" valign=\"top\"");
     }
    -void HTML::next_html_column_right_justified(OUTPUT_STREAM, int width) {
    +void HTML::next_html_column_right_justified(OUTPUT_STREAM, int width) {
         HTML_CLOSE("td");
         if (width > 0) HTML_OPEN_WITH("td", "align=\"right\" valign=\"top\" width=\"%d\"", width)
         else HTML_OPEN_WITH("td", "align=\"right\" valign=\"top\"");
     }
    -void HTML::end_html_row(OUTPUT_STREAM) {
    +void HTML::end_html_row(OUTPUT_STREAM) {
         HTML_CLOSE("td");
         HTML_CLOSE("tr");
     }
    -void HTML::end_html_table(OUTPUT_STREAM) {
    +void HTML::end_html_table(OUTPUT_STREAM) {
         HTML_CLOSE("table");
     }
     

    §18. Round-rects.

    @@ -558,7 +570,7 @@ of which are variadic and have to be written out the old-fashioned way: define ROUND_BOX_BOTTOM 2
    -void HTML::open_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) {
    +void HTML::open_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) {
         HTML_OPEN_WITH("table",
             "width=\"100%%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" "
             "style=\"background-color: #%s\"", html_colour);
    @@ -578,7 +590,7 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML_OPEN("td");
     }
     
    -void HTML::close_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) {
    +void HTML::close_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) {
         HTML_CLOSE("td");
         HTML_OPEN_WITH("td", "width=\"%d\"", CORNER_SIZE);
         HTML_CLOSE("td");
    @@ -596,7 +608,7 @@ of which are variadic and have to be written out the old-fashioned way:
         HTML::end_html_table(OUT);
     }
     
    -void HTML::box_corner(OUTPUT_STREAM, char *html_colour, char *corner) {
    +void HTML::box_corner(OUTPUT_STREAM, char *html_colour, char *corner) {
         HTML_TAG_WITH("img",
             "src=\"inform:/bg_images/%s_corner_%s.gif\" "
             "width=\"%d\" height=\"%d\" border=\"0\" alt=\"...\"",
    @@ -605,18 +617,18 @@ of which are variadic and have to be written out the old-fashioned way:
     

    §19. Miscellaneous.

    -void HTML::comment(OUTPUT_STREAM, text_stream *text) {
    +void HTML::comment(OUTPUT_STREAM, text_stream *text) {
         WRITE("<!--%S-->\n", text);
     }
     
    -void HTML::heading(OUTPUT_STREAM, char *tag, text_stream *text) {
    +void HTML::heading(OUTPUT_STREAM, char *tag, text_stream *text) {
         HTML_OPEN(tag);
         WRITE("%S", text);
         HTML_CLOSE(tag);
         WRITE("\n");
     }
     
    -void HTML::hr(OUTPUT_STREAM, char *class) {
    +void HTML::hr(OUTPUT_STREAM, char *class) {
         if (class) HTML_TAG_WITH("hr", "class=\"%s\"", class)
         else HTML_TAG("hr");
     }
    @@ -780,7 +792,7 @@ need to run quickly.
     

    -wchar_t *HTML::translate_colour_name(wchar_t *original) {
    +wchar_t *HTML::translate_colour_name(wchar_t *original) {
         for (int j=0; Wide::cmp(table_of_translations[j].chip_name, L""); j++)
             if (Wide::cmp(table_of_translations[j].chip_name, original) == 0)
                 return table_of_translations[j].html_colour;
    @@ -789,10 +801,10 @@ need to run quickly.
     

    §22.

    -void HTML::begin_colour(OUTPUT_STREAM, text_stream *col) {
    +void HTML::begin_colour(OUTPUT_STREAM, text_stream *col) {
         HTML_OPEN_WITH("span", "style=\"color:#%S\"", col);
     }
    -void HTML::end_colour(OUTPUT_STREAM) {
    +void HTML::end_colour(OUTPUT_STREAM) {
         HTML_CLOSE("span");
     }
     

    diff --git a/docs/goldbach/S-sp.html b/docs/goldbach/S-sp.html index 430de74..8573dce 100644 --- a/docs/goldbach/S-sp.html +++ b/docs/goldbach/S-sp.html @@ -71,7 +71,7 @@ number greater than 2 can be written this way. This remains open, though — or for that matter see The Sieve of Eratosthenes.

    -
    +

    Computer verification has been made up to around \(10^{18}\), but by rather better methods.1 Which is awesome.2 And \(i<j\), that's for sure. $$ \int_0^1 \cos x {\rm d}x $$ @@ -83,47 +83,31 @@ Which is really the point.

  • §2. And now...

    -
    -
    -
    1 / 4
    -
    -
    This is numero 1
    -
    -
    -
    2 / 4
    -I wonder if I can type text here? -

    Perhaps lots of text. -

    - -

    Even \(x \leq \log y\)? -

    Deuxieme
    -
    -
    -
    3 / 4
    -

    - -
    -
    Bliney
    -
    -
    -
    4 / 4
    -

    - -
    -    int k = j++;
    -    printf("Splodhge!\n");
    -
    -

    Which is reasonable. -

    - -
    Codey
    +