Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits / Presentation.awk
diff options
context:
space:
mode:
Commitcc7824a0ee168e8d4e0291ccc838bb3039cc0365 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-09-14 21:48:40 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-01 21:26:55 +0300
Files3c64a41e8fb24bf07557391948adc5dfba2f8c36 /awk-edits/Presentation.awk
syndamia.com-cc7824a0ee168e8d4e0291ccc838bb3039cc0365.tar
syndamia.com-cc7824a0ee168e8d4e0291ccc838bb3039cc0365.tar.gz
syndamia.com-cc7824a0ee168e8d4e0291ccc838bb3039cc0365.zip
Parenta8172d879909c6d4eb8d26eaa770c60dcb786d37 (diff)
(Presentation) Implemented width ftag
1 files changed, 15 insertions, 1 deletions
-rw-r--r--awk-edits/Presentation.awk16
diff --git a/awk-edits/Presentation.awk b/awk-edits/Presentation.awk
index e54e313..ca75327 100644
--- a/awk-edits/Presentation.awk
+++ b/awk-edits/Presentation.awk
@@ -50,6 +50,11 @@
# multiple elements into one table cell.
# &&/cont Ends (the last started) &&cont
#
+# &&widthPER Sets the element's width to be PER percentage. Primarily made
+# for images, since perfect scaling is impossible.
+# Available values for PER: 5, 10, 15, 20, ..., 90, 95
+# &&/width Text between &&widthPER and &&/width is sized accordingly
+#
# -- Surroundings --
#
# As stated, there can only be one presentation per page.
@@ -151,8 +156,16 @@ BEGIN {
ended[24] = 1
names[25] = "cont"
ended[25] = 1
+ names[26] = "&#47;width"
+ ended[26] = 0
+
+ nameslength = 26 # POSIX compatibility: length(names) isn't valid
- nameslength = 25 # POSIX compatibility: length(names) isn't valid
+ for (i = 5; i <= 95; i += 5) {
+ nameslength++
+ names[nameslength] = "width" i
+ ended[nameslength] = 0
+ }
pres = ORS \
"<nav id=\"presentCont\">" ORS \
@@ -186,6 +199,7 @@ BEGIN {
rep[ 5] = "<div class=\"layout-table fixed-layout\"><div class=\"layout-row\">" # <table><tr> (layout-row > * is td)
rep[ 6] = "</div><div class=\"layout-row\">" # </tr><tr>
rep[ 7] = "</div>" # &&/font
+ rep[26] = "</div>" # &&/width
presInsideCode = 0
slideIndex = 0