ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: doublesided PDF - first and last page singlesided
@ 2012-04-15 22:17 Jan Heinen
  2012-04-15 22:29 ` Aditya Mahajan
  2012-04-16  6:35 ` Thomas A. Schmitz
  0 siblings, 2 replies; 11+ messages in thread
From: Jan Heinen @ 2012-04-15 22:17 UTC (permalink / raw)
  To: ntg-context

I was lucky to get a fast answer - but with your code I 
don't get the right result:

  -- start your code

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode
\starttext
First page
\startmode[booklet]
\null \page
\stopmode
etc.
\stoptext

Thomas

  -- stop

With your code I get:

1 2      first page of the pdf
3 4      second
5 6      third
7 8      fourth



But I want to get:

1         first page of the pdf (coverpage)
2 3      second
4 5      third
6 7      fourth
8         fifth (coverpage)


I know how to use with modes - but the answer must be an other.

Maybe I have to explain it more clearly:

on the first PDF-Page (A5) there should be only the 
cover-page (page 1)
     \setuppapersize[A5][A5]

      \setuparranging[1SIDE]%<- I don't know how to write it - nothing was working


On the second PDF-Page there should be page 2 and page 3
     \setuppapersize[A5][A4,landscape]

      \setuparranging[2SIDE]


It must be a problem lot's of people have when they make a 
book with ConTeXt
and want to make a second PDF-version for the Internet.


Regards
Jannis
--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt  ............ 
All information arround ConTeXt

http://wiki.contextgarden.net/Category:Commands ........ 
Commands

!!! new: "One-Click" from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-15 22:17 doublesided PDF - first and last page singlesided Jan Heinen
@ 2012-04-15 22:29 ` Aditya Mahajan
  2012-04-15 22:34   ` Aditya Mahajan
  2012-04-16  6:35 ` Thomas A. Schmitz
  1 sibling, 1 reply; 11+ messages in thread
From: Aditya Mahajan @ 2012-04-15 22:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Apr 2012, Jan Heinen wrote:

> I was lucky to get a fast answer - but with your code I don't get the right 
> result:
>
> -- start your code
>
> \startmode[booklet]
> \setuppapersize[A5][A4,landscape]
> \setuparranging[2SIDE]
> \stopmode
> \starttext
> First page
> \startmode[booklet]
> \null \page
> \stopmode
> etc.
> \stoptext
>
> Thomas
>
> -- stop
>
> With your code I get:
>
> 1 2      first page of the pdf
> 3 4      second
> 5 6      third
> 7 8      fourth
>
>
>
> But I want to get:
>
> 1         first page of the pdf (coverpage)
> 2 3      second
> 4 5      third
> 6 7      fourth
> 8         fifth (coverpage)
>
>
> I know how to use with modes - but the answer must be an other.
>
> Maybe I have to explain it more clearly:
>
> on the first PDF-Page (A5) there should be only the cover-page (page 1)
>    \setuppapersize[A5][A5]
>
>     \setuparranging[1SIDE]%<- I don't know how to write it - nothing was 
> working
>
>
> On the second PDF-Page there should be page 2 and page 3
>    \setuppapersize[A5][A4,landscape]
>
>     \setuparranging[2SIDE]
>
>
> It must be a problem lot's of people have when they make a book with ConTeXt
> and want to make a second PDF-version for the Internet.

If you don't mind creating another file to convert a given double sided 
pdf into the above format, you can use the following (pseudo code, 
untested, and might have typos)

get number of pages in the pdf
    \getfiguredimensions[filename]
    \edef\NOfPages{\noffigurepages}

insert the first page
    \startTEXpage[height=(A5 height}, width=(A5 width)]
    \externalfigure[filename][page=1]
    \stopTEXpage

loop and insert all but the last page (you may have to test if the number 
of pages are odd or even and use \numexpr(\NOfPages - 1) to find the last 
but one page:

\dostepwiserecurse{2}{2}{\LastButOnePage}
  { \startTEXpage[height=(A5 height), width=(A4 height)]
    \expanded{\externalfigure[filename][page=\recurselevel]}%
    \expanded{\externalfigure[filename][page=\numexpr\recurselevel+1\relax]}%
    \stopTEXpage
  }

If the number of pages is even, insert last page.


Aditya

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-15 22:29 ` Aditya Mahajan
@ 2012-04-15 22:34   ` Aditya Mahajan
  0 siblings, 0 replies; 11+ messages in thread
From: Aditya Mahajan @ 2012-04-15 22:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 15 Apr 2012, Aditya Mahajan wrote:

> If you don't mind creating another file to convert a given double sided pdf 
> into the above format, you can use the following (pseudo code, untested, and 
> might have typos)

You can also create a mtx-context-doublesided.lua script that takes the 
filename from command line and does all the processing at the lua level.

See mtx-context-*.lua in $TEXMF/tex/context/base/ for examples.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-15 22:17 doublesided PDF - first and last page singlesided Jan Heinen
  2012-04-15 22:29 ` Aditya Mahajan
