Re: Lack of flexible pagesizing [Was "Re: minipage + prosper problem"]
Chris Kuklewicz <[email protected]>
| Newsgroups | gmane.comp.tex.latex.prosper.user |
|---|---|
| Message-ID | <[email protected]> |
To continue the discussion...
On Mon, Jun 16, 2003 at 09:56:37AM -0700, Ted Stern wrote:
> On 16 Jun 2003, Chris Kuklewicz wrote:
> >
> > prosperletter is a slightly modified prosperclass that is setup for
> > 8.5 inch x 11 inch paper. PPPrleLetter is my modified template (for
> > which I will say \noindent\psgrid is the tool for modifying
> > templates).
>
> I'd like to see what Chris does to set up letter proportions, but this brings
> up a point which has bothered me since I started looking at the prosper
> package a month ago. Namely, the way the page size is handled is inflexible.
> To me, it is just plain bad programming to not parameterize page settings so
> that they work with any page size, be it a4, a3 or letter.
I did not do much to prosper.cls:
[chrisk@kuklewicz prosper]$ diff -u prosper.cls prosperletter.cls
--- prosper.cls Fri Mar 21 07:33:26 2003
+++ prosperletter.cls Wed Jun 11 08:08:41 2003
@@ -15,9 +15,12 @@
%% CVSId : $Id: prosper.cls,v 1.24 2002/11/25 14:35:50 exupery Exp $
%%=============================================================================
+% chrisk
+
\def\Prosper@Version{2001/07/17, v. 1.5}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{prosper}[\Prosper@Version]
+\ProvidesClass{prosperletter}[\Prosper@Version]
+\typeout{*** prosperletter modified by chrisk ***}
\typeout{(c) 2000-2001 Frederic Goualard, EPFL, Switzerland}
\typeout{ and Peter Møller Neergaard, Boston Univ., USA}
\typeout{CVSId: $Id: prosper.cls,v 1.24 2002/11/25 14:35:50 exupery Exp $}
@@ -75,7 +78,9 @@
\InputIfFileExists{seminar-bg2-lepennec.fix}{}\relax
\RequirePackage[\@pdf@driver,bookmarks,%
- a4paper,%
+%%% XXX chrisk
+ letterpaper,%
+%%% a4paper,%
% pdfmenubar=false,%
pdfhighlight=/I,%
% pdftoolbar=false,%
>
> For instance, in prosper.cls,
>
> \def\Cropping@Box{0 0 595 890} % By default: cropping to a4 paper dimensions
>
The cropping box does not seem to affect much, so far as I've noticed.
> These values are point sizes that can be calculated from \paperwidth and
> \paperheight using the calc package. Or at the very least, "a4" and "letter"
> could be made class options, with a4 the default, but with the optional letter
> setting of
>
> \def\Cropping@Box{0 0 612 792} % cropping to letterpaper dimensions
True. Also, the geometry package might be worth using for this sort of thing.
>
> Another point -- prosper.cls has a nice setup for the eventual pdf output, but
> not postscript output:
>
> \ifDVItoPS
> \else
> \AtEndOfClass{%
> \hypersetup{pdfpagescrop=\Cropping@Box}%
> }
> \if@distiller
> \else
> \AtBeginDvi{%
> \pdfmark{pdfmark=/PAGES,
> Raw={/Rotate 90}}
> }%
> \fi
> \fi
>
> Now dvips doesn't put the pages in the proper orientation unless given the -t
> landscape option, but this can be remedied with something like
>
> \AtBeginDvi{%
> \special{!/landplus90 true store}% for correct orientation
> }%
>
> so an explicit option doesn't need to be provided.
That could be a nice addition.
>
> Finally, all the cute pstricks boxes used in the various PPR*.sty files are
> hardcoded to hardcoded coordinates. These too should be parameterized using
> calc. \rightupper could be set to say, \paperwidth - 0.5in.
This is the real reason why a4 is hardcoded, the template files were
never designed to handle it. This is why I had to may my own template
(evolved from contemporain, I think).
Prosper documents are nice/esay/simple to create....but there is no
simple way to modify, much less create from scratch, a new template:
You have to learn PSTricks, and then use much trial and error.
(again, \noindent\psgrid()()() is your best friend).
You have to learn about the wierd magstep mechanism where (1.2)^4 *
1000 is 2.074.
The above means there is no simple way to do what a page template is
for: to place items with absolute reference to some edge or corner of
the physical page. [ Perhaps \psset with \inversemagstep ? Hmmm... ]
Placement/sizing of the content minipage is also annoying trial and
error. An standard designer's debug option to place a frame around
either the Title or Content area would help.
There is no provided way for templates to redesign the footer text, as
it is buried in the pagestyle mechanism. [ Perhaps fancyhdr would
work? Hmm... ]
To do this sort of layout, calc (and maybe realcalc) are needed.
The geometry class and the textpos class would be good places to start
for better page control. Geometry offers the expected margin based
page setup. And textpos gives an absolute (x,y) coordinate system for
placing text, making moving and sizing easier to do.
Aside: Together geomtry and textpos with a0poster (for font sizing)
make laying out bits of content across a large format poster much
easier (without magstep). (With pstricks, it can be made quite pretty
and you can use \noindent\psgrid).
--
Chris
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting