[OS X TeX] Default Paper Size
Gerben Wierda
Gerben.Wierda at rna.nl
Wed Nov 17 20:03:29 CET 2004
This is what I wrote in the perl configure script (have a look at what
I do to keep users from getting another panel):
sub selectPaperSize
{
if ($simpleinstall) {
my $syspapersizeline = `sudo -u \"$II2USER\" defaults find
DefaultPaperID`;
chomp( $syspapersizeline);
if ($syspapersizeline =~
/\{\s*DefaultPaperID\s*=\s*\"([^"]+)\"\s*;\s*\}/) {
my $syspapersize = $1;
$syspapersize =~ s/^iso-//;
$syspapersize =~ s/^na-//;
print "### ${PROGNAME}: Detected paper size $syspapersize
for $II2USER.\n";
$syspapersize =~ tr [A-Z] [a-z];
$dorepairownership = 1;
print "### ${PROGNAME}: Setting paper size $syspapersize
for dvips ...\n";
system( "texconfig dvips paper $syspapersize </dev/null")
== 0
or warn "### ${PROGNAME}: failed to set papersize
$syspapersize for dvips\n";
print "### ${PROGNAME}: Setting paper size $syspapersize
for pdfTeX ...\n";
system( "texconfig pdftex paper $syspapersize </dev/null")
== 0
or warn "### ${PROGNAME}: failed to set papersize
$syspapersize for pdftex\n";
return;
}
}
after which the user selection happens if there was no setting found or
there is no "simple" install
G
On 17 Nov 2004, at 17:30, Herb Schulz wrote:
> On 11/17/04 10:07 AM, "Gerben Wierda" <Gerben.Wierda at rna.nl> wrote:
>
>> If you read tex.configure you'll see
>>
>> sudo -u <user> defaults find DefaultPaperID
>>
>> because the tex.configure script is running is root.
>>
>> G
>>
>
> Howdy,
>
> I get the following:
>
> Herbs-PBG4:~ herbs$ sudo -u herbs defaults find DefaultPaperID
> Password:
> Found 1 keys in domain 'com.apple.print.PrintingPrefs':
> {DefaultPaperID =
> "na-letter"; }
>
> And, like I said, I've got the default set to ``US letter''.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest.com)
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
> & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>
>
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list