@ 2012-04-16  6:35 ` Thomas A. Schmitz
  2012-04-16  6:48   ` Aditya Mahajan
  1 sibling, 1 reply; 11+ messages in thread
From: Thomas A. Schmitz @ 2012-04-16  6:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/16/2012 12:17 AM, Jan Heinen wrote:
> I was lucky to get a fast answer - but with your code I don't get the
> right result:
>
>   -- start your code
>
> \startmode[booklet]
> \setuppapersize[A5][A4,landscape]
> \setuparranging[2SIDE]
> \stopmode
> \starttext
> First page
> \startmode[booklet]
> \null \page
> \stopmode
> etc.
> \stoptext
>
> Thomas
>
>   -- stop
>
> With your code I get:
>
> 1 2      first page of the pdf
> 3 4      second
> 5 6      third
> 7 8      fourth
>
>
>
> But I want to get:
>
> 1         first page of the pdf (coverpage)
> 2 3      second
> 4 5      third
> 6 7      fourth
> 8         fifth (coverpage)
>
>
> I know how to use with modes - but the answer must be an other.

No, I get the result you want with my code.

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode

\starttext

One

\page

\startmode[booklet]

\null \page

\stopmode

Two

\page

Three

\page

Four

\page

Five

\page

Six

\page

Seven

\page

Eight

\stoptext

You should make an example yourself, I'm still guessing what it is you 
want to achieve. I'm not sure what a "pdf-version for the internet" is - 
pdf is not a web-based format?

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-16  6:35 ` Thomas A. Schmitz
@ 2012-04-16  6:48   ` Aditya Mahajan
  2012-04-16  7:52     ` Thomas A. Schmitz
  0 siblings, 1 reply; 11+ messages in thread
From: Aditya Mahajan @ 2012-04-16  6:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 16 Apr 2012, Thomas A. Schmitz wrote:

> You should make an example yourself, I'm still guessing what it is you want 
> to achieve. I'm not sure what a "pdf-version for the internet" is - pdf is 
> not a web-based format?

My guess is that that OP wants to display the pdf the same way Acrobat 
reader displays a pdf in double-sided document in "two up" mode. For 
example, open any of the ConTeXt "This Way" magazines in two-up mode.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-16  6:48   ` Aditya Mahajan
@ 2012-04-16  7:52     ` Thomas A. Schmitz
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas A. Schmitz @ 2012-04-16  7:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/16/2012 08:48 AM, Aditya Mahajan wrote:
>
>> You should make an example yourself, I'm still guessing what it is you
>> want to achieve. I'm not sure what a "pdf-version for the internet" is
>> - pdf is not a web-based format?
>
> My guess is that that OP wants to display the pdf the same way Acrobat
> reader displays a pdf in double-sided document in "two up" mode. For
> example, open any of the ConTeXt "This Way" magazines in two-up mode.

Ah OK, I see what you mean. But isn't that dependent on which pdf viewer 
you use to view the file? Even more so when you view it from within a 
browser which may or may not have a plugin for displaying pdf?

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-17 11:02 Jan Heinen
@ 2012-04-17 11:32 ` Wolfgang Schuster
  0 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2012-04-17 11:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 17.04.2012 um 13:02 schrieb Jan Heinen:

> Hello,
> 
> someone, who understood what I want to achieve?
> 
> http://www.imagebanana.com/view/shoayek5/onlinebook.jpg
> 
> Or more questions?

That’s not possible with the normal imposition mechanism because you can’t set a different paper size for the first/last page. What you can do is to use a second document where include each page as described by Aditya.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
@ 2012-04-17 11:02 Jan Heinen
  2012-04-17 11:32 ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Heinen @ 2012-04-17 11:02 UTC (permalink / raw)
  To: ntg-context

Hello,

someone, who understood what I want to achieve?

http://www.imagebanana.com/view/shoayek5/onlinebook.jpg

Or more questions?

Regards
Janis


----- Copy -----
Re: [NTG-context] doublesided PDF - first and last page 
singlesided

Jan Heinen
Mon, 16 Apr 2012 04:29:20 -0700

Hello,

some were guessing, what I want to achieve.

I made a screenshot for you:

http://www.imagebanana.com/view/shoayek5/onlinebook.jpg


It ist the online-version of a printed book. For printing it 
was ok to have one bookpage on one sheet of paper. For the 
online-version I want to have two bookpages on one sheet of 
paper

     but the coverpage should be alone on one sheet of paper.

The online-version is a PDF ... no html.

"sheet of paper" is of course only virtualy meant ... it is 
online

The difficulty is that there a bunch of (hyperlinked) 
cross-references in the book ... so people can use the pdf 
interactively.

Without this I could put the pages manualy together.

Hope that now you know what I want to do.
And I am hoping very much for a solution ...

Regards
Jannis

