[Top][All Lists]

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

Re: 'mm' scaling value on top-level

From: Aaron Hill
Subject: Re: 'mm' scaling value on top-level
Date: Tue, 28 Sep 2021 09:39:14 -0700
User-agent: Roundcube Webmail/1.4.9

On 2021-09-28 9:21 am, Werner LEMBERG wrote:
OK, thanks for the pointer.  But I wonder what exactly the problem is:
The paper size strings passed to `set-default-paper-size` *do* contain
the 'mm' variable, see `paper-alist`.  Is the expansion of 'mm'
delayed?  Isn't there a possibility to do the same on the top level?

You could probably pass the values in a similar quoted style that then gets eval'ed within the paper context where the measurements are defined:

#(set-default-paper-size '(cons (* 55 mm) (* 89 mm)))

Here's a hack that patches the original function to automate setting paper-alist:

\version "2.22.0"

#(let ((orig set-default-paper-size))
  (define (proc arg . rest)
   (if (string? arg)
    (apply orig arg rest)
     (set! paper-alist (cons (cons "custom-inline" arg) paper-alist))
     (apply orig "custom-inline" rest))))
  (set! set-default-paper-size proc))

#(set-default-paper-size '(cons (* 50 mm) (* 100 mm)) 'landscape)

{ b'4 }

-- Aaron Hill

reply via email to

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