[NTG-context] Question to covers

Henning Hraban Ramm texml at fiee.net
Sat Jul 21 19:12:08 CEST 2018


Hi Wolfgang,

thank you so much!

If we put the externalfigure setup in front, we can also calculate the spine width:

\getfiguredimensions[MAG]
\definemeasure [SpineWidth] [\dimexpr0.01mm * (\noffigurepages/2) + 0.5mm\relax]

Where 0.01mm is the paper thickness (100 g/m2) and 0.5mm is the folding addition – ask your printshop/bookbinder how much they need!


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

Am 2018-07-21 um 17:39 schrieb Wolfgang Schuster <schuster.wolfgang at gmail.com>:

> 
>> Henning Hraban Ramm 20. Juli 2018 um 20:49
>> 
>> Hi Tomáš,
>> 
>> I don’t know of anything existing.
>> Find attached what I use for a magazine – I include title and back pages in the main PDF (to get a complete issue for corrections and online distribution) and use that as externalfigure, just creating the spine anew.
> Hi Henning,
> 
> below is a modified version of your example where I changed a few things.
> 
> 1. I used the "measure" commands to set the spine values, the advantage of the \measure is that it falls back to 0pt when you try to use a undefined value.
> 
> 2. I determined the last page of the megazine with the \getfiguredimensions command, afterwards you can use the \noffigurepages command to get the last page of the document.
> 
> 3. I put the layer and frame settings for the \setlayerframed command in separate arguments.
> 
> 4. I got rid of the backgrounds setup for the layer. A better solution here is to create a page without margins which can be done with the "page" layout where you flush the collected content of the layer with the \flushlayer command.
> 
> 5. I set the texts for the isse number and title with the \setvariables command.
> 
> Wolfgang
> 
> %%%%%%
> \definemeasure [SpineWidth]  [6mm]
> \definemeasure [SpineOffset] [\dimexpr(\measure{SpineWidth}-9pt)/5\relax]
> 
> \definepapersize
>   [Cover]
>   [width=\dimexpr420mm+\measure{SpineWidth}\relax,
>    height=297mm]
> 
> \setuppapersize [Cover]
> 
> \setupexternalfigures [directory={_pdf}]
> 
> \useexternalfigure [MAG] [magazine.pdf]
> 
> \setvariables
>   [cover]
>   [issue={34},
>    topic={Topic}]
> 
> \setuplayout
>   [marking=on]
> 
> \definelayer
>   [whole]
>   [width=\paperwidth,
>    height=\paperheight]
> 
> \starttext
> 
> \startlayout [page]
> 
> \setlayer
>   [whole]
>   [x=0mm,
>    y=0mm]
>   {\getfiguredimensions[MAG]
>    \externalfigure[MAG][page=\noffigurepages]}
> 
> \setlayer
>   [whole]
>   [x=\dimexpr210mm+\measure{SpineWidth}\relax,
>    y=0mm]
>   {\externalfigure[MAG][page=1]}
> 
> \setlayerframed
>   [whole]
>   [x=210mm,
>    y=20mm]
>   [frame=off,
>    offset=overlay,
>    width=\measure{SpineWidth},
>    align=center]
>   {\getvariable{cover}{issue}}
> 
> \setlayerframed
>   [whole]
>   [x=210mm,
>    y=92mm]
>   [frame=off,
>    offset=overlay,
>    align=right,
>    width=\measure{SpineWidth},
>    height=190mm]
>   {\rotate
>      [rotation=90,
>       align={right,middle},
>       frame=off,
>       height=\measure{SpineWidth},
>       width=190mm]
>      {\vskip\measure{SpineOffset}
>       \vbox{MAGAZINE\hfill\getvariable{cover}{topic}}}}
> 
> \flushlayer [whole]
> 
> \stoplayout
> 
> \stoptext
> %%%%%%
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________



More information about the ntg-context mailing list