From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_SCC_BODY_TEXT_LINE,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1650 invoked from network); 19 May 2023 14:07:12 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 19 May 2023 14:07:12 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5D8881C3467; Fri, 19 May 2023 16:06:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 41g_NU0ITOAJ; Fri, 19 May 2023 16:06:57 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1AA111C2EFC; Fri, 19 May 2023 16:06:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 833CF1C2EFC for ; Fri, 19 May 2023 16:06:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 7VcODrkxouew for ; Fri, 19 May 2023 16:06:53 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.214.177; helo=mail-pl1-f177.google.com; envelope-from=contextntg@gmail.com; receiver= Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 4165D2F7 for ; Fri, 19 May 2023 16:06:53 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1ae507af2e5so6694215ad.1 for ; Fri, 19 May 2023 07:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684505211; x=1687097211; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Rc4jP+YIlQfnyD2/ghPfYUcrRt5TQ/wmtskQgk8s8TE=; b=kuyQitANghVA2dJb+vuzQIlgulfRrKYEWSbzbAAPhrLImORieHbHYibINA4jC/VqdN WBTfe+RzKXBvKF7GJnzkTqT+tb0ehhapdDcD3SH4P3W7/BuPsOtv9tmaBb00BhT0iE7S 4bqL9/0lhajELGBggZE2UexC/FVV5tO34byiPYXGPASJA4SJr61N57xrutmxHrEtC0mK FRJJfs/8zrfr/LF3y5COmJDDF6TeqL+0Y0FZ42jCAsYcgidoQAyM1x2makWw/sPoV1BD 8hyXATUm9TLw1HkSUgpj5OaUJGD9H9Q8Ljn63JeR+7oLo5S5LERs9bhyVExB4RYjO68n 7B2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684505211; x=1687097211; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Rc4jP+YIlQfnyD2/ghPfYUcrRt5TQ/wmtskQgk8s8TE=; b=NHJwXCLUD/aGTto1HrlOC16pA2afMTWcGv0QsLR/44awK4xhvupAA5GzVESx/R27/i vq0ut8HbMSsnLdy4KXm8xlst7f7uVL1QS6zTtSF5QcVIhfSICnrE85oFukvNx3N/sxUI uiVn/Dsv38f88G2cXsOU3WGy+t+M4SE73KbnHQBygzX9O5E8apUO6NqSrOMO3VbfyQAI +V009aVds0BjbqSdRBhKJHEpaFzR+wFMUHPrIkdNadhTuzwov+HPXbtLhPouDjiYoaTw j0l8ZtU9zf/JotGFqXpn0kUbigd5UQ64mfUhrB8lV8Z+f1FKM/fV1mXLjLlDAPEj0pdk 8K6A== X-Gm-Message-State: AC+VfDyr52VjjhpjekB1g06fpSOxep4uJ/L8PLaKhusR/oTA8ElkiFpH vGs7Tjsixjh5G1pZL76ddabFQBp+ITTKN89UEXp3N9Fp5PBPmQ== X-Google-Smtp-Source: ACHHUZ45h2sxVVuTRQeN/AtIBQatoKtjfQxGK/+JyGbwzg8sAgD5tLJGA2c87hZqRhaOam+ghH7IMcn7+gH+lw5hVt8= X-Received: by 2002:a17:903:32cd:b0:1a9:581b:fbb1 with SMTP id i13-20020a17090332cd00b001a9581bfbb1mr3444671plr.32.1684505210778; Fri, 19 May 2023 07:06:50 -0700 (PDT) MIME-Version: 1.0 References: <38205034-5240-038c-67ab-27b95d975280@gmail.com> In-Reply-To: <38205034-5240-038c-67ab-27b95d975280@gmail.com> Date: Fri, 19 May 2023 15:06:39 +0100 Message-ID: To: mailing list for ConTeXt users Subject: Re: [NTG-context] Inline framed verbatim text X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeroen via ntg-context Reply-To: mailing list for ConTeXt users Cc: Jeroen Content-Type: multipart/mixed; boundary="===============2627781400697866548==" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" --===============2627781400697866548== Content-Type: multipart/alternative; boundary="000000000000b5f72005fc0c6eea" --000000000000b5f72005fc0c6eea Content-Type: text/plain; charset="UTF-8" Many thanks. Is there a proper way to add some space (a couple of pt or em) to the left and the right of the text itself so the frame does not get so close to the text? Op vr 19 mei 2023 om 14:10 schreef Wolfgang Schuster via ntg-context < ntg-context@ntg.nl>: > Jeroen via ntg-context schrieb am 19.05.2023 um 14:22: > > In order to get some inline framed verbatim text, I have in the past > > always used the following: > > > > \starttext > > > > This is an > > \inframed > > [frame=on, > > corner=00, > > radius=2mm,offset=-1.5pt] > > {\ttx \bf example} > > > > \stoptext > > > > Since this has come-up more and more often, I created the following: > > > > \define[1]\infr{ > > \inframed > > [frame=on, > > corner=00, > > radius=2mm,offset=-1.5pt]{#1}} > > > > \starttext > > > > This is an \infr{example} > > > > \stoptext > > > > This works fine except that I cannot get the text in > > verbatim/teletype. I have tried style=mono and style={\ttx \bf} but > > nothing seems to work. > > \framed has no style key, you have to use the foregroundstyle to change > font style, size etc. > > To create your own \framed (or \inframed when you add location=low) you > can use the \defineframed command: > > \defineframed > [infr] > [location=low, > frame=on, > corner=00, > radius=2mm, > %offset=-1.5pt, > foregroundstyle=\tt\bfx] > > \starttext > > This is an \infr{example} > > \stoptext > > Wolfgang > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___________________________________________________________________________________ > --000000000000b5f72005fc0c6eea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Many thanks. Is there a proper way to add some space (a co= uple of pt or em) to the left and the right of the text itself so the frame= does not get so close to the text?

