Better tab names for one-page webs
This commit is contained in:
parent
bff57e2115
commit
d2de318f32
10 changed files with 1100 additions and 1095 deletions
|
@ -139,10 +139,11 @@ and details of any cover-sheet to use.
|
|||
@<Translate the subweb range into details of what to weave@> =
|
||||
match_results mr = Regexp::create_mr();
|
||||
if (Str::eq_wide_string(range, L"0")) {
|
||||
wv->booklet_title = Str::new_from_wide_string(L"Complete Program");
|
||||
if (W->md->single_file) {
|
||||
wv->booklet_title = Str::duplicate(Bibliographic::get_datum(W->md, I"Title"));
|
||||
Filenames::write_unextended_leafname(leafname, W->md->single_file);
|
||||
} else {
|
||||
wv->booklet_title = Str::new_from_wide_string(L"Complete Program");
|
||||
WRITE_TO(leafname, "Complete");
|
||||
}
|
||||
if (wv->theme_match) @<Change the titling and leafname to match the tagged theme@>;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
document weave order 0
|
||||
head banner <Weave of 'Complete Program' generated by Inweb>
|
||||
head banner <Weave of 'The Twin Primes Conjecture' generated by Inweb>
|
||||
body
|
||||
chapter <Sections>
|
||||
chapter header <Sections>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Inweb 7
|
||||
|
||||
v7-alpha.1+1A59 'Escape to Danger' (28 July 2020)
|
||||
v7-alpha.1+1A60 'Escape to Danger' (3 August 2020)
|
||||
|
||||
## About Inweb
|
||||
|
||||
|
|
2167
Tangled/inweb.c
2167
Tangled/inweb.c
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,3 @@
|
|||
Prerelease: alpha.1
|
||||
Build Date: 28 July 2020
|
||||
Build Number: 1A59
|
||||
Build Date: 3 August 2020
|
||||
Build Number: 1A60
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Complete Program</title>
|
||||
<title>The Inweb Manual and Source Code</title>
|
||||
<link href="docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
<meta name="viewport" content="width=device-width initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
@ -37,7 +37,7 @@
|
|||
</ul>
|
||||
</nav>
|
||||
<main role="main">
|
||||
<!--Weave of 'Complete Program' generated by Inweb-->
|
||||
<!--Weave of 'The Inweb Manual and Source Code' generated by Inweb-->
|
||||
<div class="breadcrumbs">
|
||||
<ul class="crumbs"><li><b>The Inweb Manual and Source Code</b></li></ul></div>
|
||||
<p class="commentary firstcommentary"><a id="SP1"></a><b>§1. </b>This is the home page for documentation, human-readable source code and
|
||||
|
|
|
@ -200,10 +200,11 @@ and details of any cover-sheet to use.
|
|||
<pre class="displayed-code all-displayed-code code-font">
|
||||
<span class="plain-syntax"> </span><span class="reserved-syntax">match_results</span><span class="plain-syntax"> </span><span class="identifier-syntax">mr</span><span class="plain-syntax"> = </span><a href="../foundation-module/4-pm.html#SP9" class="function-link"><span class="function-syntax">Regexp::create_mr</span></a><span class="plain-syntax">();</span>
|
||||
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="../foundation-module/4-sm.html#SP22" class="function-link"><span class="function-syntax">Str::eq_wide_string</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">range</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="string-syntax">"0"</span><span class="plain-syntax">)) {</span>
|
||||
<span class="plain-syntax"> </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-></span><span class="element-syntax">booklet_title</span><span class="plain-syntax"> = </span><a href="../foundation-module/4-sm.html#SP4" class="function-link"><span class="function-syntax">Str::new_from_wide_string</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="string-syntax">"Complete Program"</span><span class="plain-syntax">);</span>
|
||||
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">W</span><span class="plain-syntax">-></span><span class="element-syntax">md</span><span class="plain-syntax">-></span><span class="element-syntax">single_file</span><span class="plain-syntax">) {</span>
|
||||
<span class="plain-syntax"> </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-></span><span class="element-syntax">booklet_title</span><span class="plain-syntax"> = </span><a href="../foundation-module/4-sm.html#SP3" class="function-link"><span class="function-syntax">Str::duplicate</span></a><span class="plain-syntax">(</span><a href="../foundation-module/8-bdfw.html#SP6" class="function-link"><span class="function-syntax">Bibliographic::get_datum</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">-></span><span class="element-syntax">md</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Title"</span><span class="plain-syntax">));</span>
|
||||
<span class="plain-syntax"> </span><a href="../foundation-module/3-fln.html#SP7" class="function-link"><span class="function-syntax">Filenames::write_unextended_leafname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">leafname</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">-></span><span class="element-syntax">md</span><span class="plain-syntax">-></span><span class="element-syntax">single_file</span><span class="plain-syntax">);</span>
|
||||
<span class="plain-syntax"> } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
|
||||
<span class="plain-syntax"> </span><span class="identifier-syntax">wv</span><span class="plain-syntax">-></span><span class="element-syntax">booklet_title</span><span class="plain-syntax"> = </span><a href="../foundation-module/4-sm.html#SP4" class="function-link"><span class="function-syntax">Str::new_from_wide_string</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">L</span><span class="string-syntax">"Complete Program"</span><span class="plain-syntax">);</span>
|
||||
<span class="plain-syntax"> </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">leafname</span><span class="plain-syntax">, </span><span class="string-syntax">"Complete"</span><span class="plain-syntax">);</span>
|
||||
<span class="plain-syntax"> }</span>
|
||||
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">wv</span><span class="plain-syntax">-></span><span class="element-syntax">theme_match</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="1-ts.html#SP2_2_1_1" class="named-paragraph-link"><span class="named-paragraph">Change the titling and leafname to match the tagged theme</span><span class="named-paragraph-number">2.2.1.1</span></a></span><span class="plain-syntax">;</span>
|
||||
|
|
|
@ -385,7 +385,7 @@ the weave tree. For example:
|
|||
|
||||
<pre class="displayed-code all-displayed-code code-font">
|
||||
<span class="plain-syntax">document weave order 0</span>
|
||||
<span class="plain-syntax"> head banner <Weave of 'Complete Program' generated by Inweb></span>
|
||||
<span class="plain-syntax"> head banner <Weave of 'The Twin Primes Conjecture' generated by Inweb></span>
|
||||
<span class="plain-syntax"> body</span>
|
||||
<span class="plain-syntax"> chapter <Sections></span>
|
||||
<span class="plain-syntax"> chapter header <Sections></span>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Complete Program</title>
|
||||
<title>The Twin Primes Conjecture</title>
|
||||
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
<meta name="viewport" content="width=device-width initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
@ -59,7 +59,7 @@ function togglePopup(material_id) {
|
|||
</ul>
|
||||
</nav>
|
||||
<main role="main">
|
||||
<!--Weave of 'Complete Program' generated by Inweb-->
|
||||
<!--Weave of 'The Twin Primes Conjecture' generated by Inweb-->
|
||||
<div class="breadcrumbs">
|
||||
<ul class="crumbs"><li><a href="../index.html">Home</a></li><li><b>The Twin Primes Conjecture</b></li></ul></div>
|
||||
<p class="purpose">This example of using inweb is a whole web in a single short file, to look for twin primes, a classic problem in number theory.</p>
|
||||
|
|
Loading…
Reference in a new issue