help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enclosing text in a box


From: Emanuel Berg
Subject: Re: Enclosing text in a box
Date: Thu, 17 Nov 2022 07:57:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis wrote:

> ┏━━━━━━━━━━━━━━━━━━━━━━━━━┓
> ┃ And now good bye to all ┃
> ┗━━━━━━━━━━━━━━━━━━━━━━━━━┛

Can you use your program to make a neat table out of
this, perhaps?

It looks neat below but I post-processed it. I mean,
e-manually ...

;;; -*- lexical-binding: t -*-
;;
;; this file
;;   https//dataswamp.org/~incal/emacs-init/war.el

(require 'math)

(defun war ()
  (let*((ukr  603628)
        (pre   42000)
        (smo  119000)
        (ret   74443)
        (most (+ pre smo))
        (now  (- most ret)) )
    (insert (format "Ukraine area %d (km2)\n"                 ukr)
            (format "Occupied pre-2022 %d %s\n"               pre  (percent pre 
 ukr t))
            (format "Additionally occupied in 2022 %d %s\n"   smo  (percent smo 
 ukr t))
            (format "Biggest area occupied %d %s\n"           most (percent 
most ukr t))
            (format "Retaken during counteroffensive %d %s\n" ret  (percent ret 
most t))
            (format "Occupied area 2022-11-17 %d %s\n"        now  (percent now 
 ukr t)) )))

;; Ukraine area (km2)               603 628
;; Occupied pre-2022                 42 000   7.0%
;; Additionally occupied in 2022    119 000  19.7%
;; Biggest area occupied            161 000  26.7%
;; Retaken during counteroffensive   74 443  46.2%
;; Occupied area 2022-11-17          86 557  14.3%

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]