ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Jeong Dal <haksan@me.com>
Subject: Re: add more blank space when using \starteffect[hidden]
Date: Sat, 13 Mar 2021 10:18:36 +0100	[thread overview]
Message-ID: <6cd6cebf-945f-f86b-58e0-713a942a7cc8@xs4all.nl> (raw)
In-Reply-To: <26DB4465-31C6-4814-A0F1-6DDF221C3F92@me.com>

On 3/12/2021 10:08 PM, Jeong Dal wrote:
> Hi,
> 
> Sometimes, I need to hide the solution of a problem.
> So I use \doifmode{} and \starteffect[hidden] as in the following sample 
> file.
> Since I want to set more blank space if it is hidden, I add \blank[5cm] 
> when it is in the \enablemode[hideSolution].
> It works well except the figures and bars are not hidden. Only texts, 
> even  in the mp part, are hidden.
> It is OK for me.
> 
> However, it would be much better to set the height of blank space 
> depends on the height of hidden texts.
> Is there a way to set the variable height  using “overlay” stuff instead 
> of \blank[5cm]?
> 
> Thank for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> \startbuffer[circles]
> draw fullcircle scaled 1cm;
> draw fullcircle scaled 1cm shifted (2cm,0);
> dotlabel.top(“O”,origin);
> \stopbuffer
> 
> \def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}}
> \def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[5cm]}}
> 
> %\enablemode[hideSolution]
> 
> \starttext
> \framed[]{This is what I want:}
> \framedtext[]{
> \StartHide
> \samplefile{knuth}
> Overbar is not \overbar{hidden}.
> {\processMPbuffer[circles]}
> \StopHide
> }
> \stoptext
In your case it's easier than you mightt think:

\framedtext[empty=yes]


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:[~2021-03-13  9:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1356.1615533411.1211.ntg-context@ntg.nl>
2021-03-12 21:08 ` Jeong Dal
2021-03-13  9:18   ` Hans Hagen [this message]
2021-03-14 13:13     ` Jeong Dal
2021-03-16 19:08     ` Jeong Dal
2021-03-17 13:57       ` Hans Hagen
2021-03-17 14:47         ` Jeong Dal

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=6cd6cebf-945f-f86b-58e0-713a942a7cc8@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=haksan@me.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).