
브로셔 레이아웃을 만들면서 페이지에 일정한 높이로 이미지를 배치하는 방법에 대해 생각하기 시작했습니다. 15x10cm 크기의 이미지가 PDF 파일로 준비되어 있습니다.
DTP 애플리케이션에서는 정의된 크기의 이미지 상자를 배치합니다. 그리고 거기에 잘라낸 이미지를 넣으세요.
ConTeXt에서 나는 비슷한 것을 얻으려고 노력했습니다. \clip
예를 들어 라인 높이가 10배인 이미지를 얻기 위해 이 기능을 사용했습니다 . 또한 다음에 표시된 접근 방식을 따르십시오.https://wiki.contextgarden.net/Example_photo_page_layout.
\define[2]\ClippedFigure{
\startplacefigure[location=force,title={#1}]
\clip[height=\dimexpr10\lineheight+\exheight\relax]{
\externalfigure[{#2}][width=\textwidth]
}
\stopplacefigure
}
기준선 그리드에서 일관된 크기의 이미지를 얻는 데 권장되는 접근 방식입니까?
분명히 모든 이미지 파일을 먼저 크기 조정/자르기는 어떤 경우에도 가능합니다.
답변1
위키에 따르면, 당신은\startlinecorrection
그리고\stoplinecorrection
, 그러나 결과가 귀하가 기대하는 것과 같은지 여부는 확실하지 않습니다. 아래 예를 참조하세요.
\setuplayout
[grid=on]
% This loads cow.pdf for purposes of testing
% \setupexternalfigures[location={local,global,default}]
% And this show the grid...
% \showgrid
\starttexdefinition ClippedFigure #1 #2
\startplacefigure[location={force},title={#1}]
\startlinecorrection
% \exheight adds one more line
\clip[height=\dimexpr10\lineheight\relax]{
\externalfigure[#2][width=\textwidth]
}
\stoplinecorrection
\stopplacefigure
\stoptexdefinition
\starttext
\ClippedFigure{Cow}{cow.pdf}
\stoptext