From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101302 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Question to covers Date: Sat, 21 Jul 2018 17:39:26 +0200 Message-ID: <5B5353AE.8000705@gmail.com> References: <20180720151651.GB3412@akela.mendelu.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3883928557054172770==" X-Trace: blaine.gmane.org 1532187487 22953 195.159.176.226 (21 Jul 2018 15:38:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2018 15:38:07 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jul 21 17:38:03 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgtxJ-0005pX-3b for gctc-ntg-context-518@m.gmane.org; Sat, 21 Jul 2018 17:38:01 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8C5FC4563C; Sat, 21 Jul 2018 17:39:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fn3y_HDSOiK2; Sat, 21 Jul 2018 17:39:41 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id E0EB245524; Sat, 21 Jul 2018 17:39:41 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 996A745524 for ; Sat, 21 Jul 2018 17:39:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZWahmad8dASH for ; Sat, 21 Jul 2018 17:39:40 +0200 (CEST) Original-Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1127D454FB for ; Sat, 21 Jul 2018 17:39:30 +0200 (CEST) Original-Received: by mail-ed1-f52.google.com with SMTP id b10-v6so12069067edi.2 for ; Sat, 21 Jul 2018 08:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=4XxwXWd03FMROMdK14qnu84/XX8IidNxC/zGHZMLrg4=; b=Qn3OooA4COpeX6G7OdgVu8icB5SsTUKpeHQA9VZ9+WZw6vDLINcnvkstKxtotmz8kK 3UTWdK0DIVKVFseyRDyh92lm3b0xT20+q25+TM8E6vtfvp/w4fGQYPUz4kbIh8XCxGMj v6vLXwUU91dRpq/4hc0ragTZrDoYZU8UMiCeiDSXF4O4jVWor1maSkF/IgTXzTpLQaud P8vjw9LsEtP5kwLFr/Bo2J0XfxGE6ginAo57TEODvzfF3kIaggrXagAs4siqM8C9w6r0 UN9Fa5opEUqCSYGFDGcrHppY9IxcmnUhaxTeEWmhvDl1Es7qkAB0+Ruy1uoDh2fj+j/C tdrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=4XxwXWd03FMROMdK14qnu84/XX8IidNxC/zGHZMLrg4=; b=p4YoFJTjm6KtW9sOLboVMjRo2zmdCFqFixIdLq1t9nqKxDspJS0O7HBxtQNRLjTjEE p2opzzlHFJDxXbzV96aZaIpAQ3yXV4nUxX8pjlSJayYFqBUfeuJckOuiXxUx1f7uxt4q P9tWLNebXe0K9nm0UGTWqk9mCvP+Xv9cN7yQyLmG6Pw7JbOMTdKDdHATkLj2+osO15Zs cgmcEkUW6qWXCugYUGRGqKAXf2Nfsc7nuBRDre92C5hrDYtn38sx3Ki8OKwR6ThpUqjW D7ZvBQ40S8UKx5pfBKJ5LcPPOgs/ee5nER/AeOKH7Z0Jjf6vB7yjnOIVO/9t2Vmr7ndO mOUA== X-Gm-Message-State: AOUpUlFZc3FPOL33zk1uSUUx13n5bpUUGplRTEDUEeaqz3RuJ9zusnqf /4V7YosASHR96F4adC/nZy0daucl X-Google-Smtp-Source: AAOMgpcWzf6D4FXEO28EFfVwrfU9Pg8ArdygmTiaxEkbGp4nKMMiZkqc7KqqHmlRYNvubochHl/Fzg== X-Received: by 2002:a50:a267:: with SMTP id 94-v6mr7023400edl.189.1532187569533; Sat, 21 Jul 2018 08:39:29 -0700 (PDT) Original-Received: from [192.168.1.4] (x4e3286a8.dyn.telefonica.de. [78.50.134.168]) by smtp.gmail.com with ESMTPSA id f11-v6sm1372231ede.76.2018.07.21.08.39.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jul 2018 08:39:29 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:101302 Archived-At: This is a multi-part message in MIME format. --===============3883928557054172770== Content-Type: multipart/alternative; boundary="------------050507030708070400040102" This is a multi-part message in MIME format. --------------050507030708070400040102 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit > 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 %%%%%% --------------050507030708070400040102 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
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
%%%%%%
--------------050507030708070400040102-- --===============3883928557054172770== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============3883928557054172770==--