![](https://secure.gravatar.com/avatar/cde1dc8e3c1a66e7c6342a763d371696.jpg?s=120&d=mm&r=g)
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}}} } \starttext \startXMLdata <abbreviationdev key="id"> <short>short</short> <full>full description of ``short''</full> </abbreviationdev> <abbreviations/> Blabla <abbreviation key="id" opt="short"/>. More blabla <abbreviation key="id" opt="full"/>. \stopXMLdata \stoptext
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Johannes Graumann