Re: [NTG-context] Question about chapter headings

2011-10-25 Thread Peter Münster
On Tue, Oct 25 2011, Alasdair McAndrew wrote:

 \def\chap#1#2{Chapter #1\crlf #2}

\def\chap#1#2{\vbox{Chapter #1\crlf #2}}

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


Re: [NTG-context] Question about chapter headings

2011-10-25 Thread Alasdair McAndrew
Thanks very much!  (I'm embarrassed - I should have been able to work that
one out for myself...)

-Alasdair

On Tue, Oct 25, 2011 at 5:55 PM, Peter Münster pmli...@free.fr wrote:

 On Tue, Oct 25 2011, Alasdair McAndrew wrote:

  \def\chap#1#2{Chapter #1\crlf #2}

 \def\chap#1#2{\vbox{Chapter #1\crlf #2}}

 --
   Peter

 ___
 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

 ___

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

Re: [NTG-context] Question about chapter headings

2011-10-25 Thread Wolfgang Schuster

Am 25.10.2011 um 08:55 schrieb Peter Münster:

 On Tue, Oct 25 2011, Alasdair McAndrew wrote:
 
 \def\chap#1#2{Chapter #1\crlf #2}
 
 \def\chap#1#2{\vbox{Chapter #1\crlf #2}}

Use uppercase or camelcase for self defined command and the chapter string can 
be set with label texts.

