File: alignment.rem

package info (click to toggle)
remind 06.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 40,884 kB
  • sloc: ansic: 25,733; sh: 6,377; perl: 2,926; lisp: 431; makefile: 263
file content (20 lines) | stat: -rwxr-xr-x 665 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env -S remind -@2
# Demo the columns() function
#
# Run as:  remind -@2 alignment.rem
# SPDX-License-Identifier: GPL-2.0-only

SET $AddBlankLines 0
BANNER %

FSET center(x) pad("", " ", (columns() - columns(x))/2) + x
FSET right(x) pad("", " ", columns() - columns(x)) + x

MSG This is left-aligned.
MSG [ansicolor(0,255,0)]🌕 🌕 🌕 🌕 This is also left-aligned.[ansicolor("")]

MSG [center("This is centered.")]
MSG [ansicolor(255,255,0) + center("🌕 🌕 🌕 🌕 This is also centered. ") + ansicolor("")]

msg [right("This is right-aligned.")]
msg [ansicolor(255,0,0) + right("This is also right-aligned. 🌕 🌕 🌕") + ansicolor("")]