ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* 'german' indention in radio field
@ 2004-10-15  8:11 Peter Rolf
  2004-10-26 12:22 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Rolf @ 2004-10-15  8:11 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

Hi there!

After a new installation of Texlife my radio field example (4.10.) works 
(now?).
But if you simply add
  \mainlanguage[de]
the first button is indented again. Hmmm...., it seems that my first example
was too minimal. I've also tried [en] and [dk]; no problems.

I have attached the tex-source and the resulting files (pdf,log).

Greetings,

  Peter


[-- Attachment #2: Radio.tex --]
[-- Type: text/plain, Size: 2081 bytes --]

% interface=en output=pdftex
\enableregime[utf-8]
\mainlanguage[de] % !!!!

\setupcolors[state=start]
\setupinteraction[state=start]

\f
\starttext

\def\Buttonheight{8mm}
\def\Buttonwidth{40mm}

\def\ButtonUnselected#1{\framed[frame=off,strut=no,offset=overlay,align={right,lohi},
  width=\Buttonwidth,height=\Buttonheight]
  {\xii#1}}
\def\ButtonSelected#1{\framed[strut=no,offset=overlay,width=\Buttonwidth,height=\Buttonheight,
  align={right,lohi},background=color,backgroundcolor=lightgray,frame=on]
  {\xii#1}}

% graphics for active button (only one)
\definesymbol[TbuttonA] [{\ButtonUnselected{\hbox to 2em{~+~}Normal}}] % not selected (mouse pointer is not in area)
\definesymbol[TbuttonB] [{\ButtonSelected{\hbox to 2em{~+~}InArea}}] % selected
\definesymbol[TbuttonC] [{\ButtonSelected{\hbox to 2em{~+~}LMbutton}}] % + left mouse button
% graphics for inactive buttons
\definesymbol[TbuttonX] [{\ButtonUnselected{\hbox to 2em{}Normal}}]
\definesymbol[TbuttonY] [{\ButtonSelected{\hbox to 2em{}InArea}}]
\definesymbol[TbuttonZ] [{\ButtonSelected{\hbox to 2em{}LMbutton}}] % changes to active button, if lmbutton is released in area

% setup for single button
\setupfield[button]
  [width=40mm,
   height=8mm,
   align=right,
   distance=0mm,
   fieldoffset=0bp,
   offset=none,
   strut=no,
   depth=0pt,
   frame=on,
  ]

% setup for radio field
\setupfield[radiofield][vertical] % same for horizontal+\hbox
  [align=right,
   distance=0mm,
   offset=none,
   strut=no,
   fieldoffset=0mm,
   frame=on,
   empty=yes,
   option=empty,
  ]

% Radio1 uses setup defined in 'radiofield'
\definefield[Radio1][radio][radiofield][Button1,Button2,Button3][Button1]
% ButtonN uses setup defined in 'button'
\definesubfield[Button1] [button] [{TbuttonA,TbuttonB,TbuttonC},{TbuttonX,TbuttonY,TbuttonZ}]
\definesubfield[Button2] [button] [{TbuttonA,TbuttonB,TbuttonC},{TbuttonX,TbuttonY,TbuttonZ}]
\definesubfield[Button3] [button] [{TbuttonA,TbuttonB,TbuttonC},{TbuttonX,TbuttonY,TbuttonZ}]


\noindent
\vbox{\forgetall
\field[Button1]
\field[Button2]
\field[Button3]
}

\stoptext

[-- Attachment #3: Radio.zip --]
[-- Type: application/x-zip-compressed, Size: 10278 bytes --]

[-- Attachment #4: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: 'german' indention in radio field
  2004-10-15  8:11 'german' indention in radio field Peter Rolf
@ 2004-10-26 12:22 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2004-10-26 12:22 UTC (permalink / raw)


Peter Rolf wrote:

> Hi there!
> 
> After a new installation of Texlife my radio field example (4.10.) works 
> (now?).
> But if you simply add
>  \mainlanguage[de]
> the first button is indented again. Hmmm...., it seems that my first 
> example
> was too minimal. I've also tried [en] and [dk]; no problems.

You need to change this in enco-fde,tex (i.e. remove the comment since 
it introduces a space)

\startencoding[pdfdoc]
   \startlanguagespecifics[\s!de]% hm, a % is needed
     \defineactivecharacter " {\"}
   \stoplanguagespecifics
\stopencoding

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

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

end of thread, other threads:[~2004-10-26 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15  8:11 'german' indention in radio field Peter Rolf
2004-10-26 12:22 ` Hans Hagen

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