ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Layout issues
@ 2002-03-08 19:24 Giuseppe Bilotta
  2002-03-09 22:16 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Giuseppe Bilotta @ 2002-03-08 19:24 UTC (permalink / raw)


Hello,

a couple of questions on page layout.

Issue #1: the default layout does not fit in an A4 sheet. First of
all, as it is it puts part of the left margin outside
of the printed page (at least on my system), as shown by

\setuppapersize[A4][A4]
\setupinmargin[left][align=normal]
\starttext
\showframe
\inmargin{Hello there}
\stoptext

But if the backspace is shifted enough to bring the whole
left margin on the page, the right margin falls off the page (by a
very small amount), as shown by

\setuppapersize[A4][A4]
\newdimen\mybackspace
\mybackspace\leftmarginwidth
\advance\mybackspace\leftmargindistance
\setuplayout[backspace=\mybackspace]

\setupinmargin[left][align=outer]
\setupinmargin[right][align=outer]
%%% ^^^^^^^^^^ Why can't I use \setupinmargin[left,right] ?
\starttext
\showframe
\showsetups
\inmargin{Hello there}
\inothermargin{Hello there}
\stoptext

Issue #2: parametric setup of the layout.

This can be done already, but I was thinking of some slightly more
'equationish' way of setting the parameters, something probably
typical of the MetaPost approach (say,
leftmargin=rightmargin=.2width, leftmargindistance=rightmargindistance,
with some predefined equations like
leftmargin+leftmargindistance+width+rightmargindistance+rightmargin=
paperwidth-backspace-leftedge-leftedgedistance-rightedge-leftedgedistance).

Issue #3: scaling/fitting

Often (to save paper or for other reasons) I like to scale my work
(usually done with \setuppapersize[A4][A4]) so that it fits in two
pages per sheet. With LaTeX, I would achieve this by creating a
DVI, converting it to PS and the use various the psutils to
rearrange/merge pages.

ConTeXt has its own imposition capabilities, so one would think
that

\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]

would be enough.

Yet this way to achieve things presents interesting problems
related to the (possible) presence of absolute dimensions within
the document. What is needed is thus some kind of arranging option
that provides to automatic scaling/rotating AFTER the document has
been typeset, so that, for example:

\setuppapersize[A4][A4,landscape]
\setuparranging[2SIDE,scaled]

provides automatic scaling of the pages to fit the physical page
---the scaling factor is
max(paper_height/physical_paper_height,
    paper_width/physical_paper_width)

(Ab)using magnification could be an option as well.

--
Giuseppe "Oblomov" Bilotta


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Layout issues
  2002-03-08 19:24 Layout issues Giuseppe Bilotta
@ 2002-03-09 22:16 ` Hans Hagen
  2002-03-11 11:24   ` Re[2]: " Giuseppe Bilotta
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hans Hagen @ 2002-03-09 22:16 UTC (permalink / raw)
  Cc: ntg-context

At 08:24 PM 3/8/2002 +0100, Giuseppe Bilotta wrote:

>a couple of questions on page layout.
>
>Issue #1: the default layout does not fit in an A4 sheet. First of
>all, as it is it puts part of the left margin outside
>of the printed page (at least on my system), as shown by

right, margin dimensions only play a role in alignment and stacking margins

>\setupinmargin[left][align=outer]
>\setupinmargin[right][align=outer]
>%%% ^^^^^^^^^^ Why can't I use \setupinmargin[left,right] ?

