ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Some problems with framing typed text.
@ 2004-08-10 17:30 Brooks Moses
  2004-08-10 18:00 ` Henning Hraban Ramm
  0 siblings, 1 reply; 42+ messages in thread
From: Brooks Moses @ 2004-08-10 17:30 UTC (permalink / raw)


In the document I'm working on, I'd like to put some typed code bits in 
frames, to get an appearance sort of like the code excerpts on the 
ConTeXtWiki.  However, I've found myself needing to do a couple of rather 
ugly hacks to get that to work right, and I'm hoping for some suggestions 
on how to avoid that.

Here's what I have so far:

\def\typebufferframed[#1]{%
   \vskip\parskip
   \framed[background=color,
    backgroundcolor=gray,
    frame=on,
    strut=yes,
    offset=2mm,
    width=broad,
    framecolor=black,
    align=right]%
    {\vskip -11mm\typebuffer[#1]\vskip -5mm}}

\starttext
Plain text before the code.

\startbuffer[ex1]
This is an example.
\stopbuffer
\typebufferframed[ex1]

Plain text after the code.
\stoptext

The hacks that I'd like to get rid of:

It would be nice not to have to put the code in a buffer before typing it, 
since in general I only use these once.  However, if I put \starttyping and 
\stoptyping inside a framed command (even if I don't encapsulate it in 
another function) it breaks, and putting \startframedtext in the before= 
command and \stopframedtext in the after= command of \setuptyping also 
doesn't work.

The spacing, when I do things the way that I'm doing them, is all 
wrong.  The \vskip\parskip at the top is reasonably ok (although a bit 
annoying), but I'd really like to figure out how to get rid of the large 
negative \vskip's inside the frame.

Thanks!
- Brooks

^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: no graph after compilation
@ 2004-08-12 10:16 Duncan Hothersall
  2004-08-12 19:06 ` Patrick Gundlach
  0 siblings, 1 reply; 42+ messages in thread
From: Duncan Hothersall @ 2004-08-12 10:16 UTC (permalink / raw)


Eros Albertazzi wrote:

 >Patrick Gundlach wrote:
>> 
>> But unzipping it on top of the texlive was not the very best idea I'd
>> guess. 
 >
 >I agree... but be aware that in
 >http://contextgarden.net/Linux_Installation this is just what is 
 >suggested

As the author of that page I should respond!

First of all, as the name suggests, it's about a Linux installation, and 
this is a Windows installation. I have no experience at all of Windows 
installs, and nothing on that page should be applied to Windows unless 
you know that it works there too. I don't.

Second, the reason I make that recommendation is that in my set up, that 
is what works best. (Essentially that page is a copy of my own readme 
file which reminds me how to set up my server again after it crashes...) 
Replacing the files removes any doubt about versions of files being 
used, and forces one to review and understand the file structure and 
changes between versions. I always diff the complete fileset first to 
see what's changed.

Perhaps a Windows_Installation page will be the result of the process 
you are going through. :-)

Duncan

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2004-08-13 12:29 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10 17:30 Some problems with framing typed text Brooks Moses
2004-08-10 18:00 ` Henning Hraban Ramm
2004-08-10 18:47   ` Brooks Moses
2004-08-10 19:04     ` Hans Hagen
2004-08-10 20:35       ` no graph after compilation Floris van Manen
2004-08-11 12:55         ` Peter Rolf
2004-08-11 13:38           ` Re[2]: " Floris van Manen
2004-08-11 14:00             ` Vit Zyka
2004-08-11 14:09               ` Re[2]: " Floris van Manen
2004-08-11 14:21                 ` Patrick Gundlach
2004-08-11 14:44                   ` Re[2]: " Floris van Manen
2004-08-11 15:07                     ` Patrick Gundlach
2004-08-11 15:14                     ` Patrick Gundlach
2004-08-11 15:24                       ` Re[2]: " Floris van Manen
2004-08-11 15:34                         ` Patrick Gundlach
2004-08-11 15:57                           ` Re[2]: " Floris van Manen
2004-08-11 16:38                             ` Patrick Gundlach
2004-08-11 18:03                               ` Re[2]: " Floris van Manen
2004-08-11 18:17                                 ` Patrick Gundlach
2004-08-11 22:17                                   ` Re[2]: " Floris van Manen
2004-08-12  7:47                                     ` Patrick Gundlach
2004-08-12  8:05                                       ` Eros Albertazzi
2004-08-12 11:30                                         ` Re[2]: " Floris van Manen
2004-08-12 11:03                                       ` Vit Zyka
2004-08-12 11:29                                       ` Re[2]: " Floris van Manen
2004-08-12 19:26                                         ` Patrick Gundlach
2004-08-12 22:02                                           ` Hans Hagen
2004-08-12 23:32                                             ` Re[2]: getting context going Floris van Manen
2004-08-12 23:48                                               ` Hans Hagen
2004-08-13  8:24                                               ` Patrick Gundlach
2004-08-13 12:29                                                 ` Re[2]: getting context going --> feature tool request Floris van Manen
2004-08-12  7:25                                   ` no graph after compilation Hans Hagen
2004-08-12 11:06                                     ` Re[2]: " Floris van Manen
2004-08-12  7:13                               ` Hans Hagen
2004-08-12  7:42                                 ` Patrick Gundlach
2004-08-11 16:00                   ` Vit Zyka
2004-08-11 16:30                     ` Patrick Gundlach
2004-08-11 17:14                 ` Re[2]: " Peter Münster
2004-08-10 18:48   ` Some problems with framing typed text Hans Hagen
2004-08-10 19:21     ` Brooks Moses
2004-08-12 10:16 no graph after compilation Duncan Hothersall
2004-08-12 19:06 ` Patrick Gundlach

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).