ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: hiding content
Date: Fri, 25 Jul 2008 13:53:02 +0200	[thread overview]
Message-ID: <115224fb0807250453q35969212k2825ba7a2aab6e4f@mail.gmail.com> (raw)
In-Reply-To: <20080724194307.GA18010@gaston.couberia.bzh>

On Thu, Jul 24, 2008 at 9:43 PM, Peter Münster <pmlists@free.fr> wrote:
> On Thu, Jul 24 2008, Wolfgang Schuster wrote:
>
>> > Enabling people to view the pdf preview version (limited, containing
>> > excerpts) before acquiring the full version.
>>
>> In this case the solution offered in the thread are no solution for your,
>> it's too easy for the customers to make the hidden content visible.
>
> Shouldn't it be very easy with MKIV, to replace the content to hide with
> whatever you want?
> Examples:
> - the replacement are only the corresponding line-skips

%\disablemode[hiding]
\enablemode[hiding]

\unprotect

\def\starthiding
  {\dostartbuffer[hiddencontent][starthiding][stophiding]}

\def\stophiding
  {\bgroup
   \setbox\scratchbox\vbox{\getbuffer[hiddencontent]}%
   \getnoflines{\dimexpr\ht\scratchbox+\dp\scratchbox\relax}%
   \dorecurse{\number\noflines}{\blank[\v!force,\v!line]}%
   \egroup}

\protect

\startnotmode[hiding]
\let\starthiding\relax
\let\stophiding \relax
\stopnotmode

%\showgrid

\starttext

\dorecurse{2}{\input knuth\par}

\starthiding
\input tufte
\stophiding

\dorecurse{2}{\input ward\par}

\starthiding
\input zapf
\stophiding

\input knuth

\stoptext

> - the replacement are random letters printed in white
>
> Cheers, Peter

Regards,
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2008-07-25 11:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 10:51 Alan Stone
2008-07-24 11:39 ` Wolfgang Schuster
2008-07-24 12:34 ` Alan Stone
2008-07-24 13:03   ` Wolfgang Schuster
2008-07-24 13:21     ` Alan Stone
2008-07-24 13:32       ` Wolfgang Schuster
2008-07-24 19:22         ` Mojca Miklavec
2008-07-24 19:43         ` Peter Münster
2008-07-25  6:29           ` Wolfgang Schuster
2008-07-25 11:53           ` Wolfgang Schuster [this message]
2008-07-25 14:40             ` Alan Stone
2008-07-27 12:26           ` Taco Hoekwater
2008-07-24 15:26       ` Charles P. Schaum
2008-07-24 17:47         ` Alan Stone
2008-07-24 18:02           ` Alan Stone
2008-07-25  7:46         ` Alan Stone

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=115224fb0807250453q35969212k2825ba7a2aab6e4f@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.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).