From: Hans Hagen <j.hagen@xs4all.nl>
To: Jeong Dal <haksan@me.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: add more blank space when using \starteffect[hidden]
Date: Wed, 17 Mar 2021 14:57:19 +0100 [thread overview]
Message-ID: <8a5607db-da8e-1151-d518-7b896691967b@xs4all.nl> (raw)
In-Reply-To: <7CA1FF53-162F-48AE-9088-C9C63512D36C@me.com>
On 3/16/2021 8:08 PM, Jeong Dal wrote:
> Dear Hans,
>
> I found a command \determinenoflines by googling.
> I made a MWE as following. It is working well.
>
> But I have to write the paragraph twice for couning.
> Is there a better way?
>
> Thank you again.
> Best regards,
>
> Dalyoung
>
> %%%%%%%
> \def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}}
> \def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[\the\noflines*line
> + \the\noflines*halfline]}}
>
> \enablemode[hideSolution]
>
> \starttext
>
> The first line.
>
> \hrule
> \StartHide
> \samplefile{knuth}
> \determinenoflines{\samplefile{knuth}}
> \StopHide
> \hrule
>
> The second line.
>
> \hrule
>
> \StartHide
> \samplefile{ward}
> \determinenoflines{\samplefile{ward}}
> \StopHide
>
> \hrule
>
> The last line.
> \stoptext
Let me show you some magic ...
\def\determinednoflines#1%
{\localcontrolled{\determinenoflines{#1}}\noflines}
\startbuffer
\input tufte
\stopbuffer
\fillinrules[n=\determinednoflines{\getbuffer},
width=fit]{first}
\fillinrules[n=\determinednoflines{\getbuffer},
width=broad]{first}
\fillinrules[n=\determinednoflines{\getbuffer},
width=3cm]{first}
\fillinrules[n=\determinednoflines{\getbuffer},
width=3cm,distance=.5em,separator=:]{first}
\fillinrules[n=\determinednoflines{\getbuffer}]{first}{last}
i'll make a better hider later
-----------------------------------------------------------------
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
___________________________________________________________________________________
next prev parent reply other threads:[~2021-03-17 13:57 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
2021-03-14 13:13 ` Jeong Dal
2021-03-16 19:08 ` Jeong Dal
2021-03-17 13:57 ` Hans Hagen [this message]
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=8a5607db-da8e-1151-d518-7b896691967b@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).