From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104723 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Captions with background Date: Sat, 3 Aug 2019 17:22:20 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_462A2C48-5E3F-4BEA-AB0B-9F58F18FC728" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="138623"; mail-complaints-to="usenet@blaine.gmane.org" To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 03 17:22:53 2019 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 esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htvrt-000Zqs-Cd for gctc-ntg-context-518@m.gmane.org; Sat, 03 Aug 2019 17:22:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 026CF15312B; Sat, 3 Aug 2019 17:22:26 +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 37aHUYgkNh5f; Sat, 3 Aug 2019 17:22:25 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 04F2415312C; Sat, 3 Aug 2019 17:22:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5D8CB153128 for ; Sat, 3 Aug 2019 17:22:23 +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 URNf6sVt_r5g for ; Sat, 3 Aug 2019 17:22:22 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=46.163.112.221; helo=fiee.net; envelope-from=texml@fiee.net; receiver= Original-Received: from fiee.net (feronia.fiee.net [46.163.112.221]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 6F9D3152EEE for ; Sat, 3 Aug 2019 17:22:22 +0200 (CEST) Original-Received: from aretsaya.fritz.box (p5B293B57.dip0.t-ipconnect.de [91.41.59.87]) by mail.fiee.net (Postfix) with ESMTPSA id 266078025B for ; Sat, 3 Aug 2019 17:22:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fiee.net; s=default; t=1564845741; bh=55S77GwKFAo4cpYCOvnuFeorBGEbiNW+YDPIF0NZNg0=; l=3290; h=From:Subject:To; b=LgKi0KQSWpwBIyEyt4LVJ9YdRTSBoXLhIldt9VY35RC4QLoiFp6zzKJGW9cUPAgRJ 3EHooP+GBaDuGe4bXW/rDGya4N0qU6N1G+/yJ8qWTcZs/o9UnAPuslFS99yUpxgpQ7 764OHFgwroUxUNW/m7EJkEFHgqJZdofKutUyx6qI= Authentication-Results: feronia.fiee.net; spf=pass (sender IP is 91.41.59.87) smtp.mailfrom=texml@fiee.net smtp.helo=aretsaya.fritz.box Received-SPF: pass (feronia.fiee.net: connection is authenticated) X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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:104723 Archived-At: --Apple-Mail=_462A2C48-5E3F-4BEA-AB0B-9F58F18FC728 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, in my books I typeset captions onto full page images, therefore I need a = background; in the attached example it=E2=80=99s just a white box, = usually I use a MetaPost shadow (some of you helped me with that a few = years ago, current code see = https://wiki.contextgarden.net/Drop_shadows). Now, the background should just enclose the text, not more. Since I = don=E2=80=99t know how long the caption will be (I use the whole setup = in a macro), I need a \vbox within \setlayer, but that always uses the = full \textwidth, regardless of width settings of \framed. If the caption is short, the box should be minimal. Is this possible? Even better would be a textbackground just behind the text lines. Unfortunately my MP foo is not up to the task, the rectangular shadow = was hard enough, but I=E2=80=99d try. There=E2=80=99s an example in details.pdf, but I don=E2=80=99t = understand how I could manipulate the path around the text (not: = paragraph). The example shows another problem: If you run it with --mode=3Darrange, = the bleed is cut off. Is this a matter of settings or a bug? Greetlings, Hraban --Apple-Mail=_462A2C48-5E3F-4BEA-AB0B-9F58F18FC728 Content-Disposition: attachment; filename=captiontest.tex Content-Type: application/octet-stream; x-unix-mode=0644; name="captiontest.tex" Content-Transfer-Encoding: 7bit \usemodule[visual] \newdimen\Bleed \newdimen\maxWidth \newdimen\maxHeight \newdimen\doubleWidth \newdimen\topOffset \newdimen\bottomOffset \Bleed=3mm \setuppapersize[A6][A6,oversized] \setuplayout[% location=middle, marking=on, grid=yes, %backspace=12.5mm, width=80mm, %topspace=12.5mm, %height=125mm, % Text+Footer %header=0mm,footer=10mm, cropoffset=0mm, bleedoffset=\Bleed, trimoffset=-5mm, ] \setupbleeding[offset=\Bleed] \maxWidth=\dimexpr\paperwidth + \Bleed\relax \maxHeight=\dimexpr\paperheight + 2\Bleed\relax %\doubleWidth=\dimexpr2\maxWidth\relax %\topOffset=\dimexpr\topspace + \headerheight + \Bleed\relax %\bottomOffset=\dimexpr\bottomheight + \footerheight + \Bleed\relax \definelayer[picbg][x=0mm,y=-\Bleed,width=\maxWidth,height=\maxHeight] % \setupbackgrounds[page][background=picbg,state=start] \definemakeup[fullpage][ page=no, doublesided=no, headerstate=empty, footerstate=empty, pagestate=start, ] \startmode[arrange] \setuppapersize[A6][A4,landscape] \setuparranging[2UP] \stopmode \starttext \fakewords{50}{100} % full page image, left page \startfullpagemakeup \setlayer[picbg][ x=-\Bleed, y=-\Bleed]{% \fakeimage{\maxWidth}{\maxHeight}{\maxWidth}{\maxHeight} %\externalfigure[dum][height=\maxHeight,width=\maxWidth]% %\fakeimage{5cm}{3cm}{10cm}{5cm} } % set caption into footer on top if picture \setlayer[picbg][ x=\backspace, y=\dimexpr\makeupheight + \footerheight\relax, ]{% \inframed[ frame=off,width=fit,autowidth=force, background=color,backgroundcolor=white]{% \vbox{\fakewords{2}{20}} }% }% \stopfullpagemakeup \fakewords{200}{250} \stoptext --Apple-Mail=_462A2C48-5E3F-4BEA-AB0B-9F58F18FC728 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --Apple-Mail=_462A2C48-5E3F-4BEA-AB0B-9F58F18FC728--