From: Jeroen <contextntg@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Text runs out of Verbatim Frame
Date: Fri, 8 Sep 2023 13:09:59 +0200 [thread overview]
Message-ID: <CAPtmdbPjCT5Hq9Pwm2cpi4V6FuqeKyiaSAiLzR3n8Y_7qtEMXg@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1279 bytes --]
I am using the following to print some verbatim text in a frame. At the
right side, it keeps running out of the frame, is there a way to prevent
this with the MWE? This verbatim frame always is textwidth, is there a way
for a single frame just for if the situation asks for it to have it only
have a frame half pagewidth, like a width=0.5\textwidth
Thanks
Jeroen
\unprotect
\startuseMPgraphic{mpos:par:myexample}
path p;
for i = 1 upto nofmultipars :
p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ;
fill p withcolor 0.95white ;
draw p withcolor black
withpen pencircle scaled \MPvar{linewidth};
endfor;
\stopuseMPgraphic
\definetextbackground
[listingbackground]
[state=start,
mp=mpos:par:myexample,
location=paragraph,
topoffset=0.4em,
leftoffset=0em,
rulethickness=0.7pt]
\definetyping[Listing]
[option=commands]
\setuptyping
[Listing]
[bodyfont=10pt,
margin=1em,
before=%
{\blank[3*medium]
\setupinterlinespace[line=2.4ex]
\starttextbackground[listingbackground]},
after=%
{\stoptextbackground
\blank[4*medium]}]
\protect
\starttext
\startListing
test test test test test test test test test test test test test test test
test test test test test test test test
\stopListing
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 1538 bytes --]
[-- Attachment #2: Type: text/plain, Size: 495 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2023-09-08 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 11:09 Jeroen [this message]
2023-09-08 11:30 ` [NTG-context] " Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPtmdbPjCT5Hq9Pwm2cpi4V6FuqeKyiaSAiLzR3n8Y_7qtEMXg@mail.gmail.com \
--to=contextntg@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).