[clug] GVIM paper size

Bryan Kilgallin (iiNet) kilgallin at iinet.net.au
Tue Aug 22 13:40:56 UTC 2017


I'm puzzled, Scott:

>>> What does:-
>>> less /etc/papersize
>>> say?
>>
>> "a4"
> 
> That is the default page size - check your printer settings as something
> is over-riding the Vi(m) page size settings.

"lp" results in the printer complaining that it wants US-letter paper!

"locale2papersize" contains the following.

{
#!/bin/sh -e
#
# locale2papersize outputs the paper size "a4" or "letter" based on
# the height and width in the locale that is passed as an argument.

export LC_PAPER=$1

height=$( locale height )
width=$( locale width )

if [ "$height" = 279 -a "$width" = 216 ]; then
     size=letter
else
     size=a4
fi

echo $size
}

But "locale" yields this.

{
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en_GB:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC=en_AU.UTF-8
LC_TIME=en_AU.UTF-8
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY=en_AU.UTF-8
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER=en_AU.UTF-8
LC_NAME=en_AU.UTF-8
LC_ADDRESS=en_AU.UTF-8
LC_TELEPHONE=en_AU.UTF-8
LC_MEASUREMENT=en_AU.UTF-8
LC_IDENTIFICATION=en_AU.UTF-8
LC_ALL=
}
-- 
www.netspeed.com.au/bryan/



More information about the linux mailing list