ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mikael Sundqvist <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \hideframe to cancel \showframe
Date: Wed, 1 Jul 2020 07:39:04 +0200	[thread overview]
Message-ID: <CAHy-LL-utLZ4eE2b2grXm+n=qAmgpcV1g46Xfho1Jay3+gT4qw@mail.gmail.com> (raw)
In-Reply-To: <a50e35c2-b281-3608-0e31-1ee173247f49@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1531 bytes --]

On Tue, Jun 30, 2020 at 11:47 PM Wolfgang Schuster <
wolfgang.schuster.lists@gmail.com> wrote:

> Mikael Sundqvist schrieb am 30.06.2020 um 22:03:
> > Hi,
> >
> > say that I, for educational purposes, want to use \showframe for a
> > couple of pages, and then want to hide the frames. What is the correct
> > way of doing this? I have for now added a \begingroup and \endgroup, but
> > then another document parameter that is set inside is cancelled after
> > the \endgroup.
> >
> > I tried to look in the source, but could not find anything that worked
> > (what I tried with was to use \setupbackgrounds[state=stop], but that
> > was merely a guess, and it did not work).
>
> There is no command to disable \showframe but you don't even need the
> command to have frames. What \showframe does is to set a few values for
> the \setupbackgrounds command which can be done by hand.
>
> To make everything a bit nice I put the backgrounds setup in a
> setup-block and call only these blocks in the document.
>
> %%%% begin example
> \startsetups[showframe]
>    \setupbackgrounds [header,text,footer] [leftmargin,text,rightmargin]
> [frame=on]
> \stopsetups
>
> \startsetups[hideframe]
>    \setupbackgrounds [header,text,footer] [leftmargin,text,rightmargin]
> [frame=off]
> \stopsetups
>
> \starttext
>
> \input knuth
>
> \page \setup[showframe]
>
> \input knuth
>
> \page \setup[hideframe]
>
> \input knuth
>
> \stoptext
> %%%% end example
>
> Wolfgang
>
>
 Many thanks, Wolfgang! This is exactly what I was looking for.

/Mikael

[-- Attachment #1.2: Type: text/html, Size: 2057 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2020-07-01  5:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 20:03 Mikael Sundqvist
2020-06-30 21:47 ` Wolfgang Schuster
2020-07-01  5:39   ` Mikael Sundqvist [this message]

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='CAHy-LL-utLZ4eE2b2grXm+n=qAmgpcV1g46Xfho1Jay3+gT4qw@mail.gmail.com' \
    --to=mickep@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).