\define[2]\ChapterCommand
  {\vbox{#1\crlf#2}}

\setuplabeltext[chapter=Chapter ]

\setuphead[chapter][command=\ChapterCommand]

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


Re: [NTG-context] Question about chapter headings

2011-10-25 Thread Hans Hagen

On 25-10-2011 08:55, Peter Münster wrote:

On Tue, Oct 25 2011, Alasdair McAndrew wrote:


\def\chap#1#2{Chapter #1\crlf #2}


\def\chap#1#2{\vbox{Chapter #1\crlf #2}}


or:

\defineheadplacement[MyHead][vertical]#1#2%
  {\vbox{Chapter #1\crlf #2}}

which helps the calling code to make some decisions

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Links in exported XHTML file

2011-10-25 Thread Andreas Harder

On 25.10.2011, at 00:20, Hans Hagen wrote:

 On 24-10-2011 23:22, Andreas Harder wrote:
 
 On 24.10.2011, at 15:01, Hans Hagen wrote:
 
 On 21-10-2011 11:27, Andreas Harder wrote:
 \setupinteraction[state=start]
 
 \setupbackend[export=yes,xhtml=yes,css=export-example.css]
 
 \starttext
   \useURL[google][http://www.google.com/][][Google] \from[google]
   \textreference[txt:ref]{some text} \in[txt:ref] % OK
   \goto{Google}[url(http://www.google.com/)]
 \stoptext
 
 in next beta
 
 Thanks Hans, but now the text reference is *not* wrapped in xhml:a-tags.
 
  at.href = # .. gsub(at.location,:,_)
 
 =
 
href = # .. gsub(at.location,:,_)

Thanks again, but here is another one … sorry for complaining

\setupinteraction[state=start]
\setupbackend[export=yes,xhtml=yes,css=export-example.css]

\starttext
  \goto{Pragma (url)}[url(http://www.pragma-ade.com/)] % OK
  \goto{PDF 
(file)}[file(http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf)] 
  \goto{PDF 
(fileorurl)}[fileorurl(http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf)]
\stoptext

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


Re: [NTG-context] How do I test for empty labeltext?

2011-10-25 Thread Mojca Miklavec
On Mon, Oct 24, 2011 at 20:41, Hans Hagen pra...@wxs.nl wrote:
 On 24-10-2011 19:41, Mojca Miklavec wrote:

 Hello,

 The following code

 \setuplabeltext[test=]
 test is \doifemptyelse{\labeltext{test}}{empty}{not empty}

 doesn't work as intended for the reasons that I approximately
 understand (not exactly, but I understand that there might be a lot of
 weird stuff returned when I ask for labeltext). However I have no idea
 how to check if text is empty or not.

 As an exception :) :) :), MKIV hints should be highly appreciated and
 enough for this particular application.

 an empty test is always somewhat special as there can be an unexpandable
 macro inside that eventually expands to nothing

 you can try \doiftextelse instead

Thank you very much. This works fine.

This should probably be added to
   http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions
at least (possibly to reference next to labels as well), but I'm not
sure how to describe it.

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


Re: [NTG-context] xml and lua again

2011-10-25 Thread Thomas A. Schmitz

On 10/24/11 8:48 PM, Hans Hagen wrote:

sure, oryou can play with

if xml.filter(t,.[@frame=on]) then

the x-*.lua show some tricks



OK, I'm in my stubborn mode then: why doesn't this work:

\startbuffer[test]
a
  nattable frame=on
tr
  td1/td
  td2/td
  td3/td
  td4/td
/tr
tr
  td5/td
  td6/td
  td7/td
  td8/td
/tr
  /nattable
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{main}{a|nattable|tr|td|}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:nattable
\startluacode
  if xml.attribute(t, /, frame, off) == on then
  context(Yes, the frame is really on!)
  else
  context(Nope, sorry, it's still off.)
  end
  context(true)
  context.placefigure( { here }, none , function()
context.bTABLE()
 context.xmlflush(#1)
context.eTABLE()
  end)
\stopluacode
\stopxmlsetups

\startxmlsetups xml:tr
\startluacode
  context.bTR()
context.xmlflush(#1)
  context.eTR()
\stopluacode
\stopxmlsetups

\startxmlsetups xml:td
\startluacode
  context.bTD()
context.xmlflush(#1)
  context.eTD()
\stopluacode
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

I get a lua error here.

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


Re: [NTG-context] xml and lua again

2011-10-25 Thread Wolfgang Schuster

Am 25.10.2011 um 11:43 schrieb Thomas A. Schmitz:

 On 10/24/11 8:48 PM, Hans Hagen wrote:
 sure, oryou can play with
 
 if xml.filter(t,.[@frame=on]) then
 
 the x-*.lua show some tricks
 
 
 OK, I'm in my stubborn mode then: why doesn't this work:
 
 […]
 
 \startxmlsetups xml:nattable
\startluacode
  if xml.attribute(t, /, frame, off) == on then
  context(Yes, the frame is really on!)
  else
  context(Nope, sorry, it's still off.)
  end

 if xml.attribute(lxml.id(#1), /, frame, off) == on then %
   context(Yes, the frame is really on!)
 else %
   context(Nope, sorry, it's still off.)
 end %

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


Re: [NTG-context] How do I test for empty labeltext?

2011-10-25 Thread Hans Hagen

On 25-10-2011 11:26, Mojca Miklavec wrote:

On Mon, Oct 24, 2011 at 20:41, Hans Hagenpra...@wxs.nl  wrote:

On 24-10-2011 19:41, Mojca Miklavec wrote:


Hello,

The following code

\setuplabeltext[test=]
test is \doifemptyelse{\labeltext{test}}{empty}{not empty}

doesn't work as intended for the reasons that I approximately
understand (not exactly, but I understand that there might be a lot of
weird stuff returned when I ask for labeltext). However I have no idea
how to check if text is empty or not.

As an exception :) :) :), MKIV hints should be highly appreciated and
enough for this particular application.


an empty test is always somewhat special as there can be an unexpandable
macro inside that eventually expands to nothing

you can try \doiftextelse instead


Thank you very much. This works fine.

This should probably be added to
http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions
at least (possibly to reference next to labels as well), but I'm not
sure how to describe it.


If you want to know if some macro provides some typeset content you can 
use the following helper macro: ...




-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] xml and lua again

2011-10-25 Thread Hans Hagen

On 25-10-2011 11:43, Thomas A. Schmitz wrote:


\startxmlsetups xml:nattable
\startluacode
if xml.attribute(t, /, frame, off) == on then
context(Yes, the frame is really on!)
else
context(Nope, sorry, it's still off.)
end
context(true)
context.placefigure( { here }, none , function()
context.bTABLE()
context.xmlflush(#1)
context.eTABLE()
end)
\stopluacode
\stopxmlsetups


see Wolfgangs answer

anyway, best move the lua code and wrap it in a function 
document.MyWhatever ... now its get defined each time


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] xml and lua again

2011-10-25 Thread Thomas A. Schmitz

On 10/25/11 12:17 PM, Hans Hagen wrote:


see Wolfgangs answer

anyway, best move the lua code and wrap it in a function
document.MyWhatever ... now its get defined each time

Hans


Wolfgang, Hans,

thanks a lot, this works now. Will now try and move the code to a 
ctxluafile and see if I can make it work again. If not, I'll be back; no 
good deed goes unpunished...


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


[NTG-context] xml and lpath

2011-10-25 Thread Martin Fechner

Hi all,

I'm testing the possibilities of xml and ConTeXt. I was wondering if it 
is possible to make an extra setup for every text-element. So it would 
be possible to have an setup in a very flexible way. It should be 
something like this:


\startbuffer[text]
a
  b
First text.
hiding type=begin/
Second text.
  /b
  Third text.
  hiding type=end/
  Fourth text.
/a
\stopbuffer

\startxmlsetups xml:textsetups
\xmlsetsetup{#1}{a|b}{xml:*}
\xmlsetsetup{#1}{hiding[type='begin']}{xml:hiding:begin}
\xmlsetsetup{#1}{hiding[type='end'}{xml:hiding:end}
\xmlsetsetup{#1}{text()}{xml:text} % Something like this is needed
\stopxmlsetups

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:hiding:begin
\enablemode[hiding]
\stopxmlsetups

\startxmlsetups xml:hiding:end
\disablemode[hiding]
\stopxmlsetups

\startxmlsetups xml:text
\startnotmode[hiding]
\xmlflush{#1}
\crlf
\stopnotmode
\stopxmlsetups

So that the result will be:

First text.
Fourth text.

Is something like this possible or is there still another way?

Best regards,

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


[NTG-context] Luatex question

2011-10-25 Thread Lutz Haseloff
Hi all,

some months ago I printed the name of the current font with following code:

\starttext
The current font is: \ctxlua{tex.print(font.getfont(font.current()).fullname)}.
\stoptext

Now I get an error message:

! LuaTeX error main ctx instance:1: no string to print
stack traceback:
[C]: in function 'print'
main ctx instance:1: in main chunk.
l.2 ...int(font.getfont(font.current()).fullname)}
  .
?

What is the right way now?
(didn't find any news in functionref.pdf or luatexref-t.pdf)

Greetings Lutz
___
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
___


Re: [NTG-context] Luatex question

2011-10-25 Thread luigi scarso
On Tue, Oct 25, 2011 at 2:09 PM, Lutz Haseloff
lutz.hasel...@googlemail.com wrote:
 Hi all,

 some months ago I printed the name of the current font with following code:

 \starttext
 The current font is: 
 \ctxlua{tex.print(font.getfont(font.current()).fullname)}.
 \stoptext

 Now I get an error message:

 ! LuaTeX error main ctx instance:1: no string to print
 stack traceback:
        [C]: in function 'print'
        main ctx instance:1: in main chunk.
 l.2 ...int(font.getfont(font.current()).fullname)}
                                                  .
 ?

 What is the right way now?
 (didn't find any news in functionref.pdf or luatexref-t.pdf)
Not the answer, but
in the suite  there is a pdf with a list :
status-lua.pdf


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

Re: [NTG-context] xml and lpath

2011-10-25 Thread Hans Hagen

On 25-10-2011 12:52, Martin Fechner wrote:

Hi all,

I'm testing the possibilities of xml and ConTeXt. I was wondering if it
is possible to make an extra setup for every text-element. So it would
be possible to have an setup in a very flexible way. It should be
something like this:

\startbuffer[text]
a
b
First text.
hiding type=begin/
Second text.
/b
Third text.
hiding type=end/
Fourth text.
/a
\stopbuffer

\startxmlsetups xml:textsetups
\xmlsetsetup{#1}{a|b}{xml:*}
\xmlsetsetup{#1}{hiding[type='begin']}{xml:hiding:begin}
\xmlsetsetup{#1}{hiding[type='end'}{xml:hiding:end}
\xmlsetsetup{#1}{text()}{xml:text} % Something like this is needed
\stopxmlsetups

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:hiding:begin
\enablemode[hiding]
\stopxmlsetups

\startxmlsetups xml:hiding:end
\disablemode[hiding]
\stopxmlsetups

\startxmlsetups xml:text
\startnotmode[hiding]
\xmlflush{#1}
\crlf
\stopnotmode
\stopxmlsetups

So that the result will be:

First text.
Fourth text.

Is something like this possible or is there still another way?


it really depends on how the nesting works out as explicit grouping can 
interfere


\startbuffer[text]
a
  b
First text.
hiding type=begin/
Second text.
  /b
  Third text.
  hiding type=end/
  Fourth text.
/a
\stopbuffer

\startxmlsetups xml:textsetups
\xmlsetsetup{#1}{a|b|hiding}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:textsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:hiding
\doifelse {\xmlatt{#1}{type}} {begin} {
\startnointerference
} {
\stopnointerference
}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{text}{}
\stoptext

maybe it makes sense to have a 'hide' flag built in the serializer (or 
maybe some explicit stream related hooks)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Luatex question

2011-10-25 Thread Hans Hagen

On 25-10-2011 14:09, Lutz Haseloff wrote:

Hi all,

some months ago I printed the name of the current font with following code:

\starttext
The current font is: \ctxlua{tex.print(font.getfont(font.current()).fullname)}.
\stoptext

Now I get an error message:

! LuaTeX errormain ctx instance:1: no string to print
stack traceback:
[C]: in function 'print'
main ctx instance:1: in main chunk.
l.2 ...int(font.getfont(font.current()).fullname)}
   .
?

What is the right way now?
(didn't find any news in functionref.pdf or luatexref-t.pdf)


In order of efficiency (most efficient on top):

\starttext

\ctxlua{tex.print(fonts.hashes.properties[font.current()].fullname)}

\ctxlua{tex.print(fonts.hashes.identifiers[font.current()].properties.fullname)}

\ctxlua{tex.print(font.getfont(font.current()).properties.fullname)}

\stoptext

the font.getfont returns the table that tex gets passed and in context 
that table gets normalized, in the sense that variables are collected in 
'properties' and 'parameters'


in general, don't use font.getfont() in context as in the worst case it 
will rebuild a lua table at the tex


in the current beta you can run s-fnt-35.mkiv to see how this works

(this file will be renamed in a next beta)

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] Luatex question

2011-10-25 Thread Lutz Haseloff
Thank you for your detailed information.

2011/10/25 Hans Hagen pra...@wxs.nl:
 On 25-10-2011 14:09, Lutz Haseloff wrote:

 Hi all,

 some months ago I printed the name of the current font with following
 code:

 \starttext
 The current font is:
 \ctxlua{tex.print(font.getfont(font.current()).fullname)}.
 \stoptext

 Now I get an error message:

 ! LuaTeX errormain ctx instance:1: no string to print
 stack traceback:
        [C]: in function 'print'
        main ctx instance:1: in main chunk.
 l.2 ...int(font.getfont(font.current()).fullname)}
                                                   .
 ?

 What is the right way now?
 (didn't find any news in functionref.pdf or luatexref-t.pdf)

 In order of efficiency (most efficient on top):

 \starttext

 \ctxlua{tex.print(fonts.hashes.properties[font.current()].fullname)}

 \ctxlua{tex.print(fonts.hashes.identifiers[font.current()].properties.fullname)}

 \ctxlua{tex.print(font.getfont(font.current()).properties.fullname)}

 \stoptext

 the font.getfont returns the table that tex gets passed and in context that
 table gets normalized, in the sense that variables are collected in
 'properties' and 'parameters'

 in general, don't use font.getfont() in context as in the worst case it will
 rebuild a lua table at the tex

 in the current beta you can run s-fnt-35.mkiv to see how this works

 (this file will be renamed in a next beta)

 Hans



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

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

Re: [NTG-context] xml and lpath

2011-10-25 Thread Martin Fechner

Am 25.10.2011 14:20, schrieb Hans Hagen:



\startxmlsetups xml:hiding
\doifelse {\xmlatt{#1}{type}} {begin} {
\startnointerference
} {
\stopnointerference
}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{text}{}
\stoptext

maybe it makes sense to have a 'hide' flag built in the serializer (or
maybe some explicit stream related hooks)

Hans



Thank you very much. Now every thing works. It helps me a lot. I am glad 
about such possibilities with XML and ConTeXt.


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


Re: [NTG-context] How do I test for empty labeltext?

2011-10-25 Thread Aditya Mahajan

On Tue, 25 Oct 2011, Mojca Miklavec wrote:


you can try \doiftextelse instead


Thank you very much. This works fine.

This should probably be added to
  http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions
at least (possibly to reference next to labels as well), but I'm not
sure how to describe it.


IIRC, there is some explanation in the source file (supp-box or pack-box, 
not sure which one).


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


[NTG-context] tilde

2011-10-25 Thread Wolfgang Werners-Lucchini
Hallo,

if I want a non-breaking-space I use a tilde '~' sign.

For example in: bakerstreet~13

This has worked in my old context. But now, after my update,
I get an very long space. 

Minimal example:

\starttext
\framed[align=flushright,width=broad]{Hello~World!}
\stoptext

Is this a bug? What else kann I use for a non-breaking-space?

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


Re: [NTG-context] tilde

2011-10-25 Thread Marco
On 2011-10-25 Wolfgang Werners-Lucchini w...@musensturm.de wrote:

 if I want a non-breaking-space I use a tilde '~' sign.
 
 For example in: bakerstreet~13
 
 This has worked in my old context. But now, after my update,
 I get an very long space. 
 
 Minimal example:
 
 \starttext
 \framed[align=flushright,width=broad]{Hello~World!}
 \stoptext
 
 Is this a bug?

Confirmed. Works here with 2011.06.11 16:45 and fails with 2011.10.24 21:26.

 What else kann I use for a non-breaking-space?

Use a 'NO-BREAK SPACE' (U+00A0). But the behaviour
persists.

Maybe a better minimal example:

\starttext
\framed[align=flushright,width=broad]{Hello~World!}
\framed[align=flushright,width=broad]{Hello World!}
\stoptext


Marco


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


[NTG-context] Galleries with photos from ConTeXt meetings: any ideas?

2011-10-25 Thread Mojca Miklavec
Hello,

we currently have two old galleries on contextgarden.net (both hidden,
no links to them and both password protected). We have additional
galleries on Facebook (accessible to a rather wide audience). And
dozens of other photos that have never been uploaded anywhere. And
some galleries spread all over the place.

I have a few questions:
- Should photos from meetings be private or public? (The ones from
BachoTeX are public for example.)
- In either case I need suggestions about the best option to store
photos on new server. (Which software to run?)

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


[NTG-context] Some more ToC questions

2011-10-25 Thread Alasdair McAndrew
Thanks to the great expertise of folk on this mailgroup, I have my chapter
headings set so that each one comes out as

Chapter n
Name of Chapter

However, I have a few more questions.  First: if I use completecontent to
display the contents, how can I have the Contents title display without my
Chapter line?  That is, is there a way of turning off my chapter command
temporarily?  (I've found that title doesn't work here: If I use
\title{Contents} \placecontent I still get a Chapter line.)

Second: I'm writing out a book of student notes, and each chapter ends with
a set of exercises.  I'd like these exercises to be typeset as unnumbered
sections (subjects), and appear so in the ToC.  Like:

4.4  Second last section
4.5  Last section
Exercises

What is the best way of doing this (MkII)?  I've tried

\definehead[exercise][section]
\setuphead[exercise][number=no]
\setuplist[exercise][headnumber=no]

but that doesn't work on its own, and when paired with
\definecombinedlist[content][exercise,chapter,section] wipes out the
contents completely.

Any advice (or even pointers to a web page) would be most welcome.

Thanks,
Alasdair
___
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
___