hm, is this a feature request? [should go into database then, even if i 
could implement it in 30 seconds; since you seem to like generating 
formats, i'll send you a new page-mar.tex -)]

This can be done already, but I was thinking of some slightly more
>'equationish' way of setting the parameters, something probably
>typical of the MetaPost approach (say,
>leftmargin=rightmargin=.2width, leftmargindistance=rightmargindistance,
>with some predefined equations like
>leftmargin+leftmargindistance+width+rightmargindistance+rightmargin=
>paperwidth-backspace-leftedge-leftedgedistance-rightedge-leftedgedistance).

i have been playing with this some time ago, something \definedimension, 
but it's impossible to get thsi robust (esp in tex versus etex);

however, if you look into your beta cont-new.tex, you will see:

\beginETEX \dimexpr

\definepapersize
   [oversized]
   [\c!breedte=\dimexpr(\papierbreedte+1.5cm),
    \c!hoogte=\dimexpr(\papierhoogte+1.5cm)]

\definepapersize
   [doublesized]
   [\c!breedte=\dimexpr(\papierbreedte),
    \c!hoogte=\dimexpr(2\papierhoogte)]

\definepapersize
   [doubleoversized]
   [\c!breedte=\dimexpr(\papierhoogte+1.5cm),
    \c!hoogte=\dimexpr(2\papierbreedte+1.5cm)]

\endETEX

>Issue #3: scaling/fitting
>
>Often (to save paper or for other reasons) I like to scale my work
>(usually done with \setuppapersize[A4][A4]) so that it fits in two
>pages per sheet. With LaTeX, I would achieve this by creating a
>DVI, converting it to PS and the use various the psutils to
>rearrange/merge pages.
>
>ConTeXt has its own imposition capabilities, so one would think
>that
>
>\setuppapersize[A5][A4,landscape]
>\setuparranging[2SIDE]
>
>would be enough.
>
>Yet this way to achieve things presents interesting problems
>related to the (possible) presence of absolute dimensions within
>the document. What is needed is thus some kind of arranging option
>that provides to automatic scaling/rotating AFTER the document has
>been typeset, so that, for example:
>
>\setuppapersize[A4][A4,landscape]
>\setuparranging[2SIDE,scaled]
>
>provides automatic scaling of the pages to fit the physical page
>---the scaling factor is
>max(paper_height/physical_paper_height,
>     paper_width/physical_paper_width)
>
>(Ab)using magnification could be an option as well.

   texexec --pdfarr --paper=A4A3 --print=2SIDE yourfile.pdf

(prints ok from acrobat since it scales down to A4) or

   texexec --pdfcomb --comb=2*2 yourfile.pdf

is your friend.

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-ade.nl
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re[2]: Layout issues
  2002-03-09 22:16 ` Hans Hagen
@ 2002-03-11 11:24   ` Giuseppe Bilotta
  2002-03-11 18:16   ` Daniel Joyce
       [not found]   ` <02031111562609.27435@gaia>
  2 siblings, 0 replies; 7+ messages in thread
From: Giuseppe Bilotta @ 2002-03-11 11:24 UTC (permalink / raw)
  Cc: ntg-context

Saturday, March 09, 2002 Hans Hagen wrote:

HH> right, margin dimensions only play a role in alignment and
HH> stacking margins

Yes, but they fall outside of the page anyway :-)

>>\setupinmargin[right][align=outer]
>>%%% ^^^^^^^^^^ Why can't I use \setupinmargin[left,right] ?

HH> hm, is this a feature request? [should go into database then,
HH> even if i could implement it in 30 seconds; since you seem to
HH> like generating formats, i'll send you a new page-mar.tex -)]

Hey, I don't like generating formats! I'm collecting so many
patches that they take more room than the original ConTeXt :-)

Ok, upgraded.

>>(Ab)using magnification could be an option as well.

HH>    texexec --pdfarr --paper=A4A3 --print=2SIDE yourfile.pdf
HH> (prints ok from acrobat since it scales down to A4) or
HH>    texexec --pdfcomb --comb=2*2 yourfile.pdf
HH> is your friend.

Ok, I gave these some testing. They get pretty close to what I
wanted to achieve, with some issues, but I can fine tune these by
hand.

--
Giuseppe "Oblomov" Bilotta


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Layout issues
  2002-03-09 22:16 ` Hans Hagen
  2002-03-11 11:24   ` Re[2]: " Giuseppe Bilotta
@ 2002-03-11 18:16   ` Daniel Joyce
       [not found]   ` <02031111562609.27435@gaia>
  2 siblings, 0 replies; 7+ messages in thread
From: Daniel Joyce @ 2002-03-11 18:16 UTC (permalink / raw)
  Cc: ntg-context

