ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* starttexdefinition error in standalone, works in TL2013
@ 2014-02-27  4:08 Rik Kabel
  2014-02-27 15:13 ` Rik Kabel
  2014-03-01 12:32 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Rik Kabel @ 2014-02-27  4:08 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1946 bytes --]

The following code processes cleanly under TL2013 and fails with 
ConTeXt  ver: 2014.02.14 17:07 MKIV beta  fmt: 2014.2.16  int: 
english/english. I suspect a regression, but I am also open to being 
told that I am doing things incorrectly.

I also notice that it fails (even under TL2013) if a space is inserted 
after [#SETUP] in the doTrans intro. I thought that spaces should be 
allowed in \starttexdefinition -- is this only in the body and not the 
parameter description?

    % macros=mkvi

    \showframe


    \let\EndTranslation\relax

    \starttexdefinition Trans
       \dosingleempty\doTrans
    \stoptexdefinition

    % The following should work, but fails with current beta
    \starttexdefinition doTrans [#SETUP]#TRANSLATION\EndTranslation
       \language[en]
    \doifsomething{#1}{\getparameters[TR][setup=,#SETUP]\TRsetup}
       \noindentation\blank[halfline]
       (\,\ignorespaces#TRANSLATION\removeunwantedspaces\,)
    \stoptexdefinition

    \starttexdefinition Translation
       \dosingleempty\doTranslation
    \stoptexdefinition

    % This version works with both Texlive and current standalone beta
    \def\doTranslation[#SETUP]#TRANSLATION\EndTranslation%
    {\language[en]%
      \doifsomething{#SETUP}%
        {\getparameters[TR][setup=,#SETUP]\TRsetup}%
      \noindentation\blank[halfline]%
      (\,\ignorespaces#TRANSLATION\removeunwantedspaces\,)%
    }

    \starttext

    Translation using \tex{def}{\tex{doTranslation}} works both with
    TL2013 and current beta.

    \Translation[language=en]
       It betrays a slow-witted mentality to pursue the streams, but not
    to see the sources of things.
    \EndTranslation

    \blank

    Translation using \tex{starttexdef doTrans} fails with current beta.

    \Trans[language=en]
       It betrays a slow-witted mentality to pursue the streams, but not
    to see the sources of things.
    \EndTranslation

    \stoptext

-- 
Rik Kabel




[-- Attachment #1.2: Type: text/html, Size: 3035 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-12 19:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-27  4:08 starttexdefinition error in standalone, works in TL2013 Rik Kabel
2014-02-27 15:13 ` Rik Kabel
2014-03-01 12:32 ` Wolfgang Schuster
2014-03-01 17:01   ` Rik Kabel
2014-03-12 19:49   ` Movable code, was " Rik

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).