From: Henri Menke <henrimenke@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Typing in natural width box
Date: Tue, 8 Nov 2016 15:10:24 +0100 [thread overview]
Message-ID: <fa643995-4884-b11f-7297-4d710f1fa036@gmail.com> (raw)
Dear list,
To answer this question on TeX.SX https://tex.stackexchange.com/questions/338135/ I was trying to put a typing environment into a natural width box. It first seemed that framedtext is doing what I was after but it turned out that only the frame is adjusted to natural width, the underlying box is still full width. Therefore I tried framed but there I obtain spurious vertical space out of nowhere. How can I place typing into a natural sized box?
Cheers, Henri
---
\starttext
\ruledhbox{%
\startframedtext[width=fit,offset=0pt]
\starttyping
print("Hello World!")
\stoptyping
\stopframedtext
}
\ruledhbox{%
\startframed[width=fit,align=right,offset=0pt]
\starttyping
print("Hello World!")
\stoptyping
\stopframed
}
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2016-11-08 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 14:10 Henri Menke [this message]
2016-11-08 20:02 ` Henri Menke
2016-11-09 20:30 ` Hans Hagen
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=fa643995-4884-b11f-7297-4d710f1fa036@gmail.com \
--to=henrimenke@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).