ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* automatically splitting big images (calculation problem)
@ 2017-09-09 19:37 Henning Hraban Ramm
  2017-09-09 20:06 ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2017-09-09 19:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Ahoi,
I got some long images that I’d like to split over several pages.

\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
  \dorecurse{#1}{%
   \clip[
     height=\textheight,
     voffset=\dimexpr((\recurselevel -1) * \textheight)
    ]{\externalfigure[#2][width=\textwidth]}\par
  }
}

\clipfigure[3][verylongimage]

But "\dimexpr((\recurselevel -1) * \textheight)" for the vertical offset is wrong.
How can I do this calculation?


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

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2017-09-10 18:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-09 19:37 automatically splitting big images (calculation problem) Henning Hraban Ramm
2017-09-09 20:06 ` Aditya Mahajan
2017-09-10  7:13   ` Henning Hraban Ramm
2017-09-10  8:09     ` Herbert Voss
2017-09-10  9:09     ` Herbert Voss
2017-09-10 18:44       ` Henning Hraban Ramm

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