From cc7824a0ee168e8d4e0291ccc838bb3039cc0365 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 14 Sep 2023 21:48:40 +0300 Subject: (Presentation) Implemented width ftag --- awk-edits/Presentation.awk | 16 +++++++++++++++- src/presentation.css | 29 ++++++++++++++++++++++++++++- src/styles.css | 2 +- 3 files changed, 44 insertions(+), 3 deletions(-) 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] = "/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 \ "