ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: White space around synonyms
Date: Mon, 08 May 2006 10:08:03 +0200	[thread overview]
Message-ID: <445EFC63.1020008@wxs.nl> (raw)
In-Reply-To: <e3mfhm$u7u$1@sea.gmane.org>

Johannes Graumann wrote:
> Hello,
>
> please take a look at the output of the code appended. I'm plagued by
> incorrect white space around the output: to much before and after the
> expanded '\infull' and short versions. How to remedy that?
>
> Thanks ... it sure took me a while to find the '\executeifdefined'
> tidbit ...
>
> Joh
>
> % setup 'synonymes' list called 'abbreviations'
> \definesynonyms[abbreviation][abbreviations][\infull]
>
> % give out in the list the ones used
> \setupsynonyms[abbreviation][criterium=used]
>
> % <abbreviations/> calls the completelist as a 'chapter'
> \defineXMLargument
>   [abbreviations]
>   {\expanded{\completelistofabbreviations}}
>
> % abbreviations are defined as follows
> \defineXMLenvironment
>   [abbreviationdev]
>   [key=]
>   {
>     \defineXMLsave[short]
>     \defineXMLsave[full]
>   }
>   {
>     \abbreviation
>       [\XMLop{key}]
>       {\XMLflush{short}}
>       {\XMLflush{full}}
>   }
>
> % abbreviations are recalled like this (short version is the default)
> \defineXMLargument
>   [abbreviation]
>   [key=,opt=short]
>   {
>     \doifelse{\XMLop{opt}}{full}
>       {\infull{\XMLop{key}}}
>       {\executeifdefined{\XMLop{key}}}
>   }
>   
end lines in the definitions with % or use setups

(spurious spaces)

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

  reply	other threads:[~2006-05-08  8:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-08  3:54 Johannes Graumann
2006-05-08  8:08 ` Hans Hagen [this message]
2006-05-08 16:07   ` Johannes Graumann

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=445EFC63.1020008@wxs.nl \
    --to=pragma@wxs.nl \
    --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).