From: Henning Hraban Ramm <hraban@fiee.net>
Subject: programming: doifdefined & friends
Date: Thu, 5 Oct 2006 02:42:35 +0200 [thread overview]
Message-ID: <A6B13FFF-B2C2-4BD5-9996-025BA13344A8@fiee.net> (raw)
While I can't cope with counters, I'm trying other stuff that I don't
understand:
How must I use \doifdefined & friends?
Consider this snippet:
-----
\starttext
\def\myvar{JAJAJA}
\input tufte
\doifdefined{\myvar}{\par bla \myvar blub\par}
\input tufte
\stoptext
-----
I'd guess it would print "bla JAJAJAblub" between the two Tufte texts
and don't if I comment \def\myvar.
But I guess wrongly: It does nothing in this case, and complains
about undefined \myvar in the latter.
But if I really want to check if something is defined before I try to
use it, how must I write it?
(Expansion magic?)
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://contextgarden.net
http://www.cacert.org (I'm an assurer)
next reply other threads:[~2006-10-05 0:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 0:42 Henning Hraban Ramm [this message]
2006-10-05 0:56 ` Henning Hraban Ramm
2006-10-05 1:15 ` Henning Hraban Ramm
2006-10-05 4:04 ` Aditya Mahajan
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=A6B13FFF-B2C2-4BD5-9996-025BA13344A8@fiee.net \
--to=hraban@fiee.net \
--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).