From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/99078 Path: news.gmane.org!.POSTED!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: automatically splitting big images (calculation problem) Date: Sat, 9 Sep 2017 16:06:58 -0400 (EDT) Message-ID: References: <93067FFF-E108-4B1E-8091-A3AC7CE536C2@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-236424178-1504987619=:89866" X-Trace: blaine.gmane.org 1504987645 10902 195.159.176.226 (9 Sep 2017 20:07:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Sep 2017 20:07:25 +0000 (UTC) User-Agent: Alpine 2.03 (OSX 1266 2009-07-14) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 09 22:07:20 2017 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 1dqm28-0002WI-ST for gctc-ntg-context-518@m.gmane.org; Sat, 09 Sep 2017 22:07:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 05E5C8867C; Sat, 9 Sep 2017 22:07:15 +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 jBFX53_FOLMW; Sat, 9 Sep 2017 22:07:14 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 2ED278866A; Sat, 9 Sep 2017 22:07:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1489688669 for ; Sat, 9 Sep 2017 22:07:13 +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 6mzYXdrNjfur for ; Sat, 9 Sep 2017 22:07:11 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) (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 29DA088668 for ; Sat, 9 Sep 2017 22:07:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2016-05-12; t=1504987619; bh=laGpSHOOVIPRypCG9uYRDMo+IbcIhyRanTkmghuUqgg=; h=Date:From:To:Subject:In-Reply-To:References; b=YusV/4z9kJVKylabotdr8cLzkKJwbj7QFsz6xz7znB8+YDu7y/FWLW7I0Ht3HOzMs jieqGtvQ3RtcDA0bBDKmSJpEbYdNpnNlu9XHOOZDCCO6dLsu+dZvTU9bv/Q3qMQbNu nJM7C0KA5k7bocZpV0sPlo6xYqEM6Ps+27IE6LXppg0a3OdFAfVhlwhjl5xgZhZHLz ZbBJikdzoOpCxeGSko0PQtt0YNMiLrr5NAcfkID2Rrdv+BFqDEqxSMvZkDimjYLfFC FNZ6Ufbd4WsujGoHiq0BLMZ+nqOOGvxyUD6zjGwfsajlpFvi1REaAZOBwsKufsj3Mm /ysozCDIIBLKQ== Authentication-Results: tombraider.mr.itd.umich.edu; iprev=pass policy.iprev=198.84.249.206 (198-84-249-206.cpe.teksavvy.com); auth=pass smtp.auth=adityam Original-Received: FROM [192.168.0.13] (198-84-249-206.cpe.teksavvy.com [198.84.249.206]) By tombraider.mr.itd.umich.edu ID 59B449E3.528CC.6574; Authuser adityam; Sat, 09 Sep 2017 16:06:59 -0400 In-Reply-To: <93067FFF-E108-4B1E-8091-A3AC7CE536C2@fiee.net> 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:99078 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-236424178-1504987619=:89866 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 9 Sep 2017, Henning Hraban Ramm wrote: > Ahoi, > I got some long images that I=E2=80=99d like to split over several pages. > > \def\clipfigure{\dodoubleempty\doClipFigure} > \def\doClipFigure[#1][#2]{ > \dorecurse{#1}{% > \clip[ > height=3D\textheight, > voffset=3D\dimexpr((\recurselevel -1) * \textheight) > ]{\externalfigure[#2][width=3D\textwidth]}\par > } > } > > \clipfigure[3][verylongimage] > > But "\dimexpr((\recurselevel -1) * \textheight)" for the vertical offset = is wrong. > How can I do this calculation? You are missing a comma at the end of the voffset line but why not use \clip[nx=3D .., ny=3D.., x=3D, y=3D...] instead. http://wiki.contextgarden.net/Using_Graphics#Image_Clipping Aditya --0-236424178-1504987619=:89866 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 --0-236424178-1504987619=:89866--