ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \hideframe to cancel \showframe
@ 2020-06-30 20:03 Mikael Sundqvist
  2020-06-30 21:47 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Sundqvist @ 2020-06-30 20:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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

/Mikael

[-- Attachment #1.2: Type: text/html, Size: 592 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
___________________________________________________________________________________

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

* Re: \hideframe to cancel \showframe
  2020-06-30 20:03 \hideframe to cancel \showframe Mikael Sundqvist
@ 2020-06-30 21:47 ` Wolfgang Schuster
  2020-07-01  5:39   ` Mikael Sundqvist
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2020-06-30 21:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Mikael Sundqvist

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

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

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

* Re: \hideframe to cancel \showframe
  2020-06-30 21:47 ` Wolfgang Schuster
@ 2020-07-01  5:39   ` Mikael Sundqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Sundqvist @ 2020-07-01  5:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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

end of thread, other threads:[~2020-07-01  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 20:03 \hideframe to cancel \showframe Mikael Sundqvist
2020-06-30 21:47 ` Wolfgang Schuster
2020-07-01  5:39   ` Mikael Sundqvist

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