From 73a915189ace996d406131716f0ce42bf2a7192c Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 23 Sep 2024 06:47:13 +0200 Subject: Add a macro for references --- m4/ref.m4 | 6 ++++++ src/blog/windowing/index.gsp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 m4/ref.m4 diff --git a/m4/ref.m4 b/m4/ref.m4 new file mode 100644 index 0000000..482763b --- /dev/null +++ b/m4/ref.m4 @@ -0,0 +1,6 @@ +m4_define(__REFCNT, 0) +m4_define(MKREF, ‘‘ + m4_define(‘‘__REFCNT’’, m4_incr(__REFCNT)) + m4_define(‘‘__REF_$1’’, __REFCNT) +’’) +m4_define(REF, ‘‘__REF_$1’’) diff --git a/src/blog/windowing/index.gsp b/src/blog/windowing/index.gsp index 4307ecb..285451e 100644 --- a/src/blog/windowing/index.gsp +++ b/src/blog/windowing/index.gsp @@ -56,7 +56,7 @@ html lang="en" { while launching a second application will cause the screen to be segmented into two halves, with one window taking up 50% of the screen on the left and another taking up 50% of the screen on the - right@sup{-1}. + right@sup{-MKREF(wm)}. } p {= @@ -73,7 +73,7 @@ html lang="en" { hr{} - aside data-ref="1" {= + aside data-ref="REF(wm)" {= This is very dependent on the window manager being used and the users configuration of it of course, but this holds in the general case in my personal experience. -- cgit v1.2.3