Op vr 19 mei 2023 om 14:10 schreef Wolfg= ang Schuster via ntg-context <ntg-= context@ntg.nl>:
Jeroen via ntg-context schrieb am 19.05.2023 um 14:22:
> In order to get some inline framed verbatim text, I have in the past <= br> > always used the following:
>
> \starttext
>
> This is an
> \inframed
> =C2=A0 [frame=3Don,
> =C2=A0 corner=3D00,
> radius=3D2mm,offset=3D-1.5pt]
> =C2=A0 {\ttx \bf example}
>
> \stoptext
>
> Since this has come-up more and more often, I created the following: >
> \define[1]\infr{
> \inframed
> [frame=3Don,
> =C2=A0 corner=3D00,
> =C2=A0 radius=3D2mm,offset=3D-1.5pt]{#1}}
>
> \starttext
>
> This is an \infr{example}
>
> \stoptext
>
> This works fine except that I cannot get the text in
> verbatim/teletype. I have tried style=3Dmono and style=3D{\ttx \bf} bu= t
> nothing seems to work.

\framed has no style key, you have to use the foregroundstyle to change font style, size etc.

To create your own \framed (or \inframed when you add location=3Dlow) you <= br> can use the \defineframed command:

\defineframed
=C2=A0=C2=A0 [infr]
=C2=A0=C2=A0 [location=3Dlow,
=C2=A0=C2=A0=C2=A0 frame=3Don,
=C2=A0=C2=A0=C2=A0 corner=3D00,
=C2=A0=C2=A0=C2=A0 radius=3D2mm,
=C2=A0=C2=A0=C2=A0 %offset=3D-1.5pt,
=C2=A0=C2=A0=C2=A0 foregroundstyle=3D\tt\bfx]

\starttext

This is an \infr{example}

\stoptext

Wolfgang

___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / https://www.ntg.nl/mailman/listinfo/= ntg-context
webpage=C2=A0 : https://www.pragma-ade.nl / http://context.aanhet.net
archive=C2=A0 :
https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: https://contextgarden.net
___________________________________________________________________________= ________
--000000000000b5f72005fc0c6eea-- --===============2627781400697866548== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============2627781400697866548==--