From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/115209 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Nedeljkovic via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Two minor questions Date: Mon, 6 Jun 2022 22:07:26 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5309494288497097487==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3361"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Nedeljkovic , Stefan Nedeljkovic via ntg-context To: Aditya Mahajan Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 06 22:08:22 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyJ1S-0000ce-8O for gctc-ntg-context-518@m.gmane-mx.org; Mon, 06 Jun 2022 22:08:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 76D8C28A17B; Mon, 6 Jun 2022 22:07:47 +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 GFH837qunO61; Mon, 6 Jun 2022 22:07:44 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 59AD828A19F; Mon, 6 Jun 2022 22:07:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1017028A17B for ; Mon, 6 Jun 2022 22:07:43 +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 Fdbnd0ZBSkm8 for ; Mon, 6 Jun 2022 22:07:39 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.219.52; helo=mail-qv1-f52.google.com; envelope-from=tsar.srb@gmail.com; receiver= Original-Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id B14CC28A15C for ; Mon, 6 Jun 2022 22:07:38 +0200 (CEST) Original-Received: by mail-qv1-f52.google.com with SMTP id cv1so10942415qvb.5 for ; Mon, 06 Jun 2022 13:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=id6Tn0hRHbm/h56O+Uv0AkYnCqmdOcIxhXcajBWgRL8=; b=JkvIu7cMpCiSMNk9LcPAs4kTCi9s3y8GVscR/GrbngRl+C7+oRimq5a7lv7H2zIa49 8JaKs1wPFLGSIzSiSRpzwhPjxHSvfScWDIxYhPMUHewBxeVwHW4WSPeRDR9rraC6Fv2d cjLOkmBTCL+RmIMFHobfPHrSQ/IjLt9fAgGH0RNMHk6ngGm9FdMcmFkzSbzAE6/oIsu5 EpYt3KiSFPUhhm7qnlnLrJpmuHmAUbkCKGNgP+2a32gXgGdHNgkQz5lsLY7qtTwETbha 5mbbwCakT71CjR6KwQ4AZ4Uyp7lZeaTZ9jI2ssCRs4wg2WQ8L8TazF6Z9WJzSXB++g2+ K0Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=id6Tn0hRHbm/h56O+Uv0AkYnCqmdOcIxhXcajBWgRL8=; b=zOcpy1KFExuV0hfXyMQeC+8M/AsxyMHjeFYd8jrqas/W3AECfLmcFJY6SLvC0/fVy6 TpetOxzbrRW6TBJysFmMbByb/r+fc/U05ak6rG5qOoxWPRkRZGgHpMxSrDKA9vZE0/UY eA0czVh2shhuU/jB7mF/T6PMyE0wz+JmURjT+vLZ2PHqisqiIlDT2bO+UQ3Ek5M2BY3w HGFGdfl+DVWEK2xjK0Tgb6mdAm0li6RgoqiDDXic0xeDEejSkt2/eLlzOO+4Um3H7x44 SoG+5C7rS2jsrWKBcs3M0OeMSvwmX+eAbYqNA0xQRi6sZogOxqs4M0J4dgQVt+oDD1Pn TpNA== X-Gm-Message-State: AOAM532AthZasXjUVWeysD8bTKwFbVHCDoXmZiwReoYSU/GRzfPK3R7g eTmuV5ZpSYYPk8Bpr4VeqV+rDkZsoh2TEco7V/U= X-Google-Smtp-Source: ABdhPJw5uEvol+tdtWSAacqxk5wTaJNXERR6wVz+0rLygCWnPUd6cr9sjeg9qfYpNo0XnJZi1m2h6esUr3YHGhKO8oE= X-Received: by 2002:a05:6214:230a:b0:461:e824:46fa with SMTP id gc10-20020a056214230a00b00461e82446famr73303612qvb.30.1654546057236; Mon, 06 Jun 2022 13:07:37 -0700 (PDT) In-Reply-To: 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.io gmane.comp.tex.context:115209 Archived-At: --===============5309494288497097487== Content-Type: multipart/alternative; boundary="00000000000001979605e0cd0603" --00000000000001979605e0cd0603 Content-Type: text/plain; charset="UTF-8" Wolfgang, Aditya, thank you both very much! I have 2 more questions: Observe the files here: https://drive.google.com/drive/folders/18ve5_F-BKOa-TxCWmD02mhPqNXQvNyWK?usp=sharing 1. I'd like to shift the text area down so that the red lines align with the blue lines (I think this amount is called depth). How would I do that? 2. The font is such that exactly 2 characters fit into the grid cell, but I see that towards the end of the line it gets out of sync with the grid. How would I ensure that all text rendered is strictly monospaced without any stretching/shrinking trickery? Sincerely, Stefan On Mon, Jun 6, 2022 at 5:50 PM Aditya Mahajan wrote: > On Mon, 6 Jun 2022, Stefan Nedeljkovic via ntg-context wrote: > > > Dear list, > > > > I have 2 small questions: > > > > 1. In \setuplayout if I try to set topspace=5\measured{base} + > > \dimexpr2bp I get an error. How should I add these 2bp? > > (Untested) > > \dimexpr\measure{base}+2bp\relax > > or > > \dimexpr\measured{base}+2bp\relax > > should work. > > > 2. I have an mp graphic defined in the file "graphic.mp" which has the > > exact same dimensions as my page. I'd like to set that graphic as a > > background. How do I do this? > > (Again, untested) > > \startuseMPgraphic{background-image} > input graphic.mp; > \stopuseMPgraphic > > \defineoverlay[background-image][\useMPgraphic{background-image}] > > \setupbackgrounds[page][background={background-image}] > > Aditya > --00000000000001979605e0cd0603 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Wolfgang, Aditya, thank you both very much!

=
I have 2 more questions:


1= . I'd like to shift the text area down so that the red lines align=C2= =A0with the blue=C2=A0lines (I think this amount is called depth). How woul= d I do that?
2. The font is such that exactly 2 characters fit in= to the grid cell, but I see that towards the end of the line it gets out of= sync with the grid. How would I ensure that all text rendered is strictly = monospaced without any stretching/shrinking trickery?

<= div>Sincerely,
Stefan

<= div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jun 6, 2022 at 5:50 PM Aditya = Mahajan <adityam@umich.edu> = wrote:
On Mon, 6= Jun 2022, Stefan Nedeljkovic via ntg-context wrote:

> Dear list,
>
> I have 2 small questions:
>
> 1. In \setuplayout if I try to set topspace=3D5\measured{base} +
> \dimexpr2bp I get an error. How should I add these 2bp?

(Untested)

\dimexpr\measure{base}+2bp\relax

or

\dimexpr\measured{base}+2bp\relax

should work.

> 2. I have an mp graphic defined in the file "graphic.mp" which h= as the
> exact same dimensions as my page. I'd like to set that graphic as = a
> background. How do I do this?

(Again, untested)

\startuseMPgraphic{background-image}
=C2=A0 input graphic.mp;
\stopuseMPgraphic

\defineoverlay[background-image][\useMPgraphic{background-image}]

\setupbackgrounds[page][background=3D{background-image}]

Aditya
--00000000000001979605e0cd0603-- --===============5309494288497097487== 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== --===============5309494288497097487==--