ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: [NTG-context] Re: How to easily comment out/uncomment multiple lines all at once?
Date: Sun, 27 Apr 2025 21:10:17 +0200	[thread overview]
Message-ID: <5b55e076-9fa6-4df3-8712-7a8ee623f340@gmx.es> (raw)
In-Reply-To: <431378854.1243657.1745779357147@mail.yahoo.com>

On 4/27/25 20:42, Joel via ntg-context wrote:
> [...]
> Because the actual file is quite large, commenting and un-commenting the
> lines takes a long time, and can lead to mistakes. Is there any simpler
> way to easily switch between the two versions?

Hi Joel,

your source (which has \startmode...\stopmode added):

  \define\macroA{This outputs some stuff.}
  \define\macroB{\input knuth }
  \define\macroC{This outputs other stuff.}
  \define\macroD{This outputs other stuff.}
  \define\macroE{This outputs other stuff.}
  \define[2]\macroF{This is text #1 and #2.}
  \define\macroG{This outputs other stuff.}
  \define\macroH{This outputs other stuff.}

  \starttext
  \macroA
  \startmode[just-checking]
  \macroB
  \macroC
  \macroD
  \macroE

  some more code
  \stopmode

  \macroF{a}{b}
  \macroG
  \macroH

  \stoptext

Compile to get the just-checking content with:

  context --mode=just-checking source.tex

https://www.pragma-ade.com/general/manuals/mmodes.pdf contains the
documentation and it’s only five pages long (excluding the cover).

Just in case it helps,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2025-04-27 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <431378854.1243657.1745779357147.ref@mail.yahoo.com>
2025-04-27 18:42 ` [NTG-context] " Joel via ntg-context
2025-04-27 18:54   ` [NTG-context] " Hans Hagen via ntg-context
2025-04-27 18:58   ` mf
2025-04-27 19:10   ` Pablo Rodriguez via ntg-context [this message]

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=5b55e076-9fa6-4df3-8712-7a8ee623f340@gmx.es \
    --to=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /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).