On Sat, 9 Sep 2017, Henning Hraban Ramm wrote:
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?
You are missing a comma at the end of the voffset line but why not use
\clip[nx= .., ny=.., x=, y=...] instead.
http://wiki.contextgarden.net/Using_Graphics#Image_Clipping
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________