Changes

Jump to navigation Jump to search
677 bytes added ,  08:43, 3 March 2021
m
Hint about visual impression
\definecolor [ColorHighB] [h=602217]
\definecolor [ColorLow] [0.8(white)]
 
\startMPpage
 
%------------------------------------------------------------------------------
 
picture tt ;
tt := lmt_outline [
kind = "fillup",
text = "\definedfont[name:texgyrepagellabold*default]%
\framed[frame=off,offset=3mm,align=middle,strut=none]
{MetaPost\\is Fun !\\Aujourd'hui\\Today\\*§ 2020 §*}",
] xsized 12cm ;
 
path bb ; bb := boundingbox tt;
 
%------------------------------------------------------------------------------
 
path pp ; pp := bb enlarged 2cm ;
fill pp
withshademethod "linear"
withshadedirection (2.,0.)
withshadecolors (\MPcolor{ColorHighA}, \MPcolor{ColorHighB});
 
%------------------------------------------------------------------------------
 
picture Paddmissing; Paddmissing := nullpicture;
picture Pwoletters; Pwoletters := nullpicture;
numeric testwithin ;
 
%------------------------------------------------------------------------------
 
for i within tt :
if stroked i or filled i :
testwithin :=0;
 
for j within tt :
if stroked j or filled j:
if (((xpart llcorner i) > (xpart llcorner j)) and
((ypart llcorner i) > (ypart llcorner j)) and
((xpart urcorner i) < (xpart urcorner j)) and
((ypart urcorner i) < (ypart urcorner j))) :
testwithin :=1;
fi;
fi;
endfor;
 
if testwithin == 1:
addto Paddmissing contour
(pathpart i)
withcolor \MPcolor{ColorLow};
else:
addto Pwoletters contour
(pathpart i)
withpostscript "collect";
fi;
 
fi ;
endfor ;
 
%------------------------------------------------------------------------------
addto Pwoletters contour
bb
withpostscript "evenodd"
withcolor \MPcolor{ColorLow};
draw Pwoletters ;
draw Paddmissing ;
\stopMPpage
 
\startMPpage
fill pp
withshademethod "linear"
withshadedirection down(2.,0.) withshadecolors (red\MPcolor{ColorHighA}, blue\MPcolor{ColorHighB}) ;
for i within tt :
nofill pathpart i;
</context>
= Background tricks without MetaPost =
 
[[File:ka37_cover.jpg|500px]]
 
The background structure is a photo (moiree effects in a microphone filter, JPEG), the left bar is made with a design program (Affinity Designer, PDF) and doesn’t include the structure, everything put together using [[Transparency]].
 
The image above is not a photo of the printed cover but just a JPEG export of the PDF; i.e. even if the cover paper is new and smooth, it looks structured and a bit faded.
 
<texcode>
 
\definefont[SubtitleFont][Sans*normnum at 14pt]
\definefont[SubjectFont][Chalkduster*default at 41pt]
 
\setupcolors[
pagecolormodel=auto,
rgb=no,cmyk=yes,spot=no,
overprint=yes,
intent={Uncoated FOGRA29 (ISO 12647-2:2004)},
textcolor=cmykblack,]
 
\definecolor[cmykblack][c=0,m=0,y=0,k=1]
\definecolor[SubjectColor][c=0,m=.1,y=.2,k=.3,a=2,t=1]
\definetransparency[tmultiply][a=2,t=1] % multiply
\definetransparency[tmoiree][a=1,t=.05] % normal, but very light
\definetransparency[tsidebar][a=2,t=.5] % multiply, light
 
\definemeasure[Bleed][3mm]
\definemeasure[maxWidth][\paperwidth + 1\measure{Bleed}]
\definemeasure[maxHeight][\paperheight + 2\measure{Bleed}]
\definemeasure[topOffset][\topspace + \measure{Bleed}]
 
\definelayer[background][
x=0mm,y=-\measure{Bleed},
width=\measure{maxWidth},
height=\measure{maxHeight}] % incl. bleed
\setupbackgrounds[page][background={background},state=start]
 
% background structure (moiree)
\setlayer[background][
hoffset=-\measure{Bleed},
voffset=-\measure{Bleed},
]{\starttransparent[tmoiree]%
\externalfigure[ka37/img/Moiree][height=216mm,orientation=90]%
\stoptransparent}
 
% sidebar
\setlayer[background][
hoffset=0mm,
voffset=-\measure{Bleed},
]{\starttransparent[tsidebar]%
\externalfigure[ka37/img/Sidebar_KA][height=303mm]%
\stoptransparent}
 
% Motto
\setlayerframed[background][
hoffset=45mm,
voffset=20mm,
offset=overlay,
frame=off,
align=flushleft,
]{\SubtitleFont%
Kritische Ausgabe\crlf\vskip4pt%
Zeitschrift für Literatur im Dialog}
 
% Issue No.
\setlayerframed[background][
hoffset=160mm,
voffset=20mm,
width=28mm,
align=flushright,
offset=overlay,
frame=off,
]{\definedfont[Sans*normnum at 36pt]37/38} %37
 
% Image
\setlayerframed[background][
hoffset=45mm,
voffset=148mm,
width=168mm,
offset=overlay,
frame=off,
]{\starttransparent[tmultiply]%
\clip[x=2mm,y=0mm,width=168mm,height=107mm]{% clip to target size
\externalfigure[ka37/img/Cover][width=168mm]}%
\stoptransparent
}
 
% Subject
\setlayer[background][
hoffset=45mm,
voffset=131mm,
]{\SubjectFont\WORD{\color[SubjectColor]{Werkgespräche}}}
\strut\page
</texcode>
[[Category:Sample documents]]

Navigation menu