>
>    texexec --pdfarr --paper=A4A3 --print=2SIDE yourfile.pdf
>
> (prints ok from acrobat since it scales down to A4) or
>
>    texexec --pdfcomb --comb=2*2 yourfile.pdf

	This doesn't work at all for me.

	Plus, even if comb=1*3 did, how can I be sure the pages as printed would 
still fit on a 3x5 card?

	The best bet is to fix setuplayout...... *sigh*

	I just want to print a list of cards, multiples per page, all of them 
different, so I can cut them out and use them in a game.

>
> is your friend.
>
> Hans
>

	-Daniel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Layout issues
       [not found]   ` <02031111562609.27435@gaia>
@ 2002-03-11 22:24     ` Hans Hagen
  2002-03-13  5:16       ` Daniel Joyce
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2002-03-11 22:24 UTC (permalink / raw)
  Cc: ntg-context

At 11:56 AM 3/11/2002 -0600, Daniel Joyce wrote:

> >
> >    texexec --pdfarr --paper=A4A3 --print=2SIDE yourfile.pdf
> >
> > (prints ok from acrobat since it scales down to A4) or
> >
> >    texexec --pdfcomb --comb=2*2 yourfile.pdf
> >
> > is your friend.
> >
> > Hans
> >
>
>
>         It's not a very good friend.. <:)
>
>         No matter what I say, it puts only 1 index card page per US 
> letter page.
>I'm laying out 3x5 index cards for 1 page, so 3 should fit on a page, I
>have about 16 of them, but pdfcombine only puts one on the first page, and
>that is it. The other 15 index cards are ignored
>
>         I've tried using 'pages' to tell it to output all the pages, but it
>ignores it.

this is strange, it should put 15 on a page; which version of pdftex are 
you using?

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-ade.nl
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Layout issues
  2002-03-11 22:24     ` Hans Hagen
@ 2002-03-13  5:16       ` Daniel Joyce
  2002-03-13 10:38         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Joyce @ 2002-03-13  5:16 UTC (permalink / raw)


> >         It's not a very good friend.. <:)
> >
> >         No matter what I say, it puts only 1 index card page per US
> > letter page.
> >I'm laying out 3x5 index cards for 1 page, so 3 should fit on a page, I
> >have about 16 of them, but pdfcombine only puts one on the first page,
> > and that is it. The other 15 index cards are ignored
> >
> >         I've tried using 'pages' to tell it to output all the pages,
> > but it ignores it.
>
> this is strange, it should put 15 on a page; which version of pdftex are
> you using?
>
> Hans
>
	-noarrange does not work either.

	The version is pdfeTeX (Web2C 7.3.1) 3.14159-0.13d-2.1 

	-Daniel Joyce


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Layout issues
  2002-03-13  5:16       ` Daniel Joyce
@ 2002-03-13 10:38         ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2002-03-13 10:38 UTC (permalink / raw)
  Cc: ntg-context

At 11:16 PM 3/12/2002 -0600, Daniel Joyce wrote:

> > >         It's not a very good friend.. <:)
> > >
> > >         No matter what I say, it puts only 1 index card page per US
> > > letter page.
> > >I'm laying out 3x5 index cards for 1 page, so 3 should fit on a page, I
> > >have about 16 of them, but pdfcombine only puts one on the first page,
> > > and that is it. The other 15 index cards are ignored
> > >
> > >         I've tried using 'pages' to tell it to output all the pages,
> > > but it ignores it.
> >
> > this is strange, it should put 15 on a page; which version of pdftex are
> > you using?
> >
> > Hans
> >
>         -noarrange does not work either.
>
>         The version is pdfeTeX (Web2C 7.3.1) 3.14159-0.13d-2.1

then first upgrade to at least version 0.14 or better 1.0

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-ade.nl
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-03-13 10:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-08 19:24 Layout issues Giuseppe Bilotta
2002-03-09 22:16 ` Hans Hagen
2002-03-11 11:24   ` Re[2]: " Giuseppe Bilotta
2002-03-11 18:16   ` Daniel Joyce
     [not found]   ` <02031111562609.27435@gaia>
2002-03-11 22:24     ` Hans Hagen
2002-03-13  5:16       ` Daniel Joyce
2002-03-13 10:38         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).