Regards
Jannis
--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt  ............ 
All information arround ConTeXt

http://wiki.contextgarden.net/Category:Commands ........ 
Commands

!!! new: "One-Click" from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
@ 2012-04-16 11:29 Jan Heinen
  0 siblings, 0 replies; 11+ messages in thread
From: Jan Heinen @ 2012-04-16 11:29 UTC (permalink / raw)
  To: ntg-context

Hello,

some were guessing, what I want to achieve.

I made a screenshot for you:

http://www.imagebanana.com/view/shoayek5/onlinebook.jpg


It ist the online-version of a printed book. For printing it 
was ok to have one bookpage on one sheet of paper.
For the online-version I want to have two bookpages on one 
sheet of paper
     but the coverpage should be alone on one sheet of paper.

The online-version is a PDF ... no html.
"sheet of paper" is of course only virtualy meant ... it is 
online

The difficulty is that there a bunch of (hyperlinked) 
cross-references in the book ... so people can use the pdf 
interactively.
Without this I could put the pages manualy together.

Hope that now you know what I want to do.
And I am hoping very much for a solution ...

Regards
Jannis
--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt  ............ 
All information arround ConTeXt

http://wiki.contextgarden.net/Category:Commands ........ 
Commands

!!! new: "One-Click" from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: doublesided PDF - first and last page singlesided
  2012-04-15  8:01 Jan Heinen
@ 2012-04-15 18:34 ` Thomas A. Schmitz
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas A. Schmitz @ 2012-04-15 18:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/15/2012 10:01 AM, Jan Heinen wrote:
> Hello, someone here on a sunday?
>
> I want to have a PDF-screen-version of my booklet:
> The book has 8 pages including the coverpages.
>
> The result should look like this: (first and last page NOT doublesided)
>
> 1         first page of the pdf (coverpage)
> 2 3      second
> 4 5      third
> 6 7      fourth
> 8         fifth (coverpage)
>
>
> With the following commands I get the wrong result:
>
> \setuppapersize[A5][A4,landscape]% A5 wird auf A4 gedruckt
> \setuparranging[2SIDE]
>
> 1 2      first page of the pdf
> 3 4      second
> 5 6      third
> 7 8      fourth
>
>
> Have a nice weekend
> Jannis

Willi is the resident imposition expert, but in his absence: I don't 
think this is a standard imposition scheme, hence ConTeXt doesn't have 
any predefined setup for it (I'm not quite sure I understand what it is 
you're trying to accomplish). So I think you will have to add the 
desired empty page manually.

On a wild guess: if you want different versions for print and for 
screen, you can use modes (that's what I do for some of my stuff). in 
pseudo-code:

\startmode[booklet]
\setuppapersize[A5][A4,landscape]
\setuparranging[2SIDE]
\stopmode

\starttext

First page

\startmode[booklet]
\null \page
\stopmode

etc.

\stoptext

When you run with

context --mode=booklet --arrange

you'll get the desired booklet; otherwise you get a normal pdf.

Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* doublesided PDF - first and last page singlesided
@ 2012-04-15  8:01 Jan Heinen
  2012-04-15 18:34 ` Thomas A. Schmitz
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Heinen @ 2012-04-15  8:01 UTC (permalink / raw)
  To: ntg-context

Hello, someone here on a sunday?

I want to have a PDF-screen-version of my booklet:
The book has 8 pages including the coverpages.

The result should look like this: (first and last page NOT 
doublesided)

1         first page of the pdf (coverpage)
2 3      second
4 5      third
6 7      fourth
8         fifth (coverpage)


With the following commands I get the wrong result:

\setuppapersize[A5][A4,landscape]% A5 wird auf A4 gedruckt
\setuparranging[2SIDE]

1 2      first page of the pdf
3 4      second
5 6      third
7 8      fourth


Have a nice weekend
Jannis
--
Better organization and integration of all ConTeXT-information:

http://wiki.contextgarden.net/Category:ConTeXt  ............ 
All information arround ConTeXt

http://wiki.contextgarden.net/Category:Commands ........ 
Commands

!!! new: "One-Click" from every command in the wiki to the 
rich resources of the ConTeXt-mailinglist

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2012-04-17 11:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-15 22:17 doublesided PDF - first and last page singlesided Jan Heinen
2012-04-15 22:29 ` Aditya Mahajan
2012-04-15 22:34   ` Aditya Mahajan
2012-04-16  6:35 ` Thomas A. Schmitz
2012-04-16  6:48   ` Aditya Mahajan
2012-04-16  7:52     ` Thomas A. Schmitz
  -- strict thread matches above, loose matches on Subject: below --
2012-04-17 11:02 Jan Heinen
2012-04-17 11:32 ` Wolfgang Schuster
2012-04-16 11:29 Jan Heinen
2012-04-15  8:01 Jan Heinen
2012-04-15 18:34 ` Thomas A. Schmitz

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).