ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: conditional for undefined references
Date: Sun, 29 Mar 2020 13:53:19 +0200	[thread overview]
Message-ID: <14c9e972-5eef-3791-a2cf-dc17c6fe8918@gmx.es> (raw)

Dear list,

consider the following sample:

    \setuppapersize[A8]
    \starttext
    \ConTeXt:

    \in[seac]

    Is it defined?:
    \doifelse{\in[seac]}{??}{undefined}{defined}

    \Lua:

    \ctxlua{context([[{\in[seac]}]])}

    Is it defined?:
    \startlua
    if [[{\in[seac]}]] == "??" then
        context("undefined")
      else
        context("defined")
    end
    \stoplua
    \stoptext


Is there a way to deal with undefined references?

I mean, I need a conditional to handle undefined references.

Why do I have undefined references in my documents? Well, I have almost
90 (Markdown) documents that I need to compile as single documents and
also as one document. When compiling as single documents, there are a
few references to other documents. This is the reason why they are
undefined.

Any chance to be able to catch a "??" output (or \dummyreference) from
"\in[reference]"?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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:[~2020-03-29 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 11:53 Pablo Rodriguez [this message]
2020-03-29 12:33 ` Wolfgang Schuster
2020-03-30  8:06   ` Pablo Rodriguez

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=14c9e972-5eef-3791-a2cf-dc17c6fe8918@gmx.es \
    --to=oinos@gmx.es \
    --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).