From c3fa8fe00448aaac284e4b2cf72c16c35a426c12 Mon Sep 17 00:00:00 2001 From: "reaction.la" Date: Tue, 10 May 2022 13:09:30 +1000 Subject: [PATCH] Still bikeshedding those diagrams. Waste of time --- docs/merkle_patricia_dag.md | 39 +++++++--------- docs/writing_and_editing_documentation.md | 56 ++++++++++------------- 2 files changed, 41 insertions(+), 54 deletions(-) diff --git a/docs/merkle_patricia_dag.md b/docs/merkle_patricia_dag.md index f80e9c9..63e8037 100644 --- a/docs/merkle_patricia_dag.md +++ b/docs/merkle_patricia_dag.md @@ -258,15 +258,10 @@ information from the peer that has the node with more children. xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="29em" height="18em" - viewBox="0 170 220 140" -style="background-color:ivory" + viewBox="0 170 220 140" + style="background-color:ivory" stroke-width="1" - stroke-linecap="round" > - + stroke-linecap="round" > @@ -276,24 +271,24 @@ style="background-color:ivory" - -``` - -Where the script b.js is: - -```js -document.write("…") -document.write("…") -… -``` -When encountered, the browser downloads the script “b.js”, executes -it, and prints any output that the script might generate as if it were -inline HTML. - Each bottom level subtree should be a directory, and each html document in that directory should call the script which generates the horizontal bars on the path from the root to it. The bash script that uses pandoc to generate @@ -61,10 +43,6 @@ those documents from the markdown documents in that directory should also generate the javascript, concatenating all the javascripts of the parent directories into it. -Thus one final javascript file for each bottom level directory, which -generates a sequence of horizontal bars corresponding to the path to -that directory, followed by a horizontal bar for that directory. - One tricky bit is that you want the path highlighted. In which case it is probably easier for the bash script, which is recursing through the tree of files and keeps track of the path by which it got there in an enormous @@ -74,6 +52,23 @@ The directory name is what appears in the top level bars, and the final bar is a possibly multiline bar that is the titles of all the documents in the directory and any subdirectories. +On reflection, we will not use any cleverness to have a single header bar +file that all html files use because each top bar of each html file will b +different, having different items highlighted, and according to its depth in +the tree, a different number of '../' prepended to the links in the top bar. + +Each markdown file and directory in a directory should have a short +human friendly name, which will correspond to the name in the top bar, +and for each directory `foo` there is a should be a file `foo.link` which is the +path from within that directory that will be the file that comes up when +that directory name in the top bar is clicked on. + +We code a script runs through each directory twice constructing the +necessary bar, and then inserts it directly as a 'before' element in pandoc. +The script will be in `bash`, to run on all systems, and will use `sed` to +generate the bar, to run on all systems, because every computer system +everywhere has `sed` and `bash`. + # pandoc Much documentation is in Pandoc markdown, because easier to write. But html @@ -261,7 +256,7 @@ Without counting spaces, but without multiline Pipe table: -| Right | Left | Default | Center | +| Right | Left | Default | Centre | |------:|:-----|---------|:----------------------:| | 12 | 12 | 12 | 12 | | 123 | 123 | 123 | the quick brown fox jumped over the lazy dog | @@ -442,6 +437,11 @@ the s, and its direction set by the first point of the s. You change a control point, the effect is entirely local, does not propagate up and down the line. +If, however, you have a long move and a short move, your implied control +point is likely to be in a pathological location, in which case you have to +follow an S curve by a C curve, and manually calculate the first point of +the C to be in line with the last two points of the prior curve. + ``` default M point q point point t point t point ... t point ``` @@ -456,13 +456,6 @@ takes through all subsequent t points, sometimes pushing the curve into pathological territory where bezier curves give unexpected and nasty results. -Sometimes you just have to calculate the average of previous and -following control point, and make it the start point of a new c curve -followed s curves, or a new q curve followed by t curves. - -Or if the terminal curve is a given, calculate the prior control point as -twice the start point minus the following control point. - Scalable vector graphics are dimensionless, and the `` tag's height, width, and ViewBox properties translate the dimensionless quantities into pixels. The graphics default to fixed aspect ratio, and @@ -511,8 +504,7 @@ defined by very small source code. font-weight="400" stroke-width="2"> + d="M14 101, c40 -20, 30 -56, 54 -18, s60 15, 40 15 c -20,0 -10,-20 0,-20 q 5,0 10,10" /> A simple scalable vector graphic