Work in progress on PDF generation

This commit is contained in:
Brian E Carpenter
2024-04-04 11:14:09 +13:00
parent bc9fea3110
commit 7e9a00c328
6 changed files with 42 additions and 17 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
## CERN and the LHC
The [CERN laboratory](https://www.cern.ch) and the [Worldwide LHC Computing Grid (WLCG)](https://home.cern/science/computing/grid) are large users of IPv6 for massive data transfers.
Some recent statistics are shown here:<img src="./CERN-IPv6-Feb24.png" alt="Graph showing 644 Gb/s">
Some recent statistics are shown here:
<img src="./CERN-IPv6-Feb24.png" alt="Graph showing 644 Gb/s">
(Image from the February 2024 data challenge at CERN.)
+1 -1
View File
@@ -1,5 +1,5 @@
# book6
<img src="./book6logo.png" alt="book6 logo" width="200px" height="auto"/>
![](book6logo.png "book6 logo")
<ins>A collaborative IPv6 book.<ins>
+2
View File
@@ -1,5 +1,7 @@
This folder `pdf` is used for generating a complete PDF file of book6 and is not otherwise interesting.
As of 2024-04-04 the contents of this folder are work-in-progress and not useful to readers.
The image files are duplicated here intentionally.
The intermediate file `baked.md` is a complete markdown of the whole book.
+14 -14
View File
@@ -1,5 +1,5 @@
# book6
<img src="./book6logo.png" alt="book6 logo" width="200px" height="auto"/>
![](book6logo.png "book6 logo")
<ins>A collaborative IPv6 book.<ins>
@@ -26,10 +26,10 @@ Released under the Creative Commons Attribution 4.0 license, known as CC BY 4.0.
Version captured at 2024-04-03 13:53:33 UTC+1300
Version captured at 2024-04-04 10:59:19 UTC+1300
<!-- page break -->
# book6: A Collaborative IPv6 Book.
<img src="./book6logo.png" alt="book6 logo" width="200px" height="auto"/>
![x](book6logo.png "book6 logo")
This is the current list of contents. It will change as the book evolves.
There is also an [index](#book6-main-index),
@@ -2375,7 +2375,7 @@ various technologies:
and comparison of these technologies.
The following figure illustrates such a scenario.
<img src="./vasilenko-IPv4aaS.svg" alt="User devices connected to Internet via IPv6 infrastructure" width="auto" height="auto"/>
![x](vasilenko-IPv4aaS.svg "User devices connected to Internet via IPv6 infrastructure")
- 464XLAT is the widely preferred translation technology now because it
has a natural synergy with NAT64 (which is highly desirable by itself)
@@ -3432,7 +3432,7 @@ addresses `2001:db8:abcd:0101::abc1` and `2001:db8:b123:0101::def2`.
values.)
The following diagram shows the example:
<img src="./multiPrefix.svg" alt="Routers and routing clouds as described above">
![x](multiPrefix.svg "Routers and routing clouds as described above")
If, for some reason, there is more than one subnet router on the subnet,
the host can be informed which one to use as suggested in
[RFC8028](https://www.rfc-editor.org/info/rfc8028).
@@ -3760,7 +3760,7 @@ fine.
## CERN and the LHC
The [CERN laboratory](https://www.cern.ch) and the [Worldwide LHC Computing Grid (WLCG)](https://home.cern/science/computing/grid) are large users of IPv6 for massive data transfers.
Some recent statistics are shown here:<img src="./CERN-IPv6-Feb24.png" alt="Graph showing 644 Gb/s">
Some recent statistics are shown here:![x](CERN-IPv6-Feb24.png "Graph showing 644 Gb/s")
(Image from the February 2024 data challenge at CERN.)
@@ -3823,7 +3823,7 @@ Internet Registry (RIR) to show the number of the Internet IPv6 users
compared with the total Internet population (in million, see next
table).
<img src="./Section5_Table1.jpg" alt="Table shows 25% annual IPv6 growth 2018 to 2022">
![x](Section5_Table1.jpg "Table shows 25% annual IPv6 growth 2018 to 2022")
A third of the Internet population apparently employs IPv6. It is also
interesting to look at the growth curve. The main indicator here is the
@@ -3851,7 +3851,7 @@ have an associated Autonous System Number (ASN).
provides statistics on the evolution of IPv6 support across the ASNs in
the world, as observed in the Internet routing tables.
<img src="./Section5_Table2.jpg" alt="Table shows 18% annual IPv6 growth 2018 to 2022">
![x](Section5_Table2.jpg "Table shows 18% annual IPv6 growth 2018 to 2022")
The percentage of IPv6-capable ASNs is growing over the years, which is
a good sign. On the other hand, the table does not allow to understand
@@ -4126,7 +4126,7 @@ flowchart LR
C - -> B[BCP] - -> L
-->
<img src="./rfc-diagram.svg" width=800 alt="Diagram of RFC status">
![x](rfc-diagram.svg "Diagram of RFC status")
An important RFC is the latest version of
[IPv6 Node Requirements](https://www.rfc-editor.org/info/bcp220), which
@@ -4168,7 +4168,7 @@ flowchart LR
D - -> X[draft-xyz-*] - -> P[Personal work] - -> J
-->
<img src="./id-diagram.svg" width=800 alt="Diagram of I-D status">
![x](id-diagram.svg "Diagram of I-D status")
There are also numerous books, book chapters, and other documents about
IPv6. However, any source that is more than one or two years old is
@@ -5435,7 +5435,7 @@ Embedded in markdown as an SVG file generated by [*mermaid.live*](https://mermai
Displayed thus:
<img src="./example1.svg" width=250 alt="Start here, end here">
![x](example1.svg "Start here, end here")
Example generated with *dia*:
@@ -5443,7 +5443,7 @@ Example generated with *dia*:
<img src="./diag.svg" alt="Disk feeding tape">
```
<img src="./diag.svg" alt="Disk feeding tape">
![x](diag.svg "Disk feeding tape")
Please add alternate text to help people with visual difficulties.
@@ -5467,7 +5467,7 @@ Section text goes here
### [<ins>Previous</ins>](#markdown-usage) [<ins>Chapter Contents</ins>](#chapter-template)
<!-- page break -->
# book6 Main Index
<img src="./book6logo.png" alt="book6 logo" width="200px" height="auto"/>
![x](book6logo.png "book6 logo")
Generated at 2024-02-25 14:10:55 UTC+1300
@@ -5944,7 +5944,7 @@ If you think any keywords are missing, please raise an issue (use link on GitHub
### [<ins>Back to main Contents</ins>](#list-of-contents)<!-- page break -->
# book6 Citation Index
<img src="./book6logo.png" alt="book6 logo" width="200px" height="auto"/>
![x](book6logo.png "book6 logo")
Generated at 2024-02-25 14:10:55 UTC+1300
BIN
View File
Binary file not shown.
+22 -1
View File
@@ -10,6 +10,7 @@
# Version: 2024-01-18 - skip code blocks when fixing citations
# Version: 2024-01-29 - use dedicated pdf directory
# Version: 2024-04-02 - copy image files to pdf directory
# Version: 2024-04-04 - change image citations to suit pandoc
########################################################
# Copyright (C) 2024 Brian E. Carpenter.
@@ -118,7 +119,7 @@ def uncase(l):
return u
def fix_section(raw):
"""Change citations throughout a section"""
"""Change citations and images throughout a section"""
new = []
skipping = False
for line in raw:
@@ -137,6 +138,7 @@ def fix_section(raw):
new.append(line)
continue
if "](" in line:
#need to reformat citation
outline = ""
while "](" in line:
head, line = line.split("](", maxsplit=1)
@@ -163,6 +165,25 @@ def fix_section(raw):
target = "book6-citation-index"
outline += head + "](#" + target +")"
outline += line
elif "<img src=" in line:
#need to munge image reference (lazy, only handles the first one)
head, tail = line.split("<img src=", maxsplit=1)
#print(head, tail)
try:
img, tail = tail.split("/>", maxsplit=1)
except:
img, tail = tail.split(">", maxsplit=1)
img = img.replace("'", '"') #normalise string delimiters to "
imgfile, imgalt = img[1:].split('"', maxsplit=1)
imgfile = imgfile.replace("./", "") #normalise image file name
# extract alternative text
try:
_, imgalt = imgalt.split('alt="', maxsplit=1)
imgalt, _ = imgalt.split('"', maxsplit=1)
except:
imgalt = "No description available"
#build image citation
outline = head+'![x]('+imgfile+' "'+imgalt+'")'+tail
else:
outline = line
#Avoid unwanted anchors