mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] letter size preference


Chronological Thread 
  • From: Robert Jerrard <address@hidden>
  • To: address@hidden
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] letter size preference
  • Date: Mon, 28 Jan 2008 14:44:09 -0700

On Mon, 2008-01-28 at 22:30 +0100, Henri Lesourd wrote:
> >Sorry, I am not being clear enough. Texmacs must determine the default
> >paper size for the system somehow, even the very first time you use
> >texmacs before you have selected any preferences. Ours "knows" the paper
> >size is "letter" rather than A4. How does Texmacs determine what paper
> >size to use but default?
> >
> The preferences are stored somewhere in .TeXmacs (need
> to grep them to know exactly where and how a given default
> value is stored).

I was looking here but could not find anything useful. Curiosity got the
better of me so I kept asking.

> One could imagine that the preferences in the .TeXmacs are
> initialized during the install, although I don't think it
> is the case.
>
> Usually, default values are stored in env_default.cpp, but
> for the paper size, it cannot be, for it is :
> [[
> env (PAGE_TYPE)= "a4";
> ]]
>
> , and as you said, the real value is "letter", thus it is
> overriden later.
>
>
> > Does it run some command system command or is
> >it using an environment variable or does it examine the
> >file /etc/papersize (on Debian this file has the word letter in it) or
> >what?
> >
> >
> >
> Bingo (tm-print.scm) :
> [[
> (tm-define (get-default-paper-size)
> (or (getenv "PAPERSIZE")
> (let ((papersizefile (or (getenv "PAPERCONF") '"/etc/papersize")))
> (if
> (access? papersizefile R_OK)
> (let ((pps-port (open-input-file papersizefile)))
> (let ((size (read-line pps-port)))
> (begin
> (close-input-port pps-port)
> size)))
> "a4"))))
> ]]

Awesome, thanks! Bob

--
Dr. Robert J. Jerrard, Professor of Mathematics,
Concordia University College of Alberta,
7128 Ada Blvd., Edmonton, Alberta, T5B 4E4, Canada.
Phone: (780) 479-9291, Fax: (780) 474-1933.





Archive powered by MHonArc 2.6.19.

Top of page