ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Idris Samawi Hamid ادريس سماوي حامد via ntg-context" <ntg-context@ntg.nl>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Cc: "Idris Samawi Hamid ادريس سماوي حامد" <Idris.Hamid@colostate.edu>
Subject: Re: Can modes be used for content control?
Date: Wed, 17 Nov 2021 12:52:43 -0700	[thread overview]
Message-ID: <op.1c0ph5p0ejo439@desktop-mt1m160> (raw)
In-Reply-To: <EC9AC762-73F0-440F-B3B2-F77DAB0F7CD1@fiee.net>

On Wed, 17 Nov 2021 08:51:03 -0700, Henning Hraban Ramm via ntg-context  
<ntg-context@ntg.nl> wrote:

>> TeX comments will illustrate:
>>
>> ==============
>> This text goes into the abridged version.
>>
>> % This text will appear in the unabridged version.
>>
>> And this text goes into the abridged version.
>>
>> % And this text goes into the unabridged version.
>>
>> And this additional text goes into the abridged version.
>>
>> % And this additional text goes into the unabridged version.
>> ==============
>>
>> An abridged run will ignore the commented text, and an unabridged run  
>> will include it.
>
> Ok, it it’s about such small snippets, consider  
> \doifmode{mode1,mode2}{Conditional text}.
>
> I don’t think you would get shorter markup with nesting.
>
> More possibilities see  
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.contextgarden.net%2FModes&amp;data=04%7C01%7CIdris.Hamid%40ColoState.EDU%7C14c5b723751a4eb2bb9308d9a9e42f31%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637727619814441586%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=tljjceauaTpF%2FYlSHYhna05nmXP5ppCsMVHDj0VNBWk%3D&amp;reserved=0

Started there before starting this thread, but the focus appears to be  
global and the one and only working example near the end is pretty trivial  
-)

But armed with the answers received here, will look at it again for ideas.

>> Consider variant texts:
>>
>> =======
>> Here is some text that
>>   contains % mode=variantone
>>   includes % mode=varianttwo
>>   is comprised of % mode=variantthree
>> some variants.
>>
>> Here is some more text that
>>   features % mode=variantone
>>   exhibits % mode=varianttwo
>>   illustrates % mode=variantthree
>> some variants.
>> =======
>>
>> This example is to be processed to produce exactly three distinct  
>> results. So, e.g., "contains" and "features" belong to variantone. Etc.  
>> So like XML.
>
> How about:
>
> Here is some text that
> \startmodeset
> [variantone]     {contains}
> [varianttwo]     {includes}
> [variantthree]	 {is comprised of}
> [default]        {doesn’t contain}
> \stopmodeset
> some variants.

Very nice, many thanks! Will experiment with this method as well,  
comparing and contrasting with blocks and Aditya's modes method.

>>> It might be a bit annoying, but you could end the previous mode before  
>>> starting the next.
>> Assuming that I'm not misunderstanding you: For a book-length project,  
>> that would be beyond annoying.
>
> Well, it looks like you’ll need a lot of markup anyway.

Indeed. And that's ok, as long as the structure is simple enough.. Occam's  
razor!

Best wishes
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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-11-17 19:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 23:25 Idris Samawi Hamid ادريس سماوي حامد via ntg-context
2021-11-17  0:23 ` Aditya Mahajan via ntg-context
2021-11-17  3:06   ` Idris Samawi Hamid ادريس سماوي حامد via ntg-context
2021-11-17 11:32     ` Henning Hraban Ramm via ntg-context
2021-11-17 15:08       ` Idris Samawi Hamid ادريس سماوي حامد via ntg-context
2021-11-17 15:51         ` Henning Hraban Ramm via ntg-context
2021-11-17 19:52           ` Idris Samawi Hamid ادريس سماوي حامد via ntg-context [this message]
2021-11-17 15:57         ` Taco Hoekwater via ntg-context
2021-11-17 17:56     ` Aditya Mahajan via ntg-context
2021-11-17 18:54       ` Hans Hagen via ntg-context
2021-11-17 19:45         ` Idris Samawi Hamid ادريس سماوي حامد via ntg-context
2021-11-17 19:36       ` Idris Samawi Hamid ادريس سماوي حامد via ntg-context
2021-11-17  7:59 ` Hans Hagen via ntg-context

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=op.1c0ph5p0ejo439@desktop-mt1m160 \
    --to=ntg-context@ntg.nl \
    --cc=Idris.Hamid@colostate.edu \
    /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).